* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #EEF1F7;
  --surface: #FFFFFF;
  --ink: #101828;
  --ink2: #475467;
  --ink3: #98A2B3;
  --line: #E8EAF1;
  --primary: #FF6B2C;
  --primary-deep: #E14E0F;
  --primary-soft: #FFF1E8;
  --green: #12B76A;
  --green-soft: #E7F8F0;
  --red: #F04438;
  --red-soft: #FEF0EE;
  --amber: #F79009;
  --amber-soft: #FEF5E7;
  --blue: #2563EB;
  --blue-soft: #EAF1FE;
  --purple: #9B51E0;
  --purple-soft: #F4EBFD;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 24px -14px rgba(16,24,40,.18);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #E7EBF4 0%, #E9EDF5 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar .brand { font-weight: 800; font-size: 15px; margin-right: 10px; white-space: nowrap; }
.toolbar .brand small { display: block; font-weight: 500; color: var(--ink3); font-size: 11px; }
.toolbar button {
  border: 1px solid var(--line); background: #fff; color: var(--ink2);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.toolbar button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Stage / artboards ---------- */
.stage {
  display: flex; flex-wrap: wrap; gap: 44px; justify-content: center; align-items: flex-start;
  padding: 40px 48px 80px;
}
.artboard { display: flex; flex-direction: column; gap: 12px; }
.artboard figcaption {
  font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center; letter-spacing: .02em;
}
.artboard figcaption small { color: var(--ink3); font-weight: 500; }

body.single .artboard { display: none; }
body.single .artboard.active { display: flex; }

/* ---------- Phone frame ---------- */
.phone {
  width: 390px; height: 844px; flex: none;
  background: var(--bg);
  border: 10px solid #171A22; border-radius: 52px;
  position: relative; overflow: hidden;
  box-shadow: 0 34px 70px -24px rgba(16,24,40,.45);
}
.statusbar {
  height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: relative; z-index: 6;
}
.statusbar .time { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.statusbar .icons { display: flex; align-items: center; gap: 6px; }
.statusbar .icons svg { display: block; }

.scroll {
  position: absolute; left: 0; right: 0; top: 44px; bottom: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 4px 20px 28px;
}
.scroll::-webkit-scrollbar { display: none; }
.scroll.has-tabbar { bottom: 74px; }
/* 带顶栏的页面：滚动区从状态栏(44px)+顶栏(52px)下方开始，避免内容被顶栏遮挡 */
.screen:not(#s-home) .scroll { top: 96px; }

.topbar {
  height: 52px; display: flex; align-items: center; gap: 10px;
  padding: 0 20px; position: relative; z-index: 6;
}
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 12px; border: none; cursor: pointer;
  background: transparent; color: var(--ink); display: grid; place-items: center;
}
.topbar .icon-btn:hover { background: rgba(16,24,40,.05); }
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; }
.topbar .right { display: flex; align-items: center; gap: 8px; }

/* ---------- Home ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 14px; }
.hero .greet { font-size: 22px; font-weight: 800; }
.hero .sub { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #FF9A5C); color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 6px 14px -6px rgba(255,107,44,.55);
}
.quick-row { display: flex; gap: 12px; margin-bottom: 14px; }
.quick {
  flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow);
}
.quick .q-ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: none;
}
.quick .q-ico.flame { background: var(--red-soft); }
.quick .q-ico.zap { background: var(--amber-soft); }
.quick b { display: block; font-size: 14.5px; }
.quick span { font-size: 11px; color: var(--ink3); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.goal-card { padding: 15px 16px; margin-bottom: 18px; }
.goal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.goal-head b { font-size: 13.5px; }
.goal-head span { font-size: 12px; color: var(--ink2); font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #FF9A5C); }

.section-title { font-size: 13px; font-weight: 700; color: var(--ink2); margin: 4px 2px 10px; }
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.module {
  border: 1px solid var(--line); background: var(--surface); border-radius: 18px;
  padding: 16px; text-align: left; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s; font-family: inherit;
}
.module:hover { transform: translateY(-2px); }
.module.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #FF8E4D 100%);
  border-color: transparent; color: #fff; grid-column: span 1;
}
.module.primary small { color: rgba(255,255,255,.85); }
.module .m-ico { font-size: 26px; display: block; margin-bottom: 10px; }
.module b { display: block; font-size: 15px; }
.module small { font-size: 11px; color: var(--ink3); line-height: 1.4; display: block; margin-top: 3px; }

.review-strip {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  width: 100%; font-family: inherit; text-align: left; margin-bottom: 14px;
}
.review-strip .rs-ico {
  width: 44px; height: 44px; border-radius: 14px; background: var(--purple-soft);
  display: grid; place-items: center; font-size: 20px; flex: none;
}
.review-strip .rs-mid { flex: 1; }
.review-strip .rs-mid b { font-size: 14px; display: block; }
.review-strip .rs-mid small { font-size: 11.5px; color: var(--ink3); }
.review-strip .rs-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-deep);
  font-weight: 800; font-size: 14px; display: grid; place-items: center;
}

.wod-card { padding: 16px; margin-bottom: 8px; }
.wod-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wod-head b { font-size: 13.5px; }
.level-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.level-a1 { background: var(--green-soft); color: #0B8F53; }
.level-a2 { background: var(--amber-soft); color: #B54708; }
.level-b1 { background: var(--blue-soft); color: #1D4ED8; }
.level-b2 { background: var(--purple-soft); color: #7E22CE; }
.wod-word { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.wod-zh { font-size: 14px; color: var(--ink2); margin: 4px 0 10px; }
.wod-sen { font-size: 12.5px; color: var(--ink2); border-top: 1px dashed var(--line); padding-top: 10px; line-height: 1.55; }
.wod-sen span { display: block; color: var(--ink3); margin-top: 2px; }

/* ---------- Level pills / chips ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 20px 12px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink2);
  border-radius: 99px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: flex; align-items: baseline; gap: 6px; font-family: inherit; transition: all .15s;
}
.pill b { font-size: 15px; }
.pill small { color: var(--ink3); font-weight: 500; }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.active small { color: rgba(255,255,255,.65); }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; font-family: inherit; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #FF8E4D); color: #fff; box-shadow: 0 10px 20px -8px rgba(255,107,44,.55); }
.btn.ghost { background: var(--surface); border: 1.5px solid var(--line); color: var(--ink2); }
.btn.green { background: var(--green); color: #fff; }
.btn.block { width: 100%; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px; z-index: 8;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-around; padding-top: 9px;
}
.tabbar button {
  border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink3); font-size: 10.5px;
  padding: 2px 10px; transition: color .15s;
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--primary); }
.tabbar button.active svg { stroke-width: 2.4; }
.homebar {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 5px; border-radius: 99px; background: #0B0D12; z-index: 9;
}

/* ---------- Vocab word card ---------- */
.progress-card { padding: 14px 16px; margin: 0 20px 14px; }
.progress-card .pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 12.5px; }
.progress-card .pc-head b { font-size: 13.5px; }
.progress-card .pc-head span { color: var(--ink2); font-weight: 600; }

.word-card { padding: 20px 18px; margin: 0 20px 14px; }
.wc-top { display: flex; align-items: center; gap: 10px; }
.wc-word { font-size: 34px; font-weight: 800; letter-spacing: .01em; flex: 1; }
.wc-icons { display: flex; gap: 6px; }
.wc-icons .icon-btn { width: 38px; height: 38px; border-radius: 12px; background: var(--bg); }
.wc-zh { font-size: 16px; color: var(--ink2); margin: 6px 0 2px; }
.wc-meta { font-size: 12px; color: var(--ink3); margin-bottom: 14px; }
.wc-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 14px; }
.wc-tabs button {
  border: none; background: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink3); padding: 9px 10px; position: relative;
}
.wc-tabs button.active { color: var(--ink); }
.wc-tabs button.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1.5px; height: 3px;
  border-radius: 99px; background: var(--primary);
}
.wc-body { min-height: 176px; }
.def-list { display: flex; flex-direction: column; gap: 10px; }
.def-item { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.def-item .num { color: var(--primary); font-weight: 800; }
.morpheme { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--bg); border-radius: 12px; font-size: 15px; margin-bottom: 12px; }
.morpheme .plus { color: var(--ink3); font-weight: 700; }
.morpheme b { background: var(--surface); padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); }
.morpheme b.neg { background: var(--red-soft); border-color: transparent; color: var(--red); }
.note { font-size: 12px; color: var(--ink3); line-height: 1.6; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px;
  font-size: 12.5px; font-weight: 600;
}
.chip small { color: var(--ink3); font-weight: 500; margin-left: 4px; }
.colloc { display: flex; flex-direction: column; gap: 9px; }
.colloc .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.colloc .nl { font-weight: 700; font-size: 14px; }
.colloc .zh { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.sample-sen { border-left: 3px solid var(--primary); padding: 4px 0 4px 12px; margin-bottom: 12px; }
.sample-sen .nl { font-size: 14.5px; font-weight: 600; }
.sample-sen .zh { font-size: 12.5px; color: var(--ink3); margin-top: 3px; }
.wc-actions { display: flex; gap: 12px; margin-top: 16px; }
.wc-actions .btn { flex: 1; padding: 13px; }

/* ---------- Listening ---------- */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 20px 12px; }
.mode-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px;
  cursor: pointer; text-align: left; font-family: inherit; transition: all .15s;
}
.mode-btn .m-ico { font-size: 18px; display: block; margin-bottom: 6px; }
.mode-btn b { font-size: 13px; display: block; }
.mode-btn small { font-size: 10.5px; color: var(--ink3); }
.mode-btn.active { border-color: var(--primary); background: var(--primary-soft); }
.mode-btn.active b { color: var(--primary-deep); }

.player-card { margin: 0 20px 14px; padding: 18px; text-align: center; }
.q-progress { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-bottom: 12px; }
.q-progress b { color: var(--ink); }
.play-btn {
  width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer; margin: 6px auto 12px;
  background: linear-gradient(135deg, var(--primary), #FF8E4D); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 24px -8px rgba(255,107,44,.6); transition: transform .1s;
}
.play-btn:active { transform: scale(.94); }
.play-btn svg { width: 26px; height: 26px; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 44px; margin-bottom: 8px; }
.wave i {
  width: 4px; border-radius: 99px; background: var(--line);
  height: calc(var(--h, 50) * 1%);
}
.player-card.playing .wave i { background: linear-gradient(180deg, var(--primary), #FF9A5C); animation: eq .9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * .08s); }
@keyframes eq { from { height: 12%; } to { height: 92%; } }
.play-meta { font-size: 12px; color: var(--ink3); display: flex; justify-content: center; gap: 14px; }
.play-meta button { border: none; background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink2); font-weight: 600; }

.answer-card { margin: 0 20px 14px; padding: 16px; }
.answer-card label { font-size: 12px; font-weight: 700; color: var(--ink2); display: block; margin-bottom: 8px; }
.answer-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 13px;
  font-size: 15px; font-family: inherit; outline: none; transition: border .15s; background: var(--surface);
}
.answer-input:focus { border-color: var(--primary); }
.result-box { display: none; margin-top: 12px; border-radius: 12px; padding: 12px 13px; font-size: 13px; line-height: 1.55; }
.result-box.ok { display: block; background: var(--green-soft); color: #067647; }
.result-box.err { display: block; background: var(--red-soft); color: #B42318; }
.result-box b { display: block; margin-bottom: 3px; }
.result-box .zh { color: var(--ink2); opacity: .8; }

/* ---------- Speaking ---------- */
.sentence-card { margin: 0 20px 14px; padding: 18px; }
.sentence-card .sc-label { font-size: 11px; color: var(--ink3); margin-bottom: 10px; font-weight: 600; letter-spacing: .05em; }
.sentence-card .sc-nl { font-size: 19px; font-weight: 700; line-height: 1.5; }
.sentence-card .sc-zh { font-size: 12.5px; color: var(--ink2); margin: 8px 0 12px; }
.sc-tools { display: flex; gap: 8px; }
.sc-tools .btn { padding: 9px 14px; font-size: 12.5px; border-radius: 11px; }

.record-card { margin: 0 20px 14px; padding: 20px; text-align: center; }
.rec-btn {
  width: 84px; height: 84px; border-radius: 50%; border: none; cursor: pointer; margin: 8px auto 12px;
  background: linear-gradient(135deg, var(--primary), #FF8E4D); color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(255,107,44,.65); transition: transform .12s;
}
.rec-btn:active { transform: scale(.94); }
.rec-btn svg { width: 30px; height: 30px; }
.record-card.recording .rec-btn { background: linear-gradient(135deg, var(--red), #F97066); box-shadow: 0 0 0 12px rgba(240,68,56,.12); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 10px rgba(240,68,56,.14);} 50% { box-shadow: 0 0 0 20px rgba(240,68,56,.06);} }
.rec-time { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-hint { font-size: 12px; color: var(--ink3); margin-top: 6px; }
.rec-wave { display: none; align-items: center; justify-content: center; gap: 3px; height: 34px; margin: 4px 0 10px; }
.record-card.recording .rec-wave { display: flex; }
.rec-wave i { width: 3.5px; border-radius: 99px; background: var(--red); height: 30%; animation: eq .7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * .07s); }

.score-card { margin: 0 20px 14px; padding: 16px 18px; display: none; }
.score-card.show { display: block; }
.score-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.score-ring {
  width: 62px; height: 62px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--green) 0deg 331deg, var(--line) 331deg 360deg);
  display: grid; place-items: center; position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.score-ring b { position: relative; font-size: 17px; font-weight: 800; color: var(--green); }
.score-head .sc-title b { font-size: 15px; display: block; }
.score-head .sc-title span { font-size: 11.5px; color: var(--ink3); }
.score-bars { display: flex; flex-direction: column; gap: 8px; }
.score-bar-row { display: grid; grid-template-columns: 52px 1fr 34px; align-items: center; gap: 10px; font-size: 12px; }
.score-bar-row span { color: var(--ink2); }
.score-bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.score-bar-row .bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.score-bar-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #47E0A2); }
.tip-box { margin: 0 20px 8px; padding: 13px 15px; border-radius: 14px; background: var(--blue-soft); font-size: 12.5px; color: #1D4ED8; line-height: 1.6; }
.tip-box b { display: block; margin-bottom: 2px; }

/* ---------- Spelling ---------- */
.spell-prompt { margin: 0 20px 14px; padding: 22px 18px; text-align: center; }
.spell-prompt .sp-ico { width: 60px; height: 60px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; margin: 0 auto 12px; }
.spell-prompt .sp-ico button { border: none; background: none; cursor: pointer; font-size: 26px; }
.spell-prompt .sp-zh { font-size: 17px; font-weight: 700; }
.spell-prompt .sp-meta { font-size: 12px; color: var(--ink3); margin-top: 6px; }
.letter-slots { display: flex; justify-content: center; gap: 8px; margin: 16px 0 10px; flex-wrap: wrap; }
.slot {
  width: 40px; height: 46px; border-radius: 12px; background: var(--bg); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 20px; font-weight: 800; color: var(--ink);
}
.slot.filled { border-color: var(--primary); background: var(--primary-soft); }
.slot.err { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.slot.ok { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.spell-inputs { margin: 0 20px 14px; padding: 16px; }
.spell-result { display: none; margin-top: 12px; padding: 12px 13px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.spell-result.ok { display: block; background: var(--green-soft); color: #067647; }
.spell-result.err { display: block; background: var(--red-soft); color: #B42318; }

/* ---------- SM-2 ---------- */
.queue-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 20px 10px; }
.queue-head .lbl { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.queue-head .badge { background: var(--purple-soft); color: #7E22CE; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 99px; }

.flip-card { margin: 6px 20px 14px; perspective: 1400px; height: 320px; cursor: pointer; }
.flip-inner {
  position: relative; width: 100%; height: 100%; transition: transform .55s; transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center;
}
.flip-face.back { transform: rotateY(180deg); background: linear-gradient(160deg, #fff, #FFF6F0); }
.flip-face .fw-lv { font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: .08em; margin-bottom: 12px; }
.flip-face .fw-word { font-size: 40px; font-weight: 800; }
.flip-face .fw-zh { font-size: 18px; font-weight: 700; color: var(--ink2); margin-bottom: 14px; }
.flip-face .fw-sen { font-size: 14px; color: var(--ink2); line-height: 1.6; }
.flip-face .fw-sen span { display: block; color: var(--ink3); font-size: 12.5px; margin-top: 4px; }
.flip-face .fw-hint { margin-top: 18px; font-size: 12px; color: var(--ink3); }
.flip-face .fw-play {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--primary), #FF8E4D); color: #fff; display: grid; place-items: center;
}
.flip-face .fw-play svg { width: 22px; height: 22px; }

.grade-row { display: flex; gap: 8px; margin: 0 20px; }
.grade-btn {
  flex: 1; border: none; border-radius: 14px; padding: 13px 4px; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .1s;
}
.grade-btn:active { transform: scale(.96); }
.grade-btn b { font-size: 13.5px; color: #fff; }
.grade-btn small { font-size: 9.5px; color: rgba(255,255,255,.85); font-weight: 600; }
.grade-btn.g-again { background: var(--red); }
.grade-btn.g-hard { background: var(--amber); }
.grade-btn.g-good { background: var(--green); }
.grade-btn.g-easy { background: var(--blue); }
.grade-row.locked .grade-btn { opacity: .45; pointer-events: none; }
.sm2-hint { text-align: center; font-size: 11.5px; color: var(--ink3); margin-top: 12px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px 20px 14px; }
.stat-card { padding: 15px 16px; }
.stat-card .s-ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; margin-bottom: 10px;
}
.stat-card b { font-size: 21px; font-weight: 800; display: block; }
.stat-card span { font-size: 11.5px; color: var(--ink3); }
.chart-card { margin: 0 20px 14px; padding: 16px; }
.chart-card .cc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chart-card .cc-head b { font-size: 13.5px; }
.chart-card .cc-head span { font-size: 11.5px; color: var(--ink3); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar-col .val { font-size: 10px; color: var(--ink3); font-weight: 600; }
.bars .bar-col .bar { width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; background: var(--primary-soft); }
.bars .bar-col.today .bar { background: linear-gradient(180deg, var(--primary), #FF9A5C); }
.bars .bar-col .day { font-size: 10px; color: var(--ink3); font-weight: 600; }
.bars .bar-col.today .day { color: var(--primary); font-weight: 800; }
.bars .bar-col.today .val { color: var(--primary-deep); font-weight: 700; }

.prof-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prof-row:last-child { margin-bottom: 0; }
.prof-row .lv { width: 34px; font-size: 12px; font-weight: 800; }
.prof-row .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prof-row .bar i { display: block; height: 100%; border-radius: 99px; }
.prof-row .pct { width: 40px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.xp-seg { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.xp-seg i { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--ink2); }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ---------- Leaderboard ---------- */
.rank-card { margin: 2px 20px 14px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.rank-card .rk-tro { width: 52px; height: 52px; border-radius: 16px; background: var(--amber-soft); display: grid; place-items: center; font-size: 24px; flex: none; }
.rank-card b { font-size: 15px; display: block; }
.rank-card span { font-size: 12px; color: var(--ink3); }
.rank-card .rk-next { flex: 1; }
.rank-card .rk-next .progress { margin-top: 8px; }
.rank-card .rk-next small { font-size: 11px; }

.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 2px 20px 14px; }
.badge-cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px;
  text-align: center; box-shadow: var(--shadow);
}
.badge-cell .b-emoji { font-size: 24px; display: block; margin-bottom: 7px; }
.badge-cell span { font-size: 10.5px; font-weight: 600; color: var(--ink2); line-height: 1.3; display: block; }
.badge-cell.locked { opacity: .45; filter: grayscale(1); }

.rank-list { margin: 0 20px 8px; padding: 8px 16px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-row .r-num { width: 26px; font-size: 13px; font-weight: 800; color: var(--ink3); text-align: center; }
.rank-row .r-ava {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700; flex: none;
}
.rank-row .r-name { flex: 1; font-size: 13.5px; font-weight: 600; }
.rank-row .r-name small { display: block; font-weight: 500; color: var(--ink3); font-size: 10.5px; }
.rank-row .r-xp { font-size: 12.5px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.rank-row.me { background: var(--primary-soft); border-radius: 12px; padding: 11px 10px; border-bottom: none; margin: 4px 0; }
.rank-row.me .r-num, .rank-row.me .r-xp { color: var(--primary-deep); }

/* ---------- Membership ---------- */
.trial-banner { margin: 4px 20px 14px; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, #2563EB, #4F8DFF); color: #fff; position: relative; overflow: hidden; }
.trial-banner::after { content: "🎁"; position: absolute; right: -8px; bottom: -14px; font-size: 84px; opacity: .18; transform: rotate(-12deg); }
.trial-banner .tb-lv { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 99px; display: inline-block; margin-bottom: 10px; }
.trial-banner h3 { font-size: 19px; margin-bottom: 5px; }
.trial-banner p { font-size: 12.5px; opacity: .9; line-height: 1.55; }
.trial-banner .btn { margin-top: 13px; background: #fff; color: var(--blue); box-shadow: none; max-width: 160px; padding: 11px; font-size: 13.5px; }
/* 免费体验条（新版会员） */
.trial-strip { margin: 4px 20px 10px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #2563EB, #4F8DFF); color: #fff; display: flex; align-items: center; gap: 10px; }
.trial-strip .ts-gift { font-size: 22px; flex: none; }
.trial-strip .ts-txt { flex: 1; min-width: 0; }
.trial-strip .ts-txt b { font-size: 13.5px; display: block; }
.trial-strip .ts-txt small { font-size: 10.5px; opacity: .85; }
.trial-strip .btn { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; border: none; padding: 8px 14px; font-size: 12px; border-radius: 99px; flex: none; }

/* 按级别解锁 */
.lv-cards { margin: 0 20px 14px; display: flex; flex-direction: column; gap: 10px; }
.level-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); }
.level-card .lc-badge { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; background: var(--lv); }
.level-card .lc-txt { flex: 1; min-width: 0; }
.level-card .lc-txt b { font-size: 13.5px; display: block; }
.level-card .lc-txt small { font-size: 10.5px; color: var(--ink3); }
.level-card .lc-btn { border: none; border-radius: 99px; padding: 8px 13px; font-size: 12.5px; font-weight: 800; color: var(--lv); background: var(--lv-soft); cursor: pointer; font-family: inherit; }
.level-card .lc-btn:hover { filter: brightness(.97); }
.level-card .lc-btn:active { transform: scale(.97); }
.all-card .btn { margin-top: 14px; }
/* 训练功能包 */
.train-card { margin: 0 20px 14px; display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #FFF4EC, #FFE9DB); border: 1.5px solid #FFD3B8; border-radius: 16px; padding: 11px 12px 11px 14px; box-shadow: var(--shadow); }
.train-card .tc-emoji { font-size: 19px; flex: none; letter-spacing: 1px; }
.train-card .tc-txt { flex: 1; min-width: 0; }
.train-card .tc-txt b { font-size: 13.5px; display: block; }
.train-card .tc-txt small { font-size: 10.5px; color: #B4643A; }
.train-card .tc-btn { border: none; border-radius: 99px; padding: 9px 15px; font-size: 12.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), #FF8A4D); cursor: pointer; font-family: inherit; flex: none; }
.train-card .tc-btn:hover { filter: brightness(.97); }
.train-card .tc-btn:active { transform: scale(.97); }

.member-card { margin: 0 20px 14px; border-radius: 22px; padding: 24px 20px; background: linear-gradient(150deg, #171A22 0%, #2A2F3E 100%); color: #fff; position: relative; overflow: hidden; }
.member-card::before { content: ""; position: absolute; top: -60px; right: -60px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,107,44,.45), transparent 65%); }
.member-card .mc-lv { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #FFB98F; border: 1px solid rgba(255,185,143,.4); border-radius: 99px; padding: 4px 10px; margin-bottom: 14px; }
.member-card .mc-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.member-card .mc-price b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.member-card .mc-price span { color: rgba(255,255,255,.6); font-size: 13px; }
.member-card .mc-sub { font-size: 12.5px; color: rgba(255,255,255,.62); margin-bottom: 18px; }
.member-features { display: flex; flex-direction: column; gap: 10px; }
.member-features .mf { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.member-features .mf .ok {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(18,183,106,.25); color: #47E0A2;
  display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800;
}
.member-features .mf span small { display: block; color: rgba(255,255,255,.45); font-size: 10.5px; }
.compare-card { margin: 0 20px 14px; padding: 16px; }
.compare-card .cc-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.compare-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.compare-row:last-child { border-bottom: none; }
.compare-row .c-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.compare-row .c-name { flex: 1; font-size: 13px; }
.compare-row .c-name small { display: block; color: var(--ink3); font-size: 10.5px; }
.compare-row .c-price { font-size: 13.5px; font-weight: 800; }
.compare-row.win .c-price { color: var(--primary-deep); }
.compare-row.win { background: var(--primary-soft); border-radius: 10px; padding: 11px 12px; border-bottom: none; }
.pay-note { text-align: center; font-size: 11px; color: var(--ink3); margin: 2px 0 6px; }
.pay-icons { text-align: center; font-size: 12px; color: var(--ink2); font-weight: 600; margin-bottom: 10px; letter-spacing: .04em; }
.btn.primary.lock { position: relative; }

/* ---------- 补充 ---------- */
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; border: none; cursor: pointer;
  background: transparent; color: var(--ink); display: grid; place-items: center; padding: 0;
}
.icon-btn:hover { background: rgba(16,24,40,.05); }
.mini-play {
  background: none; border: none; cursor: pointer; color: var(--ink3);
  display: inline-grid; place-items: center; padding: 2px; vertical-align: middle;
}
.mini-play:hover { color: var(--primary); }
#listen-subtitle {
  font-size: 13px; color: var(--ink2); font-weight: 600; margin-top: 8px; display: none;
}
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: rgba(16,24,40,.92); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; z-index: 999; opacity: 0; pointer-events: none;
  transition: all .25s; max-width: 84vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wc-pane[hidden] { display: none; }
.wc-pane .row { display: flex; }

/* ---------- 截图 QA 模式 ---------- */
body.qa .toolbar { display: none; }
body.qa .stage { padding: 0; }
body.qa figcaption { display: none; }

/* ============ 生产模块：弹窗 / 账号 / 支付 ============ */
.chip-btn {
  border: 1px solid var(--primary); color: var(--primary); background: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.chip-btn:hover { background: var(--primary-soft); }
.modal-mask {
  position: fixed; inset: 0; z-index: 999; background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-mask[hidden] { display: none; }
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 32px rgba(15,23,42,.18);
  display: flex; flex-direction: column; gap: 12px; animation: modalUp .22s ease;
}
@keyframes modalUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 17px; font-weight: 800; text-align: center; }
.modal-price { font-size: 30px; font-weight: 900; color: var(--primary); text-align: center; }
.pay-channels { display: flex; gap: 10px; }
.pay-channel {
  flex: 1; border: 1.5px solid var(--line, #E5E7EB); background: #fff; border-radius: 14px;
  padding: 12px 0; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pay-channel.active { border-color: var(--primary); background: var(--primary-soft, #FFF1EB); color: var(--primary); }
.pay-status { font-size: 12.5px; color: #64748B; text-align: center; min-height: 16px; }
.pay-status.ok { color: var(--green, #12B76A); }
.pay-status.err { color: #EF4444; }
.auth-hint { font-size: 12px; color: #8A94A6; text-align: left; margin: 6px 2px 2px; line-height: 1.5; }
.device-line { font-size: 12px; color: #64748B; background: #F5F7FA; border: 1px solid #E6EAF2; border-radius: 10px; padding: 8px 12px; margin: 0 16px 12px; }
.device-line b { color: #2563EB; font-weight: 600; }
.auth-tabs { display: flex; gap: 10px; justify-content: center; }
.auth-tabs button {
  border: none; background: none; font-size: 14px; font-weight: 600; color: #94A3B8;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.auth-tabs button.active { color: var(--primary); background: var(--primary-soft, #FFF1EB); }

/* ============================================================
   响应式适配：手机 / 平板 / 电脑
   ------------------------------------------------------------
   单屏模式（body.single）下去掉手机外框，应用铺满视口；
   内容区随屏幕宽度自适应，宽屏下自动扩展为多栏布局。
   ============================================================ */
body.single { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.single .toolbar { flex: none; }
body.single .stage {
  flex: 1; min-height: 0; display: flex; flex-wrap: nowrap; gap: 0;
  justify-content: center; align-items: stretch; padding: 0;
}
body.single .artboard.active { flex: 1; min-height: 0; height: auto; gap: 0; }
body.single figcaption { display: none; }
body.single .phone {
  width: 100%; height: 100%; border: none; border-radius: 0;
  box-shadow: none; overflow: hidden;
}
body.single .statusbar, body.single .homebar { display: none; }
body.single .scroll { top: 0; left: 0; right: 0; }
/* 宽屏/平板下 .scroll 变为 flex 纵向布局：子项若含 overflow-x（如 .pills）其 min-height 归零，
   会被 flex-shrink 压扁裁切。固定所有直接子项高度，内容交给滚动容器。 */
body.single .scroll > * { flex: none; }
body.single .topbar { background: var(--bg); }

/* 平板：内容居中并限定可读宽度，网格扩展为两栏 */
@media (min-width: 600px) and (max-width: 899px) {
  body.single .scroll {
    display: flex; flex-direction: column; align-items: center;
    padding: 18px 28px 44px;
  }
  body.single .scroll > * { width: 100%; max-width: 720px; }
  body.single .module-grid { grid-template-columns: repeat(2, 1fr); }
  body.single .mode-grid { grid-template-columns: repeat(2, 1fr); }
  body.single .stat-grid { grid-template-columns: repeat(2, 1fr); }
  body.single .quick-row { gap: 16px; }
  body.single .tabbar { justify-content: center; gap: 56px; }
}
/* 宽屏：内容居中并限定可读宽度，网格扩展为多栏 */
@media (min-width: 900px) {
  body.single .scroll {
    display: flex; flex-direction: column; align-items: center;
    padding: 18px 32px 44px;
  }
  body.single .scroll > * { width: 100%; max-width: 1120px; }
  body.single .scroll > .word-card { max-width: 860px; }
  body.single .scroll > .flip-card { height: 380px; }
  body.single .pills { justify-content: center; }
  body.single .module-grid { grid-template-columns: repeat(4, 1fr); }
  body.single .mode-grid { grid-template-columns: repeat(4, 1fr); }
  body.single .stat-grid { grid-template-columns: repeat(4, 1fr); }
  body.single .quick-row { gap: 16px; }
  body.single .grade-row { max-width: 560px; margin-left: auto; margin-right: auto; }
  .modal-mask { align-items: center; }
  .modal { border-radius: 20px; max-width: 440px; }
  body.single .tabbar { justify-content: center; gap: clamp(48px, 10vw, 128px); }
}
@media (min-width: 900px) and (max-width: 1199px) {
  body.single .scroll > * { max-width: 860px; }
}
@media (max-width: 420px) {
  body.single .toolbar { padding: 10px 12px; }
  body.single .toolbar .brand { font-size: 13px; }
}

/* ---------- 词汇卡：词根构词 / 搭配 / 例句 学习流 ---------- */
.wc-body { min-height: 0; }
.wc-sec { margin-bottom: 20px; }
.wc-sec:last-child { margin-bottom: 0; }
.wc-sec-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 800; color: var(--ink2); margin-bottom: 10px;
}
.wc-sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wc-sec-title .sub { font-weight: 500; color: var(--ink3); font-size: 11px; }
.colloc .row { align-items: flex-start; }
.colloc .nl { flex: 1; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; min-width: 0; }
.colloc .nl b { color: var(--primary-deep); background: var(--primary-soft); border-radius: 6px; padding: 0 5px; }
.colloc .nl .mini-play { flex: none; align-self: center; }
.colloc .zh {
  white-space: normal; text-align: right; max-width: 48%; font-size: 11.5px; line-height: 1.45;
}
.colloc .tag {
  display: inline-block; background: var(--bg); color: var(--ink3); border-radius: 6px;
  padding: 1px 6px; font-size: 10px; font-style: normal; font-weight: 600; margin-left: 5px;
}
.sample-sen .nl { display: flex; align-items: baseline; gap: 8px; }
.sample-sen .nl .mini-play { flex: none; color: var(--primary); align-self: center; }
.sample-sen .sen-tag { font-size: 10px; color: var(--ink3); background: var(--bg); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.morpheme { flex-wrap: wrap; }
.morpheme b { white-space: nowrap; }
.morpheme .plus { flex: none; }
.note { line-height: 1.7; }
.pq-nav { display: flex; gap: 10px; margin: 0 20px 14px; }
.pq-nav .btn { flex: 1; padding: 12px 10px; }

/* ---------- 单屏模式：所有页面滚动容器（此前只有首页有 .scroll） ---------- */
body.single .screen { position: relative; height: 100%; min-height: 0; }
body.single .screen:not(#s-home) .scroll { top: 52px; }
@media (min-width: 900px) {
  body.single .scroll > .pq-nav { max-width: 1120px; }
  body.single .scroll > .word-card { margin-left: auto; margin-right: auto; }
}
