﻿/* ==========================================================================
   词岛探险 · Oscar 英语闯关岛
   设计：奶油纸张 + 贴纸卡牌 + 墨线描边；手机 / 平板优先
   ========================================================================== */

/* ---------- 自托管字体 ---------- */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fredoka.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces.woff2') format('woff2');
}

/* ---------- 变量 ---------- */
:root {
  color-scheme: light;
  --paper: #fbf3e3;
  --paper-2: #f3e6cd;
  --card: #fffdf7;
  --card-2: #fff7e6;
  --ink: #2b2a3d;
  --ink-2: #6c6880;
  --ink-3: #a09aae;
  --coral: #ff5e4c;
  --coral-d: #e14534;
  --sun: #ffc53d;
  --sun-d: #e8a915;
  --teal: #17a398;
  --teal-d: #0f7f76;
  --sky: #4d8df6;
  --mint: #7fe0a8;
  --mint-d: #46c07c;
  --pink: #ff8fa3;
  --pink-d: #f06c84;
  --line: rgba(43, 42, 61, .13);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;
  --bd: 2.5px solid var(--ink);
  --shadow: 0 5px 0 var(--ink);
  --shadow-sm: 0 3px 0 var(--ink);
  --font-ui: 'Fredoka', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-word: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Songti SC', serif;
  --tab-h: 74px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(43, 42, 61, .085) 1.1px, transparent 1.1px),
    radial-gradient(rgba(255, 197, 61, .22) 5px, transparent 5.5px);
  background-size: 24px 24px, 120px 120px;
  background-position: 0 0, 30px 40px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}
body.in-session { overflow: hidden; }
body.in-session .tabbar { opacity: 0; pointer-events: none; transform: translateY(120%); }

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px dashed var(--teal); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; }

/* ---------- 背景装饰 ---------- */
.bg-deco {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
}
.bg-deco .deco-sun { transform: translate(88vw, 7vh); }
.bg-deco .deco-star { transform: translate(6vw, 30vh) rotate(-12deg); }
.bg-deco .deco-squiggle { transform: translate(2vw, 82vh); opacity: .75; }
.bg-deco .deco-ring { transform: translate(92vw, 58vh); opacity: .7; }
@media (min-width: 900px) {
  .bg-deco { opacity: .62; }
  .bg-deco .deco-sun { transform: translate(30vw, 6vh); }
  .bg-deco .deco-ring { transform: translate(72vw, 62vh); }
}

/* ---------- 应用框架 ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(var(--tab-h) + 26px + env(safe-area-inset-bottom));
}
.app.no-tabbar { padding-bottom: 24px; }
.screen { display: flex; flex-direction: column; gap: 16px; }

/* 进场动画：错峰浮现 */
.screen > * { animation: rise .42s cubic-bezier(.22, .8, .3, 1) both; }
.screen > *:nth-child(2) { animation-delay: .04s; }
.screen > *:nth-child(3) { animation-delay: .08s; }
.screen > *:nth-child(4) { animation-delay: .12s; }
.screen > *:nth-child(5) { animation-delay: .16s; }
.screen > *:nth-child(6) { animation-delay: .2s; }
.screen > *:nth-child(7) { animation-delay: .24s; }
.screen > *:nth-child(8) { animation-delay: .28s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
}
.tabbar-inner {
  pointer-events: auto;
  max-width: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: var(--bd);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--ink);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 2px 6px;
  border-radius: 17px;
  color: var(--ink-2);
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.tab-ico svg { width: 24px; height: 24px; }
.tab-label { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.tab.active { background: var(--sun); color: var(--ink); }
.tab:active { transform: scale(.94); }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card.flat { box-shadow: none; }
.card.sun { background: linear-gradient(160deg, #fff4d6, #ffe7ae); }
.card.mint { background: #e9fbf1; }
.card.rose { background: #fff0f2; }

.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 4px 2px 0; }
.screen-head h1 { font-size: clamp(23px, 6.2vw, 30px); font-weight: 600; letter-spacing: -.01em; }
.screen-head .sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-title { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sec-title::before {
  content: ''; width: 22px; height: 8px; border-radius: 5px;
  background: var(--coral); border: 2px solid var(--ink); flex: none;
}
.sec-more { font-size: 13px; color: var(--ink-2); text-decoration: none; background: none; padding: 6px 4px; }
.muted { color: var(--ink-2); font-size: 13.5px; }
.tiny { font-size: 12px; color: var(--ink-3); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; border: 2px solid var(--ink);
  font-size: 12px; font-weight: 600; background: var(--card); white-space: nowrap;
}
.tag.sun { background: var(--sun); }
.tag.mint { background: var(--mint); }
.tag.coral { background: var(--coral); color: #fff; }
.tag.sky { background: #e4eeff; }
.tag.plain { border-color: var(--line); background: transparent; color: var(--ink-2); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: var(--bd); border-radius: 16px;
  background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--coral); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn-sun { background: var(--sun); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn-ghost:active { transform: none; }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; font-size: 18px; border-radius: 18px; }
.btn-sm { min-height: 38px; padding: 6px 13px; font-size: 13.5px; border-radius: 12px; box-shadow: 0 2px 0 var(--ink); }
.btn-icon { width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.btn-icon svg { width: 22px; height: 22px; }

/* 按钮内图标统一尺寸（避免 SVG 默认撑满容器） */
.btn { white-space: nowrap; }
.btn > svg { width: 20px; height: 20px; flex: none; }
.btn-sm > svg { width: 16px; height: 16px; }
.btn-lg > svg { width: 22px; height: 22px; }
.btn-icon > svg { width: 22px; height: 22px; }
.streak-pill { white-space: nowrap; }
.streak-pill svg { width: 17px; height: 17px; flex: none; }
.combo svg { width: 15px; height: 15px; flex: none; }
.feedback .fb-ico svg { width: 20px; height: 20px; }
.daily-card .flag { display: flex; align-items: center; justify-content: center; }
.daily-card .flag svg { width: 40px; height: 40px; }
.verb-table { min-width: 620px; }
.verb-table td:first-child .row > button svg { width: 15px; height: 15px; }

/* 进度条 / 圆环 */
.bar { height: 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--teal); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.bar.thin { height: 9px; border-width: 2px; }
.bar.sun > span { background: var(--sun); }
.bar.coral > span { background: var(--coral); }
.bar.mint > span { background: var(--mint); }

.ring { position: relative; width: 86px; height: 86px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-bg { fill: none; stroke: var(--paper-2); stroke-width: 10; }
.ring .ring-val { fill: none; stroke: var(--teal); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.ring-text b { font-size: 21px; font-weight: 600; }
.ring-text small { font-size: 10.5px; color: var(--ink-2); margin-top: 4px; }

/* 顶部信息条 */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 2px;
  position: sticky; top: 0; z-index: 12;
  background: linear-gradient(var(--paper) 70%, rgba(251, 243, 227, 0));
  padding-top: max(6px, env(safe-area-inset-top));
}
.topbar h2 { font-size: 17px; font-weight: 600; }

/* 会话进度点 */
.dots { flex: 1; display: flex; gap: 4px; }
.dots i {
  flex: 1; height: 9px; border-radius: 99px;
  background: var(--paper-2); border: 2px solid rgba(43, 42, 61, .22);
  transition: background .25s ease, border-color .25s ease;
}
.dots i.done { background: var(--teal); border-color: var(--ink); }
.dots i.bad { background: var(--pink); border-color: var(--ink); }
.dots i.now { background: var(--sun); border-color: var(--ink); }

.combo {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--sun); border: 2px solid var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  animation: pop .3s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 首页 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  border: var(--bd);
  border-radius: 30px;
  background: linear-gradient(170deg, #fff6de 0%, #ffe6ae 62%, #ffd98a 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute; right: -46px; top: -54px; width: 190px; height: 190px;
  border-radius: 50%; border: 3px dashed rgba(43, 42, 61, .26);
}
.hero-greet { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.hero h1 { font-size: clamp(26px, 7.4vw, 36px); font-weight: 600; line-height: 1.12; margin-top: 2px; letter-spacing: -.015em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--mint) 62%, var(--mint) 92%, transparent 92%); }
.hero-main { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.hero-mascot { width: 92px; height: 92px; flex: none; margin-left: auto; animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
.level-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.level-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 5px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600;
}
.level-chip b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 12px; }
.hero .bar { background: #fffaf0; }

.goal-card { display: flex; gap: 14px; align-items: center; }
.goal-copy { flex: 1; min-width: 0; }
.goal-title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.goal-sub { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.goal-cta { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.streak-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; border: 2px solid var(--ink);
  background: #fff3e0; font-size: 13px; font-weight: 600;
}
.streak-pill.hot { background: #ffe3c2; }

.daily-strip { display: flex; gap: 6px; margin-top: 12px; }
.daily-strip i {
  flex: 1; height: 26px; border-radius: 8px; border: 2px solid rgba(43, 42, 61, .2);
  background: rgba(255, 255, 255, .55); position: relative;
}
.daily-strip i.on { background: var(--teal); border-color: var(--ink); }
.daily-strip i.today { outline: 2px dashed var(--ink); outline-offset: 2px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode {
  position: relative; text-align: left; padding: 14px 14px 13px;
  border: var(--bd); border-radius: 22px; background: var(--card);
  box-shadow: var(--shadow-sm); min-height: 128px;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .14s ease, box-shadow .14s ease;
}
.mode:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.mode-ico {
  width: 40px; height: 40px; border-radius: 13px; border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center; background: var(--sun);
}
.mode-ico svg { width: 22px; height: 22px; }
.mode h3 { font-size: 16.5px; font-weight: 600; }
.mode p { font-size: 12px; color: var(--ink-2); }
.mode .mini-bar { margin-top: auto; padding-top: 6px; }
.mode.c1 .mode-ico { background: var(--sun); }
.mode.c2 .mode-ico { background: var(--mint); }
.mode.c3 .mode-ico { background: #cfe0ff; }
.mode.c4 .mode-ico { background: #ffd3da; }
.mode.c5 .mode-ico { background: #ffe0c2; }
.mode.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
.mode.wide .mode-copy { flex: 1; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border: var(--bd); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm);
  text-align: left;
}
.quick:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.quick .q-ico { font-size: 22px; }
.quick b { display: block; font-size: 14.5px; }
.quick small { color: var(--ink-2); font-size: 11.5px; }

/* 每日挑战入口 */
.daily-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border: var(--bd); border-radius: 26px;
  background: linear-gradient(150deg, #ffe9b0, #ffd36e);
  box-shadow: var(--shadow);
}
.daily-card .flag { width: 54px; height: 54px; flex: none; }
.daily-card h3 { font-size: 19px; font-weight: 600; }
.daily-card p { font-size: 13px; color: #6b5627; }

/* ---------- 闯关页 ---------- */
.mode-card { display: flex; flex-direction: column; gap: 12px; }
.mode-card-head { display: flex; align-items: center; gap: 12px; }
.mode-card-head .mode-ico { flex: none; }
.mode-card h3 { font-size: 18px; font-weight: 600; }
.mode-card p { font-size: 12.5px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--card); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 0 var(--ink); transition: transform .1s ease, background .15s ease;
}
.chip:active { transform: translateY(2px); box-shadow: none; }
.chip[aria-pressed='true'] { background: var(--sun); }
.chip-sub { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.mode-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-card-foot .best { font-size: 12px; color: var(--ink-2); }
.mode-card .btn-primary { min-width: 128px; }

/* ---------- 答题会话 ---------- */
.session { display: flex; flex-direction: column; gap: 12px; min-height: calc(100dvh - 32px); }
.session-body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.qcard {
  position: relative;
  border: var(--bd); border-radius: 28px; background: var(--card);
  box-shadow: var(--shadow); padding: 20px 18px 22px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.qcard::after {
  content: ''; position: absolute; right: -34px; bottom: -44px; width: 130px; height: 130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 197, 61, .38), transparent 68%);
}
.q-kicker { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.q-ask { font-size: 15.5px; font-weight: 600; margin-top: 2px; }
.q-sub { font-size: 13px; color: var(--ink-2); }
.big-word {
  font-family: var(--font-word); font-weight: 600;
  font-size: clamp(38px, 11vw, 58px); line-height: 1.04;
  letter-spacing: -.02em; word-break: break-word;
  margin: 2px 0 2px;
}
.big-word.sm { font-size: clamp(30px, 8.4vw, 44px); }
.big-cn { font-size: clamp(24px, 6.6vw, 32px); font-weight: 600; line-height: 1.25; }
.q-hint { font-size: 13px; color: var(--ink-2); }
.q-hint b { color: var(--ink); font-weight: 600; }
.speak-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink);
  background: var(--card-2); box-shadow: 0 2px 0 var(--ink);
  vertical-align: middle;
}
.speak-btn svg { width: 20px; height: 20px; }
.speak-btn:active { transform: translateY(2px); box-shadow: none; }

.options { display: grid; gap: 10px; }
@media (min-width: 560px) { .options { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 62px; padding: 12px 14px;
  border: var(--bd); border-radius: 18px; background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 18px; font-weight: 500; text-align: center;
  transition: transform .1s ease, background .15s ease, box-shadow .1s ease;
  word-break: break-word;
}
.opt .opt-idx {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  background: var(--paper-2); border: 2px solid var(--ink);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.opt.en { font-family: var(--font-word); font-size: 20px; letter-spacing: -.01em; }
.opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.opt.correct { background: var(--mint); border-color: var(--ink); animation: goodPulse .45s ease; }
.opt.wrong { background: #ffd7dd; animation: shake .4s ease; }
.opt.dim { opacity: .5; }
.opt.pop { animation: pop .25s ease; }
@keyframes goodPulse { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }

.feedback {
  border: var(--bd); border-radius: 20px; padding: 14px 15px;
  display: flex; gap: 12px; align-items: flex-start;
  animation: rise .28s ease both;
}
.feedback.good { background: #e6fbef; }
.feedback.bad { background: #fff0f2; }
.feedback .fb-ico { width: 34px; height: 34px; flex: none; border-radius: 11px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; background: #fff; }
.feedback.good .fb-ico { background: var(--mint); }
.feedback.bad .fb-ico { background: var(--pink); }
.feedback b { display: block; font-size: 15px; }
.feedback .fb-answer { font-family: var(--font-word); font-size: 17px; font-weight: 600; margin-top: 1px; }
.feedback p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.fb-next { margin-top: 10px; }

.xp-float {
  position: fixed; z-index: 60; pointer-events: none;
  font-weight: 600; font-size: 22px; color: var(--teal-d);
  text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff;
  animation: floatUp .9s ease-out forwards;
}
@keyframes floatUp { from { transform: translateY(0) scale(.8); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-58px) scale(1.12); opacity: 0; } }

.spell-row { display: flex; gap: 8px; }
.spell-input {
  flex: 1; min-width: 0; min-height: 58px; padding: 10px 16px;
  border: var(--bd); border-radius: 16px; background: #fff;
  font-family: var(--font-word); font-size: 22px; font-weight: 600;
  box-shadow: inset 0 2px 0 rgba(43, 42, 61, .07);
}
.spell-input:focus { outline: 3px solid var(--sun); outline-offset: 1px; }
.spell-row .btn { flex: none; min-width: 92px; }
.spell-tip { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 结算 ---------- */
.result { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.result-card { text-align: center; padding: 26px 20px 22px; position: relative; overflow: hidden; }
.result-card h2 { font-size: 27px; font-weight: 600; margin-top: 6px; }
.result-card .r-sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.stars { display: flex; justify-content: center; gap: 8px; margin: 6px 0 2px; }
.star { width: 52px; height: 52px; opacity: .28; transform: scale(.8); }
.star.on { opacity: 1; animation: starPop .5s cubic-bezier(.3, 1.7, .5, 1) both; }
.star:nth-child(2).on { animation-delay: .18s; }
.star:nth-child(3).on { animation-delay: .36s; }
@keyframes starPop { 0% { transform: scale(.2) rotate(-30deg); } 70% { transform: scale(1.18) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.result-stat { border: 2px solid var(--line); border-radius: 16px; padding: 10px 6px; background: rgba(255, 255, 255, .6); }
.result-stat b { display: block; font-size: 21px; font-weight: 600; }
.result-stat small { font-size: 11.5px; color: var(--ink-2); }
.review-list { display: flex; flex-direction: column; gap: 8px; }
.review-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--card);
  font-size: 13.5px;
}
.review-item .ri-q { flex: 1; min-width: 0; }
.review-item .ri-a { font-family: var(--font-word); font-weight: 600; font-size: 15px; }

/* ---------- 背卡片 ---------- */
.deck-stage { position: relative; display: flex; flex-direction: column; gap: 14px; }
.fc-wrap { perspective: 1400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.fc {
  position: relative; width: 100%; min-height: 330px;
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  cursor: pointer;
}
.fc.flipped { transform: rotateY(180deg); }
.fc.dragging { transition: none; }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: var(--bd); border-radius: 28px; background: var(--card);
  box-shadow: var(--shadow); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}
.fc-front { transform: translateZ(1px); }
.fc-back { transform: rotateY(180deg) translateZ(1px); background: linear-gradient(165deg, #fffdf7, #fff4dd); }
.fc-face .fc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-face .fc-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.fc-face .fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-tip { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.fc-forms { display: flex; flex-direction: column; gap: 8px; }
.fc-form-row { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px dashed var(--line); padding-bottom: 7px; }
.fc-form-row:last-child { border-bottom: 0; }
.fc-form-row small { width: 76px; flex: none; color: var(--ink-2); font-size: 12.5px; }
.fc-form-row b { font-family: var(--font-word); font-size: 21px; font-weight: 600; }
.fc-fam { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-fam .tag { font-size: 12.5px; }
.fc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-actions .btn { min-height: 54px; }
.fc-drag-hint { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .15s ease; pointer-events: none; z-index: 2; }
.fc-drag-hint.left { left: 8px; color: var(--coral-d); }
.fc-drag-hint.right { right: 8px; color: var(--teal-d); }
.fc-stage { position: relative; }
.fc-wrap { position: relative; will-change: transform; touch-action: pan-y; }
.fc-stage.show-left .fc-drag-hint.left, .fc-stage.show-right .fc-drag-hint.right { opacity: 1; }
.fc-progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }

/* ---------- 配对闯关 ---------- */
.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.match-col { display: flex; flex-direction: column; gap: 9px; }
.match-col-title { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; letter-spacing: .04em; }
.tile {
  min-height: 56px; padding: 10px 10px; border: var(--bd); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-sm);
  font-family: var(--font-word); font-size: 16px; font-weight: 600; text-align: center;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease, background .15s ease, opacity .3s ease;
  word-break: break-word; line-height: 1.2;
}
.tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tile.sel { background: var(--sun); }
.tile.matched { background: #d9f6e5; border-color: rgba(43, 42, 61, .3); opacity: .55; box-shadow: none; transform: scale(.97); }
.tile.wrong { background: #ffd7dd; animation: shake .35s ease; }
.tile.blank { visibility: hidden; }

/* ---------- 速查 ---------- */
.search-box { position: relative; }
.search-input {
  width: 100%; min-height: 52px; padding: 10px 16px 10px 44px;
  border: var(--bd); border-radius: 18px; background: var(--card);
  box-shadow: var(--shadow-sm); font-size: 16px;
}
.search-input::placeholder { color: var(--ink-3); }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.segmented { display: flex; gap: 4px; padding: 4px; border: var(--bd); border-radius: 16px; background: var(--paper-2); box-shadow: var(--shadow-sm); }
.segmented button {
  flex: 1; min-height: 40px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  padding: 5px 4px;
}
.segmented button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 rgba(43, 42, 61, .18); }
.ref-group { padding: 0; overflow: hidden; }
.ref-group summary {
  list-style: none; cursor: pointer; padding: 15px 16px;
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px;
}
.ref-group summary::-webkit-details-marker { display: none; }
.ref-group summary .count { margin-left: auto; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.ref-group summary .chev { width: 20px; height: 20px; color: var(--ink-2); transition: transform .2s ease; }
.ref-group[open] summary .chev { transform: rotate(90deg); }
.ref-body { padding: 0 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.verb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.verb-table th, .verb-table td { padding: 7px 6px; text-align: left; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.verb-table th { font-size: 11.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.verb-table td.en { font-family: var(--font-word); font-size: 14.5px; font-weight: 600; }
.verb-table tr:last-child td { border-bottom: 0; }
.verb-table .cn { color: var(--ink-2); font-size: 12.5px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-hint { display: none; }
@media (max-width: 560px) { .table-hint { display: block; } }
.fam-item { border: 2px solid var(--line); border-radius: 15px; padding: 10px 12px; background: rgba(255, 255, 255, .62); }
.fam-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.fam-head b { color: var(--ink); font-size: 12.5px; }
.word-chip {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  padding: 5px 9px; border-radius: 11px; border: 2px solid var(--line); background: #fff;
  margin: 0 4px 4px 0; font-size: 13.5px;
  box-shadow: 0 1px 0 rgba(43, 42, 61, .12);
}
.word-chip b { font-family: var(--font-word); font-size: 15px; font-weight: 600; }
.word-chip .pos { font-size: 10.5px; color: var(--teal-d); font-weight: 600; }
.word-chip .cn { color: var(--ink-2); font-size: 12px; }
.word-chip.mastered { background: #e2f9ec; border-color: rgba(23, 163, 152, .5); }
.word-chip button { padding: 0; line-height: 0; color: var(--ink-2); }
.word-chip button svg { width: 15px; height: 15px; }
.phrase-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1.5px dashed var(--line); }
.phrase-row:last-child { border-bottom: 0; }
.phrase-row .from { font-family: var(--font-word); font-size: 15.5px; font-weight: 600; min-width: 0; }
.phrase-row .arrow { color: var(--coral); font-weight: 600; flex: none; }
.phrase-row .to { font-family: var(--font-word); font-size: 15.5px; font-weight: 600; color: var(--teal-d); }
.empty { text-align: center; color: var(--ink-2); padding: 34px 10px; font-size: 14px; }

/* ---------- 我的 ---------- */
.profile-hero { display: flex; align-items: center; gap: 14px; }
.avatar { width: 66px; height: 66px; flex: none; border-radius: 22px; border: var(--bd); background: var(--sun); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); overflow: hidden; }
.avatar svg { width: 54px; height: 54px; }
.profile-name { font-size: 21px; font-weight: 600; }
.profile-title { font-size: 12.5px; color: var(--ink-2); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { border: var(--bd); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); padding: 12px 14px; }
.stat-box b { display: block; font-size: 23px; font-weight: 600; line-height: 1.15; }
.stat-box small { font-size: 12px; color: var(--ink-2); }
.mastery { display: flex; flex-direction: column; gap: 12px; }
.mastery-row .m-head { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.mastery-row .m-head span:last-child { color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.cal { display: flex; align-items: flex-end; gap: 8px; height: 86px; margin-top: 5px; }
.cal-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.cal-bar { width: 100%; min-height: 5px; border: 2px solid var(--ink); border-radius: 7px; background: var(--paper-2); }
.cal-bar.on { background: var(--mint); }
.cal-day small { font-size: 10.5px; color: var(--ink-2); }
.cal-day.today small { color: var(--ink); font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge {
  text-align: center; padding: 12px 8px; border: var(--bd); border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-sm); position: relative;
}
.badge .b-emoji { font-size: 27px; line-height: 1.2; filter: grayscale(1) opacity(.4); }
.badge .b-name { font-size: 12px; font-weight: 600; margin-top: 4px; color: var(--ink-3); }
.badge.on { background: #fff8e2; }
.badge.on .b-emoji { filter: none; animation: bob 4s ease-in-out infinite; }
.badge.on .b-name { color: var(--ink); }
.badge .lock { position: absolute; right: 7px; top: 7px; font-size: 11px; color: var(--ink-3); }
.badge.on .lock { display: none; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1.5px dashed var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-copy { flex: 1; min-width: 0; }
.setting-row b { font-size: 14.5px; display: block; font-weight: 600; }
.setting-row small { font-size: 11.5px; color: var(--ink-2); }
.switch { position: relative; width: 54px; height: 32px; flex: none; border: var(--bd); border-radius: 99px; background: var(--paper-2); transition: background .2s ease; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-pressed='true'] { background: var(--teal); }
.switch[aria-pressed='true']::after { transform: translateX(21px); }
.danger { color: var(--coral-d); }

/* 跨设备同步 */
.sync-code {
  font-family: var(--font-word); font-size: clamp(28px, 8vw, 38px); font-weight: 600;
  letter-spacing: .12em; text-align: center; color: var(--ink);
  background: var(--card-2); border: 2px dashed var(--ink); border-radius: 16px;
  padding: 10px 8px; margin: 10px 0 6px; user-select: all; -webkit-user-select: all;
}
.sync-status { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-d); flex: none; }
.sync-dot.err { background: var(--coral); }
.sync-dot.wait { background: var(--sun-d); }
.sync-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sync-actions .btn { min-height: 44px; font-size: 14px; }
.modal-input { width: 100%; margin-top: 10px; text-align: center; letter-spacing: .1em; font-family: var(--font-ui); font-size: 20px; text-transform: uppercase; }

/* ---------- 提示 / 弹层 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); z-index: 70;
  max-width: min(92vw, 420px); padding: 11px 16px;
  background: var(--ink); color: #fff; border-radius: 14px;
  font-size: 13.5px; font-weight: 500; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .t-sub { display: block; font-size: 11.5px; opacity: .8; margin-top: 2px; }

.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(43, 42, 61, .42);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(100%, 400px); background: var(--card); border: var(--bd);
  border-radius: 26px; box-shadow: 0 8px 0 var(--ink); padding: 20px;
  animation: rise .28s cubic-bezier(.2, .9, .3, 1.2) both;
}
.modal h3 { font-size: 19px; font-weight: 600; }
.modal p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

#fx { position: fixed; inset: 0; z-index: 65; pointer-events: none; width: 100%; height: 100%; }

/* 语法口诀课程 */
.lesson-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 2px; border: 0; border-top: 1.5px dashed var(--line);
  background: none; text-align: left;
}
.lesson-row:first-of-type { border-top: 0; }
.lesson-row:active { opacity: .6; }
.lesson-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; }
.lesson-row > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.lesson-title { font-size: 22px; font-weight: 600; margin: 8px 0 10px; line-height: 1.3; }
.mnemonic {
  background: #fff3d0; border: 2px solid var(--ink); border-radius: 14px;
  padding: 12px 14px; font-weight: 600; font-size: 15px; line-height: 1.55;
  box-shadow: 0 2px 0 var(--ink);
}
.mnemonic-tag {
  display: inline-block; background: var(--sun); border: 2px solid var(--ink);
  border-radius: 8px; padding: 0 6px; font-size: 11px; margin-right: 6px; vertical-align: 2px;
}
.rule-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rule-item { display: flex; gap: 8px; font-size: 14px; line-height: 1.6; }
.rule-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; margin-top: 7px; }
.examples { margin-top: 14px; border-top: 2px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.example-en { font-family: var(--font-word); font-size: 16px; font-weight: 600; line-height: 1.4; }
.example-cn { font-size: 13px; color: var(--ink-2); }
.grammar-card-ico { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--ink); background: #ffe0c2; display: flex; align-items: center; justify-content: center; flex: none; }
.grammar-card-ico svg { width: 21px; height: 21px; }

/* 6A 全册同步 */
.units-card-ico { font-size: 20px; background: #e0f2fe; }
.unit-card { padding: 16px 16px 12px; }
.unit-title { font-size: 19px; font-weight: 600; margin: 2px 0 2px; line-height: 1.3; }
.unit-detail-title { font-size: 24px; font-weight: 600; margin: 8px 0 2px; }
.unit-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { display: inline-block; background: #e0f2fe; color: #075985; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; }
.unit-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.unit-stat { background: #f8fafc; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; }
.unit-stat b { display: block; font-size: 18px; line-height: 1.2; }
.unit-stat span { font-size: 11px; color: var(--ink-2); }
.word-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.word-chip { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; cursor: pointer; }
.word-chip:active { transform: scale(.98); }
.word-chip b { display: block; font-family: var(--font-word); font-size: 16px; line-height: 1.35; }
.word-pos { font-size: 11px; color: var(--teal); margin-right: 4px; }
.word-cn { font-size: 12.5px; color: var(--ink-2); }
.phrase-list { display: flex; flex-direction: column; }
.phrase-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1.5px dashed var(--line); font-size: 14px; }
.phrase-row:first-child { border-top: 0; }
.phrase-row b { font-family: var(--font-word); }
.phrase-row span { color: var(--ink-2); text-align: right; flex: none; }
.unit-grammar { padding: 14px 0; border-top: 1.5px dashed var(--line); }
.unit-grammar:first-of-type { border-top: 0; padding-top: 4px; }
.unit-grammar-title { font-weight: 600; font-size: 16px; }
.plan-now { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: #f0fdfa; border: 1.5px solid #99f6e4; border-radius: 12px; padding: 10px 12px; }
.plan-daily { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plan-step { display: flex; gap: 10px; align-items: flex-start; background: #f8fafc; border-radius: 10px; padding: 9px 11px; font-size: 13.5px; }
.plan-min { flex: none; width: 34px; text-align: center; font-weight: 600; color: var(--teal); }
.plan-weeks { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plan-week { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.plan-week-no { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff7ed; color: #b45309; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.plan-tips { margin: 8px 0 0 18px; padding: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.plan-tips li { margin: 4px 0; }


/* 6A 完整词表 / 默写 / 错题重练 */
.vocab-box { margin-top: 12px; border-top: 1.5px dashed var(--line); padding-top: 10px; }
.vocab-box summary { cursor: pointer; font-weight: 600; color: var(--teal); font-size: 14px; }
.dict-cn { font-size: 25px; font-weight: 600; line-height: 1.45; margin: 16px 0 4px; }
.dict-hint { font-size: 12.5px; color: var(--ink-2); }
.dict-input { width: 100%; margin-top: 14px; border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 18px; font-family: var(--font-word); background: #fff; outline: none; }
.dict-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.dict-feedback:empty { display: none; }
.wrong-retry { width: 100%; margin-top: 10px; }

/* ---------- 响应式 ---------- */
@media (min-width: 700px) {
  .session { max-width: 780px; margin: 0 auto; width: 100%; }
  .session-body { justify-content: center; }
  .app { padding-left: 24px; padding-right: 24px; }
  .modes { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .screen { gap: 18px; }
  .badges { grid-template-columns: repeat(4, 1fr); }
  .fc { min-height: 380px; }
}
@media (min-width: 980px) {
  .app { max-width: 900px; }
  .home-cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
  .modes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-height: 560px) and (orientation: landscape) {
  .fc { min-height: 250px; }
  .hero-mascot { width: 68px; height: 68px; }
  .qcard { padding: 14px; }
  .big-word { font-size: clamp(28px, 7vh, 40px); }
  .opt { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   词岛远征 · 中考词场 —— 新增界面样式（在 app.css 基础之上）
   ========================================================================== */

/* ---------- 页面头部 ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 4px 2px 0; }
.head h1 { font-size: clamp(23px, 6.2vw, 30px); font-weight: 600; letter-spacing: -.01em; }
.head p { color: var(--ink-2); font-size: 13px; margin-top: 3px; max-width: 46em; }
.home-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 4px 2px 0; }
.home-hello .hello-line { font-size: clamp(20px, 5.6vw, 26px); font-weight: 600; }
.home-hello .hello-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; max-width: 34em; }
.streak-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; background: var(--card); border: var(--bd); border-radius: 99px; box-shadow: var(--shadow-sm); font-size: 13px; color: var(--ink); }
.streak-pill b { font-size: 17px; }
.streak-pill svg { color: var(--coral); }
.streak-pill.dim { opacity: .62; }

/* ---------- 等级卡 ---------- */
.card-level { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(150deg, #fff8e6, #ffedbf); }
.level-left { display: flex; align-items: center; gap: 12px; }
.level-badge { width: 52px; height: 52px; border-radius: 18px; background: var(--sun); border: var(--bd); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; transform: rotate(-3deg); }
.level-title { font-size: 17px; font-weight: 600; }
.level-xp { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.level-right .ring { width: 56px; height: 56px; }
.level-right .ring .ring-bg, .level-right .ring .ring-val { stroke-width: 6; }
.level-right .ring-text b { font-size: 15px; }
.level-right .ring-text small { font-size: 9px; margin-top: 1px; }

/* ---------- 今日任务卡 ---------- */
.card-task { background: linear-gradient(155deg, #fffdf6, #fff1d2); display: flex; flex-direction: column; gap: 12px; }
.task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-kicker { font-size: 11px; letter-spacing: .14em; color: var(--coral-d); font-weight: 600; }
.task-title { font-size: 21px; font-weight: 600; margin-top: 3px; }
.task-counts { display: flex; gap: 10px; }
.task-count { min-width: 58px; text-align: center; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 6px 8px; box-shadow: 0 2px 0 var(--ink); }
.task-count b { display: block; font-size: 22px; line-height: 1.1; }
.task-count span { font-size: 11px; color: var(--ink-2); }
.task-progress { display: flex; flex-direction: column; gap: 5px; }
.task-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.task-progress-label b { color: var(--ink); }
.bar-goal > span { background: linear-gradient(90deg, var(--sun), var(--coral)); }
.bar-xp > span { background: linear-gradient(90deg, var(--teal), var(--sky)); }
.card-task .btn-primary { margin-top: 2px; }

/* ---------- 每日挑战 ---------- */
.card-challenge { display: flex; align-items: center; gap: 12px; background: #eaf4ff; }
.card-challenge.small { padding: 14px 16px; }
.challenge-ico { width: 46px; height: 46px; border-radius: 15px; background: var(--sky); color: #fff; border: var(--bd); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; flex: none; }
.challenge-ico svg { width: 24px; height: 24px; }
.challenge-title { font-size: 16.5px; font-weight: 600; }
.challenge-sub { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.challenge-stars { display: flex; gap: 2px; }
.challenge-stars .star { width: 22px; height: 22px; opacity: .3; transform: none; animation: none; }
.challenge-stars .star.on { opacity: 1; }
.chev { width: 20px; height: 20px; color: var(--ink-3); flex: none; }

/* ---------- 数据小块 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { background: var(--card); border: var(--bd); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat-emoji { font-size: 19px; }
.stat-value { font-size: 20px; line-height: 1.15; }
.stat-label { font-size: 11.5px; color: var(--ink-2); }

/* ---------- 主题横向卡片 ---------- */
.theme-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.theme-scroll::-webkit-scrollbar { display: none; }
.theme-mini { flex: none; width: 112px; scroll-snap-align: start; background: var(--card); border: var(--bd); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 12px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.theme-mini:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.theme-mini-emoji { font-size: 22px; }
.theme-mini-name { font-size: 13.5px; font-weight: 600; }
.theme-mini-count { font-size: 11px; color: var(--ink-2); }
.theme-mini-bar { display: block; width: 100%; height: 7px; border-radius: 99px; background: var(--paper-2); border: 1.5px solid var(--ink); overflow: hidden; margin-top: 4px; }
.theme-mini-bar i { display: block; height: 100%; background: var(--mint); }
.link-btn { font-size: 13px; color: var(--ink-2); padding: 6px 2px; }
.foot-note { margin-top: 2px; line-height: 1.5; }
.tiny.danger { color: var(--coral-d); }

/* ---------- 学习页 ---------- */
.practice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.practice-card { background: var(--card); border: var(--bd); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 13px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.practice-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.practice-card:disabled { opacity: .5; }
.practice-ico { font-size: 22px; }
.practice-name { font-size: 15px; font-weight: 600; }
.practice-desc { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.curve-card { display: flex; flex-direction: column; gap: 12px; }
.curve-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 132px; }
.curve-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.curve-n { font-size: 10.5px; color: var(--ink-2); min-height: 13px; }
.curve-bar { width: 100%; flex: 1 1 auto; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.curve-bar i { display: block; width: 100%; background: var(--mint); border-radius: 5px 5px 0 0; }
.curve-label { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }
.curve-tip { font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.activity-card { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.week-bar { width: 100%; height: 74px; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.week-bar i { display: block; width: 100%; background: var(--sun); border-radius: 4px 4px 0 0; }
.week-label { font-size: 10.5px; color: var(--ink-2); }
.week-label.today { color: var(--ink); font-weight: 600; }
.week-count { font-size: 10px; color: var(--ink-3); min-height: 12px; }
.settings-card { display: flex; flex-direction: column; gap: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setting-label { font-size: 14.5px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { cursor: pointer; }
.chip-btn.active { background: var(--sun); }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(21px); }
.btn-danger-ghost { color: var(--coral-d); border-color: var(--coral); box-shadow: 0 2px 0 var(--coral); }

/* ---------- 闯关 ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.game-card { position: relative; background: var(--card); border: var(--bd); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 15px 14px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.game-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.game-ico { font-size: 25px; line-height: 1.1; }
.game-name { font-size: 16px; font-weight: 600; }
.game-desc { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.game-tag { position: absolute; top: 10px; right: 10px; font-size: 10px; padding: 2px 7px; border-radius: 99px; background: var(--pink); border: 1.5px solid var(--ink); font-weight: 600; }
@media (min-width: 720px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .practice-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 词库 ---------- */
.search-wrap { position: relative; }
.search-wrap .search-ico { width: 19px; height: 19px; color: var(--ink-3); }
.search-input { width: 100%; padding: 13px 14px 13px 42px; border: var(--bd); border-radius: 16px; background: var(--card); font-size: 15px; box-shadow: var(--shadow-sm); -webkit-appearance: none; }
.search-input:focus { outline: 3px dashed var(--teal); outline-offset: 2px; }
.chip-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; white-space: nowrap; }
.chip-scroll.letters .chip { min-width: 42px; justify-content: center; padding: 6px 9px; }
.word-count { padding-left: 4px; }
.word-list { display: flex; flex-direction: column; gap: 8px; }
.word-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: var(--bd); border-radius: 15px; box-shadow: 0 2px 0 var(--ink); padding: 10px 12px; text-align: left; }
.word-row:active { transform: translateY(2px); box-shadow: none; }
.word-row-main { flex: 0 0 118px; min-width: 0; display: flex; flex-direction: column; }
.word-row-w { display: flex; align-items: center; gap: 5px; font-family: var(--font-word); font-size: 16.5px; }
.word-row-w b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-row-ph { font-size: 10.5px; color: var(--ink-3); }
.word-row-cn { flex: 1 1 auto; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.word-row-tier { flex: none; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--paper-2); }
.tier-A { background: var(--mint); }
.tier-B { background: var(--sun); }
.tier-C { background: var(--pink); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-mastered { background: var(--teal); }
.dot-learning { background: var(--sun); }
.load-more { margin-top: 4px; }

/* ---------- 我的 ---------- */
.me-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(150deg, #fff9ec, #ffeec9); }
.me-mascot { width: 82px; height: 82px; flex: none; }
.me-info { flex: 1 1 auto; min-width: 0; }
.me-name { font-size: 22px; font-weight: 600; }
.me-title { font-size: 13px; color: var(--ink-2); margin: 1px 0 8px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.me-stat { background: var(--card); border: var(--bd); border-radius: 15px; box-shadow: 0 2px 0 var(--ink); padding: 10px 8px; text-align: center; }
.me-stat b { display: block; font-size: 20px; line-height: 1.2; }
.me-stat span { font-size: 11.5px; color: var(--ink-2); }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); text-align: center; }
.ach.on { border-color: var(--ink); background: var(--card); box-shadow: 0 2px 0 var(--ink); }
.ach.off { opacity: .42; filter: grayscale(.7); }
.ach-emoji { font-size: 21px; }
.ach-name { font-size: 10px; line-height: 1.25; color: var(--ink-2); }

/* ---------- 同步 / 关于 ---------- */
.sync-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sync-ico { width: 19px; height: 19px; color: var(--sky); }
.sync-card .stack { gap: 8px; }
.sync-code-line { display: flex; align-items: center; justify-content: space-between; background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; }
.sync-code-line b { font-family: var(--font-ui); letter-spacing: .12em; font-size: 15px; }
.row.gap { gap: 8px; flex-wrap: wrap; }
.about-card { display: flex; flex-direction: column; gap: 9px; }
.about-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.about-row b { color: var(--ink); font-weight: 600; font-size: 12.5px; text-align: right; }
.chip.chip-mint { background: var(--mint); }
.chip.chip-sun { background: var(--sun); }
.chip.chip-sky { background: #d8e8ff; }

/* ==========================================================================
   答题会话
   ========================================================================== */
.session { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: flex; flex-direction: column; }
.sess-top { display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 14px 8px; }
.sess-close { width: 42px; height: 42px; flex: none; }
.sess-progress { flex: 1 1 auto; height: 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.sess-progress-fill { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, var(--sun), var(--coral)); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.sess-hearts { display: flex; gap: 3px; flex: none; min-width: 0; }
.heart-ico { width: 20px; height: 20px; }
.heart-ico.on { color: var(--coral); fill: var(--coral); }
.heart-ico.off { color: var(--line); opacity: .5; }
.sess-combo { padding: 0 16px; min-height: 24px; display: flex; justify-content: center; }
.combo-pill { font-size: 12px; font-weight: 600; background: var(--sun); border: 2px solid var(--ink); border-radius: 99px; padding: 2px 10px; animation: pop .3s ease; }
.sess-body { flex: 1 1 auto; overflow-y: auto; padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.q-card { background: var(--card); border: var(--bd); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin: 0 auto; }
.tag-row { display: flex; align-items: center; gap: 6px; }
.word-big { font-family: var(--font-word); font-size: clamp(34px, 9vw, 46px); font-weight: 600; line-height: 1.1; display: flex; align-items: center; gap: 10px; word-break: break-word; }
.word-ph { font-size: 14px; color: var(--ink-2); margin-top: -4px; }
.card-info { display: flex; flex-direction: column; gap: 9px; animation: rise .3s ease both; }
.card-cn { font-size: 17px; font-weight: 500; }
.pos-tag { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.card-ex { background: var(--paper); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.card-forms { font-size: 12px; color: var(--ink-2); background: var(--paper); border-radius: 13px; padding: 9px 12px; }
.card-actions { margin-top: 2px; }
.speak-btn { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 2px 0 var(--ink); flex: none; }
.speak-btn svg { width: 18px; height: 18px; }
.ex-en { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; line-height: 1.45; }
.ex-en > span { flex: 1 1 auto; padding-top: 5px; }
.ex-cn2 { font-size: 12px; color: var(--ink-2); }

.prompt { display: flex; flex-direction: column; gap: 7px; text-align: center; align-items: center; }
.prompt-big { font-family: var(--font-word); font-size: clamp(30px, 8.4vw, 42px); font-weight: 600; line-height: 1.15; }
.prompt-sentence { font-family: var(--font-word); font-size: clamp(20px, 5.4vw, 26px); line-height: 1.45; }
.prompt-sub { font-size: 12.5px; color: var(--ink-2); }
.prompt-cn { font-size: 13px; color: var(--ink-2); background: var(--paper); border-radius: 12px; padding: 6px 12px; }
.prompt-mean { font-size: clamp(19px, 5.4vw, 24px); font-weight: 600; }
.prompt-ph { font-size: 13px; color: var(--ink-2); }
.audio-big { width: 86px; height: 86px; border-radius: 50%; background: var(--sky); color: #fff; border: var(--bd); box-shadow: 0 4px 0 var(--ink); display: flex; align-items: center; justify-content: center; }
.audio-big svg { width: 38px; height: 38px; }
.audio-big:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.options { display: grid; grid-template-columns: 1fr; gap: 9px; }
@media (min-width: 560px) { .options { grid-template-columns: 1fr 1fr; } }
.option { display: flex; align-items: center; gap: 9px; text-align: left; background: var(--card-2); border: var(--bd); border-radius: 15px; box-shadow: 0 3px 0 var(--ink); padding: 12px 13px; font-size: 15.5px; line-height: 1.3; transition: background .15s ease, transform .1s ease, box-shadow .1s ease; }
.option:active { transform: translateY(3px); box-shadow: none; }
.option-key { flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--paper); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.option-text { flex: 1 1 auto; }
.option.correct { background: #d9f7e6; border-color: var(--teal-d); box-shadow: 0 3px 0 var(--teal-d); }
.option.correct .option-key { background: var(--mint); }
.option.wrong { background: #ffe2e0; border-color: var(--coral-d); box-shadow: 0 3px 0 var(--coral-d); }
.option.wrong .option-key { background: var(--pink); }
.option:disabled { opacity: 1; }

.explain { background: var(--paper); border: 2px dashed var(--line); border-radius: 15px; padding: 12px; display: flex; flex-direction: column; gap: 5px; animation: rise .25s ease both; }
.explain-tip { background: #fff6d9; }
.ex-word { font-family: var(--font-word); font-size: 19px; }
.ex-ph { font-size: 12.5px; color: var(--ink-2); font-family: var(--font-ui); }
.ex-cn { font-size: 13px; color: var(--ink-2); }
.ex-ex { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.sess-foot { margin-top: 2px; }
.sess-foot .btn { width: 100%; }

.spell-row { display: flex; gap: 8px; align-items: stretch; }
.spell-input { flex: 1 1 auto; min-width: 0; padding: 13px 14px; border: var(--bd); border-radius: 14px; background: var(--paper); font-size: 19px; font-family: var(--font-word); letter-spacing: .02em; box-shadow: inset 0 2px 0 rgba(43, 42, 61, .06); }
.spell-input:focus { outline: 3px dashed var(--teal); outline-offset: 2px; }
.spell-row .btn { flex: none; }
.spell-hint { font-size: 13.5px; min-height: 18px; text-align: center; }
.spell-ok { color: var(--teal-d); font-weight: 600; }
.spell-no { color: var(--coral-d); font-weight: 600; }

/* ---------- 结算 ---------- */
.result-screen { gap: 14px; }
.result-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 8px; text-align: center; }
.result-mascot { width: 108px; height: 108px; animation: bob 2.4s ease-in-out infinite; }
.result-title { font-size: 27px; font-weight: 600; }
.result-sub { font-size: 13px; color: var(--ink-2); }
.result-stars { display: flex; gap: 10px; margin-top: 4px; }
.result-stars .star { width: 44px; height: 44px; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.result-stat { background: var(--card); border: var(--bd); border-radius: 14px; box-shadow: 0 2px 0 var(--ink); padding: 9px 4px; text-align: center; }
.result-stat b { display: block; font-size: 19px; line-height: 1.2; }
.result-stat span { font-size: 10.5px; color: var(--ink-2); }
.wrong-card { display: flex; flex-direction: column; gap: 8px; }
.wrong-head { font-size: 14px; font-weight: 600; }
.wrong-list { display: flex; flex-direction: column; gap: 6px; }
.wrong-row { display: flex; align-items: baseline; gap: 7px; font-size: 14px; }
.wrong-row b { font-family: var(--font-word); font-size: 15.5px; }
.wrong-ph { font-size: 10.5px; color: var(--ink-3); }
.wrong-cn { font-size: 12.5px; color: var(--ink-2); }
.result-actions { display: flex; flex-direction: column; gap: 9px; }
.tip-card { display: flex; align-items: center; gap: 9px; font-size: 13px; background: #fff6d9; }

/* ---------- 配对连线 ---------- */
.match-view { background: var(--paper); }
.match-tip { text-align: center; font-size: 12px; color: var(--ink-2); padding: 0 16px 10px; }
.match-body { flex: 1 1 auto; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px calc(18px + env(safe-area-inset-bottom)); align-items: start; }
.match-col { display: flex; flex-direction: column; gap: 9px; }
.match-cell { background: var(--card); border: var(--bd); border-radius: 14px; box-shadow: 0 2px 0 var(--ink); padding: 11px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; font-size: 14px; transition: opacity .2s ease, transform .1s ease; }
.match-cell.left b { font-family: var(--font-word); font-size: 16px; }
.match-ph { font-size: 10px; color: var(--ink-3); }
.match-cell.right span { font-size: 12.5px; line-height: 1.3; }
.match-cell.sel { background: var(--sun); transform: translateY(-2px); }
.match-cell.done { opacity: .32; pointer-events: none; }
.match-cell.shake { animation: shake .4s ease; }
.match-status { font-size: 13px; color: var(--ink-2); }

/* ---------- 词条详情弹窗 ---------- */
.modal { position: relative; }
.word-modal { max-height: min(88dvh, 760px); overflow-y: auto; display: flex; flex-direction: column; gap: 9px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; }
.detail-word { display: flex; align-items: center; gap: 8px; padding-right: 44px; }
.detail-word b { font-family: var(--font-word); font-size: clamp(30px, 8vw, 40px); line-height: 1.1; word-break: break-word; }
.detail-word .btn { width: 38px; height: 38px; border-radius: 12px; }
.detail-ph { font-size: 13px; color: var(--ink-2); margin-top: -4px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-cn { font-size: 16px; }
.detail-ex { background: var(--paper); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.detail-forms { display: flex; flex-direction: column; gap: 5px; }
.detail-sub { font-size: 12px; color: var(--ink-3); }
.detail-form { display: flex; gap: 8px; font-size: 13px; }
.detail-form span { color: var(--ink-2); min-width: 80px; }
.detail-form b { font-weight: 600; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ---------- 主题岛选择 ---------- */
.theme-view { overflow-y: auto; }
.theme-title { font-size: 19px; font-weight: 600; }
.theme-intro { padding: 0 16px 10px; font-size: 12.5px; color: var(--ink-2); max-width: 640px; margin: 0 auto; }
.theme-grid { padding: 0 14px calc(20px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 680px; margin: 0 auto; }
@media (min-width: 720px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card { background: var(--card); border: var(--bd); border-radius: 18px; box-shadow: 0 2px 0 var(--ink); padding: 13px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.theme-card:active { transform: translateY(2px); box-shadow: none; }
.theme-card-emoji { font-size: 22px; }
.theme-card-name { font-size: 14.5px; font-weight: 600; }
.theme-card-count { font-size: 11px; color: var(--ink-2); }
.theme-card-bar { display: block; width: 100%; height: 7px; border-radius: 99px; background: var(--paper-2); border: 1.5px solid var(--ink); overflow: hidden; margin: 3px 0; }
.theme-card-bar i { display: block; height: 100%; background: var(--teal); }
.theme-card-stars { font-size: 12px; color: var(--sun-d); letter-spacing: .05em; }
.theme-card-stars:empty { display: none; }

/* ---------- 小屏优化 ---------- */
@media (max-width: 370px) {
  .word-row-main { flex-basis: 96px; }
  .theme-card { padding: 11px; }
  .game-name { font-size: 15px; }
  .task-title { font-size: 19px; }
  .me-stats { grid-template-columns: repeat(2, 1fr); }
  .ach-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .result-mascot { animation: none; }
}

/* ---------- 通用修正 ---------- */
[hidden] { display: none !important; }
.btn-mint { background: var(--mint); }
.btn-danger { background: var(--coral); color: #fff; }

/* 会话内容：内容少时垂直居中，内容多时正常滚动 */
.sess-body { display: flex; flex-direction: column; }
.q-card { margin: auto; width: 100%; }
.sess-body > .q-card { margin-left: auto; margin-right: auto; }
.bg-deco { opacity: .42; }
/* 拼写题：输入框 + 提交按钮同排不溢出 */
.spell-row .spell-submit { flex: none; padding: 0 20px; white-space: nowrap; }
.spell-row .spell-input { min-width: 0; }

/* 答题时提示条改到顶部，避免遮住「下一题」 */
.in-session .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 14px); transform: translate(-50%, -8px); }
.in-session .toast.show { transform: translate(-50%, 0); }
/* 首屏骨架（data.js 下载期间显示） */
.boot-splash { min-height: 62dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 26px; }
.boot-fox { font-size: 52px; animation: bob 1.8s ease-in-out infinite; }
.boot-splash p { font-size: 17px; font-weight: 600; }
.boot-tip { font-size: 12px; color: var(--ink-3); max-width: 22em; line-height: 1.5; }
/* 上海考纲词标记 */
.word-row-sh { flex: none; font-size: 10px; font-weight: 700; color: #fff; background: var(--sky); border: 1.5px solid var(--ink); border-radius: 99px; padding: 1px 6px; line-height: 1.4; }