/* Layout: phone-first single column (max 560px); a quiet "exam paper" base where the colour is reserved
   for meaning — sentence-part roles, learning stages and right/wrong. */
:root {
  --bg: #f3f4f8; --card: #ffffff; --ink: #151935; --muted: #5b6182; --line: #dde0eb; --soft: #eceef6;
  --accent: #b4286a; --accent-ink: #ffffff; --accent-soft: #fbe3ee;
  --hi: #ffe14d; --hi-ink: #151935;
  --good: #19865a; --good-bg: #e1f4ea; --bad: #c3374b; --bad-bg: #fbe5e8; --warn: #b26a00; --warn-bg: #fdf0d9;
  --r-topic: #2c5fc7; --r-topic-bg: #e2eafb;
  --r-verb: #17825a; --r-verb-bg: #ddf2e7;
  --r-link: #b35d07; --r-link-bg: #fcebd6;
  --r-detail: #7446c0; --r-detail-bg: #eee6fb;
  --r-hedge: #0f7a85; --r-hedge-bg: #dbf1f3;
  --r-judge: #be3277; --r-judge-bg: #fbe2ee;
  --s-known: #19865a; --s-familiar: #6fbf8f; --s-learning: #f0b429; --s-new: #d4d7e3;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1226; --card: #181c36; --ink: #eceef8; --muted: #a2a8c6; --line: #2b3054; --soft: #20254a;
  --accent: #f27fb5; --accent-ink: #0f1226; --accent-soft: #3c1d31;
  --hi: #f2d43a; --hi-ink: #0f1226;
  --good: #5fd39c; --good-bg: #153429; --bad: #ff8b9a; --bad-bg: #3a1a24; --warn: #f3b552; --warn-bg: #3a2c12;
  --r-topic: #8db1ff; --r-topic-bg: #1d2d55; --r-verb: #6fdcaa; --r-verb-bg: #163a2c;
  --r-link: #f5b06a; --r-link-bg: #3e2b15; --r-detail: #c3a3ff; --r-detail-bg: #2f2350;
  --r-hedge: #6fd5df; --r-hedge-bg: #143a3e; --r-judge: #f58fbf; --r-judge-bg: #3e1d30;
  --s-known: #5fd39c; --s-familiar: #2f8a5e; --s-learning: #d79c1c; --s-new: #343a62;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1226; --card: #181c36; --ink: #eceef8; --muted: #a2a8c6; --line: #2b3054; --soft: #20254a;
  --accent: #f27fb5; --accent-ink: #0f1226; --accent-soft: #3c1d31;
  --hi: #f2d43a; --hi-ink: #0f1226;
  --good: #5fd39c; --good-bg: #153429; --bad: #ff8b9a; --bad-bg: #3a1a24; --warn: #f3b552; --warn-bg: #3a2c12;
  --r-topic: #8db1ff; --r-topic-bg: #1d2d55; --r-verb: #6fdcaa; --r-verb-bg: #163a2c;
  --r-link: #f5b06a; --r-link-bg: #3e2b15; --r-detail: #c3a3ff; --r-detail-bg: #2f2350;
  --r-hedge: #6fd5df; --r-hedge-bg: #143a3e; --r-judge: #f58fbf; --r-judge-bg: #3e1d30;
  --s-known: #5fd39c; --s-familiar: #2f8a5e; --s-learning: #d79c1c; --s-new: #343a62;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
#app { max-width: 560px; margin: 0 auto; min-height: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
mark { background: var(--hi); color: var(--hi-ink); border-radius: 3px; padding: 0 .15em; }
[lang="zh"] { font-family: var(--zh); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); display: flex; align-items: center; gap: 8px;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); min-height: 56px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; flex: 1; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: .95rem; letter-spacing: -.02em; }
.bar-title { flex: 1; font-size: 1.1rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--ink); flex: none; }
.iconbtn:hover { background: var(--soft); }
.iconbtn svg { width: 24px; height: 24px; }
.iconbtn.sm { width: 32px; height: 32px; color: var(--muted); }
.iconbtn.sm svg { width: 20px; height: 20px; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.progress { height: 5px; background: var(--line); margin-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.progress.timer i { background: var(--warn); transition: none; }

/* ---- page */
.page { padding-block: 12px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
.hero { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.eyebrow, .kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-title { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.hero-title::after { content: ""; display: block; width: 64px; height: 8px; background: var(--hi); border-radius: 2px; margin-top: 6px; }
.hero-sub { color: var(--muted); max-width: 46ch; }
.levels { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.lvchip { border: 2px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-weight: 700; font-family: var(--display); display: inline-flex; align-items: baseline; gap: 6px; }
.lvchip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.lvchip:disabled { opacity: .5; }
.lvchip small { font-family: var(--body); font-weight: 400; font-size: .7rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 1.15rem; }
.main-card { border-width: 2px; border-color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.hint { font-size: .9rem; color: var(--muted); }

.btn { border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; min-height: 48px; }
.btn small { font-weight: 400; font-size: .78rem; opacity: .85; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--card); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn:not(:disabled):hover { filter: brightness(1.06); }

.stagebar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--s-new); }
.stagebar i { display: block; height: 100%; }
.s-known { background: var(--s-known); } .s-familiar { background: var(--s-familiar); } .s-learning { background: var(--s-learning); } .s-new { background: var(--s-new); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.section-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-family: var(--body); font-weight: 700; margin-top: 8px; }
.tiles { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 14px 14px 14px 16px; }
.tile:first-child { border-top: 0; }
.tile:hover { background: var(--soft); }
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile-name { font-weight: 700; }
.tile-sub { font-size: .88rem; color: var(--muted); }
.tile-meta { font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soon { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.soon b { font-family: var(--display); }
.soon span { font-size: .85rem; color: var(--muted); }
.foot { text-align: center; font-size: .8rem; color: var(--muted); }

.lv { font-family: var(--body); font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 99px; border: 1.5px solid currentColor; text-transform: none; }
.lv-1 { color: var(--r-verb); } .lv-2 { color: var(--r-topic); } .lv-3 { color: var(--r-judge); }
.lvnum { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%; border: 1.5px solid currentColor; font-size: .8em; margin-right: 2px; align-self: center; }

/* ---- word bank */
.intro-line { font-size: .92rem; }
.wgroup { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.wgroup-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.wgroup-head p { font-size: .88rem; }
.wlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wlist li { border-top: 1px solid var(--line); }
.wrow { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 2px; background: none; border: 0; text-align: left; flex-wrap: wrap; }
.wname { font-weight: 700; }
.wzh { color: var(--muted); font-size: .9rem; flex: 1; font-family: var(--zh); }
.pill { margin-left: auto; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; color: var(--ink); }
.pill.s-new { background: var(--soft); color: var(--muted); }
.pill.s-known, .pill.s-familiar { color: var(--card); }
.wdetail { padding: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }

/* ---- word card */
.wc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.wdetail .wc { background: var(--soft); border: 0; }
.wc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wc-word { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; }
.wc-pos { font-style: italic; color: var(--muted); }
.wc-top .iconbtn { margin-left: auto; }
.wc-def { font-size: 1.1rem; }
.wc-zh { font-size: 1.1rem; color: var(--r-detail); }
.wc-ex { font-style: italic; color: var(--muted); border-left: 3px solid var(--hi); padding-left: 10px; }
.wc-fam { font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; }
.wc-fam span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); padding-top: .15em; }
.wc-note { font-size: .92rem; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }

/* ---- play */
.play { gap: 14px; }
.prompt-word { font-family: var(--display); font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prompt-def, .prompt-goal { font-size: 1.2rem; font-weight: 700; }
.prompt-zh { font-size: 1.05rem; color: var(--r-detail); }
.prompt-sent { font-size: 1.3rem; line-height: 1.6; }
.gap { display: inline-block; min-width: 4.5em; border-bottom: 3px solid var(--accent); text-align: center; font-weight: 700; color: var(--accent); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.opt:not(:disabled):hover { border-color: var(--accent); }
.opt-zh { font-size: .88rem; color: var(--muted); }
.opt-word { font-weight: 700; font-size: 1.1rem; }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.dim { opacity: .55; }
.typeform { display: flex; gap: 10px; flex-wrap: wrap; }
.typeform input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.typeform input:focus { border-color: var(--accent); outline: none; }

.fb { border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.fb.ok { background: var(--good-bg); }
.fb.no { background: var(--bad-bg); }
.fb > b { font-family: var(--display); font-size: 1.1rem; }
.fb.ok > b { color: var(--good); } .fb.no > b { color: var(--bad); }
.fb .ex { font-style: italic; color: var(--muted); }
.tip { border-left: 3px solid var(--hi); padding-left: 10px; font-size: .95rem; }

/* sentence tiles */
.answer { min-height: 72px; border: 2px dashed var(--line); border-radius: 12px; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; align-items: center; }
.answer.ok { border-style: solid; border-color: var(--good); background: var(--good-bg); }
.answer.no { border-style: solid; border-color: var(--bad); }
.pool { display: flex; flex-wrap: wrap; gap: 8px; }
.tilechip { border: 0; border-radius: 10px; padding: 9px 13px; font-size: 1rem; font-weight: 700; border-bottom: 3px solid rgba(0,0,0,.18); }
.tilechip.ghost { visibility: hidden; }
.r-topic { background: var(--r-topic-bg); color: var(--r-topic); }
.r-verb { background: var(--r-verb-bg); color: var(--r-verb); }
.r-link { background: var(--r-link-bg); color: var(--r-link); }
.r-detail { background: var(--r-detail-bg); color: var(--r-detail); }
.r-hedge { background: var(--r-hedge-bg); color: var(--r-hedge); }
.r-judge { background: var(--r-judge-bg); color: var(--r-judge); }
.inline { padding: 1px 6px; border-radius: 6px; font-weight: 700; line-height: 1.9; }
.rolekey { display: flex; flex-wrap: wrap; gap: 6px; font-size: .75rem; font-weight: 700; }
.rolekey span { padding: 2px 8px; border-radius: 99px; }

/* exam question */
.exam-q { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ink); border-radius: 10px; padding: 14px 16px; font-size: 1.15rem; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.exam-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
mark.cmd { background: var(--hi); }

/* spot the error */
.err-title { font-size: 1.4rem; }
.errtext { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 1.12rem; line-height: 2.1; }
.tok { white-space: nowrap; display: inline; background: none; border: 0; padding: 2px 3px; border-radius: 6px; font-size: inherit; line-height: 1.4; }
.tok:not(:disabled):hover { background: var(--soft); }
.tok.t-marked { background: var(--hi); color: var(--hi-ink); }
.tok.t-found { background: var(--good-bg); color: var(--good); font-weight: 700; }
.tok.t-missed { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.tok.t-false { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.tok s { opacity: .7; }
.tok ins { text-decoration: none; }
.punct { }
.errlist { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.errlist li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.errlist li span { flex-basis: 100%; font-size: .9rem; color: var(--muted); }
.errlist li.miss b { color: var(--warn); }

/* results */
.result { align-items: center; text-align: center; }
.result .big { font-family: var(--display); font-size: 3.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.result .row2 { width: 100%; }
.missed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.missed li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .95rem; }

/* settings */
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 4px 0; }
.switch > span { flex: 1; display: flex; flex-direction: column; }
.switch > span .muted { font-size: .88rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }
.warn { color: var(--bad); font-weight: 700; }

/* blitz */
.blitz { align-items: stretch; }
.lives { color: var(--bad); letter-spacing: 3px; font-size: 1.1rem; }
.lives .lost { color: var(--line); }
.bz-score { text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.bz-score b { font-family: var(--display); font-size: 2rem; color: var(--ink); }
.bz-stage { min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px 4px; }
.bz-card { width: 100%; max-width: 420px; min-height: 230px; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; touch-action: pan-y; user-select: none; transition: transform .25s, opacity .25s, border-color .15s; cursor: grab; }
.bz-card.lean-yes { border-color: var(--good); }
.bz-card.lean-no { border-color: var(--bad); }
.bz-card.fly-yes { transform: translateX(120%) rotate(12deg); opacity: 0; }
.bz-card.fly-no { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.bz-card.shake { animation: shake .4s; border-color: var(--bad); }
.bz-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.bz-word { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -.02em; }
.bz-mean { font-size: 1.15rem; }
.bz-mean.zh { font-size: 1.5rem; color: var(--r-detail); }
.bz-statement { font-size: 1.3rem; font-weight: 700; line-height: 1.4; }
.bz-why { background: var(--bad-bg); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: .95rem; }
.bz-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bzbtn { border: 0; border-radius: 16px; padding: 14px; font-size: 1.6rem; font-weight: 800; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.bzbtn small { font-size: .8rem; font-weight: 700; }
.bzbtn.yes { background: var(--good-bg); color: var(--good); }
.bzbtn.no { background: var(--bad-bg); color: var(--bad); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); z-index: 20; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* endless sessions: live score */
.scoreline { display: flex; align-items: baseline; gap: 8px; padding-block: 2px 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.score-pct { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--accent); }
.score-n { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .9rem; }
.score-run { color: var(--muted); font-weight: 700; font-size: .9rem; }
.btn.finish { min-height: 36px; flex-direction: row; }
.zhchip { border: 2px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 10px; font-weight: 700; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.zhchip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Word match */
.studylist { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.studylist li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.studylist li:first-child { border-top: 0; }
.studylist [lang="zh"] { color: var(--r-detail); font-size: 1.05rem; text-align: right; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mcell { min-height: 56px; border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 10px; font-weight: 700; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; transition: background .15s, border-color .15s, opacity .2s; }
.mcell.zhcell { font-weight: 400; font-size: 1.05rem; }
.mcell:not(:disabled):hover { border-color: var(--accent); }
.mcell.sel { border-color: var(--accent); background: var(--accent-soft); }
.mcell.bad { border-color: var(--bad); background: var(--bad-bg); animation: shake .35s; }
.mcell.done { border-color: var(--good); background: var(--good-bg); color: var(--good); opacity: .6; }

.tip-zh { display: block; margin-top: 4px; color: var(--muted); font-family: var(--zh); font-size: .95em; }
