/* style.css: the game's look. Colours are set once here, as tokens.
   THE LOOK (the user, 2026-11-25: Claude Design's direction A, "Risograph print", with subtle touches of its
   direction B, "Survivor's journal"; notes/ui-directions/): the interface is printed with the same press as
   the pictures. Paper-white ink on teal-black, and only two spot colours, the pictures' own: teal, and
   fluorescent orange kept rare (the one main button, danger, you on the map). Bold condensed type for
   everything you press and every heading, a book serif for everything you read, square corners, halftone
   dots in the bars, and a teal "misregistration" offset on the big shapes; never a texture behind text.
   From the journal: the stamp over what happened, bone-coloured clues and notes, the journal's day stamps.
   The fonts are in fonts/ (free licences, beside them), so the game makes no calls to Google. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-weight: 300 700; font-display: swap; src: url(fonts/literata.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/literata-italic.woff2) format('woff2'); }
@font-face { font-family: 'Special Elite'; font-weight: 400; font-display: swap; src: url(fonts/special-elite.woff2) format('woff2'); }
:root {
  /* the paper and inks (measured from the pictures: notes/claude-design-prompt.md) */
  --bg: #050807; --panel: #0b1916; --panel-2: #10241f; --raised: #0d2f2a; --line: #2c443d; --edge: #688b7b;
  --ink: #e8eeea; --soft: #9fb8ad; --accent: #fb8839; --accent-ink: #050807; --teal: #0f6a5c; --sage: #87ad9f;
  --good: #a8d8c2; --bad: #fb8839; --warn: #e4ad82; --bone: #c7bda1;
  --land: #10201c; --street: #2f4740; --park: #173527; --water: #245f66; /* (map/sketch.js has the same) */
  --radius: 2px; --ease: cubic-bezier(.2, .8, .2, 1);
  --ui: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif; /* buttons, headings, labels, numbers */
  --read: 'Literata', Georgia, 'Times New Roman', serif; /* everything you read */
  --stamp: 'Special Elite', 'Courier New', monospace; /* the journal's stamps */
  --dots: radial-gradient(#050807 .7px, transparent 1px); /* the riso halftone, over a bar's colour (with background-size: 3px 3px) */
  --offset: 2px 2px 0 var(--teal); /* the teal printed a hair out of register */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--read); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; font-family: var(--ui); font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: .01em; }
button:focus-visible, [tabindex]:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-family: var(--ui); font-weight: 700; letter-spacing: .01em; }
p { margin: .4em 0; }
.small { color: var(--soft); font-size: 14px; }
/* an icon drawn in ink (the sprite in index.html: <svg class="ink-icon"><use href="#i-..."/></svg>) */
.ink-icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; vertical-align: -.2em; }

#app { height: 100dvh; max-width: 980px; margin: 0 auto; display: grid; grid-template-rows: auto auto 1fr auto; background: var(--bg); }

/* header */
/* one line (the user, 2026-11-24): ☰ at the left with ‹ beside it, the title in the middle, 🎧 at the right
   (the columns either side are the same width, so the title stays centred) */
#top { display: grid; grid-template-columns: 44px 44px 1fr 44px 44px; align-items: center; gap: 4px; padding: 6px 8px 6px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); }
#menu { grid-area: 1 / 1; }
#back { grid-area: 1 / 2; }
#heading { grid-area: 1 / 3; text-align: center; min-width: 0; }
#radio { grid-area: 1 / 5; }
@media (max-width: 360px) { #top { grid-template-columns: 40px 40px 1fr 40px 40px; gap: 2px; } #top .icon { width: 40px; } }
#title { font: 700 20px/1.1 var(--ui); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#clock { font: 500 13px/1.3 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin-top: 1px; }
.icon { width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; font-size: 24px; display: grid; place-items: center; padding: 0; }
.icon .ink-icon { width: 24px; height: 24px; }
.icon:hover { background: var(--panel-2); }
#back[hidden] { visibility: hidden; display: grid; }

/* condition bar: each an ink icon and a number, a halftone bar, its name (one calm colour; orange when low) */
#hud { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 8px 14px 8px; cursor: pointer; border-bottom: 1px solid var(--line); background: var(--panel); }
#hud .hud-load { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; font: 500 13px/1.2 var(--ui); letter-spacing: .02em; color: var(--soft); }
#hud .hud-load .icon { width: auto; height: auto; font-size: 14px; border-radius: 0; display: inline; }
#hud .hud-load .bar { flex: 1 1 auto; height: 3px; }
#hud .hud-load .bar i { background: var(--sage); }
#hud .hud-load .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
#hud .hud-load.over .num { color: var(--warn); }
#hud .hud-load.over .bar i { background: var(--warn); }
#hud .hud-load:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meter { flex: 1 1 0; min-width: 0; display: grid; grid-template-areas: "icon num" "bar bar" "name name"; grid-template-columns: auto 1fr; align-items: center; gap: 3px 4px; font: 600 14px/1.1 var(--ui); }
.meter .icon { grid-area: icon; width: auto; height: auto; font-size: 15px; display: inline; }
.meter .bar { grid-area: bar; height: 6px; }
.meter .bar i { background: var(--dots) 0 0 / 3px 3px, var(--sage); }
.meter .num { grid-area: num; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter .name { grid-area: name; font: 500 12px/1.1 var(--ui); letter-spacing: .03em; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { position: relative; }
.meter.low .num, .meter.low .icon { color: var(--bad); }
.meter.low .bar i { background-color: var(--bad); }
.delta { position: absolute; right: 0; top: -4px; font-size: 12px; font-weight: 700; pointer-events: none; animation: rise 1.8s ease-out forwards; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
@keyframes rise { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
/* what happened: a raised teal block, worn at the edges, with a rubber stamp over it (the journal's touch) */
.happened { position: relative; margin: 14px 0 6px; padding: 18px 12px 10px; border: 1px solid var(--line); border-left: 4px solid var(--sage); background: var(--raised); border-radius: 1px 3px 2px 1px; box-shadow: 2px 3px 0 #0008; }
.happened:not(.person-said):not(.story-text)::before { content: 'What happened'; position: absolute; left: 10px; top: -9px; padding: 1px 6px; font: 13px/1.3 var(--stamp); text-transform: uppercase; letter-spacing: .04em; color: var(--bone); background: var(--bg); border: 1px solid var(--bone); transform: rotate(-2deg); }
.happened p { margin: 2px 0; }
.happened .went { color: var(--soft); font-size: 13px; }
.happened.fresh { animation: settle .35s var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateY(-4px); } }
.bag .happened { margin-top: 0; margin-bottom: 12px; }
.meter.low .bar { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.bar { display: block; height: 6px; border-radius: 0; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 0; transition: width .5s var(--ease); }
.bar.big { height: 10px; margin: 6px 0; }
.bar i { background-image: var(--dots); background-size: 3px 3px; } /* (a bar's colour comes from its kind: the dots go over it) */

/* pages */
#screens { position: relative; overflow: hidden; }
.screen { position: absolute; inset: 0; overflow-y: auto; padding: 16px; padding-bottom: 32px; background: var(--bg); }
.in-forward { animation: in-forward .28s var(--ease) both; }
.out-forward { animation: out-forward .28s var(--ease) both; pointer-events: none; }
.in-back { animation: in-back .28s var(--ease) both; }
.out-back { animation: out-back .28s var(--ease) both; pointer-events: none; z-index: 1; }
@keyframes in-forward { from { transform: translateX(40px); opacity: 0; } }
@keyframes out-forward { to { transform: translateX(-24px); opacity: 0; } }
@keyframes in-back { from { transform: translateX(-40px); opacity: 0; } }
@keyframes out-back { to { transform: translateX(40px); opacity: 0; } }

/* tabs */
#tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: var(--panel); padding-bottom: env(safe-area-inset-bottom); }
#tabs button { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 56px; padding: 8px 0 9px; border: 0; background: none; color: var(--soft); font: 600 14px/1.1 var(--ui); letter-spacing: .03em; }
#tabs button .ink-icon { width: 22px; height: 22px; }
#tabs button.on { color: var(--ink); background: var(--raised); }
#tabs button.on::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--sage); }

/* map */
.map-screen { padding: 0; overflow: hidden; }
.map-wrap { position: relative; height: 100%; touch-action: none; cursor: grab; user-select: none; transition: filter 1s; }
.map-wrap:active { cursor: grabbing; }
.map-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 50%, #0009 100%); }
.map-wrap.placing, .map-wrap.placing:active, .map-wrap.drawing, .map-wrap.drawing:active { cursor: crosshair; }
/* lines drawn with a pen: the same width on screen at any zoom */
.map-top .ink { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-top .ink-hit { fill: none; stroke: transparent; stroke-width: 18px; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.map-wrap.drawing .map-top .ink-hit, .map-wrap.drawing .map-top .pin, .map-wrap.drawing .map-top .mark { pointer-events: none; } /* while drawing, taps draw */
.draw-bar { gap: 8px; padding-left: 12px; }
.draw-bar .swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 0 1px #0006 inset; }
.draw-bar .swatch.on { border-color: var(--ink); }
.ink-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); vertical-align: -2px; }
.pen-tool { margin-left: 6px; }
.text-tool { font-family: var(--read); }
.map-tools { flex-wrap: wrap; max-width: calc(100% - 84px); } /* (on a narrow screen, the tools take two rows) */
.map-wrap.writing, .map-wrap.writing:active { cursor: text; }
.map-wrap.erasing, .map-wrap.erasing:active { cursor: cell; }
.map-wrap.writing .map-top *, .map-wrap.erasing .map-top * { pointer-events: none; } /* writing and erasing: the map takes every tap */
.map-top .ink-text { font-weight: 700; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #11150e; stroke-linejoin: round; cursor: pointer; }
.erase-bar { gap: 8px; padding-left: 14px; }
.eraser-tool.on { color: var(--panel); } /* (a pale button when on: a dark symbol on it) */
.map-note-input { display: block; width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); color: var(--ink); margin: 6px 0 12px; }
.map-wrap > * { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-top { pointer-events: none; }
.map-top .pin, .map-top .mark { pointer-events: auto; cursor: pointer; }
.mark circle { stroke: #fff; }
.mark-symbol { fill: #fff; font-weight: 800; dominant-baseline: central; stroke: none !important; paint-order: normal; }
.map-tools { position: absolute; left: 12px; bottom: 30px; display: flex; gap: 6px; }
.mark-tool.no-pen { opacity: .45; } /* (no pen: every map tool is dimmed) */
.mark-tool { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); color: var(--c); font-size: 20px; font-weight: 700; line-height: 1; box-shadow: 0 4px 14px #0006; }
.mark-tool:hover { background: var(--panel-2); }
.mark-tool.on { background: var(--c); color: #fff; border-color: var(--c); }
.map-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--edge); box-shadow: 3px 3px 0 var(--teal), 0 4px 14px #0006; font-size: 15px; white-space: nowrap; }
.map-hint button { padding: 6px 10px; }
.map-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; gap: 6px; }
.map-zoom button { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); font-size: 20px; line-height: 1; box-shadow: 0 4px 14px #0006; }
.map-zoom button:hover { background: var(--panel-2); }
.map .land { fill: var(--land); }
.map .fabric { fill: none; stroke: #1a2e28; }
.map .parks polygon { fill: var(--park); }
.map .water polygon { fill: var(--water); }
.map .rivers polyline { fill: none; stroke: var(--water); stroke-linecap: round; stroke-linejoin: round; }
.map .roads polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map .roads.lane { stroke: #1d302a; }
.map .roads.main { stroke: #3a554c; }
.map .roads.cbd { stroke: #43605a; }
.map .roads.freeway { stroke: #8a6a4a; }
.map .roads.rail polyline { stroke: #050807; stroke-linecap: butt; opacity: .8; }
.map text { paint-order: stroke; stroke: #0b1916; stroke-linejoin: round; pointer-events: none; text-anchor: middle; font-family: var(--ui); }
.map .suburb { fill: var(--bone); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.map .suburb.minor { fill: #a39c86; font-weight: 500; }
.map .road-name { fill: #a7bdb4; font-family: var(--read); font-style: italic; }
.map .park-name { fill: #8fbf9f; }
.map .water-name { fill: #b4dada; font-family: var(--read); font-style: italic; stroke: #0b2224; }
.pin { cursor: pointer; outline: none; }
.pin-hit { fill: transparent; }
.pin-dot { fill: var(--ink); stroke: var(--bg); }
.pin:hover .pin-dot, .pin:focus-visible .pin-dot { fill: var(--sage); }
.pin:focus-visible .pin-hit { fill: #87ad9f33; }
.pin-name { fill: var(--ink); font-weight: 600; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-linejoin: round; pointer-events: none; }
.pin.here .pin-dot { fill: var(--accent); stroke: var(--bg); } /* (you: the orange) */
.pin-ring { fill: none; stroke: var(--accent); animation: ring 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.pin.closed .pin-dot { fill: #4f6456; }
.pin-symbol { fill: #050807; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.my-vehicles { padding-left: 18px; }
.moment { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 7, .74); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: pointer; }
.moment-box { width: min(100%, 560px); background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 12px 12px 14px; box-shadow: 3px 3px 0 var(--teal), 0 18px 60px #000b; }
.card-stage { cursor: pointer; }
.moment-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 0; overflow: hidden; background: #000; }
.moment-stage .art, .moment-stage .fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.moment-stage .art img, .moment-stage .art canvas { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.moment-stage.pan .art { animation: moment-pan var(--secs) ease-in-out forwards; }
.moment-stage.shake { animation: moment-shake .4s ease-in-out infinite; }
@keyframes moment-pan { from { transform: scale(1.04) translateX(-1.5%); } to { transform: scale(1.14) translateX(1.5%); } }
@keyframes moment-shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, 1px); } 75% { transform: translate(1.5px, -1px); } }
.moment-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--ink); font: 600 17px/1.3 var(--ui); letter-spacing: .01em; }
.moment-caption span { color: var(--soft); font-weight: 500; }
.moment-say { min-height: 1.4em; margin-top: 6px; font-weight: 700; color: var(--bone); }
.moment-bar { height: 4px; background: var(--raised); overflow: hidden; margin-top: 8px; }
.moment-bar i { display: block; height: 100%; width: 0; background: var(--sage); animation: moment-bar linear forwards; }
@keyframes moment-bar { to { width: 100%; } }
.moment-skip { margin-top: 10px; text-align: center; font: 500 13px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0; }
.setting select { min-height: 40px; padding: 6px 8px; border-radius: var(--radius); background: var(--panel); color: var(--ink); border: 1px solid var(--edge); font-family: var(--ui); font-size: 16px; }
/* Volume sliders (Settings › Sound, and the radio) */
.settings-sound { margin: 16px 0 2px; font-size: 17px; }
.setting.slider { align-items: center; }
.slider-box { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.slider-box input[type=range] { width: clamp(110px, 32vw, 170px); accent-color: var(--sage); }
.slider-value { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; color: var(--soft); font: 600 15px/1.2 var(--ui); }
/* Your radio: the headphones at the top are lit while it plays */
#radio.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.radio-now { margin: 10px 0; font-weight: 600; }
.radio-buttons { display: flex; gap: 8px; margin: 8px 0 14px; }
.radio-buttons button { flex: 1; min-height: 44px; }
.radio-buttons button.primary { flex: 2; }
.radio-buttons button.on { color: var(--ink); border-color: var(--sage); background: var(--raised); box-shadow: inset 0 -3px 0 var(--sage); }
@media (prefers-reduced-motion: no-preference) { #radio.on { animation: radio-on 2.4s ease-in-out infinite; } }
@keyframes radio-on { 50% { background: color-mix(in srgb, var(--accent) 28%, transparent); } }
:root.still #radio.on { animation: none; }
.photo-credits { margin: 12px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.photo-credits h3 { margin: 0 0 4px; }
.photo-credits summary { cursor: pointer; color: var(--sage); padding: 4px 0; font-family: var(--ui); font-weight: 600; }
.photo-credits ul { margin: 6px 0 0; padding-left: 18px; max-height: 40vh; overflow-y: auto; font-size: 13px; line-height: 1.45; color: var(--soft); }
.photo-credits li { margin: 3px 0; }
.photo-credits a { color: var(--ink); }
.settings-contact { margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-contact h3 { margin: 0 0 4px; }
.settings-contact .contact-ways { line-height: 1.7; }
.settings-contact .contact-ways a { color: var(--ink); }
.people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.people .person { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); font-weight: 600; }
.person-group { display: grid; gap: 6px; margin: 10px 0; }
.person-said { border-left: 4px solid var(--bone); padding: 10px 12px; margin: 10px 0; }
.action.asked { opacity: .55; }
.base-mark circle { fill: #241c14; stroke: #d8a24a; }
.map-top .base-mark { pointer-events: auto; cursor: pointer; }
.map .base-name { fill: #e8c98a; font-weight: 700; }
.map-wrap.below .map-top .base-mark { display: none; }
.my-vehicles .link { background: none; border: 0; padding: 0; color: var(--sage); font-weight: 600; text-decoration: underline; }
.claim-tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius); font: 600 13px/1.35 var(--ui); letter-spacing: .03em; color: var(--c); border: 1px solid var(--c); }
.pin.closed .pin-name { fill: var(--soft); }

/* a place */
/* Pictures stay exactly 16:9, so points marked on them (in percent) land where they should. */
.picture { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc(48dvh * 16 / 9)); margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.picture .art { position: absolute; inset: 0; }
.picture img, .picture canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.picture img, .stage-media img { image-rendering: pixelated; } /* pixel art stays sharp when enlarged */
.hotspot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; border: 0; background: none; color: #fff; }
.hotspot-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); box-shadow: 0 0 0 4px #fb883955, 0 2px 8px #0008; transition: transform .15s; }
.hotspot:hover .hotspot-dot, .hotspot:focus-visible .hotspot-dot { transform: scale(1.2); }
.hotspot-name { font: 600 14px/1.25 var(--ui); letter-spacing: .02em; padding: 1px 7px; border-radius: var(--radius); background: #050807d0; white-space: nowrap; }
.hotspot.closed .hotspot-dot { background: #4f6456; box-shadow: 0 2px 8px #0008; }
.hotspot.closed .hotspot-name { color: var(--soft); }
.crumbs { margin: 12px 0 0; font: 500 13px/1.3 var(--ui); letter-spacing: .03em; color: var(--soft); }
.points { display: grid; gap: 6px; margin: 14px 0 0; }
.point { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name chev" "meta chev"; align-items: center; gap: 2px 10px; text-align: left; padding: 11px 14px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); transition: background .15s; }
.point:hover:not(:disabled) { background: var(--panel-2); }
.point:disabled { opacity: .55; cursor: default; }
.point-name { grid-area: name; font-weight: 600; }
.point .action-meta { grid-area: meta; }
.point .chev { grid-area: chev; font-size: 22px; color: var(--soft); }
canvas.pixel { image-rendering: pixelated; }
.art-note { position: absolute; left: 8px; bottom: 8px; font: 500 12px/1.3 var(--ui); color: var(--ink); background: #050807b0; padding: 2px 8px; border-radius: var(--radius); }
.place-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.place-head h2 { font-size: 28px; text-transform: uppercase; letter-spacing: .02em; }
.area { color: var(--soft); font: 500 14px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.lead { color: var(--ink); }
.actions { display: grid; gap: 7px; margin: 14px 0; }
/* a button you press: ink outline on teal-black, square, its name in the condensed face */
.action { display: grid; gap: 3px; text-align: left; min-height: 48px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); transition: background .15s, transform .1s; }
.action:hover:not(:disabled) { background: var(--panel-2); }
.action:active:not(:disabled) { transform: translateY(1px); background: var(--raised); }
.action:disabled { opacity: 1; cursor: default; color: var(--soft); border-style: dashed; border-color: #4f6456; background: transparent; }
.action-label { font-weight: 600; }
.action-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 500 14px/1.25 var(--ui); letter-spacing: .02em; color: var(--soft); }
.why { color: var(--warn); font-family: var(--ui); font-weight: 500; font-size: 14px; letter-spacing: .02em; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { display: inline-block; padding: 1px 7px; border-radius: var(--radius); font: 500 13px/1.35 var(--ui); letter-spacing: .02em; background: var(--raised); white-space: nowrap; }
.chip.up { color: var(--good); }
.chip.down { color: var(--warn); }

/* buttons: the one main button is the orange ink, offset in teal; the rest ink outlines */
.primary, :where(button, a).wide, .ghost, .use, .trip, #dev button { min-height: 44px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); padding: 10px 14px; }
:where(button, a).wide:hover:not(:disabled), .use:hover:not(:disabled), .trip:hover:not(:disabled) { background: var(--panel-2); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: var(--offset); }
.primary:hover:not(:disabled) { background: #ff9a52; }
.primary:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--teal); }
.primary:disabled { background: transparent; color: var(--soft); border: 1px dashed #4f6456; box-shadow: none; }
.ghost { background: transparent; border-color: transparent; color: var(--soft); }
button.wide:disabled:not(.primary), .enc-option:disabled { color: var(--soft); border-style: dashed; border-color: #4f6456; background: transparent; } /* (a choice you can't take: dashed, its reason beside it) */
:where(button, a).wide { display: block; width: 100%; margin-top: 8px; } /* (a wide button: never html.wide, the wide-screen layout's class on the page itself, 2026-11-25) */
a.button { box-sizing: border-box; text-align: center; text-decoration: none; color: inherit; font-family: var(--ui); font-weight: 600; }
a.button.primary { color: var(--accent-ink); }
button:disabled { cursor: default; }

/* bag */
.bag h3 { margin: 20px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.load { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.load-top { display: flex; justify-content: space-between; gap: 10px; font: 600 15px/1.3 var(--ui); letter-spacing: .02em; margin-bottom: 6px; }
.load .bar i { background-color: var(--sage); }
.load.over { border-color: var(--warn); }
.load.over .load-top span { color: var(--warn); }
.load.over .bar i { background: var(--warn); }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.slot { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 10px; border-radius: var(--radius); border: 1px dashed #4f6456; background: transparent; overflow: hidden; font-weight: 500; }
.slot.full { border-style: solid; border-color: var(--edge); background: var(--panel); }
.slot:disabled { opacity: 1; }
.slot-icon { font-size: 22px; line-height: 1.1; }
.slot:not(.full) .slot-icon { opacity: .35; }
.slot-name { font: 500 12px/1.2 var(--ui); letter-spacing: .02em; color: var(--soft); }
.slot-wear { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--sage); }
.items { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px 8px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.item.on { border-color: var(--edge); box-shadow: inset 3px 0 0 var(--sage); }
.item-open { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; text-align: left; background: none; border: 0; padding: 2px; color: inherit; font: inherit; min-width: 0; }
.item-main > b { font-family: var(--ui); font-weight: 600; font-size: 17px; letter-spacing: .01em; }
.item-icon { font-size: 26px; text-align: center; }
.item-main { display: grid; gap: 2px; min-width: 0; }
.item-meta { font: 500 14px/1.3 var(--ui); letter-spacing: .02em; color: var(--soft); }
.wear { display: block; width: 80px; height: 3px; border-radius: 0; background: var(--raised); overflow: hidden; }
.wear i { display: block; height: 100%; background: var(--sage); }
.count { color: var(--soft); font-weight: 400; }
.item .small { margin: 2px 0 0; }
.use { padding: 8px 12px; }
.use:disabled { opacity: .5; }
.empty { color: var(--soft); text-align: center; margin-top: 40px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 14px; font-size: 15px; }
.facts dt { color: var(--soft); font: 500 14px/1.5 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.facts dd { margin: 0; }
.happened p.got { color: var(--good); }
.happened p.lost { color: var(--soft); }
.happened p.good { color: var(--good); }

/* a building's panel, and things left in a room */
.place-panel { margin: 12px 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.systems { display: grid; gap: 8px 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.system-top { display: flex; justify-content: space-between; font: 500 14px/1.3 var(--ui); letter-spacing: .02em; margin-bottom: 4px; }
.fixtures { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fixture { font: 500 13px/1.35 var(--ui); letter-spacing: .02em; padding: 1px 7px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--soft); }
.fixture.ok { color: var(--good); border-color: #a8d8c255; }
.place-panel .small { margin: 8px 0 0; }
.left-here h3 { margin: 14px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.left-here .item-open { cursor: default; }

/* vehicles */
.map-top .vehicle-mark { pointer-events: auto; cursor: pointer; }
.vehicle-mark circle { fill: #0b1916; stroke: #c8d8d0; }
.vehicle-mark.wreck circle { stroke: #6b7280; }
.vehicle-mark.mine circle { stroke: var(--bone); fill: #26231b; }
.vehicle-mark.wreck text { filter: grayscale(1) brightness(.8); }
.vehicle-symbol { dominant-baseline: central; text-anchor: middle; stroke: none !important; paint-order: normal; fill: #fff; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.map-wrap.drawing .map-top .vehicle-mark { pointer-events: none; }
.vehicle-panel .ok-line, .ok-line { color: var(--good); margin: 0 0 8px; }
.vehicle-panel .why { margin: 0 0 8px; display: block; font-size: 14px; }
.vehicle-panel .small { margin: 8px 0 0; }
.parts-panel { display: grid; gap: 6px; }
.part-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.part-list { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.part { font: 500 13px/1.35 var(--ui); letter-spacing: .02em; padding: 1px 7px; border-radius: var(--radius); background: #a8d8c222; color: var(--good); }
.part.low { background: #e4ad8226; color: var(--warn); }
.part.dead { background: #fb883926; color: var(--bad); }
.part.missing { background: transparent; border: 1px dashed var(--line); color: var(--soft); }
.parked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.parked button { padding: 6px 10px; }
.mark-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.mark-tool.small-tool { width: 34px; height: 34px; font-size: 16px; border-radius: var(--radius); box-shadow: none; }

/* below the city */
.map-wrap.below .map:not(.map-top), .map-wrap.below .map-detail { filter: brightness(.32) saturate(.25); }
.map-wrap.below .map-top .vehicles, .map-wrap.below .map-top .marks, .map-wrap.below .map-top .inks, .map-wrap.below .map-top > g > .pin, .map-wrap.below .map-top .nest-mark { display: none; }
.map-wrap.below .map-top .names { opacity: .35; }
.tunnel { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tunnel.metro { stroke: #4fc3c9; }
.tunnel.loop { stroke: #e0b84f; }
.tunnel.passage { stroke: #9aa0a8; }
.tunnel.drain { stroke: #a07a52; }
.tunnel.blocked { stroke: #e05a5a; }
.tunnel.flooded { stroke: #5fa0c8; }
.ug-node { fill: #0b1916; stroke: #e8eeea; }
.ug-node.here { stroke: var(--accent); fill: var(--accent); }
.map-top .ug-stop { pointer-events: auto; cursor: pointer; }
.ug-name { fill: #e8eeea; font-family: var(--ui); font-weight: 600; stroke: #000c; stroke-width: 3px; paint-order: stroke; vector-effect: non-scaling-stroke; text-anchor: middle; }
.map-top .entrance-mark { pointer-events: auto; cursor: pointer; }
.entrance-mark circle { fill: #0b1916; stroke: #4fc3c9; }
.map-zoom button.on { border-color: var(--sage); color: var(--ink); background: var(--raised); }
.night-hint { pointer-events: none; font-size: 14px; opacity: .92; white-space: normal; width: max-content; max-width: min(90%, 460px); text-align: center; padding: 6px 14px; } /* at night: why the map is dark (top, clear of the marks) */
.below-hint { pointer-events: none; top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 14px; opacity: .9; white-space: normal; width: max-content; max-width: min(90%, 460px); text-align: center; }
.map-wrap.below ~ .map-tools { display: none; }

/* the infected on the map */
.map-top .nest-mark { pointer-events: auto; cursor: pointer; }
.nest-mark circle { fill: #2a1a1a; stroke: #e0402c; }
.ug-node.den { stroke: #e0402c; fill: #3a1512; }
.nest-mark.gone circle { stroke: #6b7280; }
.nest-mark.gone text { filter: grayscale(1) brightness(.7); }
.map-wrap.drawing .map-top .nest-mark { pointer-events: none; }
.warn-line { color: var(--warn); margin: 6px 0; font-size: 15px; }

/* conditions in the HUD */
#hud .conds { display: flex; gap: 4px; align-items: center; }
#hud .cond { font-size: 16px; line-height: 1; }

/* the encounter window */
.overlay.encounter { background: rgba(5, 8, 7, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.overlay.encounter .overlay-body { text-align: left; width: min(520px, 100%); background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 12px 16px 16px; box-shadow: 3px 3px 0 var(--teal), 0 18px 60px #000b; }
.overlay.encounter .enc-picture .picture { border-radius: 0; overflow: hidden; }
.enc-picture .picture { width: 100%; }
.enc-head h1 { font-size: 34px; margin: 12px 0 0; }
.enc-head .small { font: 500 14px/1.3 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--bad); }
.enc-meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.enc-meter .system-top { font-size: 14px; }
.enc-meter .system-top .ink-icon { margin-right: 3px; }
.enc-log { min-height: 5em; padding: 8px 12px; background: var(--raised); border-left: 4px solid var(--sage); border-radius: 1px 3px 2px 1px; margin-bottom: 12px; }
.enc-log p { margin: 2px 0; color: var(--soft); font-size: 15px; }
.enc-log p.fresh { color: var(--ink); animation: rise .4s ease-out; }
.enc-options { display: grid; gap: 8px; }
.enc-option { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-align: left; }
.enc-option .enc-label { flex: 1; }
.enc-option .enc-meta { font: 500 14px/1.3 var(--ui); letter-spacing: .02em; color: var(--soft); }
.enc-option.fight { border-color: var(--bad); color: var(--bad); }
.trade h3 { margin: 12px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.trade-row { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.trade-value { color: var(--soft); font: 500 13px/1.3 var(--ui); min-width: 2em; text-align: right; }
.trade-n { min-width: 1.4em; text-align: center; }
button.tiny { padding: 2px 10px; }
.trade .primary { margin-top: 10px; }

/* skills */
.skills { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.skills li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; }
.skills li.none { opacity: .6; }
.skill-icon { font-size: 20px; text-align: center; }
.skill-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.skills .small { margin: 0; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--soft); }
.dots i.on { background: var(--sage); border-color: var(--sage); }

/* body */
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stat-card { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--ui); font-size: 17px; letter-spacing: .01em; }
.stat-top b { font-weight: 600; }
.stat-card .small { margin: 0; }
.status h3, .journal h3 { margin: 24px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.rules, .abilities { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rules li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rules .chips { margin: 0; }

/* journal: written up in a notebook, each day stamped (the journal's touch) */
.journal h4.day { display: inline-block; margin: 18px 0 6px; padding: 1px 8px; font: 15px/1.35 var(--stamp); color: var(--bone); border: 1px solid var(--bone); transform: rotate(-1.5deg); }
.entry { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin: 6px 0; }
.entry .when { color: var(--soft); font: 500 14px/1.6 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.entry.bad { color: #f6b38a; }
.entry.good { color: var(--good); }
.entry.stage { color: var(--bone); }
.entry.clue, .happened p.clue { color: var(--bone); }
.happened p.clue::before, .clues li::before { content: '✎ '; color: var(--bone); }
.clues { list-style: none; padding: 0; margin: 0 0 12px; }
.clues li { margin: 6px 0; line-height: 1.45; }

/* sheets */
#sheet-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; } /* (over the main menu and the end, too) */
#sheet-layer:empty { display: none; }
/* cards: everything you do or look at closely, in the foreground; the place stays behind, dimmed */
.scrim { position: absolute; inset: 0; background: rgba(5, 8, 7, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.sheet { position: absolute; left: 50%; top: 50%; width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; transform: translate(-50%, -47%) scale(.97); opacity: 0; transition: transform .22s var(--ease), opacity .18s; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px; box-shadow: 3px 3px 0 var(--teal), 0 18px 60px #000b; pointer-events: auto; }
#sheet-layer.open .scrim { opacity: 1; }
#sheet-layer.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
/* a sheet with ways to somewhere, over the city map: at the bottom, the map (and the ways drawn on it) clear above */
.sheet.docked { top: auto; bottom: 0; max-height: min(58dvh, calc(100dvh - 140px)); border-radius: 0; box-shadow: 0 -10px 40px #0009; transform: translate(-50%, 24px); }
#sheet-layer.open .sheet.docked { transform: translate(-50%, 0); }
.scrim.clear { background: linear-gradient(to bottom, transparent 30%, rgba(5, 8, 7, .45)); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet > .picture, .sheet .card-stage > .picture { border-radius: 0; overflow: hidden; }
.sheet.card { padding: 0; }
.card-stage { padding: 0; }
.card-stage .moment-caption, .card-stage .moment-say, .card-stage .moment-bar, .card-stage .moment-skip { margin-left: 16px; margin-right: 16px; }
.card-body { padding: 4px 16px 16px; }
.card-body h2 { font-size: 28px; margin: 14px 0 6px; }
.card-result { position: relative; padding: 18px 12px 10px; background: var(--raised); border: 1px solid var(--line); border-left: 4px solid var(--sage); border-radius: 1px 3px 2px 1px; box-shadow: 2px 3px 0 #0008; margin: 20px 0 14px; }
.card-result::before { content: 'What happened'; position: absolute; left: 10px; top: -9px; padding: 1px 6px; font: 13px/1.3 var(--stamp); text-transform: uppercase; letter-spacing: .04em; color: var(--bone); background: var(--panel); border: 1px solid var(--bone); transform: rotate(-2deg); }
.card-result p { margin: 3px 0; }
.card-result p.got { color: var(--good); }
.card-result p.lost, .card-result p.warn { color: var(--warn); }
.card-result p.clue { color: var(--bone); }
.card-next { margin-bottom: 10px; }
.sheet h2 { font-size: 24px; margin-bottom: 6px; }
.sheet h3 { font-size: 17px; }
.sheet-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.warn { color: var(--warn); }
.good { color: var(--good); }
.trips { display: grid; gap: 8px; margin-top: 8px; }
.trip { display: grid; grid-template-columns: 70px 90px 1fr; align-items: center; gap: 8px; text-align: left; }
.trip-cost { display: flex; flex-wrap: wrap; gap: 4px; }
.trip .why { grid-column: 1 / -1; }
.trip.primary .chip { background: #05080722; color: var(--accent-ink); }
.trip:disabled, .trip.wont-start { opacity: .55; } /* (a car that won’t start: tap it to hear it try) */

/* overlays */
#overlay-layer:empty { display: none; }
/* The backdrop is solid from the first frame, so the screen behind never shows through; only the
   content fades in. */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #0d2f2a, var(--bg) 75%); padding: 24px; overflow-y: auto; }
.overlay-body { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; } }
.overlay-body { width: min(460px, 100%); text-align: center; }
.overlay h1 { font-size: 36px; margin: 12px 0; }
/* the name, in the condensed face, the teal printed a hair out of register */
.game-title { font-size: clamp(72px, 26vw, 112px) !important; line-height: .9; letter-spacing: .03em; font-weight: 700; color: var(--ink); text-shadow: 3px 2px 0 var(--teal); }
.tagline { color: var(--ink); margin-bottom: 24px; }
.kicker { color: var(--warn); font: 600 15px/1.3 var(--ui); text-transform: uppercase; letter-spacing: .1em; margin-top: 14px; }
.stage-media { aspect-ratio: 16 / 9; border-radius: 0; overflow: hidden; background: #000; }
.stage-media canvas, .stage-media video, .stage-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-lines { margin: 18px 0 10px; min-height: 8.5em; text-align: left; } /* keeps the button still as lines appear */
.story-text { margin: 0; }
.story-text p { margin: 0 0 6px; line-height: 1.5; color: var(--soft); }
.story-text p:last-child { margin-bottom: 0; }
.story-text p.fresh { color: var(--ink); animation: rise .5s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .story-text p.fresh { animation: none; } }
.death h1 { color: var(--bad); }
.problems { text-align: left; margin-top: 18px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--bad); background: #fb883914; font-size: 14px; }
.problems ul { margin: 6px 0 0; padding-left: 18px; }
.problems li { margin: 3px 0; word-break: break-word; }

/* developer tools */
#dev { position: fixed; right: 12px; top: 12px; z-index: 30; width: min(320px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 12px; background: #0b1916f2; border: 1px solid var(--accent); border-radius: var(--radius); font-size: 13px; box-shadow: 0 12px 40px #0008; }
.dev-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dev-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 6px; align-items: center; margin: 6px 0; }
.dev-row output { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.dev-row select { grid-column: 2 / -1; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
#dev button { padding: 6px 8px; }
.dev-abilities { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }

@media (min-width: 760px) {
  .screen { padding: 20px 24px 40px; }
  .actions { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; } /* Settings › Motion: reduced */

/* the main menu: the game's picture behind, the menu in front */
/* (on a phone: the name at the top, the buttons at the bottom, the picture between: the user's choice, 2026-11-25) */
.overlay.home { background: var(--bg); place-items: stretch center; }
.home-bg { position: absolute; inset: 0; overflow: hidden; }
.home-bg img, .home-bg canvas { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.home-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #050807b8 0%, #05080740 30%, #05080710 45%, #050807c0 68%, #050807f2 100%); }
.overlay.home .overlay-body { position: relative; z-index: 1; width: min(420px, 100%); display: flex; flex-direction: column; min-height: 100%; padding-top: max(28px, env(safe-area-inset-top)); }
.overlay.home .game-title { margin: 0; }
.overlay.home .tagline { margin: 10px 0 24px; text-shadow: 0 1px 12px #000; }
.home-menu { display: grid; gap: 10px; margin-top: auto; }
.home-menu button { margin: 0; }
.home-menu button:not(.primary):not(.ghost) { background: #0b1916e8; }
.home-continue { display: grid; gap: 2px; }
.home-continue span { font: 500 14px/1.2 var(--ui); letter-spacing: .02em; opacity: .9; }
.home-note { color: var(--soft); margin: 0; }
.sheet .setting { align-items: flex-start; }
.sheet .setting small { display: block; color: var(--soft); font-size: 14px; margin-top: 2px; }
.help dt { font: 700 18px/1.3 var(--ui); letter-spacing: .01em; margin-top: 14px; }
.help dd { margin: 3px 0 0; color: var(--soft); }
button.danger { color: var(--bad); }

/* the end */
.overlay.death { background: radial-gradient(circle at 50% 25%, #2a1a12, var(--bg) 70%); }
.overlay.death .overlay-body { width: min(560px, 100%); }
.overlay.death .picture { width: 100%; border-radius: 0; }
.overlay.death h1 { color: var(--bone); font-size: 40px; text-transform: uppercase; }
.death-text { color: var(--soft); font-size: 17px; line-height: 1.55; }
.death-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 20px; }
.death-stat { display: grid; gap: 2px; padding: 8px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.death-stat b { font: 700 22px/1.1 var(--ui); }
.death-stat span { font: 500 13px/1.2 var(--ui); letter-spacing: .03em; color: var(--soft); }
@media (max-width: 480px) { .death-stats { grid-template-columns: repeat(2, 1fr); } }
/* A road tapped on the map: Walk / Run in a bar at the top; your dot snaps to the spot. */
.road-bar { white-space: normal; width: max-content; max-width: min(94%, 520px); flex-wrap: wrap; justify-content: center; padding: 8px 8px 8px 14px; }
.road-where { display: grid; line-height: 1.2; min-width: 0; }
.road-where b { overflow: hidden; text-overflow: ellipsis; max-width: 220px; white-space: nowrap; }
.road-trips { display: flex; gap: 6px; flex-wrap: wrap; }
/* the ways to somewhere, on the map and as chips to choose from (streets.js) */
.ways polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.way .way-line { stroke: var(--accent); stroke-width: 3px; opacity: .5; stroke-dasharray: 1 7; }
.way.chosen .way-line { stroke-dasharray: none; }
.way.chosen .way-line { stroke-width: 4px; opacity: 1; }
.way .way-case { stroke: #050807; stroke-width: 7px; opacity: .7; }
.way .way-swim { stroke: #8fd0dc; stroke-width: 3px; stroke-dasharray: 2 6; opacity: .45; }
.way.chosen .way-swim { stroke-width: 4px; opacity: 1; }
.way .way-hit { stroke: transparent; stroke-width: 22px; pointer-events: stroke; cursor: pointer; }
.way-toll { fill: #e0533d; stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; r: 6px; }
.map-wrap.drawing .ways, .map-wrap.writing .ways, .map-wrap.erasing .ways, .map-wrap.placing .ways { pointer-events: none; }
.way-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.way-chip { display: grid; text-align: left; gap: 1px; padding: 6px 10px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); font-size: 15px; line-height: 1.25; max-width: 100%; }
.way-chip b { font-weight: 600; }
.way-chip span { color: var(--soft); font-size: 14px; font-weight: 500; }
.way-chip.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.way-chip.swim.on { border-color: #8fd0dc; box-shadow: inset 0 0 0 1px #8fd0dc; }
.road-bar .way-chips { width: 100%; margin: 0; }
.way-show { margin-top: 8px; }
.road-trips .trip { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; }
.road-trips .trip .why { font-size: 13px; }
.map-note { white-space: normal; display: block; width: max-content; max-width: min(92%, 460px); padding: 8px 14px; cursor: pointer; }
.map-note p { margin: 2px 0; }
.pin.road-target .pin-dot { fill: transparent; stroke: var(--accent); }
.pin.arrived { animation: snap .45s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes snap { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: scale(1); } }
/* The Void (data/void.js): its rooms and passages in a dim violet; passages not yet followed are dashed stubs with a ? */
.tunnel.void { stroke: #9a86c8; }
.tunnel.void.blocked { stroke: #e05a5a; }
.ug-node.void { stroke: #9a86c8; }
.map-top .void-stub { pointer-events: auto; cursor: pointer; }
.stub-hit { fill: none; stroke: transparent; stroke-linecap: round; }
.stub-q { fill: #cbbcf0; font-weight: 700; text-anchor: middle; dominant-baseline: central; stroke: #000c; stroke-width: 3px; paint-order: stroke; vector-effect: non-scaling-stroke; }
.trip.follow { display: block; text-align: center; }
.change-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; margin: 8px 0; } /* the disc: what to change, and into what */
/* ?cards: every action picture and its versions */
.cards-view { position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--bg); padding: 16px; }
.cards-view h2 { margin: 0 0 12px; }
.cards-view-row { margin-bottom: 28px; }
.cards-view-row h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.cards-view-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cards-view-cell p { margin: 6px 2px 0; }

/* views (data/views.js): the picture shown whole, and the ads laid on its boards */
.view-pic { position: relative; overflow: hidden; border-radius: 0; background: #0d1014; aspect-ratio: 16 / 9; }
.view-pic .view-base { display: block; width: 100%; height: 100%; object-fit: cover; }
.view-pic .view-ad { position: absolute; left: 0; top: 0; transform-origin: 0 0; mix-blend-mode: multiply; filter: saturate(.8) contrast(.92) sepia(.12); opacity: .94; pointer-events: none; }
/* an unsold board pulses softly; a tap says it's for rent (ui.js boardOffer) */
.view-pic .view-offer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.view-pic .board-offer { pointer-events: auto; cursor: pointer; fill: #ff8a3d; fill-opacity: 0; stroke: #ffb27a; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; animation: board-pulse 2.6s ease-in-out infinite; }
.view-pic .board-offer:hover, .view-pic .board-offer:focus-visible { animation-duration: 1.2s; outline: none; }
@keyframes board-pulse { 0%, 100% { fill-opacity: 0; stroke-opacity: .15; } 50% { fill-opacity: .16; stroke-opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .view-pic .board-offer { animation: none; stroke-opacity: .6; } }
.still .view-pic .board-offer { animation: none; stroke-opacity: .6; } /* (the game's own "less motion" setting) */
.view-pic .offer-note { position: absolute; transform: translateX(-50%); width: min(78%, 330px); padding: 10px 12px; border-radius: var(--radius); background: rgba(11, 25, 22, .95); border: 1px solid #ffb27a; color: var(--ink); font-size: 14px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); animation: offer-in .18s ease-out; z-index: 2; }
.view-pic .offer-note strong { color: #ffb27a; font-size: 14px; padding-right: 28px; }
.view-pic .offer-note .offer-no { font-weight: 700; letter-spacing: .02em; }
.view-pic .offer-note .offer-close { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--soft); font-size: 22px; line-height: 1; cursor: pointer; }
.view-pic .offer-note .offer-close:hover, .view-pic .offer-note .offer-close:focus-visible { color: var(--ink); background: rgba(255, 255, 255, .08); }
.view-pic .offer-note .offer-how { color: var(--soft); }
.view-pic .offer-note a { color: var(--ink); text-decoration: underline; }
@keyframes offer-in { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translateX(-50%); } }
.view-pic .view-ad.shopfront, .view-pic .view-ad.dark { mix-blend-mode: normal; opacity: .88; } /* (a shop's signboard is painted a dark colour: multiplied, the ad would vanish into it) */
.view-text { margin-top: 10px; }
.map-top .view-mark { pointer-events: auto; cursor: pointer; }
.view-mark circle { fill: #0b1916; stroke: #f2c14e; }
.map-wrap.below .map-top .view-mark { display: none; }
.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.view-thumb { display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: 600 15px/1.25 var(--ui); }
.view-thumb-pic { aspect-ratio: 16 / 9; border-radius: 0; overflow: hidden; background: #0d1014; }
.view-thumb-pic img, .view-thumb-pic canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.views-row { margin-bottom: 28px; max-width: 960px; }
.views-row h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.views-row .view-pic { cursor: crosshair; }
.views-outline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.views-outline polygon { fill: #4fc3c933; stroke: #4fc3c9; stroke-width: .3; vector-effect: non-scaling-stroke; }
.views-outline text { font-size: 3px; fill: #fff; }
.views-at { white-space: pre-wrap; font-size: 14px; margin-top: 6px; }


/* waking again: the paid continue (ui.js wakeButton, wakeOffer, wakeRewards) */
.wake-button { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wake-button span { font-weight: 400; font-size: .85em; opacity: .9; }
.wake-terms { margin: 8px 0 12px; padding-left: 20px; line-height: 1.5; }
.wake-status:empty { display: none; }
.overlay.wake { background: radial-gradient(circle at 50% 25%, #0d2f2a, var(--bg) 70%); }
.overlay.wake .overlay-body { width: min(560px, 100%); }
.rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 8px; }
@media (max-width: 480px) { .rewards { grid-template-columns: repeat(2, 1fr); } }
.reward { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); text-align: center; font-size: 16px; }
.reward .reward-icon { font-size: 1.6em; line-height: 1; }
.reward.on { border-color: var(--sage); background: var(--raised); box-shadow: inset 0 -3px 0 var(--sage); }
.reward:disabled:not(.on) { opacity: .45; }
.settings-pay { margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-pay h3 { margin: 0 0 4px; }
.recovery-code { font-size: .8em; word-break: break-all; user-select: all; max-width: 55%; }
.recovery-use { display: flex; gap: 8px; align-items: center; }
.recovery-use input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; }
.recovery-use button { width: auto; margin-top: 0; }

/* Donate (ui.js donateCard) */
.donate-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.donate-amounts .donate-amount { margin-top: 0; font-weight: 600; }
.donate-btc { margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.donate-btc h3 { margin: 0 0 6px; }
.btc-address { display: block; font-size: .8em; word-break: break-all; user-select: all; padding: 8px 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.donate-status:empty { display: none; }
.legal-links { text-align: center; margin: 12px 0 0; }
.legal-links a { color: var(--ink); }
