/* ==========================================================================
   The Sierra Archive — public site styles
   Colors change with the era you are looking at (html[data-era=...]).
   ========================================================================== */

@font-face { font-family: "Lora"; src: url("../fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* Registered so the era colours can fade smoothly into each other */
@property --bg   { syntax: "<color>"; inherits: true; initial-value: #120a24; }
@property --bg2  { syntax: "<color>"; inherits: true; initial-value: #2a1450; }
@property --acc  { syntax: "<color>"; inherits: true; initial-value: #f2a65a; }
@property --acc2 { syntax: "<color>"; inherits: true; initial-value: #61a5c2; }
@property --lc1  { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --lc2  { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ink  { syntax: "<color>"; inherits: true; initial-value: #f4efe6; }

:root {
  --bg: #120a24; --bg2: #2a1450; --acc: #f2a65a; --acc2: #61a5c2; --ink: #f4efe6;
  --muted: color-mix(in oklab, var(--ink) 62%, transparent);
  --faint: color-mix(in oklab, var(--ink) 14%, transparent);
  --line: color-mix(in oklab, var(--ink) 18%, transparent);
  --panel: color-mix(in oklab, #0a0910 82%, var(--bg2));
  --panel-2: color-mix(in oklab, #0a0910 70%, var(--bg2));
  --card: color-mix(in oklab, #000 55%, var(--bg2));
  --scan: 0.0;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --read: var(--serif);   /* story text, summaries — Admin → Fonts */
  --top: 62px;
  --mini: 56px;
  --radius: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* the era colours fade on the big background layers only (below). Fading them here, on the whole page,
     made the browser work out the style of every element on every frame of the fade — rough scrolling */
  color-scheme: dark;
}
html[data-era="intro"]  { --bg: #0c0716; --bg2: #3b1d78; --acc: #b794ff; --acc2: #ff7ac8; --ink: #f4effc; --scan: .08; }
html[data-era="apple2"] { --bg: #040805; --bg2: #0d2112; --acc: #3cf06e; --acc2: #d22dfc; --ink: #e7ffe9; --scan: .55; }
html[data-era="ega"]    { --bg: #04042a; --bg2: #0a0a78; --acc: #55ffff; --acc2: #ff55ff; --ink: #f2f2ff; --scan: .3; }
html[data-era="vga"]    { --bg: #120a24; --bg2: #3b1f6b; --acc: #f2a65a; --acc2: #61a5c2; --ink: #f6efe7; --scan: .12; }
html[data-era="cd"]     { --bg: #0d0a08; --bg2: #3a2616; --acc: #e3c07a; --acc2: #c25a3c; --ink: #f4ecdf; --scan: .05; }
html[data-era="modern"] { --bg: #0a0e13; --bg2: #1f2d3d; --acc: #ef7b37; --acc2: #7fa6cf; --ink: #eef2f6; --scan: 0; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1300px 820px at 72% 8%, color-mix(in oklab, var(--bg2) 80%, var(--acc) 20%), transparent 72%),
              radial-gradient(1050px 760px at 0% 100%, color-mix(in oklab, var(--bg2) 78%, var(--acc2) 22%), transparent 70%),
              radial-gradient(820px 620px at 100% 100%, color-mix(in oklab, var(--acc2) 24%, transparent), transparent 70%),
              radial-gradient(760px 520px at 30% 38%, color-mix(in oklab, var(--bg2) 60%, transparent), transparent 72%),
              var(--bg);
  color: var(--ink);
  font: calc(15px * var(--k-ui, 1))/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
html.no-js body { overflow: auto; }
a { color: var(--acc); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sr-only, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 1000; top: 8px; left: 8px; background: var(--acc); color: #000; padding: 8px 12px; border-radius: 6px; }
[hidden] { display: none !important; }
kbd { font: 600 calc(11.5px * var(--k-ui, 1)) var(--sans); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--faint); }
code { font: .9em var(--mono); background: var(--faint); padding: .1em .35em; border-radius: 4px; }

/* scanlines that grow stronger in the early eras */
.fx-scan {
  pointer-events: none; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.35) 0 1px, transparent 1px 3px);
  opacity: calc(var(--scan) * .9); transition: opacity 1.2s;
}
/* Admin → Site settings → Scanlines: subtle follows the era, classic is always clearly visible */
.fx-scan.fx-classic { opacity: calc(.6 + var(--scan) * .4); }
/* background layer that can be pixelated (Admin → Site settings → Background effect) */
.bgfx { position: absolute; inset: 0; pointer-events: none; }
.bg-base { position: absolute; inset: 0;
  background: radial-gradient(1300px 820px at 72% 8%, color-mix(in oklab, var(--bg2) 80%, var(--acc) 20%), transparent 72%),
              radial-gradient(1050px 760px at 0% 100%, color-mix(in oklab, var(--bg2) 78%, var(--acc2) 22%), transparent 70%),
              radial-gradient(820px 620px at 100% 100%, color-mix(in oklab, var(--acc2) 24%, transparent), transparent 70%),
              radial-gradient(760px 520px at 30% 38%, color-mix(in oklab, var(--bg2) 60%, transparent), transparent 72%),
              var(--bg); }
.bgfx.px-on { filter: url(#fx-pixelate); }
/* lines / tiles laid exactly over the pixel blocks (never over content) */
.px-grid { position: absolute; inset: 0; pointer-events: none; --px: 36px; transition: opacity .6s ease; }
.px-grid { background-size: var(--px) var(--px); background-position: 0 0; }
.px-grid.style-grid { background-image:
    linear-gradient(to right, rgba(0,0,0,.55) 0 2px, transparent 2px),
    linear-gradient(to bottom, rgba(0,0,0,.55) 0 2px, transparent 2px); }
.px-grid.style-tiles { background-image:
    linear-gradient(to right, rgba(0,0,0,.6) 0 3px, transparent 3px),
    linear-gradient(to bottom, rgba(0,0,0,.6) 0 3px, transparent 3px); }
/* large faint company logo behind the timeline */
/* sits centred above the big background year, 40% smaller than before */
.logomark { position: absolute; left: 0; right: 0; top: 4%; translate: 0 calc(-1 * var(--bg-up, 4vh)); height: calc(30% - 14px); pointer-events: none; display: grid; place-items: end center; }
.logomark img { grid-area: 1 / 1; width: min(34vw, 516px); height: 100%; max-height: 252px; object-fit: contain; object-position: center bottom; opacity: 0;
  transition: opacity 1.1s ease; filter: saturate(.9); }
.logomark { transition: opacity .8s ease; }
.logomark.away { opacity: 0; }
.logomark img.on { opacity: var(--logo-op, .14); }
/* current logo in the top bar */
.tb-logo { display: grid; flex: none; height: 30px; width: 0; opacity: 0; transition: width .5s var(--ease), opacity .5s; overflow: hidden; }
.tb-logo.has { width: 92px; opacity: 1; }
.tb-logo img { grid-area: 1 / 1; height: 30px; width: 92px; object-fit: contain; object-position: left center; opacity: 0; transition: opacity .7s ease; }
.tb-logo img.on { opacity: 1; }
.tb-logo { border-left: 1px solid var(--line); padding-left: 14px; margin-left: -4px; box-sizing: content-box; }
.tb-logo:not(.has) { border-color: transparent; padding-left: 0; }
.era-logo { display: block; height: 34px; width: auto; max-width: 150px; object-fit: contain; margin: 0 0 8px; }
.era-card.compact .era-logo { height: 24px; margin-bottom: 4px; }
.feed-era-logo { display: block; height: 54px; width: auto; max-width: 240px; object-fit: contain; margin: 0 0 10px; }
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; cursor: pointer; text-decoration: none;
  padding: .62em 1.1em; border-radius: 999px; border: 1px solid transparent;
  background: var(--acc); color: #0b0a10; font-weight: 500; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px -10px var(--acc); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--acc); box-shadow: none; }
.btn-big { font-size: 1.05rem; padding: .8em 1.4em; }
.iconbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--panel) 70%, transparent); cursor: pointer; color: var(--ink);
  transition: border-color .2s, background .2s; text-decoration: none; font-size: 18px; line-height: 1;
}
.iconbtn:hover { border-color: var(--acc); }
.ico { width: 18px; height: 18px; flex: none; }
.pill { cursor: pointer; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .3em .85em; font-size: 13px; }
.pill[aria-pressed="true"] { background: var(--acc); color: #0b0a10; border-color: var(--acc); }
.chip { display: inline-block; padding: .12em .6em; margin: 0 .3em .3em 0; border-radius: 999px; background: var(--faint); font-size: calc(13px * var(--k-ui, 1)); white-space: nowrap; }
.chip-link { text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: transparent; }
.chip-link:hover { border-color: var(--acc); color: var(--acc); }
.noimg {
  display: grid; place-items: center; width: 100%; height: 100%; padding: 8%; text-align: center;
  background: repeating-linear-gradient(45deg, color-mix(in oklab, var(--bg2) 70%, #000) 0 6px, color-mix(in oklab, var(--bg2) 55%, #000) 6px 12px);
  color: var(--muted); font: 600 11px/1.25 var(--sans); text-transform: uppercase; letter-spacing: .06em; overflow: hidden;
}
.noimg.big { font-size: 15px; aspect-ratio: 3 / 4; border-radius: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 50;
  display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--bg) 92%, transparent), color-mix(in oklab, var(--bg) 55%, transparent));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--faint);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 27px; height: 28px; flex: none; color: var(--acc); margin-right: 2px; transition: color 1.2s; }
.brand-mark .bm-mid { fill: var(--acc2); transition: fill 1.2s; }
.brand-pixel { height: 20px; width: auto; color: var(--acc); filter: drop-shadow(0 0 10px color-mix(in oklab, var(--acc) 55%, transparent)); transition: color 1.2s; }
.brand-word, .brand-the { font: italic 600 calc(22px * var(--k-bar, 1))/1 var(--serif); letter-spacing: .01em; }
.brand-the { margin-right: -2px; }

.parser { position: relative; flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; align-items: center;
  background: color-mix(in oklab, #000 45%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; height: 40px; }
.parser:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 22%, transparent); }
.parser-prompt { font: 600 18px var(--mono); color: var(--acc); margin-right: 8px; }
.parser input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: calc(15px * var(--k-bar, 1)) var(--mono); caret-color: transparent; }
.parser input::placeholder { color: color-mix(in oklab, var(--ink) 35%, transparent); }
.parser-caret { width: 9px; height: 18px; background: var(--acc); animation: blink 1.05s steps(1) infinite; position: absolute; pointer-events: none; top: 11px; left: 34px; }
.parser:not(:focus-within) .parser-caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.parser-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 520px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 60px -20px #000; padding: 6px;
}
.pr-msg { font: calc(14px * var(--k-bar, 1))/1.5 var(--mono); padding: 10px 12px; color: var(--acc); white-space: pre-wrap; }
.pr-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 7px 10px; border-radius: 7px; border: 0; background: transparent; cursor: pointer; }
.pr-item[aria-selected="true"], .pr-item:hover { background: var(--faint); }
.pr-thumb { width: 34px; height: 42px; flex: none; border-radius: 4px; overflow: hidden; background: var(--card); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-text { display: flex; flex-direction: column; min-width: 0; }
.pr-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-meta { font-size: calc(12px * var(--k-bar, 1)); color: var(--muted); }
.pr-cmd .pr-thumb { display: grid; place-items: center; font: 700 13px var(--mono); color: var(--acc); }

.topnav { display: flex; gap: 6px; flex: none; }
.tb-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font-size: calc(14px * var(--k-bar, 1));
}
.tb-btn:hover, .tb-btn[aria-expanded="true"], .tb-btn[aria-pressed="true"] { border-color: var(--line); background: var(--faint); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--acc); color: #000; font: 700 11px/17px var(--sans); text-align: center; padding: 0 4px; }
#btn-sound .snd-on { display: none; }
#btn-sound[aria-pressed="true"] .snd-on { display: inline; }
#btn-sound[aria-pressed="true"] .snd-off { display: none; }

/* ---------- filters ---------- */
.filters {
  position: fixed; top: var(--top); left: 0; right: 0; z-index: 45; max-height: calc(100vh - var(--top) - 20px); overflow: auto;
  background: color-mix(in oklab, var(--panel) 94%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px #000; animation: drop .25s var(--ease);
}
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }
.filters-inner { max-width: 1200px; margin: 0 auto; padding: 18px 20px 20px; display: grid; gap: 14px; }
.fgroup h3 { margin: 0 0 8px; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { cursor: pointer; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .28em .8em; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.fchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--acc)); }
.fchip[aria-pressed="true"] { background: color-mix(in oklab, var(--c, var(--acc)) 28%, transparent); border-color: var(--c, var(--acc)); }
.fchip .n { color: var(--muted); font-size: 11px; }
.factions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- stage & timeline ---------- */
.stage { position: fixed; top: var(--top); left: 0; right: 0; bottom: 0; }
.tl { position: absolute; inset: 0 0 var(--mini) 0; overflow: hidden; cursor: grab; touch-action: none; outline: none; user-select: none; -webkit-user-select: none; }
.tl.dragging { cursor: grabbing; }
.tl:focus-visible { box-shadow: inset 0 0 0 2px var(--acc); }
.tl-world { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
html.no-js .tl, html.no-js .minimap, html.no-js .zoombar { display: none; }
html.js .fallback { display: none; }

/* cover-coloured glow behind the timeline (hovered game) */
.backdrop { position: absolute; inset: 0 0 var(--mini) 0; pointer-events: none; opacity: 0; transition: opacity .7s ease; overflow: hidden; }
.backdrop.on { opacity: 1; }
.bd-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.bd-layer.on { opacity: 1; }
.bd-layer::before { content: ""; position: absolute; inset: -12%; background: var(--bd-img) center / cover no-repeat;
  filter: blur(56px) saturate(1.35); opacity: .2; transform: scale(1.08); }
.bd-layer::after { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(55% 70% at var(--bx, 50%) 45%, color-mix(in srgb, var(--c1) 38%, transparent), transparent 72%),
    radial-gradient(45% 60% at calc(100% - var(--bx, 50%)) 95%, color-mix(in srgb, var(--c2) 26%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c1) 10%, transparent), transparent 60%); }
.bigyear { position: absolute; inset: 34% 0 auto 0; translate: 0 calc(-1 * var(--bg-up, 4vh)); display: grid; justify-items: center; pointer-events: none; opacity: var(--year-op, .1); color: var(--ink); transition: opacity .8s ease; }
.bigyear.away { opacity: 0; }
.bigyear .yr { grid-area: 1 / 1; font: 700 min(46vh, 400px) / .78 "Lora", Georgia, serif; letter-spacing: -.02em; font-variant-numeric: lining-nums; white-space: nowrap; }
.bigyear .yr-in { animation: yr-in .6s ease both; }
.bigyear .yr-out { animation: yr-out .6s ease both; }
@keyframes yr-in { from { opacity: 0; } }
@keyframes yr-out { to { opacity: 0; } }

/* era band */
.era-seg {
  position: absolute; top: 10px; height: 26px; border-radius: 6px; overflow: hidden; cursor: pointer;
  background: linear-gradient(90deg, color-mix(in oklab, var(--ec) 34%, transparent), color-mix(in oklab, var(--ec) 12%, transparent));
  border: 1px solid color-mix(in oklab, var(--ec) 45%, transparent); color: var(--ink); padding: 0;
}
.era-seg:hover { border-color: var(--ec); }
.era-label { position: absolute; top: 0; left: 0; font: 600 calc(11px * var(--k-tl, 1))/24px var(--sans); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; padding: 0 10px; }

/* tracks */
.tl-trackline { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 3%, var(--line) 97%, transparent); }
.tl-tracklabel { position: absolute; font: 600 10px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); white-space: nowrap; pointer-events: none; }

/* ruler */
.tk { position: absolute; width: 1px; background: var(--line); }
.tk.major { background: color-mix(in oklab, var(--ink) 40%, transparent); }
.tk-label { position: absolute; font: 500 calc(12px * var(--k-tl, 1)) var(--sans); color: var(--muted); transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.tk-label.major { color: var(--ink); font: 700 calc(13px * var(--k-tl, 1)) var(--sans); letter-spacing: .04em; }
.tk-label.decade { font-size: calc(15px * var(--k-tl, 1)); }

/* timeline cards */
.tl-card {
  position: absolute; top: 0; left: 0; padding: 0; border: 0; cursor: pointer; border-radius: 6px; overflow: hidden;
  background: var(--card); box-shadow: 0 6px 14px -10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07);
  transition: translate .45s var(--ease), width .45s var(--ease), height .45s var(--ease), scale .3s var(--ease), box-shadow .2s, opacity .3s, filter .3s;
}
.tl.live .tl-card { transition: scale .3s var(--ease), box-shadow .2s, opacity .3s, filter .3s; }
/* grow a little on hover / keyboard focus */
.tl-card:hover, .tl-card:focus-visible { scale: 1.14; }
.tl-card.mini:hover, .tl-card.mini:focus-visible { scale: 1.55; }
.tl-card img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; pointer-events: none; background: color-mix(in oklab, #000 40%, var(--card)); }
.tl-card { isolation: isolate; }
/* era colour wash (Admin → Site settings); fades away on hover to show the real cover */
/* the colour tint blends with the card's own cover only (isolation): blending with the moving background
   behind the timeline had to be redone on every frame of scrolling */
.tl-card { isolation: isolate; }
.tl-card .tint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color; opacity: var(--tint-op, 0); transition: opacity .35s ease; }
.tl-card:hover .tint, .tl-card:focus-visible .tint, .tl-card.hl .tint { opacity: 0; }
.tl-card:hover, .tl-card:focus-visible, .tl-card.hl { z-index: 5; box-shadow: 0 18px 34px -14px #000, 0 0 0 2px var(--acc), 0 0 30px -4px var(--acc); outline: none; }
.tl-card.hl { animation: pulse 1.4s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px var(--acc), 0 0 50px var(--acc); } }
.tl-card .cap {
  position: absolute; inset: auto 0 0 0; padding: 16px 7px 6px; font: 600 calc(11px * var(--k-tl, 1))/1.25 var(--sans); text-align: left; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.42), transparent); text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .2s;
}
.tl-world.caps .tl-card .cap { opacity: 1; }
.tl-card:hover .cap { opacity: 1; }
.tl-card .noimg { font-size: 10px; }
.tl-card.mini { border-radius: 2px; box-shadow: none; }
.tl-card.mini .noimg { font-size: 0; }
.tl-card.ghost { box-shadow: 0 6px 14px -10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07); }
.tl-card.type-newsletter, .tl-card.type-catalog { border-radius: 3px; }
.tl-card.type-memorabilia { border-radius: 50% / 12%; }
.tl-card.dim { opacity: .14; filter: grayscale(1); }
.tl-card.ph::before { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #ffcc33; z-index: 2; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.tl-world.mini-mode .tl-card.ph::before { display: none; }
/* "in the collection" check on covers */
.own { position: absolute; z-index: 3; top: 5px; left: 5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: #2fbf71; color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.own svg { width: 12px; height: 12px; }
.tl-card.mini .own { top: 3px; left: 3px; width: 13px; height: 13px; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.tl-card.mini .own svg { width: 9px; height: 9px; }
.tl-card.tiny .own { display: none; }   /* too small to read as a check: leave it out */
.tl-card.ghost .own { top: 3px; left: 3px; width: 14px; height: 14px; }
.tl-card.ghost .own svg { width: 9px; height: 9px; }
.feed-card .own { top: 8px; left: 8px; width: 22px; height: 22px; }
.feed-card .own svg { width: 14px; height: 14px; }
.tip-own { grid-column: 1 / -1; margin: -2px 0 0; font: 600 12px var(--sans); color: #6fdc9c; }
.tl-more {
  position: absolute; top: 0; left: 0; display: grid; place-items: center; cursor: pointer; border-radius: 6px;
  border: 1px dashed var(--line); background: color-mix(in oklab, var(--bg2) 40%, transparent); color: var(--ink);
  font: 700 13px var(--sans); transition: translate .45s var(--ease), width .45s var(--ease), height .45s var(--ease);
}
.tl.live .tl-more { transition: none; }
.tl-more:hover { border-color: var(--acc); color: var(--acc); }
.tl-pin { position: absolute; width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--c, var(--acc)); box-shadow: 0 0 8px var(--c, var(--acc)); pointer-events: none; }

/* hero card at the start of time, end card after it */
.hero-card, .end-card { position: absolute; top: 0; left: 0; }
.hero-card { width: min(560px, 82vw); padding: 0 36px; display: grid; gap: 40px; align-items: start; }
@media (min-width: 1180px) { .tl .hero-card { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); } }
.hero-side { display: grid; gap: 22px; padding-top: 34px; }
.story-card {
  display: grid; gap: 8px; padding: 22px 24px 20px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: linear-gradient(160deg, color-mix(in oklab, var(--acc) 16%, transparent), color-mix(in oklab, var(--bg2) 50%, transparent) 60%);
  border: 1px solid color-mix(in oklab, var(--acc) 30%, transparent); box-shadow: 0 24px 60px -30px #000;
  backdrop-filter: blur(8px); transition: transform .35s var(--ease), border-color .3s, box-shadow .3s;
}
.story-card:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 30px 70px -30px #000, 0 0 40px -12px var(--acc); }
.story-kicker { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--acc); }
.story-title { font: 600 calc(26px * var(--k-title, 1))/1.15 var(--serif); }
.story-excerpt { font: calc(16px * var(--k-text, 1))/1.65 var(--read); color: color-mix(in oklab, var(--ink) 80%, transparent);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.story-more { font: 500 14px var(--sans); color: var(--acc); }
.story-card:hover .story-more { text-decoration: underline; text-underline-offset: 3px; }
.lb-story .story-body { max-width: 760px; margin: 0 auto; padding-top: 10px; padding-bottom: 50px; }
.lb-story .lb-title { margin-bottom: 26px; }
.story-end { margin-top: 30px; }
.hero-kicker { margin: 0 0 12px; color: var(--acc); }
.kick-pixel { height: 12px; width: auto; }
.hero-title { font: 600 calc(clamp(38px, 5.2vw, 68px) * var(--k-title, 1))/1.02 var(--serif); margin: 0 0 12px; letter-spacing: -.01em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--acc) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline { margin: 0 0 14px; font: 500 15px var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--acc); }
.hero-intro { margin: 0 0 22px; font: calc(18px * var(--k-text, 1))/1.6 var(--read); color: color-mix(in oklab, var(--ink) 86%, transparent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0 0 20px; color: var(--muted); font-size: calc(13px * var(--k-ui, 1)); }
.hero-stats strong { color: var(--ink); font-size: calc(18px * var(--k-ui, 1)); margin-right: 3px; }
.otd { padding: 0 4px; }
.otd h2 { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0 0 8px; }
.otd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.otd a { color: var(--ink); text-decoration: none; }
.otd a:hover { color: var(--acc); }
.otd-year { font-family: inherit; font-weight: 700; font-size: 12px; color: var(--acc); margin-right: 6px; }   /* same letters as the title next to it */
.hero-hint { margin: 18px 0 0; font: calc(12px * var(--k-ui, 1)) var(--sans); color: var(--muted); }
.end-card { width: 420px; padding: 0 30px; color: var(--muted); }
.end-pixel { color: var(--acc); margin: 0 0 14px; }
.end-pixel-svg { height: 32px; width: auto; }
.fineprint { font-size: 12px; color: var(--muted); }

/* era caption */
.era-card {
  position: absolute; left: 16px; bottom: calc(var(--mini) + 52px); z-index: 6; width: min(360px, calc(100vw - 32px));
  padding: 12px 36px 12px 14px; border-radius: 10px; background: color-mix(in oklab, var(--panel) 90%, transparent);
  border: 1px solid var(--line); animation: drop .35s var(--ease);   /* no blur behind it: re-blurring the moving timeline on every frame made scrolling rough */
}
.era-years { margin: 0; font: 700 11px var(--mono); color: var(--acc); letter-spacing: .08em; }
.era-name { margin: 2px 0 4px; font: 600 17px/1.25 var(--serif); }
.era-text { margin: 0; font-size: 13px; color: var(--muted); }
.era-card.compact .era-text { display: none; }
.era-card.compact { width: auto; max-width: min(360px, calc(100vw - 32px)); }
.era-hide { position: absolute; top: 6px; right: 6px; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; }

/* zoom & minimap */
.zoombar { position: absolute; right: 16px; bottom: calc(var(--mini) + 14px); z-index: 6; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: color-mix(in oklab, var(--panel) 80%, transparent); backdrop-filter: blur(8px); }
.zbtn { border: 0; background: transparent; cursor: pointer; width: 40px; height: 36px; font-size: 20px; line-height: 1; }
.zbtn.zfit { font-size: 12px; font-weight: 600; width: 46px; border-left: 1px solid var(--faint); border-right: 1px solid var(--faint); }
.zbtn:hover { background: var(--faint); color: var(--acc); }
.minimap { position: absolute; left: 0; right: 0; bottom: 0; height: var(--mini); border-top: 1px solid var(--faint); background: color-mix(in oklab, #000 40%, transparent); }
.minimap canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: none; }

/* tooltip */
.tip {
  position: fixed; z-index: 60; width: 360px; max-width: calc(100vw - 24px); pointer-events: none; display: grid; grid-template-columns: 74px 1fr; gap: 12px;
  padding: 12px; border-radius: 12px; background: color-mix(in oklab, var(--panel) 94%, transparent); border: 1px solid var(--line);
  box-shadow: 0 24px 50px -16px #000; backdrop-filter: blur(12px);
  opacity: 0; translate: 0 6px; transition: opacity .22s ease, translate .22s ease;
}
.tip.on { opacity: 1; translate: 0 0; }
.tip-img { width: 74px; height: 94px; border-radius: 5px; overflow: hidden; background: var(--card); }
.tip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tip h3 { margin: 0; font: 600 calc(16px * var(--k-tl, 1))/1.25 var(--serif); }
.tip .tip-sub { margin: 1px 0 4px; font: italic calc(13px * var(--k-tl, 1))/1.3 var(--serif); color: var(--muted); }
.tip .tip-meta { margin: 0; font-size: calc(12px * var(--k-tl, 1)); color: var(--muted); }
.tip .tip-date { font-weight: 600; color: var(--acc); }
.tip .tip-sum { grid-column: 1 / -1; margin: 0; font-size: calc(12.5px * var(--k-tl, 1)); color: color-mix(in oklab, var(--ink) 80%, transparent); }
.tip .tip-kind { font: 600 calc(10px * var(--k-tl, 1)) var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--acc2); }

/* ---------- feed (vertical list mode, default on phones) ---------- */
.feed { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 80px; scroll-behavior: smooth; }
.feed-inner { max-width: 1100px; margin: 0 auto; }
.feed .hero-card { position: static; width: auto !important; max-width: 640px; padding: 36px 0 24px; }
.feed-era { margin: 40px 0 6px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.feed-era h2 { margin: 2px 0 4px; font: 600 calc(26px * var(--k-title, 1))/1.15 var(--serif); }
.feed-era p { margin: 0; color: var(--muted); max-width: 70ch; }
.feed-era .era-years { font-size: 12px; }
.feed-year { position: relative; padding-left: 74px; margin-top: 18px; content-visibility: auto; contain-intrinsic-size: auto 300px; }
.feed-year::before { content: ""; position: absolute; left: 30px; top: 0; bottom: -18px; width: 1px; background: var(--line); }
.feed-yh { position: sticky; top: 0; z-index: 2; margin-left: -74px; padding: 8px 0; display: flex; align-items: center; gap: 10px;
  background: color-mix(in oklab, var(--bg) 55%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 10px; padding-left: 10px; }
.feed-yh svg { height: 18px; width: auto; color: var(--acc); }
.feed-yh small { color: var(--muted); font-size: 12px; }
.feed-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.feed-card { display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: var(--ink); }
.feed-card .fc-img { aspect-ratio: 3 / 4; border-radius: 7px; overflow: hidden; background: var(--card); box-shadow: 0 12px 24px -14px #000; position: relative; transition: transform .25s var(--ease), box-shadow .25s; }
.feed-card:hover .fc-img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--acc), 0 18px 30px -14px #000; }
.feed-card img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; background: color-mix(in oklab, #000 40%, var(--card)); }
.feed-card .fc-title { font: 600 calc(14px * var(--k-tl, 1))/1.3 var(--serif); }
.feed-card .fc-meta { font-size: calc(12px * var(--k-tl, 1)); color: var(--muted); margin-top: -4px; }
.feed-card.rerelease .fc-img { opacity: .75; outline: 1px dashed var(--line); outline-offset: -1px; }
.feed-empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* server-rendered list (no JavaScript) */
.fallback { position: absolute; inset: 0; overflow: auto; padding: 24px; }
.list-view { max-width: 900px; margin: 0 auto; }
.list-title { font: 600 40px var(--serif); margin: 10px 0; }
.list-intro { color: var(--muted); font: 18px/1.6 var(--serif); }
.list-year h2 { font: 700 22px var(--mono); color: var(--acc); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.list-year ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.list-year small { display: block; color: var(--muted); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.lb-backdrop { position: absolute; inset: 0; background: color-mix(in oklab, #000 62%, transparent); backdrop-filter: blur(6px) saturate(.8); animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
/* the frame has the rounded corners and clips everything inside — including the scrollbar,
   which Windows browsers would otherwise draw as a square over the rounded corner */
.lb-frame {
  position: relative; display: flex; flex-direction: column; width: min(1180px, 100%); max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 40px 120px -30px #000; overflow: hidden; isolation: isolate;
  background: var(--panel); animation: pop .4s var(--ease);
}
.lb-dialog {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; outline: none;
  /* clip-path also catches the blurred, cover-coloured header (backdrop-filter), which slips past a normal rounded clip */
  clip-path: inset(0 round 17px);
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 96%, var(--bg2)), var(--panel) 380px);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.lb-dialog.tinted {
  background:
    radial-gradient(1100px 620px at 12% 0%, color-mix(in srgb, var(--lc1) 34%, transparent), transparent 66%),
    radial-gradient(900px 700px at 100% 18%, color-mix(in srgb, var(--lc2) 24%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--lc1) 12%, var(--panel)), color-mix(in srgb, var(--lc2) 9%, var(--panel)));
  background-attachment: local, local, scroll;
  transition: --lc1 .8s ease, --lc2 .8s ease;
}
.lb-entry { position: relative; }
.lb-entry > *:not(.lb-ambient) { position: relative; z-index: 1; }
.lb-entry > .lb-top { position: sticky; z-index: 4; }
.lb-entry > .lb-sections { position: sticky; z-index: 3; }
.lb-ambient { position: absolute; z-index: 0 !important; inset: 0 0 auto 0; height: 720px; pointer-events: none;
  background: center 20% / cover no-repeat; filter: blur(60px) saturate(1.4); opacity: .22; transform: scale(1.15);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.lb.closing .lb-frame { animation: pop .22s ease reverse forwards; }
.lb.closing .lb-backdrop { animation: fade .22s ease reverse forwards; }
.lb-loading { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; background: color-mix(in oklab, var(--panel) 60%, transparent); }
.lb.loading .lb-loading { display: grid; }
.lb-loading span { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-content.swap { animation: swapin .35s var(--ease); }
@keyframes swapin { from { opacity: 0; transform: translateX(var(--dx, 0)); } }
.lb-error { padding: 40px; text-align: center; }

.lb-top { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px;
  background: color-mix(in oklab, var(--panel) 96%, var(--bg2)); border-radius: 18px 18px 0 0; }
.lb-dialog.tinted .lb-top { background: color-mix(in srgb, color-mix(in srgb, var(--lc1) 14%, var(--panel)) 95%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.lb-dialog.tinted .lb-sections { background: color-mix(in srgb, color-mix(in srgb, var(--lc1) 10%, var(--panel)) 94%, transparent); }
.lb-crumbs { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: .2em .7em; border-radius: 999px; font: 600 calc(11px * var(--k-ui, 1))/1.6 var(--sans); text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.tag .ico { width: 14px; height: 14px; }
.tag-series { color: var(--ink); border-color: color-mix(in oklab, var(--series, var(--acc)) 70%, transparent); background: color-mix(in oklab, var(--series, var(--acc)) 18%, transparent); }
.tag-series:hover { background: color-mix(in oklab, var(--series, var(--acc)) 32%, transparent); }
.tag-ph { color: #1a1300; background: #ffcc33; border-color: #ffcc33; }
.lb-nav { display: flex; gap: 6px; }

.ed-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 12px; scrollbar-width: thin; }
.ed-tab { display: flex; align-items: center; gap: 9px; flex: none; text-align: left; cursor: pointer; padding: 6px 12px 6px 6px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in oklab, #000 25%, transparent); position: relative; max-width: 270px; }
.ed-tab[aria-selected="true"] { border-color: var(--acc); background: color-mix(in oklab, var(--acc) 14%, transparent); }
.ed-tab:hover { border-color: color-mix(in oklab, var(--acc) 60%, var(--line)); }
.ed-thumb { width: 36px; height: 45px; border-radius: 4px; overflow: hidden; background: var(--card); flex: none; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-text { display: flex; flex-direction: column; min-width: 0; }
.ed-name { font-weight: 500; font-size: calc(13px * var(--k-ui, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.lb-hero { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 34px; padding: 10px 34px 26px; align-items: start; }
.lb-cover { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--card); cursor: zoom-in;
  box-shadow: 0 30px 60px -24px #000, 0 0 0 1px rgba(255,255,255,.06); transition: transform .4s var(--ease); }
.lb-cover:hover { transform: translateY(-3px) rotate(-.4deg); }
.lb-cover img { display: block; width: 100%; height: auto; }
.lb-cover.swapping img { animation: coverflip .45s var(--ease); }
@keyframes coverflip { from { opacity: 0; transform: perspective(800px) rotateY(-20deg) scale(.96); } }
.lb-facts { min-width: 0; }
.lb-facts.wide { grid-column: 1 / -1; }
.kicker { margin: 0 0 4px; font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--acc); }
.lb-title { margin: 0; font: 600 calc(clamp(28px, 3.6vw, 46px) * var(--k-title, 1))/1.08 var(--serif); letter-spacing: -.01em; }
.lb-subtitle { margin: 6px 0 0; font: italic 400 calc(clamp(17px, 1.8vw, 22px) * var(--k-title, 1))/1.3 var(--serif); color: color-mix(in oklab, var(--ink) 75%, transparent); }
.ed-current { margin: 16px 0 0; display: inline-block; font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 22px; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.facts > div { min-width: 0; }
.facts .f-platforms dd { display: flex; flex-wrap: wrap; gap: 4px; }
.facts .f-platforms .chip { margin: 0; }
.facts dt { font: 600 calc(10.5px * var(--k-ui, 1)) var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: calc(15px * var(--k-ui, 1)); }
.facts dd a { color: var(--ink); }
.facts dd a:hover { color: var(--acc); }
.ed-notes-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.ed-notes-title { margin: 0 0 6px; font: 600 calc(10.5px * var(--k-ui, 1)) var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--acc); }
.ed-notes.prose { font: calc(15px * var(--k-text, 1))/1.6 var(--read); color: color-mix(in oklab, var(--ink) 78%, transparent); max-width: none; }
.ed-notes.prose p:last-child { margin-bottom: 0; }
.inside-box { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: color-mix(in oklab, var(--acc) 9%, transparent); border: 1px solid color-mix(in oklab, var(--acc) 30%, transparent); }
.inside-label { display: inline-flex; gap: 6px; align-items: center; font: 600 12px var(--sans); color: var(--acc); margin-right: 4px; }
.inside-list .chip { margin: 0; }
.completeness { margin: 18px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.completeness strong { color: var(--ink); font-weight: 500; }
.meter { width: 90px; height: 6px; border-radius: 3px; background: var(--faint); position: relative; overflow: hidden; flex: none; }
.meter::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: linear-gradient(90deg, var(--acc2), var(--acc)); border-radius: 3px; }
.lb-summary { margin: 16px 0 0; font: calc(17px * var(--k-text, 1))/1.55 var(--read); color: color-mix(in oklab, var(--ink) 85%, transparent); }

.lb-sections { position: sticky; top: 66px; z-index: 3; display: flex; gap: 4px; overflow-x: auto; padding: 8px 34px; margin-bottom: 8px;
  background: color-mix(in oklab, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-block: 1px solid var(--faint); scrollbar-width: none; }
.lb-sections a { flex: none; padding: 5px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.lb-sections a:hover { color: var(--ink); }
.lb-sections a.on { color: #0b0a10; background: var(--acc); }

.lb-body { padding: 4px 34px 30px; }
.lb-sec { padding: 22px 0 10px; scroll-margin-top: 120px; }
.lb-sec + .lb-sec { border-top: 1px solid var(--faint); }
.sec-title { margin: 0 0 16px; font: 600 calc(11.5px * var(--k-ui, 1)) var(--sans); text-transform: uppercase; letter-spacing: .18em; color: var(--acc); display: flex; align-items: center; gap: 12px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
h3.sub { font: 600 15px var(--serif); margin: 18px 0 10px; color: var(--muted); }

.prose { font: calc(18px * var(--k-text, 1))/1.75 var(--read); max-width: 70ch; color: color-mix(in oklab, var(--ink) 92%, transparent); }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 1.6em 0 .5em; color: var(--ink); }
.prose h2 { font-size: 1.45em; } .prose h3 { font-size: 1.2em; }
.prose p { margin: 0 0 1em; }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--acc); font-style: italic; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose img { border-radius: 8px; }
.prose .md-figure { margin: 1.6em 0; }
.prose .md-figure button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.prose .md-figure img { display: block; width: 100%; }
.prose .md-figure.fig-wide { margin-inline: -8%; }
.prose .md-figure.fig-left { float: left; width: 46%; margin: .35em 1.6em 1em 0; }
.prose .md-figure.fig-right { float: right; width: 46%; margin: .35em 0 1em 1.6em; }
.prose .md-figure.fig-small { width: 55%; margin-inline: auto; }
.prose .md-figure img { border-radius: 10px; box-shadow: 0 20px 40px -24px #000; }
.prose h2, .prose h3, .prose hr, .prose .yt { clear: both; }
.prose::after { content: ""; display: block; clear: both; }
.prose figcaption { font: 13.5px/1.5 var(--sans); color: var(--muted); margin-top: 8px; }
.story > p:first-of-type { display: flow-root; }
.story > p:first-of-type:not(:has(> em:only-child))::first-letter { float: left; font: 600 3.4em/.85 var(--serif); margin: .08em .1em 0 0; color: var(--acc); }
.prose .yt { margin: 1.6em 0; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.video { margin: 0; }
.video figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.video figcaption strong { color: var(--ink); font-weight: 500; }
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; display: block; width: 100%; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s, transform .5s var(--ease); }
.yt-play:hover img { opacity: 1; transform: scale(1.03); }
.yt-icon { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: color-mix(in oklab, var(--acc) 92%, #000); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.yt-icon::after { content: ""; position: absolute; left: 28px; top: 14px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #000; }
.yt-title { position: absolute; left: 12px; right: 12px; bottom: 10px; text-align: left; font: 500 14px var(--sans); color: #fff; text-shadow: 0 1px 6px #000; }
.yt-empty { display: grid; place-items: center; border: 1px dashed var(--line); background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 10px, transparent 10px 20px); color: var(--muted); font-size: 13px; }
.yt-empty span { display: grid; justify-items: center; gap: 6px; }
.yt-empty .ico { width: 30px; height: 30px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shot, .photo { position: relative; display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--card); cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s; }
.shot:hover, .photo:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--acc), 0 16px 30px -14px #000; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; image-rendering: pixelated; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-cap { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; font-size: 12px; text-align: left; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); }

.col-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.col-showing { font-size: 14px; color: var(--muted); }
.col-showing strong { color: var(--ink); font-weight: 500; }
.col-empty { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 18px 20px; border-radius: 14px;
  border: 1px dashed var(--line); color: var(--muted); font: italic 17px var(--serif); }
.col-empty .ico { width: 22px; height: 22px; color: var(--acc); opacity: .8; }
.items { display: grid; gap: 22px; }
.item { padding: 16px; border-radius: 14px; background: color-mix(in oklab, #000 22%, transparent); border: 1px solid var(--faint); }
.item.off { display: none; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 12px; }
.item-head h3 { margin: 0; font: 600 calc(19px * var(--k-title, 1)) var(--serif); }
.item-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: calc(13px * var(--k-ui, 1)); color: var(--muted); }
.item-meta .chip { margin: 0; color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 22px; margin: 14px 0 0; font-size: 14px; }
.item-details .wide { grid-column: 1 / -1; }
.item-details dt { font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.item-details dd { margin: 2px 0 0; }
.item-details .prose { font-size: 15px; }

.credits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.credits a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--faint); }
.credits a:hover { border-color: var(--acc); }
.credits small { display: block; color: var(--muted); font-size: 12.5px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: color-mix(in oklab, var(--acc) 22%, var(--card)); font: 700 17px var(--serif); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.cardgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.cardgrid.scroll { display: flex; overflow-x: auto; padding-bottom: 8px; }
.cardgrid.scroll li { flex: 0 0 120px; }
.card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.card-img { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--card); transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover .card-img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--acc); }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card-title { font: 600 13.5px/1.3 var(--serif); }
.card-meta { font-size: 11.5px; color: var(--muted); }

.lb-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 34px 30px; }
.lb-step { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.lb-step:hover { border-color: var(--acc); transform: translateY(-1px); }
.lb-step small { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.lb-step span { font: 600 16px var(--serif); }
.lb-step.next { text-align: right; grid-column: 2; }

.lb-panel .lb-hero.person-hero { grid-template-columns: 240px 1fr; }
.lb-cover-wrap.portrait .lb-cover { border-radius: 50%; aspect-ratio: 1; }
.lb-cover-wrap.portrait img { height: 100%; object-fit: cover; }
.avatar-big { aspect-ratio: 1; border-radius: 50%; font: 600 80px var(--serif); }
.series-hero { grid-template-columns: 1fr; }
.about { padding-top: 10px; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 24px 0; }
.stats li { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.stats strong { display: block; font: 600 26px var(--serif); color: var(--ink); }
.howto { line-height: 2.1; }

/* ---------- image viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(4, 4, 8, .96); animation: fade .25s; }
.v-stage { position: absolute; inset: 0 0 58px 0; overflow: hidden; cursor: zoom-out; touch-action: none; display: grid; place-items: center; }
.v-stage.dragging { cursor: grabbing; }
.v-stage img { cursor: grab; max-width: none; transform-origin: 0 0; position: absolute; left: 0; top: 0; user-select: none; -webkit-user-drag: none; }
.v-stage img.anim { transition: transform .3s var(--ease); }
.v-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-top: 1px solid rgba(255,255,255,.08); }
.v-count { font: 600 12px var(--mono); color: var(--acc); flex: none; }
.v-caption { flex: 1; min-width: 0; font-size: 14px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-tools { display: flex; gap: 6px; flex: none; }
.v-tools .iconbtn { font: 600 15px var(--sans); }
.v-nav { position: absolute; top: 50%; margin-top: -60px; width: 52px; height: 72px; border: 0; background: rgba(0,0,0,.4); color: #fff; cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.v-nav:hover { background: rgba(0,0,0,.7); color: var(--acc); }
.v-prev { left: 14px; } .v-next { right: 14px; }
.v-nav .ico { width: 26px; height: 26px; }

/* ---------- death / 404 page ---------- */
body.deathpage { display: grid; place-items: center; overflow: auto; background: #0000aa; padding: 20px; }
.death { max-width: 520px; background: #fff; color: #000; padding: 26px 30px; border: 4px double #aa0000; box-shadow: 10px 10px 0 #000; font: 18px/1.5 var(--mono); }
.death-pixel { color: #aa0000; margin: 0 0 14px; }
.death-num { height: 48px; width: auto; }
.death-text { margin: 0 0 12px; }
.death-btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.death-btns a, .death-btns button { font: 16px var(--mono); color: #000; background: #fff; border: 2px solid #000; padding: 4px 16px; cursor: pointer; text-decoration: none; }
.death-btns a:hover, .death-btns button:hover { background: #000; color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .tb-label { display: none; }
  .tb-btn { padding: 0 9px; }
  .brand-word { display: none; }
  .brand-pixel { height: 15px; }
  .tb-logo { display: none; }
  .logomark img { width: 52vw; }
  .topbar { gap: 8px; padding: 0 8px; }
  .topnav { gap: 0; }
  .tb-btn { padding: 0 7px; }
  .topnav a.tb-btn { display: none; }
  .parser { padding: 0 8px; }
  .parser input { font-size: 14px; }
  .hero-hint { display: none; }
  .lb-top { padding: 10px 12px; align-items: flex-start; }
  .tag { font-size: 10px; }
  .lb { padding: 0; }
  .lb-frame { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .lb-dialog { clip-path: none; }
  .lb-hero, .lb-panel .lb-hero.person-hero { grid-template-columns: 1fr; gap: 20px; padding: 6px 18px 20px; }
  .lb-cover-wrap { max-width: 300px; }
  .lb-cover-wrap.portrait { max-width: 180px; }
  .lb-body { padding: 4px 18px 24px; }
  .lb-sections { padding: 8px 18px; }
  .lb-foot { padding: 0 18px 24px; }
  .prose { font-size: 17px; }
  .prose .md-figure.fig-left, .prose .md-figure.fig-right, .prose .md-figure.fig-small { float: none; width: auto; margin: 1.4em 0; }
  .prose .md-figure.fig-wide { margin-inline: 0; }
  .era-card { display: none; }
  .tip { display: none !important; }
  .feed-year { padding-left: 0; }
  .feed-year::before { display: none; }
  .feed-yh { margin-left: 0; }
  .feed-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
  .v-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .parser-caret { animation: none; }
}

/* picture protection (Admin → Site settings): no dragging, selecting or long-press saving */
html.protect img, html.protect .viewer, html.protect .zoomable { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
html.protect #v-orig { display: none; }

/* ---------- variants ---------- */
.var-group { display: grid; gap: 14px; }
.var-none { margin: 0; padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); }

/* ---------- collector's checklist ---------- */
.ck-link { margin-left: 8px; font-size: 13px; color: var(--acc); }
.checklist .lb-title { margin: 0 0 6px; }
.ck-intro { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }
.ck-stats { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ck-stats li { padding: 14px 16px; border-radius: 12px; background: color-mix(in oklab, #000 22%, transparent); border: 1px solid var(--faint); display: grid; gap: 4px; }
.ck-stat-n { font: 700 26px/1 var(--serif); }
.ck-stat-n small { font: 500 14px var(--sans); color: var(--muted); }
.ck-stat-l { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.ck-stats .meter { margin-top: 6px; width: 100%; }
.ck-tools { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; margin-bottom: 8px;
  background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.ck-search { flex: 1 1 220px; }
.ck-search input, .ck-type select { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 14px var(--sans); }
.ck-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-type { flex: 0 1 200px; }
.ck-year { margin: 18px 0 6px; }
.ck-year-h { margin: 0 0 6px; font: 700 22px var(--serif); color: var(--acc); }
.ck-title { padding: 8px 0; border-bottom: 1px solid var(--faint); }
.ck-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 3px 0; }
.ck-mark { flex: none; align-self: center; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); box-sizing: border-box; }
.ck-mark.on { background: #2fbf71; border-color: #2fbf71; color: #fff; }
.ck-mark svg { width: 12px; height: 12px; }
.ck-name { font: 600 16px var(--serif); color: var(--ink); text-decoration: none; }
.ck-name:hover, .ck-ed:hover { color: var(--acc); }
.ck-sub { font-weight: 400; color: var(--muted); }
.ck-meta { font-size: 12.5px; color: var(--muted); }
.ck-eds, .ck-vars { list-style: none; margin: 2px 0 0; padding: 0 0 0 28px; }
.ck-ed { color: var(--ink); text-decoration: none; font-size: 14.5px; }
.ck-var { font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.ck-var .var-code { min-width: 20px; height: 20px; font-size: 11px; }
.ck-row.ck-dim { opacity: .35; }
.ck-empty { color: var(--muted); padding: 20px 0; }
.card-plat { margin-top: -4px; }

/* ---------- welcome window ---------- */
.welcome { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 22px; }
.wl-backdrop { position: absolute; inset: 0; background: color-mix(in oklab, #000 84%, transparent); backdrop-filter: blur(6px) saturate(.7); animation: fade .4s ease; }
.wl-dialog { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 44px); overflow: auto; box-sizing: border-box; padding: 0 40px 34px; text-align: center;
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 92%, var(--bg2)), var(--panel));
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 40px 120px -30px #000; outline: none; animation: pop .5s var(--ease); }
.wl-x { position: absolute; top: 12px; right: 12px; }
.wl-logo { display: block; max-width: 100%; height: auto; margin: 0 auto 22px; }
.wl-text { text-align: center; max-width: none; font-size: calc(16.5px * var(--k-text, 1)); line-height: 1.65; }
.wl-text > :first-child { margin-top: 0; }
.wl-actions { margin: 24px 0 0; }
.wl-go { font-size: 16px; padding: 12px 26px; }
.welcome.closing .wl-dialog { animation: pop .25s ease reverse forwards; }
.welcome.closing .wl-backdrop { animation: fade .25s ease reverse forwards; }
@media (max-width: 560px) { .wl-dialog { padding: 0 22px 26px; } }

/* full-text search results */
.pr-head { margin: 6px 10px 2px; padding-top: 8px; border-top: 1px solid var(--line); font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.pr-pending { padding: 8px 12px; font: 13px var(--mono); color: var(--muted); }
.pr-item.pr-hit { align-items: flex-start; }
.pr-snip { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: color-mix(in oklab, var(--ink) 80%, transparent); white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pr-snip mark { background: color-mix(in oklab, var(--acc) 35%, transparent); color: var(--ink); border-radius: 2px; padding: 0 1px; }

/* easter egg found */
.parser-results.egg .pr-msg { animation: egg-glow 1.2s ease; }
@keyframes egg-glow { 0% { background: color-mix(in oklab, var(--acc) 40%, transparent); } 100% { background: transparent; } }

/* ---------- PDF reader ---------- */
.lb-read { margin: 16px 0 0; }
.read-btn { display: inline-flex; align-items: center; gap: 8px; }
.read-btn .ico { width: 19px; height: 19px; }
.reader { position: fixed; inset: 0; z-index: 160; display: flex; flex-direction: column; background: color-mix(in oklab, #000 88%, var(--bg)); animation: fade .25s ease; }
.rd-bar { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--panel) 92%, transparent); }
.rd-title { flex: 1 1 auto; min-width: 0; font: 600 16px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-count { font: 500 13px var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.rd-tools { display: flex; gap: 6px; }
.rd-scroll { position: relative; flex: 1 1 auto; overflow: auto; outline: none; padding: 20px 16px 40px; }
.rd-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: min-content; }
.rd-pages > .rd-page { flex: none; background: color-mix(in oklab, #fff 8%, transparent); border-radius: 3px; box-shadow: 0 10px 30px -12px #000; overflow: hidden; }
.rd-pages canvas { display: block; user-select: none; -webkit-user-drag: none; }
.rd-msg { text-align: center; color: var(--muted); font: 14px var(--mono); margin-top: 30vh; }
.rd-frame { width: min(1100px, 100%); height: calc(100dvh - 120px); border: 0; border-radius: 6px; background: #fff; }
html.reading { overflow: hidden; }
@media (max-width: 560px) { .rd-count { display: none; } .rd-bar { gap: 8px; padding-left: 14px; } }
.lb-dialog, .rd-scroll, .wl-dialog { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--ink) 28%, transparent) transparent; }
.tip .tip-mf { white-space: nowrap; }
.lb-cover.no-zoom { cursor: default; }
/* titles on timeline covers are not shown — the hover card names the title */
.tl-card .cap { display: none !important; }

/* ---------- the Sierra Quiz — styled after the Leisure Suit Larry age quiz (AGI text windows) ---------- */
.qz-screen { position: relative; margin: 0 auto; max-width: 820px; padding: 0 0 26px; background: #000; border-radius: 12px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -40px #000; display: flex; flex-direction: column; gap: 22px; }
.qz-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;   /* faint CRT lines */
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.agi-status { display: flex; justify-content: space-between; gap: 16px; padding: 4px 14px; background: #fff; color: #000;
  font: 600 14px/1.4 var(--mono); letter-spacing: .02em; }
.qz-view { padding: 0 22px; }
.agi-box { position: relative; margin: 0 auto; max-width: 680px; padding: 22px 28px 20px; background: #fff; color: #000;
  font: 16px/1.55 var(--mono); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 8px #a80000, 0 18px 40px -18px #000; }
.agi-title { margin: 0 0 12px; font: 700 20px/1.25 var(--mono); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.agi-text { margin: 0 0 10px; }
.agi-small { margin: 0 0 10px; font-size: 13px; color: #555; }
.qz-meta { text-transform: uppercase; letter-spacing: .06em; }
.agi-q { margin: 0 0 14px; font: 700 18px/1.45 var(--mono); }
.agi-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.agi-opt { display: flex; gap: 10px; width: 100%; padding: 6px 10px; text-align: left; font: inherit; color: #000; background: transparent; border: 0; cursor: pointer; }
.agi-opt:hover:not(:disabled), .agi-opt:focus-visible { background: #000; color: #fff; outline: none; }   /* AGI-style inverted highlight */
.agi-opt:disabled { cursor: default; }
.agi-letter { flex: none; font-weight: 700; }
.agi-opt.is-right { background: #00a800; color: #fff; }
.agi-opt.is-wrong { background: #a80000; color: #fff; }
.agi-feedback { margin-top: 14px; padding: 10px 12px; border: 2px solid currentColor; font-size: 15px; }
.agi-feedback.ok { color: #006400; }
.agi-feedback.no { color: #a80000; }
.agi-feedback strong { margin-right: 4px; }
.agi-actions { margin: 16px 0 0; text-align: center; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.agi-btn { font: 700 15px var(--mono); padding: 8px 16px; color: #fff; background: #000; border: 2px solid #000; cursor: pointer; }
.agi-btn:hover, .agi-btn:focus-visible { background: #a80000; border-color: #a80000; outline: none; }
.agi-btn-ghost { background: #fff; color: #000; }
.agi-btn kbd, .qz-keys kbd { font: 600 11px var(--mono); padding: 1px 5px; border: 1px solid currentColor; border-radius: 3px; margin-left: 6px; opacity: .8; }
.qz-keys { margin: 12px 0 0; text-align: center; font: 13px var(--mono); color: #aaa; }
.qz-keys kbd { margin: 0 2px; }
.qz-name { margin: 16px 0 0; }
.qz-name label { display: block; font-weight: 700; margin-bottom: 6px; }
.qz-name-row { display: flex; gap: 8px; }
.qz-name input { flex: 1; min-width: 0; font: 16px var(--mono); padding: 7px 10px; border: 2px solid #000; background: #fff; color: #000; }
.qz-name input:focus { outline: 2px solid #a80000; outline-offset: 1px; }
.agi-error { margin: 8px 0 0; color: #a80000; font-size: 14px; }
.agi-hof { width: calc(100% - 44px); box-sizing: border-box; }
.hof-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.hof-list li { display: grid; grid-template-columns: 2.4em 1fr auto 4em; gap: 10px; padding: 3px 6px; font-size: 15px; }
.hof-list li:nth-child(1) { font-weight: 700; }
.hof-list li.me { background: #000; color: #fff; }
.hof-score { text-align: right; font-variant-numeric: tabular-nums; }
.hof-time { text-align: right; color: #666; font-variant-numeric: tabular-nums; }
.hof-list li.me .hof-time { color: #ccc; }
.hof-empty { display: block !important; text-align: center; color: #666; }
@media (max-width: 560px) {
  .qz-view { padding: 0 10px; }
  .agi-box { padding: 18px 18px 16px; font-size: 15px; }
  .agi-hof { width: calc(100% - 20px); }
  .hof-list li { grid-template-columns: 2em 1fr auto; } .hof-time { display: none; }
}

/* look chooser in the welcome window */
.wl-looks { margin: 22px 0 0; display: grid; justify-items: center; gap: 10px; }
.wl-looks-label { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.wl-looks-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* lane labels sit a little in from the left edge */
.tl-tracklabel { margin-left: 18px; }
.wl-logo.wl-logo-px { image-rendering: pixelated; }
/* the platforms of each copy's edition — only when all editions are listed */
.item-plat { display: none; }
.items.all-editions .item-plat { display: inline; }
/* variants are only listed with "Show all editions": they carry the same details as the copies */
[data-var-with-all] .item-plat { display: inline; }
.lb-sections a[hidden] { display: none !important; }
/* a summary written in several paragraphs */
.lb-summary p { margin: 0 0 .7em; }
.lb-summary p:last-child { margin-bottom: 0; }
/* the opening card text in paragraphs */
.hero-intro p, .list-intro p { margin: 0 0 .7em; }
.hero-intro p:last-child, .list-intro p:last-child { margin-bottom: 0; }

/* titles not in the collection: the title written on top of the cover artwork */
.tl-card.missing { container-type: inline-size; }
.tl-card .miss-t {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 8%; pointer-events: none;
  text-align: center; color: #fff; font: 700 clamp(7px, 11.5cqw, 18px)/1.15 var(--sans); letter-spacing: .01em;
  overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 8px rgba(0,0,0,.7);
}
.tl-card.mini .miss-t { display: none; }
body[data-miss-off] .tl-card .miss-t { display: none !important; }   /* Admin → Site settings: titles on missing covers off */
.item-details .prose p:last-child { margin-bottom: 0; }
html.list-mode #bigyear, html.list-mode #logomark { display: none !important; }   /* list view: no year or logo in the background */
/* list view: the year in the same letters as the rest of the list (the retro looks keep their pixel years) */
.feed-yh .fy { font: 600 calc(22px * var(--k-title, 1))/1 var(--serif); color: var(--acc); font-variant-numeric: lining-nums; }
.feed-yh svg { display: none; }
html.agi .feed-yh .fy, html.sci .feed-yh .fy { display: none; }
html.agi .feed-yh svg, html.sci .feed-yh svg { display: inline; }
/* the landing card scrolls on its own when the window is too short for it */
.tl .hero-card { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 24px; }

/* landing page: News */
.news { padding: 0 4px; }
.news h2 { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0 0 8px; }
.news ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.news a { color: var(--ink); text-decoration: none; display: grid; gap: 1px; }
.news a:hover .news-t { color: var(--acc); }
.news-date { font-size: 12px; font-weight: 700; color: var(--acc); }
.news-t { font-weight: 600; }
.news-x { font-size: 13px; color: var(--muted); line-height: 1.4; }
.news a.news-all { display: inline; font-size: 13px; color: var(--acc); }
.news-post { margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.news-post:last-child { border-bottom: 0; }
.news-title { margin: 0 0 10px; font: 600 calc(24px * var(--k-title, 1))/1.2 var(--serif); }

/* Modern: the search field sits in the middle of the page — the name on the left and the buttons on the right share the rest equally */
html:not(.agi):not(.sci) .topbar > .brand, html:not(.agi):not(.sci) .topbar > .topnav { flex: 1 1 0; min-width: max-content; }
html:not(.agi):not(.sci) .topbar > .topnav { justify-content: flex-end; }
html:not(.agi):not(.sci) .topbar > .parser { flex: 0 1 560px; }

/* the painted backdrop of the retro looks (agi.css / sci.css) — an element of its own, so moving it while
   travelling only touches this one element and not every cover on the timeline */
.stage > .scene { display: none; }

/* the era colours fade smoothly on the backgrounds; everything else simply takes the new colour */
/* the era colours cross-fade: a copy of the background in the old colours fades away on top of the new one
   (site.js setEra) — only its opacity changes, which costs the browser almost nothing */
.bg-base.bg-fading { transition: opacity 1.2s ease; will-change: opacity; }
.bg-base.bg-fading.out { opacity: 0; }

/* ---------- release trees: a title on top, lines down to each re-release ---------- */
.feed.tree-mode .feed-inner { max-width: 1240px; }
.tree-head { padding: 34px 0 6px; max-width: 70ch; }
.tree-head h2 { margin: 0 0 6px; font: 600 calc(28px * var(--k-title, 1))/1.15 var(--serif); }
.tree-head p { margin: 0 0 12px; color: var(--muted); }
.tree-head small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.tree-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.tree-switch input { accent-color: var(--acc); width: 16px; height: 16px; margin: 0; }
.tree-year .feed-yh { margin-bottom: 4px; }
/* the families of one year sit side by side, each as wide as its own tree */
.tree-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 34px; padding: 8px 0 28px; }
.tree-fam { --tl: color-mix(in oklab, var(--c, var(--acc)) 55%, var(--line)); max-width: 100%; }
.tree-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; }
.tree { display: flex; flex-direction: column; align-items: center; width: max-content; }
.tree .feed-card { width: 128px; text-align: center; }
.tree .tree-root { width: 150px; }
.tree .feed-card .fc-meta { margin-top: -3px; }
.tree-kids { list-style: none; margin: 0; padding: 22px 0 0; display: flex; justify-content: center; position: relative; }
/* the line from the title down to the branch */
.tree-kids::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--tl); }
.tree-kids > li { position: relative; padding: 22px 9px 0; }
/* each re-release hangs from the branch: half a branch to either side, and a short drop in the middle */
.tree-kids > li::before, .tree-kids > li::after { content: ""; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--tl); }
.tree-kids > li::before { right: 50%; }
.tree-kids > li::after { left: 50%; border-left: 2px solid var(--tl); }
.tree-kids > li:first-child::before, .tree-kids > li:last-child::after { border-top: 0; }
.tree-kids > li:first-child::after { border-top-left-radius: 8px; }
.tree-kids > li:last-child::before { border-top-right-radius: 8px; border-right: 2px solid var(--tl); }
.tree-kids > li:last-child::after { border-left: 0; }
.tree-kids > li:only-child::before { border: 0; }
.tree-kids > li:only-child::after { border-top: 0; border-left: 2px solid var(--tl); border-radius: 0; left: 50%; }
.tree-yr { font: 600 calc(15px * var(--k-tl, 1))/1 var(--serif); color: var(--acc); font-variant-numeric: lining-nums; }
.tree-kid .fc-img { width: 104px; margin: 0 auto; }
.tree .tree-what { color: var(--ink); opacity: .85; }
@media (max-width: 700px) {
  .tree .feed-card { width: 104px; }
  .tree .tree-root { width: 124px; }
  .tree-kid .fc-img { width: 86px; }
  .tree-kids > li { padding-inline: 6px; }
}
/* retro looks: square, solid lines */
html.agi .tree-fam, html.sci .tree-fam { --tl: var(--ink); }
html.agi .tree-kids > li::before, html.agi .tree-kids > li::after, html.sci .tree-kids > li::before, html.sci .tree-kids > li::after { border-radius: 0 !important; }
html.agi .tree-yr, html.sci .tree-yr { font-family: inherit; }
html.agi .tree-head h2, html.sci .tree-head h2 { font-family: inherit; }
html.agi .tree .feed-card, html.sci .tree .feed-card { width: 168px; }
html.agi .tree .tree-root, html.sci .tree .tree-root { width: 190px; }
html.agi .tree-kid .fc-img, html.sci .tree-kid .fc-img { width: 128px; }

/* phones: room for the search field next to the four buttons */
@media (max-width: 480px) {
  .brand-the { display: none; }
  #btn-look .look-word { display: none; }
}

/* the list without the opening card starts with a little room under the top bar */
.feed-top { height: 22px; }
.lb-crumbs [hidden] { display: none !important; }
.crumb-series { display: contents; }   /* its series tags line up with the other tags */

/* series page: the titles of the series as release trees */
.series-trees .tree-row { padding-top: 4px; }
.series-trees .tree-fam { --tl: color-mix(in oklab, var(--series, var(--acc)) 60%, var(--line)); }
.tree-root.outside .fc-img { opacity: .55; }
.tree-outside { font-style: italic; }

/* several branches under each other (wrapTrees in site.js): the line runs on from the middle of one branch
   down to the next, through the gap between its two middle re-releases */
.tree-kids.more { padding-bottom: 6px; }
.tree-kids.more::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid var(--tl); }
.tree-scroll { overflow-x: visible; }
.tree .tree-date { color: var(--ink); opacity: .8; }

/* the watermark over collection photos in the viewer (site.js applyImg) */
.v-stage img.v-wm { pointer-events: none; cursor: default; }

/* a fact a release doesn't have */
.facts .fact-none { opacity: .45; }

/* the watermark over the cover in the title card (Admin → Site settings → Collection photos → Also on cover pictures):
   lower-left corner, sized from the cover's width like the one in the photo viewer */
.lb-cover[data-wm] { position: relative; container-type: inline-size; }
.lb-cover[data-wm]::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: calc(var(--wm-m, 3) * 1cqw); bottom: calc(var(--wm-m, 3) * 1cqw); width: calc(var(--wm-w, 22) * 1cqw); aspect-ratio: 1 / var(--wm-ar, .3);
  background: var(--wm-url) no-repeat center / 100% 100%; opacity: var(--wm-op, .8);
}

/* Play online */
.lb-play { margin: 12px 0 0; }
.lb-play[hidden] { display: none; }
/* a small, quiet button: playing is a nice extra, the archive is the point */
.play-btn { font-size: .82rem; padding: .32em .85em; gap: .4em; }
.play-btn .ico { width: .9em; height: .9em; }
.play-btn .play-sys { font-size: 1em; opacity: .65; }
.play-btn .play-sys::before { content: "· "; }
.play-btn .play-sys:empty { display: none; }
.player { z-index: 170; }
.pl-stage { flex: 1 1 auto; min-height: 0; display: flex; background: #000; }
.pl-frame { flex: 1 1 auto; width: 100%; height: 100%; border: 0; background: #000; }

/* a long short-summary scrolls inside itself, ending level with the bottom of the cover */
.lb-summary-scroll { overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--ink) 30%, transparent) transparent;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent); mask-image: linear-gradient(#000 calc(100% - 36px), transparent); }
.lb-summary-scroll.at-end { -webkit-mask-image: none; mask-image: none; }
.lb-summary-scroll::-webkit-scrollbar { width: 6px; }
.lb-summary-scroll::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 3px; }

/* the heading of a title, person or series card: a little smaller, so the facts and summary get more room */
.lb-hero .lb-title { font-size: calc(clamp(21px, 2.2vw, 28px) * var(--k-title, 1)); }
.lb-hero .lb-subtitle { font-size: calc(clamp(15px, 1.3vw, 17px) * var(--k-title, 1)); }


/* title card facts: compact, so the summary beside the cover gets more room */
.lb-entry .facts { gap: 7px 18px; margin-top: 12px; padding-top: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.lb-entry .facts dt { font-size: calc(9.5px * var(--k-ui, 1)); letter-spacing: .12em; margin-bottom: 1px; }
.lb-entry .facts dd { font-size: calc(14px * var(--k-ui, 1)); line-height: 1.35; }
.lb-entry .facts .chip { padding-block: 1px; font-size: .88em; }
.lb-entry .ed-current { margin-top: 10px; }
.lb-entry .lb-summary { margin-top: 12px; }
.lb-entry .facts .chip { max-width: 100%; white-space: normal; vertical-align: top; }
/* notes on a collection item: no heading, smaller text */
.item-details .item-notes dd { margin: 0; }
.item-details .item-notes .prose { font-size: calc(13px * var(--k-text, 1)); line-height: 1.5; color: color-mix(in oklab, var(--ink) 80%, transparent); }
.lb-cover-wrap .lb-play { margin: 14px 0 0; }
.item-details .prose { max-width: none; }   /* notes and descriptions use the full width of the item */
/* a company in People: its logo with square corners, shown whole */
.lb-cover-wrap.company .lb-cover { border-radius: 14px; aspect-ratio: 1; }
.lb-cover-wrap.company img { height: 100%; object-fit: contain; }
@media (max-width: 860px) { .lb-cover-wrap.company { max-width: 180px; } }

/* the whole short summary in a window over the card */
.lb-summary-scroll { cursor: pointer; }
.sum-more { display: inline-flex; align-items: center; gap: .35em; margin: 8px 0 0; padding: 0; border: 0; background: none; color: var(--acc); font: 600 calc(12.5px * var(--k-ui, 1)) var(--sans); letter-spacing: .02em; cursor: pointer; }
.sum-more:hover { text-decoration: underline; }
.sum-more[hidden] { display: none; }
.sum-read { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 28px; background: rgba(4, 3, 10, .62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: srIn .2s ease; }
.sum-read.closing { animation: srIn .16s ease reverse forwards; }
@keyframes srIn { from { opacity: 0; } }
.sum-read-box { position: relative; width: min(720px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; outline: none;
  padding: 34px 40px 36px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink);
  box-shadow: 0 30px 80px -20px #000; animation: pop .25s var(--ease); }
.sum-read-x { position: absolute; top: 14px; right: 14px; }
.sum-read .kicker { margin: 0 0 4px; }
.sum-read-title { margin: 0 40px 18px 0; font-size: calc(clamp(22px, 2.4vw, 30px) * var(--k-title, 1)); }
.sum-read-text { margin: 0; font-size: calc(18px * var(--k-text, 1)); line-height: 1.7; }
@media (max-width: 860px) { .sum-read { padding: 12px; } .sum-read-box { padding: 26px 22px 28px; } }
/* the same window in the retro looks */
html.agi .sum-read-box { background: var(--e15); color: var(--e0); border: 4px solid var(--e0); border-radius: 0; box-shadow: none; }
html.sci .sum-read-box { background: var(--g3); color: #000; border: 3px solid; border-color: var(--g4) var(--g1) var(--g1) var(--g4); border-radius: 0; box-shadow: 0 0 0 1px #000; }
html.w95 .sum-read-box { background: var(--w-face); color: #000; border: 0; border-radius: 0; box-shadow: var(--w-out), 3px 3px 0 rgba(0, 0, 0, .3); }
html.agi .sum-more { color: var(--e1); } html.sci .sum-more { color: #000; } html.w95 .sum-more { color: #000080; }
