/* ============ Design tokens ============ */
/* Apple-style visual pass (kept the existing warm palette verbatim — only
   the geometry/shadow/motion system was refined toward Apple's HIG language:
   softer multi-layer shadows, larger continuous corner radii, a consistent
   spring-ish easing curve, and -apple-system leading the font stack so real
   Apple devices render native SF Pro / PingFang SC instead of Inter. */
/* Palette pass (item 11, 2026-08-11) — user felt the UI could be "更高级、
   克制" and asked whether the warm-orange tone was sufficient for an
   education product. Kept the warm family (it still reads as approachable
   for a family-facing coaching app, and a full switch to blue/teal would
   feel more "generic SaaS" than "trusted tutor") but pulled it toward a
   quieter, deeper terracotta/clay instead of a bright candy-orange — closes
   ~70% of the gap toward "premium" on its own since --amber/--amber-deep
   cascade through almost every button, badge and highlight in the app.
   Also added a small ink-navy accent pair (--navy/--navy-soft), used
   sparingly (pricing/plan accents, a couple of icon badges) as the
   "restraint" element — a second color family keeps amber from carrying
   100% of the visual weight on every page, which is what actually reads as
   "trying too hard" at scale. */
:root {
  --bg: #FBF8F4;
  --bg-warm: #F4EEE3;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink-soft: #574E44;
  --muted: #8B8074;
  --line: #EDE5D8;
  --line-strong: #DDD0BC;
  --amber: #C1652F;
  --amber-soft: #F1E2D2;
  --amber-deep: #96481C;
  --navy: #33445C;
  --navy-soft: #E7ECF1;
  --green: #5B8567;
  --green-soft: #DFEADF;
  --red: #B85448;
  --red-soft: #F4DCD6;
  --gold: #B8924A;
  --gold-soft: #F2E6C9;
  --shadow-sm: 0 1px 2px rgba(42,36,31,.05), 0 1px 1px rgba(42,36,31,.03);
  --shadow-md: 0 8px 24px rgba(42,36,31,.08), 0 2px 6px rgba(42,36,31,.04);
  --shadow-lg: 0 24px 56px rgba(42,36,31,.16), 0 4px 14px rgba(42,36,31,.06);
  --shadow-amber: 0 10px 24px rgba(193,101,47,.20), 0 2px 6px rgba(193,101,47,.10);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, 'SF Pro Display', 'PingFang SC', 'Inter', 'Noto Sans SC', 'Noto Sans TC', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global soft focus ring (Apple-style), applies to every text input/select/
   textarea across the app without needing per-page CSS. */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--amber) !important;
  box-shadow: 0 0 0 4px rgba(193, 101, 47, 0.14);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
input, textarea, select { transition: box-shadow .18s var(--ease), border-color .18s var(--ease); }

/* ============ Deck slide layout: browser window per screen ============ */
deck-stage section.screen {
  background: var(--bg-warm);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.browser, .viewport, .content { color: var(--ink); }
h1, h2, h3, h4 { color: var(--ink); }

.browser {
  width: 1360px;
  height: 900px;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}

.browser-bar {
  height: 44px;
  background: #F3ECDE;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 12px; height: 12px; border-radius: 50%; background: #E0D3BE; }
.browser-dots span:nth-child(1) { background: #E8836B; }
.browser-dots span:nth-child(2) { background: #E8B84B; }
.browser-dots span:nth-child(3) { background: #7AAE72; }
.browser-url {
  background: var(--card);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  max-width: 500px;
  border: 1px solid var(--line);
  font-family: 'Inter', monospace;
}
.browser-url b { color: var(--ink); font-weight: 500; }

.viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ============ App chrome (top nav) ============ */
/* Apple-style: translucent frosted bar (like macOS/iPadOS toolbars) instead
   of a flat opaque one — content.scroll shows through subtly. */
.appnav {
  height: 64px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 6px rgba(193,101,47,.20);
}
.nav-links { display: flex; gap: 4px; margin-left: 16px; }
.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: var(--bg-warm); }
.nav-link.active { background: var(--amber-soft); color: var(--amber-deep); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: flex;
  background: var(--bg-warm);
  border-radius: 999px;
  padding: 3px;
  font-size: 12px;
  font-weight: 500;
}
.lang-switch span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.lang-switch span.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D89A6E, #C1652F);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: 14px;
  transition: transform .18s var(--ease-spring), box-shadow .18s var(--ease);
}
.avatar:hover { transform: scale(1.08); box-shadow: var(--shadow-amber); }
.avatar:active { transform: scale(0.96); }
.streak {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--gold-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #8A6420;
}

/* Mobile hamburger (item 4, 2026-08-11) — hidden on desktop, shown <=768px.
   Used by both .appnav (logged-in chrome) and .landing-nav (Splash). */
.nav-hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-hamburger:hover { background: var(--bg-warm); }
.landing-nav-login-mobile { display: none; }

/* ============ Content wrapper ============ */
.content {
  flex: 1;
  overflow: auto;
  padding: 32px 48px;
  max-width: 100%;
}
.content-narrow { max-width: 720px; margin: 0 auto; }

/* ============ Typography ============ */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: 32px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.3; }
p { margin: 0; line-height: 1.55; color: var(--ink-soft); }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.muted { color: var(--muted); }

/* ============ Cards & primitives ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card-warm {
  background: linear-gradient(180deg, #FDF6EA 0%, #FBE6D2 100%);
  border: 1px solid #F1D9B8;
}

/* Clickable cards (Dashboard's "今日推荐" list, etc. — an <a> with class
   "card") get a real hover lift + amber-tinted border, same spring feel as
   .btn, since they act like a button but were previously indistinguishable
   from a static display card (item 1, 2026-08-12: "鼠標劃過的卡片...有趣一些"). */
a.card:hover, .card.card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--amber-soft);
}
a.card:active, .card.card-clickable:active {
  transform: translateY(-1px) scale(0.99);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform .12s var(--ease-spring), box-shadow .16s var(--ease), background-color .16s var(--ease), opacity .16s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--amber); color: white; box-shadow: 0 4px 12px rgba(193,101,47,.22); }
.btn-primary:hover { background: var(--amber-deep); box-shadow: var(--shadow-amber); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-warm); }
.btn-outline { background: white; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--amber); background: var(--bg-warm); transform: translateY(-2px); }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
/* Icon nudge-right on hover (item 1, 2026-08-12) — a small Apple-style
   micro-interaction for CTA buttons whose trailing icon is an arrow
   (i-arrow-right / i-chevron-right), so the icon itself hints "go" instead
   of just the whole button lifting. Only affects icons that are the last
   child so leading icons (i-play etc.) stay put. */
.btn svg.icon:last-child { transition: transform .22s var(--ease-spring); }
.btn:hover svg.icon:last-child { transform: translateX(3px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-warm);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill-band1 { background: #F5E7C4; color: #8A6420; border-color: #E8D18A; }
.pill-band2 { background: var(--amber-soft); color: var(--amber-deep); border-color: #F1D9B8; }
.pill-band3 { background: var(--green-soft); color: #446E44; border-color: #C3D9BE; }
.pill-emi { background: #E4EEF6; color: #3A6B8F; border-color: #C5DBEA; }
.pill-cmi { background: #F0E7F0; color: #6E4A6E; border-color: #DCCADC; }
.pill-gender-m { background: #E4EEF6; color: #3A6B8F; border-color: #C5DBEA; }
.pill-gender-f { background: #F7E3E3; color: #A24B4B; border-color: #E9C4C4; }
.pill-gender-mf { background: var(--bg-warm); color: var(--ink-soft); border-color: var(--line); }

/* ============ Small icons (SVG-inline sized) ============ */
.icon { width: 16px; height: 16px; stroke-width: 2; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 20px; height: 20px; }
.icon-sm { width: 14px; height: 14px; }

/* ============ Language switcher hides & shows ============ */
[data-lang]:not(.on) { display: none; }

/* ============ Annotated feedback (核心) ============ */
.annotated-answer {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  font-family: 'Noto Sans TC', 'Inter', sans-serif;
}
.annot {
  padding: 1px 4px;
  border-radius: 4px;
  border-bottom: 2px wavy;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}
.annot-red { background: var(--red-soft); border-bottom-color: var(--red); color: #7A2E28; }
.annot-amber { background: var(--gold-soft); border-bottom-color: var(--gold); color: #6E4E1A; }
.annot-green { background: var(--green-soft); border-bottom-color: var(--green); color: #35583A; }
.annot-num {
  display: inline-block;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  margin-left: 4px;
  vertical-align: 1px;
  line-height: 16px;
  text-align: center;
}
.annot-red .annot-num { background: var(--red); }
.annot-amber .annot-num { background: var(--gold); }
.annot-green .annot-num { background: var(--green); }

.annot-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: white;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.annot-card-num {
  min-width: 22px; height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.annot-card.red .annot-card-num { background: var(--red); }
.annot-card.amber .annot-card-num { background: var(--gold); }
.annot-card.green .annot-card-num { background: var(--green); }
.annot-card-body { flex: 1; font-size: 13px; }
.annot-card-body h4 { font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.annot-card-body p { font-size: 13px; }

/* ============ Progress bars ============ */
.bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--gold));
  border-radius: 999px;
}

/* ============ School card grid ============ */
.school-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.school-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.school-card:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.school-card { position: relative; }

/* Target-add button (top-right corner) */
.school-target-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: white;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s var(--ease-spring);
  z-index: 2;
}
.school-target-btn:hover {
  background: var(--amber);
  color: white;
  border-color: var(--amber);
  padding: 0 12px;
}
.school-target-btn .plus-icon { display: block; font-size: 16px; line-height: 1; font-weight: 400; }
.school-target-btn .target-label { display: none; }
.school-target-btn:hover .plus-icon { display: none; }
.school-target-btn:hover .target-label { display: block; }

.school-target-btn.is-target {
  background: var(--amber);
  color: white;
  border-color: var(--amber);
  padding: 0 12px;
}
.school-target-btn.is-target .plus-icon { display: none; }
.school-target-btn.is-target .target-label { display: block; }

/* ===== Modal (school facts popup) ===== */
/* Apple-style: heavier backdrop blur (sheet/panel feel) + spring pop-in on
   the panel itself, driven by the .open class toggle (see app.css keyframes). */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 35, 32, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal-backdrop.open .modal { animation: modal-pop 0.28s var(--ease-spring); }
.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90%;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 20px;
  transition: background-color .16s var(--ease), transform .16s var(--ease-spring);
}
.modal-close:hover { background: var(--line-strong); transform: scale(1.08); }
.school-crest {
  display: none !important;
}
.school-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.school-name-en { font-size: 11px; color: var(--muted); margin-top: 2px; }
.school-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.school-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
}

/* ============ Filter chips ============ */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: white;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--ink-soft);
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease-spring);
}
.chip:hover { border-color: var(--amber); transform: translateY(-1px); }
.chip.on { background: var(--ink); color: white; border-color: var(--ink); }

/* ============ Stats & dashboard cards ============ */
.stat-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Question chat bubble */
.qbubble {
  background: var(--bg-warm);
  padding: 16px 20px;
  border-radius: 20px 20px 20px 6px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  display: inline-block;
  max-width: 100%;
}
.abubble {
  background: white;
  border: 1.5px solid var(--amber-soft);
  padding: 16px 20px;
  border-radius: 20px 20px 6px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}

/* Utility: JS toggles this instead of mutating inline `style.display`,
   which previously broke `.grid-2`'s grid layout (setting style.display=''
   clears an inline display value entirely, falling back to the element's
   default `display:block` rather than restoring `display:grid`). */
.hidden { display: none !important; }

/* ============ Application track selector ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.track-card {
  background: white;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: border-color .2s var(--ease), transform .3s var(--ease-spring), box-shadow .3s var(--ease);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
/* Apple-style hover (item 1, 2026-08-12): "有趣一些" — the card now lifts
   with a slight spring + subtle scale, and the icon badge inside it bounces
   and tilts (see .track-icon transition below), instead of just a flat
   translateY. */
.track-card:hover { border-color: var(--amber); transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-md); }
.track-card:active { transform: translateY(-2px) scale(0.995); }
.track-card.on { border-color: var(--amber); background: linear-gradient(180deg, #FDF6EA 0%, white 60%); }
.track-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--amber-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-deep);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform .35s var(--ease-spring);
}
.track-card:hover .track-icon { transform: rotate(-6deg) scale(1.1); }

/* ============ Weekly report card (parent dashboard) ============ */
.report-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--amber-soft);
  color: var(--amber-deep);
}

/* ============ QR code placeholder (SVG) ============ */
.qr {
  width: 180px; height: 180px;
  background: white;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  display: block;
}

/* ============ Pricing card upgrades ============ */
.plan {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease), border-color .2s var(--ease);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.plan-featured {
  border: 2px solid var(--amber);
  box-shadow: var(--shadow-amber);
  background: linear-gradient(180deg, #FDF6EA 0%, white 30%);
  transform: scale(1.02);
}
.plan-featured:hover { transform: scale(1.02) translateY(-6px); }
/* Plan-price micro-nudge on hover — draws the eye to the number itself, not
   just the card edges (item 1, 2026-08-12). */
.plan-price, .plan-name { transition: transform .25s var(--ease-spring), color .2s var(--ease); }
.plan:hover .plan-price { transform: scale(1.05); }
.plan-tag {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.plan-name { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 4px; }
.plan-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.plan-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.plan-price { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.plan-price-cur { font-size: 16px; color: var(--muted); font-weight: 500; }
.plan-price-unit { font-size: 12px; color: var(--muted); margin-top: 6px; margin-bottom: 20px; }
.plan-features { flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; margin-bottom: 20px; }
.plan-feat { display: flex; gap: 8px; align-items: flex-start; }
.plan-feat svg { flex-shrink: 0; margin-top: 3px; color: var(--amber-deep); }
.plan-feat.off { color: var(--muted); opacity: 0.55; }
.plan-feat.off svg { color: var(--muted); }

/* ============ Activation input ============ */
.activation-input {
  font-family: 'Inter', monospace;
  font-size: 22px;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  width: 100%;
  font-weight: 600;
  background: white;
  outline: none;
  text-transform: uppercase;
}
.activation-input:focus { border-color: var(--amber); }

/* ============ Feedback micro-widget (thumbs / stars) ============ */
.feedback-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-warm);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
}
.feedback-mini .stars {
  display: flex;
  gap: 2px;
}
.feedback-mini .star {
  width: 22px;
  height: 22px;
  cursor: pointer;
  color: var(--line-strong);
  transition: color 0.15s, transform 0.1s;
}
.feedback-mini .star:hover,
.feedback-mini .star.on {
  color: var(--gold);
}
.feedback-mini .star:hover { transform: scale(1.15); }
.feedback-mini .dim-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: white;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--ink-soft);
}
.feedback-mini .dim-chip.on {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* Pulse animation for live recording */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* ============ Scroll-reveal (item 1, 2026-08-12) ============ */
/* Apple marketing-page staple: sections/cards fade+rise into place as they
   enter the viewport, with a small stagger between siblings, instead of
   everything below the fold just sitting there fully-rendered. Driven by
   scroll-reveal.js's IntersectionObserver, which adds .is-visible — CSS-only
   fallback (no JS / reduced-motion) keeps everything visible by default. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============ Public landing page (Splash) — item 2/3, 2026-08-11 ============ */
/* This is deliberately a SEPARATE nav style from .appnav (the logged-in app
   chrome) — a public marketing nav is transparent-on-scroll rather than a
   frosted app toolbar, and carries "登录" + a primary CTA instead of an
   avatar. See Splash.tsx's header comment for why this is a public landing
   page rather than a members-only gate. */
/* Apple-style fix (item 5, 2026-08-12): frosted translucent + sticky, to
   match .appnav's treatment on internal pages — previously .landing-nav had
   neither, so it scrolled away with the page while every internal page's
   nav stayed pinned. Also gives the whole Splash page the "backdrop-blur,
   置頂固定" nav the user explicitly asked for. */
.landing-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251,248,244,.72);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.landing-nav {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.landing-nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; }

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 32px 24px 56px;
}
.landing-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.landing-glow-1 {
  width: 420px; height: 420px;
  background: var(--amber-soft);
  top: -140px; left: 50%;
  transform: translateX(-72%);
}
.landing-glow-2 {
  width: 320px; height: 320px;
  background: var(--navy-soft);
  top: 60px; left: 50%;
  transform: translateX(30%);
}

/* Trust stats bar — de-boxed (item 2 fix, 2026-08-12): flat, laid directly
   on the hero background instead of inside its own bordered/shadowed card —
   user felt the homepage already had too many similar card/button shapes
   ("視覺疲勞"). Divider lines between each stat (.landing-stat-divider)
   now carry the visual separation instead of a card edge. */
.landing-stats {
  margin-top: 40px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.landing-stat { display: flex; align-items: center; gap: 12px; text-align: left; }
.landing-stat-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.landing-stat-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--amber-deep), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.landing-stat-divider { width: 1px; height: 36px; background: var(--line); }

.landing-section {
  padding: 64px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.landing-step {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease), border-color .2s var(--ease);
}
.landing-step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.landing-step-num {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease-spring);
}
.landing-step:hover .landing-step-num { transform: translateX(-50%) scale(1.15); }
.landing-step-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  display: flex; align-items: center; justify-content: center;
  margin: 8px auto 16px;
  transition: transform .35s var(--ease-spring), background-color .2s var(--ease);
}
.landing-step:hover .landing-step-icon {
  transform: rotate(8deg) scale(1.12);
  background: var(--amber);
  color: white;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.landing-feature {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease), border-color .2s var(--ease);
}
.landing-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--amber-soft);
}
.landing-feature > svg {
  transition: transform .35s var(--ease-spring);
}
.landing-feature:hover > svg {
  transform: scale(1.2) rotate(-6deg);
}

.landing-footer {
  padding: 40px 24px 48px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.landing-footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.landing-footer-links a { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.landing-footer-links a:hover { color: var(--amber-deep); }

/* Utility */
.row { display: flex; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.space-between { justify-content: space-between; }
.align-center { align-items: center; }
.grow { flex: 1; }
.tabular { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
