:root {
  --bg: #0d1020;
  --bg2: #151a33;
  --panel: #1b2142;
  --panel2: #232a52;
  --line: #343d73;
  --ink: #eef0ff;
  --ink2: #b8bde0;
  --muted: #7f86b8;
  --gold: #ffd166;
  --ok: #3ddc97;
  --bad: #ff5d73;
  --info: #6cb6ff;
  --u1: #f2b134;
  --u2: #3fc8a5;
  --u3: #ff6b6b;
  --u4: #6c8cff;
  --u5: #b07cff;
  --accent: var(--gold);
  --px: "Pixelify Sans", "Courier New", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
canvas { image-rendering: pixelated; display: block; }

#world { position: fixed; inset: 0; width: 100vw; height: 100vh; }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; z-index: 5; }
#hud .card { pointer-events: auto; background: rgba(13,16,32,.86); border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font-family: var(--px); }
#hud .who { display: flex; gap: 10px; align-items: center; }
#hud .who b { font-size: 18px; }
#hud .lvl { color: var(--gold); font-size: 14px; }
.xpbar { width: 180px; height: 8px; background: #0a0c18; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd166, #ff9f43); }
#hud .spacer { flex: 1; }
#hud .keys { font-size: 13px; color: var(--ink2); line-height: 1.5; }
#hud .keys kbd { margin: 0 2px; }
#prompt { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); background: rgba(13,16,32,.92); border: 2px solid var(--gold); border-radius: 10px; padding: 10px 18px; font-family: var(--px); font-size: 18px; z-index: 6; display: none; text-align: center; }
#prompt small { display: block; color: var(--ink2); font-family: var(--sans); font-size: 13px; margin-top: 2px; }
#toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: var(--panel); border: 2px solid var(--gold); color: var(--ink); padding: 8px 16px; border-radius: 10px; font-family: var(--px); font-size: 17px; animation: toast 2.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }

kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 5px; background: #0a0c18; font-family: var(--px); font-size: 12px; color: var(--ink); text-align: center; line-height: 1.5; }

/* ---------- Overlay screens ---------- */
#overlay { position: fixed; inset: 0; z-index: 20; display: none; background: rgba(8,10,22,.80); backdrop-filter: blur(3px); overflow-y: auto; }
#overlay.on { display: block; }
.screen { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; min-height: 100%; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { font-family: var(--px); font-size: 28px; margin: 0; letter-spacing: .5px; }
.topbar .sub { color: var(--ink2); font-size: 14px; }
.topbar .grow { flex: 1; }
.back { background: transparent; border: 2px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-family: var(--px); color: var(--ink2); }
.back:hover { border-color: var(--ink2); color: var(--ink); }

.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.panel + .panel { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 10px; padding: 10px 16px; cursor: pointer; font-family: var(--px); font-size: 17px; color: var(--ink); transition: transform .08s, border-color .12s; }
.btn:hover, .btn.sel { border-color: var(--accent); }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn.primary { background: var(--accent); color: #1a1406; border-color: #00000055; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.right { margin-left: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.px { font-family: var(--px); }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }
.hint kbd { font-size: 11px; }

/* quest list */
.quests { display: flex; flex-direction: column; gap: 10px; }
.quest { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .12s, transform .12s; }
.quest:hover, .quest.sel { border-color: var(--accent); transform: translateX(3px); }
.quest .num { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-family: var(--px); font-size: 18px; background: #0a0c18; border: 2px solid var(--line); flex: none; }
.quest .t { font-weight: 650; font-size: 16px; }
.quest .d { color: var(--ink2); font-size: 13px; margin-top: 2px; }
.quest .stars { margin-left: auto; font-family: var(--px); color: var(--gold); font-size: 18px; letter-spacing: 2px; white-space: nowrap; }
.quest.boss { border-color: #5a2a3a; background: linear-gradient(90deg, #2b1630, var(--panel2)); }
.quest.boss .num { background: #3a1020; border-color: var(--bad); }
.tag { display: inline-block; font-size: 11px; font-family: var(--px); padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--ink2); margin-left: 6px; vertical-align: 2px; }
.tag.ok { color: var(--ok); border-color: var(--ok); }

.progress { height: 10px; background: #0a0c18; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* ---------- Lesson reader ---------- */
.npc { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.npc canvas { flex: none; background: #0a0c18; border: 2px solid var(--line); border-radius: 12px; }
.bubble { position: relative; background: #f4f1e6; color: #1b1d2a; border-radius: 14px; padding: 14px 18px; font-size: 16px; line-height: 1.5; flex: 1; }
.bubble:before { content: ""; position: absolute; left: -10px; bottom: 18px; border: 10px solid transparent; border-right-color: #f4f1e6; border-left: 0; }
.bubble b.name { display: block; font-family: var(--px); font-size: 15px; color: #6a4b00; margin-bottom: 2px; }
.lesson { font-size: 17px; line-height: 1.68; color: var(--ink); }
.lesson h2 { font-family: var(--px); font-size: 24px; margin: 0 0 10px; color: var(--accent); }
.lesson p { margin: 0 0 12px; }
.lesson ul { margin: 0 0 12px; padding-left: 22px; }
.lesson li { margin: 3px 0; }
.lesson strong { color: #fff3c4; }
.callout { border-radius: 12px; padding: 12px 16px; margin-top: 14px; font-size: 15.5px; line-height: 1.6; }
.callout .lbl { font-family: var(--px); font-size: 14px; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.callout.ex { background: #12283a; border: 1px solid #2d5b80; }
.callout.ex .lbl { color: var(--info); }
.callout.tip { background: #33270e; border: 1px solid #7a5d1d; }
.callout.tip .lbl { color: var(--gold); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; justify-content: center; }
.dots i { width: 9px; height: 9px; border-radius: 3px; background: var(--line); }
.dots i.on { background: var(--accent); }
.dots i.seen { background: #6a6f9e; }

/* ---------- Challenge shell ---------- */
.chhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.chhead .kind { font-family: var(--px); font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.chhead .progress { flex: 1; }
.chhead .count { font-family: var(--px); color: var(--ink2); font-size: 14px; }
.question { font-size: 20px; line-height: 1.5; font-weight: 600; margin: 4px 0 16px; }
.inst { color: var(--ink2); font-size: 14px; margin-bottom: 12px; }

/* mcq blaster */
.mcq-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 760px) { .mcq-opts { grid-template-columns: 1fr 1fr; } }
.opt { position: relative; background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; padding: 30px 12px 14px; font-size: 15px; line-height: 1.45; cursor: pointer; min-height: 96px; transition: border-color .12s, transform .12s, background .2s; }
.opt .k { position: absolute; top: 7px; left: 10px; font-family: var(--px); font-size: 13px; color: var(--muted); }
.opt.aim { border-color: var(--accent); transform: translateY(-3px); }
.opt.right { background: #11392b; border-color: var(--ok); }
.opt.wrong { background: #3d1420; border-color: var(--bad); animation: shake .35s; }
.opt.dim { opacity: .5; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.lane { margin-top: 8px; border-radius: 12px; background: #0a0c18; border: 2px solid var(--line); overflow: hidden; }
.lane canvas { width: 100%; height: 120px; }

/* tf gates */
.tf-wrap .statement { font-size: 21px; line-height: 1.5; font-weight: 600; background: var(--panel2); border-radius: 12px; padding: 16px 18px; border-left: 5px solid var(--accent); }
.tf-wrap .lane canvas { height: 190px; }

/* match */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 60px; position: relative; }
.match svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mcol { display: flex; flex-direction: column; gap: 10px; }
.mitem { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 11px 13px; cursor: pointer; font-size: 15px; line-height: 1.4; position: relative; transition: border-color .1s; min-height: 48px; display: flex; align-items: center; }
.mitem.cur { border-color: var(--info); }
.mitem.pick { border-color: var(--accent); background: #3a3214; }
.mitem.linked { border-style: dashed; }
.mitem.right { border-color: var(--ok); border-style: solid; background: #11392b; }
.mitem.wrong { border-color: var(--bad); border-style: solid; background: #3d1420; }
.mitem .badge { font-family: var(--px); font-size: 12px; margin-right: 8px; color: var(--muted); flex: none; }

/* order */
.order { display: flex; flex-direction: column; gap: 8px; }
.oitem { display: flex; gap: 12px; align-items: center; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: grab; user-select: none; font-size: 15.5px; transition: border-color .1s, transform .1s; touch-action: none; }
.oitem .pos { font-family: var(--px); color: var(--muted); width: 22px; flex: none; }
.oitem .grip { margin-left: auto; color: var(--muted); font-family: var(--px); }
.oitem.cur { border-color: var(--info); }
.oitem.held { border-color: var(--accent); background: #3a3214; transform: scale(1.01); }
.oitem.drag { opacity: .4; }
.oitem.right { border-color: var(--ok); background: #11392b; }
.oitem.wrong { border-color: var(--bad); background: #3d1420; }

/* classify */
.sorter { display: flex; flex-direction: column; gap: 14px; }
.sorter .card { align-self: center; background: #f4f1e6; color: #1b1d2a; border-radius: 12px; padding: 16px 22px; font-size: 18px; font-weight: 600; max-width: 640px; text-align: center; box-shadow: 0 8px 0 #00000055; transition: transform .35s ease, opacity .35s; min-height: 62px; }
.sorter .card.fly { opacity: 0; transform: translateY(80px) scale(.6); }
.sorter .left { text-align: center; color: var(--ink2); font-family: var(--px); font-size: 14px; }
.buckets { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.bucket { background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; min-height: 110px; transition: border-color .12s; }
.bucket:hover, .bucket.cur { border-color: var(--accent); }
.bucket h4 { margin: 0 0 8px; font-family: var(--px); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.bucket.flash-ok { border-color: var(--ok); background: #11392b; }
.bucket.flash-bad { border-color: var(--bad); background: #3d1420; animation: shake .35s; }
.bucket .chip { font-size: 12.5px; background: #0a0c18; border-radius: 6px; padding: 4px 7px; margin: 4px 0; line-height: 1.35; border-left: 3px solid var(--ok); }
.bucket .chip.bad { border-left-color: var(--bad); }

/* fill */
.fill { font-size: 20px; line-height: 2.1; font-weight: 600; }
.fill input { font: inherit; font-weight: 700; background: #0a0c18; color: var(--gold); border: 0; border-bottom: 3px solid var(--accent); padding: 2px 8px; width: 240px; max-width: 100%; outline: none; border-radius: 6px 6px 0 0; }
.fill input.right { color: var(--ok); border-color: var(--ok); }
.fill input.wrong { color: var(--bad); border-color: var(--bad); }

/* open */
textarea.answer { width: 100%; min-height: 220px; resize: vertical; background: #0a0c18; color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 14px; font: 16px/1.6 var(--sans); outline: none; }
textarea.answer:focus { border-color: var(--accent); }
.wc { color: var(--muted); font-size: 13px; font-family: var(--px); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.kw span { font-size: 13px; padding: 4px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--ink2); }
.kw span.hit { border-color: var(--ok); color: var(--ok); background: #11392b; }
.kw span.miss { border-color: var(--bad); color: #ffb3bf; }
.model { background: #12283a; border: 1px solid #2d5b80; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.6; }
.model .lbl { font-family: var(--px); color: var(--info); font-size: 14px; display: block; margin-bottom: 6px; }
.selfgrade { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* case */
.scenario { background: #2a2416; border: 1px solid #6e5a28; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.6; margin-bottom: 14px; }
.scenario .lbl { font-family: var(--px); color: var(--gold); font-size: 14px; display: block; margin-bottom: 4px; }

/* feedback */
.feedback { margin-top: 16px; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.55; animation: pop .2s ease; }
.feedback.ok { background: #0f3326; border: 2px solid var(--ok); }
.feedback.bad { background: #3a1220; border: 2px solid var(--bad); }
.feedback.mid { background: #33270e; border: 2px solid var(--gold); }
.feedback h3 { margin: 0 0 4px; font-family: var(--px); font-size: 20px; }
.feedback .row { margin-top: 10px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* result */
.result { text-align: center; padding: 30px 10px; }
.result .big { font-family: var(--px); font-size: 46px; color: var(--gold); letter-spacing: 6px; }
.result h2 { font-family: var(--px); font-size: 30px; margin: 8px 0; }

/* boss */
.bossarena { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: #070815; }
.bossarena canvas { width: 100%; height: 340px; }
.bossq { margin-top: 12px; }
.hearts { font-family: var(--px); color: var(--bad); font-size: 20px; letter-spacing: 2px; }
.bossbar { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.bossbar .hp { flex: 1; min-width: 160px; height: 14px; background: #0a0c18; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.bossbar .hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff5d73, #ff9f43); transition: width .4s; }
.phase { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: var(--px); font-size: 18px; background: rgba(0,0,0,.6); padding: 4px 14px; border-radius: 8px; color: var(--gold); white-space: nowrap; }

/* library */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 8px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2); cursor: pointer; font-family: var(--px); font-size: 15px; }
.tab.on { border-color: var(--accent); color: var(--accent); }
.search { width: 100%; background: #0a0c18; border: 2px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px 14px; font-size: 16px; outline: none; margin-bottom: 12px; }
.search:focus { border-color: var(--accent); }
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.gloss div { background: var(--panel2); border-radius: 10px; padding: 10px 14px; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
.gloss b { display: block; color: var(--gold); font-family: var(--px); font-size: 16px; margin-bottom: 2px; }
.codex section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.codex h3 { font-family: var(--px); font-size: 20px; color: var(--accent); margin: 0 0 10px; }
.codex h4 { font-size: 17px; margin: 16px 0 6px; }
.toc { columns: 2; font-size: 14px; }
@media (max-width: 700px) { .toc { columns: 1; } }
.toc a { color: var(--ink2); display: block; padding: 2px 0; text-decoration: none; cursor: pointer; }
.toc a:hover { color: var(--accent); }

/* exam */
.examnav { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.examnav button { width: 34px; height: 30px; border-radius: 7px; border: 2px solid var(--line); background: var(--panel2); cursor: pointer; font-family: var(--px); font-size: 13px; }
.examnav button.ans { background: #2a3260; border-color: #5260a8; }
.examnav button.cur { border-color: var(--accent); }
.examnav button.ok { background: #11392b; border-color: var(--ok); }
.examnav button.ko { background: #3d1420; border-color: var(--bad); }
.eopts { display: flex; flex-direction: column; gap: 8px; }
.eopt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 16px; line-height: 1.45; }
.eopt:hover, .eopt.cur { border-color: var(--info); }
.eopt.chosen { border-color: var(--accent); background: #3a3214; }
.eopt.right { border-color: var(--ok); background: #11392b; }
.eopt.wrong { border-color: var(--bad); background: #3d1420; }
.eopt .L { font-family: var(--px); color: var(--muted); flex: none; width: 18px; }
.timer { font-family: var(--px); font-size: 18px; color: var(--gold); }
.scorebox { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.scorebox div { background: var(--panel2); border-radius: 12px; padding: 14px; text-align: center; border: 2px solid var(--line); }
.scorebox b { display: block; font-family: var(--px); font-size: 32px; color: var(--gold); }

/* title screen */
.title { text-align: center; padding-top: 6vh; }
.title h1 { font-family: var(--px); font-size: clamp(40px, 7vw, 76px); margin: 0; color: var(--gold); text-shadow: 4px 4px 0 #7a4b00, 8px 8px 0 #00000088; letter-spacing: 2px; }
.title .tag2 { font-family: var(--px); color: var(--ink2); font-size: 20px; margin: 8px 0 26px; }
.title input.name { background: #0a0c18; border: 2px solid var(--line); color: var(--ink); font-family: var(--px); font-size: 22px; padding: 10px 16px; border-radius: 10px; text-align: center; outline: none; width: 300px; max-width: 90%; }
.title input.name:focus { border-color: var(--gold); }
.heroes { display: flex; gap: 14px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.heroes .h { border: 2px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; background: var(--panel); }
.heroes .h.sel { border-color: var(--gold); background: #2c2a1a; }
.heroes .h div { font-family: var(--px); font-size: 14px; color: var(--ink2); margin-top: 4px; }
.howto { max-width: 760px; margin: 26px auto 0; text-align: left; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.howto b { color: var(--ink); }

.menu-list { display: flex; flex-direction: column; gap: 10px; max-width: 460px; margin: 0 auto; }
.menu-list .btn { justify-content: space-between; }

.stat { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.stat:last-child { border-bottom: 0; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

/* ---------- Learning-science layer (learn.js) ---------- */
[hidden] { display: none !important; }
/* confidence rating */
.conf { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #161c3c; border: 2px dashed var(--info); animation: pop .2s ease; }
.conf-q { margin-bottom: 8px; font-size: 15.5px; }
.conf .btn { font-size: 16px; }
.conf .btn.c2:hover { border-color: var(--ok); }
.conf .btn.c1:hover { border-color: var(--gold); }
.conf .btn.c0:hover { border-color: var(--bad); }
.opt.chosen, .eopt.chosen { border-color: var(--info); background: #1a2c4d; }
/* feedback notes + self-explanation */
.feedback .note { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,.22); font-size: 14.5px; }
.feedback .note.hc { border-left: 4px solid var(--bad); }
.feedback .note.pre { border-left: 4px solid var(--info); }
.feedback .explain { margin-top: 6px; }
.why { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.why textarea { width: 100%; resize: vertical; background: #0a0c18; color: var(--ink); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 15px/1.5 var(--sans); outline: none; }
.why textarea:focus { border-color: var(--accent); }
.why .row { margin-top: 8px; }
.tag.hc { color: var(--bad); border-color: var(--bad); margin-left: 0; }
/* lessons: glossary signalling + checks */
.lesson strong.gl { text-decoration: underline dotted rgba(255,243,196,.55); text-underline-offset: 4px; cursor: help; }
.checking .pager, .checking .pager + .row { display: none; }
.check-head { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.check-head .px { color: var(--accent); font-size: 20px; margin-right: 6px; }
.lesson .chost { font-size: 16px; }
/* brain dump */
.gaps .gap { background: var(--panel2); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 14.5px; line-height: 1.5; }
.gaps .gap b { color: var(--gold); margin-right: 6px; }
/* HUD review card */
#hud .rvcard { cursor: pointer; }
#hud .rvcard.due { border-color: #5ec8f2; }
#hud .rvcard.due b { color: #5ec8f2; }
/* daily review hub */
.rvbig { text-align: center; }
.rvbig .n { font-size: 64px; color: #5ec8f2; line-height: 1; }
.fc { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.fcd { text-align: center; font-size: 12px; color: var(--ink2); }
.fcd .bar { height: 90px; background: #0a0c18; border-radius: 6px; border: 1px solid var(--line); display: flex; align-items: flex-end; overflow: hidden; }
.fcd .bar i { display: block; width: 100%; background: #5ec8f2; min-height: 2px; }
.fcd b { display: block; font-family: var(--px); font-size: 16px; color: var(--ink); margin-top: 4px; }
.boxes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bx { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center; font-size: 11.5px; display: flex; flex-direction: column; }
.bx b { font-family: var(--px); font-size: 18px; color: var(--gold); }
@media (max-width: 560px) { .boxes { grid-template-columns: repeat(4, 1fr); } .fcd span { font-size: 10px; } }
.scigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.scigrid .panel + .panel { margin-top: 0; }
.scigrid p { margin: 8px 0 0; line-height: 1.55; font-size: 15px; }
