/* ============================================================
   KLHSK4 skin — cloned from KLHSK3-3.0/css/klhsk3.css (2026-10-31); same DS tokens, same family look.
   KLHSK3 skin — loads AFTER ../assets/kuaile-ds.css
   Director 2026-09-24: "the font, design and colour we make it same" as KLCPH —
   Nunito + Noto Sans SC, blue #0C70E0 + gold #F7AE2A, glassmorphism.
   The 2026-09-23 teal/orange product tone is retired. The engine keeps its
   --brand/--accent names, but every one of them now points at a DS token, so the
   lesson pages are the same colour system as KLCPH1–8 with no second palette.
   AA rule unchanged: white text only on --brand-deep (= --blue, 4.6:1).
   ============================================================ */
:root {
  --brand: var(--blue);
  --brand-lite: var(--blue-lite);
  --brand-deep: var(--blue);
  --brand-lip: var(--blue-lip);
  --brand-glow: var(--blue-glow);
  --brand-soft: var(--sky-glow-blue);
  --accent: var(--gold);
  --accent-soft: var(--sky-glow-gold);
  --lip-brand: var(--lip-blue);
  --lip-brand-press: var(--lip-blue-press);
}

/* ---- page shell (420 phone / 720 wide, platform rule) ------ */
body.klhsk { margin: 0; background: var(--bg-app); font-family: var(--font-ui); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
.klh-frame { max-width: var(--frame-max); margin: 0 auto; padding: 14px var(--frame-pad) 90px; }
@media (min-width: 720px) { .klh-frame { max-width: 680px; } }

/* ---- header ------------------------------------------------ */
.klh-top { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; }
.klh-top img.logo { width: 42px; height: 42px; }
.klh-top .t { flex: 1; }
.klh-top .t .en { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.klh-top .t .cn { font-family: var(--font-hanzi); font-weight: 900; font-size: 20px; color: var(--brand-deep); }
.klh-toggles { display: flex; gap: 6px; }
.klh-tg { border: 2px solid var(--brand); background: #fff; color: var(--brand-deep); font-family: var(--font-ui);
  font-weight: 900; font-size: 12px; border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.klh-tg.off { border-color: #C9D4E4; color: #8E9BB3; background: #F3F6FB; }

/* ---- progress ---------------------------------------------- */
.klh-prog { height: 12px; border-radius: 999px; background: #E2EEEB; overflow: hidden; margin: 10px 0 18px; }
.klh-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-lite)); transition: width .4s; }

/* ---- cards ------------------------------------------------- */
.klh-card { background: linear-gradient(180deg, var(--glass-top), var(--glass-bot)); border: 1.5px solid var(--glass-edge);
  border-radius: var(--radius-card); padding: 20px; box-shadow: 0 10px 30px rgba(15, 118, 110, .10); }
.klh-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--brand-deep); text-transform: uppercase; margin-bottom: 8px; }
.klh-eyebrow .n { color: var(--gold-text); }
.klh-hanzi { font-family: var(--font-hanzi); font-weight: 700; font-size: 26px; line-height: 1.45; color: var(--brand-deep); }
.klh-py { font-size: 15px; color: var(--ink-soft); font-weight: 700; margin-top: 6px; }
.klh-en { font-size: 14px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.klh-note { font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 10px; line-height: 1.5; }

/* ---- tap-to-reveal (Director rule) -------------------------- */
.rv { position: relative; cursor: pointer; border-radius: 8px; transition: filter .15s; }
.rv.masked { filter: blur(7px); user-select: none; }
.rv.masked::after { content: "👆"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  filter: blur(0); font-size: 13px; opacity: .0; }
body.hide-py .py-line { display: none !important; }
body.hide-en .en-line { display: none !important; }

/* ---- audio button ------------------------------------------ */
.klh-play { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--brand-lite), var(--brand)); color: #063F3A; font-family: var(--font-ui);
  font-weight: 900; font-size: 15px; border-radius: 18px; padding: 12px 20px; box-shadow: var(--lip-brand); min-height: var(--tap-min); }
.klh-play:active { transform: translateY(3px); box-shadow: var(--lip-brand-press); }
.klh-play.big { font-size: 22px; padding: 20px 30px; border-radius: 24px; }
.klh-play.mini { font-size: 13px; padding: 8px 12px; border-radius: 12px; box-shadow: 0 4px 0 var(--brand-lip); }
.klh-play.err { background: #F3F6FB; color: #8E9BB3; box-shadow: 0 4px 0 #C9D4E4; }

/* ---- chunk cards (Break Down) ------------------------------- */
.klh-chunks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.klh-chunk { background: #fff; border: 2px solid var(--brand); border-radius: 16px; padding: 10px 14px; cursor: pointer;
  min-height: var(--tap-min); box-shadow: 0 4px 0 rgba(15, 118, 110, .25); }
.klh-chunk .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 20px; color: var(--brand-deep); }
.klh-chunk .py { font-size: 12px; font-weight: 800; color: var(--brand-deep); margin-top: 2px; }
.klh-chunk .en { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: 1px; }
.klh-chunk.hot { border-color: var(--gold); background: var(--accent-soft); }

/* ---- scramble tiles ----------------------------------------- */
.klh-answer-row { min-height: 62px; border: 2px dashed #B9CEC9; border-radius: 16px; background: rgba(255,255,255,.6);
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; margin: 12px 0; }
.klh-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.klh-tile { background: #fff; border: 2px solid #C9D4E4; border-bottom-width: 4px; border-radius: 14px; padding: 9px 13px;
  cursor: pointer; min-height: var(--tap-min); text-align: center; }
.klh-tile .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 19px; color: var(--brand-deep); }
.klh-tile .py { font-size: 11px; font-weight: 800; color: var(--ink-soft); margin-top: 1px; }
.klh-tile.used { opacity: .25; pointer-events: none; }
.klh-tile.inrow { border-color: var(--brand); }
.klh-tile.good { border-color: var(--green); background: #EAF9F0; }
.klh-tile.bad { border-color: var(--red); background: #FFF0EE; animation: klhShake .3s; }
@keyframes klhShake { 25% { transform: translateX(-4px);} 75% { transform: translateX(4px);} }

/* ---- MCQ options -------------------------------------------- */
.klh-opts { display: grid; gap: 10px; margin-top: 14px; }
.klh-opt { background: #fff; border: 2px solid #C9D4E4; border-bottom-width: 4px; border-radius: 16px; padding: 13px 15px;
  cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: var(--tap-min); text-align: left; font-family: inherit; }
.klh-opt .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 18px; color: var(--brand-deep); }
.klh-opt .py { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.klh-opt.correct { border-color: var(--green); background: #EAF9F0; }
.klh-opt.wrong { border-color: var(--red); background: #FFF0EE; }
.klh-opt:disabled { cursor: default; }

/* ---- matching ----------------------------------------------- */
.klh-match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.klh-mitem { background: #fff; border: 2px solid #C9D4E4; border-radius: 14px; padding: 11px 12px; cursor: pointer; min-height: var(--tap-min); }
.klh-mitem .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 15.5px; color: var(--brand-deep); }
.klh-mitem .py { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.klh-mitem .klh-rev { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 800; color: var(--ink-soft); background: #EEF3FA; border-radius: 6px; padding: 1px 6px; }
.klh-mitem.sel { border-color: var(--brand-deep); background: var(--brand-soft); }
.klh-mitem.done { border-color: var(--green); background: #EAF9F0; opacity: .8; pointer-events: none; }
.klh-mitem.bad { animation: klhShake .3s; border-color: var(--red); }

/* ---- feedback panel ------------------------------------------ */
.klh-fb { border-radius: 16px; padding: 14px 16px; margin-top: 14px; font-weight: 700; font-size: 14px; line-height: 1.55; }
.klh-fb.good { background: #EAF9F0; border: 2px solid var(--green); color: #1E7A45; }
.klh-fb.bad { background: #FFF4F2; border: 2px solid var(--red); color: #A5321F; }
.klh-fb .why { display: block; margin-top: 6px; color: var(--ink-soft); }

/* ---- 对比 card (shown under the feedback when an item carries `contrast`) ---- */
.klh-cmp { max-width: 560px; margin-top: 10px; background: #fff; border: 1.5px solid #DCE8F7; border-radius: 18px; padding: 12px 14px 8px;
  box-shadow: 0 8px 22px rgba(20, 40, 80, .07); animation: klhCmpIn .28s ease-out both; }
.klh-cmp-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: 13px; font-weight: 900;
  color: var(--gold-text); letter-spacing: .06em; margin-bottom: 2px; }
.klh-cmp-h .ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: linear-gradient(180deg, var(--gold-lite), var(--gold)); color: #4A3000; font-family: system-ui, sans-serif; font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--gold-lip); }
.klh-cmp-h .n { color: var(--muted); font-weight: 800; letter-spacing: .02em; }
.klh-cmp-row { padding: 12px 0 10px; border-top: 1px dashed #E3EAF5; }
.klh-cmp-h + .klh-cmp-row { border-top: none; }
.klh-cmp-tag { display: inline-block; margin-bottom: 7px; font-family: var(--font-hanzi); font-weight: 900; font-size: 14.5px; line-height: 1.2;
  padding: 5px 12px; border-radius: 999px; background: #F1F4F9; color: var(--ink-soft); border: 1.5px solid #E1E8F2; }
.klh-cmp-row.main .klh-cmp-tag { background: #E8F2FF; color: var(--blue-lip); border-color: #BFDBFE; }
.klh-cmp-use { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
.klh-cmp-ex { display: flex; gap: 6px; margin-top: 6px; padding: 7px 10px; border-radius: 12px; background: #F7FAFE;
  font-family: var(--font-hanzi); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.klh-cmp-ex.bad { background: #FFF6F5; }
.klh-cmp-ex .mk { flex: 0 0 auto; font-family: var(--font-ui); font-weight: 900; }
.klh-cmp-ex .mk.ok { color: var(--green-lip); }
.klh-cmp-ex .mk.no { color: var(--red-lip); }
.klh-cmp-ex.bad s { text-decoration-color: rgba(194, 59, 46, .6); text-decoration-thickness: 2px; color: var(--muted); }
.klh-cmp .klh-enwrap { margin-top: 2px; }
@keyframes klhCmpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .klh-cmp { animation: none; } }

/* ---- buttons -------------------------------------------------- */
.klh-btn { display: block; width: 100%; border: none; cursor: pointer; margin-top: 16px; font-family: var(--font-ui);
  background: linear-gradient(180deg, var(--blue-lite), var(--blue)); color: #fff; font-weight: 900; font-size: 17px;
  border-radius: var(--radius-btn); padding: 15px; box-shadow: var(--lip-brand); min-height: var(--tap-min); }
.klh-btn:active { transform: translateY(3px); box-shadow: var(--lip-brand-press); }
.klh-btn:disabled { background: #C9D4E4; box-shadow: 0 5px 0 #A9B7CC; cursor: default; }
.klh-btn.ghost { background: #fff; color: var(--brand-deep); border: 2px solid var(--brand); box-shadow: 0 5px 0 rgba(15,118,110,.2); }

/* ---- vary chips ----------------------------------------------- */
.klh-varies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.klh-vchip { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--gold-text); border-radius: 999px;
  padding: 9px 14px; cursor: pointer; font-weight: 900; font-family: var(--font-hanzi); font-size: 16px; min-height: var(--tap-min); }
.klh-vchip.on { background: var(--gold); color: #22324B; }

/* ---- streak / score line -------------------------------------- */
.klh-meta { display: flex; gap: 12px; align-items: center; font-weight: 900; font-size: 13px; color: var(--gold-text); margin: 6px 0 2px; }
.klh-meta .pts { color: var(--brand-deep); }

/* ---- lesson map (index) --------------------------------------- */
.klh-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.klh-node { border-radius: 20px; padding: 14px; background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1.5px solid var(--glass-edge); box-shadow: 0 8px 20px rgba(15,118,110,.08); text-decoration: none; color: inherit; display: block; }
.klh-node .num { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--brand-deep); }
.klh-node .cn { font-family: var(--font-hanzi); font-weight: 900; font-size: 16px; margin: 4px 0 2px; color: var(--brand-deep); }
.klh-node .en { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.35; }
.klh-node .free { display: inline-block; margin-top: 8px; background: var(--gold); color: #22324B; font-size: 11px;
  font-weight: 900; border-radius: 999px; padding: 3px 10px; }
.klh-node.locked { opacity: .55; }
.klh-node.locked .free { background: #E2E8F0; color: #5B6B85; }

/* ---- Lesson Home (module hub) — Director GO 2026-09-30 ------------- */
.klh-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.klh-chip { background: var(--glass-fill); border: var(--glass-border); border-radius: var(--radius-pill);
  padding: 6px 13px; font-size: 12.5px; font-weight: 900; color: var(--ink-soft);
  box-shadow: 0 4px 10px rgba(40,80,150,.10); }
.klh-chip.g { background: rgba(224,246,232,.85); border: 1.5px solid rgba(42,150,85,.30); color: var(--green-lip); }
.klh-chip.f { background: rgba(255,231,200,.8); border: 1.5px solid rgba(210,134,10,.3); color: var(--gold-text); }
.klh-mods { display: flex; flex-direction: column; gap: 11px; }
.klh-mod { position: relative; display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  cursor: pointer; font-family: inherit; background: var(--glass-fill); border: var(--glass-border);
  border-radius: 20px; padding: 13px 14px; box-shadow: 0 8px 22px rgba(30,64,128,.10); }
.klh-mod:active { transform: translateY(2px); }
.klh-mod.done { background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(224,246,232,.85));
  border-color: rgba(42,150,85,.35); }
.klh-mod.next { border-color: rgba(247,174,42,.65); box-shadow: 0 10px 26px rgba(247,174,42,.28); }
.klh-mod-badge { position: absolute; top: -9px; right: 12px; background: linear-gradient(180deg, var(--gold-lite), var(--gold));
  color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; padding: 3px 11px;
  border-radius: var(--radius-pill); text-transform: uppercase; box-shadow: 0 5px 12px var(--gold-glow); }
.klh-mod-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--sky-glow-blue);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.klh-mod-bd { flex: 1; min-width: 0; }
.klh-mod-bd .k { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--gold-text); text-transform: uppercase; }
.klh-mod-bd .cn { font-family: var(--font-hanzi); font-weight: 900; font-size: 15.5px; color: var(--brand-deep); margin: 1px 0; }
.klh-mod-bd .sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.klh-mod-st { flex: none; text-align: right; }
.klh-mod-st .ok { color: var(--green-lip); font-weight: 900; font-size: 13px; }
.klh-mod-st .go { display: inline-block; background: linear-gradient(180deg, var(--brand-lite), var(--brand-deep));
  color: #fff; font-weight: 900; font-size: 13.5px; padding: 9px 18px; border-radius: var(--radius-pill);
  box-shadow: var(--lip-brand); }
.klh-home-note { text-align: center; margin-top: 14px; line-height: 1.6; }
@media (min-width: 720px) {
  .klh-mods { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .klh-mod.next, .klh-mod:last-of-type { grid-column: 1 / -1; }
}

/* ---- 词汇配对 (vocab match, Director 2026-10-01) ------------------- */
.klh-vmatch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.klh-vmatch .col { display: flex; flex-direction: column; gap: 8px; }
.klh-vmatch .klh-mitem { width: 100%; text-align: center; }
.klh-vmatch .vw.sel { border-color: var(--brand-deep); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-glow); }
.klh-vmatch .vm .en { font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.klh-vmatch .klh-mitem.done { border-color: var(--green); background: #EAF9F0; opacity: .75; pointer-events: none; }

/* ── Director 2026-10-02: "the FONT colours blue dont use black" ──
   Judul pelajaran di kartu gembok (kl-gate.js pakai #22324B ≈ hitam) → biru brand,
   sama dengan "Kuai Le Mandarin" di atasnya. Scoped ke KLHSK3 saja;
   platform-wide menunggu GO Director (perlu sapu ?v= semua halaman). */
body.klhsk #klGate .lesson { color: #0C70E0 !important; }

/* ═══ KLHSK4 · 发现句型 gist check + 拆句 chunk find (Director 31 Oct playbook) ═══ */
.klh-gisthead { margin-top: 16px; padding-top: 12px; border-top: 1.5px solid var(--glass-edge); }
.klh-cfprompt { background: var(--accent-soft); border-radius: 12px; padding: 9px 12px; color: var(--ink-soft); }
.klh-chunk.found { border-color: var(--green); background: #EAF9F0; }
.klh-chunk.bad { border-color: var(--red); background: #FFF0EE; animation: klhShake .3s; }

/* ═══ 综合题型 · 9 tipe drill tambahan (Director 2026-10-02) ═══ */
.klh-audiorow { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 12px 0; }
.klh-turtle { min-width: 52px; padding: 10px 14px; font-size: 20px; border-radius: 999px; }
.klh-xtarget { display: inline-flex; flex-direction: column; align-items: center; margin: 8px auto 4px; }
.klh-xline { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 6px; margin: 14px 4px; }
.klh-xpart { display: inline-flex; flex-direction: column; align-items: center; }
.klh-xpart .cn { font-family: var(--font-hanzi); font-weight: 800; font-size: 22px; color: var(--ink); }
.klh-xgap { border: 2px dashed var(--brand); background: var(--brand-soft); color: var(--brand-deep);
  border-radius: 12px; padding: 8px 10px; font-weight: 900; font-family: var(--font-hanzi); font-size: 18px; cursor: pointer; }
.klh-xgap.sel { border-style: solid; background: #fff; box-shadow: 0 0 0 3px var(--brand-glow); }
.klh-xgap.good { border-color: var(--green); background: #EAF9F0; color: var(--green); }
.klh-xgap.bad { border-color: var(--red); background: #FDECEA; color: var(--red); }
.klh-xgapbox { display: inline-block; min-width: 2.4em; text-align: center; border: 2px dashed var(--brand);
  background: #fff; border-radius: 12px; padding: 6px 10px; font-family: var(--font-hanzi);
  font-weight: 900; font-size: 22px; color: var(--brand-deep); }
.klh-xgapbox.good { border-color: var(--green); border-style: solid; background: #EAF9F0; color: var(--green); }
.klh-xgapbox.bad { border-color: var(--red); border-style: solid; background: #FDECEA; color: var(--red); }
.klh-tile.sel { box-shadow: 0 0 0 3px var(--brand-glow); border-color: var(--brand-deep); }
.klh-opt .en { font-weight: 800; font-family: var(--font-ui); }

/* ═══ 模拟题 · EXAM PRACTICE — HSK 3.0 阅读一/二 · 书写一/二 (Director 2026-10-23) ═══
   Paper-faithful layout (BLCU mock papers): A–F lists, 例如 line, （　） blanks, 田字格 boxes.
   Only DS tokens + the state tints already used above; 44px targets; wraps at 375px. */
.klh-exhead { font-family: var(--font-hanzi); font-weight: 900; font-size: 19px; color: var(--brand-deep); line-height: 1.35; }
.klh-exsub { margin-top: 4px; }
.klh-exopts { display: flex; flex-direction: column; gap: 7px; margin: 14px 0 4px; }
.klh-exopt { display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1.5px solid #C9D4E4;
  border-radius: 14px; padding: 9px 11px; transition: background .3s, border-color .3s; }
.klh-exopt .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.klh-exopt .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 16px; color: var(--brand-deep); line-height: 1.45; }
.klh-exopt .py, .klh-exword .py { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.klh-exopt.ex { background: var(--accent-soft); border-color: rgba(247,174,42,.55); }
.klh-exopt.hit { background: #EAF9F0; border-color: var(--green); }
.klh-exlet { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-deep); color: #fff;
  font-family: var(--font-ui); font-weight: 900; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; }
.klh-extag { flex: none; align-self: center; font-family: var(--font-hanzi); font-weight: 900; font-size: 11px; color: var(--gold-text);
  background: #fff; border: 1.5px solid rgba(247,174,42,.6); border-radius: 999px; padding: 1px 7px; }
.klh-exeg { margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed rgba(247,174,42,.7); background: rgba(255,255,255,.55); }
.klh-exeg .lab { display: inline-block; font-family: var(--font-hanzi); font-weight: 900; font-size: 12px; color: var(--gold-text); margin-bottom: 2px; }
.klh-exeg .py-line { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.klh-exline { font-family: var(--font-hanzi); font-weight: 700; font-size: 19px; line-height: 1.7; color: var(--brand-deep); overflow-wrap: anywhere; }
.klh-exblank { display: inline-block; min-width: 2.6em; text-align: center; font-family: var(--font-ui); font-weight: 900; color: var(--brand); white-space: nowrap; }
.klh-exblank.good { color: var(--green-lip); }
.klh-exblank.filled { font-family: var(--font-hanzi); background: #EAF9F0; border-radius: 8px; padding: 0 6px; min-width: 0; }
.klh-exbody { margin-top: 14px; padding-top: 14px; border-top: 1.5px solid var(--glass-edge); }
.klh-exq .py-line { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
.klh-exnum { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--gold-text); margin-bottom: 4px; }
.klh-exnum:empty { display: none; }
.klh-exkeys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.klh-exkey { min-height: var(--tap-min); border-radius: 12px; border: 2px solid #C9D4E4; border-bottom-width: 4px; background: #fff;
  font-family: var(--font-ui); font-weight: 900; font-size: 18px; color: var(--brand-deep); cursor: pointer; padding: 0; }
.klh-exkey.good { border-color: var(--green); background: #EAF9F0; color: var(--green-lip); }
.klh-exkey.bad { border-color: var(--red); background: #FFF0EE; color: var(--red); animation: klhShake .3s; }
.klh-exkey:disabled { cursor: default; }
.klh-exbankrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.klh-exchip { font-family: var(--font-hanzi); font-weight: 700; font-size: 15px; color: var(--brand-deep); background: #fff;
  border: 1.5px solid #C9D4E4; border-radius: 999px; padding: 4px 10px; }
.klh-exchip b { font-family: var(--font-ui); color: var(--gold-text); }
.klh-exchip .py { font-family: var(--font-ui); font-size: 11px; color: var(--ink-soft); }
.klh-exwords { margin-top: 12px; justify-content: flex-start; }
.klh-exword { display: inline-flex; align-items: center; gap: 7px; text-align: left; padding: 7px 10px; }
.klh-exword .tx { display: flex; flex-direction: column; }
.klh-exword .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 18px; color: var(--brand-deep); }
.klh-exword .klh-exlet { width: 22px; height: 22px; font-size: 12px; }
.klh-exword.wrong { opacity: .6; }
.klh-exp2h { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; }
.klh-exp2h .pyl { font-family: var(--font-ui); font-size: 12.5px; font-weight: 900; color: var(--gold-text); line-height: 1.2; white-space: nowrap; }
.klh-exp2h .bx { display: inline-flex; gap: 3px; }
.klh-exbox { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background-color: #fff;
  border: 2px solid var(--brand); border-radius: 6px; font-family: var(--font-hanzi); font-weight: 700; font-size: 24px; color: var(--brand-deep);
  background-image: linear-gradient(var(--brand-soft), var(--brand-soft)), linear-gradient(var(--brand-soft), var(--brand-soft));
  background-size: 100% 1.5px, 1.5px 100%; background-position: center; background-repeat: no-repeat; }
.klh-exbox.good { border-color: var(--green); color: var(--green-lip); background-color: #EAF9F0; }
.klh-exchars { margin-top: 10px; }
.klh-exchars .klh-tile { min-width: 54px; }
.klh-exchars .klh-tile .cn { font-size: 24px; }
.klh-exfull { font-family: var(--font-hanzi); font-weight: 700; font-size: 19px; line-height: 1.6; color: var(--brand-deep); margin-top: 14px; }
.klh-exfull mark { background: #EAF9F0; color: var(--green-lip); border-radius: 6px; padding: 0 3px; }
.klh-eximg { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #F1F3F4; border-radius: 14px; margin: 6px 0 8px; }
.klh-exuse { font-family: var(--font-hanzi); font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.klh-exuse b { font-weight: 900; font-size: 20px; color: var(--brand-deep); margin: 0 4px; }
.klh-exuse .py { font-family: var(--font-ui); font-size: 12px; }
.klh-exegans { font-size: 16px; text-decoration: underline; text-decoration-color: rgba(247,174,42,.7); text-underline-offset: 4px; }
.klh-extext { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; min-height: 88px; resize: vertical;
  font-family: var(--font-hanzi); font-size: 19px; line-height: 1.5; color: var(--ink); background: #fff;
  border: 2px solid #C9D4E4; border-radius: 14px; padding: 10px 12px; }
.klh-extext:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.klh-extext[readonly] { background: #F3F6FB; }
.klh-exchecks { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.klh-exchecks li { font-size: 13.5px; font-weight: 800; border-radius: 10px; padding: 6px 10px; }
.klh-exchecks li.ok { background: #EAF9F0; color: var(--green-lip); }
.klh-exchecks li.no { background: #FFF0EE; color: var(--red); }
.klh-exchecks .en-line { font-weight: 700; color: var(--muted); }
.klh-exmodels { margin-top: 14px; }
.klh-exmodel { background: #fff; border: 1.5px solid var(--green); border-radius: 14px; padding: 9px 12px; margin-top: 7px; }
.klh-exmodel .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 17px; color: var(--brand-deep); line-height: 1.5; }
.klh-exmodel .py { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.klh-exmodel .en { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.klh-exhonest { background: var(--accent-soft); border-radius: 12px; padding: 9px 12px; color: var(--ink-soft); }
.klh-exself { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.klh-exself .klh-btn { margin-top: 12px; font-size: 15px; padding: 13px 8px; }
.klh-exdone { font-family: var(--font-hanzi); font-weight: 900; font-size: 26px; color: var(--brand-deep); text-align: center; padding: 6px 0; }
.klh-expiceg .klh-eximg { max-height: 170px; }

/* Director 2026-10-31: passage text slightly smaller than a one-line question so a 140-character passage fits one phone screen */
.klh-passage { font-size: 21px; line-height: 1.6; margin-bottom: 10px; }
.klh-enwrap { margin-top: 6px; }
.klh-enbtn { border: 1.5px solid #C9D4E4; background: #fff; color: var(--muted); font-family: var(--font-ui); font-weight: 800;
  font-size: 11.5px; letter-spacing: .04em; border-radius: 999px; padding: 4px 11px; cursor: pointer; min-height: 28px; }
.klh-enbtn:active { background: #F3F6FB; }

/* ═══ 查词 · tap-a-word sheet — KLCPH8's gloss sheet, cloned (Director 2026-10-31 "like in KLCPH8").
   The only place pinyin is ever shown in KLHSK4. ═══ */
.klh-wlit { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 8px; background: rgba(247,174,42,.14); }
.klh-gloss-back { position: fixed; inset: 0; z-index: 1300; background: rgba(20,40,80,.34); display: flex; align-items: flex-end; justify-content: center; }
.klh-gloss { width: 100%; max-width: 420px; border-top-left-radius: var(--radius-sheet); border-top-right-radius: var(--radius-sheet);
  background: linear-gradient(180deg, #fff, #EEF5FF); box-shadow: var(--shadow-sheet);
  padding: 20px 22px calc(24px + env(safe-area-inset-bottom)); animation: kl-rise .32s var(--ease-sheet) both; }
.klh-gloss .row { display: flex; align-items: center; gap: 14px; }
.klh-gloss .tx { flex: 1; min-width: 0; }
.klh-gloss .py { font-family: var(--font-ui); font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.klh-gloss .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 30px; color: var(--blue); line-height: 1.2; }
.klh-gloss .meaning { margin-top: 12px; font-weight: 800; font-size: 16px; color: var(--blue); }
.klh-gloss .close { margin-top: 16px; }
.klh-hanzi, .klh-passage, .klh-exline { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 答错后的正确答案 reveal (Director 2026-10-31: one try, explain, move on) */
.klh-reveal { margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--muted); }
.klh-reveal .cn { font-family: var(--font-hanzi); font-weight: 700; font-size: 18px; color: var(--green-lip); margin-left: 4px; }
/* right answer revealed after a WRONG answer — same green, but not the `correct` class (kuaile-fx would throw confetti) */
.klh-opt.is-answer, .klh-tile.is-answer, .klh-mitem.is-answer { border-color: var(--green); background: #EAF9F0; }

/* 听写 DICTATION (2026-11-06) */
.klh-dict-input { display: block; width: 100%; box-sizing: border-box; margin: 12px 0 10px; padding: 12px 14px; border-radius: 16px;
  border: 2px solid rgba(12,112,224,.25); background: #fff; font-family: var(--font-hanzi); font-size: 22px; line-height: 1.5;
  color: var(--brand-deep); resize: none; outline: none; }
.klh-dict-input:focus { border-color: var(--brand, #0C70E0); }
.klh-dict-input.correct { border-color: #22A06B; background: #EFFBF4; }
.klh-dict-input.wrong { border-color: #E5484D; background: #FFF4F4; }
.klh-dict-miss { background: #FFE08A; color: #5A3E00; border-radius: 4px; padding: 0 1px; }
.klh-dict-x { color: #C0262B; text-decoration: line-through; }
.klh-reveal .cn.klh-dict-mine { color: var(--brand-deep); }
