/* "Strategy guide" style (a 90s printed game guide), layered on top of style.css.
   Paper, heavy condensed uppercase headings, black label tabs, numbered sections, solid colour blocks, square everything.
   Light and dark versions: dark is applied with body.dark (set by the app from the Auto / Dark / Light switch). */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Barlow+Condensed:wght@600;700;800&display=swap');

body[data-theme="guide"] {
  --paper-base: #fbf8f1; --paper-2: #f0ebdf; --ink: #111; --ink-2: #4a4740; --ink-3: #7a766c;
  --rule: #111; --rule-soft: #d4cec2; --grid: transparent;
  --red: #d42a1e; --gold: #c98400; --blue: #1f4fb5; --brown: #8a5a2b;
  --tab: #111; --on-tab: #fff;          /* black label tabs */
  --bar: #111; --bar-line: #111;        /* the sticky section bar */
  --sheet: #fff;                         /* sidebar */
  --on-colour: #fff;                     /* text on red/gold/blue blocks */
  --serif: 'Barlow', 'Helvetica Neue', Arial, sans-serif; --hand: 'Barlow Condensed', sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --accent: color-mix(in srgb, var(--d) 82%, #000); --wash: color-mix(in srgb, var(--d) 10%, transparent); --paper: var(--paper-base);
  color-scheme: light; color: var(--ink); background-color: var(--paper); background-image: none; font-size: 16px;
}
body[data-theme="guide"].dark {
  --paper-base: #151513; --paper-2: #24231f; --ink: #ece8de; --ink-2: #b3ad9f; --ink-3: #868174;
  --rule: #ece8de; --rule-soft: #34322c; --grid: transparent;
  --red: #f0675a; --gold: #e8a83a; --blue: #7aa5f2; --brown: #c98f5a;
  --tab: #ece8de; --on-tab: #151513;
  --bar: #0b0b0a; --bar-line: #3a3832;
  --sheet: #1b1b18;
  --on-colour: #151513;
  --accent: color-mix(in srgb, var(--d) 50%, #fff); --wash: color-mix(in srgb, var(--d) 18%, transparent);
  color-scheme: dark;
}
[data-theme="guide"] .sprite { filter: none; }
[data-theme="guide"].dark .sprite { filter: drop-shadow(0 0 1px rgba(236, 232, 222, .4)); }

[data-theme="guide"] main { counter-reset: sec; }
[data-theme="guide"] h1 { font: 800 64px/.92 var(--cond); text-transform: uppercase; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
[data-theme="guide"] .page-head { border-bottom: 10px solid var(--ink); }
[data-theme="guide"] .page-head .lede { font-style: normal; color: var(--ink-2); }
[data-theme="guide"] h2, [data-theme="guide"] .floor-title { font: 800 34px/1 var(--cond); text-transform: uppercase; letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
[data-theme="guide"] section > h2, [data-theme="guide"] .section-head { border-bottom: 6px solid var(--ink); padding-bottom: .3rem; }
[data-theme="guide"] .section-head h2 { border: 0; }
[data-theme="guide"] section > h2::before, [data-theme="guide"] .section-head h2::before { counter-increment: sec; content: counter(sec); display: inline-block; min-width: 1.15em; text-align: center; margin-right: .45rem; background: var(--d); color: #fff; padding: .05em .15em; }
[data-theme="guide"] .hint { font-style: normal; color: var(--ink-2); }
[data-theme="guide"] h3, [data-theme="guide"] .panel h3 { font: 800 1.15rem/1.1 var(--cond); text-transform: uppercase; letter-spacing: .02em; border-bottom: 3px solid var(--ink); }
[data-theme="guide"] a { text-decoration: none; font-weight: 600; }
[data-theme="guide"] .muted { color: var(--ink-2); }

/* ---------- Title plate ---------- */
[data-theme="guide"] .hero { margin: 0; outline: 0; border: 0; border-bottom: 10px solid var(--ink); padding: 2rem 2rem 1.6rem; }
[data-theme="guide"] .hero h1 { font-size: 72px; line-height: .9; color: #fff; text-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }
[data-theme="guide"] .hero .crumbs { display: inline-block; background: #111; color: #fff; padding: .2rem .5rem; font: 700 .8rem var(--cond); letter-spacing: .12em; }
[data-theme="guide"] .hero .crumbs a { color: #fff; }
[data-theme="guide"] .hero .lede { font: italic 500 1.15rem var(--serif); color: rgba(255, 255, 255, .92); }
[data-theme="guide"] .hero .hero-tags span { background: #fff; color: #111; border: 0; font: 700 .9rem var(--cond); text-transform: uppercase; letter-spacing: .05em; }
[data-theme="guide"] .pill { transform: none; background: var(--tab); color: var(--on-tab); border: 0; padding: .35rem .5rem; font-family: var(--cond); }
[data-theme="guide"] .hero .pill { background: #fff; color: #111; }

[data-theme="guide"] .stat-strip { border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
[data-theme="guide"] .stat-strip span { font: 700 1rem var(--cond); text-transform: uppercase; letter-spacing: .04em; }
[data-theme="guide"] .stat-strip b { font: 800 30px/1 var(--cond); -webkit-font-smoothing: antialiased; }
[data-theme="guide"] .stat-strip > div::before { border-bottom: 2px dotted var(--ink); }

[data-theme="guide"] .section-nav { background: var(--bar); border: 0; border-bottom: 1px solid var(--bar-line); }
[data-theme="guide"] .section-nav a { color: #fff; font: 700 1rem var(--cond); text-transform: uppercase; letter-spacing: .06em; }
[data-theme="guide"] .section-nav a + a { border-left-color: #555; }
[data-theme="guide"] .section-nav a:hover { background: var(--d); text-decoration: none; }
[data-theme="guide"] .section-nav a span { color: #aaa; }
[data-theme="guide"] .section-nav a.q { background: #d42a1e; color: #fff; font: 800 1rem var(--cond); }

/* ---------- Overview ---------- */
[data-theme="guide"] .fact:first-child { border-top: 4px solid var(--ink); }
[data-theme="guide"] .fact-label, [data-theme="guide"] .minor dt { align-self: start; justify-self: start; background: var(--tab); color: var(--on-tab); padding: .05rem .45rem; font: 700 .8rem/1.6 var(--cond); letter-spacing: .08em; }
[data-theme="guide"] .fact-body b { font: 800 1.35rem/1.1 var(--cond); text-transform: uppercase; }
[data-theme="guide"] .minor { border-bottom: 4px solid var(--ink); }

/* Tips box */
[data-theme="guide"] .questions { border: 3px solid var(--ink); padding: 0; color: var(--ink); }
[data-theme="guide"] .questions h3 { background: #d42a1e; color: #fff; padding: .4rem .7rem; margin: 0; border: 0; font: 800 1.2rem var(--cond); text-transform: uppercase; }
[data-theme="guide"] .questions h3::before { content: '!'; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; background: #fff; color: #d42a1e; margin-right: .2rem; }
[data-theme="guide"] .questions ol { font: 500 .98rem/1.4 var(--serif); padding: .8rem 1rem .9rem 2.1rem; }
[data-theme="guide"] .ok-panel { font: 800 1.1rem var(--cond); text-transform: uppercase; }

[data-theme="guide"] .bar-track { height: 12px; border: 0; background: var(--paper-2); }
[data-theme="guide"] .bar-track i { border: 0; background: var(--d); background-image: none; }
[data-theme="guide"].dark .bar-track i { background: color-mix(in srgb, var(--d) 75%, #fff); }
[data-theme="guide"] .door { color: var(--on-colour) !important; border: 0; background: var(--ink-2); font-family: var(--cond); font-size: .8rem; padding: .1rem .5rem; }
[data-theme="guide"] .door.small-key { background: var(--gold); }
[data-theme="guide"] .door.big-key { background: var(--red); }
[data-theme="guide"] .door.bombable { background: var(--brown); }
[data-theme="guide"] .door.shutter-clear, [data-theme="guide"] .door.shutter-switch { background: var(--blue); }

/* ---------- Rooms: numbered walkthrough entries ---------- */
[data-theme="guide"] .floor-title { border-bottom: 3px solid var(--ink); }
[data-theme="guide"] .floor-title .muted { font: 700 1rem var(--cond); }
[data-theme="guide"] .room { border-bottom: 2px solid var(--rule-soft); }
[data-theme="guide"] .thumb, [data-theme="guide"] .room:nth-child(even) .thumb { transform: none; outline: 0; border: 3px solid var(--ink); margin: 0; }
[data-theme="guide"] .thumb:hover { border-color: var(--accent); transform: none; }
[data-theme="guide"] .rid { background: var(--tab); color: var(--on-tab); font: 800 1rem/1 var(--cond); padding: .25rem .4rem; }
[data-theme="guide"] .rid::before { content: none; }
[data-theme="guide"] .room-head h3 { font: 800 1.35rem/1.1 var(--cond); text-transform: uppercase; border: 0; }
[data-theme="guide"] .room-head[role=button]:hover h3 { text-decoration: none; color: var(--accent); }
[data-theme="guide"] .room.is-boss .room-head h3 { color: var(--red); }
[data-theme="guide"] .cat { font: 800 .8rem var(--cond); text-transform: uppercase; letter-spacing: .05em; font-style: normal; color: var(--accent); }
[data-theme="guide"] .room-note { font-style: normal; }
[data-theme="guide"] .seg button.on { text-decoration: none; background: var(--tab); color: var(--on-tab); }
[data-theme="guide"] .seg button { font: 700 1rem var(--cond); text-transform: uppercase; }

/* ---------- Enemies, items, maps ---------- */
[data-theme="guide"] .bestiary { border: 3px solid var(--ink); }
[data-theme="guide"] .beast { border-color: var(--ink); }
[data-theme="guide"] .beast-name { font: 800 1.05rem/1.1 var(--cond); text-transform: uppercase; }
[data-theme="guide"] .beast.is-boss::after { transform: none; background: #d42a1e; color: #fff; border: 0; }
[data-theme="guide"] .item-name { font: 700 1.05rem var(--cond); text-transform: uppercase; }
[data-theme="guide"] .item-how { font-style: normal; }
[data-theme="guide"] .map-thumb { outline: 0; border: 3px solid var(--ink); }
[data-theme="guide"] .maps figcaption { font-style: normal; }
[data-theme="guide"] .sources { border-top: 4px solid var(--ink); }

/* ---------- Home page ---------- */
[data-theme="guide"] .summary { border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
[data-theme="guide"] .summary > div { border-right: 2px solid var(--rule-soft); }
[data-theme="guide"] .summary b { font: 800 40px/1 var(--cond); -webkit-font-smoothing: antialiased; }
[data-theme="guide"] .summary b small { font: 700 1rem var(--cond); }
[data-theme="guide"] .summary span { font: 700 .85rem var(--cond); letter-spacing: .06em; }
[data-theme="guide"] .search { border-bottom: 3px solid var(--ink); }
[data-theme="guide"] .search input { font-style: normal; }
[data-theme="guide"] .toolbar select { border-bottom: 3px solid var(--ink); font: 700 1rem var(--cond); text-transform: uppercase; }
[data-theme="guide"] .game-head { border-bottom: 6px solid var(--ink); }
[data-theme="guide"] .game-head .muted { font: 700 1rem var(--cond); font-style: normal; text-transform: uppercase; }
[data-theme="guide"] .cards { border-left: 0; gap: 1rem; margin-top: 1rem; }
[data-theme="guide"] .card { border: 3px solid var(--ink); box-shadow: none; padding: 0 0 .9rem; gap: .45rem; }
[data-theme="guide"] .card > *:not(.card-top) { margin: 0 1rem; }
[data-theme="guide"] .card-top { background: var(--d); padding: .45rem .6rem; }
[data-theme="guide"] .card .num-badge { background: #fff; color: #111; border: 0; font: 800 1.1rem/1 var(--cond); }
[data-theme="guide"] .card-top .pill { background: rgba(0, 0, 0, .35); color: #fff; }
[data-theme="guide"] .card h3 { font: 800 1.7rem/1 var(--cond); text-transform: uppercase; border: 0; margin-top: .35rem; }
[data-theme="guide"] .card-theme { font-style: normal; }
[data-theme="guide"] .card:hover { background: var(--wash); border-color: var(--d); }
[data-theme="guide"] .card-stats { border-top: 2px solid var(--ink); }
[data-theme="guide"] .card-stats b { font: 800 1.35rem var(--cond); }
[data-theme="guide"] .card-q { font: 800 .95rem var(--cond); text-transform: uppercase; color: var(--red); }
[data-theme="guide"] .table-wrap { border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
[data-theme="guide"] th { font: 800 .85rem var(--cond); color: var(--ink); border-bottom: 3px solid var(--ink); }
[data-theme="guide"] .t-name { font: 800 1.1rem var(--cond); text-transform: uppercase; }
[data-theme="guide"] .t-name .num-badge { border: 0; background: var(--d); color: #fff; font: 800 .9rem/1 var(--cond); }
[data-theme="guide"] .t-game { font-style: normal; }
[data-theme="guide"] .bar-cell i { background: var(--d); }

/* ---------- Sidebar ---------- */
[data-theme="guide"] #nav { background: var(--sheet); border-right: 6px solid var(--ink); }
[data-theme="guide"] .brand { border-bottom: 6px solid var(--ink); }
[data-theme="guide"] .nav-home { font-style: normal; font-weight: 600; }
[data-theme="guide"] .nav-home.active { text-decoration: none !important; background: var(--tab); color: var(--on-tab) !important; padding-left: .5rem; }
[data-theme="guide"] .nav-game { background: var(--tab); color: var(--on-tab); padding: .25rem .45rem; border: 0; }
[data-theme="guide"] .nav-item.active { background: var(--d); }
[data-theme="guide"] .nav-item.active .nav-name, [data-theme="guide"] .nav-item.active .nav-num { color: #fff; text-decoration: none; }
[data-theme="guide"] .nav-q { font: 800 .8rem var(--cond); background: #d42a1e; color: #fff; padding: 0 .3rem; }
[data-theme="guide"] .nav-empty { font-style: normal; }
[data-theme="guide"] .nav-toggle { font: 700 .95rem var(--cond); text-transform: uppercase; }

/* Light / dark switch */
.mode-switch { display: flex; margin: .9rem .2rem 0; border: 2px solid var(--ink); }
.mode-switch button { flex: 1; font: 700 .8rem/1 var(--cond, sans-serif); text-transform: uppercase; letter-spacing: .05em; background: transparent; color: var(--ink); border: 0; padding: .4rem 0; cursor: pointer; }
.mode-switch button + button { border-left: 2px solid var(--ink); }
.mode-switch button.on { background: var(--tab); color: var(--on-tab); }
@media (max-width: 760px) {
  .mode-switch { margin: .25rem 0 .75rem; }
  [data-theme="guide"] h1, [data-theme="guide"] .hero h1 { font-size: 46px; }
}

/* ---------- Extra colour highlights (dungeon colour = --d, readable version = --accent) ---------- */
/* Big numbers in the dungeon's colour */
[data-theme="guide"] .stat-strip b, [data-theme="guide"] .card-stats b, [data-theme="guide"] .summary b { color: var(--accent); }
[data-theme="guide"] .card-stats b { color: color-mix(in srgb, var(--d) 75%, var(--ink)); }
/* Thick rules pick up a colour stripe under them */
[data-theme="guide"] section > h2, [data-theme="guide"] .section-head, [data-theme="guide"] .game-head { box-shadow: 0 6px 0 var(--d); margin-bottom: 1rem; }
[data-theme="guide"] .stat-strip { border-bottom-color: var(--d); }
/* Floor headings as coloured tabs */
[data-theme="guide"] .floor-title { border-bottom-color: var(--d); }
[data-theme="guide"] .floor-title::before { content: ''; width: .55em; height: .55em; background: var(--d); align-self: center; }
/* Labels and room numbers in the dungeon's colour */
[data-theme="guide"] .fact-label, [data-theme="guide"] .rid { background: var(--d); color: #fff; }
[data-theme="guide"] .fact-body b, [data-theme="guide"] .room-head h3 { color: var(--accent); }
[data-theme="guide"] .room.is-boss .room-head h3 { color: var(--red); }
/* Soft colour wash on rows when hovering, and on the boss room */
[data-theme="guide"] .room:hover { background: var(--wash); }
[data-theme="guide"] .room.is-boss { background: color-mix(in srgb, var(--red) 7%, transparent); }
[data-theme="guide"] .bestiary .beast:nth-child(odd) { background: var(--wash); }
/* Item kinds colour-coded */
[data-theme="guide"] .item-groups .panel:nth-child(1) h3 { border-bottom-color: var(--d); }
[data-theme="guide"] .item-groups .panel:nth-child(2) h3 { border-bottom-color: var(--gold); }
[data-theme="guide"] .item-groups .panel:nth-child(3) h3 { border-bottom-color: var(--blue); }
[data-theme="guide"] .tag.big { color: var(--gold); }
/* Sidebar: each dungeon's colour as a left edge */
[data-theme="guide"] .nav-item { border-left: 4px solid transparent; }
[data-theme="guide"] .nav-item:hover { border-left-color: currentColor; }
/* Card top band a little richer */
[data-theme="guide"] .card-top { background: linear-gradient(90deg, var(--d), color-mix(in srgb, var(--d) 70%, #000)); }

/* ---------- Level design section ---------- */
body { --pace-combat: var(--red); --pace-puzzle: var(--blue); --pace-traversal: var(--brown); --pace-reward: var(--gold); --pace-rest: #3f8a5a; --pace-none: var(--ink-3); }
body.dark { --pace-rest: #6cc08a; }
.pace { display: inline-block; font: 700 .72rem/1.5 var(--cond, sans-serif); text-transform: uppercase; letter-spacing: .06em; padding: 0 .4rem; color: var(--on-colour, #fff); background: var(--pace-none); }
.pace-combat { --pc: var(--pace-combat); } .pace-puzzle { --pc: var(--pace-puzzle); } .pace-traversal { --pc: var(--pace-traversal); }
.pace-reward { --pc: var(--pace-reward); } .pace-rest { --pc: var(--pace-rest); } .pace-none { --pc: var(--pace-none); }
.pace[class*="pace-"] { background: var(--pc); }
.pacing-tags { display: flex; gap: .25rem; flex-wrap: wrap; margin: -.15rem 0 .45rem; }
.pill.optional { background: transparent !important; color: var(--ink-2) !important; outline: 2px dashed var(--ink-3); outline-offset: -2px; }

.design-path { margin-bottom: 1.75rem; }
.design-stats { display: flex; flex-wrap: wrap; gap: 0 2rem; margin-bottom: .8rem; }
.design-stats b { font: 800 28px/1 var(--cond); color: var(--accent); margin-right: .3rem; }
.design-stats span { font: 700 .9rem var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.path-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px; counter-reset: step; }
.path-strip li { position: relative; display: flex; flex-direction: column; min-width: 2.9rem; background: var(--pc); border-bottom: 4px solid color-mix(in srgb, var(--pc) 60%, #000); }
.path-strip li a { color: #fff; font: 800 .95rem/1 var(--cond); padding: .45rem .4rem .35rem; text-align: center; }
.path-strip li i { position: absolute; top: 1px; right: 2px; font: 700 .7rem/1 var(--cond); font-style: normal; color: #fff; }
.path-strip li.revisit { background: repeating-linear-gradient(135deg, var(--pc) 0 5px, color-mix(in srgb, var(--pc) 70%, var(--paper)) 5px 10px); }
.path-strip li.boss { outline: 3px solid var(--ink); outline-offset: -3px; }
.path-strip .step-note { display: none; font: 500 .72rem/1.15 var(--serif); color: #fff; padding: 0 .4rem .35rem; max-width: 9rem; }
.design-path.show-notes .step-note { display: block; }
.design-path.show-notes .path-strip li { min-width: 6rem; }
.path-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-top: .6rem; font: 700 .8rem var(--cond); text-transform: uppercase; }
/* Critical path as a map of room cutouts (PATH_MAP in app.js) */
.pace-off { --pc: transparent; }
.path-view-switch { display: inline-flex; margin-bottom: .6rem; border: 2px solid var(--ink); vertical-align: top; }
.path-full { margin-left: .5rem; font: 700 .85rem var(--cond); text-transform: uppercase; background: var(--tab); color: var(--on-tab); border: 2px solid var(--tab); padding: .3rem .8rem; cursor: pointer; vertical-align: top; }
.design-path.steps-view .path-full { display: none; }
.path-view-switch button { font: 700 .85rem var(--cond); text-transform: uppercase; background: transparent; color: var(--ink); border: 0; padding: .3rem .8rem; cursor: pointer; }
.path-view-switch button.on { background: var(--ink); color: var(--paper); }
.path-map { --pm-gap: 10px; position: relative; width: 100%; max-width: 780px; }
/* Rooms on the path are raised tiles: the pacing colour is the tile's side (a stepped extrusion down-right,
   darkening with depth), plus a soft cast shadow. Optional rooms lie flat and grey. */
.pm-room { --pc-side: color-mix(in srgb, var(--pc) 78%, #000); --pc-deep: color-mix(in srgb, var(--pc) 55%, #000);
  position: absolute; display: block; background-repeat: no-repeat; image-rendering: pixelated; z-index: 1;
  box-shadow: 1px 1px 0 var(--pc), 2px 2px 0 var(--pc), 3px 3px 0 var(--pc-side), 4px 4px 0 var(--pc-side), 5px 5px 0 var(--pc-deep), 6px 6px 0 var(--pc-deep),
    9px 11px 12px rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s; }
.pm-room:hover, .pm-room:focus-visible { z-index: 3; transform: translate(-2px, -2px);
  box-shadow: 1px 1px 0 var(--pc), 2px 2px 0 var(--pc), 3px 3px 0 var(--pc), 4px 4px 0 var(--pc-side), 5px 5px 0 var(--pc-side), 6px 6px 0 var(--pc-side),
    7px 7px 0 var(--pc-deep), 8px 8px 0 var(--pc-deep), 13px 16px 16px rgba(0, 0, 0, .4); }
.pm-room.pace-off { z-index: 0; filter: grayscale(1) brightness(.95); opacity: .35; box-shadow: none; }
.pm-room.pace-off:hover { opacity: .8; transform: none; }
.pm-room.boss { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 2; }
/* Keys-used filter: rooms not reachable yet drop flat and dark; the room holding the next lock is flagged. */
.key-filter { margin: 0 0 .9rem; }
.key-filter .kf-label { display: block; margin-bottom: .35rem; font: 700 .75rem var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
/* Progress track: evenly spaced square markers joined by a line; stages before the selected one fill in. */
.kf-track { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 560px; }
.kf-track li { position: relative; display: flex; justify-content: center; }
.kf-track li + li::before { content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 3px; background: var(--ink-3); }
.kf-track li:has(button.done, button.on) + li:has(button.done, button.on)::before { background: var(--accent); }
.kf-track button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.kf-dot { display: grid; place-items: center; width: 32px; height: 32px; background: var(--paper); border: 2px solid var(--ink-3); transition: transform .12s; }
.kf-dot b { font: 800 .95rem/1 var(--cond); }
.kf-dot .sprite.xs { margin: 0; opacity: 1; width: 18px; height: 18px; }
.kf-name { font: 700 .72rem/1.1 var(--cond); text-transform: uppercase; letter-spacing: .03em; text-align: center; color: var(--ink-2); }
.kf-track button:hover .kf-dot { border-color: var(--ink); }
.kf-track button.done .kf-dot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--paper)); }
.kf-track button.on .kf-dot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--paper)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); transform: scale(1.12); }
.kf-track button.on .kf-name { color: var(--ink); }
.key-filter .kf-info { display: block; margin-top: .55rem; font: 500 .85rem var(--serif); color: var(--ink-2); }
.pm-room.locked { box-shadow: none; filter: grayscale(.85) brightness(.45); transform: none; }
.pm-room.locked:hover { filter: grayscale(.3) brightness(.75); transform: none; box-shadow: none; }
.pm-room.pace-off.locked { opacity: .2; }
.pm-room.next-lock::after { content: attr(data-badge); position: absolute; top: -.6rem; right: -.3rem; z-index: 2; font: 800 .7rem/1 var(--cond); text-transform: uppercase;
  color: #000; background: var(--gold, #e0b23a); padding: .2rem .35rem; box-shadow: 2px 2px 0 rgba(0, 0, 0, .5); }
.vs-keys { position: sticky; top: -1rem; z-index: 5; margin: -1rem -1rem .9rem; padding: .8rem 1rem .6rem; background: var(--paper); border-bottom: 3px solid var(--ink); }
.vs-keys .key-filter { margin: 0; }
.vs-keys .kf-info { font-size: .8rem; }
.pm-room span { position: absolute; z-index: 1; font: 800 .75rem/1 var(--cond); color: #fff; padding: .15rem .25rem; }
.pm-id { top: 3px; left: 3px; background: color-mix(in srgb, var(--pc) 85%, #000); }
.pm-room.pace-off .pm-id { background: #333; }
.pm-steps { right: 3px; bottom: 3px; max-width: calc(100% - 6px); background: rgba(0, 0, 0, .72); text-align: right; }
.path-map-hint { margin: .4rem 0 0; }
.design-path:has(.path-map):not(.steps-view) .path-strip,
.design-path:has(.path-map):not(.steps-view) .path-toggle,
.design-path.steps-view .path-map, .design-path.steps-view .path-map-hint { display: none; }
@media (max-width: 760px) { .pm-room span { font-size: .6rem; padding: .1rem .15rem; } .pm-id { display: none; } }
.path-toggle { margin-left: auto; font: 700 .85rem var(--cond); text-transform: uppercase; background: var(--tab); color: var(--on-tab); border: 0; padding: .3rem .6rem; cursor: pointer; }
.optional-list { margin-top: .9rem; line-height: 1.7; }
.optional-list .fact-label { margin-right: .4rem; }

.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 1.75rem 2.75rem; align-items: start; }
.not-yet { font-style: italic; }
.pace-bars i[class*="pace-"] { background: var(--pc) !important; }

.lock-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lock-chain li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) 1.6rem minmax(0, 1fr); align-items: stretch; gap: .35rem; }
.lk-n { display: grid; place-items: center; background: var(--tab); color: var(--on-tab); font: 800 .95rem var(--cond); }
.lk-node { display: flex; flex-direction: column; gap: .1rem; padding: .35rem .5rem; border: 2px solid var(--ink); font-size: .88rem; }
.lk-node b { font: 800 1rem/1.1 var(--cond); text-transform: uppercase; }
.lk-key { border-color: var(--gold); flex-direction: column; } .lk-key .ic { display: none; }
.lk-arrow { display: grid; place-items: center; font: 800 1.3rem var(--cond); }
.lock-chain li.backtrack .lk-arrow { color: var(--red); }
.lock-chain li.backtrack .lk-lock { border-color: var(--red); }
.lk-tag, .lk-notes { grid-column: 2 / -1; font-size: .82rem; }
.lk-tag { font: 800 .8rem var(--cond); text-transform: uppercase; color: var(--red); letter-spacing: .04em; }
.lk-notes { color: var(--ink-2); }

.gate + .gate { margin-top: .8rem; }
.gate h4 { font: 800 1.05rem var(--cond); text-transform: uppercase; margin: 0 0 .25rem; }
.gate h4 .muted { font: 500 .85rem var(--serif); text-transform: none; }
.gate ul, .link-list { margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.gate li, .link-list li { padding: .25rem 0; border-bottom: 1px solid var(--rule-soft); }
.link-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; align-items: baseline; }
.via { font: 800 .78rem var(--cond); text-transform: uppercase; letter-spacing: .05em; background: var(--ink-2); color: var(--on-colour, #fff); padding: 0 .4rem; justify-self: start; }
.via.ow { background: var(--red); } .via.sc { background: var(--pace-rest); }
b.ow { color: var(--red); }

.mechanics { display: grid; gap: .9rem; }
.mech-head { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.mech-head b { font: 800 1.05rem var(--cond); text-transform: uppercase; }
.cat-chip { font: 700 .72rem var(--cond); text-transform: uppercase; letter-spacing: .06em; border: 1.5px solid var(--ink-3); color: var(--ink-2); padding: 0 .35rem; }
.mech-uses { list-style: none; margin: 0; padding: 0 0 0 .5rem; border-left: 4px solid var(--d); display: grid; gap: .15rem; font-size: .9rem; }
.mech-uses li { display: grid; grid-template-columns: 4.6rem 2.4rem 1fr; gap: .4rem; align-items: baseline; }
.stage { font: 800 .75rem var(--cond); text-transform: uppercase; letter-spacing: .05em; padding: 0 .3rem; text-align: center; color: var(--on-colour, #fff); }
.stage-intro .stage { background: var(--pace-rest); } .stage-practice .stage { background: var(--blue); }
.stage-twist .stage { background: var(--gold); } .stage-test .stage { background: var(--red); }
.mech-note { color: var(--ink-2); }
@media (max-width: 760px) {
  .lock-chain li { grid-template-columns: 1.4rem minmax(0, 1fr) 1.3rem minmax(0, 1fr); }
  .lk-node { font-size: .8rem; }
}

/* ---------- Per-game title fonts ----------
   "Zelda DX TT BRK" (Ænigma Fonts) for Link's Awakening. It's a pixel font where one font pixel = 87/1000 em,
   so it's only used at multiples of 11.5 px (23 / 34.5 / 46 / 69) to land on whole screen pixels and stay crisp. */
@font-face { font-family: 'Zelda DX'; src: url('/app/fonts/ZeldaDX.ttf') format('truetype'); font-display: swap; }
[data-theme="guide"].game-la .hero h1,
[data-theme="guide"] .g-la .game-head h2,
[data-theme="guide"] .card.g-la h3 {
  font-family: 'Zelda DX', var(--cond); font-weight: 400; text-transform: none; letter-spacing: 0;
  font-synthesis: none; -webkit-font-smoothing: none; }
[data-theme="guide"].game-la .hero h1 { font-size: 69px; line-height: 1; }
[data-theme="guide"] .g-la .game-head h2 { font-size: 34.5px; }
[data-theme="guide"] .card.g-la h3 { font-size: 23px; line-height: 1.15; }
@media (max-width: 760px) { [data-theme="guide"].game-la .hero h1 { font-size: 46px; } }

/* ---------- Multi-colour dungeons ----------
   A dungeon with a "palette" sets --d-fill to a gradient. Areas *filled* with the dungeon colour use it;
   text and tints keep the single --d colour so they stay readable. */
[data-theme="guide"] .hero { background: var(--d-fill, linear-gradient(135deg, var(--d), color-mix(in srgb, var(--d) 55%, #000))); }
[data-theme="guide"] .card-top { background: var(--d-fill, linear-gradient(90deg, var(--d), color-mix(in srgb, var(--d) 70%, #000))); }
[data-theme="guide"] section > h2::before, [data-theme="guide"] .section-head h2::before,
[data-theme="guide"] .fact-label, [data-theme="guide"] .rid, [data-theme="guide"] .t-name .num-badge,
[data-theme="guide"] .floor-title::before, [data-theme="guide"] .nav-item.active,
[data-theme="guide"] .bar-track i, [data-theme="guide"] .bar-cell i { background: var(--d-fill, var(--d)); }
[data-theme="guide"].dark .bar-track i { background: var(--d-fill, color-mix(in srgb, var(--d) 75%, #fff)); }
/* The coloured stripe under section headings becomes a rainbow bar (box-shadow can't take a gradient). */
[data-theme="guide"].multi section > h2, [data-theme="guide"].multi .section-head { position: relative; box-shadow: none; }
[data-theme="guide"].multi section > h2::after, [data-theme="guide"].multi .section-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 6px; background: var(--d-fill); }
[data-theme="guide"].multi .section-head h2::after { content: none; }
[data-theme="guide"].multi .stat-strip { border-bottom-color: transparent; background: var(--d-fill) left bottom / 100% 4px no-repeat; background-origin: border-box; }

/* ---------- Landing page ---------- */
.landing { display: flex; flex-direction: column; gap: 2.5rem; }
.land-hero { padding: 3rem 2.4rem 2.6rem; }
.land-kicker { margin: 0 0 .6rem; font: 700 .85rem var(--cond); text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .8); }
[data-theme="guide"] .land-hero h1 { font-size: 96px; margin: 0; }
.land-hero .lede { max-width: 40rem; font-size: 1.25rem !important; margin: 1rem 0 1.6rem; }
.land-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.land-btn { display: inline-block; font: 800 1rem var(--cond); text-transform: uppercase; letter-spacing: .06em; padding: .7rem 1.2rem;
  border: 3px solid currentColor; color: inherit; text-decoration: none !important; }
.land-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.land-hero .land-btn:not(.primary) { color: #fff; }
.land-btn:hover { filter: brightness(1.1); }
.land-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); padding: 1rem 0; }
.land-numbers div { display: flex; flex-direction: column; }
.land-numbers b { font: 800 44px/1 var(--cond); color: var(--accent); }
.land-numbers span { font: 700 .9rem var(--cond); text-transform: uppercase; letter-spacing: .05em; }
.land-show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.2rem; align-items: center; }
.land-show-text p { font-size: 1.05rem; }
.land-show-map .path-map { max-width: none; }
.land-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem 1.6rem; }
.land-feature { border-top: 4px solid var(--accent); padding-top: .6rem; }
.land-feature h3 { border: 0 !important; margin: 0 0 .3rem; }
.land-feature p { margin: 0; color: var(--ink-2); }
.land-game { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border: 3px solid var(--ink); color: var(--ink); text-decoration: none !important; }
.land-game b { font: 800 1.4rem/1.1 var(--cond); text-transform: uppercase; }
.land-game span { font: 700 .9rem var(--cond); color: var(--ink-2); }
.land-game em { font-style: normal; font-weight: 600; color: var(--accent); }
.land-game:not(.soon):hover { background: var(--ink); color: var(--paper); }
.land-game:not(.soon):hover span, .land-game:not(.soon):hover em { color: var(--paper); }
.land-game.soon { opacity: .5; cursor: default; }
.land-note { max-width: 46rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .land-hero { padding: 2rem 1.2rem; }
  [data-theme="guide"] .land-hero h1 { font-size: 56px; }
  .land-show { grid-template-columns: 1fr; }
}

/* ---------- Feedback page ---------- */
.fb-form { display: flex; flex-direction: column; gap: 1rem; max-width: 36rem; }
.fb-form label { display: block; font: 700 .95rem var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.fb-form label .muted { text-transform: none; font-weight: 500; letter-spacing: 0; }
.fb-form select, .fb-form textarea, .fb-form input { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; font: 400 1rem var(--serif); padding: .55rem .6rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); text-transform: none; letter-spacing: 0; }
.fb-form textarea { resize: vertical; }
.fb-form button { align-self: flex-start; font: 800 1rem var(--cond); text-transform: uppercase; letter-spacing: .06em; padding: .65rem 1.4rem; background: var(--accent); color: #fff; border: 0; cursor: pointer; }
.fb-form button:disabled { opacity: .45; cursor: not-allowed; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-status { margin: 0; min-height: 1.4em; font-weight: 600; }
.feedback .callout { border-left: 4px solid var(--accent); padding: .5rem .8rem; background: color-mix(in srgb, var(--accent) 8%, var(--paper)); }
[data-theme="guide"] .landing section > h2::before { content: none; }
.land-games .land-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
