:root {
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
  --radius: 22px;
  --radius-sm: 14px;
  --pattern-size: 20px 20px;
  --pattern: radial-gradient(var(--pattern-dot) 1.4px, transparent 1.5px);
  --tape: rgba(249, 115, 98, .2);
  --hero-ink: #fff;
  --ok: #1f9d76;
}

/* 奶油布丁（默认） */
html, html[data-theme="cream"] {
  --bg: #fdf6ec;
  --bg-2: #f8eddd;
  --card: #fffdf9;
  --ink: #3d2f28;
  --ink-2: #5b4a40;
  --muted: #97847a;
  --line: #f1e2d3;
  --line-2: #f8eee3;
  --brand: #f97362;
  --brand-2: #d84f3a;
  --brand-soft: #ffe7e0;
  --mint: #2fae8a;
  --mint-soft: #e1f7ee;
  --sun: #eda52f;
  --sun-soft: #fff1d9;
  --rose: #e45757;
  --rose-soft: #ffe6e3;
  --sky: #4aa8e0;
  --shadow: 0 2px 0 rgba(180, 120, 90, .05), 0 12px 30px rgba(180, 120, 90, .10);
  --shadow-lg: 0 24px 54px rgba(180, 120, 90, .18);
  --hero-a: #ff9d7a;
  --hero-b: #f472a6;
  --hero-c: #8b5cf6;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(249, 115, 98, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(237, 165, 47, .14), transparent 58%);
  --pattern-dot: rgba(190, 120, 90, .14);
  --tape: rgba(249, 115, 98, .22);
}

/* 蜜桃乌龙 */
html[data-theme="peach"] {
  --bg: #fff2f6;
  --bg-2: #ffe6ee;
  --card: #fffafc;
  --ink: #4a2b36;
  --ink-2: #6b4150;
  --muted: #a07a87;
  --line: #f7dde6;
  --line-2: #fdebf1;
  --brand: #f45d8c;
  --brand-2: #d63a6e;
  --brand-soft: #ffe3ec;
  --mint: #35b59a;
  --mint-soft: #e2f8f2;
  --sun: #f3a53b;
  --sun-soft: #fff0da;
  --rose: #e5486b;
  --rose-soft: #ffe4ea;
  --sky: #5aa9e6;
  --shadow: 0 2px 0 rgba(214, 58, 110, .05), 0 12px 30px rgba(214, 58, 110, .10);
  --shadow-lg: 0 24px 54px rgba(214, 58, 110, .18);
  --hero-a: #ff9ec4;
  --hero-b: #f45d8c;
  --hero-c: #a78bfa;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(244, 93, 140, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(167, 139, 250, .14), transparent 58%);
  --pattern-dot: rgba(214, 58, 110, .13);
  --tape: rgba(244, 93, 140, .22);
}

/* 薄荷苏打 */
html[data-theme="mint"] {
  --bg: #eefaf4;
  --bg-2: #e0f6ec;
  --card: #fbfffd;
  --ink: #1f3b33;
  --ink-2: #33594e;
  --muted: #6f958a;
  --line: #d8f0e7;
  --line-2: #e9f9f2;
  --brand: #22b98a;
  --brand-2: #0f8a63;
  --brand-soft: #d9f7ea;
  --mint: #22b98a;
  --mint-soft: #d9f7ea;
  --sun: #f2b13c;
  --sun-soft: #fff3d6;
  --rose: #e76565;
  --rose-soft: #ffe5e5;
  --sky: #35a8d8;
  --shadow: 0 2px 0 rgba(15, 138, 99, .05), 0 12px 30px rgba(15, 138, 99, .10);
  --shadow-lg: 0 24px 54px rgba(15, 138, 99, .18);
  --hero-a: #4ade80;
  --hero-b: #14b8a6;
  --hero-c: #0ea5e9;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(34, 185, 138, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(56, 189, 248, .14), transparent 58%);
  --pattern-dot: rgba(15, 138, 99, .13);
  --tape: rgba(34, 185, 138, .22);
}

/* 蓝莓气泡 */
html[data-theme="berry"] {
  --bg: #f2f3ff;
  --bg-2: #e8e9ff;
  --card: #ffffff;
  --ink: #2b2a4a;
  --ink-2: #47456b;
  --muted: #7f7d9e;
  --line: #e2e1f6;
  --line-2: #f0efff;
  --brand: #6c63ff;
  --brand-2: #4f46e5;
  --brand-soft: #e9e7ff;
  --mint: #2fbf9a;
  --mint-soft: #e0f8f1;
  --sun: #f0a52e;
  --sun-soft: #fff2d8;
  --rose: #e75870;
  --rose-soft: #ffe4e9;
  --sky: #38bdf8;
  --shadow: 0 2px 0 rgba(79, 70, 229, .05), 0 12px 30px rgba(79, 70, 229, .10);
  --shadow-lg: 0 24px 54px rgba(79, 70, 229, .18);
  --hero-a: #6366f1;
  --hero-b: #8b5cf6;
  --hero-c: #38bdf8;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(108, 99, 255, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(56, 189, 248, .14), transparent 58%);
  --pattern-dot: rgba(79, 70, 229, .13);
  --tape: rgba(108, 99, 255, .2);
}

/* 柠檬汽水 */
html[data-theme="lemon"] {
  --bg: #fffaeb;
  --bg-2: #fff2cc;
  --card: #fffdf6;
  --ink: #46351a;
  --ink-2: #644c27;
  --muted: #9c8455;
  --line: #f6e6bf;
  --line-2: #fdf4dc;
  --brand: #eea100;
  --brand-2: #b97700;
  --brand-soft: #fff0c2;
  --mint: #37ac78;
  --mint-soft: #e0f7ea;
  --sun: #f59e0b;
  --sun-soft: #fff1c9;
  --rose: #e2624d;
  --rose-soft: #ffe5df;
  --sky: #3fa7d6;
  --shadow: 0 2px 0 rgba(185, 119, 0, .06), 0 12px 30px rgba(185, 119, 0, .10);
  --shadow-lg: 0 24px 54px rgba(185, 119, 0, .18);
  --hero-a: #fbbf24;
  --hero-b: #f59e0b;
  --hero-c: #f97316;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(238, 161, 0, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(249, 115, 22, .12), transparent 58%);
  --pattern-dot: rgba(185, 119, 0, .13);
  --tape: rgba(238, 161, 0, .22);
}

/* 夜空棉花�?*/
html[data-theme="night"] {
  --bg: #14131f;
  --bg-2: #0d0c14;
  --card: #1e1c2e;
  --ink: #f4f1ff;
  --ink-2: #d6d0ea;
  --muted: #9b93b8;
  --line: #2e2a44;
  --line-2: #262238;
  --brand: #b197fc;
  --brand-2: #d0bcff;
  --brand-soft: #2a2342;
  --mint: #4ade80;
  --mint-soft: #173326;
  --sun: #fbbf24;
  --sun-soft: #33280f;
  --rose: #fb7185;
  --rose-soft: #3a1a24;
  --sky: #38bdf8;
  --shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 12px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 54px rgba(0, 0, 0, .55);
  --hero-a: #6d28d9;
  --hero-b: #a855f7;
  --hero-c: #f472b6;
  --glow-a: radial-gradient(1100px 560px at 8% -10%, rgba(177, 151, 252, .16), transparent 62%);
  --glow-b: radial-gradient(900px 520px at 96% 0%, rgba(244, 114, 182, .10), transparent 58%);
  --pattern-dot: rgba(177, 151, 252, .18);
  --tape: rgba(177, 151, 252, .2);
}

html[data-radius="soft"] { --radius: 24px; --radius-sm: 16px; }
html[data-radius="crisp"] { --radius: 12px; --radius-sm: 8px; }

html[data-pattern="dots"] { --pattern: radial-gradient(var(--pattern-dot) 1.4px, transparent 1.5px); --pattern-size: 20px 20px; }
html[data-pattern="grid"] {
  --pattern: linear-gradient(var(--pattern-dot) 1px, transparent 1px), linear-gradient(90deg, var(--pattern-dot) 1px, transparent 1px);
  --pattern-size: 28px 28px;
}
html[data-pattern="none"] { --pattern: none; --pattern-size: auto; }

html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--glow-a), var(--glow-b), var(--pattern);
  background-size: auto, auto, var(--pattern-size);
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand); color: #fff; }

#app { min-height: 100%; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 14px; letter-spacing: 2px; }

/* ---------------- 通用 ---------------- */
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.btn {
  --btn-bg: var(--brand); --btn-ink: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 20px;
  background: var(--btn-bg); color: var(--btn-ink);
  font-size: 14px; font-weight: 650; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  box-shadow: 0 6px 16px rgba(91, 91, 214, .24);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--line-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand-2); box-shadow: none; }
.btn.mint { --btn-bg: var(--mint); box-shadow: 0 6px 16px rgba(16, 185, 129, .25); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--line-2); color: var(--muted); white-space: nowrap;
}
.badge.brand { background: var(--brand-soft); color: var(--brand-2); }
.badge.mint { background: var(--mint-soft); color: #0a7a58; }
.badge.sun { background: var(--sun-soft); color: #9a6200; }
[data-theme="night"] .badge.mint { color: #5ee0b0; }
[data-theme="night"] .badge.sun { color: #ffce7a; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.progress { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--hero-c)); background-size: 200% 100%; animation: barShine 4s linear infinite; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.progress.mint > i { background: linear-gradient(90deg, var(--mint), #34d399); }

/* ---------------- 顶部导航 ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.topnav .inner { height: 64px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: .3px; }
.logo .mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--hero-c)); color: #fff; font-size: 17px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent);
}
.logo small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 1.4px; }
.navlinks { display: flex; gap: 4px; margin-left: 8px; }
.navlinks a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); font-weight: 550; }
.navlinks a:hover { background: var(--line-2); }
.navlinks a.active { background: var(--brand-soft); color: var(--brand-2); }
.navright { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.streak-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--sun-soft); color: #9a6200; font-weight: 700; font-size: 13px; }
[data-theme="night"] .streak-chip { color: #ffce7a; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-2); font-weight: 800; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line);
}
.avatar-menu {
  position: absolute; right: 24px; top: 60px; z-index: 40; width: 210px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; animation: fadeUp .18s ease both;
}
.avatar-menu a, .avatar-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  background: none; border: 0; font-size: 13.5px; color: var(--ink-2); cursor: pointer; text-align: left;
}
.avatar-menu a:hover, .avatar-menu button:hover { background: var(--line-2); }
.avatar-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ---------------- 页面容器 ---------------- */
.page { padding: 34px 0 80px; animation: fadeUp .25s ease both; }
.page-head { margin-bottom: 22px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 6px; }
.page-sub { color: var(--muted); font-size: 14px; margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { font-size: 18px; margin: 0; letter-spacing: -.2px; }
.section-title a { font-size: 13px; color: var(--brand-2); font-weight: 600; }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.35fr .65fr; gap: 28px;
  padding: 34px 36px; border-radius: 28px; color: #fff;
  background: linear-gradient(125deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 135%);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--hero-b) 28%, transparent);
}
.hero::after {
  content: ""; position: absolute; inset: auto -80px -140px auto; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%);
}
.hero h1 { font-size: 30px; line-height: 1.28; margin: 10px 0 10px; letter-spacing: -.4px; }
.hero p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.7; max-width: 520px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #d9d6ff; }
.hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn { background: #fff; color: #3f37b8; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.hero .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.hero-stats { display: flex; flex-direction: column; gap: 12px; align-self: center; }
.glass {
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(8px);
}
.glass .k { font-size: 12px; color: rgba(255, 255, 255, .72); }
.glass .v { font-size: 22px; font-weight: 800; margin-top: 2px; letter-spacing: -.3px; }
.glass .v small { font-size: 12px; font-weight: 600; opacity: .7; margin-left: 3px; }

.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.stat-card { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-card .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card .v { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.6px; }
.stat-card .v small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.continue-card {
  display: flex; align-items: center; gap: 20px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.continue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.continue-cover { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: var(--brand-soft); flex-shrink: 0; }
.continue-card .meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---------------- 课程广场 ---------------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: .15s;
}
.chip:hover { border-color: #c9cbe0; }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.course-card {
  padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.course-top { display: flex; align-items: flex-start; gap: 12px; }
.course-cover { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--brand-soft); flex-shrink: 0; }
.course-name { font-weight: 750; font-size: 15.5px; letter-spacing: -.2px; line-height: 1.35; }
.course-sub { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; min-height: 40px; }
.course-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.course-foot .progress { flex: 1; }

/* ---------------- 课程详情 ---------------- */
.course-hero { display: flex; gap: 20px; align-items: flex-start; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.course-hero .course-cover { width: 74px; height: 74px; font-size: 38px; border-radius: 20px; }
.course-hero h1 { margin: 2px 0 8px; font-size: 23px; letter-spacing: -.4px; }
.course-hero .desc { color: var(--muted); font-size: 13.5px; line-height: 1.65; max-width: 640px; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.mode-card {
  padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  cursor: pointer; transition: .18s; display: flex; gap: 11px; align-items: flex-start;
}
.mode-card:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.mode-card .ico { font-size: 20px; line-height: 1; }
.mode-card b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.mode-card span { font-size: 11.5px; color: var(--muted); line-height: 1.5; display: block; }

.unit-list { display: flex; flex-direction: column; gap: 10px; }
.unit-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); transition: .15s;
}
.unit-row:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.unit-no { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--line-2); font-weight: 800; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.unit-row.done .unit-no { background: var(--mint-soft); color: #0a7a58; }
.unit-main { flex: 1; min-width: 0; }
.unit-title { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.unit-topic { font-size: 12px; color: var(--muted); margin-top: 3px; }
.unit-modes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mini-mode {
  border: 1px solid var(--line); background: transparent; border-radius: 8px; width: 30px; height: 30px;
  display: grid; place-items: center; font-size: 14px; cursor: pointer; transition: .15s; padding: 0;
}
.mini-mode:hover { background: var(--brand-soft); border-color: var(--brand); }

/* ---------------- 练习�?---------------- */
.practice { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.p-top { display: flex; align-items: center; gap: 14px; padding: 14px max(18px, calc((100vw - 1000px) / 2)); border-bottom: 1px solid var(--line); background: var(--card); }
.p-back { border: 1px solid var(--line); background: var(--card); width: 36px; height: 36px; border-radius: 11px; cursor: pointer; display: grid; place-items: center; font-size: 16px; color: var(--ink-2); }
.p-back:hover { background: var(--line-2); }
.p-crumb { font-size: 13px; color: var(--muted); line-height: 1.35; min-width: 0; }
.p-crumb b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 650; }
.p-modes { margin-left: auto; display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 12px; overflow-x: auto; max-width: 56vw; }
.p-modes button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.p-modes button.active { background: var(--card); color: var(--brand-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.p-dots { display: flex; gap: 5px; align-items: center; }
.p-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: block; }
.p-dots i.done { background: var(--mint); }
.p-dots i.cur { background: var(--brand); transform: scale(1.35); }
.p-dots i.err { background: var(--rose); }
.p-dots i.rev { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--sun, #e8b04b); }
.p-dots i.rev.done { background: var(--sun, #e8b04b); }
.rev-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #8a5a00; background: rgba(232, 176, 75, .16); border: 1px solid rgba(232, 176, 75, .35); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.fold { margin-top: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 4px 18px; }
.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; font-weight: 700; font-size: 15px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '▸'; color: var(--brand); margin-right: 8px; transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > .course-grid { padding: 4px 0 18px; }
.grade-stack { display: block; margin-bottom: 6px; }
.grade-fold { margin-top: 8px; padding: 2px 16px; }
.grade-fold > summary { justify-content: flex-start; gap: 6px; padding: 9px 2px; font-size: 14px; }
.grade-fold > summary > span:first-of-type { margin-right: auto; font-weight: 700; }
.grade-fold > summary > span:last-of-type { margin-left: auto; }
.grade-fold > summary::before { margin-right: 2px; font-size: 12px; }
.grade-fold > .course-grid { padding: 2px 0 14px; }
.mini-mode.challenge { color: var(--brand-2); background: rgba(178, 58, 47, .10); border-radius: 8px; }

.p-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 26px 20px 18px; }
.p-card { width: min(920px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 30px 34px 26px; position: relative; }
.p-card.eye-off .prompt-text { filter: blur(7px); }

.prompt { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 4px; }
.prompt-emoji { font-size: 42px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); flex-shrink: 0; }
.prompt-text { font-size: clamp(19px, 2.5vw, 25px); font-weight: 750; letter-spacing: -.3px; line-height: 1.55; }
.prompt-label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 6px; text-transform: uppercase; }
.prompt-tip { margin-top: 10px; font-size: 12.5px; color: var(--muted); background: var(--line-2); border-radius: 9px; padding: 7px 11px; display: inline-block; }

.answer { margin-top: 30px; min-height: 96px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 10px; }
.word {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 10px 6px; border-radius: 12px; border: 1px solid transparent; transition: background .2s, border-color .2s;
  position: relative;
}
.word.active { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.word.done { opacity: .95; }
.word .letters { display: flex; align-items: flex-end; font-family: var(--mono); font-weight: 700; font-size: clamp(21px, 3vw, 30px); line-height: 1.05; letter-spacing: .5px; }
.word .ch { display: inline-block; min-width: .56em; text-align: center; border-bottom: 2.5px solid var(--line); color: transparent; margin: 0 2px; transition: color .1s, border-color .1s; position: relative; }
.word .ch:not(.done):not(.fixed)::before { content: "·"; color: #c9ccd8; font-weight: 400; }
[data-theme="night"] .word .ch:not(.done):not(.fixed)::before { color: #3c4155; }
.word .ch.fixed { color: var(--muted); border-bottom-color: transparent; min-width: .3em; }
.word .ch.done { color: var(--ink); border-bottom-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.word.active .ch.next { border-bottom-color: var(--brand); animation: blink 1.1s step-end infinite; }
.word.err .ch.next { border-bottom-color: var(--rose); }
.word .zh-mini { font-size: 11.5px; color: var(--muted); min-height: 14px; line-height: 1.2; white-space: nowrap; }
.word .pos-mini { font-size: 10px; color: var(--brand-2); opacity: .8; }
.word.shake { animation: shake .3s ease; }

.p-hintline { margin-top: 18px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.p-hintline kbd { font-family: var(--mono); font-size: 11px; background: var(--line-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; }

.p-foot { width: min(920px, 100%); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 2px 0; }
.p-foot .tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.p-foot .tool:hover { background: var(--line-2); }
.p-foot .tool kbd { font-family: var(--mono); font-size: 10.5px; color: var(--muted); background: var(--line-2); border-radius: 4px; padding: 1px 4px; }
.p-foot .spacer { flex: 1; }
.p-foot .clock { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }

/* 拆句 */
.chunks { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.chunk-block { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); transition: .2s; }
.chunk-block.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.chunk-block.done { opacity: .72; }
.chunk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chunk-role { font-size: 11px; font-weight: 750; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.chunk-words { display: flex; flex-wrap: wrap; gap: 2px 6px; }

/* 拼图 */
.tiles { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; min-height: 54px; }
.tile {
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-family: var(--mono); font-size: 17px; font-weight: 700; cursor: pointer; transition: .15s;
  box-shadow: 0 2px 0 var(--line); user-select: none;
}
.tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.tile.used { opacity: .18; pointer-events: none; }
.tile.wrong { animation: shake .3s; border-color: var(--rose); color: var(--rose); }
.tile-slot { display: inline-block; min-width: 74px; border-bottom: 2px dashed var(--line); }
.puzzle-answer { display: flex; flex-wrap: wrap; gap: 9px; min-height: 50px; padding: 6px; border-radius: 12px; background: var(--line-2); }
.puzzle-answer .tile { background: var(--card); }

/* 打字 */
.typing-line { margin-top: 22px; font-family: var(--mono); font-size: clamp(18px, 2.6vw, 27px); line-height: 1.9; letter-spacing: .5px; }
.typing-line .tc { border-bottom: 2px solid transparent; }
.typing-line .tc.done { color: var(--ink); }
.typing-line .tc.pending { color: var(--muted); }
.typing-line .tc.next { background: var(--brand-soft); border-bottom-color: var(--brand); border-radius: 3px; }
.typing-line .tc.bad { color: var(--rose); text-decoration: line-through; }
.typing-line .tc.space { display: inline-block; width: .6em; }
.vkbd { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.vkbd .krow { display: flex; gap: 6px; }
.vkbd .key {
  width: 44px; height: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 650; color: var(--ink-2);
  box-shadow: 0 2px 0 var(--line); transition: .12s;
}
.vkbd .key.wide { width: 120px; }
.vkbd .key.hot { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(1px); box-shadow: none; }
.vkbd .key.pressed { transform: translateY(2px); box-shadow: none; }
.fingers { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.fingers i { display: inline-flex; align-items: center; gap: 5px; font-style: normal; }
.fingers b { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* 结果 / 弹层 */
.result { margin-top: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--line-2); padding: 16px 18px; display: flex; align-items: center; gap: 16px; animation: fadeUp .25s ease both; }
.result.ok { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 30%, transparent); }
.result.bad { background: var(--rose-soft); border-color: color-mix(in srgb, var(--rose) 30%, transparent); }
.result .big { font-size: 32px; }
.result .title { font-weight: 750; font-size: 15px; }
.result .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.result .acc { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.result-answer { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.result-answer b { font-family: var(--mono); }

.overlay { position: fixed; inset: 0; background: rgba(16, 17, 24, .5); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .2s ease both; }
.modal { width: min(520px, 100%); background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 26px; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2) both; }
.modal h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.3px; }
.modal p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; justify-content: flex-end; flex-wrap: wrap; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.big-stats div { background: var(--line-2); border-radius: 12px; padding: 12px; text-align: center; }
.big-stats b { display: block; font-size: 21px; letter-spacing: -.5px; }
.big-stats span { font-size: 11.5px; color: var(--muted); }

/* 听写 */
.dictation { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0 6px; }
.speaker-btn {
  width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(145deg, var(--brand), #7c3aed); color: #fff; font-size: 38px;
  display: grid; place-items: center; box-shadow: 0 16px 36px rgba(91, 91, 214, .35); transition: .2s;
}
.speaker-btn:hover { transform: scale(1.04); }
.speaker-btn:active { transform: scale(.97); }
.speaker-btn.playing { animation: pulse 1.2s infinite; }
.dictation .hint { font-size: 13px; color: var(--muted); }

/* 跟读 */
.mic-panel { margin-top: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 20px; }
.mic-panel .score { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.mic-panel .transcript { font-size: 14px; color: var(--ink-2); margin-top: 8px; min-height: 22px; }
.diff-word { display: inline-block; margin: 2px 3px; padding: 2px 7px; border-radius: 6px; font-family: var(--mono); font-size: 13px; }
.diff-word.ok { background: var(--mint-soft); color: #0a7a58; }
.diff-word.miss { background: var(--rose-soft); color: #b91c1c; text-decoration: line-through; }
.diff-word.extra { background: var(--sun-soft); color: #9a6200; text-decoration: underline wavy; }

/* ---------------- 统计 / 设置 ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 16px 18px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; height: 100%; }
.chart .bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #818cf8, var(--brand)); min-height: 3px; transition: height .5s ease; }
.chart .bar span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart .bar.today i { background: linear-gradient(180deg, #34d399, var(--mint)); }

.settings-card { padding: 20px 22px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .label { font-size: 14px; font-weight: 600; }
.setting-row .desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; transition: .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }
select, .input {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; outline: none; min-width: 120px;
}
select:focus, .input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------------- 登录 ---------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art {
  position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(150deg, var(--hero-a) 0%, var(--hero-b) 45%, var(--hero-c) 125%); color: #fff;
}
.auth-art h1 { font-size: 40px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -1px; }
.auth-art p { color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.8; max-width: 420px; margin: 0; }
.auth-art .demo { display: grid; gap: 10px; margin-top: 34px; max-width: 430px; }
.auth-art .demo .line { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: 13px; }
.auth-art .demo .line b { font-family: var(--mono); letter-spacing: 2px; }
.auth-art .demo .line .zh { color: rgba(255, 255, 255, .6); margin-left: auto; font-size: 12px; }
.auth-art .foot { font-size: 12px; color: rgba(255, 255, 255, .45); }
.auth-form { display: grid; place-items: center; padding: 40px; background: var(--card); }
.auth-box { width: min(380px, 100%); }
.auth-box h2 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.4px; }
.auth-box .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field input { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 11px; padding: 12px 14px; font-size: 14px; outline: none; transition: .15s; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--card); }
.auth-tabs { display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 11px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; font-size: 13.5px; font-weight: 650; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.auth-err { color: var(--rose); font-size: 12.5px; min-height: 18px; margin: 8px 0 4px; }

/* ---------------- 提示�?---------------- */
#toast-root { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.2) both; max-width: 86vw;
}
.toast.ok { background: #0f9d76; color: #fff; }
.toast.bad { background: #dc2626; color: #fff; }

/* ---------------- 动效 ---------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { border-color: var(--brand); } 50% { border-color: transparent; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(91, 91, 214, .5); } 70% { box-shadow: 0 0 0 22px rgba(91, 91, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 91, 214, 0); } }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(560deg); opacity: 0; } }

/* ---------------- 响应�?---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 26px; }
  .hero-stats { flex-direction: row; }
  .hero-stats .glass { flex: 1; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .navlinks { display: none; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 24px); }
  .today { grid-template-columns: 1fr; }
  .p-card { padding: 20px 16px; border-radius: 18px; }
  .p-top { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .p-crumb { flex: 1; min-width: 0; }
  .p-modes { order: 3; flex-basis: 100%; width: 100%; max-width: none; margin: 4px 0 0; justify-content: space-between; }
  .p-modes button { padding: 6px 9px; font-size: 11.5px; }
  .p-dots { margin-left: auto; }
  .p-hintline { display: none; }
  .p-foot { flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
  .p-foot .tool { flex-shrink: 0; }
  .p-foot .tool kbd { display: none; }
  .p-foot .spacer { display: none; }
  .p-foot .clock { margin-left: auto; flex-shrink: 0; padding-left: 6px; }
  .word { padding: 6px 6px 4px; }
  .answer { gap: 2px 4px; }
  .unit-modes { display: none; }
  .course-hero { flex-direction: column; }
  .course-hero .course-cover { width: 56px; height: 56px; font-size: 28px; }
  .chart .bar span { display: none; }
  .chart { gap: 4px; padding: 12px; }
  .vkbd .key { width: 32px; height: 36px; font-size: 11px; }
  .vkbd .key.wide { width: 86px; }
  .big-stats { grid-template-columns: 1fr 1fr 1fr; }
  .avatar-menu { right: 12px; }
}
@media (max-width: 520px) {
  .auth-form { padding: 24px; }
  .hero h1 { font-size: 24px; }
  .page-title { font-size: 23px; }
  .p-top .p-crumb b { font-size: 12px; }
  .p-dots { display: none; }
  .stat-card .v { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================
   可爱装饰与主题页
   ================================================================ */
.logo .mark { transition: transform .3s cubic-bezier(.2, 1.6, .4, 1); }
.logo:hover .mark { transform: rotate(-9deg) scale(1.08); }

.btn {
  box-shadow: 0 4px 0 rgba(0, 0, 0, .10), 0 10px 22px color-mix(in srgb, var(--btn-bg) 26%, transparent);
}
.btn:hover { transform: translateY(-2px) rotate(-.6deg); }
.btn:active { transform: translateY(2px) scale(.99); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn.ghost, .btn.soft { box-shadow: none; }
.btn.ghost:hover, .btn.soft:hover { transform: translateY(-2px) rotate(-.6deg); }

.hero { border: 1px solid rgba(255, 255, 255, .18); }
.hero .spark {
  position: absolute; font-size: 17px; opacity: .9; pointer-events: none;
  animation: floaty 4.6s ease-in-out infinite; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12));
}
.hero .spark.s1 { top: 20px; right: 34%; animation-delay: .2s; }
.hero .spark.s2 { bottom: 20px; left: 46%; font-size: 13px; animation-delay: 1.3s; }
.hero .spark.s3 { top: 46%; right: 12px; font-size: 14px; animation-delay: .8s; }

.hero-mascot {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 18px;
  padding: 5px 15px 5px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px); font-size: 12.5px; color: #fff; width: fit-content;
}
.hero-mascot .face {
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; font-size: 17px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16); animation: bobbing 3.2s ease-in-out infinite;
}

.auth-art .spark { position: absolute; font-size: 22px; opacity: .7; animation: floaty 5s ease-in-out infinite; }
.auth-art .spark.s1 { top: 14%; right: 12%; }
.auth-art .spark.s2 { bottom: 22%; right: 20%; font-size: 16px; animation-delay: 1.1s; }
.auth-art .spark.s3 { top: 40%; left: 6%; font-size: 15px; animation-delay: .6s; }

.section-title h2::before { content: "✦"; color: var(--brand); margin-right: 7px; font-size: 14px; display: inline-block; transform: translateY(-1px); }

.card, .stat-card, .continue-card, .unit-row, .mode-card, .theme-card, .sound-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.course-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.stat-card:hover { transform: translateY(-2px); }
.continue-card:hover { transform: translateY(-3px) rotate(-.3deg); }
.mode-card:hover { transform: translateY(-2px) rotate(-.4deg); }

.progress > i {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px),
    linear-gradient(90deg, var(--brand), var(--hero-c));
  background-size: 24px 100%, 200% 100%;
  animation: barMove 1.4s linear infinite, barShine 5s linear infinite;
}

.badge { border: 1px solid transparent; }
.badge.brand { border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.badge.mint { border-color: color-mix(in srgb, var(--mint) 26%, transparent); }

.prompt-emoji {
  width: 64px; height: 64px; border-radius: 22px; background: var(--sun-soft);
  border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 34px; transform: rotate(-5deg); box-shadow: 0 4px 0 var(--line);
  filter: none;
}
.p-card { border-width: 1.5px; }
.p-card::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 96px; height: 20px;
  transform: translateX(-50%) rotate(-2.4deg); border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--tape) 0 7px, transparent 7px 14px);
  opacity: .95; pointer-events: none;
}
.word.active {
  transform: translateY(-2px);
  border-style: dashed;
  box-shadow: 0 4px 0 var(--brand-soft);
}
.word.done .letters { animation: popIn .2s ease; }
.unit-no { transform: rotate(-3deg); }
.unit-row.done .unit-no { transform: rotate(0); }

.result .big { font-size: 36px; }
.mic-panel { border-width: 1.5px; }

/* 主题 / 声音设置页 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.theme-card {
  position: relative; text-align: left; cursor: pointer; padding: 12px;
  border: 2px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink);
}
.theme-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow); }
.theme-card.active { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.theme-card .mini {
  position: relative; height: 74px; border-radius: 12px; overflow: hidden; margin-bottom: 10px;
  border: 1px solid rgba(0, 0, 0, .05);
}
.theme-card .mini .m-card {
  position: absolute; left: 10px; right: 10px; top: 26px; height: 40px;
  border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
}
.theme-card .mini .m-dot { width: 14px; height: 14px; border-radius: 50%; }
.theme-card .mini .m-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.theme-card .mini .m-line { height: 4px; border-radius: 3px; background: #e9e9ef; }
.theme-card .mini .m-line.short { width: 55%; }
.theme-card .t-name { font-weight: 750; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.theme-card .t-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.theme-card .t-check {
  position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; display: none; place-items: center; font-size: 12px;
}
.theme-card.active .t-check { display: grid; }

.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 10px; }
.sound-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 13px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink);
  text-align: left;
}
.sound-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-2px); }
.sound-card.active { border-color: var(--brand); background: var(--brand-soft); }
.sound-card .s-emoji { font-size: 22px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--line-2); flex-shrink: 0; }
.sound-card.active .s-emoji { background: var(--card); }
.sound-card .s-name { font-weight: 700; font-size: 13.5px; }
.sound-card .s-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sound-card .s-play {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
}
.sound-card .s-play:hover { border-color: var(--brand); color: var(--brand-2); }

.seg { display: flex; gap: 5px; background: var(--line-2); padding: 4px; border-radius: 13px; }
.seg button {
  border: 0; background: transparent; padding: 8px 15px; border-radius: 9px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 650;
}
.seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
input[type="range"] { accent-color: var(--brand); }

.preview-wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; align-items: stretch; }
.preview-card {
  position: relative; padding: 20px 22px; border-radius: 22px; background: var(--card);
  border: 2px solid var(--line); box-shadow: var(--shadow);
}
.preview-card::before {
  content: "试音区"; position: absolute; top: -10px; right: 18px; font-size: 11px; font-weight: 700;
  background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 10px;
}
.preview-card .pv-prompt { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.preview-card .pv-zh { font-size: 20px; font-weight: 800; margin: 6px 0 16px; }
.preview-card .pv-words { display: flex; gap: 9px; flex-wrap: wrap; font-family: var(--mono); font-size: 22px; font-weight: 700; }
.pv-word { padding: 5px 9px; border-bottom: 2.5px solid var(--line); border-radius: 9px 9px 4px 4px; }
.pv-word.active { background: var(--brand-soft); border-bottom-color: var(--brand); border-bottom-style: dashed; }
.pv-word.done { color: var(--brand-2); }
.preview-card .pv-tip { margin-top: 16px; font-size: 11.5px; color: var(--muted); }
.preview-side { display: flex; flex-direction: column; gap: 12px; }
.preview-side .box { padding: 16px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); }
.preview-side .box b { font-size: 13px; }
.preview-side .box p { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.preview-side .chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.preview-side .chips span { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }

@media (max-width: 860px) {
  .preview-wrap { grid-template-columns: 1fr; }
  .hero .spark { display: none; }
}
@media (max-width: 720px) {
  .p-card::before { width: 70px; height: 16px; top: -8px; }
  .prompt-emoji { width: 50px; height: 50px; font-size: 26px; border-radius: 16px; }
  .hero-mascot { font-size: 11.5px; }
  .theme-grid, .sound-grid { grid-template-columns: 1fr 1fr; }
  .theme-card .mini { height: 60px; }
}

@keyframes barMove { from { background-position: 0 0, 0 0; } to { background-position: 24px 0, 0 0; } }
@keyframes barShine { 0% { background-position: 0 0, 0 0; } 100% { background-position: 0 0, 200% 0; } }
@keyframes bobbing { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-9px) rotate(6deg); } }
@keyframes popIn { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* 主题卡与声音卡布局修正 */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sound-card .s-name, .sound-card .s-desc { display: block; }
.sound-card .s-name { font-weight: 700; font-size: 13.5px; }
.sound-card .s-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 720px) {
  .theme-grid { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   影视精听
   ================================================================ */
.video-note { display: flex; gap: 16px; padding: 20px 22px; align-items: flex-start; }
.video-note .vn-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--brand-soft); flex-shrink: 0; transform: rotate(-4deg); border: 2px solid var(--line); }
.video-note b { font-size: 14.5px; }
.video-note p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.video-note code, .import-steps code { background: var(--line-2); border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: 11.5px; }

.video-pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.video-pack-card {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--card);
  border: 1.5px solid var(--line); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.video-pack-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.vp-cover { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: var(--brand-soft); flex-shrink: 0; }
.vp-cover.big { width: 84px; height: 84px; font-size: 42px; border-radius: 24px; }
.vp-title { font-weight: 800; font-size: 16px; }
.vp-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.vp-desc { font-size: 12px; color: var(--muted); line-height: 1.65; margin-top: 8px; }

.video-pack-hero { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.video-pack-hero h1 { font-size: 22px; margin: 8px 0; letter-spacing: -.3px; }
.video-pack-hero p { margin: 0; font-size: 13px; line-height: 1.7; }

.clip-list { display: flex; flex-direction: column; gap: 9px; }
.clip-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 16px;
  background: var(--card); border: 1.5px solid var(--line); transition: .18s;
}
.clip-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateX(3px); }
.clip-row.done { background: color-mix(in srgb, var(--mint-soft) 40%, var(--card)); }
.clip-scene { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--sun-soft); flex-shrink: 0; }
.clip-title { font-weight: 700; font-size: 14px; }
.clip-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.clip-arrow { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-size: 12px; flex-shrink: 0; }

.video-practice { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.v-body { flex: 1; width: min(860px, 100%); margin: 0 auto; padding: 22px 18px 60px; }
.v-stage-wrap { position: relative; }
.v-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden;
  background: #101018; border: 2px solid var(--line); box-shadow: var(--shadow-lg);
}
.v-media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.v-scene {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(150deg, hsl(var(--scene-hue, 220) 88% 74%), hsl(calc(var(--scene-hue, 220) + 42) 82% 60%));
  color: #fff;
}
.v-scene::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .35), transparent 55%),
              radial-gradient(circle at 20% 85%, rgba(255, 255, 255, .22), transparent 50%);
  pointer-events: none;
}
.v-scene-emoji { font-size: clamp(46px, 9vw, 76px); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .22)); animation: bobbing 3.4s ease-in-out infinite; z-index: 1; }
.v-scene-title { font-size: 15px; font-weight: 750; letter-spacing: 1px; opacity: .95; z-index: 1; }
.v-wave { display: flex; align-items: center; gap: 4px; height: 34px; margin-top: 4px; opacity: .7; z-index: 1; }
.v-wave i { width: 4px; border-radius: 3px; background: rgba(255, 255, 255, .9); height: 12px; animation: waveBar 1.1s ease-in-out infinite; }
.v-wave i:nth-child(3n) { animation-delay: .18s; height: 22px; }
.v-wave i:nth-child(3n+1) { animation-delay: .34s; height: 16px; }
.v-wave i:nth-child(4n) { animation-delay: .5s; height: 26px; }
.v-scene audio { display: none; }

.v-sub {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  max-width: 86%; padding: 7px 14px; border-radius: 10px; background: rgba(10, 10, 16, .72);
  color: #fff; font-size: clamp(14px, 2vw, 18px); font-weight: 650; line-height: 1.45; text-align: center;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3; backdrop-filter: blur(3px);
}
.v-sub.show { opacity: 1; }
.v-bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: #1a1a22; font-size: 24px; z-index: 4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: opacity .2s, transform .2s;
}
.v-bigplay:hover { transform: translate(-50%, -50%) scale(1.06); }
.v-error {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: rgba(12, 12, 18, .86); color: #fff; font-size: 13px; text-align: center; padding: 20px; z-index: 5;
}
.v-error code { color: #ffb4a8; }
.v-error span { color: rgba(255, 255, 255, .65); font-size: 11.5px; }

.v-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.v-btn {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 650; cursor: pointer; transition: .15s;
}
.v-btn:hover { border-color: var(--brand); color: var(--brand-2); }
.v-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); }
.v-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.v-card { margin-top: 18px; padding: 22px 24px; border-radius: 22px; }
.v-prompt-label { font-size: 11.5px; font-weight: 750; letter-spacing: 1.5px; color: var(--muted); }
.v-zh { font-size: clamp(18px, 2.4vw, 23px); font-weight: 800; margin-top: 6px; letter-spacing: -.2px; }
.v-card .answer { margin-top: 22px; min-height: 84px; }
.v-card .p-hintline { margin-top: 16px; }

.import-steps { margin: 14px 0 6px; padding-left: 20px; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.import-steps li { margin-bottom: 6px; }

@media (max-width: 720px) {
  .video-pack-grid { grid-template-columns: 1fr; }
  .video-pack-hero { flex-direction: column; }
  .v-media { border-radius: 18px; }
  .v-body { padding: 14px 12px 40px; }
  .v-btn { padding: 7px 11px; font-size: 11.5px; }
  .v-card { padding: 18px 14px; }
  .v-count { width: 100%; text-align: right; margin-left: 0; }
  .video-note { flex-direction: column; }
}

@keyframes waveBar { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.3); } }

/* 音频场景：播放键放右下角，别挡住场景表情 */
.v-scene .v-bigplay { left: auto; right: 20px; bottom: 20px; top: auto; transform: none; width: 56px; height: 56px; font-size: 20px; }
.v-scene .v-bigplay:hover { transform: scale(1.06); }
.v-scene-emoji { font-size: clamp(56px, 11vw, 92px); }
.v-scene-title { font-size: 16px; margin-top: 2px; }

/* ================================================================
   中国风闯关
   ================================================================ */
.game-page {
  --paper: #f7f0dd;
  --paper-2: #efe2c6;
  --ink: #2f261b;
  --seal: #b23a2f;
  --gold: #b8892f;
  color: var(--ink);
  font-family: "STKaiti", "KaiTi", "Songti SC", "Noto Serif SC", serif;
  padding-bottom: 20px;
}
.game-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.game-title { margin: 0; font-size: 34px; letter-spacing: 8px; font-weight: 900; color: var(--ink); }
.game-title::after { content: "·"; color: var(--seal); margin-left: 8px; }
.game-sub { margin: 6px 0 0; font-size: 12.5px; color: #7b6a4f; font-family: var(--font); }
.game-coin { font-size: 13px; color: #7b6a4f; font-family: var(--font); }
.game-coin b { color: var(--seal); font-size: 18px; }

.game-hero {
  position: relative; display: flex; gap: 20px; align-items: flex-start; padding: 24px 28px;
  background:
    radial-gradient(500px 200px at 85% 10%, rgba(178, 58, 47, .10), transparent 70%),
    linear-gradient(135deg, #fbf6e7, #f1e4c6);
  border: 1px solid #d9c9a3; border-radius: 18px;
  box-shadow: inset 0 0 0 7px rgba(255, 253, 246, .55), 0 14px 34px rgba(90, 70, 40, .12);
  overflow: hidden;
}
.game-hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(178, 58, 47, .14);
  box-shadow: 0 0 0 18px rgba(178, 58, 47, .05), 0 0 0 42px rgba(178, 58, 47, .035);
  pointer-events: none;
}
.seal {
  position: absolute; right: 20px; top: 18px; width: 42px; height: 42px; border: 2px solid var(--seal);
  color: var(--seal); display: grid; place-items: center; font-size: 20px; font-weight: 800;
  border-radius: 6px; transform: rotate(6deg); opacity: .85; font-family: "STKaiti", serif;
}
.game-avatar {
  width: 96px; height: 96px; border-radius: 50%; background: #fffaf0; border: 2px solid #d9c9a3;
  display: grid; place-items: center; font-size: 46px; box-shadow: 0 8px 20px rgba(90, 70, 40, .14); flex-shrink: 0;
}
.realm-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.realm { font-size: 32px; font-weight: 900; letter-spacing: 5px; color: var(--seal); line-height: 1.1; }
.realm-name { font-size: 13px; color: #7b6a4f; }
.xp-track { height: 12px; background: #e6d7b6; border-radius: 999px; overflow: hidden; margin-top: 10px; border: 1px solid #d9c9a3; }
.xp-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b23a2f, #d98b3a); transition: width .5s; }
.xp-note { font-size: 11.5px; color: #8a7858; margin-top: 6px; font-family: var(--font); }
.attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 14px; max-width: 520px; }
.attr-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5e4f3a; font-family: var(--font); }
.attr-name { width: 34px; font-weight: 700; }
.attr-dots { display: flex; gap: 3px; }
.attr-dots i { width: 8px; height: 8px; border-radius: 2px; background: #e2d3b3; display: block; transform: rotate(45deg); }
.attr-dots i.on { background: var(--seal); }
.attr-val { font-size: 10.5px; color: #8a7858; }

.game-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.game-tab {
  border: 1px solid #d9c9a3; background: #fbf6e9; color: #6b5a40; padding: 7px 16px;
  border-radius: 999px; font-family: var(--font); font-size: 13px; cursor: pointer; transition: .15s;
}
.game-tab:hover { border-color: var(--seal); }
.game-tab.active { background: var(--seal); border-color: var(--seal); color: #fff; }

.scroll-card {
  display: flex; background: linear-gradient(180deg, #fbf6e9, #f4ead2);
  border: 1px solid #d9c9a3; border-radius: 14px; margin-bottom: 14px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(90, 70, 40, .08);
}
.scroll-side {
  width: 38px; background: var(--seal); color: #f8e9c8; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; letter-spacing: 4px; font-size: 12px; padding: 10px 0;
}
.scroll-body { flex: 1; padding: 16px 18px; min-width: 0; }
.scroll-head { display: flex; gap: 12px; align-items: center; }
.scroll-cover {
  width: 44px; height: 44px; border-radius: 10px; background: #f0e2c4; display: grid; place-items: center;
  font-size: 22px; border: 1px solid #d9c9a3; flex-shrink: 0;
}
.scroll-title { font-size: 18px; font-weight: 800; }
.scroll-meta { font-size: 11.5px; color: #8a7858; margin-top: 3px; font-family: var(--font); }
.scroll-head .btn { font-family: var(--font); }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 14px; }
.unit-node {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px;
  background: #fffdf6; border: 1px solid #e2d3b3; border-radius: 12px; text-align: center;
  transition: .18s; text-decoration: none; color: #3b2f1e; font-family: var(--font);
}
.unit-node:hover { transform: translateY(-3px); border-color: var(--seal); box-shadow: 0 8px 18px rgba(90, 70, 40, .12); }
.unit-node.cleared { background: linear-gradient(180deg, #fff8e6, #ffefc9); border-color: #d9b45b; }
.unit-node.locked { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }
.unit-node.locked:hover { transform: none; box-shadow: none; border-color: #e2d3b3; }
.unode {
  width: 34px; height: 34px; border-radius: 50%; background: #f0e2c4; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; border: 1px solid #d9c9a3;
}
.cleared .unode { background: var(--seal); color: #fff; border-color: var(--seal); }
.ustars { font-size: 12px; color: #c99a2e; letter-spacing: 1px; }
.utitle { font-size: 11.5px; line-height: 1.35; min-height: 31px; }
.umeta { font-size: 10px; color: #8a7858; }
.game-footnote { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: #8a7858; margin: 8px 0 30px; font-family: var(--font); }

/* ================================================================
   AI 学情
   ================================================================ */
.ai-hero { display: flex; gap: 20px; padding: 24px 26px; align-items: flex-start; }
.ai-orbit {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 36px;
  background: var(--brand-soft); flex-shrink: 0;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand-soft) 50%, transparent);
  animation: bobbing 3.6s ease-in-out infinite;
}
.ai-mistakes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ai-mistakes span { font-size: 11px; padding: 4px 9px; border-radius: 8px; background: var(--line-2); color: var(--ink-2); }
.ai-mistakes b { color: var(--brand-2); }
.ai-output { margin-top: 18px; }
.ai-report-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.ai-report-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 750; margin-bottom: 6px; }
.md h2 { font-size: 18px; margin: 20px 0 8px; letter-spacing: -.2px; }
.md h2:first-child { margin-top: 0; }
.md h3 { font-size: 15px; margin: 16px 0 6px; }
.md p { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.md blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--line-2); border-radius: 0 10px 10px 0; color: var(--ink-2); font-size: 13px; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; color: var(--brand-2); }
.ai-form { display: grid; grid-template-columns: 1.4fr 1.4fr .9fr auto; gap: 10px; align-items: end; }
.ai-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.ai-form .input { width: 100%; }
.ai-loading { font-size: 38px; animation: floaty 1.6s ease-in-out infinite; }

@media (max-width: 900px) {
  .game-hero { flex-direction: column; }
  .game-title { font-size: 28px; letter-spacing: 5px; }
  .attrs { grid-template-columns: 1fr; max-width: none; }
  .ai-form { grid-template-columns: 1fr 1fr; }
  .ai-hero { flex-direction: column; }
}
@media (max-width: 600px) {
  .game-head { flex-direction: column; align-items: flex-start; }
  .unit-grid { grid-template-columns: 1fr 1fr; }
  .scroll-side { width: 30px; font-size: 11px; }
  .ai-form { grid-template-columns: 1fr; }
  .game-avatar { width: 72px; height: 72px; font-size: 36px; }
  .realm { font-size: 26px; }
}

.game-head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .game-head-actions { justify-content: flex-start; }
}

/* ================================================================
   墨境战斗
   ================================================================ */
.battle-page {
  min-height: 100vh;
  color: #f6ecd8;
  --ink: #f6ecd8;
  --ink-2: #e4d6bd;
  --muted: #b9a98f;
  --line: #5b4a38;
  --line-2: #3a2f2a;
  --card: #241d26;
  --brand: #e8b04b;
  --brand-2: #f3c76b;
  --brand-soft: rgba(232, 176, 75, .16);
  --sun: #e8b04b;
  --rose: #e06a5a;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(232, 176, 75, .12), transparent 70%),
    radial-gradient(700px 500px at 10% 100%, rgba(90, 120, 130, .18), transparent 70%),
    linear-gradient(180deg, #17131d 0%, #221a26 55%, #2d2320 100%);
}
.battle-top { background: rgba(20, 16, 24, .82); border-bottom: 1px solid rgba(232, 176, 75, .18); color: #f6ecd8; }
.battle-top .p-back { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #f6ecd8; }
.battle-top .p-crumb b { color: #f6ecd8; }
.battle-top .p-crumb span { color: #b9a98f; }
.battle-combo { margin-left: auto; font-size: 13px; font-weight: 800; color: #e8b04b; letter-spacing: 1px; }
.battle-combo.hot { color: #ff9b6a; text-shadow: 0 0 12px rgba(255, 140, 80, .6); animation: pulse 1.2s infinite; }
.battle-turn { font-size: 12px; color: #b9a98f; }

.battle-body { width: min(900px, 100%); margin: 0 auto; padding: 18px 16px 60px; }
.battle-arena {
  position: relative; height: 330px; border-radius: 24px; overflow: hidden;
  border: 1px solid rgba(232, 176, 75, .22);
  background: linear-gradient(180deg, #1a1622 0%, #2a2030 55%, #3a2c24 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .5), 0 20px 50px rgba(0, 0, 0, .35);
}
.arena-moon {
  position: absolute; right: 12%; top: 10%; width: 86px; height: 86px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4d6, #e8c98a 60%, #b98a4a);
  box-shadow: 0 0 50px rgba(232, 200, 140, .35); opacity: .9;
}
.arena-hills {
  position: absolute; left: 0; right: 0; bottom: 0; height: 150px;
  background:
    radial-gradient(220px 110px at 18% 100%, #2e2a33 0 99%, transparent 100%),
    radial-gradient(300px 130px at 52% 100%, #262230 0 99%, transparent 100%),
    radial-gradient(240px 100px at 86% 100%, #302a30 0 99%, transparent 100%);
  opacity: .9;
}
.enemy-box {
  position: absolute; left: 50%; top: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 300px; z-index: 2;
}
.enemy-badge {
  font-size: 10.5px; letter-spacing: 2px; color: #1b1520; background: #e8b04b;
  padding: 2px 10px; border-radius: 999px; font-weight: 800;
}
.enemy-box.boss .enemy-badge { background: #e06a5a; color: #fff; }
.enemy-sprite { font-size: 84px; line-height: 1; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); animation: enemyFloat 3.2s ease-in-out infinite; }
.enemy-box.boss .enemy-sprite { font-size: 102px; filter: drop-shadow(0 0 26px rgba(224, 106, 90, .45)); }
.enemy-name { font-size: 13px; font-weight: 800; color: #f6ecd8; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.enemy-box.hit { animation: enemyHit .35s ease; }
.enemy-box.hit .enemy-sprite { filter: brightness(2.2) drop-shadow(0 0 18px #fff); }
.enemy-box.defeated { animation: enemyDie .6s ease forwards; }

.hero-box {
  position: absolute; left: 26px; bottom: 24px; width: 250px; z-index: 2;
  display: flex; flex-direction: column; gap: 3px;
}
.hero-sprite { font-size: 56px; line-height: 1; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.hero-label { font-size: 11px; color: #d8c7a9; }

.hpbar {
  position: relative; height: 16px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
}
.hpbar i { display: block; height: 100%; transition: width .35s ease; }
.hpbar span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9.5px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); font-variant-numeric: tabular-nums;
}
.hpbar.hp-enemy { width: 240px; }
.hpbar.hp-enemy i { background: linear-gradient(90deg, #e06a5a, #f0a35e); }
.hpbar.hp-hero i { background: linear-gradient(90deg, #3fbf8f, #8ee0b0); }
.hero-box .hpbar { width: 200px; }

.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.slash-fx {
  position: absolute; left: 50%; top: 42%; width: 260px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, transparent, #fff6d8, #ffd27a, transparent);
  transform: translate(-50%, -50%) rotate(var(--r, -8deg)); opacity: 0;
  animation: slash 0.4s ease-out; box-shadow: 0 0 18px #ffd27a;
}
.dmg-number {
  position: absolute; font-size: 26px; font-weight: 900; font-family: var(--mono);
  color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); animation: dmgFloat 1s ease-out forwards;
}
.dmg-number.crit { color: #ffd257; font-size: 38px; text-shadow: 0 0 18px rgba(255, 210, 87, .8); }
.dmg-number.hurt { color: #ff8877; }
.dmg-number.heal { color: #7fe0a8; }
.battle-banner {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.8);
  padding: 10px 26px; border-radius: 999px; background: rgba(15, 12, 18, .82);
  border: 1px solid rgba(232, 176, 75, .4); color: #f6ecd8; font-weight: 900; letter-spacing: 2px;
  opacity: 0; pointer-events: none; z-index: 4; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.battle-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.battle-banner.boss { color: #ffb4a4; border-color: #e06a5a; background: rgba(60, 12, 16, .85); }
.battle-banner.danger { color: #ffb4a4; }
.battle-banner.shield { color: #9fd8ff; border-color: #6db6e8; }

.battle-arena.hero-hit { animation: arenaShake .4s ease; }
.battle-arena.hero-hit::after {
  content: ""; position: absolute; inset: 0; background: rgba(224, 60, 60, .28);
  animation: fade .4s ease; pointer-events: none;
}
.battle-arena.shielded { box-shadow: inset 0 0 90px rgba(90, 180, 255, .35); }

.skill-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.skill-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid rgba(232, 176, 75, .3); background: rgba(255, 255, 255, .05); color: #f6ecd8;
  cursor: pointer; font-size: 12px; transition: .15s;
}
.skill-btn:hover:not(:disabled) { background: rgba(232, 176, 75, .16); transform: translateY(-1px); }
.skill-btn:disabled { opacity: .45; cursor: not-allowed; }
.skill-btn.locked { opacity: .35; }
.sk-icon { font-size: 16px; }
.sk-cd { font-size: 10px; color: #e8b04b; }

.battle-card { margin-top: 14px; background: rgba(30, 24, 32, .92); border-color: rgba(232, 176, 75, .18); }
.battle-prompt-label { font-size: 11px; letter-spacing: 2px; color: #b9a98f; font-weight: 750; }
.battle-card .answer { min-height: 96px; }
.battle-card .word .ch.fixed { color: #b9a98f; }
.battle-card .word .zh-mini { color: #9c8c74; }
.battle-card .p-hintline { display: none; }

.modal-wide { width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.story-chapter { font-size: 11px; letter-spacing: 3px; color: var(--seal, #b23a2f); font-weight: 800; }
.story-intro h3 { font-size: 24px; margin: 6px 0 8px; }
.story-premise { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.story-text { font-size: 14px; line-height: 1.9; }
.story-boss {
  display: flex; gap: 12px; align-items: center; margin: 16px 0;
  padding: 12px 14px; border-radius: 14px; background: var(--line-2); border: 1px dashed var(--line);
}
.sb-emoji { font-size: 34px; }

.battle-result { text-align: center; }
.result-stars { font-size: 40px; color: #e8b04b; letter-spacing: 6px; text-shadow: 0 4px 16px rgba(232, 176, 75, .35); }
.result-stars.lost { color: #8a7a6a; }
.battle-result h3 { margin: 2px 0 6px; font-size: 23px; }
.reward-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 12px 0; font-size: 13px; color: var(--ink-2); }
.loot-row {
  display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap;
  padding: 10px; border-radius: 12px; background: var(--brand-soft); font-size: 13px;
}
.rarity-1 { color: #8a7a6a; }
.rarity-2 { color: #3f8f6a; }
.rarity-3 { color: #3f6fbf; }
.rarity-4 { color: #c08a2a; }
.writing-block { margin-top: 18px; text-align: left; border-top: 1px dashed var(--line); padding-top: 14px; }
.writing-title { font-weight: 800; font-size: 14px; }
.writing-en { font-size: 13px; line-height: 1.7; margin: 6px 0; }
.writing-hint { font-size: 11.5px; color: var(--muted); font-style: italic; }
.writing-block textarea {
  width: 100%; min-height: 96px; margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 13px; resize: vertical;
}

/* 角色 / 行囊 */
.hero-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
.hp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.hp-avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: 30px; }
.hp-head h3 { margin: 0; font-size: 19px; }
.hp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; }
.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eq-slot { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
.eq-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.eq-empty { color: var(--muted); font-size: 12px; }
.eq-item b { display: block; font-size: 13px; }
.eq-item span { font-size: 11px; color: var(--muted); }
.eq-slot .btn { margin-top: 6px; padding: 4px 8px; font-size: 10.5px; }
.section-label { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); font-weight: 750; margin: 14px 0 8px; }
.skill-list { margin-top: 4px; }
.skill-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--line-2); margin-bottom: 6px; }
.skill-row.locked { opacity: .55; }
.skill-row .sk-icon { font-size: 20px; }
.skill-row b { display: block; font-size: 12.5px; }
.skill-row .grow span { font-size: 11px; }
.inv-list { max-height: 380px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.inv-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.inv-item.equipped { background: var(--mint-soft); }
.inv-main { flex: 1; min-width: 0; }
.inv-main b { display: block; font-size: 12.5px; }
.inv-main span { display: block; font-size: 10.5px; color: var(--muted); }
.inv-item .btn { padding: 4px 9px; font-size: 10.5px; }

@media (max-width: 720px) {
  .battle-arena { height: 280px; }
  .enemy-sprite { font-size: 64px; }
  .enemy-box { width: 220px; }
  .hero-box { width: 180px; left: 14px; bottom: 14px; }
  .hero-sprite { font-size: 42px; }
  .hero-box .hpbar { width: 150px; }
  .hpbar.hp-enemy { width: 190px; }
  .battle-combo { display: none; }
  .hero-panel { grid-template-columns: 1fr; }
  .hero-panel .inv-list { max-height: 240px; }
}

@keyframes enemyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes enemyHit { 0%, 100% { transform: translateX(-50%); } 20% { transform: translateX(calc(-50% - 8px)); } 40% { transform: translateX(calc(-50% + 8px)); } 60% { transform: translateX(calc(-50% - 5px)); } 80% { transform: translateX(calc(-50% + 5px)); } }
@keyframes enemyDie { 0% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(.6) rotate(12deg); } }
@keyframes slash { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r, -8deg)) scaleX(.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r, -8deg)) scaleX(1.3); } }
@keyframes dmgFloat { 0% { opacity: 0; transform: translateY(0) scale(.7); } 20% { opacity: 1; transform: translateY(-10px) scale(1.1); } 100% { opacity: 0; transform: translateY(-60px) scale(1); } }
@keyframes arenaShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.story-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.story-meta span { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.hero-box.attacking { animation: heroDash .36s ease; }
@keyframes heroDash { 0% { transform: translateX(0); } 35% { transform: translateX(26px) translateY(-4px); } 70% { transform: translateX(-4px); } 100% { transform: translateX(0); } }

/* ================================================================
   方块墨境（WebGL）
   ================================================================ */
.world-loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; background: #101018; color: #f6ecd8; }
.world-loading h2 { margin: 6px 0; font-size: 20px; }
.wl-emoji { font-size: 46px; animation: bobbing 2.6s ease-in-out infinite; }
.world-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #bfe0ea; }
.world-hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-family: var(--font); color: #fff; }
.world-topbar {
  position: absolute; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: linear-gradient(180deg, rgba(10, 8, 14, .72), transparent);
}
.world-back { pointer-events: auto; font-size: 12px; color: #ffe6b0; text-decoration: none; background: rgba(0, 0, 0, .35); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 230, 176, .25); }
.world-title { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.world-coins { margin-left: auto; font-size: 13px; color: #ffe6b0; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
/* 角色切换（墨偶 / 书生） */
.world-skin {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-family: inherit; font-size: 12px; line-height: 1; color: #e6f0ff; cursor: pointer;
  padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(150, 190, 255, .38);
  background: rgba(18, 28, 54, .48); backdrop-filter: blur(4px);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.world-skin:hover { background: rgba(44, 66, 120, .62); border-color: rgba(180, 215, 255, .7); transform: translateY(-1px); }
.world-skin:active { transform: translateY(0); }
.world-skin span { font-weight: 800; letter-spacing: .5px; }
.world-status {
  position: absolute; left: 18px; top: 66px; width: 250px; padding: 10px 12px; border-radius: 14px;
  background: rgba(12, 10, 16, .55); border: 1px solid rgba(255, 230, 176, .22); backdrop-filter: blur(6px);
}
.ws-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: #e8dcc4; margin: 4px 0; }
.ws-row span { width: 26px; }
.ws-bar { flex: 1; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.ws-bar i { display: block; height: 100%; background: linear-gradient(90deg, #47c99a, #8ff0c4); transition: width .3s; }
.ws-bar.xp i { background: linear-gradient(90deg, #e8b04b, #ffd98a); }
.world-quest {
  position: absolute; right: 18px; top: 66px; width: 230px; padding: 10px 12px; border-radius: 14px;
  background: rgba(12, 10, 16, .55); border: 1px solid rgba(255, 230, 176, .22); font-size: 12px; color: #f6ecd8;
  backdrop-filter: blur(6px); line-height: 1.6;
}
.world-quest b { color: #ffd98a; }
.world-quest span { font-size: 10.5px; color: #c9b89a; }
.world-crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 18px; color: rgba(255, 255, 255, .75); text-shadow: 0 0 6px rgba(0, 0, 0, .6); }
.world-prompt {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%);
  padding: 8px 18px; border-radius: 999px; background: rgba(12, 10, 16, .72);
  border: 1px solid rgba(255, 230, 176, .4); color: #ffe6b0; font-size: 13px; font-weight: 700;
  animation: pulse 1.8s infinite;
}
.world-help {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 11px; color: rgba(255, 255, 255, .75); background: rgba(12, 10, 16, .42);
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.world-intro-overlay {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% 20%, rgba(20, 30, 30, .35), rgba(10, 8, 14, .78));
  backdrop-filter: blur(3px);
}
.world-intro-card {
  width: min(560px, 100%); background: linear-gradient(160deg, #fbf5e6, #efe2c6); color: #2f261b;
  border: 1px solid #d9c9a3; border-radius: 22px; padding: 28px 30px; text-align: center;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .4), 0 30px 70px rgba(0, 0, 0, .45);
}
.wi-emoji { font-size: 44px; }
.world-intro-card h1 { font-size: 30px; letter-spacing: 8px; margin: 6px 0 10px; color: #b23a2f; font-family: "STKaiti", "KaiTi", serif; }
.world-intro-card p { font-size: 13px; line-height: 1.9; color: #5e4f3a; }
.wi-tips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 16px 0; }
.wi-tips span { font-size: 10.5px; padding: 4px 9px; border-radius: 999px; background: rgba(178, 58, 47, .1); color: #8a4a3a; }

.world-dialog-overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px;
  background: rgba(8, 6, 12, .82);
}
.world-dialog {
  width: min(660px, 100%); max-height: 86vh; overflow: auto;
  background: linear-gradient(160deg, #fbf5e6, #f2e7cf); color: #2f261b;
  border: 1px solid #d9c9a3; border-radius: 20px; padding: 20px 22px;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .35), 0 24px 60px rgba(0, 0, 0, .45);
  --ink: #2f261b; --ink-2: #4a3b2c; --muted: #8a7858; --line: #d9c9a3; --line-2: #efe2c6;
  --brand: #b23a2f; --brand-2: #8f2a20; --brand-soft: rgba(178, 58, 47, .12);
}
.wd-head { display: flex; align-items: center; gap: 12px; }
.wd-emoji { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; background: #efe2c6; border: 1px solid #d9c9a3; }
.wd-name { font-weight: 800; font-size: 16px; }
.wd-sub { font-size: 11px; color: #8a7858; }
.wd-hp { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #8a7858; }
.wd-hp .ws-bar { width: 90px; }
.wd-hp b { font-size: 11px; }
.wd-body { margin-top: 14px; }
.wd-line { font-size: 14px; line-height: 1.9; background: rgba(178, 58, 47, .06); border-left: 3px solid #b23a2f; padding: 10px 14px; border-radius: 0 10px 10px 0; }
.wd-speech { font-size: 16px; font-weight: 800; color: #b23a2f; margin-bottom: 4px; }
.wd-hint { font-size: 11.5px; color: #8a7858; margin-bottom: 12px; }
.wd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wd-fight .answer, .world-dialog .answer { margin-top: 14px; min-height: 78px; }
.wd-fight .word .ch.fixed, .world-dialog .word .ch.fixed { color: #8a7858; }
.wd-log { margin-top: 10px; font-size: 12px; color: #4a3b2c; line-height: 1.8; }
.wd-log .hit { color: #b23a2f; }
.wd-log .hurt { color: #3f6fbf; }
.wd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.wd-victory, .wd-defeat { text-align: center; }
.wd-result-emoji { font-size: 44px; }
.wd-victory h3, .wd-defeat h3 { font-size: 21px; margin: 6px 0; }
.wd-rewards { margin: 12px 0; font-size: 12px; color: #8a5a1a; background: rgba(217, 165, 58, .14); padding: 8px; border-radius: 10px; }

@media (max-width: 700px) {
  .world-status, .world-quest { display: none; }
  .world-help { font-size: 9.5px; white-space: normal; width: 90%; text-align: center; }
  .world-dialog { padding: 16px; }
  .world-intro-card { padding: 20px; }
  .world-intro-card h1 { font-size: 24px; letter-spacing: 5px; }
}

/* ================================================================
   方块墨境世界地图 / 奖励
   ================================================================ */
.worldmap-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.worldmap-toolbar label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.worldmap-toolbar select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--ink); }
.wm-progress { font-size: 13px; color: var(--muted); margin-left: auto; }
.wm-progress b { color: var(--brand-2); font-size: 18px; }
.world-unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.world-unit {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px;
  border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
  text-decoration: none; transition: .18s; min-height: 132px;
}
.world-unit:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.world-unit.cleared { background: linear-gradient(160deg, var(--card), var(--mint-soft)); border-color: color-mix(in srgb, var(--mint) 35%, var(--line)); }
.world-unit.locked { opacity: .55; cursor: not-allowed; }
.wu-biome { font-size: 28px; }
.wu-title { font-weight: 800; font-size: 14px; }
.wu-meta { font-size: 11px; color: var(--muted); }
.wu-stars { color: #c99a2e; font-size: 13px; letter-spacing: 1px; }
.wu-enemy { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.next-course {
  display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 16px 18px;
  border-radius: 16px; border: 1px dashed var(--line); background: var(--line-2);
}
.nc-emoji { font-size: 30px; }
.next-course b { font-size: 14px; }
.next-course p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.worldmap-foot { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 20px; }

.reward-claims { display: flex; flex-direction: column; gap: 8px; }
.reward-claim { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.reward-claim.fulfilled { opacity: .7; }
.rc-emoji { width: 44px; height: 44px; border-radius: 12px; background: var(--line-2); display: grid; place-items: center; font-size: 22px; }

.rw-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rw-table th { text-align: left; color: var(--muted); font-size: 11px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.rw-table td { padding: 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.rw-table .input { padding: 6px 8px; font-size: 12px; min-width: 0; }
.rw-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }

@media (max-width: 720px) {
  .world-unit-grid { grid-template-columns: 1fr 1fr; }
  .rw-table { display: block; overflow-x: auto; }
}

.wu-biome { display: flex; align-items: center; justify-content: space-between; }
.wu-index { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }

.wd-prompt { font-size: 18px; color: #b23a2f; padding: 1px 6px; border-bottom: 2px dashed #d9a53a; }
.wd-tools { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.world-dialog .wd-speech { font-size: 14px; color: #8a5a1a; }

.wd-listen { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8a5a1a; margin: 8px 0 4px; }
.wd-wave { width: 10px; height: 10px; border-radius: 50%; background: #b23a2f; box-shadow: 0 0 0 0 rgba(178, 58, 47, .55); animation: wdPulse 1.4s infinite; }
@keyframes wdPulse { 0% { box-shadow: 0 0 0 0 rgba(178, 58, 47, .5); } 70% { box-shadow: 0 0 0 10px rgba(178, 58, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(178, 58, 47, 0); } }

/* 学习门槛 */
.study-gate {
  margin: 0 0 16px; padding: 16px 18px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--card); box-shadow: var(--shadow);
}
.study-gate.ok { border-color: color-mix(in srgb, var(--mint) 45%, var(--line)); background: linear-gradient(160deg, var(--card), var(--mint-soft)); }
.study-gate.warn { border-color: rgba(217, 165, 58, .45); background: linear-gradient(160deg, var(--card), rgba(217, 165, 58, .08)); }
.sg-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.sg-head b { font-size: 14px; }
.sg-badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-weight: 700; }
.sg-desc { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.sg-units { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.sg-unit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--line-2); }
.sg-unit.done { background: var(--mint-soft); }
.sg-unit b { font-size: 12.5px; }
.sg-modes { font-size: 11px; color: var(--muted); margin-top: 2px; }
.btn.tiny { padding: 4px 9px; font-size: 10.5px; border-radius: 8px; }

.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.switch span { display: none; }
.switch:has(input:checked) { background: var(--brand); }
.switch:has(input:checked)::after { transform: translateX(18px); }

.clock-goal { font-size: 10px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.clock.over { color: var(--rose); font-weight: 800; }

.prop-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 8px; }
.prop-chip {
  text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; transition: .15s;
}
.prop-chip:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.prop-chip b { display: block; font-size: 12.5px; }
.prop-chip span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.wu-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.sum-task { margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--line-2); text-align: left; }
.sum-task-title { font-size: 10.5px; color: var(--muted); font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; }
.sum-task-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sum-task-row span { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--card); color: var(--muted); }
.sum-task-row span.done { background: var(--mint-soft); color: var(--mint); font-weight: 700; }
.sum-ready { font-size: 12px; color: var(--mint); margin-top: 8px; font-weight: 700; }
.sum-missing { font-size: 12px; color: var(--brand-2); margin-top: 8px; }

.lesson-task-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); border: 1px dashed var(--brand); }
.ltb-title { font-size: 12px; font-weight: 800; color: var(--brand-2); }
.ltb-title span { font-weight: 500; color: var(--muted); margin-left: 6px; }
.ltb-modes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ltb-modes span { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--card); color: var(--muted); }
.ltb-modes span.done { background: var(--mint-soft); color: var(--mint); font-weight: 700; }

/* ================================================================== */
/* 2026-11-16 课时制 / 新题型 / 每日练习 / 护眼休息                    */
/* ================================================================== */

/* ---------- 首页：三件事 / 题型总览 / 护眼 ---------- */
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.howto-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px 58px; }
.howto-card .step { position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; }
.howto-card b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.howto-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.type-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.type-card { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; }
.type-card .ico { font-size: 20px; line-height: 1.2; }
.type-card b { display: block; font-size: 13.5px; }
.type-card span { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 2px; }
.care-note { display: flex; gap: 14px; align-items: flex-start; margin-top: 26px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(160deg, var(--card), var(--mint-soft, #eefaf4)); border: 1px solid var(--line); }
.care-note .care-emoji { font-size: 26px; }
.care-note b { font-size: 14px; }
.care-note p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* ---------- 课程详情：课时制 ---------- */
.lesson-note { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 4px; padding: 15px 18px; border-radius: 16px; background: var(--line-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; line-height: 1.75; }
.lesson-note > span { font-size: 20px; line-height: 1.2; }
.lesson-list .unit-row { cursor: pointer; }
.lesson-list .unit-row.next { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.unit-stars { color: var(--sun, #e8b04b); font-size: 13px; letter-spacing: 2px; min-width: 42px; text-align: center; }
.unit-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- 课时页：顶部题型标签 ---------- */
.p-type-pills { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 44vw; margin-left: auto; }
.p-type-pills::-webkit-scrollbar { display: none; }
.p-crumb b, .p-crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.p-top .p-dots { margin-left: auto; }
.type-chip { font-size: 11.5px; color: var(--muted); background: var(--line-2); border: 1px solid transparent; border-radius: 999px; padding: 3px 9px; white-space: nowrap; opacity: .7; }
.type-chip.active { color: var(--brand-2); background: var(--card); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); opacity: 1; font-weight: 700; }
.lt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lt-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--brand-2); background: color-mix(in srgb, var(--brand) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 999px; padding: 4px 11px; }
.lt-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prompt-zh { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* ---------- 选择题 ---------- */
.opt-list { display: grid; gap: 9px; margin-top: 4px; }
.opt-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 15px; font-size: 14.5px; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .12s, background .15s; font-family: inherit; }
.opt-btn:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); }
.opt-btn .opt-key { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--line-2); color: var(--muted); }
.opt-btn .opt-text { flex: 1; }
.opt-btn.right { border-color: var(--mint); background: var(--mint-soft); }
.opt-btn.right .opt-key { background: var(--mint); color: #fff; }
.opt-btn.wrong { border-color: var(--rose); background: var(--rose-soft); }
.opt-btn.wrong .opt-key { background: var(--rose); color: #fff; }
.opt-btn.active { border-color: var(--brand); }
.opt-btn.small { padding: 10px 13px; font-size: 13.5px; }
.answer-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.answer-note b { font-family: var(--mono); }

/* ---------- 完形填空 ---------- */
.cloze-passage { font-size: 16.5px; line-height: 2.1; color: var(--ink); margin: 6px 0 4px; }
.cloze-blank { display: inline-block; min-width: 62px; margin: 0 3px; padding: 1px 8px 2px; border: 0; border-bottom: 2px dashed var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 6px 6px 0 0; color: var(--brand-2); font-weight: 700; font-family: inherit; font-size: inherit; cursor: default; }
.cloze-blank.filled { border-bottom-style: solid; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--ink); }
.cloze-rows { display: grid; gap: 10px; margin-top: 16px; }
.cloze-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cloze-no { flex: none; font-size: 12px; color: var(--muted); width: 52px; }
.cloze-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.cloze-chip { cursor: pointer; }
.cloze-chip.active { border-color: var(--brand); color: var(--brand-2); background: color-mix(in srgb, var(--brand) 10%, var(--card)); }
.cloze-chip.right { border-color: var(--mint); background: var(--mint-soft); color: var(--ink); }
.cloze-chip.wrong { border-color: var(--rose); background: var(--rose-soft); }

/* ---------- 阅读理解 ---------- */
.reading-passage { font-size: 15.5px; line-height: 1.95; color: var(--ink); background: var(--line-2); border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px; margin-top: 8px; }
.reading-q { margin-top: 16px; }
.rq-text { font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.reading-q .opt-list { gap: 7px; }

/* ---------- 语音 ---------- */
.voice-en { margin-top: 8px; font-size: 17px; line-height: 1.8; color: var(--ink); }
.voice-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--line-2); padding: 20px; text-align: center; }
.voice-prompt { font-size: 14.5px; font-weight: 650; }
.voice-zh { margin-top: 8px; font-size: 19px; font-weight: 750; color: var(--ink); }
.voice-target { margin-top: 8px; color: var(--muted); font-size: 13px; }
.voice-waves { display: flex; justify-content: center; align-items: flex-end; gap: 5px; height: 34px; margin: 14px 0 4px; }
.voice-waves i { width: 5px; border-radius: 3px; background: var(--brand); opacity: .55; animation: voiceWave 1.1s ease-in-out infinite; }
.voice-waves i:nth-child(1) { height: 12px; animation-delay: 0s; }
.voice-waves i:nth-child(2) { height: 22px; animation-delay: .1s; }
.voice-waves i:nth-child(3) { height: 30px; animation-delay: .2s; }
.voice-waves i:nth-child(4) { height: 18px; animation-delay: .3s; }
.voice-waves i:nth-child(5) { height: 26px; animation-delay: .4s; }
.voice-waves i:nth-child(6) { height: 14px; animation-delay: .5s; }
.voice-waves i:nth-child(7) { height: 20px; animation-delay: .6s; }
@keyframes voiceWave { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.15); } }
.voice-status { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.voice-transcript { min-height: 22px; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.voice-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.voice-mic { font-size: 15px; padding: 13px 26px; border-radius: 999px; }
.voice-score { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-top: 12px; }
.voice-score b { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.voice-score.ok b { color: var(--mint); }
.voice-score.bad b { color: var(--rose); }
.voice-score span { color: var(--muted); font-size: 12px; }
.voice-score em { display: block; margin-left: 10px; font-style: normal; color: var(--muted); font-size: 12.5px; }
.voice-diff { margin-top: 8px; line-height: 2; font-size: 13.5px; }
.diff-word { border-radius: 5px; padding: 1px 4px; margin: 0 1px; }
.diff-word.ok { background: var(--mint-soft); color: var(--mint); }
.diff-word.miss { background: var(--rose-soft); color: var(--rose); text-decoration: line-through; }
.diff-word.extra { background: rgba(233, 179, 60, .18); color: #a8791b; }
.voice-blocked { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(233, 179, 60, .1); border: 1px solid rgba(233, 179, 60, .35); text-align: left; }
.voice-blocked b { font-size: 13.5px; }
.voice-blocked p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.voice-fallback { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px dashed var(--line); text-align: left; }
.voice-fallback .row { gap: 8px; margin-top: 8px; }
.voice-fallback .input { flex: 1; }
.link-btn { margin-top: 14px; border: 0; background: none; color: var(--brand-2); font-size: 12.5px; cursor: pointer; text-decoration: underline; font-family: inherit; }

/* ---------- 每日练习 ---------- */
.drill-picker { padding: 18px 20px; }
.drill-field { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.drill-field .input { min-width: 220px; }
.drill-wordcard { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.word-chips { flex: 1; display: flex; gap: 7px; flex-wrap: wrap; min-width: 240px; }
.word-chip { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; font-family: var(--mono); font-size: 12.5px; background: var(--line-2); }
.word-chip small { font-family: inherit; color: var(--muted); font-size: 11px; }
.word-big { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-top: 8px; }
.word-input-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.word-input { flex: 1; min-width: 200px; font-family: var(--mono); font-size: 20px; letter-spacing: 2px; text-align: center; }
.shake { animation: shake .3s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- 护眼休息 ---------- */
.rest-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%, #2b3350, #151824 72%); color: #f4f1ff; animation: fade .25s ease both; }
.rest-card { width: min(520px, 100%); text-align: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 26px; padding: 34px 32px 26px; backdrop-filter: blur(8px); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.rest-eyes { font-size: 54px; line-height: 1; transition: transform .4s ease; }
.rest-kicker { margin-top: 10px; font-size: 12px; letter-spacing: 4px; color: #b9c0e0; }
.rest-card h2 { margin: 8px 0 6px; font-size: 27px; letter-spacing: -0.5px; }
.rest-lead { margin: 0 auto; max-width: 400px; color: #c3c8e0; font-size: 13.5px; line-height: 1.8; }
.rest-ring { margin: 22px auto 14px; width: 148px; height: 148px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(#8fd0ff 0deg, rgba(255, 255, 255, .08) 0deg); box-shadow: inset 0 0 0 12px rgba(255, 255, 255, .05); }
.rest-ring b { font-size: 38px; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.rest-ring span { font-size: 11px; letter-spacing: 2px; color: #b9c0e0; }
.rest-tip { min-height: 42px; color: #d8dcf0; font-size: 13.5px; line-height: 1.8; }
.rest-foot { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: #9aa2c4; font-size: 11.5px; }
.rest-badge { position: fixed; right: 18px; bottom: 18px; z-index: 120; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: var(--shadow); opacity: .85; }
.rest-badge:hover { opacity: 1; }
.rest-badge.near { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, var(--line)); }

@media (max-width: 720px) {
  .p-type-pills { display: none; }
  .lesson-list .unit-row { flex-wrap: wrap; }
  .rest-card { padding: 26px 20px 22px; }
  .rest-ring { width: 124px; height: 124px; }
  .rest-ring b { font-size: 30px; }
}

/* ================================================================== */
/* 2026-11-16 夜间批次：可读性 / 可爱字体 / 错误红色标注                 */
/* ================================================================== */

:root {
  --font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-cute: "YouYuan", "幼圆", "Comic Sans MS", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

body { font-size: 16.5px; line-height: 1.68; }
.wrap { width: min(1240px, calc(100% - 48px)); }
.topnav .inner { height: 74px; gap: 26px; }
.logo { font-size: 20px; }
.logo .mark { width: 36px; height: 36px; border-radius: 12px; font-size: 19px; }
.logo small { font-size: 10.5px; }
.navlinks a { font-size: 15.5px; padding: 9px 15px; }
.streak-chip { font-size: 14px; }
.avatar { width: 40px; height: 40px; font-size: 16px; }
.page-title {
  font-size: 34px; font-family: var(--font-cute); letter-spacing: .2px;
  background: linear-gradient(100deg, var(--brand-2), var(--hero-c));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-sub { font-size: 15.5px; line-height: 1.75; }
.section-title { margin: 34px 0 16px; }
.section-title h2 { font-size: 21px; font-family: var(--font-cute); position: relative; display: inline-block; }
.section-title h2::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -6px; height: 5px;
  background: radial-gradient(circle at 4px 0, var(--brand) 3px, transparent 3.5px) repeat-x;
  background-size: 8px 5px; opacity: .35;
}
.section-title h2::before { font-size: 16px; }
.section-title a { font-size: 14px; }
.btn { font-size: 15.5px; padding: 12px 22px; letter-spacing: .3px; }
.btn.small { font-size: 14px; padding: 9px 16px; }
.badge { font-size: 12.5px; padding: 4px 10px; }
.small { font-size: 13.5px; }
.card { border-radius: 24px; }

/* 首页 */
.hero { padding: 40px 42px; border-radius: 32px; }
.hero h1 { font-size: 38px; font-family: var(--font-cute); }
.hero p { font-size: 16px; line-height: 1.8; }
.hero .eyebrow { font-size: 13.5px; }
.hero-stats .glass { padding: 18px 20px; border-radius: 20px; }
.glass .k { font-size: 13px; }
.glass .v { font-size: 26px; }
.hero-mascot { font-size: 14px; }
.stat-card { padding: 22px 24px; }
.stat-card .k { font-size: 14px; }
.stat-card .v { font-size: 32px; }
.stat-card .v small { font-size: 14px; }
.stat-card .sub { font-size: 13px; }
.continue-card { padding: 22px 24px; border-radius: 24px; }
.course-name { font-size: 18px; }
.continue-card .meta { font-size: 14px; }
.howto-card { padding: 22px 22px 20px 66px; border-radius: 20px; }
.howto-card .step { width: 32px; height: 32px; font-size: 14px; left: 18px; top: 18px; }
.howto-card b { font-size: 16px; }
.howto-card p { font-size: 14px; line-height: 1.75; }
.type-card { padding: 16px; border-radius: 18px; }
.type-card .ico { font-size: 24px; }
.type-card b { font-size: 15px; }
.type-card span { font-size: 13px; }
.care-note { padding: 22px 24px; border-radius: 20px; }
.care-note b { font-size: 15.5px; }
.care-note p { font-size: 14px; line-height: 1.75; }
.course-card { padding: 18px; }
.course-sub { font-size: 13px; }
.course-desc { font-size: 13.5px; line-height: 1.65; }
.course-cover { font-size: 30px; }
.mode-card { padding: 16px; border-radius: 16px; }
.mode-card .ico { font-size: 24px; transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.mode-card:hover .ico { transform: rotate(-8deg) scale(1.15); }
.mode-card b { font-size: 15px; }
.mode-card span { font-size: 13px; }
.course-hero { padding: 28px 30px; border-radius: 28px; }
.course-hero h1 { font-size: 32px; font-family: var(--font-cute); }
.course-hero .desc { font-size: 15px; line-height: 1.75; }
.lesson-note { font-size: 14.5px; padding: 18px 20px; }
.unit-row { padding: 18px 20px; }
.unit-title { font-size: 16.5px; }
.unit-topic { font-size: 13.5px; }
.unit-no { font-size: 15px; }
.chip { font-size: 13.5px; padding: 8px 14px; }

/* 课时 / 练习页 */
.p-top { padding: 16px max(20px, calc((100vw - 1240px) / 2)); }
.p-back { width: 42px; height: 42px; font-size: 18px; border-radius: 13px; }
.p-crumb b { font-size: 15.5px; }
.p-crumb span { font-size: 13.5px; }
.p-dots i { width: 9px; height: 9px; }
.p-body { padding: 32px 24px 22px; }
.p-card { width: min(1120px, 100%); padding: 40px 46px 34px; border-radius: 30px; }
.prompt { gap: 20px; }
.prompt-emoji { font-size: 50px; animation: promptFloat 3.4s ease-in-out infinite; }
@keyframes promptFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
.prompt-text { font-size: clamp(24px, 3vw, 34px); line-height: 1.55; font-family: var(--font-cute); font-weight: 800; }
.prompt-label { font-size: 13px; letter-spacing: 1.8px; }
.prompt-tip { font-size: 14px; padding: 9px 13px; border-radius: 11px; }
.prompt-zh { font-size: 15.5px; }
.answer { margin-top: 34px; min-height: 110px; }
.word { padding: 10px 12px 8px; border-radius: 14px; }
.word .letters { font-size: clamp(26px, 3.4vw, 36px); }
.word .ch { min-width: .6em; margin: 0 3px; }
.word .zh-mini { font-size: 13px; min-height: 16px; }
.word .pos-mini { font-size: 11.5px; }
.word.active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.word .ch.err, .typing-line .tc.bad {
  color: var(--rose) !important; background: var(--rose-soft);
  border-bottom-color: var(--rose) !important; border-radius: 6px;
}
.word.shake { animation: shake .34s ease; }
.tile { font-size: 19px; padding: 12px 18px; border-radius: 14px; }
.tile:hover { transform: translateY(-3px) rotate(-1deg); }
.tile-slot { min-width: 82px; }
.p-hintline { font-size: 13.5px; margin-top: 22px; }
.p-hintline kbd { font-size: 12px; padding: 2px 6px; }
.p-foot { width: min(1120px, 100%); padding-top: 18px; gap: 10px; }
.p-foot .tool { font-size: 14px; padding: 10px 14px; border-radius: 12px; }
.p-foot .tool kbd { font-size: 11px; }
.p-foot .clock { font-size: 14px; }
.clock-goal { font-size: 13px; }
.lt-head { margin-bottom: 18px; }
.lt-badge { font-size: 13.5px; padding: 6px 14px; }
.lt-count { font-size: 13.5px; }
.opt-list { gap: 11px; }
.opt-btn { font-size: 16.5px; padding: 16px 18px; border-radius: 16px; gap: 14px; }
.opt-btn .opt-key { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
.opt-btn.small { font-size: 15.5px; padding: 13px 15px; }
.opt-btn:hover:not(:disabled) { transform: translateY(-2px) rotate(-.25deg); }
.cloze-passage { font-size: 19px; line-height: 2.15; }
.cloze-blank { min-width: 72px; font-size: 19px; }
.cloze-no { font-size: 13.5px; min-width: 118px; white-space: nowrap; }
.cloze-no small { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.cloze-chip { font-size: 15px; padding: 9px 14px; }
.reading-passage { font-size: 17px; line-height: 2; padding: 20px 22px; border-radius: 16px; }
.rq-text { font-size: 15.5px; }
.voice-prompt { font-size: 15.5px; }
.voice-zh { font-size: 22px; }
.voice-target { font-size: 14px; }
.voice-status, .voice-transcript { font-size: 14px; }
.voice-actions .btn { font-size: 16px; }
.voice-blocked b { font-size: 15px; }
.voice-blocked p { font-size: 14px; }
.result { padding: 20px 22px; border-radius: 18px; }
.result .title { font-size: 16.5px; font-family: var(--font-cute); }
.result .sub { font-size: 13.5px; }
.result .acc { font-size: 28px; }
.result-answer, .answer-note { font-size: 13.5px; }
.input { font-size: 15.5px; padding: 12px 14px; }
.word-input { font-size: 22px; }
.word-big { font-size: 34px; }

/* 弹窗 / 统计 / 设置 */
.modal { padding: 30px; border-radius: 26px; }
.modal h3 { font-size: 23px; font-family: var(--font-cute); }
.modal p { font-size: 15px; line-height: 1.75; }
.big-stats b { font-size: 26px; }
.big-stats span { font-size: 12.5px; }
.result-stars { font-size: 44px; }
.setting-row .label { font-size: 15px; }
.setting-row .desc { font-size: 13.5px; }
.chart .bar span { font-size: 11px; }
.stats-grid .stat-card .v { font-size: 34px; }

/* 小屏：别把桌面大字号硬塞进手机 */
@media (max-width: 720px) {
  .wrap { width: calc(100% - 24px); }
  .topnav .inner { height: 62px; gap: 12px; }
  .logo { font-size: 17px; }
  .logo .mark { width: 32px; height: 32px; }
  .hero { padding: 26px 22px; border-radius: 26px; }
  .hero h1 { font-size: 28px; }
  .page-title { font-size: 27px; }
  .section-title h2 { font-size: 19px; }
  .p-top { padding: 12px; }
  .p-card { padding: 24px 18px; border-radius: 22px; }
  .prompt-text { font-size: clamp(21px, 6vw, 28px); }
  .word .letters { font-size: clamp(21px, 6vw, 28px); }
  .opt-btn { font-size: 15px; padding: 13px 14px; }
  .cloze-passage { font-size: 16.5px; }
  .cloze-no { width: auto; }
  .reading-passage { font-size: 15.5px; }
  .p-hintline { display: none; }
  .p-foot { flex-wrap: nowrap; overflow-x: auto; }
}

/* ---------- 方块墨境：收集物 / 新挑战 ---------- */
.world-collect {
  position: fixed; left: 18px; bottom: 18px; z-index: 5;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(20, 16, 24, .72); color: #ffe6b0;
  font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
  border: 1px solid rgba(255, 230, 176, .25);
  backdrop-filter: blur(6px);
}
.world-collect b { color: #ffd98a; font-size: 15px; }
.world-quest { font-size: 13.5px; line-height: 1.65; }
.world-quest span { font-size: 12.5px; }

.wd-prompt-zh { font-size: 19px; font-weight: 800; color: #4a2f1f; margin: 4px 0 14px; line-height: 1.6; }
.wd-hint { font-size: 13.5px; color: #8a7858; margin-bottom: 10px; line-height: 1.7; }
.wd-options { display: grid; gap: 9px; }
.wd-opt {
  display: flex; align-items: flex-start; gap: 10px;
  text-align: left; font-family: inherit; font-size: 15px; line-height: 1.55;
  border: 1.5px solid #e8d6b8; background: #fffdf6; color: #3f2a1c;
  border-radius: 13px; padding: 12px 14px; cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s;
}
.wd-opt b {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px;
  background: #f3e6cc; color: #8a6a3a;
}
.wd-opt:hover:not(:disabled) { border-color: #e09a4a; transform: translateY(-2px); }
.wd-opt.right { border-color: #2fae8a; background: #e8fbf3; }
.wd-opt.right b { background: #2fae8a; color: #fff; }
.wd-opt.wrong { border-color: #e45757; background: #ffefec; }
.wd-opt.wrong b { background: #e45757; color: #fff; }

@media (max-width: 720px) {
  .world-collect { left: 10px; bottom: 10px; font-size: 12px; }
  .wd-opt { font-size: 13.5px; padding: 10px 12px; }
  .wd-prompt-zh { font-size: 16.5px; }
}

/* ---------- 金币商城 ---------- */
.shop-wallet {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px; border-radius: 24px;
  background: linear-gradient(120deg, var(--card), var(--sun-soft));
  border: 1px solid color-mix(in srgb, var(--sun) 35%, var(--line));
  box-shadow: var(--shadow);
}
.shop-wallet-coin { font-size: 44px; line-height: 1; animation: promptFloat 3.6s ease-in-out infinite; }
.shop-wallet-label { font-size: 13.5px; color: var(--muted); letter-spacing: 1px; }
.shop-wallet-value { font-size: 38px; font-weight: 850; line-height: 1.1; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shop-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s;
}
.shop-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shop-item.soldout { opacity: .62; }
.shop-item-emoji { font-size: 34px; line-height: 1; }
.shop-item-name { font-size: 17px; font-weight: 800; font-family: var(--font-cute); }
.shop-item-desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; min-height: 36px; }
.shop-item-foot { display: flex; align-items: baseline; justify-content: space-between; width: 100%; margin-top: 4px; }
.shop-price { font-size: 15px; color: var(--brand-2); }
.shop-price b { font-size: 20px; }
.shop-stock { font-size: 12px; color: var(--muted); }
.shop-item .btn { width: 100%; margin-top: 6px; }
.shop-orders { padding: 6px 0; }
.shop-order { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line-2); }
.shop-order:first-child { border-top: 0; }
.shop-order-emoji { font-size: 24px; }
.shop-admin-list { padding: 8px 14px; }
.shop-admin-row {
  display: grid; grid-template-columns: 64px 1.3fr 90px 90px 1.8fr 80px 64px;
  gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2);
}
.shop-admin-row:first-child { border-top: 0; }
.shop-admin-row .input { min-width: 0; }
.shop-emoji-input { text-align: center; font-size: 19px; }
.shop-admin-orders { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.shop-admin-orders th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 14px 16px; }
.shop-admin-orders td { padding: 12px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.shop-admin-orders .btn { padding: 6px 10px; font-size: 12.5px; }
@media (max-width: 900px) {
  .shop-admin-row { grid-template-columns: 56px 1fr 80px 80px; }
  .shop-admin-row [data-f="desc"] { grid-column: 1 / -1; }
}

/* 小屏时完形填空提示不要挤成两行 */
@media (max-width: 720px) {
  .cloze-no { min-width: 0; white-space: normal; }
  .p-foot .clock-goal { display: none; }
}
/* 方块墨境 HUD 字号也放大一点 */
.world-title { font-size: 15px; }
.world-help { font-size: 12.5px; }
.world-coins { font-size: 14px; }
.wd-line { font-size: 15px; line-height: 1.8; }

/* ===== 空格输入 / 答错重试 / 错题解析 ===== */
.word.await-space {
  background: color-mix(in srgb, var(--brand) 14%, var(--line-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 24%, transparent);
}
.word.await-space::after {
  content: "␣ 按空格";
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  animation: blink 1.1s step-end infinite;
}
.p-hintline .hint-on { color: var(--brand); font-weight: 700; }
.note-title { font-weight: 800; font-size: 13.5px; margin-bottom: 5px; color: var(--ink); }
.note-line { margin: 3px 0; }
.note-gloss { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.note-gloss span { background: var(--line-2); border-radius: 7px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.note-gloss b { color: var(--brand-2); }
.answer-note.wrong-note {
  border-left: 3px solid var(--rose);
  background: var(--rose-soft);
  border-radius: 10px;
  padding: 10px 13px;
  margin-top: 10px;
}
.result.retry { align-items: flex-start; }
.result.retry .grow { min-width: 0; }
.result.retry .answer-note { margin-top: 8px; }
.btn-retry-pulse { animation: popIn .25s ease both; }

/* ===== 错题本 ===== */
.mistake-train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 8px; }
.mistake-train-card, .done-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mistake-train-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.mt-emoji { font-size: 28px; }
.mistake-list { display: flex; flex-direction: column; gap: 10px; }
.mistake-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mistake-item summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; }
.mistake-item summary::-webkit-details-marker { display: none; }
.mistake-item[open] summary { border-bottom: 1px solid var(--line-2); background: var(--line-2); }
.mi-badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--rose-soft); color: var(--rose); white-space: nowrap; }
.mi-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mi-main b { font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-body { padding: 14px 16px 16px; font-size: 13.5px; line-height: 1.75; }
.mi-zh { font-weight: 700; margin-bottom: 6px; }
.mi-note { color: var(--ink-2); }
.mi-gloss { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.mi-gloss span { background: var(--line-2); border-radius: 7px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.mi-gloss b { color: var(--brand-2); }
.empty-mistakes { margin-top: 20px; }
.mistake-train { background: var(--rose-soft) !important; border-color: color-mix(in srgb, var(--rose) 35%, transparent) !important; }
.coin-toast { display:inline-block; margin-top:8px; padding:3px 10px; border-radius:999px; background:color-mix(in srgb, var(--gold, #f5b301) 18%, transparent); color:var(--gold, #c88900); font-size:12.5px; font-weight:700; }

/* ===== 装备铺 ===== */
.hero-wallet { display:flex; align-items:center; gap:14px; padding:16px 20px; border-radius:16px; background:linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, var(--card)), var(--card)); border:1px solid var(--line-2); margin-bottom:16px; flex-wrap:wrap; }
.hero-wallet-coin { width:52px; height:52px; display:grid; place-items:center; font-size:30px; border-radius:14px; background:color-mix(in srgb, var(--gold, #f5b301) 20%, transparent); }
.hero-wallet-label { color:var(--muted); font-size:12.5px; }
.hero-wallet-value { font-size:30px; font-weight:800; color:var(--brand); line-height:1.1; }
.hero-level { font-size:13px; color:var(--muted); padding:6px 12px; border-radius:999px; background:var(--line-2); }
.hero-flash { padding:10px 16px; border-radius:10px; background:color-mix(in srgb, var(--mint, #2bb673) 15%, transparent); color:var(--brand-2); font-size:13px; margin-bottom:14px; }
.hero-stats { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:22px; }
.hero-stats > div { background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:12px; text-align:center; }
.hero-stats span { display:block; color:var(--muted); font-size:12px; }
.hero-stats b { display:block; font-size:20px; color:var(--ink); margin-top:2px; }
.hero-slots { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-bottom:24px; }
.hero-slot { display:flex; align-items:center; gap:12px; padding:14px; border:1px dashed var(--line-2); border-radius:12px; background:var(--card); }
.hero-slot.filled { border-style:solid; border-color:color-mix(in srgb, var(--brand) 35%, var(--line-2)); }
.hero-slot-icon { width:44px; height:44px; display:grid; place-items:center; font-size:24px; border-radius:10px; background:var(--line-2); }
.hero-slot-label { color:var(--muted); font-size:12px; }
.hero-slot-name { font-weight:700; font-size:15px; }
.hero-slot-stat { color:var(--brand-2); font-size:12px; margin-top:2px; }
.hero-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; margin-bottom:24px; }
.hero-card { position:relative; background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:14px; text-align:center; display:flex; flex-direction:column; gap:6px; }
.hero-card.worn { outline:2px solid var(--brand); }
.hero-card.r2 { border-color:#5aa9e6; }
.hero-card.r3 { border-color:#b06be0; }
.hero-card.r4 { border-color:var(--gold, #f5b301); box-shadow:0 0 0 1px color-mix(in srgb, var(--gold, #f5b301) 40%, transparent); }
.hero-card-badge { position:absolute; top:8px; right:8px; font-size:10px; padding:2px 7px; border-radius:999px; background:var(--line-2); color:var(--muted); }
.hero-card-icon { font-size:36px; line-height:1.2; }
.hero-card-name { font-weight:700; }
.hero-card-stat { color:var(--brand-2); font-size:12px; min-height:16px; }
.hero-card-desc { color:var(--muted); font-size:11px; min-height:28px; }
.hero-card .btn { margin-top:auto; }
@media (max-width:640px){ .hero-stats { grid-template-columns:repeat(3,1fr); } .hero-slots { grid-template-columns:1fr; } }

/* ===== 回合制战斗界面 + 倒计时 ===== */
.world-dialog.wd-turn { width: min(920px, 100%); }
.wd-timer { padding:12px 18px 10px; border-bottom:1px solid var(--line-2); background:var(--line-2); }
.wd-timer-top { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); margin-bottom:8px; }
.wd-timer-top b { font-size:18px; color:var(--brand); }
.wd-timer-track { height:10px; border-radius:999px; background:var(--card); overflow:hidden; }
.wd-timer-track i { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,var(--mint,#2bb673),var(--brand)); transition:width .9s linear; }
.wd-timer-track i.urgent { animation:wdBlink .7s infinite alternate; }
@keyframes wdBlink { from { opacity:1; } to { opacity:.6; } }
.wd-turn-body { display:grid; grid-template-columns:340px 1fr; gap:16px; padding:16px 18px; }
.wd-turn-left, .wd-turn-right { min-width:0; }

/* ===== 3D 打斗舞台 ===== */
.wd-arena { position:relative; height:360px; border-radius:16px; overflow:hidden; perspective:620px;
  background:radial-gradient(ellipse at 50% 78%, color-mix(in srgb, var(--brand) 20%, #2a2238) 0%, #241f30 55%, #1c1828 100%);
  border:1px solid var(--line-2); box-shadow:inset 0 -30px 50px rgba(0,0,0,.28); }
.wd-arena::before { /* 地平线光晕 */
  content:''; position:absolute; left:8%; right:8%; top:56%; height:2px; border-radius:999px;
  background:linear-gradient(90deg,transparent,color-mix(in srgb, var(--brand) 70%, transparent),transparent); box-shadow:0 0 22px var(--brand); }
.wd-ground { position:absolute; left:-30%; right:-30%; bottom:-58%; height:120%; transform:rotateX(70deg); transform-origin:50% 0;
  background:repeating-linear-gradient(0deg,transparent 0 27px,color-mix(in srgb, var(--brand) 16%, transparent) 27px 28px),
             repeating-linear-gradient(90deg,transparent 0 27px,color-mix(in srgb, var(--brand) 16%, transparent) 27px 28px),
             radial-gradient(ellipse at 50% 30%, color-mix(in srgb,var(--brand) 12%,#241f30), #1c1828 72%);
  box-shadow:inset 0 0 60px rgba(0,0,0,.4); }
.wd-fighters { position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:space-around; padding:0 22px 40px; }
.wd-fighter { position:relative; width:104px; text-align:center; z-index:2; }
.wd-fighter .wd-shadow { position:absolute; left:50%; bottom:-6px; width:72px; height:15px; margin-left:-36px; border-radius:50%; background:rgba(0,0,0,.45); filter:blur(3px); }
.wd-sprite { position:relative; font-size:62px; line-height:1.05; filter:drop-shadow(0 8px 10px rgba(0,0,0,.35)); display:inline-block;
  transform-origin:50% 90%; animation:wdIdle 2.4s ease-in-out infinite alternate; }
.wd-fighter.me .wd-sprite { animation-delay:-1.2s; }
.wd-fighter.enemy.final-boss .wd-sprite { font-size:70px; filter:drop-shadow(0 0 14px var(--gold,#f5b301)); animation:wdBossFloat 1.5s ease-in-out infinite alternate; }
@keyframes wdIdle { from { transform:translateY(0) rotate(-2deg); } to { transform:translateY(-7px) rotate(2deg); } }
@keyframes wdBossFloat { from { transform:translateY(0) scale(1) rotate(-2deg); } to { transform:translateY(-9px) scale(1.06) rotate(2deg); } }
.wd-fighter-name { font-size:11.5px; font-weight:700; margin:3px 0 5px; color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.6); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wd-fighter .wd-mini-hp { height:8px; border-radius:999px; background:rgba(0,0,0,.45); overflow:hidden; border:1px solid rgba(255,255,255,.15); }
.wd-mini-hp i { display:block; height:100%; background:linear-gradient(90deg,#ff7a5c,#e23b3b); transition:width .45s; }
.wd-mini-hp.me i { background:linear-gradient(90deg,#4cd0a0,#2bb673); }
.wd-mini-num { font-size:10px; color:#e9e4f2; margin-top:3px; text-shadow:0 1px 3px rgba(0,0,0,.7); }
.wd-vs { position:absolute; left:50%; top:44%; transform:translate(-50%,-50%); font-size:18px; font-weight:900; color:#fff;
  text-shadow:0 0 18px var(--brand),0 2px 4px #000; z-index:3; display:flex; flex-direction:column; align-items:center; line-height:1; }
.wd-vs span { font-size:10px; font-weight:700; margin-top:3px; opacity:.85; }
/* 挥砍 / 命中特效：由 JS 添加 class 触发 */
.wd-fighter.strike.me .wd-sprite { animation:wdStrikeMe .5s ease; }
.wd-fighter.strike.enemy .wd-sprite { animation:wdStrikeFoe .5s ease; }
@keyframes wdStrikeMe { 0%{transform:translateX(0)} 35%{transform:translateX(42px) translateY(-6px) rotate(14deg) scale(1.1)} 100%{transform:translateX(0)} }
@keyframes wdStrikeFoe { 0%{transform:translateX(0)} 35%{transform:translateX(-42px) translateY(-6px) rotate(-14deg) scale(1.1)} 100%{transform:translateX(0)} }
.wd-fighter.hurt .wd-sprite { animation:wdHurt .45s ease; }
@keyframes wdHurt { 0%,100%{filter:drop-shadow(0 8px 10px rgba(0,0,0,.35))} 20%{filter:brightness(2.4) drop-shadow(0 0 16px #fff);transform:translateX(8px) scale(1.12)} 45%{transform:translateX(-6px)} 70%{transform:translateX(3px)} }
/* 技能光效层 */
.wd-skill-fx { position:absolute; inset:0; pointer-events:none; z-index:5; overflow:hidden; }
.wd-slash { position:absolute; width:150px; height:150px; left:50%; top:46%; transform:translate(-50%,-50%) rotate(-35deg); opacity:0;
  background:conic-gradient(from 200deg, transparent 0deg, transparent 250deg, #fff 300deg, var(--brand) 340deg, transparent 360deg);
  -webkit-mask:radial-gradient(circle,transparent 38%,#000 42% 60%,transparent 63%); mask:radial-gradient(circle,transparent 38%,#000 42% 60%,transparent 63%);
  border-radius:50%; }
.wd-slash.go { animation:wdSlash .5s ease-out forwards; }
@keyframes wdSlash { 0%{opacity:0;transform:translate(-50%,-50%) rotate(-60deg) scale(.5)} 30%{opacity:1} 100%{opacity:0;transform:translate(-50%,-50%) rotate(70deg) scale(1.35)} }
.wd-boom { position:absolute; width:18px; height:18px; left:50%; top:48%; border-radius:50%; border:3px solid #fff; opacity:0;
  box-shadow:0 0 18px 6px var(--brand); }
.wd-boom.go { animation:wdBoom .55s ease-out forwards; }
@keyframes wdBoom { 0%{opacity:.95;transform:translate(-50%,-50%) scale(.4)} 100%{opacity:0;transform:translate(-50%,-50%) scale(6)} }
.wd-dmg { position:absolute; left:50%; top:34%; transform:translateX(-50%); font-size:28px; font-weight:900; color:#fff;
  text-shadow:0 2px 0 #8a2b1f,0 0 16px var(--brand); opacity:0; white-space:nowrap; }
.wd-dmg.crit { color:#ffe27a; font-size:36px; text-shadow:0 2px 0 #a86a00,0 0 20px #ffb300; }
.wd-dmg.taken { color:#9fd8ff; text-shadow:0 2px 0 #1b4a7a,0 0 16px #2f8fe0; }
.wd-dmg.go { animation:wdDmg 1s ease-out forwards; }
@keyframes wdDmg { 0%{opacity:0;transform:translate(-50%,10px) scale(.6)} 25%{opacity:1;transform:translate(-50%,-6px) scale(1.2)} 100%{opacity:0;transform:translate(-50%,-52px) scale(1)} }
/* 屏幕震动 */
.wd-arena.shake { animation:wdShake .38s ease; }
@keyframes wdShake { 0%,100%{transform:translate(0,0)} 20%{transform:translate(5px,-3px)} 40%{transform:translate(-5px,3px)} 60%{transform:translate(4px,2px)} 80%{transform:translate(-3px,-2px)} }
.wd-log { width:100%; margin-top:10px; max-height:104px; overflow:auto; font-size:11.5px; line-height:1.6; background:var(--line-2); border-radius:10px; padding:8px 10px; }
.wd-log .hit { color:#e2543f; } .wd-log .hurt { color:#3b7fe2; }
.wd-qhead { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.wd-round { font-size:12px; color:var(--muted); }
.wd-mode { font-size:12px; font-weight:700; padding:2px 10px; border-radius:999px; background:color-mix(in srgb, var(--brand) 15%, transparent); color:var(--brand); }
.wd-final-tag { font-size:12px; font-weight:800; padding:2px 10px; border-radius:999px; background:color-mix(in srgb, var(--gold,#f5b301) 22%, transparent); color:#a97600; }
.wd-turn-right .answer { min-height:96px; }
@media (max-width:700px){ .wd-turn-body { grid-template-columns:1fr; } .wd-arena { height:250px; } .wd-fighter { width:88px; } .wd-sprite { font-size:52px; } }

/* ===== 真实 WebGL 3D 对战舞台（覆盖在 CSS 舞台之上） ===== */
.wd-arena-3d { background:radial-gradient(ellipse at 50% 60%, #4a3f66 0%, #2a2438 60%, #1a1626 100%); }
.wd-arena-3d::before { display:none; }
.wd-arena-3d .wd-ground { display:none; }
.wd-stage-canvas { position:absolute; inset:0; width:100% !important; height:100% !important; z-index:1; display:block; }
.wd-arena-3d .wd-fighters { align-items:flex-end; padding:0 14px 10px; z-index:3; pointer-events:none; }
.wd-arena-3d .wd-fighter { width:44%; background:color-mix(in srgb, #14101f 76%, transparent); border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:5px 8px 6px; }
.wd-arena-3d .wd-fighter.enemy { border-color:rgba(226,84,63,.5); }
.wd-arena-3d .wd-fighter.me { border-color:rgba(90,180,255,.5); }
.wd-arena-3d .wd-fighter-name { font-size:11px; margin:0 0 4px; }
.wd-arena-3d .wd-mini-hp { height:7px; }
.wd-arena-3d .wd-mini-num { font-size:9.5px; }
.wd-arena-3d .wd-vs { top:auto; bottom:20%; font-size:14px; }
.wd-arena-3d .wd-skill-fx { z-index:4; }

/* ================================================================== */
/* 世界内战斗：顶部血条 + 大倒计时，底部答题条                          */
/* ================================================================== */
.world-dialog-overlay.is-battle {
  display: block; padding: 0; background: none;
  pointer-events: none;
}
.world-dialog-overlay.is-battle::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(6, 5, 12, .66) 0%, rgba(6, 5, 12, .12) 18%,
    rgba(6, 5, 12, 0) 46%, rgba(6, 5, 12, .55) 72%,
    rgba(6, 5, 12, .88) 88%, rgba(6, 5, 12, .94) 100%);
}

.wb-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; padding: 16px 22px 0;
}
.wb-side { width: min(30vw, 320px); color: #f4eeff; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.wb-side.foe { text-align: right; }
.wb-name { font-size: 13px; font-weight: 800; letter-spacing: .6px; margin-bottom: 6px; }
.wb-side.foe .wb-name { color: #ffcdb6; }
.wb-hp {
  height: 13px; border-radius: 999px; background: rgba(8, 6, 14, .68);
  border: 1px solid rgba(255, 255, 255, .24); overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .4);
}
.wb-hp i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2fc79a, #8ef0c8);
  transition: width .45s cubic-bezier(.3, .9, .4, 1);
}
.wb-hp.foe i { float: right; background: linear-gradient(270deg, #ff9a5c, #e2483a); }
.wb-num { font-size: 11px; opacity: .86; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 顶部大倒计时 */
.wb-count-wrap {
  display: flex; flex-direction: column; align-items: center;
  min-width: 132px; transform-origin: 50% 40%;
}
.wb-count {
  font-family: "Impact", "Arial Black", "Segoe UI", system-ui, sans-serif;
  font-size: 86px; line-height: .92; font-weight: 900; letter-spacing: -2px;
  font-variant-numeric: tabular-nums; transform-origin: 50% 62%;
  color: #ffe0a0; transform: scale(1);
}
.wb-count.tick { animation: wbTickPop .34s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes wbTickPop {
  0% { transform: scale(1.45); }
  55% { transform: scale(.93); }
  100% { transform: scale(1); }
}
.wb-count.danger { animation: wbRedPulse .55s ease-in-out infinite alternate; }
@keyframes wbRedPulse { from { opacity: .82; } to { opacity: 1; } }
.wb-count-wrap.quake { animation: wbQuake .26s linear infinite; }
@keyframes wbQuake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-3px, 2px) rotate(-.6deg); }
  40% { transform: translate(3px, -2px) rotate(.6deg); }
  60% { transform: translate(-2px, -2px) rotate(-.4deg); }
  80% { transform: translate(2px, 2px) rotate(.4deg); }
}
.wb-count-track {
  width: 122px; height: 4px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .16); margin-top: 4px;
}
.wb-count-track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffd76a, #ffe9a8);
  transition: width .16s linear;
}
.wb-count-label { font-size: 9.5px; letter-spacing: 4px; opacity: .55; margin-top: 4px; color: #efe6ff; }

/* 底部答题条 */
.wb-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(1040px, calc(100% - 26px)); max-height: 46vh; overflow: auto;
  pointer-events: auto; padding: 11px 15px 13px;
  color: #f2ecff;
  background: linear-gradient(165deg, rgba(30, 23, 46, .95), rgba(15, 11, 24, .97));
  border: 1px solid rgba(180, 150, 255, .3); border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(7px);
  --ink: #f6f0ff; --ink-2: #ded4f2; --muted: #a99cc4;
  --line: rgba(190, 170, 255, .38); --line-2: rgba(255, 255, 255, .07);
  --brand: #b197fc; --brand-2: #d8c8ff; --brand-soft: rgba(177, 151, 252, .2);
  --rose: #ff8a7a;
}
.wb-bar-head { display: flex; align-items: center; gap: 9px; font-size: 11.5px; margin-bottom: 9px; }
.wb-round { color: #c9b6ff; font-weight: 800; }
.wb-mode { padding: 2px 9px; border-radius: 999px; background: rgba(177, 151, 252, .2); color: #dccdff; font-weight: 700; }
.wb-final { padding: 2px 9px; border-radius: 999px; background: rgba(245, 179, 1, .2); color: #ffd98a; font-weight: 800; }
.wb-logline { flex: 1; min-width: 0; color: #a99cc4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-logline b { color: #ffd08a; font-weight: 700; }
.wb-logline b.hurt { color: #8fc8ff; }
.wb-flee {
  margin-left: auto; flex: none; cursor: pointer; font-size: 11px; padding: 3px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22);
  background: transparent; color: #cbbfe4;
}
.wb-flee:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.wb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.wb-tag { font-size: 12.5px; font-weight: 800; color: #ffd9a0; }
.wb-hint { font-size: 12px; color: #a99cc4; }
.wb-hint b { color: #fff; }
.wb-mini {
  cursor: pointer; font-size: 11px; padding: 2px 10px; border-radius: 999px;
  background: rgba(177, 151, 252, .16); border: 1px solid rgba(177, 151, 252, .42); color: #dccdff;
}
.wb-mini:hover { background: rgba(177, 151, 252, .28); }
.wb-listen { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #8fd0ff; padding: 4px 0 6px; }

.wb-bar .answer {
  margin-top: 0; min-height: 62px; padding: 9px 12px;
  background: rgba(255, 255, 255, .05); border: 1px dashed rgba(200, 180, 255, .28); border-radius: 11px;
}
.wb-bar .word .letters { font-size: clamp(19px, 2.4vw, 26px); }
.wb-bar .word .ch { border-bottom-color: rgba(200, 180, 255, .4); }
.wb-bar .word .ch:not(.done):not(.fixed)::before { color: rgba(180, 165, 210, .55); }
.wb-bar .word .ch.done { color: #fff; border-bottom-color: rgba(255, 255, 255, .55); }
.wb-bar .word.active .ch.next { border-bottom-color: #b197fc; }
.wb-bar .word.active { background: rgba(177, 151, 252, .14); border-color: rgba(177, 151, 252, .5); }

.wb-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wb-opt {
  display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
  padding: 9px 11px; border-radius: 10px; font-size: 13px; color: #efe8ff;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(190, 170, 255, .24);
  transition: background .15s, border-color .15s, transform .12s;
}
.wb-opt b {
  flex: none; width: 19px; height: 19px; border-radius: 6px; font-size: 11px;
  display: grid; place-items: center; background: rgba(177, 151, 252, .26); color: #dccdff;
}
.wb-opt:hover { background: rgba(177, 151, 252, .18); border-color: rgba(190, 170, 255, .5); }
.wb-opt.right { background: rgba(60, 200, 150, .24); border-color: rgba(90, 235, 175, .7); }
.wb-opt.wrong { background: rgba(230, 80, 70, .24); border-color: rgba(255, 120, 110, .7); }
.wb-opt:disabled { cursor: default; }

/* 战斗飘字层 */
.wb-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.wb-dmg {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 900; font-size: 30px; font-variant-numeric: tabular-nums;
  color: #ffd08a; text-shadow: 0 2px 0 rgba(80, 20, 0, .7), 0 0 20px rgba(255, 160, 60, .85);
  animation: wbDmgFloat 1.05s ease-out forwards;
}
.wb-dmg.crit { font-size: 42px; color: #fff2a8; text-shadow: 0 3px 0 #a86a00, 0 0 28px #ffb300; }
.wb-dmg.taken { color: #a8ddff; text-shadow: 0 2px 0 #123a5c, 0 0 20px rgba(90, 180, 255, .9); }
@keyframes wbDmgFloat {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -62%) scale(1.16); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

@media (max-width: 720px) {
  .wb-top { padding: 10px 12px 0; gap: 8px; }
  .wb-side { width: 34vw; }
  .wb-name { font-size: 11px; }
  .wb-count { font-size: 62px; }
  .wb-count-track { width: 84px; }
  .wb-bar { max-height: 52vh; padding: 9px 10px 11px; }
  .wb-options { grid-template-columns: 1fr; }
  .wb-logline { display: none; }
}

/* 战斗时世界 HUD 让位 */
.world-hud { transition: opacity .22s ease; }
.world-hud.is-hidden { opacity: 0 !important; pointer-events: none !important; }

/* 倒计时数字：留出放大弹跳的余量，别被屏幕顶边切掉 */
.wb-top { padding-top: 18px; }
.wb-count-wrap { padding-top: 4px; }
.wb-count { font-size: 80px; transform-origin: 50% 50%; }
.wb-count.tick { animation: wbTickPop2 .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes wbTickPop2 {
  0% { transform: scale(1.24); }
  60% { transform: scale(.95); }
  100% { transform: scale(1); }
}

/* 倒计时数字的暗底，让它从场景里跳出来 */
.wb-count {
  padding: 2px 22px 4px;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 45%, rgba(8, 6, 14, .58), rgba(8, 6, 14, .18) 68%, rgba(8, 6, 14, 0) 78%);
  backdrop-filter: blur(2px);
}

/* 战斗时压暗四周，让中间的对峙从场景里"抠"出来 */
.world-dialog-overlay.is-battle::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 62% 58% at 50% 46%, rgba(6, 5, 12, 0) 0%, rgba(6, 5, 12, .18) 52%, rgba(6, 5, 12, .62) 84%, rgba(6, 5, 12, .82) 100%),
    linear-gradient(180deg, rgba(6, 5, 12, .5) 0%, rgba(6, 5, 12, 0) 22%, rgba(6, 5, 12, 0) 60%, rgba(6, 5, 12, .55) 82%, rgba(6, 5, 12, .9) 100%);
  mix-blend-mode: multiply;
}

/* 暗角只压场景，不能压到 HUD：给 UI 明确的层级 */
.world-dialog-overlay.is-battle::after { z-index: 0; mix-blend-mode: normal; opacity: .92; }
.wb-top, .wb-bar { position: absolute; z-index: 4; }
.wb-fx { z-index: 5; }

/* ===== 像素墨境（2D 像素关卡）附加样式 ===== */
.px-root { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 30%, #2a2133 0%, #140f1b 60%, #0b0810 100%); }
.px-root #px-exit {
  position: absolute; top: 10px; right: 12px; z-index: 30;
  border: 2px solid #a97c4f; background: #2b1e14; color: #f5e5c4;
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.px-root #px-exit:hover { background: #3c2a1c; border-color: #e8b44a; }
/* 课程打字组件在像素面板里的适配 */
.px-root #panel .p-body .typing-line, .px-root #panel .p-body .chunks { max-width: 100%; }
.px-root #panel .p-body .puzzle-answer { margin-top: 4px; }
.px-root #panel .p-body .tiles { margin-top: 6px; }
.px-root #panel .p-body .btn.small { padding: 3px 10px; font-size: 12px; }

/* ===== T14 课程→游戏衔接：结算页自动进关 + 地图卡片角标/缺口文案 ===== */
/* 结算页自动进关（§A.3）：大按钮 + 进度条 + 立即进入行 */
.auto-enter { margin: 14px 0 4px; }
.auto-enter-btn {
  position: relative; width: 100%; min-height: 52px; overflow: hidden;
  font-size: 16px; font-weight: 700; border-radius: 12px;
}
.auto-enter-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  transition: width .25s linear; pointer-events: none;
}
.auto-enter-txt { position: relative; z-index: 1; }
.auto-enter-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* 未完成缺口双句（Q1：主句=题，副句=词） */
.gap-block { margin: 10px 0 2px; }
.gap-main { font-size: 15px; font-weight: 700; color: var(--brand); }
.gap-sub { font-size: 13px; margin-top: 4px; }
/* 完成但暂时进不了关卡（§A.2：原因留在结算页，绝不整页 403） */
.world-blocked { margin: 8px 0 0; }
/* 世界地图卡片：当场额度角标（§C.5 earnedPassReady）+ 缺口行 */
.world-unit { position: relative; }
.wu-pass-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--sun, #f0b429) 20%, #fff8e6);
  border: 1px solid color-mix(in srgb, var(--sun, #f0b429) 55%, transparent);
  color: #8a5a00; white-space: nowrap;
}
.wu-gap { margin-top: 6px; font-size: 12px; }
