html {
  background: var(--dora-sky-soft);
  scrollbar-width: none;
}
.auth-screen {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 86% 8%, rgba(255,255,255,.82) 0 56px, transparent 57px),
    radial-gradient(circle at 7% 93%, rgba(255,255,255,.55) 0 74px, transparent 75px),
    linear-gradient(180deg,#e6f7ff 0%,#f7fcff 48%,#fff8e9 100%);
}
.auth-card {
  width: min(380px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.auth-identity { margin-bottom: 45px; }
.auth-identity img, .auth-card > img { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 12px 30px rgba(28,102,143,.13); }
.auth-card h1 { margin: 13px 0 0; font-size: 27px; letter-spacing: .08em; }
.auth-card > p { margin: 9px 0 28px; color: var(--dora-muted); font-size: 12px; line-height: 1.65; }
.auth-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 26px; border-bottom: 1px solid rgba(36,158,223,.16); }
.auth-segment button { position: relative; min-height: 42px; border: 0; color: #91a4af; background: transparent; font-size: 15px; font-weight: 650; }
.auth-segment button.active { color: var(--dora-ink); background: transparent; box-shadow: none; }
.auth-segment button.active::after { content: ''; position: absolute; right: 32%; bottom: -1px; left: 32%; height: 3px; border-radius: 3px; background: var(--dora-blue); }
.auth-card form { display: grid; gap: 16px; text-align: left; }
.auth-card label { display: grid; gap: 8px; color: #5e7b8d; font-size: 12px; font-weight: 650; }
.auth-card input { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid rgba(36,158,223,.14); border-radius: 16px; color: var(--dora-ink); background: rgba(255,255,255,.72); font: inherit; font-size: 16px; outline: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.auth-card input:focus { border-color: var(--dora-blue); background: #fff; box-shadow: 0 0 0 4px rgba(36,158,223,.1); }
.auth-code-card > p strong { color: var(--dora-ink); font-weight: 700; }
.auth-card .btn { width: 100%; min-height: 52px; margin-top: 7px; border-radius: 16px; }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 18px; }
.auth-links[hidden] { display: none !important; }
.auth-link { min-height: 34px; padding: 7px; border: 0; color: var(--dora-blue-deep); background: transparent; font-size: 12px; font-weight: 650; }
.auth-link.muted { color: var(--dora-muted); }
.auth-resend { min-height: 42px; display: grid; place-items: center; margin-top: 14px; color: #91a4af; font-size: 12px; }
.auth-code-card { padding-top: 22px; }
.auth-code-card > img { margin-bottom: 6px; }

@media (max-width: 480px) {
  .auth-screen { padding-top: max(32px, env(safe-area-inset-top)); }
  .auth-identity { margin-bottom: 40px; }
  .auth-identity img, .auth-card > img { width: 78px; height: 78px; border-radius: 22px; }
  .auth-card h1 { font-size: 25px; }
}
@media (max-height: 620px) {
  .auth-screen {
    justify-content: flex-start;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .auth-identity { margin-bottom: 22px; }
  .auth-identity img, .auth-card > img { width: 62px; height: 62px; border-radius: 18px; }
  .auth-card h1 { margin-top: 8px; font-size: 22px; }
  .auth-segment { margin-bottom: 18px; }
  .auth-card form { gap: 11px; }
  .auth-card > p { margin-bottom: 18px; }
}
/* 所有页面和横向选择器都保留滚动能力，但不显示浏览器滚动条。 */
*,
*::before,
*::after { scrollbar-width: none; }
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.mobile-preview-stage { display: none; }
html.mobile-preview-host,
html.mobile-preview-host body { width: 100%; height: 100%; overflow: hidden; }
html.mobile-preview-host body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.9) 0 70px, transparent 72px),
    radial-gradient(circle at 82% 82%, rgba(255,255,255,.64) 0 110px, transparent 112px),
    linear-gradient(145deg,#d8f1ff,#f8fcff 55%,#fff4da);
}
html.mobile-preview-host body > .grain,
html.mobile-preview-host body > #app,
html.mobile-preview-host body > #toast { display: none; }
html.mobile-preview-host .mobile-preview-stage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
}
.mobile-preview-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #41697f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
}
.mobile-preview-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35b879;
  box-shadow: 0 0 0 4px rgba(53,184,121,.14);
}
.mobile-preview-device {
  position: relative;
  width: 390px;
  max-width: calc(100vw - 28px);
  height: min(844px, calc(100vh - 54px));
  overflow: hidden;
  padding: 8px;
  border: 2px solid #142f3f;
  border-radius: 40px;
  background: #142f3f;
  box-shadow: 0 26px 70px rgba(26,71,96,.28), 0 7px 0 rgba(22,52,68,.12);
}
.mobile-preview-speaker {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 50%;
  width: 68px;
  height: 18px;
  border-radius: 999px;
  background: #142f3f;
  transform: translateX(-50%);
  pointer-events: none;
}
.mobile-preview-device iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 31px;
  background: #f7fcff;
}
body {
  color: var(--dora-ink);
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 7%, rgba(255,255,255,.95) 0 42px, transparent 43px),
    radial-gradient(circle at 16% 8%, rgba(255,255,255,.95) 0 62px, transparent 63px),
    radial-gradient(circle at 91% 22%, rgba(255,255,255,.75) 0 55px, transparent 56px),
    radial-gradient(circle at 84% 21%, rgba(255,255,255,.75) 0 36px, transparent 37px),
    linear-gradient(180deg, #dff5ff 0%, #f7fcff 48%, #fff9ee 100%);
  background-attachment: fixed;
  touch-action: pan-y;
}
.grain { opacity: .035; }
.app-shell { position: relative; padding-bottom: 50px; }
.topbar { border-bottom: 2px dashed rgba(36,158,223,.2); }
.brand-mark-button { width: 47px; height: 47px; padding: 2px; border: 0; border-radius: 15px; background: transparent; display: grid; place-items: center; transition: transform .2s ease, background .2s ease; }
.brand-mark-button:hover { background: rgba(36,158,223,.12); transform: translateY(-1px) rotate(-3deg); }
.brand-mark-button:focus-visible { outline: 3px solid var(--dora-yellow); outline-offset: 2px; }
.brand-name { color: var(--dora-blue-deep); font-weight: 800; letter-spacing: .06em; }
.brand-sub { color: var(--dora-muted); font-weight: 600; letter-spacing: .08em; text-transform: none; }
.eyebrow { color: var(--dora-blue-deep); font-weight: 800; letter-spacing: .18em; }
h1, h2, h3 { color: var(--dora-ink); font-weight: 800; }
h1 { letter-spacing: .01em; }
.lede, .section-head p, .hint { color: var(--dora-muted); }

.bottom-nav {
  border: 3px solid rgba(36,158,223,.22);
  background: rgba(255,255,255,.93);
  box-shadow: 0 12px 30px rgba(30,121,171,.18), 0 3px 0 rgba(36,158,223,.14);
  border-radius: 28px;
}
.nav-item { color: var(--dora-muted); font-weight: 700; border-radius: 20px; }
.nav-item.active { color: #fff; background: var(--dora-blue); box-shadow: 0 5px 0 var(--dora-blue-deep); transform: translateY(-2px); }
.nav-icon { font-size: 19px; }

body.drawer-open { overflow: hidden; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 64;
  background: rgba(32,76,101,.28); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.side-drawer {
  position: fixed; z-index: 65; left: 0; top: 0; bottom: 0;
  width: min(242px, 68vw); padding: max(22px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom));
  color: var(--dora-ink); background: rgba(247,252,255,.98);
  border-right: 3px solid rgba(36,158,223,.28);
  box-shadow: 16px 0 45px rgba(25,92,130,.2);
  transform: translateX(-105%); transition: transform .3s cubic-bezier(.22,.8,.2,1);
  display: flex; flex-direction: column;
}
.side-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; padding: 8px 4px 18px 12px; border-bottom: 2px dashed rgba(36,158,223,.2); }
.drawer-title { display: flex; align-items: center; gap: 11px; font-weight: 900; color: var(--dora-blue-deep); }
.side-nav { display: grid; gap: 10px; padding: 22px 0; }
.side-nav-item { width: 100%; display: flex; align-items: center; border: 2px solid transparent; border-radius: 18px; padding: 14px 20px; color: var(--dora-muted); background: transparent; font-size: 15px; font-weight: 800; text-align: left; }
.side-nav-item:hover { color: var(--dora-blue-deep); background: #fff; border-color: rgba(36,158,223,.15); }
.side-nav-item.active { color: #fff; background: var(--dora-blue); border-color: var(--dora-blue-deep); box-shadow: 0 5px 0 var(--dora-blue-deep); }
.side-nav-group { display: grid; gap: 5px; }
.side-nav-parent { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 3px; align-items: center; }
.side-nav-toggle { width: 38px; height: 42px; padding: 0; border: 0; border-radius: 13px; color: var(--dora-muted); background: transparent; font-size: 25px; line-height: 1; transition: transform .2s ease, background .2s ease; }
.side-nav-group.open .side-nav-toggle { transform: rotate(90deg); color: var(--dora-blue-deep); background: rgba(36,158,223,.08); }
.side-nav-submenu { padding: 0 4px 2px 17px; }
.side-nav-subitem { width: 100%; min-height: 38px; padding: 8px 13px; border: 0; border-left: 2px solid rgba(36,158,223,.2); border-radius: 0 12px 12px 0; color: var(--dora-muted); background: transparent; font-size: 12px; font-weight: 800; text-align: left; }
.side-nav-subitem.active { border-left-color: var(--dora-blue); color: var(--dora-blue-deep); background: rgba(36,158,223,.09); }
.drawer-hint { margin-top: auto; color: var(--dora-muted); text-align: center; font-size: 11px; font-weight: 700; }
.header-back, .header-action-right {
  min-height: 40px;
  border: 0;
  color: var(--dora-blue-deep);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: 800;
}
.header-back { min-width: 40px; font-size: 28px; line-height: 1; }
.header-action-right { padding: 7px 2px; font-size: 13px; }

.card, .dimension-card, .meaning-card {
  border: 2px solid rgba(36,158,223,.16);
  background: rgba(255,255,255,.93);
  box-shadow: 0 8px 0 rgba(36,158,223,.08), 0 18px 38px rgba(35,112,154,.08);
}
.hero-grid { min-height: 560px; }
.daily-forecast-page { width: min(720px,100%); margin: 0 auto; }
.daily-forecast-head { position: relative; align-items: center; justify-content: center; }
.daily-forecast-head > div:first-child { width: 100%; text-align: center; }
.daily-forecast-head .header-back { position: absolute; top: 50%; left: 0; transform: translateY(-50%); }
.daily-forecast-meta { display: grid; justify-items: center; gap: 4px; margin: -6px 0 20px; text-align: center; }
.daily-forecast-meta strong { color: var(--dora-blue-deep); font-size: 13px; }
.daily-forecast-meta span { color: var(--dora-muted); font-size: 10px; font-weight: 700; }
.daily-forecast-list { overflow: hidden; border: 2px solid rgba(36,158,223,.14); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(35,112,154,.07); }
.daily-forecast-list article { padding: 19px 22px; }
.daily-forecast-list article + article { border-top: 1px solid rgba(36,158,223,.13); }
.daily-forecast-list h2 { margin: 0 0 7px; color: var(--dora-blue-deep); font-size: 14px; }
.daily-forecast-list p { margin: 0; color: var(--dora-ink); font-size: 13px; line-height: 1.8; }
.daily-forecast-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; border: 2px solid rgba(36,158,223,.14); border-radius: 24px; color: var(--dora-muted); background: rgba(255,255,255,.86); text-align: center; }
.daily-forecast-state p { margin: 0; font-size: 12px; }
.prediction-page { width: min(780px,100%); margin: 0 auto; }
.prediction-step-head { position: relative; align-items: center; justify-content: center; }
.prediction-step-head > div:first-child { width: 100%; text-align: center; }
.prediction-step-head > .header-back { position: absolute; top: 50%; left: 0; transform: translateY(-50%); }
.prediction-form { width: min(620px,100%); display: grid; gap: 20px; margin: 0 auto; padding: 26px; border-radius: 24px; }
.prediction-form label { display: grid; gap: 9px; }
.prediction-form label > span { color: var(--dora-blue-deep); font-size: 13px; font-weight: 800; }
.prediction-form textarea { min-height: 118px; font-size: 15px; }
.prediction-form label:nth-child(2) textarea { min-height: 180px; }
.prediction-form .btn { justify-self: end; min-width: 130px; }
.prediction-spread-options { width: min(660px,100%); display: grid; gap: 11px; margin: 0 auto 24px; }
.prediction-spread-choice { position: relative; width: 100%; display: grid; grid-template-columns: 92px minmax(0,1fr) 26px; align-items: center; gap: 17px; padding: 17px 18px; border: 2px solid rgba(36,158,223,.14); border-radius: 21px; color: var(--dora-ink); background: rgba(255,255,255,.9); text-align: left; }
.prediction-spread-choice.selected { border-color: var(--dora-blue); background: #fff; }
.prediction-spread-copy { min-width: 0; display: grid; gap: 7px; }
.prediction-spread-copy strong { font-size: 16px; }
.prediction-spread-copy > span { color: var(--dora-muted); font-size: 11px; font-weight: 650; line-height: 1.65; }
.prediction-spread-choice > i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--dora-blue); font-size: 13px; font-style: normal; }
.prediction-spread-choice:not(.selected) > i { background: rgba(36,158,223,.1); }
.prediction-spread-icon { --icon-card-width: 16px; width: 82px; height: 84px; display: grid; grid-template-columns: repeat(var(--spread-columns), 1fr); grid-template-rows: repeat(var(--spread-rows), 1fr); place-items: center; gap: 3px; }
.prediction-spread-icon i { width: var(--icon-card-width); aspect-ratio: 600/1040; grid-row: var(--spread-row); grid-column: var(--spread-column); border: 2px solid var(--dora-blue); border-radius: 3px; background: rgba(36,158,223,.09); box-shadow: 0 2px 5px rgba(23,83,116,.12); }
.prediction-bottom-action { display: flex; justify-content: center; }
.prediction-bottom-action .btn { min-width: 180px; }
.prediction-spread-layout { width: max-content; display: grid; grid-template-columns: repeat(var(--spread-columns), 64px); grid-template-rows: repeat(var(--spread-rows), max-content); justify-items: center; align-items: start; gap: 16px 13px; margin-inline: auto; }
.prediction-spread-slot { width: 64px; display: grid; grid-row: var(--spread-row); grid-column: var(--spread-column); justify-items: center; align-content: start; gap: 5px; }
.prediction-spread-slot > span, .prediction-spread-slot > img { width: 64px; aspect-ratio: 600/1040; border: 3px solid #fff; border-radius: 9px; background: var(--dora-blue) url('/assets/card-back.svg') center/cover no-repeat; box-shadow: 0 5px 13px rgba(23,83,116,.16); }
.prediction-spread-slot > span { display: grid; place-items: center; color: var(--dora-blue-deep); font-size: 16px; font-weight: 900; }
.prediction-spread-slot > img { object-fit: cover; }
.prediction-spread-slot > img.reversed { transform: rotate(180deg); }
.prediction-spread-slot small { color: var(--dora-muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.prediction-spread-slot em { max-width: 96px; color: var(--dora-muted); font-size: 7.5px; font-style: normal; line-height: 1.35; text-align: center; }
.prediction-spread-slot.is-next > span { border: 2px dashed var(--dora-blue); background: rgba(255,255,255,.68); box-shadow: inset 0 0 0 5px rgba(36,158,223,.05); animation: prediction-slot-pulse 1.8s ease-in-out infinite; }
.prediction-spread-slot.is-next.drop-ready > span { border-color: #d7a400; box-shadow: 0 0 0 7px rgba(255,213,58,.16); }
.prediction-spread-slot.is-next.drop-hover > span { border-style: solid; background: rgba(255,244,191,.8); transform: scale(1.05); }
.prediction-spread-slot.is-waiting { visibility: hidden; }
.prediction-spread-slot.is-placed > .slot-card-back { color: transparent; }
.prediction-spread-layout.is-drawing { grid-template-columns: repeat(var(--spread-columns), 98px); gap: 13px 10px; }
.prediction-spread-layout.is-drawing .prediction-spread-slot,
.prediction-spread-layout.is-drawing .prediction-spread-slot > span,
.prediction-spread-layout.is-drawing .prediction-spread-slot > img { width: 98px; }
@keyframes prediction-slot-pulse { 50% { border-color: rgba(36,158,223,.45); transform: translateY(-2px); } }
.prediction-draw-page { position: relative; min-height: 690px; overflow: hidden; }
.prediction-draw-actions { position: absolute; top: 0; right: 0; display: flex; gap: 6px; }
.prediction-draw-actions button { width: 38px; height: 38px; padding: 0; border: 1px solid rgba(36,158,223,.18); border-radius: 50%; color: var(--dora-blue-deep); background: rgba(255,255,255,.9); font-size: 12px; font-weight: 900; }
.prediction-draw-context { display: grid; justify-items: center; gap: 4px; margin: -8px auto 14px; padding-inline: 100px; text-align: center; }
.prediction-draw-context strong { max-width: 100%; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-draw-context span { color: var(--dora-muted); font-size: 10px; font-weight: 700; }
.prediction-draw-page .prediction-spread-layout { position: relative; z-index: 2; }
.prediction-fan { right: 0; bottom: 0; left: 0; }
.prediction-drag-card { position: fixed; z-index: 1500; pointer-events: none; border: 4px solid #fff; border-radius: 12px; background: var(--dora-blue) url('/assets/card-back.svg') center/cover no-repeat; box-shadow: 0 18px 36px rgba(23,83,116,.3); transform: rotate(-2deg) scale(1.03); will-change: left, top; }
.prediction-drag-card.accepted { opacity: .35; transform: rotate(0) scale(.96); transition: left .2s cubic-bezier(.2,.85,.25,1), top .2s cubic-bezier(.2,.85,.25,1), width .2s ease, height .2s ease, opacity .2s ease, transform .2s ease; }
.prediction-drag-card.rejected { opacity: 0; transform: scale(.94); transition: left .16s ease, top .16s ease, opacity .16s ease, transform .16s ease; }
.prediction-result-summary { display: grid; justify-items: center; gap: 9px; margin-bottom: 24px; text-align: center; }
.prediction-result-summary > span { color: var(--dora-muted); font-size: 11px; font-weight: 800; }
.prediction-result-summary h2 { max-width: 650px; margin: 0; font-size: 21px; line-height: 1.55; }
.prediction-result-summary .prediction-spread-layout { grid-template-columns: repeat(var(--spread-columns), 82px); margin-top: 9px; }
.prediction-result-summary .prediction-spread-slot { width: 78px; }
.prediction-result-summary .prediction-spread-slot > img { width: 74px; }
.prediction-result-cards { width: 100%; display: flex; justify-content: center; gap: 12px; margin-top: 9px; }
.prediction-result-cards > div { width: 92px; display: grid; justify-items: center; gap: 4px; }
.prediction-result-cards img { width: 76px; aspect-ratio: 600/1040; border: 3px solid #fff; border-radius: 10px; object-fit: cover; box-shadow: 0 5px 13px rgba(23,83,116,.15); }
.prediction-result-cards img.reversed { transform: rotate(180deg); }
.prediction-result-cards strong { margin-top: 3px; color: var(--dora-blue-deep); font-size: 10px; }
.prediction-result-cards span { color: var(--dora-muted); font-size: 8px; line-height: 1.35; text-align: center; }
.prediction-reading { padding: 26px; border: 2px solid rgba(36,158,223,.14); border-radius: 24px; color: var(--dora-ink); background: rgba(255,255,255,.93); font-size: 15px; line-height: 1.95; white-space: pre-wrap; }
.prediction-feedback { display: grid; gap: 13px; margin-top: 18px; padding: 22px; border: 2px solid rgba(36,158,223,.14); border-radius: 24px; background: rgba(255,255,255,.93); }
.prediction-feedback h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.prediction-feedback textarea { min-height: 138px; resize: vertical; font-size: 15px; line-height: 1.7; }
.prediction-feedback .btn { min-width: 112px; justify-self: end; }
.prediction-reading-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 15px; padding: 24px; border: 2px solid rgba(36,158,223,.14); border-radius: 24px; color: var(--dora-muted); background: rgba(255,255,255,.9); text-align: center; }
.prediction-reading-state p { margin: 0; font-size: 12px; }
.prediction-history-list { display: grid; gap: 11px; }
.prediction-history-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: center; gap: 18px; padding: 15px 17px; border: 2px solid rgba(36,158,223,.13); border-radius: 20px; color: var(--dora-ink); background: rgba(255,255,255,.92); text-align: left; }
.prediction-history-row > div:first-child { min-width: 0; display: grid; gap: 6px; }
.prediction-history-row > div:first-child strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-history-row > div:first-child span { color: var(--dora-muted); font-size: 10px; font-weight: 700; }
.prediction-history-row .prediction-result-cards { justify-content: flex-end; gap: 7px; margin: 0; }
.prediction-history-row .prediction-result-cards > div { width: 54px; }
.prediction-history-row .prediction-result-cards img { width: 38px; border-width: 2px; border-radius: 6px; }
.prediction-history-row .prediction-result-cards strong { display: none; }
.prediction-history-row .prediction-result-cards span { display: none; }
.tarot-card {
  border: 7px solid #fff;
  border-radius: 22px;
  background: var(--dora-blue);
  box-shadow: 0 12px 0 rgba(22,125,184,.17), 0 28px 55px rgba(27,96,137,.2);
}
.tarot-card.back { animation: dora-float 3s ease-in-out infinite; }
.tarot-card.reveal { animation: card-reveal .58s cubic-bezier(.2,.85,.25,1) both; }
@keyframes card-reveal { from { opacity: .2; transform: rotateY(86deg) scale(.9); } to { opacity: 1; transform: rotateY(0) scale(1); } }
.fan-draw { position: relative; min-height: 570px; overflow: hidden; }
.fan-draw .section-head { position: relative; z-index: 3; }
.fan-draw-hint { position: relative; z-index: 3; margin: -8px 0 0; color: var(--dora-muted); font-size: 11px; font-weight: 700; text-align: center; }
.fan-scroll {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 310px;
  overflow: hidden;
  padding: 0;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.fan-scroll.dragging { cursor: grabbing; }
.fan-spread {
  position: absolute;
  inset: 0;
}
.fan-card {
  position: absolute;
  left: 50%;
  bottom: -20px;
  z-index: var(--stack);
  width: 98px;
  padding: 0;
  aspect-ratio: 600 / 1040;
  border: 4px solid #fff;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dora-blue) url('/assets/card-back.svg') center / cover no-repeat;
  transform: translateX(-50%) rotate(var(--turn,0));
  transform-origin: 50% calc(100% + 105px);
  contain: layout paint;
}
.fan-card:hover { filter: none; }
.fan-card:focus-visible { z-index: 110; outline: 3px solid var(--dora-yellow); outline-offset: 4px; }
.fan-card.is-selected { z-index: 120; transform: translateX(-50%) rotate(var(--turn,0)) translateY(-24px); box-shadow: 0 10px 22px rgba(23,83,116,.24); animation: fan-card-selected .2s cubic-bezier(.2,.85,.25,1); }
.fan-card.is-drag-source { opacity: 0; }
@keyframes fan-card-selected { from { transform: translateX(-50%) rotate(var(--turn,0)) translateY(0); } to { transform: translateX(-50%) rotate(var(--turn,0)) translateY(-24px); } }
.orbit { border-bottom: 4px solid rgba(36,158,223,.2); filter: none; }
.date-line, .card-meta { color: var(--dora-muted); font-weight: 700; }
.card-meta { margin-bottom: 6px; }
.card-astrology {
  margin-bottom: 24px;
  color: #8aa1ae;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.card-name { color: var(--dora-blue-deep); text-shadow: 0 3px 0 rgba(36,158,223,.1); }
.sealed-note { border-top: 2px dashed rgba(36,158,223,.2); color: var(--dora-muted); }
.seal { color: var(--dora-ink); background: var(--dora-yellow); border: 2px solid var(--dora-ink); font-weight: 800; box-shadow: 0 3px 0 rgba(33,75,100,.18); }

.btn {
  border: 2px solid var(--dora-blue);
  color: var(--dora-blue-deep);
  background: #fff;
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(22,125,184,.18);
}
.btn:hover { background: var(--dora-sky); transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--dora-blue); border-color: var(--dora-blue-deep); box-shadow: 0 5px 0 var(--dora-blue-deep); }
.btn.primary:hover { background: #36ace8; }
.btn.danger { border-color: var(--dora-red); color: var(--dora-red); }

.dimension-card { border-radius: 22px; }
.score-label { color: var(--dora-blue-deep); font-weight: 700; }
.score { border: 2px solid rgba(36,158,223,.18); background: var(--dora-sky-soft); color: var(--dora-muted); font-weight: 800; }
.score.active { color: var(--dora-ink); background: var(--dora-yellow); border-color: #e4b72b; box-shadow: 0 3px 0 #e4b72b; }
textarea, input[type="text"], select { border: 2px solid rgba(36,158,223,.18); background: #f7fcff; color: var(--dora-ink); }
textarea:focus, input:focus, select:focus { border-color: var(--dora-blue); background: #fff; box-shadow: 0 0 0 4px rgba(36,158,223,.10); }
.tag { border: 2px solid rgba(36,158,223,.18); background: #fff; color: var(--dora-muted); font-weight: 700; }
.tag.active { color: #fff; border-color: var(--dora-red); background: var(--dora-red); }

.reading-body { color: var(--dora-ink); border: 3px solid var(--dora-blue); border-radius: 28px; background: #fff; box-shadow: 0 8px 0 rgba(36,158,223,.13); }
.reading-body::before, .reading-body::after { content: none; display: none; }
.accuracy-option { border: 2px solid rgba(36,158,223,.18); background: #fff; color: var(--dora-muted); font-weight: 700; }
.accuracy-option.active { color: #fff; background: var(--dora-red); border-color: #d63f38; box-shadow: 0 3px 0 #c83b35; }

.record-row { border: 2px solid rgba(36,158,223,.14); background: rgba(255,255,255,.94); color: var(--dora-ink); box-shadow: 0 5px 0 rgba(36,158,223,.07); }
.record-row { grid-template-columns: 72px 50px 1fr; }
.record-row:hover { border-color: var(--dora-blue); transform: translateY(-1px); }
.record-date, .record-status, .score-mini { color: var(--dora-muted); }
.period-tabs { border: 2px solid rgba(36,158,223,.18); background: rgba(255,255,255,.8); }
.period-tab { color: var(--dora-muted); font-weight: 800; }
.period-tab.active { background: var(--dora-yellow); color: var(--dora-ink); box-shadow: 0 3px 0 #e4b72b; }
.report-waiting { min-height: 280px; display: grid; justify-items: center; align-content: center; gap: 12px; text-align: center; }
.report-waiting h3, .report-waiting p { margin: 0; }
.report-spinner { width: 28px; height: 28px; border-width: 3px; border-color: rgba(36,158,223,.2); border-top-color: var(--dora-blue); }
.report-error-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--dora-red); font-size: 22px; font-weight: 900; }
.state-report { min-width: 0; }
.state-report .setting-row h3 { margin: 7px 0 0; }
.state-legend { display: flex; flex-wrap: wrap; gap: 15px; margin: 20px 0 14px; }
.state-legend span { display: flex; align-items: center; gap: 6px; color: var(--dora-muted); font-size: 11px; font-weight: 700; }
.state-legend i { width: 12px; height: 12px; display: block; border-radius: 4px; }
.state-legend i.improve { background: var(--dora-blue); }
.state-legend i.stable { background: #d7e8f0; }
.state-legend i.pressure { background: var(--dora-red); }
.state-legend i.empty { background: transparent; border: 2px dashed #bdd3df; }
.state-matrix-scroll { overflow-x: auto; padding: 3px 2px 10px; }
.state-matrix { min-width: 560px; display: grid; grid-template-columns: 68px repeat(var(--bucket-count), minmax(66px, 1fr)); gap: 7px; align-items: stretch; }
.state-corner, .bucket-label, .domain-track-label { min-height: 26px; display: grid; place-items: center; }
.bucket-label { color: var(--dora-muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.domain-track-label { justify-items: start; color: var(--dora-ink); font-size: 12px; font-weight: 900; }
.state-cell { min-height: 58px; border: 2px solid transparent; border-radius: 13px; display: grid; place-items: center; align-content: center; gap: 2px; transition: transform .15s ease, filter .15s ease; }
.state-cell:not(:disabled):hover { transform: translateY(-2px); filter: saturate(1.1); }
.state-cell span { font-size: 20px; font-weight: 900; line-height: 1; }
.state-cell small { font-size: 9px; font-weight: 800; }
.state-cell.improve { color: #fff; background: var(--dora-blue); border-color: var(--dora-blue-deep); box-shadow: 0 3px 0 var(--dora-blue-deep); }
.state-cell.stable { color: var(--dora-ink); background: #e5f1f6; border-color: #c7dce6; box-shadow: 0 3px 0 #c7dce6; }
.state-cell.pressure { color: #fff; background: var(--dora-red); border-color: #cf4039; box-shadow: 0 3px 0 #cf4039; }
.state-cell.empty { color: #9cb3c0; background: rgba(255,255,255,.45); border: 2px dashed #c8dce5; }
.report-summary-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; margin-top: 16px; }
.overall-summary { display: grid; align-content: center; }
.overall-summary h2 { margin: 10px 0 0; font-size: clamp(20px,3vw,30px); line-height: 1.65; }
.domain-summary-list { margin-top: 12px; display: grid; gap: 0; }
.domain-summary-list > div { display: grid; grid-template-columns: 50px 1fr; gap: 12px; padding: 10px 0; border-top: 2px dashed rgba(36,158,223,.13); }
.domain-summary-list strong { color: var(--dora-blue-deep); font-size: 12px; }
.domain-summary-list p { margin: 0; color: var(--dora-muted); font-size: 11px; line-height: 1.65; }
.turning-points { margin-top: 16px; }
.turning-list { display: grid; gap: 0; margin-top: 12px; }
.turning-list article { display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 13px 0; border-top: 2px dashed rgba(36,158,223,.13); }
.turning-list time { color: var(--dora-red); font-size: 12px; font-weight: 900; }
.turning-list p { margin: 4px 0 0; color: var(--dora-muted); font-size: 11px; line-height: 1.65; }
.report-evidence { padding: 17px; border-radius: 16px; background: var(--dora-sky-soft); border: 2px solid rgba(36,158,223,.14); }
.report-evidence p { color: var(--dora-muted); line-height: 1.8; margin-bottom: 0; }
.source-records { margin-top: 22px; }
.source-records article { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-top: 2px dashed rgba(36,158,223,.13); }
.source-records time { color: var(--dora-blue-deep); font-weight: 800; font-size: 12px; }
.source-records p { margin: 0; color: var(--dora-muted); line-height: 1.7; white-space: pre-wrap; }
.legend-item, .line-chart text { color: var(--dora-muted); fill: var(--dora-muted); }
.line-chart .grid line { stroke: rgba(36,158,223,.15); }
.average-track { background: var(--dora-sky); }
.average-fill { border-radius: 10px; }
.delta.up { color: #29a56c; }.delta.down { color: var(--dora-red); }

.meaning-card { border-radius: 22px; background: rgba(255,255,255,.93); }
.insight { border-top: 2px dashed rgba(36,158,223,.15); color: var(--dora-muted); }
.insight.confirmed { color: var(--dora-ink); }
.knowledge-entry {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  margin: -6px 0 22px;
  padding: 12px 15px;
  border: 2px solid rgba(36,158,223,.15);
  border-radius: 19px;
  color: var(--dora-ink);
  background: rgba(255,255,255,.9);
  text-align: left;
  box-shadow: 0 5px 0 rgba(36,158,223,.06);
}
.knowledge-entry:hover { border-color: var(--dora-blue); transform: translateY(-1px); }
.knowledge-entry-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--dora-blue);
  font-size: 18px;
  box-shadow: 0 3px 0 var(--dora-blue-deep);
}
.knowledge-entry > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.knowledge-entry strong { font-size: 14px; }
.knowledge-entry small { color: var(--dora-muted); font-size: 11px; }
.knowledge-entry i { color: var(--dora-blue); font-size: 30px; font-style: normal; line-height: 1; }
.experience-shelves { display: grid; gap: 26px; }
.experience-shelf { display: grid; gap: 11px; }
.experience-shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.experience-shelf-head h2 { margin: 0; font-size: 17px; }
.experience-shelf-head span { color: var(--dora-muted); font-size: 11px; font-weight: 700; }
.experience-shelf-scroll { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.experience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.experience-card { min-height: 130px; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 8px 13px; padding: 14px; border: 2px solid rgba(36,158,223,.13); border-radius: 20px; color: var(--dora-ink); background: rgba(255,255,255,.72); text-align: left; box-shadow: 0 5px 0 rgba(36,158,223,.06); }
.experience-card:hover { border-color: var(--dora-blue); transform: translateY(-1px); }
.experience-card.has-data { background: rgba(255,255,255,.96); }
.experience-image { grid-row: 1 / 3; width: 58px; aspect-ratio: 600/1040; border: 2px solid #fff; border-radius: 9px; object-fit: cover; box-shadow: 0 4px 10px rgba(33,75,100,.15); }
.experience-name { min-width: 0; display: grid; gap: 4px; }
.experience-card strong { font-size: 15px; }
.experience-card small { color: var(--dora-muted); font-size: 10px; line-height: 1.5; }
.experience-progress { grid-column: 2 / -1; width: 100%; padding-top: 7px; border-top: 2px dashed rgba(36,158,223,.12); }
.experience-count { min-width: 43px; height: 25px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 8px; border-radius: 999px; color: #fff; background: var(--dora-blue); font-size: 13px; font-weight: 900; line-height: 1; box-shadow: 0 2px 0 var(--dora-blue-deep); }
.experience-count small { color: #fff; font-size: 9px; line-height: 1; }
.meaning-status { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 2px solid rgba(36,158,223,.16); border-radius: 16px; color: var(--dora-blue-deep); background: #fff; font-size: 12px; font-weight: 800; }
.meaning-status.error { color: var(--dora-red); }
.settings-head { width: min(680px,100%); margin-inline: auto; }
.settings-page { width: min(680px,100%); display: grid; grid-template-columns: 1fr; gap: 25px; margin-inline: auto; }
.settings-group { min-width: 0; }
.settings-group-title { margin: 0 0 8px 15px; color: #738b99; font-size: 12px; font-weight: 700; }
.settings-list-card {
  overflow: hidden;
  border: 1px solid rgba(36,158,223,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}
.settings-list-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid rgba(36,158,223,.1);
  color: var(--dora-ink);
  background: transparent;
  text-align: left;
}
.settings-list-row:first-child { border-top: 0; }
button.settings-list-row:hover { background: var(--dora-sky-soft); }
.settings-row-copy { min-width: 0; display: grid; gap: 4px; }
.settings-row-copy strong { font-size: 15px; font-weight: 600; line-height: 1.35; }
.settings-row-copy small { overflow: hidden; color: var(--dora-muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; }
.settings-chevron { color: #a7b4bb; font-size: 23px; font-style: normal; font-weight: 400; line-height: 1; }
.settings-service-state { display: inline-flex; align-items: center; gap: 5px; color: var(--dora-muted); font-size: 11px; white-space: nowrap; }
.settings-service-state.ok { color: #25a866; font-weight: 700; }
.settings-model-trailing { display: inline-flex; align-items: center; gap: 8px; }
.reading-mode-current { color: var(--dora-blue-deep); font-weight: 700; }
.reminder-setting-row { grid-template-columns: minmax(0,1fr) auto auto; }
.reminder-time {
  width: 76px;
  min-height: 34px;
  padding: 5px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--dora-blue-deep);
  background: var(--dora-sky-soft);
  font: 700 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.reminder-time::-webkit-calendar-picker-indicator { width: 0; margin: 0; padding: 0; opacity: 0; }
.ios-switch { position: relative; width: 48px; height: 28px; display: inline-flex; flex: 0 0 auto; }
.ios-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.ios-switch span { width: 48px; height: 28px; display: block; border-radius: 999px; background: #d7e1e6; transition: background .2s ease; }
.ios-switch span::after { content: ""; width: 24px; height: 24px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(31,75,98,.22); transition: transform .2s ease; }
.ios-switch input:checked + span { background: var(--dora-blue); }
.ios-switch input:checked + span::after { transform: translateX(20px); }
.ios-switch input:focus-visible + span { outline: 3px solid rgba(36,158,223,.28); outline-offset: 2px; }
.ios-switch input:disabled + span { opacity: .48; }
.settings-destructive strong { color: #e05a52; }
.settings-group-foot { margin: 8px 15px 0; color: #8296a1; font-size: 11px; line-height: 1.55; }
.settings-about-group { grid-column: auto; }
.settings-about-note {
  margin: 0;
  padding: 0 15px;
  color: #8296a1;
  font-size: 11px;
  line-height: 1.7;
}
.model-picker-card { width: min(520px,100%); padding-bottom: 14px; }
.model-picker-card .modal-head { margin-bottom: 14px; }
.model-picker-card .modal-head h2 { margin: 0; font-size: 20px; }
.model-picker-search { position: sticky; top: -25px; z-index: 2; padding: 4px 0 12px; background: #fff; }
.model-picker-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(36,158,223,.16);
  border-radius: 13px;
  color: var(--dora-ink);
  background: #f1f7fa;
  font-size: 16px;
  outline: 0;
}
.model-picker-list { overflow: hidden; border: 1px solid rgba(36,158,223,.12); border-radius: 15px; }
.model-option {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: 0;
  border-top: 1px solid rgba(36,158,223,.1);
  color: var(--dora-ink);
  background: #fff;
  text-align: left;
}
.model-option:first-child { border-top: 0; }
.model-option span { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.model-option b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--dora-blue); font-size: 13px; }
.model-option.selected { color: var(--dora-blue-deep); background: var(--dora-sky-soft); }
.model-option:disabled { opacity: .65; }
.model-option.saving { opacity: 1; background: var(--dora-sky); }
.model-picker-loading, .model-picker-empty { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 20px; color: var(--dora-muted); font-size: 12px; text-align: center; }
.reading-mode-card { width: min(500px,100%); padding-bottom: 14px; }
.reading-mode-card .modal-head { margin-bottom: 14px; }
.reading-mode-card .modal-head h2 { margin: 0; font-size: 20px; }
.reading-mode-list { overflow: hidden; border: 1px solid rgba(36,158,223,.12); border-radius: 16px; }
.reading-mode-option { width: 100%; min-height: 76px; display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: center; gap: 12px; padding: 13px 15px; border: 0; border-top: 1px solid rgba(36,158,223,.1); color: var(--dora-ink); background: #fff; text-align: left; }
.reading-mode-option:first-child { border-top: 0; }
.reading-mode-option > span { min-width: 0; display: grid; gap: 5px; }
.reading-mode-option strong { font-size: 15px; font-weight: 700; }
.reading-mode-option small { color: var(--dora-muted); font-size: 11px; line-height: 1.55; }
.reading-mode-option b, .reading-mode-option i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-style: normal; }
.reading-mode-option b { color: #fff; background: var(--dora-blue); }
.reading-mode-option.selected { background: var(--dora-sky-soft); }
.reading-mode-option:disabled { opacity: .65; }
.feedback-history { display: grid; gap: 13px; margin-top: 18px; }
.feedback-history article { padding: 16px; border: 2px solid rgba(36,158,223,.12); border-radius: 17px; background: var(--dora-sky-soft); }
.feedback-history article > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.feedback-history time { color: var(--dora-blue-deep); font-weight: 900; }
.feedback-history p { display: grid; grid-template-columns: 48px 1fr; gap: 8px; margin: 7px 0 0; color: var(--dora-muted); font-size: 12px; line-height: 1.65; }
.feedback-history b { color: var(--dora-ink); }
.knowledge-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.knowledge-card { width: 100%; overflow: hidden; padding: 0; border: 2px solid rgba(36,158,223,.16); border-radius: 24px; color: var(--dora-ink); background: rgba(255,255,255,.94); text-align: left; box-shadow: 0 8px 0 rgba(36,158,223,.07); transition: transform .18s ease, border-color .18s ease; }
.knowledge-card:hover { transform: translateY(-2px); border-color: var(--dora-blue); }
.knowledge-search { margin-bottom: 18px; }
.knowledge-search input { width: 100%; min-height: 48px; padding-inline: 18px; border: 2px solid rgba(36,158,223,.18); border-radius: 18px; color: var(--dora-ink); background: rgba(255,255,255,.95); outline: 0; }
.knowledge-card-main { display: grid; grid-template-columns: 62px 1fr auto; gap: 15px; align-items: center; padding: 18px; background: var(--dora-sky-soft); }
.knowledge-card-main img { width: 62px; aspect-ratio: 600/1040; border-radius: 8px; object-fit: cover; }
.knowledge-card h2, .knowledge-card-main p { margin: 0; }
.knowledge-card-main p { margin-top: 5px; color: var(--dora-muted); font-size: 11px; }
.knowledge-card-astrology { display: block; margin-top: 4px; color: #8fa5b1; font-size: 9px; font-weight: 700; }
.knowledge-card-main i { color: var(--dora-blue); font-size: 34px; font-style: normal; font-weight: 500; line-height: 1; }
.knowledge-empty { padding: 26px 18px; border-top: 2px dashed rgba(36,158,223,.14); color: var(--dora-muted); text-align: center; font-size: 12px; }
.knowledge-detail-page { width: min(760px,100%); min-height: calc(100dvh - 150px); margin: 0 auto; }
.knowledge-detail-backbar { position: sticky; top: 0; z-index: 5; padding: 0 0 16px; background: linear-gradient(180deg,#f7fcff 74%,rgba(247,252,255,0)); }
.knowledge-detail-backbar .btn { min-height: 44px; }
.knowledge-detail-hero { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; padding: 26px; border: 2px solid rgba(36,158,223,.16); border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: 0 8px 0 rgba(36,158,223,.07); }
.knowledge-detail-hero img { width: 150px; aspect-ratio: 600/1040; border: 5px solid #fff; border-radius: 16px; object-fit: cover; box-shadow: 0 12px 28px rgba(33,75,100,.16); }
.knowledge-detail-hero small { color: var(--dora-blue-deep); font-weight: 900; }
.knowledge-detail-hero h1 { margin: 8px 0; }
.knowledge-detail-hero p { margin: 0; color: var(--dora-muted); font-size: 14px; }
.knowledge-astrology { margin-top: 8px; color: #8fa5b1; font-size: 10px; font-weight: 700; }
.knowledge-category-list { overflow: hidden; margin-top: 18px; border: 1px solid rgba(36,158,223,.12); border-radius: 18px; background: rgba(255,255,255,.94); }
.knowledge-category-row { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; border: 0; border-top: 1px solid rgba(36,158,223,.1); color: var(--dora-ink); background: transparent; font-size: 15px; font-weight: 750; text-align: left; }
.knowledge-category-row:first-child { border-top: 0; }
.knowledge-category-row:not(:disabled):hover { background: var(--dora-sky-soft); }
.knowledge-category-row:disabled { color: #8ea1ac; opacity: 1; }
.knowledge-category-trailing { display: inline-flex; align-items: center; gap: 8px; color: #788e9a; font-size: 12px; font-weight: 650; }
.knowledge-category-trailing i { color: #a6b3ba; font-size: 22px; font-style: normal; font-weight: 400; line-height: 1; }
.knowledge-category-page { width: min(680px,100%); margin: 0 auto; }
.knowledge-category-head { margin-bottom: 4px; }
.knowledge-category-meta { margin: 0 0 14px; color: #788e9a; font-size: 12px; text-align: center; }
.knowledge-domain-list { overflow: hidden; border: 1px solid rgba(36,158,223,.12); border-radius: 18px; background: rgba(255,255,255,.94); }
.knowledge-category-entries { margin-top: 10px; }
.knowledge-meaning-card { padding: 18px; border-top: 1px solid rgba(36,158,223,.1); }
.knowledge-meaning-card:first-child { border-top: 0; }
.knowledge-meaning-field { display: grid; gap: 4px; }
.knowledge-meaning-field + .knowledge-meaning-field { margin-top: 12px; }
.knowledge-meaning-field span { color: var(--dora-blue-deep); font-size: 12px; font-weight: 800; }
.knowledge-meaning-field p { margin: 0; color: var(--dora-ink); font-size: 14px; line-height: 1.72; white-space: pre-wrap; }
.knowledge-meaning-card > small { display: block; margin-top: 13px; color: #8299a5; font-size: 10.5px; line-height: 1.5; }
.knowledge-empty.full { min-height: 240px; display: grid; place-items: center; border: 2px dashed rgba(36,158,223,.24); border-radius: 22px; background: rgba(255,255,255,.65); }
.dimension-card.incomplete { border-color: rgba(224,68,68,.42); box-shadow: 0 0 0 3px rgba(224,68,68,.07); }
.dimension-card.incomplete textarea { border-color: rgba(224,68,68,.42); }
.period-overview { margin-bottom: 16px; }
.period-overview .setting-row { align-items: flex-start; }
.period-overview h2, .period-overview p { margin-bottom: 0; }
.period-overview .setting-row > span { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--dora-blue-deep); background: var(--dora-sky); font-size: 10px; font-weight: 900; }
.overall-text { margin-top: 16px !important; color: var(--dora-ink); font-size: 13px; font-weight: 600; line-height: 1.75; }
.frequency-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.frequency-card { min-width: 0; overflow: hidden; }
.frequency-card h2, .frequency-comment h2, .stage-summary h2, .domain-summary h2 { margin-bottom: 14px; font-size: 16px; }
.top-card-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.top-card-list > div { min-width: 0; display: grid; gap: 7px; }
.top-card-list img { width: 100%; aspect-ratio: 600/1040; border-radius: 8px; object-fit: cover; }
.top-card-list span { min-width: 0; display: grid; }
.top-card-list strong { overflow: hidden; color: var(--dora-ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.top-card-list small { color: var(--dora-muted); font-size: 9px; }
.element-list { display: grid; gap: 14px; }
.element-list > div { display: grid; gap: 7px; }
.element-list span { display: flex; justify-content: space-between; color: var(--dora-ink); font-size: 12px; font-weight: 900; }
.element-list small { color: var(--dora-muted); }
.element-list i { height: 11px; overflow: hidden; border-radius: 999px; background: #e8f4fa; }
.element-list b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--dora-blue),#70c9f3); }
.frequency-comment { grid-column: 1 / -1; }
.frequency-comment p { margin: 0; color: var(--dora-muted); font-size: 12px; line-height: 1.7; }
.stage-summary, .domain-summary, .turning-points { margin-top: 16px; }
.stage-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; }
.stage-list article { padding: 14px; border-radius: 15px; background: var(--dora-sky-soft); border: 2px solid rgba(36,158,223,.1); }
.stage-list time { color: var(--dora-blue-deep); font-size: 11px; font-weight: 900; }
.stage-list p { margin: 8px 0 0; color: var(--dora-muted); font-size: 11px; line-height: 1.65; }
.setting-row p { color: var(--dora-muted); }
.status-dot { background: var(--dora-red); }.status-dot.ok { background: #36b875; }
.modal { background: rgba(34,93,126,.42); }
.modal-card { color: var(--dora-ink); border: 3px solid var(--dora-blue); background: #fff; box-shadow: 0 12px 0 rgba(22,125,184,.18), 0 35px 80px rgba(23,83,116,.24); }
.modal-card { overscroll-behavior: contain; }
.reminder-onboarding-card { position: relative; width: min(430px,100%); padding: 28px; text-align: center; }
.reminder-onboarding-card h2 { margin: 8px 30px 10px; font-size: 22px; line-height: 1.35; }
.reminder-onboarding-card > p { margin: 0 auto 20px; max-width: 330px; color: var(--dora-muted); font-size: 13px; line-height: 1.75; }
.reminder-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; color: #8da0aa; background: transparent; font-size: 25px; font-weight: 400; }
.reminder-preview-copy { display: grid; gap: 1px; overflow: hidden; margin: 0 0 20px; border: 1px solid rgba(36,158,223,.12); border-radius: 16px; background: rgba(36,158,223,.1); text-align: left; }
.reminder-preview-copy span { display: flex; gap: 13px; padding: 13px 15px; color: var(--dora-ink); background: rgba(255,255,255,.96); font-size: 12px; }
.reminder-preview-copy b { min-width: 40px; color: var(--dora-blue-deep); font-size: 11px; }
.reminder-onboarding-card > .btn { width: 100%; min-height: 50px; }
.reminder-later { min-height: 38px; margin-top: 5px; padding: 5px 12px; border: 0; color: var(--dora-muted); background: transparent; font-size: 12px; }
.history-ai-reading { margin-top: 22px; }
.history-ai-reading h3 { margin-bottom: 10px; }
.history-record-incomplete { min-height: min(420px,52dvh); display: flex; flex-direction: column; }
.history-complete-action { display: flex; justify-content: center; margin-top: auto; padding: 24px 0 2px; }
.history-complete-action .btn { width: auto; min-height: 36px; padding: 7px 15px; border-radius: 999px; font-size: 11px; }
.icon-btn { color: var(--dora-blue-deep); }
.field label, .detail-dim p { color: var(--dora-muted); }
.manual-modal { width: min(680px,100%); }
.manual-selected {
  display: grid;
  grid-template-columns: 86px minmax(0,1fr);
  gap: 18px;
  align-items: center;
  min-height: 166px;
  padding: 15px 18px;
  border: 2px solid rgba(36,158,223,.16);
  border-radius: 22px;
  background: var(--dora-sky-soft);
}
.manual-selected img {
  width: 86px;
  aspect-ratio: 600/1040;
  border: 4px solid #fff;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 7px 16px rgba(33,75,100,.16);
  transition: transform .2s ease;
}
.manual-selected img.reversed { transform: rotate(180deg); }
.manual-selected small { color: var(--dora-blue-deep); font-size: 11px; font-weight: 900; }
.manual-selected h3 { margin: 7px 0 2px; font-size: 23px; }
.manual-selected p { margin: 0; color: var(--dora-muted); font-size: 12px; letter-spacing: .04em; }
.manual-field { margin-top: 18px; }
.manual-field > label { color: var(--dora-ink); font-size: 13px; font-weight: 900; }
.manual-group-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-inline: -2px;
  padding: 2px 2px 7px;
  scrollbar-width: none;
}
.manual-group-tabs::-webkit-scrollbar, .manual-card-rail::-webkit-scrollbar { display: none; }
.manual-group-tab {
  min-width: max-content;
  min-height: 42px;
  padding: 8px 15px;
  border: 2px solid rgba(36,158,223,.16);
  border-radius: 999px;
  color: var(--dora-muted);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.manual-group-tab.active {
  color: var(--dora-ink);
  border-color: #e4b72b;
  background: var(--dora-yellow);
  box-shadow: 0 3px 0 #e4b72b;
}
.manual-card-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-inline: -4px;
  padding: 5px 4px 13px;
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.manual-card-option {
  width: 76px;
  flex: 0 0 76px;
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 7px 6px 9px;
  border: 2px solid transparent;
  border-radius: 15px;
  color: var(--dora-muted);
  background: transparent;
  scroll-snap-align: start;
}
.manual-card-option img {
  width: 60px;
  aspect-ratio: 600/1040;
  border: 3px solid #fff;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(33,75,100,.14);
}
.manual-card-option span {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-card-option.active {
  color: var(--dora-blue-deep);
  border-color: var(--dora-blue);
  background: var(--dora-sky);
  box-shadow: 0 3px 0 rgba(22,125,184,.15);
}
.orientation-segment {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
  padding: 5px;
  border: 2px solid rgba(36,158,223,.15);
  border-radius: 17px;
  background: var(--dora-sky-soft);
}
.orientation-segment button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--dora-muted);
  background: transparent;
  font-weight: 900;
}
.orientation-segment button.active {
  color: #fff;
  background: var(--dora-blue);
  box-shadow: 0 3px 0 var(--dora-blue-deep);
}
.manual-actions { margin-top: 20px; }
.detail-dim { border-top: 2px dashed rgba(36,158,223,.15); }
.empty { color: var(--dora-muted); background: rgba(255,255,255,.58); border: 2px dashed rgba(36,158,223,.3); }
.hint, .empty { font-size: 12px; line-height: 1.65; }
.toast { border: 3px solid #fff; background: var(--dora-blue); color: #fff; box-shadow: 0 6px 0 var(--dora-blue-deep), 0 18px 35px rgba(23,83,116,.22); font-weight: 800; }
.spinner { border-color: rgba(255,255,255,.45); border-top-color: #fff; }

/* 按钮保持单层外观，不再用向下偏移的阴影模拟第二个方框。 */
button { box-shadow: none !important; }
.tag.active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-top: 8px;
  padding-bottom: 6px;
}

@keyframes dora-float { 50% { transform: translateY(-10px) rotate(1deg); box-shadow: 0 16px 0 rgba(22,125,184,.14), 0 36px 65px rgba(27,96,137,.22); } }

@media (max-width: 800px) {
  .app-shell { padding: 0 14px max(36px, env(safe-area-inset-bottom)); }
  .topbar { padding-top: max(14px, env(safe-area-inset-top)); }
  .view { padding: 22px 0; }
  .section-head { width: 100%; gap: 12px; margin-bottom: 20px; }
  .section-head .btn, .btn.small { min-height: 44px; }
  .hero-grid { min-height: 0; }
  .fan-draw { min-height: 430px; }
  .fan-scroll { margin: 0 -18px; }
  .fan-card { border-width: 3px; }
  .draw-copy { padding-bottom: 44px; }
  .tarot-card { border-width: 5px; }
  .record-row { grid-template-columns: 59px 42px 1fr; }
  .report-summary-grid { grid-template-columns: 1fr; }
  .state-report { padding-inline: 14px; }
  .experience-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .knowledge-list, .frequency-grid { grid-template-columns: 1fr; }
  .knowledge-search { position: sticky; top: 0; z-index: 4; padding: 8px 0 12px; background: linear-gradient(180deg,#f7fcff 78%,rgba(247,252,255,0)); }
  .knowledge-card { min-height: 96px; }
  .frequency-comment { grid-column: auto; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 92dvh; padding: 20px; border-radius: 24px 24px 0 0; }
}
@media (max-width: 480px) {
  .knowledge-detail-hero h1 { font-size: 26px; }
}

/* Mobile interaction layout: designed for a 390px iPhone viewport, not a scaled desktop page. */
@media (max-width: 800px) {
  html { scroll-padding-top: 16px; }
  body { background-attachment: scroll; }
  button { -webkit-tap-highlight-color: transparent; }
  textarea, input[type="text"], select { font-size: 16px; }

  .app-shell {
    width: 100%;
    max-width: none;
    padding: 0 16px calc(30px + env(safe-area-inset-bottom));
  }
  .topbar {
    position: static;
    width: 0;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .brand { display: contents; }
  .brand-mark-button {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 14px;
    left: auto;
    z-index: 45;
    width: 48px;
    height: 48px;
    padding: 6px;
    border: 1px solid rgba(36,158,223,.18);
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    box-shadow: 0 5px 16px rgba(27,96,137,.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .brand-name {
    display: none;
  }
  .dora-bell { width: 32px; height: 32px; }
  .dora-bell::after { left: 10px; top: 16px; }
  .dora-bell span { left: 12px; top: 20px; }

  .view { padding: max(62px, calc(env(safe-area-inset-top) + 50px)) 0 28px; }
  h1 { font-size: 28px; line-height: 1.22; }
  h2 { font-size: 16px; line-height: 1.35; }
  h3 { font-size: 13px; line-height: 1.4; }
  .section-head {
    width: 100%;
    min-height: 46px;
    position: relative;
    justify-content: center;
    margin-bottom: 14px;
    gap: 10px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .section-head > div:first-child { min-width: 0; flex: 0 0 100%; padding-inline: 72px; text-align: center; }
  .section-head h1 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 800; }
  .section-head > .header-back,
  .section-head > .header-action-right {
    position: absolute;
    top: 0;
    z-index: 2;
  }
  .section-head > .header-back { left: -5px; width: 44px; height: 44px; padding: 0; font-size: 34px; }
  .section-head > .header-action-right { right: 0; min-height: 44px; padding: 8px 0 8px 12px; font-size: 13px; }
  .section-head .period-tabs { flex: 0 0 100%; }
  .reading-header { text-align: center; }
  .btn, .btn.small {
    min-height: 46px;
    padding: 10px 17px;
  }

  .hero-grid {
    display: flex;
    min-height: calc(100dvh - 104px - env(safe-area-inset-top));
    gap: 16px;
    justify-content: center;
    flex-direction: column;
  }
  .daily-forecast-page { padding-bottom: 12px; }
  .daily-forecast-head { margin-bottom: 10px; }
  .daily-forecast-head .header-back { top: 0; left: -5px; transform: none; }
  .daily-forecast-meta { margin: 0 0 18px; }
  .daily-forecast-list { border-radius: 20px; }
  .daily-forecast-list article { padding: 17px 16px; }
  .daily-forecast-list h2 { margin-bottom: 6px; font-size: 14px; }
  .daily-forecast-list p { font-size: 12px; line-height: 1.75; }
  .daily-forecast-state { min-height: 220px; border-radius: 20px; }
  .prediction-step-head { margin-bottom: 14px; }
  .prediction-step-head > .header-back { top: 0; left: -5px; transform: none; }
  .prediction-form { gap: 17px; padding: 17px 16px; border-radius: 20px; }
  .prediction-form label > span { font-size: 12px; }
  .prediction-form textarea { min-height: 112px; font-size: 16px; }
  .prediction-form label:nth-child(2) textarea { min-height: 168px; }
  .prediction-form .btn { width: 100%; justify-self: stretch; min-height: 50px; }
  .prediction-spread-choice { grid-template-columns: 66px minmax(0,1fr) 22px; gap: 12px; padding: 14px 13px; border-radius: 18px; }
  .prediction-spread-copy { gap: 5px; }
  .prediction-spread-copy strong { font-size: 14px; }
  .prediction-spread-copy > span { font-size: 10px; line-height: 1.55; }
  .prediction-spread-choice > i { width: 21px; height: 21px; font-size: 11px; }
  .prediction-spread-icon { --icon-card-width: 13px; width: 62px; height: 65px; }
  .prediction-bottom-action { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); }
  .prediction-bottom-action .btn { width: 100%; min-height: 50px; }
  .prediction-spread-layout { grid-template-columns: repeat(var(--spread-columns), 52px); gap: 12px 9px; }
  .prediction-spread-slot, .prediction-spread-slot > span, .prediction-spread-slot > img { width: 52px; }
  .prediction-draw-page { min-height: calc(100dvh - 92px - env(safe-area-inset-top)); }
  .prediction-draw-actions { top: 3px; right: 0; }
  .prediction-draw-actions button { width: 36px; height: 36px; }
  .prediction-draw-context { margin-top: -4px; padding-inline: 74px; }
  .prediction-draw-context strong { font-size: 12px; }
  .prediction-spread-layout.is-drawing { grid-template-columns: repeat(var(--spread-columns), 84px); gap: 11px 7px; }
  .prediction-spread-layout.is-drawing .prediction-spread-slot,
  .prediction-spread-layout.is-drawing .prediction-spread-slot > span,
  .prediction-spread-layout.is-drawing .prediction-spread-slot > img { width: 84px; }
  .prediction-fan { height: 282px; margin: 0 -16px; }
  .prediction-result-summary { margin-bottom: 18px; }
  .prediction-result-summary h2 { padding-inline: 14px; font-size: 18px; line-height: 1.5; }
  .prediction-result-summary .prediction-spread-layout { grid-template-columns: repeat(var(--spread-columns), 66px); gap: 14px 8px; }
  .prediction-result-summary .prediction-spread-slot { width: 66px; }
  .prediction-result-summary .prediction-spread-slot > img { width: 62px; }
  .prediction-result-cards { gap: 5px; overflow-x: auto; justify-content: flex-start; padding: 2px 0 8px; scrollbar-width: none; }
  .prediction-result-cards::-webkit-scrollbar { display: none; }
  .prediction-result-cards > div { flex: 0 0 72px; width: 72px; }
  .prediction-result-cards img { width: 58px; border-width: 2px; border-radius: 8px; }
  .prediction-result-cards span { font-size: 7.5px; }
  .prediction-reading { padding: 19px 17px; border-radius: 20px; font-size: 14px; line-height: 1.9; }
  .prediction-feedback { gap: 12px; margin-top: 14px; padding: 17px; border-radius: 20px; }
  .prediction-feedback h2 { font-size: 15px; }
  .prediction-feedback textarea { min-height: 132px; font-size: 16px; }
  .prediction-feedback .btn { width: 100%; min-height: 46px; justify-self: stretch; }
  .prediction-reading-state { min-height: 220px; border-radius: 20px; }
  .prediction-history-row { grid-template-columns: minmax(0,1fr) 142px; gap: 10px; padding: 13px; border-radius: 17px; }
  .prediction-history-row > div:first-child strong { font-size: 12px; }
  .prediction-history-row .prediction-result-cards { width: 142px; gap: 3px; overflow: hidden; padding: 0; }
  .prediction-history-row .prediction-result-cards > div { flex: 0 0 32px; width: 32px; }
  .prediction-history-row .prediction-result-cards img { width: 28px; }
  .tarot-stage { min-height: 0; }
  .tarot-card {
    width: min(188px, 52vw);
    border-width: 4px;
    border-radius: 18px;
  }
  .orbit { width: 210px; height: 26px; }
  .draw-copy {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: center;
  }
  .date-line { margin-bottom: 8px; }
  .draw-copy h1 { margin-bottom: 14px; }
  .card-name { margin-bottom: 3px !important; font-size: 34px; }
  .card-meta { margin-bottom: 5px; font-size: 11px; }
  .card-astrology { margin-bottom: 16px; font-size: 9px; }
  .draw-copy .button-row {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .draw-copy .btn { width: 100%; min-height: 50px; }
  .sealed-note {
    margin-top: 14px;
    padding: 14px;
    border: 2px solid rgba(36,158,223,.12);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    text-align: left;
  }

  .fan-draw { min-height: calc(100dvh - 92px - env(safe-area-inset-top)); }
  .fan-scroll {
    height: 300px;
    margin: 0 -16px;
  }
  .fan-card {
    width: 84px;
    bottom: -18px;
    border-width: 3px;
    border-radius: 10px;
    transform-origin: 50% calc(100% + 92px);
  }

  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .dimension-card {
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 5px 0 rgba(36,158,223,.06);
  }
  .dimension-title { margin-bottom: 10px; }
  .dimension-title h3 { margin: 0; }
  textarea { min-height: 96px; }
  #evening-form > .form-actions {
    position: sticky;
    z-index: 10;
    bottom: max(10px, env(safe-area-inset-bottom));
    margin-top: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
  }
  #evening-form > .form-actions .btn { width: 100%; min-height: 52px; }
  .accuracy-options { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .reading-header { margin-bottom: 18px; }
  .reading-time { margin-bottom: 7px; color: var(--dora-muted); font-size: 12px; font-weight: 700; }
  .reading-body { padding: 22px 18px; border-radius: 20px; font-size: 12px; line-height: 1.75; }

  .record-list { gap: 10px; }
  .record-row {
    min-height: 78px;
    grid-template-columns: 48px 42px minmax(0,1fr);
    gap: 10px;
    padding: 11px 12px;
    border-radius: 16px;
  }
  .record-row > :last-child { display: block; min-width: 0; }
  .record-title { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

  .card { padding: 16px; border-radius: 20px; }
  .card p, .dimension-card p, .modal-card p { font-size: 12px; }
  .period-tabs { width: 100%; min-height: 44px; }
  .period-tab { flex: 1; min-width: 0; padding-inline: 5px; }
  .report-summary-grid, .frequency-grid { grid-template-columns: 1fr; gap: 12px; }
  .state-report { padding-inline: 16px; }
  .state-matrix-scroll { margin-inline: -16px; padding-inline: 16px; }
  .top-card-list {
    width: 100%;
    height: 164px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 1px 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .top-card-list::-webkit-scrollbar { display: none; }
  .top-card-list > div { width: 72px; min-width: 72px; max-width: 72px; align-content: start; gap: 6px; scroll-snap-align: start; }
  .top-card-list img { width: 72px; height: 112px; aspect-ratio: auto; }
  .frequency-card { width: 100%; min-width: 0; max-width: 100%; }
  .domain-summary-list > div { grid-template-columns: 44px 1fr; gap: 9px; }
  .trends-page .overall-text { font-size: 12px; font-weight: 600; line-height: 1.7; }
  .trends-page .period-overview .setting-row > span { font-size: 9px; }
  .trends-page .frequency-comment p,
  .trends-page .domain-summary-list p,
  .trends-page .turning-list p { font-size: 10.5px; line-height: 1.65; }
  .trends-page .stage-list p { font-size: 10px; line-height: 1.6; }
  .trends-page .stage-list time,
  .trends-page .turning-list time { font-size: 10px; }
  .trends-page .frequency-card h2,
  .trends-page .frequency-comment h2,
  .trends-page .stage-summary h2,
  .trends-page .domain-summary h2,
  .trends-page .turning-points h2 { margin-bottom: 12px; font-size: 15px; line-height: 1.35; }
  .trends-page .element-list span { font-size: 10.5px; }
  .stage-list { grid-template-columns: 1fr; }
  .settings-page { grid-template-columns: 1fr; gap: 24px; }
  .settings-group-title { margin: 0 0 7px 14px; font-size: 12px; }
  .settings-list-card { border-radius: 15px; }
  .settings-list-row {
    min-height: 58px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    padding: 11px 15px;
  }
  .reminder-setting-row { grid-template-columns: minmax(0,1fr) 69px 44px; gap: 8px; }
  .reminder-time { width: 69px; padding-inline: 5px; font-size: 12px; }
  .ios-switch, .ios-switch span { width: 44px; height: 26px; }
  .ios-switch span::after { width: 22px; height: 22px; }
  .ios-switch input:checked + span::after { transform: translateX(18px); }
  button.settings-list-row:active { background: var(--dora-sky-soft); }
  .settings-row-copy strong { font-size: 14px; }
  .settings-row-copy small { font-size: 11px; white-space: normal; }
  .settings-service-state { align-self: center; margin-top: 0; }
  .settings-group-foot, .settings-about-note { padding-inline: 14px; margin-inline: 0; }
  .model-picker-card { padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); }
  .model-picker-search { top: -18px; }
  .reading-mode-card { padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); }
  .reading-mode-option { min-height: 74px; padding: 12px 14px; }

  .meanings-head { margin-bottom: 14px; }
  .knowledge-entry {
    min-height: 70px;
    margin: 0 0 25px;
    border-radius: 18px;
    box-shadow: none;
  }
  .experience-shelves { gap: 27px; }
  .experience-shelf { gap: 10px; }
  .experience-shelf-head { padding-inline: 2px; }
  .experience-shelf-head h2 { font-size: 17px; }
  .experience-shelf-head span { font-size: 10px; }
  .experience-shelf-scroll {
    display: flex;
    gap: 11px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 2px 16px 10px;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .experience-shelf-scroll::-webkit-scrollbar { display: none; }
  .experience-card {
    flex: 0 0 126px;
    min-height: 224px;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: 132px auto auto;
    align-items: start;
    gap: 7px 5px;
    padding: 10px;
    border-radius: 18px;
    scroll-snap-align: start;
    box-shadow: 0 4px 0 rgba(36,158,223,.06);
  }
  .experience-image {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 72px;
    max-height: 126px;
    justify-self: center;
  }
  .experience-name { grid-column: 1; grid-row: 2; gap: 2px; }
  .experience-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .experience-card small { font-size: 9px; }
  .experience-count { grid-column: 2; grid-row: 2; min-width: 35px; height: 21px; padding-inline: 5px; font-size: 11px; }
  .experience-progress {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 33px;
    display: -webkit-box;
    overflow: hidden;
    padding-top: 6px;
    font-size: 9px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .knowledge-list { grid-template-columns: 1fr; gap: 12px; }
  .knowledge-search {
    top: 0;
    margin-bottom: 10px;
    padding: 8px 0 10px;
  }
  .knowledge-search input { min-height: 50px; border-radius: 16px; }
  .knowledge-card { min-height: 90px; border-radius: 18px; }
  .knowledge-card-main { grid-template-columns: 52px minmax(0,1fr) auto; gap: 12px; padding: 12px 14px; }
  .knowledge-card-main img { width: 52px; }
  .knowledge-card-main h2 { font-size: 15px; }
  .knowledge-card-main p { font-size: 10px; }
  .knowledge-card-main i { font-size: 29px; }
  .knowledge-detail-page { min-height: calc(100dvh - 115px); }
  .knowledge-detail-backbar { top: 0; padding-bottom: 12px; }
  .knowledge-detail-backbar .header-back { width: 44px; height: 44px; margin-left: -5px; padding: 0; font-size: 34px; }
  .knowledge-detail-hero { grid-template-columns: 96px minmax(0,1fr); gap: 16px; padding: 16px; border-radius: 21px; }
  .knowledge-detail-hero img { width: 96px; border-width: 3px; border-radius: 11px; }
  .knowledge-detail-hero h1 { margin-block: 5px; }
  .knowledge-detail-hero p { font-size: 12px; }
  .knowledge-category-list { margin-top: 16px; border-radius: 16px; }
  .knowledge-category-row { min-height: 58px; padding: 14px 16px; font-size: 15px; }
  .knowledge-category-trailing { font-size: 12px; }
  .knowledge-domain-list { border-radius: 16px; }
  .knowledge-meaning-card { padding: 17px 16px; }
  .knowledge-meaning-field span { font-size: 12px; }
  .knowledge-meaning-field p { font-size: 14px; line-height: 1.72; }
  .knowledge-meaning-card > small { font-size: 10.5px; }
  .knowledge-category-page .section-head h1 { font-size: 19px; }

  .side-drawer {
    width: min(226px, 62vw);
    overflow-x: hidden;
    overflow-y: auto;
    padding: max(16px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  }
  .drawer-head { min-height: 56px; padding: 10px 3px 12px 15px; }
  .side-nav { gap: 8px; padding-top: 16px; }
  .side-nav-item { min-height: 50px; gap: 11px; padding: 10px 12px; border-radius: 15px; }
  .side-nav-parent { grid-template-columns: minmax(0,1fr) 36px; }
  .side-nav-toggle { width: 36px; height: 42px; }
  .side-nav-submenu { padding-left: 14px; }

  .modal { align-items: end; padding: 0; }
  .modal-card {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 92dvh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .reminder-onboarding-card { padding: 28px 18px calc(18px + env(safe-area-inset-bottom)); }
  .reminder-onboarding-card h2 { margin-top: 4px; font-size: 20px; }
  .reminder-onboarding-card > p { font-size: 12px; }
  .modal-head { margin-bottom: 16px; }
  .history-record-incomplete { min-height: min(390px,48dvh); }
  .history-complete-action { position: sticky; bottom: 0; padding: 16px 0 0; }
  .history-complete-action .btn,
  .history-complete-action .btn.small { min-height: 36px; padding: 7px 14px; font-size: 11px; }
  .icon-btn { width: 44px; height: 44px; }
  .manual-modal { max-height: 94dvh; }
  .manual-selected {
    grid-template-columns: 72px minmax(0,1fr);
    min-height: 143px;
    gap: 15px;
    padding: 13px 15px;
    border-radius: 19px;
  }
  .manual-selected img { width: 72px; border-width: 3px; border-radius: 10px; }
  .manual-selected h3 { font-size: 21px; }
  .manual-field { margin-top: 15px; margin-bottom: 13px; }
  .manual-group-tabs { margin-right: -16px; padding-right: 16px; }
  .manual-card-rail { margin-right: -16px; padding-right: 16px; }
  .manual-card-option { width: 72px; flex-basis: 72px; }
  .manual-card-option img { width: 58px; }
  .manual-actions {
    position: sticky;
    bottom: calc(-20px - env(safe-area-inset-bottom));
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto;
    margin: 12px -16px calc(-20px - env(safe-area-inset-bottom));
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    border-top: 1px solid rgba(36,158,223,.13);
    backdrop-filter: blur(14px);
  }
  .manual-actions .btn.primary { min-height: 50px; }
  .tag, .accuracy-option, .period-tab { min-height: 44px; }
  .toast {
    top: max(12px, env(safe-area-inset-top));
    bottom: auto;
    width: calc(100% - 28px);
    max-width: 390px;
    min-height: 58px;
    padding: 12px 16px;
    border: 2px solid rgba(36,158,223,.3);
    border-radius: 18px;
    color: var(--dora-ink);
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 34px rgba(23,83,116,.2);
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
    transform: translate(-50%,-18px) scale(.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .toast.show { transform: translate(-50%,0) scale(1); }
}

@media (max-width: 360px) {
  .experience-card { flex-basis: 120px; }
  .settings-list-row { padding-inline: 12px; }
  .settings-service-state { max-width: 62px; white-space: normal; text-align: right; }
}

@media (hover: none) {
  .brand-mark-button:hover,
  .btn:hover,
  .record-row:hover,
  .experience-card:hover,
  .knowledge-card:hover {
    transform: none;
  }
}
