/* GOOD GAME: retro night-studio theme (from Creator Tower) */
:root {
  --ink: #0b0918;
  --night: #120f26;
  --panel: #1b1734;
  --panel2: #251f47;
  --line: #3d3270;
  --line-hi: #5a4aa0;
  --text: #f6ecd6;
  --muted: #a99fcb;
  --dim: #6f6597;
  --gold: #ffc35a;
  --amber: #ff8d3f;
  --pink: #ff4f9a;
  --cyan: #4fd8ff;
  --green: #7cff8f;
  --red: #ff5d5d;
  --purple: #9b6bff;
  --accent: var(--gold);
  --px: 4px;
  --font-title: 'Press Start 2P', monospace;
  --font-ui: 'VT323', monospace;
  --font-body: 'Pixelify Sans', 'VT323', monospace;
  color-scheme: dark;
}
body.clean-font { --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif; }

* { box-sizing: border-box; }
/* Pixelify Sans ships fi/fl ligatures that render as broken glyphs ("floor" -> "Aoor") */
html, body, button, input, select { font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0, "dlig" 0; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 22px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-font-smoothing: none;
  user-select: none;
}
button { font: inherit; color: inherit; }
img.pixel, canvas.pixel, .pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }

/* ---------- background + overlays ---------- */
#bg {
  position: fixed; inset: 0;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  transition: filter .6s steps(6);
  z-index: 0;
}
#bg.dim { filter: brightness(.38) saturate(.9); }
#bg.dimmer { filter: brightness(.18) saturate(.8); }
#crt {
  pointer-events: none; position: fixed; inset: 0; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
}
#crt::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.45) 100%);
}
body.no-crt #crt { display: none; }
#stars { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

#app { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; overflow: auto; position: relative; animation: screen-in .35s steps(5); }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: 12px; right: 12px; z-index: 50;
  display: flex; gap: 8px;
}
.hud-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--panel); border: 0; cursor: pointer; color: var(--text);
  box-shadow: 0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line);
}
.hud-btn:hover { background: var(--panel2); color: var(--accent); }
.hud-btn svg { width: 24px; height: 24px; }

/* ---------- pixel boxes ---------- */
.px-box {
  background: var(--panel);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line), var(--px) 0 0 0 var(--line),
    inset 0 var(--px) 0 0 rgba(255,255,255,.06), inset 0 calc(-1 * var(--px)) 0 0 rgba(0,0,0,.35);
  margin: var(--px);
}
.px-box.glow {
  box-shadow:
    0 -4px 0 0 var(--accent), 0 4px 0 0 var(--accent), -4px 0 0 0 var(--accent), 4px 0 0 0 var(--accent),
    0 0 24px 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- buttons ---------- */
.btn {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 10px 18px; margin: 4px;
  background: var(--c); color: var(--ink);
  font-family: var(--font-title); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  border: 0; cursor: pointer; position: relative;
  box-shadow:
    0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    inset -4px -4px 0 0 rgba(0,0,0,.28), inset 4px 4px 0 0 rgba(255,255,255,.35);
  transition: transform .08s steps(2);
}
.btn:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), inset 4px 4px 0 0 rgba(0,0,0,.3); }
.btn svg { width: 20px; height: 20px; }
.btn.ghost { --c: var(--panel2); color: var(--text); }
.btn.ghost:hover { color: var(--accent); }
.btn.small { padding: 6px 10px; font-size: 10px; }
.btn.big { padding: 16px 26px; font-size: 16px; }
.btn[disabled] { --c: #3a3456; color: #7b729e; cursor: not-allowed; filter: none; transform: none; }
.btn.cyan { --c: var(--cyan); } .btn.pink { --c: var(--pink); } .btn.green { --c: var(--green); }

.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; }
.ico svg { width: 100%; height: 100%; display: block; }

/* ---------- title screen ---------- */
.title-screen { display: flex; flex-direction: column; justify-content: center; padding: 6vh 6vw; height: 100%; overflow: hidden; }
.logo { font-family: var(--font-title); line-height: 1.15; margin: 0; }
.logo .l1 { display: block; font-size: clamp(28px, 5.4vw, 76px); color: var(--gold);
  text-shadow: 4px 4px 0 var(--amber), 8px 8px 0 #7a2d4f, 12px 12px 0 rgba(0,0,0,.6); }
.logo .l2 { display: block; font-size: clamp(28px, 5.4vw, 76px); color: var(--text);
  text-shadow: 4px 4px 0 var(--purple), 8px 8px 0 #2a1d5c, 12px 12px 0 rgba(0,0,0,.6); }
.tagline { font-family: var(--font-ui); font-size: clamp(22px, 2.2vw, 32px); color: var(--cyan); margin: 22px 0 0; text-shadow: 2px 2px 0 #000; }
.press-start {
  margin-top: 7vh; font-family: var(--font-title); font-size: clamp(14px, 1.6vw, 22px); color: var(--text);
  background: none; border: 0; cursor: pointer; align-self: flex-start; padding: 12px 0;
  text-shadow: 3px 3px 0 #000; animation: blink 1.1s steps(2) infinite;
}
.press-start:hover { color: var(--gold); }
@keyframes blink { 50% { opacity: 0; } }
.title-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 5vh; }
.title-foot { position: absolute; left: 6vw; bottom: 3vh; color: var(--muted); font-size: 18px; text-shadow: 2px 2px 0 #000; }

/* ---------- tower (home) ---------- */
.tower-screen { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 28px; padding: 28px 32px 32px; max-width: 1400px; margin: 0 auto; width: 100%; }
.tower-screen > div:last-child { padding-top: 52px; }
.screen-title { font-family: var(--font-title); font-size: 20px; color: var(--gold); margin: 0 0 6px; text-shadow: 3px 3px 0 #000; }
.screen-sub { color: var(--muted); margin: 0 0 18px; font-size: 22px; }

.tower { position: relative; padding: 18px 18px 0; }
.tower-roof { height: 34px; margin: 0 26px; background: var(--panel2); position: relative;
  box-shadow: 0 -4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line); display: grid; place-items: center;
  font-family: var(--font-title); font-size: 10px; color: var(--gold); }
.tower-roof::before { content: ""; position: absolute; left: 50%; top: -40px; width: 4px; height: 36px; background: var(--line-hi); }
.tower-roof::after { content: ""; position: absolute; left: calc(50% - 4px); top: -48px; width: 12px; height: 12px; background: var(--red); animation: blink 1.4s steps(2) infinite; box-shadow: 0 0 12px var(--red); }
.floors { display: flex; flex-direction: column-reverse; gap: 8px; padding: 10px; background: #15112b;
  box-shadow: -4px 0 0 0 var(--line), 4px 0 0 0 var(--line), 0 4px 0 0 var(--line); }
.floor-row {
  --fc: var(--gold);
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px;
  padding: 8px 12px; background: var(--panel); cursor: pointer; border: 0; text-align: left; width: 100%;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), inset 0 4px 0 rgba(255,255,255,.04);
  transition: transform .08s steps(2);
}
.floor-row:hover { background: var(--panel2); transform: translateX(4px); }
.floor-num { font-family: var(--font-title); font-size: 14px; color: var(--ink); background: var(--fc); text-align: center; padding: 9px 0;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.35); }
.floor-name { font-size: 22px; line-height: 1.05; }
.floor-name small { display: block; font-size: 17px; color: var(--muted); }
.floor-state { display: flex; gap: 2px; align-items: center; color: var(--muted); font-size: 18px; }
.floor-state .ico { width: 22px; height: 22px; }
.floor-row.locked { cursor: not-allowed; opacity: .55; }
.floor-row.locked .floor-num { background: #3a3456; color: #7b729e; }
.floor-row.locked:hover { transform: none; background: var(--panel); }
.floor-row.current { box-shadow: inset 0 0 0 3px var(--fc), 0 0 18px color-mix(in srgb, var(--fc) 40%, transparent); }
.floor-row.done .floor-state { color: var(--green); }
.tower-lobby { height: 30px; background: #15112b; margin-top: 0; display: flex; justify-content: center; align-items: flex-end;
  box-shadow: -4px 0 0 0 var(--line), 4px 0 0 0 var(--line), 0 4px 0 0 var(--line); }
.tower-lobby span { width: 60px; height: 22px; background: var(--gold); box-shadow: inset 0 0 0 4px #7a4a14; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 14px 16px; }
.stat-card .k { color: var(--muted); font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .v { font-family: var(--font-title); font-size: 20px; color: var(--gold); margin-top: 8px; }
.bar { height: 16px; background: #0d0a1f; margin-top: 10px; position: relative; box-shadow: 0 0 0 3px var(--line); }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 12px, color-mix(in srgb, var(--accent) 75%, #000) 12px 16px); transition: width .6s steps(12); }
.continue-card { padding: 20px 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.continue-card .what { flex: 1; min-width: 220px; }
.continue-card .what .k { color: var(--cyan); font-size: 18px; text-transform: uppercase; }
.continue-card .what .t { font-size: 28px; margin-top: 4px; }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.floor-card { --fc: var(--gold); padding: 0; cursor: pointer; overflow: hidden; border: 0; text-align: left; color: var(--text); display: flex; flex-direction: column; transition: transform .08s steps(2); }
.floor-card:hover { transform: translateY(-4px); }
.floor-card .cover { aspect-ratio: 16/9; background: #0d0a1f center/cover no-repeat; image-rendering: pixelated; position: relative; display: grid; place-items: center; }
.floor-card .cover .ico { width: 56px; height: 56px; color: var(--fc); filter: drop-shadow(4px 4px 0 #000); }
.floor-card .cover .tag { position: absolute; left: 8px; top: 8px; font-family: var(--font-title); font-size: 10px; background: var(--fc); color: var(--ink); padding: 5px 7px; }
.floor-card .body { padding: 12px 14px 14px; }
.floor-card .name { font-size: 24px; line-height: 1.05; }
.floor-card .meta { color: var(--muted); font-size: 18px; margin-top: 6px; display: flex; justify-content: space-between; }
.floor-card.locked { cursor: not-allowed; }
.floor-card.locked .cover { filter: grayscale(1) brightness(.35); }
.floor-card.locked:hover { transform: none; }
.lock-badge { position: absolute; inset: 0; display: grid; place-items: center; }
.lock-badge .ico { width: 44px !important; height: 44px !important; color: var(--muted) !important; }

/* ---------- floor (module) screen ---------- */
.floor-screen { max-width: 1100px; margin: 0 auto; padding: 24px 28px 48px; width: 100%; }
.crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.floor-hero { position: relative; overflow: hidden; padding: 0; margin-bottom: 24px; }
.floor-hero .cover { aspect-ratio: 21/7; background: #0d0a1f center/cover no-repeat; image-rendering: pixelated; }
.floor-hero .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 24px; background: linear-gradient(transparent, rgba(8,6,20,.92) 45%); }
.floor-hero .kicker { font-family: var(--font-title); font-size: 11px; color: var(--fc, var(--gold)); }
.floor-hero h1 { font-family: var(--font-title); font-size: clamp(18px, 2.6vw, 30px); margin: 10px 0 8px; line-height: 1.3; text-shadow: 3px 3px 0 #000; }
.floor-hero p { margin: 0; color: var(--muted); font-size: 22px; max-width: 760px; }
.lesson-list { display: flex; flex-direction: column; gap: 14px; }
.lesson-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; }
.lesson-row .n { font-family: var(--font-title); font-size: 14px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel2); color: var(--muted); }
.lesson-row.done .n { background: var(--green); color: var(--ink); }
.lesson-row .t { font-size: 25px; line-height: 1.1; }
.lesson-row .d { color: var(--muted); font-size: 18px; margin-top: 4px; }
.lesson-row .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.test-card { margin-top: 26px; padding: 20px 22px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.test-card .ico.big { width: 54px; height: 54px; color: var(--gold); }
.test-card .what { flex: 1; min-width: 240px; }
.test-card .what .t { font-family: var(--font-title); font-size: 14px; color: var(--gold); line-height: 1.4; }
.test-card .what .d { color: var(--muted); margin-top: 6px; }

.sources { margin-top: 22px; padding: 14px 18px; }
.sources .k { color: var(--muted); font-size: 18px; letter-spacing: 1px; display: flex; gap: 8px; align-items: center; }
.sources ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.sources li { font-size: 18px; color: var(--text); background: #0b0918; padding: 3px 10px; box-shadow: 0 0 0 2px var(--line); }

/* ---------- lesson screen ---------- */
.lesson-screen { display: flex; flex-direction: column; height: 100%; }
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 12px 400px 12px 16px; background: rgba(11,9,24,.9); box-shadow: 0 4px 0 0 var(--line); z-index: 2; flex-wrap: wrap; }
.lesson-top .ttl { flex: 1; min-width: 200px; }
.lesson-top .ttl .k { color: var(--muted); font-size: 17px; text-transform: uppercase; letter-spacing: 1px; }
.lesson-top .ttl .t { font-size: 26px; line-height: 1.05; }
.mode-toggle { display: flex; background: var(--ink); padding: 4px; box-shadow: 0 0 0 4px var(--line); }
.mode-toggle button { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: none; border: 0; cursor: pointer; font-family: var(--font-title); font-size: 11px; color: var(--muted); }
.mode-toggle button svg { width: 20px; height: 20px; }
.mode-toggle button.on { background: var(--accent); color: var(--ink); }
.lesson-body { flex: 1; min-height: 0; overflow: auto; }

/* read mode */
.read-wrap { max-width: 900px; margin: 0 auto; padding: 26px 24px 80px; }
.beat { margin-bottom: 40px; }
.beat .slide-frame { margin-bottom: 20px; }
.prose { font-family: var(--font-body); font-size: 21px; line-height: 1.6; color: #eee4cf; user-select: text; }
body.clean-font .prose { font-size: 19px; line-height: 1.65; }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--gold); font-weight: 700; }
.prose em { color: var(--cyan); font-style: normal; }
.prose code { font-family: var(--font-ui); font-size: 1.1em; background: #0d0a1f; color: var(--green); padding: 0 6px; }
.prose ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.prose li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; background: var(--accent); }
.takeaways { padding: 20px 24px; margin-top: 20px; }
.takeaways h3 { font-family: var(--font-title); font-size: 13px; color: var(--gold); margin: 0 0 14px; }
.takeaways ul { margin: 0; padding: 0; list-style: none; }
.takeaways li { display: flex; gap: 12px; margin-bottom: 10px; font-family: var(--font-body); font-size: 20px; line-height: 1.4; }
.takeaways li .ico { flex: none; width: 22px; height: 22px; color: var(--green); margin-top: 3px; }
.lesson-end { display: flex; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* listen mode */
.listen-wrap { height: 100%; display: flex; flex-direction: column; align-items: center; padding: 18px 20px 14px; gap: 14px; }
.stage { width: min(100%, calc((100vh - 290px) * 16 / 9)); }
.caption { width: min(100%, 1100px); min-height: 84px; max-height: 132px; overflow: hidden; padding: 12px 22px; font-family: var(--font-body); font-size: 23px; line-height: 1.4; color: var(--text);
  display: flex; align-items: center; justify-content: center; text-align: center; flex: none; }
.caption .now { color: var(--text); }
.caption .lesson-end { flex-wrap: wrap; }
.caption:has(.lesson-end) { max-height: none; }
.transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.transport .dots { display: flex; gap: 6px; margin: 0 8px; flex-wrap: wrap; max-width: 420px; }
.transport .dots i { width: 12px; height: 12px; background: var(--line); cursor: pointer; }
.transport .dots i.seen { background: var(--dim); }
.transport .dots i.on { background: var(--accent); }
.rate { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 18px; }
.rate select { font-family: var(--font-ui); font-size: 18px; background: var(--panel); color: var(--text); border: 0; padding: 4px 6px; box-shadow: 0 0 0 3px var(--line); }

/* ---------- slides ---------- */
.slide-frame { container-type: inline-size; width: 100%; aspect-ratio: 16/9; position: relative; }
.slide {
  --sa: var(--accent);
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--sa) 14%, transparent), transparent 45%),
    linear-gradient(#17132f, #0f0c22);
  box-shadow: 0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line), 8px 8px 0 4px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  font-family: var(--font-ui);
}
.slide::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.s-bar { display: flex; align-items: center; gap: 1.2cqw; height: 4.4cqw; padding: 0 2cqw; background: #0b0918; box-shadow: 0 .4cqw 0 0 var(--line); flex: none; }
.s-bar .dots { display: flex; gap: .7cqw; }
.s-bar .dots i { width: 1.1cqw; height: 1.1cqw; background: var(--pink); }
.s-bar .dots i:nth-child(2) { background: var(--gold); }
.s-bar .dots i:nth-child(3) { background: var(--green); }
.s-bar .lbl { font-family: var(--font-title); font-size: 1.1cqw; color: var(--muted); letter-spacing: .1cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-bar .pg { margin-left: auto; font-family: var(--font-title); font-size: 1.1cqw; color: var(--sa); }
.s-body { flex: 1; min-height: 0; padding: 3.2cqw 4.2cqw 3.4cqw; display: flex; flex-direction: column; position: relative; }
.s-h { font-family: var(--font-title); font-size: 2.5cqw; line-height: 1.35; color: var(--sa); margin: 0 0 2.6cqw; text-shadow: .35cqw .35cqw 0 #000; }
.s-ico { color: var(--sa); filter: drop-shadow(.4cqw .4cqw 0 #000); }
.s-ico svg { width: 100%; height: 100%; display: block; }
.s-txt { font-size: 2.6cqw; line-height: 1.2; color: var(--text); }
.s-sub { font-size: 2.2cqw; color: var(--muted); line-height: 1.2; }

.slide .pop { animation: pop .45s steps(4) both; }
@keyframes pop { from { opacity: 0; transform: translateY(1.4cqw); } to { opacity: 1; transform: none; } }

/* title */
.t-title .s-body { justify-content: center; padding-left: 7cqw; }
.t-title .kick { font-family: var(--font-title); font-size: 1.4cqw; color: var(--ink); background: var(--sa); align-self: flex-start; padding: .8cqw 1.2cqw; margin-bottom: 2.4cqw; }
.t-title .big { font-family: var(--font-title); font-size: 4.2cqw; line-height: 1.3; color: var(--text); margin: 0; max-width: 62cqw; text-shadow: .5cqw .5cqw 0 color-mix(in srgb, var(--sa) 55%, #000); }
.t-title .s-sub { margin-top: 2.4cqw; max-width: 58cqw; font-size: 2.6cqw; }
.t-title .s-ico { position: absolute; right: 7cqw; top: 50%; width: 22cqw; height: 22cqw; transform: translateY(-50%); opacity: .95; }
.t-title .floorline { position: absolute; left: 0; right: 0; bottom: 0; height: 1.6cqw; background: repeating-linear-gradient(90deg, var(--sa) 0 4cqw, transparent 4cqw 6cqw); opacity: .5; }

/* bullets */
.t-bullets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.9cqw; }
.t-bullets li { display: flex; gap: 2cqw; align-items: center; }
.t-bullets li .s-ico { width: 4.4cqw; height: 4.4cqw; flex: none; padding: .7cqw; background: #0b0918; box-shadow: 0 0 0 .35cqw var(--line); }
.t-bullets li .s-txt { font-size: 2.9cqw; }

/* steps */
.t-steps .row { display: flex; align-items: stretch; gap: 0; flex: 1; }
.t-steps .step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2cqw; padding: 2cqw 1.2cqw; background: #0b0918; box-shadow: 0 0 0 .4cqw var(--line); position: relative; }
.t-steps .step .num { font-family: var(--font-title); font-size: 1.3cqw; color: var(--ink); background: var(--sa); padding: .6cqw .9cqw; }
.t-steps .step .s-ico { width: 6.4cqw; height: 6.4cqw; }
.t-steps .step .s-txt { font-size: 2.5cqw; }
.t-steps .step .s-sub { font-size: 1.95cqw; }
.t-steps .arrow { width: 3.4cqw; display: grid; place-items: center; color: var(--sa); flex: none; }
.t-steps .arrow svg { width: 3cqw; height: 3cqw; }

/* compare */
.t-compare .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; flex: 1; }
.t-compare .col { background: #0b0918; box-shadow: 0 0 0 .4cqw var(--line); padding: 2.2cqw 2.4cqw; }
.t-compare .col h3 { font-family: var(--font-title); font-size: 1.6cqw; margin: 0 0 2cqw; display: flex; align-items: center; gap: 1cqw; }
.t-compare .col h3 .s-ico { width: 3.2cqw; height: 3.2cqw; }
.t-compare .col.bad h3, .t-compare .col.bad .s-ico { color: var(--red); }
.t-compare .col.good h3, .t-compare .col.good .s-ico { color: var(--green); }
.t-compare .col.neutral h3, .t-compare .col.neutral .s-ico { color: var(--cyan); }
.t-compare .col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1.4cqw; }
.t-compare .col li { font-size: 2.45cqw; line-height: 1.15; padding-left: 2.4cqw; position: relative; }
.t-compare .col li::before { content: ""; position: absolute; left: 0; top: .9cqw; width: 1cqw; height: 1cqw; background: currentColor; opacity: .6; }
.t-compare .col.bad li { color: #f1c9c9; } .t-compare .col.good li { color: #d4f7d9; }

/* stat */
.t-stat .s-body { justify-content: center; align-items: center; text-align: center; }
.t-stat .val { font-family: var(--font-title); font-size: 11cqw; line-height: 1; color: var(--sa); text-shadow: .8cqw .8cqw 0 #000; }
.t-stat .lab { font-family: var(--font-title); font-size: 2.2cqw; margin-top: 3cqw; color: var(--text); line-height: 1.4; max-width: 70cqw; }
.t-stat .s-sub { margin-top: 2cqw; max-width: 66cqw; font-size: 2.5cqw; }
.t-stat .s-ico { position: absolute; left: 5cqw; top: 4cqw; width: 8cqw; height: 8cqw; opacity: .5; }

/* quote */
.t-quote .s-body { justify-content: center; padding: 4cqw 9cqw; }
.t-quote .mark { font-family: var(--font-title); font-size: 10cqw; color: var(--sa); line-height: .6; height: 5cqw; }
.t-quote blockquote { margin: 0; font-family: var(--font-body); font-size: 3.6cqw; line-height: 1.35; color: var(--text); }
.t-quote .by { margin-top: 2.6cqw; font-family: var(--font-title); font-size: 1.5cqw; color: var(--muted); }

/* prompt */
.t-prompt .term { flex: 1; background: #05040c; box-shadow: 0 0 0 .4cqw var(--line); padding: 2.4cqw 2.8cqw; font-size: 2.55cqw; line-height: 1.35; color: #cfe9d4; overflow: hidden; }
.t-prompt .term .ln::before { content: "> "; color: var(--green); }
.t-prompt .term .var { color: var(--ink); background: var(--gold); padding: 0 .5cqw; }
.t-prompt .term .cursor { display: inline-block; width: 1.4cqw; height: 2.6cqw; background: var(--green); vertical-align: -.4cqw; animation: blink 1s steps(2) infinite; }
.t-prompt .note { margin-top: 1.8cqw; font-size: 2.1cqw; color: var(--muted); display: flex; gap: 1cqw; align-items: center; }
.t-prompt .note .s-ico { width: 2.8cqw; height: 2.8cqw; }

/* grid */
.t-grid .cards { flex: 1; display: grid; gap: 2.2cqw; grid-template-columns: repeat(var(--cols, 3), 1fr); align-content: center; }
.t-grid .card { background: #0b0918; box-shadow: 0 0 0 .4cqw var(--line); padding: 2cqw; display: flex; flex-direction: column; gap: 1cqw; }
.t-grid .card .s-ico { width: 5cqw; height: 5cqw; }
.t-grid .card .ct { font-family: var(--font-title); font-size: 1.5cqw; line-height: 1.4; color: var(--text); }
.t-grid .card .s-sub { font-size: 2.1cqw; }

/* checklist */
.t-checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6cqw; }
.t-checklist li { display: flex; gap: 2cqw; align-items: center; font-size: 2.8cqw; }
.t-checklist .box { width: 3.6cqw; height: 3.6cqw; flex: none; background: #0b0918; box-shadow: 0 0 0 .4cqw var(--line); display: grid; place-items: center; color: var(--green); }
.t-checklist .box svg { width: 3cqw; height: 3cqw; }

/* formula */
.t-formula .eq { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1.6cqw; flex-wrap: wrap; }
.t-formula .part { background: #0b0918; box-shadow: 0 0 0 .4cqw var(--line); padding: 2cqw 1.6cqw; min-width: 13cqw; max-width: 20cqw; display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; text-align: center; }
.t-formula .part .s-ico { width: 6cqw; height: 6cqw; }
.t-formula .part .s-txt { font-size: 2.3cqw; }
.t-formula .op { font-family: var(--font-title); font-size: 4cqw; color: var(--muted); }
.t-formula .part.result { box-shadow: 0 0 0 .5cqw var(--sa), 0 0 3cqw color-mix(in srgb, var(--sa) 40%, transparent); }
.t-formula .part.result .s-txt { color: var(--sa); }

/* scale */
.t-scale .track-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.t-scale .ends { display: flex; justify-content: space-between; font-family: var(--font-title); font-size: 1.5cqw; color: var(--muted); margin-bottom: 1.6cqw; }
.t-scale .track { height: 3cqw; position: relative; background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink), var(--gold)); box-shadow: 0 0 0 .4cqw #000; }
.t-scale .track::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 3cqw, rgba(0,0,0,.35) 3cqw 3.4cqw); }
.t-scale .mark { position: absolute; top: -1.4cqw; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 18cqw; }
.t-scale .mark .pin { width: 1.4cqw; height: 5.8cqw; background: var(--text); box-shadow: .3cqw .3cqw 0 #000; }
.t-scale .mark .s-txt { font-size: 2.2cqw; text-align: center; margin-top: 1cqw; }
.t-scale .mark.up { top: auto; bottom: -1.4cqw; flex-direction: column-reverse; }
.t-scale .mark.up .s-txt { margin: 0 0 1cqw; }

/* timeline */
.t-timeline .tl { flex: 1; display: flex; align-items: center; position: relative; }
.t-timeline .tl::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: .8cqw; background: var(--line); }
.t-timeline .ev { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; justify-content: center; }
.t-timeline .ev .dot { width: 3cqw; height: 3cqw; background: var(--sa); box-shadow: 0 0 0 .5cqw #000; z-index: 1; }
.t-timeline .ev .when { position: absolute; bottom: calc(50% + 3cqw); font-family: var(--font-title); font-size: 1.4cqw; color: var(--sa); }
.t-timeline .ev .s-txt { position: absolute; top: calc(50% + 3cqw); font-size: 2.2cqw; padding: 0 .8cqw; }
.t-timeline .ev:nth-child(even) .when { bottom: auto; top: calc(50% + 3cqw); }
.t-timeline .ev:nth-child(even) .s-txt { top: auto; bottom: calc(50% + 3cqw); }

/* callout */
.t-callout .s-body { justify-content: center; align-items: center; }
.t-callout .panel { display: flex; gap: 3.4cqw; align-items: center; max-width: 80cqw; background: #0b0918; padding: 3.4cqw 4cqw; box-shadow: 0 0 0 .5cqw var(--sa), 1.2cqw 1.2cqw 0 .5cqw #000; }
.t-callout .panel .s-ico { width: 12cqw; height: 12cqw; flex: none; }
.t-callout .tone { font-family: var(--font-title); font-size: 1.4cqw; color: var(--ink); background: var(--sa); display: inline-block; padding: .6cqw 1cqw; margin-bottom: 1.6cqw; }
.t-callout .ct { font-family: var(--font-title); font-size: 2.2cqw; line-height: 1.4; margin-bottom: 1.4cqw; }
.t-callout .s-txt { font-size: 2.7cqw; color: #e6dcf5; }

/* ---------- quiz ---------- */
.quiz-screen { max-width: 920px; margin: 0 auto; padding: 26px 24px 60px; width: 100%; }
.quiz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.quiz-head .prog { flex: 1; min-width: 200px; }
.hearts { display: flex; gap: 4px; color: var(--pink); }
.hearts .ico { width: 26px; height: 26px; }
.q-card { padding: 24px 26px; }
.q-num { font-family: var(--font-title); font-size: 11px; color: var(--cyan); }
.q-text { font-family: var(--font-body); font-size: 26px; line-height: 1.35; margin: 12px 0 20px; }
body.clean-font .q-text { font-size: 23px; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 12px 14px; background: var(--panel2); border: 0; cursor: pointer; font-family: var(--font-body); font-size: 21px; line-height: 1.35; color: var(--text);
  box-shadow: 0 0 0 3px var(--line); transition: transform .08s steps(2); }
body.clean-font .choice { font-size: 19px; }
.choice:hover:not([disabled]) { transform: translateX(6px); box-shadow: 0 0 0 3px var(--accent); }
.choice .key { font-family: var(--font-title); font-size: 12px; background: var(--ink); color: var(--gold); padding: 6px 8px; flex: none; margin-top: 2px; }
.choice.right { background: #1f4a2b; box-shadow: 0 0 0 3px var(--green); }
.choice.wrong { background: #4d1e2a; box-shadow: 0 0 0 3px var(--red); }
.choice[disabled] { cursor: default; }
.why { margin-top: 18px; padding: 14px 16px; background: #0b0918; box-shadow: 0 0 0 3px var(--line); font-family: var(--font-body); font-size: 19px; line-height: 1.45; display: flex; gap: 12px; }
.why .ico { width: 26px; height: 26px; flex: none; }
.why.ok .ico { color: var(--green); } .why.no .ico { color: var(--red); }
.quiz-next { display: flex; justify-content: flex-end; margin-top: 18px; }
.result { text-align: center; padding: 34px 26px; }
.result .grade { font-family: var(--font-title); font-size: clamp(38px, 7vw, 72px); margin: 10px 0; text-shadow: 6px 6px 0 #000; }
.result .grade.pass { color: var(--green); } .result .grade.fail { color: var(--red); }
.result .msg { font-size: 26px; margin: 8px 0 22px; }
.review { text-align: left; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.review .item { padding: 12px 14px; background: #0b0918; box-shadow: 0 0 0 3px var(--line); font-family: var(--font-body); font-size: 18px; line-height: 1.4; }
.review .item .q { color: var(--text); margin-bottom: 6px; }
.review .item .a { color: var(--green); }
.review .item .w { color: var(--muted); margin-top: 4px; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5,4,12,.78); z-index: 80; display: grid; place-items: center; padding: 20px; animation: screen-in .25s steps(4); }
.modal { width: min(680px, 100%); max-height: 88vh; overflow: auto; padding: 22px 24px; }
.modal h2 { font-family: var(--font-title); font-size: 16px; color: var(--gold); margin: 0 0 18px; }
.set-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.set-row label { color: var(--muted); font-size: 20px; }
.set-row input[type=range] { width: 100%; accent-color: var(--gold); }
.set-row select { font-family: var(--font-ui); font-size: 19px; background: var(--panel2); color: var(--text); border: 0; padding: 6px 8px; box-shadow: 0 0 0 3px var(--line); width: 100%; }
.walls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.walls button { aspect-ratio: 16/9; border: 0; padding: 0; cursor: pointer; background: center/cover; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--line); }
.walls button.on { box-shadow: 0 0 0 4px var(--gold); }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- toast / fx ---------- */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel); padding: 10px 18px; font-family: var(--font-title); font-size: 12px; color: var(--gold);
  box-shadow: 0 -4px 0 0 var(--gold), 0 4px 0 0 var(--gold), -4px 0 0 0 var(--gold), 4px 0 0 0 var(--gold), 6px 6px 0 4px rgba(0,0,0,.5);
  animation: toast 2.8s steps(8) forwards; display: flex; gap: 10px; align-items: center; }
.toast .ico { width: 22px; height: 22px; }
@keyframes toast { 0% { opacity: 0; transform: translateY(12px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.confetti { position: fixed; top: -12px; width: 10px; height: 10px; z-index: 96; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.elevator { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: #07060f; animation: screen-in .2s steps(3); }
.elevator .doors { position: absolute; inset: 0; display: flex; }
.elevator .door { flex: 1; background: repeating-linear-gradient(90deg, #2b2550 0 22px, #241f45 22px 26px); box-shadow: inset 0 0 0 6px #3d3270; transition: transform .7s steps(10); }
.elevator.open .door:first-child { transform: translateX(-100%); }
.elevator.open .door:last-child { transform: translateX(100%); }
.elevator .panel { position: relative; z-index: 2; text-align: center; padding: 22px 30px; }
.elevator .panel .lvl { font-family: var(--font-title); font-size: 46px; color: var(--gold); text-shadow: 4px 4px 0 #000; }
.elevator .panel .lbl { font-family: var(--font-title); font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ---------- certificate ---------- */
.cert { max-width: 860px; margin: 40px auto; padding: 40px 36px; text-align: center; }
.cert h1 { font-family: var(--font-title); font-size: clamp(20px, 3.4vw, 36px); color: var(--gold); line-height: 1.4; text-shadow: 4px 4px 0 #000; }
.cert p { font-size: 26px; color: var(--muted); }

@media (max-width: 1200px) { .lesson-top { padding: 64px 16px 12px; } }

/* ---------- players (save slots) ---------- */
.players-screen { max-width: 860px; margin: 0 auto; padding: 72px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.pl-title { font-family: var(--font-title); font-size: clamp(22px, 3.6vw, 38px); color: var(--gold); margin: 0; text-align: center; text-shadow: 4px 4px 0 #7a2d4f, 8px 8px 0 rgba(0,0,0,.5); }
.pl-sub { text-align: center; color: var(--muted); font-size: 22px; margin: 0 0 8px; text-shadow: 2px 2px 0 #000; }
.slots { display: flex; flex-direction: column; gap: 16px; }
.slot { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }
.slot.active { box-shadow: 0 -4px 0 0 var(--av), 0 4px 0 0 var(--av), -4px 0 0 0 var(--av), 4px 0 0 0 var(--av), 0 0 22px color-mix(in srgb, var(--av) 35%, transparent); }
.av { width: 64px; height: 64px; display: grid; place-items: center; background: var(--av); color: var(--ink); flex: none;
  box-shadow: 0 0 0 4px #0b0918, inset -4px -4px 0 rgba(0,0,0,.25), inset 4px 4px 0 rgba(255,255,255,.35); }
.av svg { width: 40px; height: 40px; }
.av.big { width: 88px; height: 88px; } .av.big svg { width: 56px; height: 56px; }
.slot .nm, .np-preview .nm { font-family: var(--font-title); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.slot .meta, .np-preview .meta { color: var(--muted); font-size: 19px; line-height: 1.15; }
.slot .meta.dim { color: var(--dim); }
.slot-acts { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 320px; }
.slot-acts .warn-txt { color: var(--pink); font-size: 18px; width: 100%; text-align: right; }
.slot.new { border: 0; cursor: pointer; color: var(--text); text-align: left; grid-template-columns: auto 1fr; grid-template-rows: auto auto; row-gap: 2px; background: transparent;
  box-shadow: 0 0 0 4px var(--line); outline: 3px dashed var(--line-hi); outline-offset: -10px; }
.slot.new:hover { background: var(--panel); outline-color: var(--gold); }
.slot.new .av-new { width: 64px; height: 64px; grid-row: 1 / span 2; color: var(--gold); padding: 10px; }
.slot.new .nm { align-self: end; margin: 0; }
.slot.new .meta { align-self: start; }
.np-card { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; max-width: 620px; width: 100%; margin: 0 auto; }
.np-card .pl-title { text-align: left; font-size: 24px; margin-bottom: 6px; }
.np-l { color: var(--muted); font-size: 20px; margin-top: 6px; }
.np-name { font-family: var(--font-title); font-size: 20px; letter-spacing: 2px; background: #0b0918; color: var(--gold); border: 0; padding: 14px 16px; box-shadow: 0 0 0 4px var(--line); outline: none; text-transform: uppercase; }
.np-name:focus { box-shadow: 0 0 0 4px var(--gold); }
.np-name::placeholder { color: var(--dim); }
.avs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.av-pick { aspect-ratio: 1; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; background: var(--av); color: var(--ink); opacity: .55;
  box-shadow: 0 0 0 3px #0b0918; transition: transform .08s steps(2); }
.av-pick svg { width: 60%; height: 60%; }
.av-pick:hover { opacity: .85; transform: translateY(-2px); }
.av-pick.on { opacity: 1; box-shadow: 0 0 0 3px #0b0918, 0 0 0 6px var(--text); }
.np-preview { display: flex; align-items: center; gap: 18px; padding: 14px 16px; background: #0b0918; box-shadow: 0 0 0 3px var(--line); margin-top: 6px; }
.np-acts { display: flex; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.hud-player { width: auto; padding: 0 12px 0 8px; gap: 8px; display: flex; color: var(--ink); background: var(--av);
  box-shadow: 0 -4px 0 0 #0b0918, 0 4px 0 0 #0b0918, -4px 0 0 0 #0b0918, 4px 0 0 0 #0b0918, inset -3px -3px 0 rgba(0,0,0,.25); }
.hud-player:hover { background: var(--av); color: var(--ink); filter: brightness(1.12); }
.hud-player span { font-family: var(--font-title); font-size: 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-player { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-title); font-size: 11px; color: var(--gold); margin-right: 8px; }
.set-player .ico { width: 20px; height: 20px; }
.set-hint { color: var(--text); font-size: 19px; line-height: 1.3; align-self: center; margin-right: 8px; }
.set-hint b { color: var(--gold); font-weight: normal; }
@media (max-width: 640px) {
  .slot { grid-template-columns: auto 1fr; }
  .slot-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .slot-acts .warn-txt { text-align: left; }
  .avs { grid-template-columns: repeat(4, 1fr); }
  .hud-player { width: 44px; padding: 0; justify-content: center; }
  .hud-player span + span { display: none; }   /* keep the avatar, drop the name */
}

/* ---------- check-offs (floor page + lesson bar) ---------- */
button.ck-n { border: 0; cursor: pointer; transition: transform .08s steps(2); }
button.ck-n:hover { transform: scale(1.08); box-shadow: 0 0 0 3px var(--accent); }
.lesson-row.done .n svg { width: 24px; height: 24px; }
.mark-done { flex: none; }
.toast.has-undo { pointer-events: auto; animation-duration: 5.2s; }
.toast .undo { font-family: var(--font-title); font-size: 10px; background: var(--gold); color: var(--ink); border: 0; padding: 6px 8px; cursor: pointer; margin-left: 6px; }
.toast .undo:hover { filter: brightness(1.15); }

/* ---------- floor list (the hub: one row per floor) ---------- */
.flist { display: flex; flex-direction: column; gap: 12px; }
.fl-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center; padding: 12px 16px 12px 12px; background: var(--panel); cursor: pointer;
  box-shadow: 0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line); margin: 4px; transition: transform .08s steps(2); }
.fl-item:hover { transform: translateX(4px); background: var(--panel2); }
.fl-item.open { box-shadow: 0 -4px 0 0 var(--fc), 0 4px 0 0 var(--fc), -4px 0 0 0 var(--fc), 4px 0 0 0 var(--fc), 0 0 22px color-mix(in srgb, var(--fc) 35%, transparent); }
.fl-thumb { aspect-ratio: 16 / 9; width: 150px; background: #0d0a1f center / cover no-repeat; image-rendering: pixelated; position: relative; display: grid; place-items: center; box-shadow: 0 0 0 3px #0b0918; }
.fl-thumb svg { width: 34px; height: 34px; color: var(--muted); filter: drop-shadow(3px 3px 0 #000); position: relative; }
.fl-item.locked .fl-thumb { filter: grayscale(1) brightness(.4); }
.fl-item.locked .fl-thumb svg { color: var(--text); }
.pent-thumb { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 30%, #0d0a1f), #0d0a1f); }
.fl-item.open.pent .pent-thumb svg { color: var(--gold); }
.fl-room { font-family: var(--font-title); font-size: 9px; color: var(--fc); letter-spacing: 1px; }
.fl-title { font-size: 28px; line-height: 1.05; margin: 6px 0 4px; }
.fl-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 19px; }
.fl-status .ico { width: 18px; height: 18px; }
.fl-item.cleared .fl-status { color: var(--green); }
.fl-item.open .fl-status { color: var(--text); }
.fl-item .meter { height: 10px; margin-top: 8px; max-width: 420px; }
.fl-act { display: flex; justify-content: flex-end; }
.fl-item.locked { cursor: not-allowed; opacity: .55; }
.fl-item.locked:hover { transform: none; background: var(--panel); }
.fl-item.locked .fl-room { color: var(--dim); }
.fl-item.locked .fl-title { color: var(--muted); }
.btn[disabled] svg { opacity: .7; }
@media (max-width: 640px) {
  .fl-item { grid-template-columns: 96px 1fr; }
  .fl-thumb { width: 96px; }
  .fl-act { grid-column: 1 / -1; justify-content: flex-start; }
  .fl-title { font-size: 24px; }
}

/* ---------- LOGBOOK (progress landing page) ---------- */
.log-screen { max-width: 1180px; margin: 0 auto; padding: 66px 28px 60px; width: 100%; display: flex; flex-direction: column; gap: 30px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 12px; }
.sec-head h2 { font-family: var(--font-title); font-size: 13px; color: var(--muted); letter-spacing: 2px; margin: 0; }
.sec-head .hint { color: var(--dim); font-size: 18px; }

.log-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 34px 32px 28px; min-height: 260px; margin: 4px; }
.hero-bg { position: absolute; inset: 0; background: center 38% / cover no-repeat; image-rendering: pixelated; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,6,20,.92) 0%, rgba(8,6,20,.62) 55%, rgba(8,6,20,.85) 100%); }
.hero-txt, .hero-fig { position: relative; }
.hero-txt .kicker { font-family: var(--font-title); font-size: 11px; color: var(--gold); letter-spacing: 1px; }
.hero-txt h1 { font-family: var(--font-title); font-size: clamp(26px, 4vw, 46px); margin: 12px 0 10px; color: var(--text); text-shadow: 4px 4px 0 #7a2d4f, 8px 8px 0 rgba(0,0,0,.5); }
.hero-txt p { margin: 0 0 16px; max-width: 560px; color: #ddd3f0; font-size: 23px; line-height: 1.2; text-shadow: 2px 2px 0 #000; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(11,9,24,.85); padding: 6px 12px; font-size: 19px; color: var(--text); box-shadow: 0 0 0 3px var(--line); }
.chip .dot { width: 10px; height: 10px; background: var(--dim); }
.chip .dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.6s steps(2) infinite; }
.hero-fig { text-align: right; min-width: 280px; }
.hero-fig .v { font-family: var(--font-title); font-size: clamp(48px, 7vw, 76px); color: var(--text); line-height: 1; text-shadow: 5px 5px 0 rgba(0,0,0,.6); }
.hero-fig .v small { font-size: .45em; color: var(--muted); }
.hero-fig .k { color: var(--muted); font-size: 19px; margin: 8px 0 12px; }
.segbar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.segbar span { height: 16px; background: color-mix(in srgb, var(--gold) 16%, #0b0918); position: relative; overflow: hidden; cursor: help; }
.segbar span i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); }
.segbar span:hover { box-shadow: 0 0 0 2px var(--text); }
.seg-legend, .bar-legend { display: flex; justify-content: space-between; color: var(--dim); font-size: 16px; margin-top: 4px; }

.log-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }

.coach { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.coach-head { display: flex; align-items: center; gap: 14px; }
.coach .portrait { width: 84px; height: 84px; box-shadow: 0 0 0 4px var(--line), 0 0 0 7px #0b0918; }
.c-name { font-family: var(--font-title); font-size: 16px; color: var(--gold); }
.c-role { color: var(--muted); font-size: 19px; margin-top: 4px; }
.bubble { position: relative; background: #f6ecd6; color: #1b1734; font-family: var(--font-body); font-size: 20px; line-height: 1.45; padding: 14px 16px; box-shadow: 4px 4px 0 0 #000, 0 0 0 3px #0b0918; user-select: text; }
body.clean-font .bubble { font-size: 18px; }
.bubble::before { content: ""; position: absolute; left: 30px; top: -12px; border: 6px solid transparent; border-bottom: 6px solid #f6ecd6; border-left: 6px solid #f6ecd6; }
.focus { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: #0b0918; box-shadow: 0 0 0 3px var(--gold); }
.focus .f-ico { width: 40px; height: 40px; color: var(--gold); }
.focus .tag { display: block; color: var(--cyan); font-size: 17px; text-transform: uppercase; letter-spacing: 1px; }
.focus strong { display: block; font-size: 24px; font-weight: normal; line-height: 1.1; margin-top: 2px; }
.focus p { margin: 4px 0 0; color: var(--muted); font-size: 18px; }
.focus .f-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.nudges { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nudges li { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-body); font-size: 18px; line-height: 1.4; color: #e6dcf5; }
body.clean-font .nudges li { font-size: 16px; }
.nudges .n-ico { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.n-momentum .n-ico { color: var(--gold); } .n-attention .n-ico { color: var(--pink); } .n-good .n-ico { color: var(--amber); } .n-tip .n-ico { color: var(--cyan); }

.lstats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lstat { padding: 14px 16px; margin: 4px; }
.lstat.wide { grid-column: 1 / -1; }
.lstat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 18px; }
.lstat .k .ico { width: 18px; height: 18px; color: var(--gold); }
.lstat .v { font-family: var(--font-title); font-size: 26px; color: var(--text); margin: 10px 0 6px; }
.lstat .v small { font-size: .55em; color: var(--muted); }
.lstat .s { color: var(--muted); font-size: 17px; }
.xpbar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-top: 10px; }
.xpbar i { height: 10px; background: color-mix(in srgb, var(--gold) 16%, #0b0918); }
.xpbar i.on { background: var(--gold); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: help; }
.wk-bar { width: 100%; height: 46px; background: color-mix(in srgb, var(--gold) 12%, #0b0918); position: relative; display: block; }
.wk-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--gold); }
.wk:hover .wk-bar { box-shadow: 0 0 0 2px var(--text); }
.wk-d { font-size: 16px; color: var(--dim); }
.wk.today .wk-d { color: var(--text); }

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); color: var(--dim); font-size: 19px; box-shadow: 0 0 0 3px var(--line); cursor: help; }
.badge .b-ico { width: 20px; height: 20px; }
.badge.on { color: var(--text); box-shadow: 0 0 0 3px var(--gold), 3px 3px 0 3px #000; }
.badge.on .b-ico { color: var(--gold); }

.climb { padding: 8px 0 4px; }
.climb-scroll { overflow-x: auto; padding: 14px 18px 10px; }
.climb-track { position: relative; min-width: 980px; padding-top: 22px; }
.climb-line, .climb-done { position: absolute; left: 3%; top: 49px; height: 6px; }
.climb-line { right: 3%; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 14px); }
.climb-done { background: linear-gradient(90deg, #ffc35a, #ff4f9a, #9b6bff, #4fd8ff); max-width: 94%; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(11, 1fr); position: relative; }
.stop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; }
.stop-ico { width: 46px; height: 46px; display: grid; place-items: center; background: var(--sc); color: var(--ink); border: 0; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 4px #0b0918, inset -4px -4px 0 rgba(0,0,0,.25), inset 4px 4px 0 rgba(255,255,255,.3); transition: transform .08s steps(2); }
.stop-ico:hover { transform: translateY(-3px); }
.stop-ico svg { width: 26px; height: 26px; }
.stop.locked .stop-ico { background: #3a3456; color: #7b729e; }
.stop.current .stop-ico { box-shadow: 0 0 0 4px #0b0918, 0 0 0 7px var(--sc), 0 0 18px var(--sc); }
.stop .you { position: absolute; top: -24px; font-family: var(--font-title); font-size: 9px; color: var(--ink); background: var(--text); padding: 3px 5px; animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.stop-num { font-family: var(--font-title); font-size: 8px; color: var(--dim); margin-top: 8px; }
.stop-name { font-size: 16px; line-height: 1; color: var(--text); max-width: 92px; }
.stop.locked .stop-name { color: var(--dim); }
.stop-pct { font-size: 16px; color: var(--muted); }

.fcards { display: flex; flex-direction: column; gap: 18px; }
.fcard { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.fc-head { display: grid; grid-template-columns: 132px 1fr auto; gap: 18px; align-items: start; }
.fc-thumb { aspect-ratio: 16/9; width: 132px; border: 0; padding: 0; cursor: pointer; background: #0d0a1f center/cover no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--fc); }
.fc-thumb:hover { filter: brightness(1.15); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.title-row h3 { margin: 0; font-size: 28px; font-weight: normal; line-height: 1.05; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; padding: 2px 8px; background: #0b0918; color: var(--muted); box-shadow: 0 0 0 2px var(--line); }
.pill .ico { width: 15px; height: 15px; }
.pill.good { color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 55%, transparent); }
.pill.warn { color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent); }
.pill.bad { color: var(--pink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink) 55%, transparent); }
.pill.next { color: var(--ink); background: var(--gold); box-shadow: none; margin-left: 10px; font-family: var(--font-title); font-size: 8px; padding: 4px 6px; vertical-align: 3px; }
.fcard .kind { margin: 4px 0 0; font-family: var(--font-title); font-size: 9px; color: var(--fc); }
.fcard .summary { margin: 8px 0 0; color: var(--muted); font-size: 19px; line-height: 1.2; }
.fcard .pct { font-family: var(--font-title); font-size: 30px; color: var(--text); }
.fcard .pct small { font-size: .5em; color: var(--muted); }
.meter { height: 14px; background: color-mix(in srgb, var(--fc) 16%, #0b0918); position: relative; margin-top: 12px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--fc); transition: width .5s steps(10); }
.meter b { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--panel); }
.fc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 18px; }
.facts span + span::before { content: "·"; margin-right: 16px; color: var(--dim); }
.fc-acts { display: flex; flex-wrap: wrap; }
details.more { margin-top: 8px; }
details.more > summary, .locked-row > summary { cursor: pointer; list-style: none; font-family: var(--font-title); font-size: 11px; color: var(--text); padding: 10px 0 4px; display: flex; align-items: center; gap: 10px; }
details.more > summary::-webkit-details-marker, .locked-row > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▶"; font-size: 9px; color: var(--fc); transition: transform .1s steps(2); }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary .hint { font-family: var(--font-ui); font-size: 18px; color: var(--muted); }
.more-body { padding-top: 8px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 8px 10px; background: #0b0918; box-shadow: 0 0 0 2px var(--line); }
.ck-row.next { box-shadow: 0 0 0 3px var(--gold); }
.ck { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; background: var(--panel2); border: 0; cursor: pointer; color: var(--ink);
  box-shadow: 0 0 0 3px var(--line-hi), inset 3px 3px 0 rgba(0,0,0,.35); transition: transform .08s steps(2); }
.ck:hover:not([disabled]) { transform: scale(1.08); box-shadow: 0 0 0 3px var(--gold); }
.ck[aria-checked="true"] { background: var(--green); box-shadow: 0 0 0 3px #1f4a2b, inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.35); }
.ck svg { width: 24px; height: 24px; }
.ck[disabled] { cursor: not-allowed; opacity: .45; }
.ck-row .t { font-size: 22px; line-height: 1.1; }
.ck-row.done .t { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--green) 70%, transparent); }
.ck-row .d { color: var(--dim); font-size: 17px; margin-top: 3px; }
.ck-row.done .d { color: color-mix(in srgb, var(--green) 65%, var(--muted)); }
.ck-acts { display: flex; }
.ck-acts .btn { padding: 6px 8px; }
.close-out { display: flex; align-items: center; justify-content: flex-end; gap: 6px 10px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 18px; }
.close-out span { flex: 1; min-width: 220px; }
.locked-list { display: flex; flex-direction: column; gap: 10px; }
.locked-row { padding: 6px 16px 8px; }
.locked-row > summary { font-family: var(--font-ui); font-size: 22px; gap: 14px; flex-wrap: wrap; }
.locked-row .lk { width: 22px; height: 22px; color: var(--dim); }
.locked-row .lr-num { font-family: var(--font-title); font-size: 9px; color: var(--fc); opacity: .8; }
.locked-row .lr-t { color: var(--muted); }
.locked-row .lr-d { margin-left: auto; color: var(--dim); font-size: 18px; }
.locked-row .lr-why { margin: 0 0 10px; color: var(--muted); font-size: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tower-screen { grid-template-columns: 1fr; padding: 70px 16px 24px; }
  .lesson-row { grid-template-columns: 44px 1fr; }
  .lesson-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .set-row { grid-template-columns: 1fr; gap: 6px; }
  .stage { width: 100%; }
  .floor-screen, .quiz-screen { padding: 64px 16px 40px; }
  .lesson-top { padding-right: 16px; padding-top: 64px; }
  .log-screen { padding: 64px 16px 40px; gap: 24px; }
  .log-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .hero-fig { text-align: left; min-width: 0; }
  .log-grid { grid-template-columns: 1fr; }
  .focus { grid-template-columns: auto 1fr; }
  .focus .f-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .fc-head { grid-template-columns: 1fr auto; }
  .fc-thumb { display: none; }
  .ck-row { grid-template-columns: 38px 1fr; }
  .ck-acts { grid-column: 2; }
}
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #0b0918; }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid #0b0918; }
::-webkit-scrollbar-thumb:hover { background: var(--line-hi); }

/* ---------- v2: bite-size lessons, jobs and zones ---------- */
.brief-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 22px; margin-bottom: 18px; }
.brief-card .ico.big { width: 46px; height: 46px; color: var(--fc, var(--gold)); }
.brief-card .b-k { font-family: var(--font-title); font-size: 10px; color: var(--fc, var(--gold)); letter-spacing: 1px; }
.brief-card .b-job { font-size: 28px; line-height: 1.1; margin: 8px 0 6px; }
.brief-card .b-del { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 20px; line-height: 1.25; }
.brief-card .b-del .ico { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--green); }
.brief-card .b-prog { text-align: center; min-width: 84px; }
.brief-card .b-prog .v { font-family: var(--font-title); font-size: 22px; color: var(--gold); }
.brief-card .b-prog .v small { font-size: 12px; color: var(--muted); }
.brief-card .b-prog .k { color: var(--muted); font-size: 17px; margin-top: 6px; }
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-row.next { box-shadow: 0 -4px 0 0 var(--fc), 0 4px 0 0 var(--fc), -4px 0 0 0 var(--fc), 4px 0 0 0 var(--fc); }
.lesson-row.case .n { background: color-mix(in srgb, var(--gold) 30%, var(--panel2)); color: var(--gold); }
.lesson-row .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tag-case, .tag-new, .tag-tool { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-title); font-size: 8px; padding: 4px 6px; letter-spacing: .5px; }
.tag-case { background: var(--gold); color: var(--ink); }
.tag-new { background: var(--pink); color: var(--ink); }
/* the web edition's free preview (app.js PREVIEW) */
.tag-free { display: inline-block; margin-left: 6px; padding: 3px 5px; background: var(--green); color: var(--ink); font-size: 8px; letter-spacing: .5px; vertical-align: 1px; }
.preview-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 0 0 22px; padding: 12px 16px; box-shadow: 0 0 0 3px var(--green), 6px 6px 0 2px rgba(0,0,0,.45); }
.preview-bar .pv-ico { width: 26px; height: 26px; color: var(--green); }
.preview-bar .pv-main { display: grid; gap: 4px; }
.preview-bar b { font-family: var(--font-title); font-size: 10px; color: var(--green); letter-spacing: 1px; }
.preview-bar span { color: var(--text); font-size: 19px; line-height: 1.3; }
.full-course .fc-floor { padding: 12px 14px; background: #0b0918; box-shadow: 0 0 0 3px var(--line); margin-bottom: 16px; }
.full-course .fc-t { font-family: var(--font-title); font-size: 12px; color: var(--cyan); margin-bottom: 6px; }
.full-course .fc-floor p { margin: 0 0 10px; color: var(--muted); font-size: 19px; line-height: 1.3; }
.full-course ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.full-course li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 19px; }
.full-course li .ico { color: var(--dim); }
.full-course li small { color: var(--dim); font-size: 16px; }
.full-course .fc-pitch { font-size: 20px; line-height: 1.35; margin: 0 0 16px; }
.full-course .fc-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.full-course .fc-acts a { text-decoration: none; }
@media (max-width: 640px) {
  .preview-bar { grid-template-columns: auto 1fr; }
  .preview-bar .btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .full-course .fc-acts .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
}
.tag-tool { background: #0b0918; color: var(--cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 45%, transparent); }
.tag-case svg, .tag-tool svg { width: 12px; height: 12px; }

.bite-end { margin-top: 10px; }
.try-card .prose p { margin-bottom: 8px; }
.remember li .ico { color: var(--gold) !important; }
.replay { display: flex; justify-content: center; margin-bottom: 8px; }
.qc { padding: 22px 24px; margin-top: 20px; }
.qc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.qc-k { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-title); font-size: 11px; color: var(--accent); }
.qc-k .ico { width: 18px; height: 18px; }
.qc-n { font-family: var(--font-title); font-size: 10px; color: var(--muted); }
.qc .q-text { font-family: var(--font-body); font-size: 23px; line-height: 1.35; margin-bottom: 16px; }
.qc-next { display: flex; justify-content: flex-end; margin-top: 16px; }
.qc-next:empty { display: none; }
.bite-done { text-align: center; padding: 26px 24px 22px; margin-top: 20px; }
.bite-done .bd-k { font-family: var(--font-title); font-size: clamp(16px, 2.4vw, 24px); color: var(--green); text-shadow: 3px 3px 0 #000; }
.bite-done .bd-xp { font-family: var(--font-title); font-size: 14px; color: var(--gold); margin-top: 12px; }
.bite-done .bd-score { display: inline-flex; gap: 8px; align-items: center; color: var(--cyan); margin-top: 8px; font-size: 20px; }
.bite-done .bd-score .ico { width: 18px; height: 18px; }
.bite-done .bd-meter { height: 12px; max-width: 420px; margin: 16px auto 8px; background: color-mix(in srgb, var(--accent) 16%, #0b0918); position: relative; }
.bite-done .bd-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); transition: width .6s steps(10); }
.bite-done .bd-stats { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 19px; }
.bite-done .bd-stats span { display: inline-flex; gap: 6px; align-items: center; }
.bite-done .bd-stats .ico { width: 16px; height: 16px; }
.bite-done .lesson-end { margin-top: 18px; }
.bite-done .redo { margin-top: 12px; }
.result .msg.small { font-size: 20px; color: var(--muted); margin: 0 0 18px; }

.zone-head { margin: 18px 4px 2px; padding: 10px 0 6px; border-top: 3px dashed var(--line); }
.zone-head:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.zone-head .zh-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.zone-head .zn { font-family: var(--font-title); font-size: 11px; color: var(--gold); letter-spacing: 1px; }
.zone-head .zc { color: var(--dim); font-size: 17px; white-space: nowrap; }
.zone-head .zb { color: var(--muted); font-size: 19px; margin-top: 4px; }
.fl-job { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 18px; margin-bottom: 2px; }
.fl-job .ico { width: 15px; height: 15px; flex: none; color: var(--fc); }

/* Clean text: readable sentences in a system font, while titles, buttons and labels stay pixel */
body.clean-font .floor-hero p, body.clean-font .lesson-row .d, body.clean-font .bubble, body.clean-font .fl-status,
body.clean-font .fl-job, body.clean-font .zone-head .zb, body.clean-font .brief-card .b-del, body.clean-font .focus p,
body.clean-font .nudges li, body.clean-font .set-hint, body.clean-font .bd-stats, body.clean-font .test-card .what .d,
body.clean-font .result .msg.small { font-family: var(--font-body); font-size: .8em; line-height: 1.45; }
body.clean-font .brief-card .b-job { font-family: var(--font-body); font-size: 22px; font-weight: 600; }

@media (max-width: 640px) {
  .brief-card { grid-template-columns: 1fr; gap: 10px; }
  .brief-card .ico.big { display: none; }
  .brief-card .b-prog { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .qc { padding: 16px; }
  .qc .q-text { font-size: 20px; }
  .fl-job { display: none; }
}

/* ---------- developer mode (local copies only) ---------- */
.hud-dev { width: auto; padding: 0 10px; font-family: var(--font-title); font-size: 10px; color: var(--ink); background: var(--amber); }
.hud-dev:hover { background: var(--gold); color: var(--ink); }
.dev-btn.on { box-shadow: 0 0 0 3px var(--amber); color: var(--amber); }
.vet { padding: 14px 18px; margin: 0 0 16px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 60%, transparent); }
.vet h3 { display: flex; gap: 8px; align-items: center; font-family: var(--font-title); font-size: 10px; color: var(--amber); margin: 0 0 10px; }
.vet h3 .ico { width: 16px; height: 16px; }
.vet-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 18px; }
.vet p, .vet li { font-family: var(--font-body); font-size: 15px; line-height: 1.45; color: var(--text); margin: 8px 0 0; }
.vet ul { list-style: none; margin: 8px 0 0; padding: 0; }
.vet li { display: flex; gap: 8px; margin: 4px 0 0; }
.vet li .ico { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--amber); }

/* ---------- the city: pick a tower ---------- */
.city-screen { max-width: 1180px; margin: 0 auto; padding: 70px 22px 60px; display: flex; flex-direction: column; gap: 18px; }
.city-hero { position: relative; padding: 0; overflow: hidden; }
.city-art { position: relative; aspect-ratio: 1376 / 768; background: #0b0918 center / cover no-repeat; image-rendering: pixelated; }
.city-title { position: absolute; left: 0; right: 0; top: 0; padding: 18px 22px 40px; background: linear-gradient(rgba(8,6,20,.85), transparent); pointer-events: none; }
.city-title .kicker { font-family: var(--font-title); font-size: 11px; color: var(--gold); letter-spacing: 2px; }
.city-title h1 { font-family: var(--font-title); font-size: clamp(16px, 2.6vw, 28px); margin: 8px 0 0; text-shadow: 3px 3px 0 #000; }
.hot { position: absolute; bottom: 30%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 8px; }
.hot span { font-family: var(--font-title); font-size: clamp(7px, .9vw, 10px); color: var(--ink); background: var(--gold); padding: 5px 7px; box-shadow: 3px 3px 0 #000; white-space: nowrap; }
.hot:hover span, .hot:focus-visible span { filter: brightness(1.15); transform: translateY(-3px); }
.hot-0 { left: 30%; width: 14%; height: 58%; }
.hot-1 { left: 51.5%; width: 12%; height: 62%; }
.hot-1 span { background: var(--cyan); }
.hot-lot { left: 66%; width: 30%; height: 30%; cursor: default; }
/* a third tower takes the building lot in city.png until the art shows it finished */
.hot-2 { left: 66%; width: 30%; height: 30%; }
.hot-2 span { background: var(--green); display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.hot span small { font-size: .7em; opacity: .75; letter-spacing: 1px; }
.tc-building { color: var(--green); }
.fl-item.building { opacity: .85; }
.hot-lot span { background: #3a3456; color: var(--muted); }
.hot:hover { background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent); }
/* the Skybridge: a capstone that joins the two towers (city.png shows the bridge between them) */
.hot-bridge { left: 42%; width: 13%; top: 25%; bottom: auto; height: 9%; align-items: center; padding: 0; }
.hot-bridge span { background: var(--pink); color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.hot-bridge.locked span { background: #3a3456; color: var(--muted); }
.hot-bridge .ico { width: 1.1em; height: 1.1em; }
.tower-card.bridge-card { grid-column: 1 / -1; grid-template-columns: minmax(110px, 22%) 1fr; }
.tower-card.bridge-card .tc-art { min-height: 180px; }
.tower-card.bridge-card.locked { box-shadow: 0 0 0 4px var(--line); }
.tower-card.bridge-card.locked .tc-art { filter: grayscale(.6) brightness(.7); }
.tower-card.bridge-card.locked .tc-name { color: var(--muted); }
.tc-need { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 17px; }
.tc-need span { display: inline-flex; align-items: center; gap: 6px; }
.tc-need span.ok { color: var(--green); }
.city-coach .bubble { margin-bottom: 0; }
.tower-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tower-card.soon { grid-column: 1 / -1; grid-template-columns: 70px 1fr; align-items: center; }
.tower-card.soon .tc-art { min-height: 60px; }
.tower-card { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 16px; padding: 14px; text-align: left; border: 0; cursor: pointer; color: var(--text); font: inherit; background: var(--panel); box-shadow: 0 -4px 0 0 var(--tc, var(--line)), 0 4px 0 0 var(--tc, var(--line)), -4px 0 0 0 var(--tc, var(--line)), 4px 0 0 0 var(--tc, var(--line)); }
.tower-card:hover { transform: translateY(-3px); background: var(--panel2); }
.tower-card.soon { cursor: default; opacity: .7; box-shadow: 0 0 0 4px var(--line); }
.tower-card.soon:hover { transform: none; background: var(--panel); }
.tc-art { min-height: 200px; background: #0b0918 center / cover no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 3px #0b0918; }
.tc-art.lot { background: repeating-linear-gradient(45deg, #1b1734 0 10px, #251f47 10px 20px); }
.tc-body { display: flex; flex-direction: column; gap: 6px; }
.tc-name { font-family: var(--font-title); font-size: 14px; color: var(--tc, var(--gold)); line-height: 1.4; }
.tc-tag { font-size: 22px; color: var(--text); }
.tc-for { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.3; }
.tc-facts { display: flex; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 17px; }
.tower-card .meter { margin-top: 4px; }
.tc-prog { color: var(--muted); font-size: 17px; }
.tower-card .btn { align-self: flex-start; margin-top: 6px; pointer-events: none; }
.fl-shared { display: flex; gap: 6px; align-items: center; color: var(--cyan); font-size: 16px; margin-bottom: 2px; }
.fl-shared .ico { width: 14px; height: 14px; flex: none; }
body.clean-font .tc-for, body.clean-font .tc-prog, body.clean-font .tc-need, body.clean-font .fl-shared { font-family: var(--font-body); font-size: .78em; line-height: 1.45; }
@media (max-width: 900px) { .tower-cards { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .city-screen { padding: 64px 12px 40px; }
  .hot span { font-size: 6px; padding: 3px 4px; }
  .tower-card, .tower-card.bridge-card { grid-template-columns: 96px 1fr; }
  .tc-art { min-height: 140px; }
}
