/* =========================================================
   词屿 Word Isle — warm editorial vocabulary app
   ========================================================= */
:root {
  --bg: #F4EFE4;
  --bg-2: #EDE6D8;
  --surface: #FFFCF5;
  --surface-2: #FAF5EA;
  --surface-3: #F1EADC;
  --ink: #18302D;
  --ink-2: #3F514D;
  --muted: #6F7C77;
  --faint: #89958F;
  --line: rgba(24, 48, 45, .10);
  --line-strong: rgba(24, 48, 45, .18);
  --coral: #F1695C;
  --coral-deep: #D34E43;
  --coral-soft: #FFE3DC;
  --btn-bg: #143C3A;
  --btn-ink: #FFF9ED;
  --mint: #CFE7DB;
  --mint-deep: #4E9C78;
  --gold: #F0BC5E;
  --gold-soft: #FBEDCC;
  --blue: #6C9FBE;
  --blue-soft: #E2EFF5;
  --purple: #A27CC4;
  --purple-soft: #F1E9F8;
  --hero: #123B3A;
  --hero-2: #1C4B46;
  --shadow-sm: 0 1px 2px rgba(24, 48, 45, .04), 0 10px 30px -22px rgba(24, 48, 45, .42);
  --shadow: 0 2px 4px rgba(24, 48, 45, .04), 0 30px 70px -40px rgba(24, 48, 45, .5);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Songti SC", "SimSun", serif;
  --nav-w: 248px;
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1413;
  --bg-2: #111918;
  --surface: #17211F;
  --surface-2: #1B2724;
  --surface-3: #22302D;
  --ink: #F3EEE3;
  --ink-2: #CCD5D0;
  --muted: #9AA8A2;
  --faint: #84928C;
  --line: rgba(243, 238, 227, .09);
  --line-strong: rgba(243, 238, 227, .17);
  --coral: #FF8175;
  --coral-deep: #FF9A90;
  --coral-soft: rgba(255, 129, 117, .14);
  --btn-bg: #EDE7D9;
  --btn-ink: #14211F;
  --mint: rgba(111, 180, 147, .18);
  --mint-deep: #78C29B;
  --gold: #F4C56D;
  --gold-soft: rgba(244, 197, 109, .13);
  --blue: #8FB9D2;
  --blue-soft: rgba(143, 185, 210, .14);
  --purple: #C2A3DE;
  --purple-soft: rgba(194, 163, 222, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28), 0 14px 34px -24px #000;
  --shadow: 0 2px 4px rgba(0, 0, 0, .24), 0 36px 80px -40px #000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 720px at 88% -8%, rgba(241, 105, 92, .085), transparent 62%),
    radial-gradient(900px 640px at -8% 102%, rgba(95, 175, 126, .10), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--coral); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 3px solid transparent; background-clip: padding-box; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, h4, blockquote { margin: 0; }
mark { background: rgba(240, 188, 94, .42); color: inherit; padding: 0 2px; border-radius: 4px; }
:focus-visible { outline: 3px solid rgba(241, 105, 92, .52); outline-offset: 3px; }
[hidden] { display: none !important; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .045; }

.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icon.is-filled { fill: currentColor; }

/* ---------------- App shell ---------------- */
.app-shell { position: relative; z-index: 2; display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 28px 18px 20px; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; width: fit-content; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; overflow: hidden; box-shadow: 0 8px 20px -10px rgba(18, 59, 58, .55); flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-copy strong { font-size: 21px; letter-spacing: .04em; font-weight: 750; }
.brand-copy small { font-size: 8.5px; letter-spacing: .22em; color: var(--muted); font-weight: 700; }
.side-tagline { padding: 18px 10px 0; font-size: 11.5px; color: var(--faint); letter-spacing: .05em; }

.side-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 24px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 15px;
  color: var(--muted); font-size: 14px; font-weight: 600; position: relative;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.side-nav a:hover { background: var(--surface-2); color: var(--ink); transform: translateX(2px); }
.nav-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: all .2s var(--ease); }
.nav-icon .icon { width: 19px; height: 19px; }
.side-nav a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 7px 9px; }
.side-nav a.is-active .nav-icon { background: var(--coral-soft); color: var(--coral-deep); }
.nav-count { margin-left: auto; font-size: 9.5px; color: var(--faint); background: var(--surface-2); padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); }
.side-nav a.is-active .nav-count { background: transparent; border-color: transparent; }

.side-spacer { flex: 1; min-height: 24px; }
.side-goal { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); }
.side-goal-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.side-goal-head b { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-goal-bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 11px 0 10px; }
.side-goal-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--coral), #F6A07A); transition: width .7s var(--ease); }
.side-goal p { font-size: 10.5px; color: var(--faint); line-height: 1.5; }
.side-goal-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--coral-deep); }
.side-goal-link .icon { width: 13px; height: 13px; }
.side-goal-link:hover .icon { transform: translateX(2px); }
.side-goal-link .icon { transition: transform .2s var(--ease); }

.side-utils { display: flex; gap: 6px; margin-top: 14px; }
.side-utils button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 1px solid transparent; background: transparent; border-radius: 11px; font-size: 11px; color: var(--muted); }
.side-utils button:hover { background: var(--surface-2); color: var(--ink); }
.side-utils .icon { width: 15px; height: 15px; }
.side-foot { display: flex; justify-content: space-between; padding: 16px 8px 0; font-size: 8.5px; letter-spacing: .14em; color: var(--faint); }

.main-shell { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 92px; flex: none;
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(20px, 3vw, 44px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(20px) saturate(1.1);
  border-bottom: 1px solid transparent;
}
.topbar::after { content: ""; position: absolute; left: clamp(20px, 3vw, 44px); right: clamp(20px, 3vw, 44px); bottom: 0; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.topbar-title { min-width: 0; }
.topbar-title h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.topbar-title p { font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.global-search { display: flex; align-items: center; gap: 8px; width: 252px; height: 42px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); transition: border .2s, box-shadow .2s, width .25s var(--ease); }
.global-search:focus-within { border-color: rgba(241, 105, 92, .55); box-shadow: 0 0 0 4px rgba(241, 105, 92, .08); width: 290px; }
.global-search .icon { width: 16px; height: 16px; }
.global-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 12.5px; color: var(--ink); }
.global-search input::placeholder { color: var(--faint); }
kbd { font-family: var(--font); font-size: 9.5px; line-height: 1; padding: 4px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--faint); background: var(--surface-2); box-shadow: 0 1px 0 var(--line); }
.streak-pill { height: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 13px; border: 1px solid rgba(240, 188, 94, .35); background: var(--gold-soft); color: #9C6B1E; font-size: 12px; font-weight: 700; }
[data-theme="dark"] .streak-pill { color: var(--gold); }
.streak-pill .icon { width: 17px; height: 17px; color: #D8902A; fill: rgba(216, 144, 42, .16); }
.streak-pill b { font-size: 14px; font-variant-numeric: tabular-nums; }
.streak-pill span { font-size: 10px; color: inherit; opacity: .6; font-weight: 500; }
.avatar { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--surface); background: var(--hero); color: #FFF6E5; font-family: var(--serif); font-size: 18px; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(18, 59, 58, .6); }
.avatar:hover { transform: translateY(-1px); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; color: var(--ink-2); transition: all .2s var(--ease); }
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn.soft { background: var(--surface-2); }
.top-settings { display: none; }
.brand-mobile { display: none; }

.view { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px clamp(20px, 3vw, 40px) 60px; flex: 1; }
.view.is-entering { animation: pageIn .38s var(--ease); }
.site-foot { display: flex; justify-content: space-between; gap: 12px; padding: 0 clamp(20px, 3vw, 44px) 26px; font-size: 9.5px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.page { animation: pageIn .38s var(--ease); }
.mobile-nav { display: none; }

/* ---------------- Shared primitives ---------------- */
.eyebrow { display: block; font-size: 9.5px; font-weight: 750; letter-spacing: .19em; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-head h2 { font-size: 21px; letter-spacing: -.02em; font-weight: 700; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 6px 0 26px; }
.page-head h1 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.page-head p { margin-top: 9px; font-size: 13px; color: var(--muted); max-width: 580px; line-height: 1.65; }
.page-head-actions { display: flex; gap: 10px; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 17px;
  border: 1px solid transparent; border-radius: 13px; font-size: 13.5px; font-weight: 650; white-space: nowrap;
  background: transparent; transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 8px 20px -14px rgba(18, 59, 58, .8); }
.btn-primary:hover { box-shadow: 0 12px 26px -14px rgba(18, 59, 58, .8); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 10px 24px -16px rgba(211, 78, 67, .8); }
.btn-coral:hover { background: var(--coral-deep); }
.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn-soft:hover { border-color: var(--line-strong); background: var(--surface-3); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(211, 78, 67, .1); border-color: rgba(211, 78, 67, .22); color: var(--coral-deep); }
.btn-danger:hover { background: rgba(211, 78, 67, .16); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .24); color: #FFF7E9; background: rgba(255, 255, 255, .04); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); }
.btn-lg { height: 50px; padding: 0 21px; font-size: 14px; border-radius: 15px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 11.5px; border-radius: 10px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.text-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--coral-deep); font-size: 11.5px; font-weight: 650; padding: 4px 0; }
.text-btn .icon { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.text-btn:hover .icon { transform: translateX(2px); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--coral-deep); font-size: 11.5px; font-weight: 700; padding: 4px 0; }
.link-btn .icon { width: 14px; height: 14px; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: inline-grid; place-items: center; color: var(--ink-2); flex: none; transition: all .2s var(--ease); }
.round-btn:hover { background: var(--coral-soft); color: var(--coral-deep); border-color: transparent; }
.round-btn.light { background: rgba(255, 252, 244, .9); color: #18302D; border-color: rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.round-btn .icon { width: 18px; height: 18px; }

.badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 9.5px; font-weight: 650; letter-spacing: .02em; }
.badge-new { background: var(--surface-3); color: var(--muted); }
.badge-learning { background: var(--gold-soft); color: #A06E22; }
.badge-mastered { background: var(--mint); color: #2E7252; }
[data-theme="dark"] .badge-learning { color: var(--gold); }
[data-theme="dark"] .badge-mastered { color: var(--mint-deep); }
.level-tag { font-size: 9px; letter-spacing: .08em; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 12px; color: var(--muted); white-space: nowrap; transition: all .18s var(--ease); }
.chip span { font-size: 9.5px; color: var(--faint); background: var(--surface-2); padding: 1px 5px; border-radius: 99px; }
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.is-active { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.chip.is-active span { background: rgba(255, 255, 255, .16); color: inherit; }
[data-theme="dark"] .chip.is-active span { background: rgba(0, 0, 0, .1); }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { height: 28px; padding: 0 10px; border: 0; background: transparent; border-radius: 7px; font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.segmented button .icon { width: 13px; height: 13px; }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(24, 48, 45, .12); font-weight: 650; }
.image-seg { flex-wrap: wrap; justify-content: flex-end; }
.image-seg button { white-space: nowrap; }
.empty-state { text-align: center; padding: 54px 24px; margin-top: 16px; }
.empty-emoji { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; background: var(--surface-2); border-radius: 18px; font-size: 27px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.empty-inline { display: flex; align-items: center; gap: 14px; padding: 22px 12px; color: var(--muted); }
.empty-inline .empty-emoji { width: 46px; height: 46px; margin: 0; font-size: 22px; border-radius: 14px; }
.empty-inline h4 { font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.empty-inline p { font-size: 11.5px; line-height: 1.55; }
.review-empty .btn { margin-left: auto; flex: none; }
.week-empty { position: absolute; inset: 12px 0 30px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 10px; color: var(--faint); pointer-events: none; }
.week-empty span { font-size: 15px; }

/* ---------------- Ring ---------------- */
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); }
.ring-fill { fill: none; stroke: var(--coral); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring-label { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; position: relative; z-index: 1; }
.ring-label strong { font-size: 20px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring-label strong small { font-size: 10px; font-weight: 600; color: var(--muted); }
.ring-label span { margin-top: 5px; font-size: 8.5px; letter-spacing: .05em; color: var(--muted); }

/* ---------------- Home / hero ---------------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 28px; padding: 40px 44px; border-radius: 34px; overflow: hidden; color: #FFF7E9;
  background:
    radial-gradient(620px 380px at 108% -20%, rgba(241, 105, 92, .32), transparent 70%),
    radial-gradient(500px 400px at -12% 120%, rgba(95, 175, 126, .18), transparent 70%),
    linear-gradient(135deg, #163F3C 0%, #0F302E 62%, #1B4A44 100%);
  box-shadow: 0 30px 70px -44px rgba(18, 59, 58, .9), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: radial-gradient(rgba(255, 247, 233, .55) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: radial-gradient(500px 380px at 78% 45%, #000 0, transparent 75%);
}
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; right: 16%; top: -240px; pointer-events: none; }
.hero-copy, .hero-art { position: relative; z-index: 2; }
.hero-kicker { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .16em; color: rgba(255, 247, 233, .66); font-weight: 600; text-transform: uppercase; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(241, 105, 92, .13); animation: pulse 2.4s infinite; }
.kicker-sep { opacity: .35; }
.hero h1 { margin-top: 22px; font-size: clamp(38px, 4.6vw, 61px); line-height: 1.06; letter-spacing: -.045em; font-weight: 680; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: #F6C979; letter-spacing: -.03em; }
.hero-sub { max-width: 450px; margin-top: 17px; font-size: 13.5px; line-height: 1.75; color: rgba(255, 247, 233, .68); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-progress { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.hero .ring-track { stroke: rgba(255, 255, 255, .14); }
.hero .ring-fill { stroke: #F6C979; }
.hero .ring-label strong { color: #FFF9EE; font-size: 22px; }
.hero .ring-label strong small { color: rgba(255, 247, 233, .45); }
.hero .ring-label span { color: rgba(255, 247, 233, .55); }
.hero-progress-copy { display: flex; flex-direction: column; gap: 5px; }
.hero-progress-copy strong { font-size: 13px; font-weight: 650; }
.hero-progress-copy span { font-size: 10.5px; color: rgba(255, 247, 233, .55); letter-spacing: .02em; }

.hero-art { display: flex; align-items: center; justify-content: flex-end; }
.hero-halo { position: absolute; width: 380px; height: 380px; right: -70px; top: 50%; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(246, 201, 121, .16), transparent 66%); }
.wotd-card {
  position: relative; width: 100%; max-width: 326px; background: #FFF9EE; border-radius: 24px; padding: 9px;
  color: #18302D; box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .6) inset;
  transform: rotate(-2.2deg); transition: transform .35s var(--ease);
}
.wotd-card:hover { transform: rotate(0deg) translateY(-3px); }
.wotd-media { position: relative; border-radius: 17px; overflow: hidden; aspect-ratio: 4 / 3; background: #F1E8D8; }
.wotd-media img { width: 100%; height: 100%; object-fit: cover; }
.wotd-tag { position: absolute; left: 10px; top: 10px; font-size: 8px; letter-spacing: .14em; font-weight: 750; color: #18302D; background: rgba(255, 252, 244, .86); backdrop-filter: blur(6px); padding: 5px 7px; border-radius: 6px; }
.wotd-speak { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 252, 244, .88); color: #18302D; display: grid; place-items: center; backdrop-filter: blur(6px); }
.wotd-speak .icon { width: 15px; height: 15px; }
.wotd-speak:hover { background: #fff; }
.wotd-body { padding: 13px 10px 8px; }
.wotd-meta { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: .04em; color: #7A827E; }
.wotd-body h3 { font-family: var(--serif); font-size: 29px; line-height: 1.1; margin-top: 7px; letter-spacing: -.02em; font-weight: 600; overflow-wrap: anywhere; }
.wotd-ipa { font-size: 10.5px; color: #8A918D; margin-top: 4px; letter-spacing: .02em; }
.wotd-meaning { font-size: 11.5px; color: #43524E; margin-top: 8px; line-height: 1.5; }
.wotd-body .link-btn { margin-top: 8px; font-size: 10.5px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0; }
.stat-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 13px; align-items: center;
  padding: 16px 17px; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.stat-icon { grid-row: 1 / 4; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.stat-icon .icon { width: 19px; height: 19px; }
.stat-value { font-size: 24px; font-weight: 730; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 10px; color: var(--faint); font-weight: 600; margin-left: 1px; }
.stat-label { font-size: 11.5px; color: var(--ink-2); font-weight: 550; margin-top: 2px; }
.stat-note { grid-column: 2; font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.tone-mint .stat-icon { background: var(--mint); color: #357C5B; }
.tone-coral .stat-icon { background: var(--coral-soft); color: var(--coral-deep); }
.tone-gold .stat-icon { background: var(--gold-soft); color: #A67423; }
.tone-blue .stat-icon { background: var(--blue-soft); color: #407D9C; }
[data-theme="dark"] .tone-mint .stat-icon { color: var(--mint-deep); }
[data-theme="dark"] .tone-gold .stat-icon { color: var(--gold); }
[data-theme="dark"] .tone-blue .stat-icon { color: var(--blue); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(300px, .9fr); gap: 16px; margin-bottom: 16px; }
.review-card { min-height: 300px; }
.due-list { display: flex; flex-direction: column; gap: 2px; }
.due-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 14px; background: transparent; text-align: left; transition: background .18s var(--ease); }
.due-row:hover { background: var(--surface-2); }
.due-img { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.due-img img { width: 100%; height: 100%; object-fit: cover; }
.due-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.due-main strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.due-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-time { font-size: 9.5px; color: var(--coral-deep); background: var(--coral-soft); border-radius: 99px; padding: 4px 7px; white-space: nowrap; }
.due-arrow { color: var(--faint); display: grid; place-items: center; }
.due-arrow .icon { width: 14px; height: 14px; }
.due-more { font-size: 10px; color: var(--faint); text-align: center; padding-top: 8px; }

.week-card { display: flex; flex-direction: column; }
.week-total { font-size: 10px; color: var(--muted); background: var(--surface-2); padding: 4px 8px; border-radius: 99px; }
.week-chart { position: relative; display: flex; gap: 5px; height: 160px; margin-top: 4px; padding: 6px 0 22px; }
.week-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; height: 100%; }
.week-bar-wrap { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 0; }
.week-count { font-size: 9px; color: var(--faint); height: 13px; line-height: 13px; }
.week-bar { width: min(24px, 68%); min-height: 3px; max-height: calc(100% - 15px); border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #7FB69B, #A9D3BC); transition: height .55s var(--ease); }
.week-col.is-today .week-bar { background: linear-gradient(180deg, var(--coral), #F5A18D); }
.week-col:not(.is-today) .week-bar { opacity: .72; }
.week-label { font-size: 9.5px; color: var(--faint); margin-top: 6px; }
.week-col.is-today .week-label { color: var(--coral-deep); font-weight: 700; }
.goal-line { position: absolute; left: 0; right: 0; bottom: calc(22px + (100% - 22px) * var(--goal)); border-top: 1px dashed var(--line-strong); pointer-events: none; }
.goal-line::after { content: "目标"; position: absolute; right: 0; top: -14px; font-size: 8px; color: var(--faint); background: var(--surface); padding-left: 4px; }
.week-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; font-size: 10px; color: var(--faint); }
.week-fire { display: inline-flex; align-items: center; gap: 4px; color: var(--coral-deep); }
.week-fire .icon { width: 12px; height: 12px; }

.category-card { margin-top: 16px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.category-tile { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 10px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid transparent; background: var(--surface-2); transition: all .2s var(--ease); }
.category-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.cat-emoji { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; font-size: 18px; }
.cat-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-copy strong { font-size: 12px; font-weight: 650; }
.cat-copy small { font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 9px; color: var(--faint); align-self: start; font-variant-numeric: tabular-nums; }
.cat-progress { grid-column: 2 / 4; height: 3px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.cat-progress i { display: block; height: 100%; background: var(--tint); border-radius: 99px; transition: width .6s var(--ease); }

.core-banner {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 11px; padding: 13px 15px;
  border-radius: 17px; border: 1px solid rgba(176, 138, 74, .22);
  background: linear-gradient(100deg, var(--gold-soft), var(--surface) 72%);
  text-align: left; transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.core-banner:hover { transform: translateY(-2px); border-color: rgba(176, 138, 74, .38); box-shadow: var(--shadow-sm); }
.core-banner-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .55); font-size: 20px; }
[data-theme="dark"] .core-banner-icon { background: rgba(255, 255, 255, .06); }
.core-banner-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.core-banner-copy .eyebrow { margin: 0; font-size: 8px; color: #9A6B2B; }
[data-theme="dark"] .core-banner-copy .eyebrow { color: var(--gold); }
.core-banner-copy strong { font-size: 13px; }
.core-banner-copy small { font-size: 9.5px; color: var(--faint); }
.core-banner-progress { margin-left: auto; width: 135px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.core-banner-progress > span { height: 4px; background: rgba(176, 138, 74, .16); border-radius: 99px; overflow: hidden; }
.core-banner-progress i { display: block; height: 100%; background: #B08A4A; border-radius: 99px; }
.core-banner-progress small { font-size: 8px; color: var(--faint); text-align: right; }
.core-banner-arrow { color: #A87924; flex: none; display: grid; place-items: center; }
.core-banner-arrow .icon { width: 16px; height: 16px; }
.everyday-banner { border-color: rgba(111, 155, 99, .24); background: linear-gradient(100deg, #EAF3E4, var(--surface) 72%); }
.everyday-banner:hover { border-color: rgba(111, 155, 99, .4); }
.everyday-banner .core-banner-copy .eyebrow { color: #557A49; }
[data-theme="dark"] .everyday-banner .core-banner-copy .eyebrow { color: #9CCB8D; }
.everyday-banner .core-banner-progress > span { background: rgba(111, 155, 99, .16); }
.everyday-banner .core-banner-progress i { background: #6F9B63; }
.everyday-banner .core-banner-arrow { color: #557A49; }
[data-theme="dark"] .everyday-banner .core-banner-arrow { color: #9CCB8D; }
.tip-banner { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 17px 22px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(100deg, var(--gold-soft), var(--surface) 72%); }
.tip-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .55); font-size: 20px; flex: none; }
[data-theme="dark"] .tip-icon { background: rgba(255, 255, 255, .06); }
.tip-banner > div { flex: 1; min-width: 0; }
.tip-banner .eyebrow { margin-bottom: 3px; }
.tip-banner p { font-size: 12px; color: var(--ink-2); line-height: 1.55; }

/* ---------------- No verified photo ---------------- */
.photo-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 100%; min-height: 120px; padding: 14px; text-align: center;
  background:
    radial-gradient(circle at 50% 34%, var(--pe-soft, #F3EBDD) 0, transparent 62%),
    linear-gradient(135deg, #FAF5EC, #F0E7D8);
  color: #8C7E6A;
}
[data-theme="dark"] .photo-empty {
  background:
    radial-gradient(circle at 50% 34%, var(--pe-tint, #284237) 0, transparent 62%),
    linear-gradient(135deg, #26302B, #202824);
  color: #AEB8AA;
}
.photo-empty .pe-icon { font-size: 30px; line-height: 1; filter: saturate(.8); opacity: .92; }
.photo-empty strong {
  max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--serif); font-size: 21px; line-height: 1.1; letter-spacing: -.01em; color: var(--ink);
}
.photo-empty small { font-size: 9.5px; line-height: 1.2; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
[data-theme="dark"] .photo-empty strong { color: #F0E9DA; }
.wc-media .photo-empty, .wotd-media .photo-empty, .wd-media .photo-empty,
.study-media .photo-empty { min-height: 100%; }
.wd-media .photo-empty { gap: 10px; }
.wd-media .photo-empty .pe-icon { font-size: 46px; }
.wd-media .photo-empty strong { font-size: 32px; }
.wd-media .photo-empty small { font-size: 11px; }

/* ---------------- Word forms / affixes ---------------- */
.forms-tabs { display: inline-flex; margin: 0 0 18px; }
.forms-tabs button { gap: 7px; }
.forms-tabs button span { font-size: 10px; opacity: .65; }
.forms-toolbar { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 14px; }
.forms-toolbar .search-field { flex: 1; min-width: 220px; }
.forms-toolbar .status-chips { flex: none; }
.verb-table-head, .verb-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr .8fr 1.7fr; gap: 12px; align-items: center; }
.verb-table-head { padding: 0 18px 9px; color: var(--faint); font-size: 10.5px; letter-spacing: .05em; }
.verb-list { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.verb-row { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.verb-row:last-child { border-bottom: 0; }
.verb-row:hover { background: var(--surface-2); }
.verb-row.is-seen { background: color-mix(in srgb, var(--mint-soft) 35%, var(--surface)); }
.verb-base { border: 0; background: transparent; text-align: left; min-width: 0; padding: 0; }
.verb-base strong { display: block; font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.verb-base small { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; }
.verb-cell { min-width: 0; position: relative; padding-right: 22px; }
.verb-cell > span { display: none; color: var(--faint); font-size: 9.5px; }
.verb-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.verb-speak { position: absolute; right: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: transparent; color: var(--faint); padding: 0; }
.verb-speak:hover { color: var(--coral); }
.verb-speak .icon { width: 14px; height: 14px; }
.verb-meaning { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.forms-more { display: flex; justify-content: center; margin: 18px 0; }
.forms-note { color: var(--faint); font-size: 11px; line-height: 1.6; margin-top: 12px; }
.affix-type-row { display: flex; gap: 8px; margin-bottom: 16px; }
.affix-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.affix-card { text-align: left; padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; transition: transform .18s var(--ease), border-color .18s var(--ease); }
.affix-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.affix-head { display: flex; align-items: baseline; gap: 8px; }
.affix-head strong { font-family: var(--serif); font-size: 21px; }
.affix-head span { color: var(--muted); font-size: 11.5px; }
.affix-card p { margin-top: 8px; min-height: 32px; color: var(--ink-2); font-size: 11.5px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.affix-card small { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--faint); font-size: 10.5px; }
.affix-card small .icon { width: 13px; height: 13px; margin-left: auto; }
.affix-modal { max-width: 620px; }
.affix-word-list { max-height: 58vh; overflow: auto; margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.affix-word { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-align: left; min-width: 0; }
.affix-word strong { font-family: var(--serif); font-size: 15px; flex: none; }
.affix-word span { color: var(--faint); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1080px) {
  .affix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .forms-toolbar { flex-direction: column; align-items: stretch; }
  .forms-toolbar .status-chips { overflow-x: auto; }
  .verb-table-head { display: none; }
  .verb-row { grid-template-columns: 1.2fr 1fr 1fr; gap: 8px 12px; padding: 14px 16px; }
  .verb-meaning { grid-column: 1 / -1; }
  .verb-cell { padding-right: 18px; }
  .verb-cell > span { display: block; }
  .verb-cell b { font-size: 12px; }
  .affix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .verb-base strong { font-size: 18px; }
  .verb-row { grid-template-columns: 1fr 1fr; }
  .affix-grid { grid-template-columns: 1fr; }
  .affix-word-list { grid-template-columns: 1fr; }
}

/* ---------------- Daily assignment ---------------- */
.daily-plan-card { margin-top: 16px; }
.plan-head-meta { display: flex; align-items: center; gap: 10px; }
.plan-level { background: var(--mint-soft, #E3F4E8); color: #3F7A53; }
.plan-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-progress { height: 6px; margin-top: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.plan-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6FAF83, #5A9B70); transition: width .3s var(--ease); }
.plan-words { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.plan-word { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-align: left; }
.plan-word:hover { border-color: var(--accent); }
.plan-word span { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-word small { display: block; margin-top: 3px; font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.plan-foot > small { color: var(--faint); font-size: 11px; }
.plan-actions { display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-width: 900px) {
  .plan-words { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .plan-words { grid-template-columns: repeat(2, 1fr); }
  .plan-foot { align-items: flex-start; flex-direction: column; }
  .plan-actions { width: 100%; justify-content: space-between; }
}
.plan-modal { max-width: 640px; }
.plan-modal-head h2 { font-size: 24px; margin: 4px 0 6px; }
.plan-modal-head p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.plan-modal-list { max-height: 58vh; overflow: auto; margin-top: 16px; border-top: 1px solid var(--line); }
.plan-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.plan-row:hover { background: var(--surface-2); }
.plan-row-index { width: 28px; flex: none; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.plan-row-word { flex: 1; min-width: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.2; }
.plan-row-word small { display: block; margin-top: 3px; font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row-state { flex: none; font-size: 11px; color: var(--faint); }
.plan-row.is-done .plan-row-word { color: var(--muted); }
.plan-row.is-done .plan-row-state { color: #4D8A61; }
.plan-history-card { margin-top: 18px; }
.plan-record-list { display: flex; flex-direction: column; margin-top: 6px; }
.plan-record { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-record:last-child { border-bottom: 0; }
.plan-record-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; border: 0; background: transparent; text-align: left; padding: 4px 0; }
.plan-record-date { width: 118px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.plan-record-date strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.plan-record-date small { font-size: 10.5px; color: var(--faint); }
.plan-record-count { width: 105px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.plan-record-count strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.plan-record-count small { font-size: 10.5px; color: var(--faint); }
.plan-record-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.plan-record-bar i { display: block; height: 100%; background: #6F9B63; border-radius: 99px; }
.plan-record .btn { flex: none; }
@media (max-width: 560px) {
  .plan-record { flex-wrap: wrap; }
  .plan-record-main { gap: 10px; }
  .plan-record-date { width: 96px; }
  .plan-record-count { width: 90px; }
  .plan-record .btn { margin-left: 106px; }
}

/* ---------------- Library ---------------- */
.library-toolbar { display: flex; align-items: center; gap: 18px; padding: 14px 16px; flex-wrap: wrap; }
.search-field { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 230px; height: 42px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--faint); transition: border .2s, box-shadow .2s; }
.search-field:focus-within { border-color: rgba(241, 105, 92, .55); box-shadow: 0 0 0 4px rgba(241, 105, 92, .08); background: var(--surface); }
.search-field .icon { width: 17px; height: 17px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 12.5px; }
.search-field input::placeholder { color: var(--faint); }
.search-clear { border: 0; background: var(--surface-3); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.search-clear .icon { width: 11px; height: 11px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0 14px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11.5px; transition: all .18s var(--ease); }
.cat-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.cat-chip.is-active { background: var(--coral-soft); border-color: rgba(241, 105, 92, .3); color: var(--coral-deep); font-weight: 650; }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; }
.cat-dot-all { color: var(--coral); font-size: 10px; }
.level-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 14px; }
.level-chip-label { font-size: 10.5px; color: var(--faint); letter-spacing: .06em; margin-right: 3px; }
.level-chip { height: 31px; font-size: 11.5px; }
.level-chip.is-active { background: var(--ink); color: #FFF9F0; border-color: var(--ink); }
.level-chip span { background: rgba(255, 255, 255, .15); }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; font-size: 11px; color: var(--faint); }
.result-bar strong { color: var(--ink); font-size: 15px; margin-right: 3px; }
.result-cat, .result-query { margin-left: 9px; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.sort-select { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.sort-select .icon { width: 14px; height: 14px; }
.sort-select select { border: 0; background: transparent; outline: none; font-size: 11px; color: var(--ink-2); cursor: pointer; padding: 4px; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 16px; }
.library-more { display: flex; justify-content: center; padding: 26px 0 6px; }
.library-more .btn { min-width: 210px; }
.library-more .btn small { font-size: 8.5px; color: var(--faint); margin-left: 3px; }
.word-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; cursor: pointer; transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s; animation: cardIn .42s var(--ease) both; animation-delay: var(--delay, 0ms); }
.word-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.wc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.wc-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.word-card:hover .wc-media > img { transform: scale(1.035); }
.wc-level { position: absolute; left: 9px; top: 9px; font-size: 8px; font-weight: 750; letter-spacing: .08em; color: #34443F; background: rgba(255, 252, 244, .9); padding: 4px 6px; border-radius: 5px; backdrop-filter: blur(4px); }
.wc-star, .wc-speak { position: absolute; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 252, 244, .88); color: #44514C; backdrop-filter: blur(6px); transition: all .18s var(--ease); }
.wc-star { top: 8px; right: 8px; }
.wc-star:hover, .wc-star.is-fav { color: #D9942B; background: #FFF8E6; }
.wc-star .icon, .wc-speak .icon { width: 14px; height: 14px; }
.wc-speak { right: 8px; bottom: 8px; opacity: 0; transform: translateY(4px); }
.word-card:hover .wc-speak { opacity: 1; transform: none; }
.wc-body { padding: 13px 14px 14px; }
.wc-title { display: flex; align-items: baseline; gap: 7px; }
.wc-title h3 { font-family: var(--serif); font-size: 23px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.wc-pos { font-size: 9px; color: var(--faint); font-style: italic; }
.wc-ipa { font-size: 10px; color: var(--faint); margin-top: 4px; }
.wc-meaning { font-size: 12px; color: var(--ink-2); margin-top: 7px; line-height: 1.45; min-height: 34px; }
.wc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.cat-label { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--faint); }
.cat-label i { width: 5px; height: 5px; border-radius: 50%; }

/* ---------------- Learn ---------------- */
.learn-page, .study-page, .summary-page, .quiz-page, .match-page { max-width: 900px; margin: 0 auto; }
.setup-hero { display: grid; grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr); gap: 0; padding: 0; overflow: hidden; min-height: 400px; }
.setup-art { position: relative; min-height: 380px; background: var(--surface-3); overflow: hidden; }
.setup-art > img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.setup-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(18, 48, 45, .16)); }
.float-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 252, 244, .92); color: #18302D; border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(8px); padding: 8px 11px; border-radius: 11px; font-size: 10px; font-weight: 650; box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .5); }
.float-chip .icon { width: 14px; height: 14px; color: #D34E43; }
.chip-top { left: 18px; top: 20px; transform: rotate(-2deg); }
.chip-bottom { left: 18px; bottom: 22px; transform: rotate(1.5deg); }
.setup-copy { padding: 40px 38px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.setup-copy h1 { font-size: clamp(30px, 3.6vw, 43px); line-height: 1.12; letter-spacing: -.04em; margin-top: 6px; }
.setup-copy > p { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin-top: 13px; max-width: 420px; }
.setup-copy > p strong { color: var(--ink); }
.session-pills { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 11px; margin: 19px 0 13px; }
.session-pill { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 11px; color: var(--muted); }
.session-pill.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(24, 48, 45, .13); font-weight: 650; }
.setup-copy .btn-block { max-width: 360px; }
.setup-meta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 14px; font-size: 9.5px; color: var(--faint); }
.setup-meta span { display: inline-flex; align-items: center; gap: 4px; }
.setup-meta .icon { width: 12px; height: 12px; }
.learn-explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; padding: 0 6px; }
.explain-item { position: relative; padding-top: 13px; border-top: 1px solid var(--line); }
.explain-item > span { font-family: var(--serif); font-size: 21px; color: var(--coral); font-style: italic; }
.explain-item h3 { font-size: 13px; margin: 6px 0 5px; }
.explain-item p { font-size: 11px; color: var(--muted); line-height: 1.65; }

.study-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 18px; }
.study-progress-wrap { min-width: 0; }
.study-progress { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; }
.study-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--coral), #F4A17B); transition: width .5s var(--ease); }
.study-progress-meta { display: flex; justify-content: space-between; margin-top: 7px; font-size: 9px; color: var(--faint); letter-spacing: .04em; }
.study-progress-meta b { color: var(--ink); font-size: 11px; }
.study-streak { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--coral-deep); }
.study-streak .icon { width: 14px; height: 14px; }
.study-card { padding: 0; overflow: hidden; border-radius: 28px; }
.study-media { position: relative; height: 300px; background: var(--surface-3); overflow: hidden; }
.study-media img { width: 100%; height: 100%; object-fit: cover; }
.study-cat { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 252, 244, .9); color: #263A35; font-size: 9.5px; font-weight: 650; padding: 6px 9px; border-radius: 7px; backdrop-filter: blur(6px); }
.study-new { position: absolute; left: 16px; bottom: 16px; background: var(--coral); color: #fff; font-size: 8px; font-weight: 800; letter-spacing: .14em; padding: 5px 7px; border-radius: 5px; }
.study-new.is-review { background: rgba(18, 59, 58, .78); backdrop-filter: blur(6px); }
.study-speak { position: absolute; right: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 252, 244, .9); color: #18302D; display: grid; place-items: center; backdrop-filter: blur(8px); }
.study-speak .icon { width: 18px; height: 18px; }
.study-body { padding: 25px 32px 29px; }
.study-wordline { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.study-wordline h1 { font-family: var(--serif); font-size: clamp(40px, 5.4vw, 58px); line-height: 1; letter-spacing: -.035em; font-weight: 600; overflow-wrap: anywhere; }
.study-ipa { margin-top: 8px; font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.study-ipa span { font-style: italic; font-size: 10px; color: var(--faint); margin-left: 5px; }
.recall-hint { display: flex; align-items: center; gap: 15px; margin-top: 26px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface-2); }
.recall-mark { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--coral); font-family: var(--serif); font-size: 22px; border: 1px solid var(--line); }
.recall-hint strong { font-size: 12.5px; }
.recall-hint p { font-size: 10.5px; color: var(--faint); margin-top: 4px; line-height: 1.5; }
.reveal { margin-top: 22px; animation: revealIn .38s var(--ease); }
.reveal-meaning { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.4; }
.reveal-en { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.reveal-divider { height: 1px; background: var(--line); margin: 19px 0; }
.example { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink); position: relative; padding-right: 34px; }
.example span { display: block; font-family: var(--font); font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.example-speak { position: absolute; right: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; transition: all .18s var(--ease); }
.example-speak .icon { width: 13px; height: 13px; }
.example-speak:hover { color: var(--coral-deep); background: var(--coral-soft); border-color: transparent; }
.tip-box { display: flex; gap: 10px; margin-top: 17px; padding: 13px 14px; border-radius: 13px; background: var(--gold-soft); border: 1px solid rgba(240, 188, 94, .18); }
.tip-box-icon { color: #B47D23; flex: none; margin-top: 1px; }
.tip-box-icon .icon { width: 16px; height: 16px; }
.tip-box strong { display: block; font-size: 9.5px; letter-spacing: .06em; color: #90651F; margin-bottom: 3px; }
[data-theme="dark"] .tip-box strong { color: var(--gold); }
.tip-box p { font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.word-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.word-chips span { font-size: 9.5px; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.word-chips span.syn { border-style: dashed; color: var(--muted); }
.core-learn-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 17px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.core-learn-note > span { font-size: 15px; line-height: 1.4; }
.core-learn-note p { font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.my-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-left: 2px solid var(--coral); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.my-note .icon { width: 13px; height: 13px; color: var(--coral-deep); margin-top: 2px; }
.my-note p { font-size: 10.5px; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.rating-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 13px; }
.rate-btn { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all .18s var(--ease); }
.rate-btn:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.rate-top { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; }
.rate-top .icon { width: 15px; height: 15px; }
.rate-btn small { font-size: 8.5px; color: var(--faint); }
.rate-forgot .rate-top { color: var(--coral-deep); }
.rate-fuzzy .rate-top { color: #A67828; }
.rate-know .rate-top { color: #3C8562; }
.rate-easy .rate-top { color: #477A9C; }
.rate-know { background: linear-gradient(180deg, var(--surface), var(--mint)); border-color: rgba(78, 156, 120, .24); }
.reveal-btn { margin-top: 18px; }
.reveal-btn kbd { margin-left: 6px; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .2); color: inherit; box-shadow: none; }
.study-foot-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 15px; font-size: 9.5px; color: var(--faint); }
.study-foot-hint .icon { width: 13px; height: 13px; }

.summary-card { text-align: center; padding: 42px 38px 34px; position: relative; overflow: hidden; }
.summary-card::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 188, 94, .16), transparent 65%); left: 50%; top: -240px; transform: translateX(-50%); pointer-events: none; }
.summary-orbit { display: flex; justify-content: center; margin-bottom: 20px; }
.summary-card h1 { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); font-weight: 500; letter-spacing: -.03em; }
.summary-card > p { max-width: 440px; margin: 10px auto 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.summary-card > p strong { color: var(--ink); }
.summary-stats { display: flex; justify-content: center; gap: 42px; margin: 26px 0 24px; }
.summary-stats > div { display: flex; flex-direction: column; gap: 3px; }
.summary-stats strong { font-size: 24px; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary-stats strong small { font-size: 10px; color: var(--faint); }
.summary-stats span { font-size: 9px; color: var(--faint); letter-spacing: .05em; }
.summary-list { max-width: 500px; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 8px; }
.summary-row { display: grid; grid-template-columns: 110px 52px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 4px; text-align: left; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row-word { font-family: var(--serif); font-size: 14px; }
.summary-row-rating { font-size: 8.5px; text-align: center; padding: 3px 4px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.rating-know, .rating-easy { background: var(--mint); color: #347454; }
.rating-forgot { background: var(--coral-soft); color: var(--coral-deep); }
.rating-fuzzy { background: var(--gold-soft); color: #956A20; }
.summary-row-meaning { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; }

/* ---------------- Quiz ---------------- */
.quiz-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quiz-mode { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; text-align: left; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); transition: all .22s var(--ease); }
.quiz-mode:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.mode-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; }
.mode-icon .icon { width: 22px; height: 22px; }
.mode-copy { display: flex; flex-direction: column; gap: 4px; }
.mode-copy strong { font-size: 15px; font-weight: 650; }
.mode-copy small { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.mode-go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: all .2s var(--ease); }
.mode-go .icon { width: 14px; height: 14px; }
.quiz-mode:hover .mode-go { background: var(--ink); color: var(--bg); transform: translateX(2px); }
.mode-mint .mode-icon { background: var(--mint); color: #357C5B; }
.mode-gold .mode-icon { background: var(--gold-soft); color: #A67423; }
.mode-blue .mode-icon { background: var(--blue-soft); color: #407D9C; }
.mode-coral .mode-icon { background: var(--coral-soft); color: var(--coral-deep); }
.quiz-config { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 14px; padding: 22px 24px; }
.config-left h3 { font-size: 16px; margin-bottom: 12px; }
.config-note { margin-top: 10px; font-size: 10px; color: var(--faint); line-height: 1.5; }
.config-right { flex: none; text-align: center; padding-left: 26px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.config-big { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--coral); font-style: italic; }
.config-right > span:last-child { font-size: 9px; color: var(--faint); white-space: nowrap; }
.quiz-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.quiz-tips > div { display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.quiz-tips > div > .icon { width: 18px; height: 18px; color: var(--coral-deep); flex: none; }
.quiz-tips p { display: flex; flex-direction: column; gap: 2px; }
.quiz-tips strong { font-size: 10.5px; }
.quiz-tips span { font-size: 9px; color: var(--faint); }

.quiz-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 17px; }
.quiz-progress { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; }
.quiz-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint-deep), #8DC8A9); transition: width .5s var(--ease); }
.quiz-progress-meta { display: flex; justify-content: space-between; margin-top: 7px; font-size: 9px; color: var(--faint); }
.quiz-combo { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: var(--faint); border: 1px solid var(--line); padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.quiz-combo .icon { width: 12px; height: 12px; }
.quiz-combo.is-hot { color: #A67423; border-color: rgba(240, 188, 94, .4); background: var(--gold-soft); }
.quiz-card { padding: 0; overflow: hidden; }
.quiz-card-inner { padding: 34px 34px 24px; }
.q-word-wrap { text-align: center; }
.q-word { font-family: var(--serif); font-size: clamp(42px, 6vw, 62px); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; }
.q-word.small { font-size: 26px; margin-top: 6px; color: var(--muted); }
.q-ipa { font-size: 12px; color: var(--muted); margin-top: 18px; }
.q-ipa span { font-style: italic; font-size: 10px; color: var(--faint); margin-left: 4px; }
.q-instruction { font-size: 11px; color: var(--muted); margin-bottom: 14px; letter-spacing: .02em; }
.q-meaning { font-family: var(--font); font-size: clamp(25px, 3.2vw, 34px); font-weight: 680; letter-spacing: -.03em; line-height: 1.3; }
.q-hint-line { font-size: 10px; color: var(--faint); margin-top: 9px; }
.listen-orb { width: 82px; height: 82px; border-radius: 50%; border: 1px solid rgba(241, 105, 92, .28); background: var(--coral-soft); color: var(--coral-deep); display: inline-grid; place-items: center; margin: 4px auto 12px; transition: all .2s var(--ease); }
.listen-orb .icon { width: 31px; height: 31px; }
.listen-orb:hover { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(241, 105, 92, .07); }
.listen-orb.is-done { width: 50px; height: 50px; margin-bottom: 8px; }
.listen-orb.is-done .icon { width: 19px; height: 19px; }
.replay { font-size: 10px; margin-top: 2px; }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 34px 24px; }
.quiz-option { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); text-align: left; font-size: 12.5px; line-height: 1.4; transition: all .18s var(--ease); }
.quiz-option:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.opt-letter { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: 10px; font-weight: 700; color: var(--muted); }
.opt-text { flex: 1; }
.quiz-option > .icon { width: 17px; height: 17px; flex: none; }
.quiz-option.is-correct { background: rgba(78, 156, 120, .12); border-color: rgba(78, 156, 120, .45); color: #2F7757; }
.quiz-option.is-correct .opt-letter { background: var(--mint-deep); color: #fff; border-color: transparent; }
.quiz-option.is-wrong { background: rgba(241, 105, 92, .1); border-color: rgba(241, 105, 92, .45); color: var(--coral-deep); }
.quiz-option.is-wrong .opt-letter { background: var(--coral); color: #fff; border-color: transparent; }
.quiz-option.is-dim { opacity: .46; }
[data-theme="dark"] .quiz-option.is-correct { color: var(--mint-deep); }
.quiz-helper { text-align: center; padding: 0 30px 22px; font-size: 9px; color: var(--faint); display: flex; align-items: center; justify-content: center; gap: 5px; }
.quiz-helper .icon { width: 12px; height: 12px; }
.answer-panel { margin: 0 34px 30px; padding: 17px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); animation: revealIn .3s var(--ease); }
.answer-panel.is-ok { border-color: rgba(78, 156, 120, .3); background: rgba(78, 156, 120, .07); }
.answer-panel.is-bad { border-color: rgba(241, 105, 92, .28); background: rgba(241, 105, 92, .06); }
.answer-title { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; margin-bottom: 7px; }
.answer-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.answer-dot .icon { width: 12px; height: 12px; }
.answer-dot.ok { background: var(--mint-deep); }
.answer-dot.bad { background: var(--coral); }
.answer-word { font-size: 11.5px; color: var(--ink-2); }
.answer-word strong { font-family: var(--serif); font-size: 16px; color: var(--ink); }
.answer-example { font-family: var(--serif); font-size: 11.5px; line-height: 1.55; color: var(--muted); margin: 6px 0 12px; }
.answer-panel .btn { height: 40px; }

.quiz-result .wrong-list { max-width: 480px; margin: 6px auto 0; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.quiz-result .wrong-list > .eyebrow { margin-bottom: 4px; }
.wrong-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.wrong-row:last-child { border-bottom: 0; }
.wrong-row span { display: flex; flex-direction: column; gap: 2px; }
.wrong-row strong { font-family: var(--serif); font-size: 14px; font-weight: 600; }
.wrong-row small { font-size: 9.5px; color: var(--faint); }
.wrong-row .icon { width: 13px; height: 13px; color: var(--faint); }
.wrong-row:hover strong { color: var(--coral-deep); }
.spell-page { max-width: 720px; }
.spell-card { padding: 0; overflow: hidden; }
.spell-head { padding: 28px 30px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.spell-head .listen-orb { margin: 4px 0 12px; }
.spell-meaning { font-size: 17px; font-weight: 650; margin-top: 2px; }
.spell-meaning span { display: inline-block; font-size: 9.5px; color: var(--faint); font-weight: 500; margin-left: 7px; }
.letter-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; padding: 16px 30px 6px; }
.slot { width: 26px; height: 34px; border-bottom: 2px solid var(--line-strong); display: grid; place-items: center; font-family: var(--serif); font-size: 18px; color: var(--ink); text-transform: lowercase; }
.slot.is-shown { border-bottom-color: var(--coral); }
.slot.gap { border-bottom-color: transparent; width: 12px; }
.spell-input { display: block; width: calc(100% - 60px); margin: 14px auto 0; height: 54px; text-align: center; font-family: var(--serif); font-size: 26px; letter-spacing: .1em; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); outline: none; transition: border .2s, box-shadow .2s; }
.spell-input:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(241, 105, 92, .08); background: var(--surface); }
.spell-input.is-shake { animation: shake .34s var(--ease); border-color: rgba(241, 105, 92, .5); }
.spell-attempts { text-align: center; font-size: 9.5px; color: var(--faint); margin-top: 9px; }
.spell-feedback { text-align: center; font-size: 11.5px; min-height: 20px; margin: 8px 30px 0; color: var(--muted); }
.spell-feedback.is-ok { color: #2F7757; }
.spell-feedback.is-bad { color: var(--coral-deep); }
.spell-feedback strong { font-family: var(--serif); font-size: 14px; }
.spell-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 20px 30px 30px; }

/* ---------------- Games ---------------- */
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.game-visual { position: relative; height: 154px; display: grid; place-items: center; overflow: hidden; }
.game-match .game-visual { background: linear-gradient(135deg, #E0F1E7, #C4E1D2); }
.game-spell .game-visual { background: linear-gradient(135deg, #FBE4DD, #F6C7BB); }
.game-listen .game-visual { background: linear-gradient(135deg, #E3EEF6, #C7DDEB); }
[data-theme="dark"] .game-match .game-visual { background: linear-gradient(135deg, #1D332B, #244238); }
[data-theme="dark"] .game-spell .game-visual { background: linear-gradient(135deg, #36241F, #442B25); }
[data-theme="dark"] .game-listen .game-visual { background: linear-gradient(135deg, #1D2D36, #263B47); }
.game-copy { padding: 20px 21px 21px; display: flex; flex-direction: column; flex: 1; }
.game-copy h2 { font-size: 23px; letter-spacing: -.03em; }
.game-copy > p { font-size: 11px; color: var(--muted); line-height: 1.75; margin-top: 8px; flex: 1; }
.game-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 15px; font-size: 9px; color: var(--faint); }
.game-meta span { display: inline-flex; align-items: center; gap: 4px; }
.game-meta .icon { width: 12px; height: 12px; }
.game-copy .btn { width: 100%; }
.game-bubble { position: absolute; font-family: var(--serif); font-size: 10px; font-style: italic; background: rgba(255, 252, 244, .7); color: #46615A; padding: 4px 8px; border-radius: 99px; }
.bubble-1 { left: 18px; top: 20px; transform: rotate(-6deg); }
.bubble-2 { right: 18px; bottom: 22px; transform: rotate(5deg); }
.mini-match { display: flex; gap: 8px; }
.mini-match span { width: 48px; height: 58px; border-radius: 9px; background: #FFFBF2; color: #18302D; display: grid; place-items: center; font-family: var(--serif); font-size: 19px; box-shadow: 0 9px 18px -10px rgba(18, 59, 58, .35); }
.mini-match span.flip { background: #143C3A; color: #F6C979; transform: rotate(-4deg); }
.mini-match span.match { background: #F1695C; color: #fff; transform: rotate(3deg); }
.letter-tiles { display: flex; gap: 6px; }
.letter-tiles span { width: 37px; height: 45px; border-radius: 8px; background: #FFFBF2; color: #18302D; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; box-shadow: 0 8px 16px -10px rgba(120, 50, 35, .35); }
.letter-tiles span:nth-child(2) { transform: translateY(-7px) rotate(-3deg); }
.letter-tiles span:nth-child(3) { transform: translateY(3px) rotate(2deg); }
.letter-tiles span:last-child { background: #143C3A; color: #F6C979; }
.sound-rings { position: relative; width: 90px; height: 90px; display: grid; place-items: center; }
.sound-rings i { position: absolute; inset: 0; border: 1px solid rgba(64, 125, 156, .24); border-radius: 50%; }
.sound-rings i:nth-child(2) { inset: -14px; opacity: .6; }
.sound-rings i:nth-child(3) { inset: -28px; opacity: .3; }
.sound-rings span { width: 54px; height: 54px; border-radius: 50%; background: #FFFBF2; color: #407D9C; display: grid; place-items: center; box-shadow: 0 10px 22px -12px rgba(40, 90, 110, .5); }
.sound-rings .icon { width: 23px; height: 23px; }
.game-tip { display: flex; align-items: center; gap: 15px; margin-top: 15px; padding: 17px 21px; }
.game-tip > div { flex: 1; }
.game-tip p { font-size: 11.5px; color: var(--muted); line-height: 1.55; }

.match-page { max-width: 880px; }
.match-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-bottom: 10px; }
.match-top h1 { font-size: 24px; letter-spacing: -.03em; }
.match-top .eyebrow { margin-bottom: 3px; }
.match-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.match-stats span { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--faint); padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.match-stats .icon { width: 12px; height: 12px; }
.match-stats b { color: var(--ink); font-size: 10.5px; }
.match-hint { font-size: 10px; color: var(--faint); margin: 0 0 14px 56px; }
.match-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.match-card { position: relative; border: 0; background: transparent; padding: 0; aspect-ratio: 1.24 / 1; perspective: 900px; }
.match-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.match-card.is-flipped .match-inner { transform: rotateY(180deg); }
.match-front, .match-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; overflow: hidden; }
.match-front { background: linear-gradient(150deg, #17423F, #0F302E); border: 1px solid rgba(255, 255, 255, .1); color: #F6C979; box-shadow: 0 12px 24px -18px rgba(18, 59, 58, .9); }
.match-front i { font-family: var(--serif); font-style: normal; font-size: 26px; }
.match-front small { font-size: 6px; letter-spacing: .2em; color: rgba(255, 247, 233, .35); margin-top: 9px; line-height: 1.5; text-align: center; }
.match-back { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-align: center; }
.match-back.is-word { font-family: var(--serif); font-size: clamp(16px, 2vw, 23px); font-weight: 600; letter-spacing: -.02em; word-break: break-word; }
.match-back.is-meaning { font-size: clamp(11px, 1.25vw, 14px); line-height: 1.45; color: var(--ink-2); padding: 10px; }
.match-card.is-matched .match-back { background: var(--mint); border-color: rgba(78, 156, 120, .3); }
.match-card.is-matched { animation: matchedPop .4s var(--ease); }
.match-card:disabled { cursor: default; }
.match-result { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 20px 22px; animation: revealIn .4s var(--ease); }
.result-emoji { font-size: 36px; }
.match-result > div:nth-child(2) { flex: 1; }
.match-result h2 { font-size: 20px; }
.match-result p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.match-result-actions { display: flex; gap: 8px; }

/* ---------------- Stats ---------------- */
.level-banner { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 22px; align-items: center; padding: 24px 26px; background: linear-gradient(120deg, #143C3A, #1B4A44); color: #FFF7E9; border: 0; box-shadow: 0 24px 50px -36px rgba(18, 59, 58, .8); }
.level-orb { width: 68px; height: 68px; border-radius: 50%; border: 1px solid rgba(246, 201, 121, .35); display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, .05); }
.level-orb span { font-size: 6.5px; letter-spacing: .2em; color: rgba(255, 247, 233, .55); }
.level-orb strong { font-family: var(--serif); font-size: 28px; color: #F6C979; line-height: 1.1; font-weight: 500; }
.level-main { min-width: 0; }
.level-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.level-line h2 { font-size: 20px; font-weight: 650; }
.level-line > span { font-size: 10px; color: rgba(255, 247, 233, .55); }
.level-main p { font-size: 9.5px; color: rgba(255, 247, 233, .55); margin-top: 4px; }
.level-main p strong { color: #F6C979; }
.level-bar { height: 5px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.level-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #F6C979, #EF9A72); }
.level-side { display: flex; align-items: center; gap: 9px; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .12); }
.level-side > span { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .07); display: grid; place-items: center; color: #F6C979; }
.level-side .icon { width: 16px; height: 16px; }
.level-side div { display: flex; flex-direction: column; gap: 2px; }
.level-side strong { font-size: 13px; }
.level-side small { font-size: 8px; color: rgba(255, 247, 233, .5); white-space: nowrap; }

.stats-grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); gap: 16px; margin-top: 16px; }
.stats-grid-2.lower { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
.trend-card { min-height: 290px; display: flex; flex-direction: column; }
.trend-chart { display: flex; gap: 4px; align-items: stretch; height: 178px; padding-top: 17px; flex: 1; }
.trend-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; gap: 0; }
.trend-bar { width: 100%; max-width: 26px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #87BBA1, #AEDAbf); transition: height .55s var(--ease); }
.trend-col.is-today .trend-bar { background: linear-gradient(180deg, var(--coral), #F5A18D); }
.trend-col:not(.is-today) .trend-bar { opacity: .75; }
.trend-count { position: absolute; bottom: calc(var(--bar, 0) + 2px); font-size: 8px; color: var(--faint); }
.trend-label { font-size: 8px; color: var(--faint); height: 15px; margin-top: 5px; white-space: nowrap; }
.trend-col.is-today .trend-label { color: var(--coral-deep); font-weight: 650; }
.trend-chart.is-dense { gap: 2px; }
.trend-chart.is-dense .trend-bar { max-width: 14px; border-radius: 3px 3px 1px 1px; }
.trend-chart.is-dense .trend-label { font-size: 7px; }
.trend-foot { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--faint); }
.trend-foot strong { color: var(--ink); }

.mastery-body { display: flex; align-items: center; gap: 24px; padding: 6px 0 12px; }
.donut { width: 158px; height: 158px; flex: none; border-radius: 50%; position: relative; display: grid; place-items: center; }
.donut::before { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: var(--surface); }
.donut > div { position: relative; display: flex; flex-direction: column; align-items: center; }
.donut strong { font-family: var(--serif); font-size: 31px; font-weight: 500; line-height: 1.1; }
.donut span { font-size: 8px; color: var(--faint); letter-spacing: .06em; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.legend > div { display: grid; grid-template-columns: 8px 1fr auto; gap: 7px; align-items: center; font-size: 10px; color: var(--muted); }
.legend strong { font-size: 11px; color: var(--ink); }
.legend i { width: 7px; height: 7px; border-radius: 2px; }
.dot-mastered { background: var(--coral); }
.dot-learning { background: var(--gold); }
.dot-new { background: var(--line-strong); }
.mastery-note { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 11px; }
.mastery-note .icon { width: 12px; height: 12px; }

.cat-rows { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: 11px; padding: 9px 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover .cat-row-main strong { color: var(--coral-deep); }
.cat-row-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; flex: none; }
.cat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cat-row-main > span:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cat-row-main strong { font-size: 11px; font-weight: 600; }
.cat-row-main small { font-size: 8.5px; color: var(--faint); }
.cat-row-bar { display: block; height: 3px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cat-row-bar i { display: block; height: 100%; border-radius: 99px; }
.cat-row > .icon { width: 13px; height: 13px; color: var(--faint); }
.recent-list { display: flex; flex-direction: column; }
.recent-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.recent-row:last-child { border-bottom: 0; }
.recent-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--coral-deep); display: grid; place-items: center; flex: none; }
.recent-icon .icon { width: 13px; height: 13px; }
.recent-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recent-row strong { font-size: 10.5px; font-weight: 600; }
.recent-row small { font-size: 8.5px; color: var(--faint); }
.recent-xp { font-size: 8.5px; color: var(--mint-deep); background: var(--mint); padding: 3px 5px; border-radius: 4px; white-space: nowrap; }
[data-theme="dark"] .recent-xp { color: var(--mint-deep); }
.achievements-card { margin-top: 16px; }
.ach-count { font-size: 9.5px; color: var(--faint); background: var(--surface-2); padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.achievement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.achievement { display: flex; gap: 11px; align-items: center; padding: 11px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-2); }
.achievement.is-unlocked { background: linear-gradient(120deg, var(--gold-soft), var(--surface) 80%); border-color: rgba(240, 188, 94, .25); }
.ach-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--surface); filter: grayscale(1); opacity: .55; }
.is-unlocked .ach-icon { filter: none; opacity: 1; background: rgba(255, 255, 255, .55); }
[data-theme="dark"] .is-unlocked .ach-icon { background: rgba(255, 255, 255, .06); }
.ach-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ach-copy strong { font-size: 10.5px; }
.ach-copy small { font-size: 8.5px; color: var(--faint); }
.ach-status { font-size: 8px; color: #A67423; font-weight: 650; margin-top: 2px; }
[data-theme="dark"] .ach-status { color: var(--gold); }
.ach-bar { display: block; height: 3px; background: var(--surface-3); border-radius: 99px; margin-top: 4px; overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: var(--muted); border-radius: 99px; }
.all-done { text-align: center; font-size: 11px; color: var(--muted); margin: 15px 0 0; }
.data-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 21px 24px; }
.data-strip h3 { font-size: 14px; }
.data-strip p { font-size: 9.5px; color: var(--faint); margin-top: 3px; }
.data-actions { display: flex; gap: 8px; flex: none; }

/* ---------------- Modals ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(9, 20, 18, .54); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .22s var(--ease);
}
.modal-overlay.is-open { opacity: 1; }
.modal {
  position: relative; width: min(920px, 100%); max-height: calc(100vh - 44px); overflow: auto; overscroll-behavior: contain; outline: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 50px 110px -40px rgba(0, 0, 0, .6);
  transform: translateY(14px) scale(.985); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.modal-overlay.is-open .modal { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 13px; right: 13px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; color: var(--ink-2); }
.modal-close:hover { background: var(--surface-3); }
.modal-close .icon { width: 15px; height: 15px; }
.word-modal { width: min(920px, 100%); }
.word-detail { display: grid; grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr); }
.wd-media { position: relative; background: var(--surface-3); min-height: 420px; overflow: hidden; }
.wd-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wd-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 48, 45, .12), transparent 30%, transparent 70%, rgba(18, 48, 45, .18)); pointer-events: none; }
.wd-media-top { position: absolute; left: 15px; top: 15px; z-index: 2; display: flex; gap: 5px; }
.wd-cat, .wd-level { font-size: 8.5px; font-weight: 650; color: #263A35; background: rgba(255, 252, 244, .9); padding: 5px 7px; border-radius: 5px; backdrop-filter: blur(6px); }
.wd-star { position: absolute; right: 15px; top: 15px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 252, 244, .9); color: #44514C; display: grid; place-items: center; backdrop-filter: blur(6px); }
.wd-star.is-fav { color: #D9942B; background: #FFF8E6; }
.wd-star .icon { width: 16px; height: 16px; }
.wd-sound { position: absolute; left: 15px; bottom: 15px; z-index: 2; display: flex; gap: 7px; }
.wd-body { padding: 31px 33px 26px; min-width: 0; }
.wd-wordline { display: flex; align-items: baseline; gap: 10px; padding-right: 20px; }
.wd-wordline h2 { font-family: var(--serif); font-size: clamp(37px, 4.2vw, 49px); line-height: 1; letter-spacing: -.035em; font-weight: 600; word-break: break-word; }
.wd-ipa { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.inline-speak { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--coral-deep); font-size: 9.5px; padding: 0; }
.inline-speak .icon { width: 12px; height: 12px; }
.wd-meaning { font-size: 17px; font-weight: 650; margin-top: 15px; letter-spacing: -.01em; line-height: 1.45; }
.wd-en { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.wd-morph { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.morph-row { display: flex; gap: 10px; align-items: flex-start; }
.morph-row + .morph-row { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.morph-label { flex: none; width: 56px; padding-top: 3px; color: var(--faint); font-size: 10px; letter-spacing: .04em; }
.morph-forms { display: flex; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.morph-cell { position: relative; padding-right: 17px; min-width: 0; }
.morph-cell small { display: block; color: var(--faint); font-size: 9px; line-height: 1.2; }
.morph-cell b { display: block; margin-top: 2px; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.morph-cell .verb-speak { top: 10px; }
.morph-affix { display: flex; flex-wrap: wrap; gap: 6px; }
.affix-pill { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 8px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-family: var(--serif); font-size: 13px; font-weight: 600; }
.affix-pill small { font-family: var(--font); font-size: 9.5px; color: var(--faint); font-weight: 400; }
.wd-body .example { margin-top: 16px; font-size: 14px; }
.wd-body .example span { font-size: 9.5px; }
.wd-body .tip-box { margin-top: 14px; }
.pronounce-box { margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; background: var(--surface-2); }
.pronounce-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pronounce-head > span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 650; }
.pronounce-head .icon { width: 13px; height: 13px; color: var(--coral-deep); }
.pronounce-head small { font-size: 8.5px; color: var(--faint); }
.pronounce-result { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 9.5px; color: var(--faint); line-height: 1.5; min-height: 20px; }
.pronounce-result.is-listening { color: var(--coral-deep); }
.listen-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: pulse 1.2s infinite; flex: none; }
.pronounce-result.is-great { color: #2F7757; }
.pronounce-result.is-good { color: #8A6623; }
.pronounce-result.is-try { color: var(--coral-deep); }
.pronounce-result.is-warn { color: var(--coral-deep); }
.pronounce-score { flex: none; display: flex; flex-direction: column; align-items: center; }
.pronounce-score strong { font-size: 27px; line-height: 1; font-family: var(--serif); font-weight: 500; }
.pronounce-score span { font-size: 7px; color: var(--faint); margin-top: 2px; }
.pronounce-copy { flex: 1; }
.pronounce-copy p { font-size: 9.5px; color: var(--ink-2); }
.pronounce-copy small { display: block; color: var(--faint); margin-top: 3px; }
.pronounce-bar { display: block; height: 3px; background: var(--surface-3); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.pronounce-bar i { display: block; height: 100%; background: var(--mint-deep); border-radius: 99px; }
.note-field { display: block; margin-top: 15px; }
.note-field > span { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 650; margin-bottom: 6px; }
.note-field > span .icon { width: 13px; height: 13px; color: var(--muted); }
.note-field > span small { margin-left: auto; font-size: 8px; color: var(--faint); font-weight: 400; }
.note-field textarea { width: 100%; resize: vertical; min-height: 58px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 9px 11px; font-size: 10.5px; line-height: 1.6; outline: none; }
.note-field textarea:focus { border-color: var(--coral); background: var(--surface); box-shadow: 0 0 0 3px rgba(241, 105, 92, .07); }
.wd-actions { display: flex; gap: 8px; margin-top: 16px; }
.wd-actions .btn { flex: 1; height: 40px; font-size: 11.5px; }
.wd-meta { display: flex; gap: 13px; margin-top: 13px; font-size: 8.5px; color: var(--faint); }
.wd-meta span + span::before { content: "·"; margin-right: 13px; }

.settings-modal { width: min(620px, 100%); }
.settings-panel { padding: 32px 33px 26px; }
.settings-head h2 { font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -.03em; }
.settings-head p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.settings-group { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.settings-group h3 { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 6px; }
.settings-group h3 .icon { width: 15px; height: 15px; color: var(--coral-deep); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row > div:first-child { min-width: 0; }
.setting-row strong { display: block; font-size: 11.5px; font-weight: 600; }
.setting-row small { display: block; font-size: 9px; color: var(--faint); margin-top: 2px; line-height: 1.4; }
.setting-row.danger strong { color: var(--coral-deep); }
.text-input { height: 37px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 0 10px; font-size: 11px; outline: none; min-width: 150px; }
.text-input:focus { border-color: var(--coral); background: var(--surface); }
.text-input.select { max-width: 260px; min-width: 210px; cursor: pointer; }
.range-wrap { display: flex; align-items: center; gap: 10px; flex: none; }
input[type="range"] {
  width: 150px; height: 5px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--surface-3); border-radius: 99px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--coral); border: 2px solid var(--surface); box-shadow: 0 1px 5px rgba(24, 48, 45, .28); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--coral); border: 2px solid var(--surface);
  box-shadow: 0 1px 5px rgba(24, 48, 45, .28); cursor: pointer;
}
input[type="range"]::-moz-range-track { height: 5px; background: var(--surface-3); border-radius: 99px; }
.range-wrap output { font-size: 10px; color: var(--muted); min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--line); border-radius: 99px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); left: 2px; top: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--coral); border-color: var(--coral); }
.switch input:checked + span::after { transform: translateX(17px); }
.voice-wrap { display: flex; gap: 6px; align-items: center; flex: none; }
.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; padding-top: 6px; }
.shortcut-grid span { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.shortcut-grid kbd { min-width: 18px; text-align: center; }
.settings-foot { text-align: center; font-size: 8.5px; color: var(--faint); margin-top: 22px; }

/* ---------------- Toast / confetti ---------------- */
.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; max-width: 350px; padding: 12px 15px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 22px 50px -22px rgba(18, 48, 45, .55); transform: translateY(10px); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.toast.is-in { transform: none; opacity: 1; }
.toast-icon { width: 28px; height: 28px; flex: none; background: var(--surface-2); border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.toast-copy { display: flex; flex-direction: column; gap: 2px; }
.toast-copy strong { font-size: 11px; font-weight: 650; }
.toast-copy span { font-size: 9.5px; color: var(--muted); line-height: 1.4; }
.toast.achievement { background: linear-gradient(120deg, var(--gold-soft), var(--surface) 75%); border-color: rgba(240, 188, 94, .35); }
.toast.warn { border-color: rgba(241, 105, 92, .3); }
.confetti-canvas { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

/* ---------------- Animations ---------------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes revealIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes matchedPop { 0% { transform: scale(1); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 22% { transform: translateX(-6px); } 44% { transform: translateX(5px); } 66% { transform: translateX(-3px); } 84% { transform: translateX(2px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  :root { --nav-w: 226px; }
  .sidebar { padding-inline: 14px; }
  .hero { padding: 34px 34px; }
  .hero h1 { font-size: clamp(35px, 4.4vw, 52px); }
  .word-grid { grid-template-columns: repeat(auto-fill, minmax(202px, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .game-copy h2 { font-size: 20px; }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { height: 78px; }
  .brand-mobile { display: flex; align-items: center; gap: 9px; flex: none; }
  .brand-mobile img { border-radius: 10px; }
  .brand-mobile strong { font-size: 17px; letter-spacing: .03em; }
  .topbar-title { display: none; }
  .view { padding-bottom: 100px; }
  .site-foot { display: none; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(22px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--faint); font-size: 9px; padding: 5px 2px; border-radius: 10px; position: relative; }
  .mobile-nav a .icon { width: 20px; height: 20px; }
  .mobile-nav a small { font-size: 8.5px; letter-spacing: .02em; }
  .mobile-nav a.is-active { color: var(--coral-deep); }
  .mobile-nav a.is-active::before { content: ""; position: absolute; top: 0; width: 16px; height: 2px; border-radius: 2px; background: var(--coral); }
  .dash-grid, .stats-grid-2, .stats-grid-2.lower { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card:last-child { grid-column: span 2; flex-direction: row; }
  .game-card:last-child .game-visual { width: 38%; height: auto; min-height: 170px; }
  .game-card:last-child .game-copy { flex: 1; }
  .level-banner { grid-template-columns: 68px minmax(0, 1fr) auto; }
  .level-side:last-child { display: none; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 30px 28px 28px; }
  .hero-art { justify-content: flex-start; margin-top: 6px; }
  .hero-halo { right: auto; left: 10%; }
  .wotd-card { max-width: 300px; }
  .hero h1 { font-size: clamp(34px, 8vw, 50px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .setup-hero { grid-template-columns: 1fr; }
  .setup-art { min-height: 250px; }
  .setup-copy { padding: 28px 26px 30px; }
  .match-board { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .match-card { aspect-ratio: 1.1 / 1; }
  .game-card:last-child { flex-direction: column; }
  .game-card:last-child .game-visual { width: 100%; min-height: 150px; }
  .style-grid { grid-template-columns: 1fr; }
  .word-modal .word-detail { grid-template-columns: 1fr; }
  .wd-media { min-height: 290px; max-height: 320px; }
  .wd-body { padding: 25px 25px 24px; }
  .modal { max-height: calc(100vh - 24px); }
  .stats-grid-2 { gap: 12px; }
}

@media (max-width: 700px) {
  .topbar { height: 66px; padding-inline: 16px; gap: 10px; }
  .topbar-actions { gap: 7px; }
  .global-search { display: none; }
  .topbar::after { left: 16px; right: 16px; }
  .streak-pill { height: 38px; padding: 0 9px; }
  .streak-pill span { display: none; }
  .avatar { width: 38px; height: 38px; font-size: 16px; }
  .top-settings { display: inline-grid; width: 38px; height: 38px; }
  .view { padding: 18px 15px 92px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .page-head h1 { font-size: 34px; }
  .page-head p { font-size: 12px; }
  .hero { padding: 27px 22px 25px; border-radius: 26px; }
  .hero h1 { margin-top: 17px; }
  .hero-sub { font-size: 12.5px; }
  .hero-actions .btn { flex: 1; padding: 0 12px; font-size: 12.5px; }
  .hero-progress { margin-top: 24px; }
  .wotd-card { max-width: 100%; transform: none; }
  .wotd-body h3 { font-size: 27px; }
  .stats-grid { gap: 9px; margin: 12px 0; }
  .stat-card { padding: 13px; grid-template-columns: 34px minmax(0, 1fr); column-gap: 9px; border-radius: 17px; }
  .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 10.5px; }
  .stat-note { display: none; }
  .card { padding: 19px; border-radius: 22px; }
  .card-head h2 { font-size: 18px; }
  .dash-grid { gap: 12px; }
  .due-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  .due-img { width: 42px; height: 42px; }
  .due-arrow { display: none; }
  .due-time { font-size: 8.5px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-tile { padding: 10px 11px; }
  .core-banner { padding: 12px; }
  .core-banner-progress { display: none; }
  .core-banner-copy small { line-height: 1.45; }
  .tip-banner { align-items: flex-start; flex-wrap: wrap; padding: 14px 15px; }
  .tip-banner .text-btn { margin-left: 56px; }
  .review-empty { flex-wrap: wrap; }
  .review-empty .btn { margin-left: 56px; }
  .library-toolbar { padding: 11px; gap: 10px; }
  .status-chips { gap: 4px; }
  .chip { height: 31px; padding: 0 9px; font-size: 10.5px; }
  .cat-chips { gap: 5px; }
  .cat-chip { height: 31px; padding: 0 9px; font-size: 10.5px; }
  .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wc-body { padding: 10px 11px 11px; }
  .wc-title h3 { font-size: 19px; }
  .wc-meaning { font-size: 10.5px; min-height: 30px; }
  .wc-foot { margin-top: 8px; padding-top: 8px; }
  .badge { font-size: 8.5px; padding: 0 6px; height: 19px; }
  .cat-label { font-size: 8.5px; }
  .wc-speak { opacity: 1; transform: none; }
  .learn-explain { grid-template-columns: 1fr; gap: 9px; margin-top: 18px; }
  .explain-item { padding-top: 9px; }
  .explain-item p { font-size: 10.5px; }
  .study-top, .quiz-top { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
  .study-top .icon-btn, .quiz-top .icon-btn { width: 36px; height: 36px; }
  .study-media { height: 220px; }
  .study-body { padding: 20px 20px 23px; }
  .study-wordline h1 { font-size: 42px; }
  .study-ipa { font-size: 10.5px; }
  .reveal-meaning { font-size: 19px; }
  .example { font-size: 14px; }
  .study-page { padding-bottom: 116px; }
  .study-page .rating-grid {
    position: fixed; left: 10px; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 58;
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 6px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
    border-radius: 16px; box-shadow: 0 20px 46px -18px rgba(18, 48, 45, .5); backdrop-filter: blur(16px);
  }
  .study-page .rate-btn { padding: 8px 2px; border-radius: 11px; background: var(--surface); }
  .study-page .rate-top { font-size: 10.5px; gap: 3px; }
  .study-page .rate-top .icon { width: 13px; height: 13px; }
  .study-page .rate-btn small { font-size: 7.5px; }
  .study-foot-hint { display: none; }
  .reveal-btn kbd { display: none; }
  .quiz-helper { display: none; }
  .wd-star { top: auto; bottom: 15px; right: 15px; }
  body[data-page="learn"] .toast-root, body[data-page="quiz"] .toast-root { bottom: calc(154px + env(safe-area-inset-bottom)); }
  .study-card { border-radius: 22px; }
  .quiz-modes { grid-template-columns: 1fr; gap: 9px; }
  .quiz-mode { padding: 14px; gap: 11px; }
  .mode-icon { width: 42px; height: 42px; }
  .quiz-config { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .config-right { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .config-big { font-size: 30px; }
  .quiz-tips { grid-template-columns: 1fr; }
  .quiz-card-inner { padding: 26px 18px 18px; }
  .quiz-options { padding: 0 18px 20px; grid-template-columns: 1fr; gap: 7px; }
  .answer-panel { margin: 0 18px 22px; }
  .q-word { font-size: 45px; }
  .q-meaning { font-size: 25px; }
  .spell-head { padding: 22px 18px 8px; }
  .letter-slots { padding-inline: 16px; gap: 3px; }
  .slot { width: 21px; height: 30px; font-size: 16px; }
  .spell-input { width: calc(100% - 36px); font-size: 23px; }
  .spell-feedback { margin-inline: 18px; }
  .spell-actions { padding: 16px 18px 24px; }
  .spell-actions .btn { flex: 1; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card:last-child { grid-column: auto; }
  .game-card { flex-direction: row; }
  .game-visual { width: 38%; min-height: 165px; height: auto; flex: none; }
  .game-copy { flex: 1; padding: 16px; }
  .game-copy h2 { font-size: 20px; }
  .game-copy > p { font-size: 10px; }
  .game-meta { margin: 9px 0 11px; }
  .game-tip { align-items: flex-start; }
  .match-top { grid-template-columns: 36px minmax(0, 1fr); }
  .match-stats { grid-column: 1 / 3; justify-content: flex-start; margin-top: -3px; }
  .match-hint { margin-left: 0; }
  .match-board { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .match-card { aspect-ratio: 1 / 1; }
  .match-front i { font-size: 20px; }
  .match-back.is-word { font-size: 16px; }
  .match-back.is-meaning { font-size: 10.5px; }
  .match-result { flex-wrap: wrap; gap: 12px; }
  .match-result-actions { width: 100%; }
  .match-result-actions .btn { flex: 1; }
  .level-banner { grid-template-columns: 58px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .level-orb { width: 56px; height: 56px; }
  .level-orb strong { font-size: 23px; }
  .level-side { display: none; }
  .level-line h2 { font-size: 17px; }
  .summary-card { padding: 28px 17px 24px; }
  .summary-stats { gap: 23px; }
  .summary-stats strong { font-size: 20px; }
  .summary-row { grid-template-columns: 92px 44px minmax(0, 1fr); }
  .summary-actions .btn { flex: 1; min-width: 120px; }
  .trend-chart { height: 150px; }
  .mastery-body { flex-direction: column; gap: 14px; }
  .donut { width: 138px; height: 138px; }
  .legend { width: 100%; }
  .achievement-grid { grid-template-columns: 1fr; }
  .data-strip { align-items: flex-start; flex-direction: column; gap: 14px; }
  .data-actions { width: 100%; }
  .data-actions .btn { flex: 1; }
  .match-stats span { padding: 5px 6px; font-size: 8.5px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 93vh; border-radius: 24px 24px 0 0; }
  .word-detail { grid-template-columns: 1fr; }
  .wd-media { min-height: 230px; max-height: 250px; }
  .wd-body { padding: 21px 20px 24px; }
  .wd-wordline h2 { font-size: 38px; }
  .wd-meaning { font-size: 15px; }
  .settings-panel { padding: 27px 20px 26px; }
  .setting-row { gap: 12px; }
  .setting-row small { max-width: 160px; }
  .range-wrap input { width: 100px; }
  .voice-wrap { flex-direction: column; align-items: flex-end; }
  .text-input.select { min-width: 160px; max-width: 180px; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .toast-root { right: 12px; left: 12px; bottom: 84px; align-items: stretch; }
  .toast { max-width: none; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 35px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav a small { font-size: 7.5px; }
  .mobile-nav a .icon { width: 18px; height: 18px; }
  .word-grid { grid-template-columns: 1fr; }
  .wc-meaning { min-height: 0; }
  .setup-copy h1 { font-size: 30px; }
  .study-media { height: 190px; }
  .game-card { flex-direction: column; }
  .game-visual { width: 100%; min-height: 135px; }
  .summary-stats { gap: 16px; }
  .q-word { font-size: 40px; }
  .letter-slots { gap: 2px; }
  .slot { width: 18px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
