/* Fantastic Dizzy, an unofficial fan-game remake: the website's one stylesheet.
   The Mega Drive game's colours (forest, parchment, Dizzy's red gloves, star gold), its screens' 8x16 script font
   (static/dizzy.woff2, made by tools/web/make_font.py) and its pictures. */

@font-face {
  font-family: "Dizzy Parchment";
  src: url(dizzy.woff2) format("woff2");
  font-display: swap;
}

:root {
  --c-gold: #ffd84a; --c-amber: #f2a20c; --c-red: #d41b1b; --c-darkred: #8e0b0b; --c-leaf: #49a822; --c-leaf-dark: #2b6b14;
  --c-bark: #6b3a17; --c-parch: #e6b679; --c-parch-ink: #4a2208; --c-sky: #5cc8ff; --c-white: #fffdf4; --c-black: #000;

  --px: "Dizzy Parchment", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --bg: #10200c;
  --bg-2: #172d11;
  --surface: #1f3a17;
  --surface-2: #29491e;
  --line: #3e6a2d;
  --edge: #000;
  --text: #fbf3de;
  --muted: #c4d3ac;
  --link: #ffe27a;
  --link-hover: #fff;
  --accent: var(--c-gold);
  --warn: #ff6a5a;
  --shadow: 0 0 0 3px var(--edge), 6px 6px 0 3px var(--edge);
  --shadow-sm: 0 0 0 2px var(--edge), 4px 4px 0 2px var(--edge);
  --wrap: 1120px;
  --narrow: 800px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3e2bd; --bg-2: #ebd3a0; --surface: #fff4dc; --surface-2: #f8e4b9; --line: #a8773f;
    --edge: #3b1d07; --text: #2b1505; --muted: #6b4722; --link: #9e1208; --link-hover: #2b6b14; --accent: #9e1208;
    --warn: #b8190c; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3e2bd; --bg-2: #ebd3a0; --surface: #fff4dc; --surface-2: #f8e4b9; --line: #a8773f;
  --edge: #3b1d07; --text: #2b1505; --muted: #6b4722; --link: #9e1208; --link-hover: #2b6b14; --accent: #9e1208;
  --warn: #b8190c; color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.62 var(--sans); overflow-x: hidden; }
img, video, svg { max-width: 100%; height: auto; }
img { image-rendering: pixelated; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; }
code { font: .9em var(--mono); background: var(--surface-2); padding: .1em .35em; border-radius: 2px; overflow-wrap: anywhere; }
h1, h2, h3, h4 { line-height: 1.2; margin: 1.6em 0 .6em; }
p, ul, ol { margin: 0 0 1em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--c-gold); color: #000; padding: 8px 12px; }
.skip:focus { top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: var(--narrow); }
[hidden] { display: none !important; }

/* the game's script: whole multiples of its 16 px */
.px, .px-title, .px-h, .kicker, .btn, .nav a, .chip, .reveal__tag, .panel-name, .where__label, .area__name,
.fig__step, .clip__len, .summary__label, .warning__title, .toc__title, .dl__name, .ch__n, .stat__n, .tab, .strip__name,
.stars-place__name, .stars-place__n, .who__name, .obj__said, .door__title, .hero__word, .hero__line {
  font-family: var(--px); font-weight: 400; letter-spacing: 0; -webkit-font-smoothing: none; font-smooth: never;
}
.px-title { font-size: clamp(32px, 6vw, 48px); line-height: 1.15; margin: .15em 0 .4em; text-wrap: balance; }
.px-h { font-size: 32px; line-height: 1.2; margin: 2em 0 .7em; text-wrap: balance; }
.px-h--sm { font-size: 16px; }
.kicker { font-size: 16px; color: var(--accent); margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 64ch; }
.lede p { margin: 0; }

/* --- header ------------------------------------------------------------------------------------------------------ */
.top { position: sticky; top: 0; z-index: 30; background: #120a04; color: #fff; box-shadow: 0 3px 0 #000; }
.top::after { /* the forest floor's grass, as under the panel */
  content: ""; display: block; height: 8px;
  background: repeating-linear-gradient(90deg, #2f7d18 0 6px, #49a822 6px 9px, #2a6b14 9px 14px);
}
.top__in { max-width: var(--wrap); margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.brand img { width: 114px; height: auto; display: block; image-rendering: pixelated; }
.brand__tag { font: 11px/1.2 var(--sans); color: #c9b48f; max-width: 7em; text-transform: uppercase; letter-spacing: .08em; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { display: block; color: #fff; text-decoration: none; font-size: 16px; padding: 8px 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-gold); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--c-gold); }
.nav a.nav__dl { background: var(--c-red); color: #fff; box-shadow: inset -3px -3px 0 var(--c-darkred), 0 0 0 2px #000; margin-left: 8px; }
.nav a.nav__dl:hover { background: #ee3a2a; }
@media (max-width: 900px) {
  .brand__tag { display: none; }
  .top__in { flex-wrap: wrap; gap: 0; padding-bottom: 0; }
  .nav { width: 100%; margin: 0 -16px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { flex-wrap: nowrap; justify-content: flex-start; padding: 0 10px 6px; width: max-content; }
  .brand img { width: 86px; }
  html { scroll-padding-top: 120px; }
}

/* --- buttons and chips ------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-size: 16px; line-height: 1.1;
  background: var(--c-red); color: #fff; text-decoration: none; border: 0; cursor: pointer;
  padding: 13px 20px 12px; box-shadow: 0 0 0 3px #000, inset -4px -4px 0 var(--c-darkred), inset 4px 4px 0 #ff6a55, 6px 6px 0 3px #000;
  transition: transform .06s, box-shadow .06s;
}
.btn:hover { color: #fff; background: #ec2f22; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 3px #000, inset -4px -4px 0 var(--c-darkred), inset 4px 4px 0 #ff6a55, 2px 2px 0 3px #000; }
.btn code { background: none; font-size: 13px; padding: 0; color: #ffe; font-family: var(--mono); }
.btn--off, .btn--off:hover { background: var(--surface-2); color: var(--muted); cursor: default; box-shadow: 0 0 0 3px var(--line); }
.btn--big { font-size: 32px; padding: 16px 28px 14px; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: 0 0 0 3px var(--line), 6px 6px 0 3px var(--edge); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn__icon { font-size: .6em; animation: blink 1.1s steps(1) infinite; font-family: var(--sans); }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .btn__icon { animation: none; } * { scroll-behavior: auto !important; } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 16px; padding: 7px 12px 6px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 0; box-shadow: 0 0 0 2px var(--line);
}
.chip:hover { box-shadow: 0 0 0 2px var(--c-gold); }
.chip--check input { accent-color: var(--c-leaf); width: 16px; height: 16px; margin: -3px 0 0; }

/* --- the home page's hero: the title screen, the logo ------------------------------------------------------------ */
.hero { position: relative; background: #000; color: #fff; overflow: hidden; }
.hero__scene {
  position: relative; height: clamp(380px, 52vw, 680px);
  background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)), url(../../fantastic/media/ui/title.webp) center 35% / cover;
  image-rendering: pixelated;
}
.hero__inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px 16px clamp(18px, 4vw, 44px); text-align: center; }
.hero__logo { width: clamp(260px, 40vw, 520px); height: auto; filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .55)); }
.hero__word { margin: 0; font-size: clamp(32px, 5vw, 64px); line-height: 1; color: var(--c-gold); text-shadow: 4px 4px 0 #000, -2px -2px 0 #6a2b00; order: -1; }
.hero__tag { margin: 14px 0 0; max-width: 40ch; font-size: 1.1rem; text-shadow: 0 2px 6px #000, 0 0 2px #000; }
.hero__band { background: #120a04; color: #fff; text-align: center; padding: 26px 16px 34px; }
.hero__line { font-size: 16px; color: var(--c-gold); margin: 0 0 20px; }
.hero__sub { color: #e4d6bd; margin: 18px 0 0; font-size: 15px; }
.hero__alt { margin: 10px 0 0; font-size: 15px; }
.hero__alt a { color: #e4d6bd; }
@media (max-width: 600px) { .btn--big { font-size: 16px; padding: 14px 18px 12px; } .hero__scene { height: 360px; } }
.grassline { height: 14px; background:
  repeating-linear-gradient(90deg, #2f7d18 0 6px, #49a822 6px 9px, #2a6b14 9px 14px) 0 0 / 100% 8px no-repeat,
  linear-gradient(#4a2a12, #4a2a12) 0 8px / 100% 6px no-repeat; }

/* --- sections and cards ------------------------------------------------------------------------------------------ */
.band { padding: 56px 0; }
.band--alt { background: var(--bg-2); }
.card { background: var(--surface); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.pitch p { font-size: 1.12rem; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.feature-list li:last-child { border-bottom: 0; }
.card h3 { font-family: var(--px); font-weight: 400; font-size: 32px; margin: 0 0 10px; color: var(--accent); }

.doors { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.doors--small { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 22px; }
.door { display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .08s; }
.door:hover { transform: translate(-2px, -2px); color: var(--text); box-shadow: 0 0 0 3px var(--c-gold), 8px 8px 0 3px var(--edge); }
.door img { aspect-ratio: 5 / 3; object-fit: cover; width: 100%; display: block; border-bottom: 3px solid var(--edge); }
.door__body { padding: 16px 20px 20px; }
.door__title { font-size: 32px; line-height: 1.1; margin: 0 0 6px; color: var(--accent); }
.door__text { margin: 0; color: var(--muted); }
.door--spoil .door__title { color: var(--warn); }

/* screens and figures (320 x 224: 10 / 7) */
.shot { display: block; background: #000; box-shadow: var(--shadow-sm); line-height: 0; }
.fig { margin: 1.6em 0; }
.fig .shot img { width: 100%; aspect-ratio: 10 / 7; object-fit: fill; }
.fig--picture img { display: block; margin: 0 auto; max-width: 100%; }
.fig figcaption, .clip figcaption { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 15px; margin-top: 10px; }
.fig__step, .clip__len { font-size: 16px; color: var(--muted); white-space: nowrap; flex: none; }
.gallery { list-style: none; margin: 0 0 1.4em; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gallery .shot img { width: 100%; aspect-ratio: 10 / 7; object-fit: fill; }
.gallery span { display: block; color: var(--muted); font-size: 14px; margin-top: 10px; }
.clip { margin: 1.6em 0; }
.clip__screen { background: #000; box-shadow: var(--shadow-sm); line-height: 0; }
.clip video { width: 100%; height: auto; aspect-ratio: 10 / 7; object-fit: fill; background: #000; display: block; }

/* the item icons (pictures/items: 32 x 32, 10 a row) */
.ico {
  --x: 0; --y: 0; --k: 1; display: inline-block; vertical-align: middle; width: calc(32px * var(--k)); height: calc(32px * var(--k)); flex: none;
  background: url(../../fantastic/media/ui/items.webp) calc(var(--x) * -32px * var(--k)) calc(var(--y) * -32px * var(--k)) / calc(320px * var(--k)) auto no-repeat;
  image-rendering: pixelated;
}
.ico--big { --k: 2; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; box-shadow: var(--shadow); background: #120a04; color: #fff; }
.stat { padding: 18px 18px 16px; border-right: 2px dashed #4a3018; }
.stat:last-child { border-right: 0; }
.stat__n { display: block; font-size: 32px; white-space: nowrap; color: var(--c-gold); line-height: 1.1; }
.stat__l { font-size: 14px; color: #e4d6bd; }

/* --- page heads -------------------------------------------------------------------------------------------------- */
.page-head { background: var(--bg-2); padding: 40px 0 34px; border-bottom: 3px solid var(--edge); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 8px;
  background: repeating-linear-gradient(90deg, #2f7d18 0 6px, #49a822 6px 9px, #2a6b14 9px 14px); }
.page-head--story { background: linear-gradient(rgba(8, 16, 6, .55), rgba(8, 16, 6, .9)), url(../../fantastic/media/ui/title.webp) center 30% / cover; color: #fff; }
.page-head--story .lede { color: #e8dcc0; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

/* --- prose ------------------------------------------------------------------------------------------------------- */
.prose { padding-top: 38px; padding-bottom: 60px; }
.prose h2 { font: 32px/1.2 var(--px); margin-top: 2em; -webkit-font-smoothing: none; color: var(--accent); }
.prose h3 { font-size: 1.15rem; }
.prose > p:first-child { margin-top: 0; }
.prose li { margin-bottom: .35em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--px); font-weight: 400; font-size: 16px; background: var(--surface-2); }
blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--c-gold); color: var(--muted); }
.note { background: var(--surface); box-shadow: 0 0 0 2px var(--line); padding: 16px 18px; margin: 1.4em 0; }
.note > :last-child { margin-bottom: 0; }
.toc { background: var(--surface); box-shadow: 0 0 0 2px var(--line); padding: 14px 20px; margin-bottom: 2em; }
.toc__title { font-size: 16px; color: var(--muted); margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 1.3em; }

/* the parchment: the game's own (pictures/parchment) */
.parchment {
  position: relative; color: var(--c-parch-ink); padding: clamp(28px, 5vw, 56px) clamp(24px, 6vw, 64px);
  background: url(../../fantastic/media/ui/parchment.webp) center / 100% 100% no-repeat; image-rendering: pixelated; margin: 0 0 2em;
  filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .5));
}
.parchment p { font-size: 1.05rem; }
.parchment__sign { text-align: right; font-family: var(--px); font-size: 16px; margin: 0; }
.cast { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin: 1.4em 0; }
.cast figure { margin: 0; background: var(--surface); box-shadow: var(--shadow-sm); padding: 14px; text-align: center; }
.cast__pic { height: 180px; width: auto; max-width: 100%; object-fit: contain; }
.cast figcaption { color: var(--muted); font-size: 15px; margin-top: 8px; }
.cast figcaption strong { display: block; font: 32px/1.1 var(--px); color: var(--accent); }

/* warnings and gates */
.warning { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); box-shadow: 0 0 0 3px var(--warn), 6px 6px 0 3px var(--edge); padding: 18px 20px; margin: 0 0 2em; }
.warning__title { color: var(--warn); font-size: 32px; line-height: 1.1; margin: 0 0 8px; }
.warning > :last-child { margin-bottom: 0; }
.warning--slim { padding: 10px 14px; box-shadow: 0 0 0 2px var(--warn); }
.js .gated:not(.is-open) { display: none; }
.js [data-gate].is-open { display: none; }

/* --- hints ------------------------------------------------------------------------------------------------------- */
.search { position: relative; margin-top: 22px; max-width: 640px; }
.search input, .filter input {
  width: 100%; font: 17px var(--sans); padding: 14px 16px; background: var(--surface); color: var(--text);
  border: 0; box-shadow: 0 0 0 3px var(--edge), inset 3px 3px 0 rgba(0, 0, 0, .25); border-radius: 0;
}
.search input:focus, .filter input:focus { outline: none; box-shadow: 0 0 0 3px var(--c-gold); }
.search__results { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; }
.search__results:empty { display: none; }
.search__results a { display: block; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.search__results a:hover, .search__results a:focus { background: var(--surface-2); }
.search__results small { display: block; color: var(--muted); }
.areas { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.area a { display: block; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); transition: transform .08s; }
.area a:hover { transform: translate(-2px, -2px); box-shadow: 0 0 0 2px var(--c-gold), 6px 6px 0 2px var(--edge); color: var(--text); }
.area img { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-bottom: 2px solid var(--edge); }
.area__name { display: block; font-size: 32px; line-height: 1.1; padding: 10px 14px 0; }
.area__n { display: block; font-size: 14px; color: var(--muted); padding: 0 14px 12px; }
.area[data-late] .area__name::after { content: " \2605"; color: var(--c-gold); font-family: var(--sans); font-size: .6em; vertical-align: middle; }
.symptoms { display: grid; gap: 12px; }
.symptom { background: var(--surface); box-shadow: 0 0 0 2px var(--line); }
.symptom summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.symptom summary::-webkit-details-marker { display: none; }
.symptom summary::after { content: "+"; font-family: var(--sans); color: var(--accent); }
.symptom[open] summary::after { content: "\2212"; }
.symptom__body { padding: 0 18px 14px; }
.hint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hint-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); box-shadow: 0 0 0 2px var(--line); color: var(--text); text-decoration: none; }
.hint-list a:hover { box-shadow: 0 0 0 2px var(--c-gold); color: var(--text); }
.hl__where { font-size: 13px; line-height: 1.6; color: var(--muted); text-align: right; flex: none; max-width: 45%; }
.hint-list .is-solved a { opacity: .55; }
.hint-list .is-solved .hl__title::before { content: "\2713  "; color: var(--c-leaf); }
.panel-name { /* an area's name, on the parchment */
  display: inline-block; background: var(--c-parch); color: var(--c-parch-ink); font-size: 16px; line-height: 1.2; padding: 3px 10px 2px; margin: 0;
  box-shadow: 0 0 0 2px #000;
}
.room-group { margin: 28px 0; }
.room-group h3 { margin: 0 0 12px; }

/* a place's map: each area across its whole width */
.strips { display: grid; gap: 10px; margin: 26px 0 6px; }
.strip { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 12px; background: var(--surface); box-shadow: 0 0 0 2px var(--line); padding: 6px; color: var(--text); text-decoration: none; position: relative; }
a.strip:hover { box-shadow: 0 0 0 2px var(--c-gold); color: var(--text); }
.strip__name { font-size: 16px; line-height: 1.2; padding-left: 6px; }
.strip__pic { display: block; overflow-x: auto; line-height: 0; scrollbar-width: thin; }
.strip__pic img { height: 96px; width: auto; max-width: none; image-rendering: auto; }
.strip:not(.has-hints) { opacity: .75; }
.map__n { position: absolute; top: 8px; left: 186px; font: 16px/1 var(--px); background: var(--c-gold); color: #000; padding: 3px 6px 2px; box-shadow: 0 0 0 2px #000; }
@media (max-width: 640px) { .strip { grid-template-columns: 1fr; } .map__n { left: auto; right: 10px; } }
.map-note { font-size: 14px; }

/* a hint page */
.hint { padding-top: 30px; padding-bottom: 60px; }
.hint__problem { display: grid; gap: 22px; margin-bottom: 18px; }
.where { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: center; }
.where img { width: 240px; height: auto; aspect-ratio: 5 / 3; box-shadow: var(--shadow-sm); }
.where p { margin: 0 0 6px; }
.where__label { font-size: 16px; color: var(--muted); }
@media (max-width: 560px) { .where { grid-template-columns: 1fr; } .where img { width: 100%; } }
.problem-text { font-size: 1.12rem; }
.hint__tools { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 22px; }
.reveals { display: grid; gap: 14px; }
.reveal { background: var(--surface); box-shadow: 0 0 0 3px var(--edge), 5px 5px 0 3px var(--edge); }
.reveal > summary { display: flex; align-items: center; gap: 14px; padding: 12px 18px; cursor: pointer; list-style: none; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::after { content: "\25B6"; margin-left: auto; font-size: 12px; color: var(--accent); transition: transform .12s; }
.reveal[open] > summary::after { transform: rotate(90deg); }
.reveal__tag { font-size: 32px; line-height: 1; color: var(--accent); }
.reveal__hint { color: var(--muted); font-size: 15px; }
.reveal__body { padding: 14px 18px 4px; border-top: 2px dashed var(--line); }
.reveal__body > :last-child { margin-bottom: 14px; }
.reveal.solution .reveal__tag { color: var(--warn); }
.js .nudge.is-locked { opacity: .5; }
.js .nudge.is-locked > summary { cursor: not-allowed; }
.why { font: 32px var(--px); color: var(--accent); margin: 1.4em 0 .4em; }
.related { margin-top: 44px; }
.back { margin-top: 40px; }
.hint-link { font-weight: 600; }

/* objects and people */
.filter { display: flex; gap: 14px; align-items: center; margin: 30px 0 22px; flex-wrap: wrap; }
.filter input { flex: 1 1 260px; }
.objects, .people { list-style: none; margin: 0 0 60px; padding: 0; display: grid; gap: 12px; }
.js [data-filter-list]:not(.is-all) [data-filter-item]:not(.is-match) { display: none; }
.reveal--obj > summary, .reveal--who > summary { padding: 10px 16px; }
.obj__said { font-size: 16px; line-height: 1.4; }
.who__pic { width: 96px; height: 96px; object-fit: cover; background: #000; box-shadow: 0 0 0 2px var(--edge); flex: none; }
.who__pic--art { object-fit: contain; background: var(--c-parch); padding: 4px; }
.who__name { display: block; font-size: 32px; line-height: 1.1; }
.who__where { display: block; font-size: 14px; color: var(--muted); }

/* the stars page */
.stars-place > summary { padding: 8px 16px 8px 8px; }
.stars-place > summary img { width: 160px; height: 96px; object-fit: cover; box-shadow: 0 0 0 2px var(--edge); flex: none; }
.stars-place__name { font-size: 32px; line-height: 1.05; }
.stars-place__n { margin-left: auto; font-size: 32px; color: var(--c-gold); white-space: nowrap; }
.stars-place > summary::after { margin-left: 12px; }
.stars__list { list-style: none; padding: 0; margin: 0 0 1em; }
.stars__list li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.stars__n { color: var(--c-gold); font-weight: 700; }
@media (max-width: 560px) { .stars-place > summary img { width: 96px; height: 58px; } .stars-place__name, .stars-place__n { font-size: 16px; } }

/* walkthrough */
.summary { background: var(--surface); box-shadow: 0 0 0 2px var(--line); padding: 14px 18px; margin-top: 18px; }
.summary__label { font-size: 16px; color: var(--accent); margin: 0 0 2px; }
.summary p:last-child { margin: 0; }
.chapters { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; }
.chapters a { display: grid; grid-template-columns: 64px 1fr; gap: 2px 14px; padding: 14px 16px; background: var(--surface); box-shadow: 0 0 0 2px var(--line); text-decoration: none; color: var(--text); }
.chapters a:hover { box-shadow: 0 0 0 2px var(--c-gold); color: var(--text); }
.ch__n { grid-row: span 2; font-size: 48px; color: var(--accent); line-height: 1; }
.ch__t { font-weight: 700; }
.ch__s { color: var(--muted); font-size: 15px; }
.walk .fig { margin: 2em 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager a { display: block; padding: 14px 16px; background: var(--surface); box-shadow: 0 0 0 2px var(--line); text-decoration: none; color: var(--text); font-weight: 600; }
.pager a:hover { box-shadow: 0 0 0 2px var(--c-gold); }
.pager span { display: block; font: 16px var(--px); color: var(--muted); margin-bottom: 2px; font-weight: 400; }
.pager__next { text-align: right; }

/* downloads */
.dl { background: var(--surface); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 30px; }
.dl.is-yours { box-shadow: 0 0 0 3px var(--c-gold), 6px 6px 0 3px var(--edge); }
.dl__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.dl__name { font-size: 32px; margin: 0; }
.dl__badge { font-size: 13px; color: var(--muted); }
.dl.is-yours .dl__name::after { content: "  \2190 yours"; font-size: 16px; color: var(--c-gold); }
.dl__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 20px; margin: 16px 0; }
.dl__facts dt { font: 16px var(--px); color: var(--muted); }
.dl__facts dd { margin: 2px 0 0; }
.dl__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.dl--manual { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; box-shadow: 0 0 0 3px var(--c-gold), 6px 6px 0 3px var(--edge); }
.dl__cover { display: block; line-height: 0; }
.dl__cover img { width: 150px; height: auto; box-shadow: 0 0 0 3px var(--edge), 5px 5px 0 3px var(--edge); transform: rotate(-2deg); transition: transform .15s; image-rendering: auto; }
.dl__cover:hover img { transform: rotate(0deg) scale(1.03); }
.dl--manual .dl__body > p { margin: 12px 0 0; }
@media (max-width: 600px) { .dl--manual { grid-template-columns: 1fr; } .dl__cover img { width: 130px; } }
.sha summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.sha code { display: block; margin-top: 6px; font-size: 12px; }

/* --- the lightbox ------------------------------------------------------------------------------------------------ */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { display: block; max-height: 86vh; width: auto; box-shadow: 0 0 0 3px #000; }
.lightbox p { color: #ddd; margin: 10px 0 0; text-align: center; }
.lightbox button { position: absolute; top: 8px; right: 8px; font: 16px var(--px); background: var(--c-gold); border: 0; padding: 6px 10px 5px; cursor: pointer; }

/* --- footer ------------------------------------------------------------------------------------------------------ */
.foot { background: #120a04; color: #e4d6bd; margin-top: 0; font-size: 15px; }
.foot::before { content: ""; display: block; height: 14px; background:
  repeating-linear-gradient(90deg, #2f7d18 0 6px, #49a822 6px 9px, #2a6b14 9px 14px) 0 0 / 100% 8px no-repeat,
  linear-gradient(#4a2a12, #4a2a12) 0 8px / 100% 6px no-repeat; }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 32px 16px 44px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 36px; }
.foot__brand img { width: 114px; height: auto; }
.foot__unofficial { margin: 14px 0 8px; color: #f6ecd8; }
.foot__credit { margin: 0; color: var(--c-gold); font-family: var(--px); font-size: 16px; line-height: 1.3; }
.foot__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.foot__nav ul { list-style: none; margin: 0; padding: 0; }
.foot__nav li { margin-bottom: 8px; }
.foot__nav a { color: #f6ecd8; text-decoration: none; }
.foot__nav a:hover { color: var(--c-gold); text-decoration: underline; }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr; } .foot__nav { grid-template-columns: 1fr 1fr; } }
.room-group .hl__where { display: none; }
