/* Bundled typefaces, both under the SIL Open Font License 1.1 (licences in /fonts/). */
@font-face { font-family: 'Cinzel'; src: url(/fonts/cinzel-latin-var.woff2) format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(/fonts/eb-garamond-latin-var.woff2) format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(/fonts/eb-garamond-latin-var-italic.woff2) format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --night: #090812;
  --night-2: #110f1c;
  --night-3: #1a1729;
  --line: #2b2740;
  --paper: #f0e7d0;
  --paper-dim: #bdb4a6;
  --paper-faint: #8a849c;
  --brass: #e3ab4e;
  --brass-deep: #a87a2a;
  --blood: #d1503f;
  --calm: #8cc4b0;
  --moon: #b9c8f2;
  --serif: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page: 70rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.in-game, html.in-game body { overflow: hidden; }
body { margin: 0; background: var(--night); color: var(--paper); font: 1.0625rem/1.65 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--brass); text-underline-offset: 0.2em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: var(--night); padding: 0.5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  font: 600 1rem/1 var(--sans); letter-spacing: 0.02em; padding: 0.95rem 1.4rem; border-radius: 2px;
  border: 1px solid rgba(240, 231, 208, 0.22); background: rgba(9, 8, 18, 0.45); color: var(--paper); cursor: pointer;
  text-decoration: none; display: inline-block; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.btn:hover { border-color: var(--paper-dim); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brass); color: #1a1206; border-color: var(--brass); box-shadow: 0 0 0 0 rgba(227, 171, 78, 0); }
.btn.primary:hover { background: #f3c268; color: #1a1206; box-shadow: 0 0 34px 2px rgba(227, 171, 78, 0.35); }
.btn.big { font-size: 1.1rem; padding: 1.15rem 1.8rem; }
.btn.ghost { color: var(--paper-dim); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- top bar ---------- */
.top { position: absolute; z-index: 3; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 0; font-size: 0.9rem; }
.top-in { display: flex; justify-content: space-between; align-items: center; }
.top a { color: var(--paper-dim); text-decoration: none; }
.top a:hover { color: var(--paper); }
.mark { font-family: var(--serif); font-size: 1.1rem; color: var(--paper) !important; letter-spacing: 0.04em; }
.mark b { color: var(--brass); font-weight: 600; }
.top.flat { position: static; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100vh, 52rem); display: grid; align-items: end; overflow: hidden; background: #05040b; border-bottom: 1px solid var(--line); }
.hero-scene, .hero-night, .hero-glow, .hero-shade { position: absolute; inset: 0; }
.hero-scene svg { width: 100%; height: 100%; display: block; }
.hero-night { background: #1b2250; mix-blend-mode: multiply; pointer-events: none; }
.hero-glow { mix-blend-mode: screen; pointer-events: none; }
.hero-shade { pointer-events: none; background: linear-gradient(90deg, rgba(6, 5, 14, 0.82) 0%, rgba(6, 5, 14, 0.5) 38%, rgba(6, 5, 14, 0) 70%), linear-gradient(0deg, rgba(6, 5, 14, 0.85) 0%, rgba(6, 5, 14, 0) 34%); }
.hero-copy { position: relative; padding: 7rem 0 4rem; pointer-events: none; max-width: var(--page); text-shadow: 0 2px 30px #000; }
.hero-copy > * { pointer-events: auto; }
.kicker { font: 600 0.78rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.3rem; }
.hero h1 { font-size: clamp(3.4rem, 12vw, 8.5rem); letter-spacing: -0.025em; line-height: 0.95; }
.hero h1 .kicker { display: block; }
.sub { font: italic 400 clamp(1.25rem, 2.6vw, 1.9rem)/1.3 var(--serif); color: var(--moon); margin: 1.2rem 0 0; max-width: 28rem; }
.lede { max-width: 34rem; font-size: 1.12rem; margin: 1.4rem 0 2rem; color: var(--paper); }
.hero .row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.fine { font-size: 0.85rem; color: var(--paper-faint); margin: 1.3rem 0 0; }

/* ---------- sections ---------- */
section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
section + section { border-top: 1px solid var(--line); }
.label { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.1rem; }
h2 { font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.4rem; }
.cols { display: grid; gap: 2.5rem; }
@media (min-width: 54rem) { .cols { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.story p { font-family: var(--serif); font-size: 1.22rem; line-height: 1.62; }
.story p:first-child::first-letter { font-size: 3.5em; float: left; line-height: 0.82; padding: 0.07em 0.1em 0 0; color: var(--brass); }
.note {
  font-family: var(--serif); font-style: italic; color: #2a2118; background: linear-gradient(170deg, #f4ecd6, #e2d6b6);
  padding: 1.7rem 1.9rem 1.5rem; transform: rotate(-1.4deg); max-width: 23rem; box-shadow: 0 24px 60px #000, inset 0 0 40px rgba(120, 90, 40, 0.18);
}
.note ul { margin: 0.6rem 0 1rem; padding-left: 1.2rem; }
.note .hand2 { font-style: normal; font-weight: 700; letter-spacing: 0.03em; border-top: 1px solid #b9ad92; padding-top: 0.8rem; margin: 0; transform: rotate(0.6deg); }

.chapters { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.chapter { background: var(--night); padding: 1.5rem; display: grid; gap: 0.4rem 1.5rem; grid-template-columns: auto 1fr; align-items: start; transition: background 0.2s; }
.chapter:hover { background: var(--night-2); }
.chapter .num { font: 400 2.8rem/1 var(--serif); color: var(--brass); width: 2.6rem; }
.chapter.locked .num { color: var(--paper-faint); }
.chapter h3 a { color: var(--paper); text-decoration: none; }
.chapter h3 a:hover { color: var(--brass); }
.chapter p { margin: 0.35rem 0 0; color: var(--paper-dim); }
.chapter .status { font-size: 0.85rem; color: var(--paper-faint); letter-spacing: 0.02em; }
.chapter.done .status { color: var(--brass); }
.chapter .act { grid-column: 2; margin-top: 0.8rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.chapter .btn { padding: 0.7rem 1.1rem; font-size: 0.92rem; }
@media (min-width: 54rem) {
  .chapter { grid-template-columns: auto 1fr auto; align-items: center; padding: 1.7rem 2rem; }
  .chapter .act { grid-column: 3; margin: 0; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
}
.soon { margin-top: 1.5rem; color: var(--paper-faint); font-style: italic; font-family: var(--serif); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.7rem; }
.steps li { counter-increment: s; padding-left: 3.3rem; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -0.25rem; font: 400 2.1rem/1 var(--serif); color: var(--brass); }
.steps strong { display: block; font-family: var(--serif); font-size: 1.22rem; font-weight: 600; }
.steps span { color: var(--paper-dim); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0; }
.facts div { background: var(--night); padding: 1.1rem 1.2rem; }
.facts dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint); }
.facts dd { margin: 0.3rem 0 0; font-family: var(--serif); font-size: 1.15rem; }

.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.22rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brass); font-family: var(--sans); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0.8rem 0 0; color: var(--paper-dim); max-width: 46rem; }

footer { border-top: 1px solid var(--line); padding: 2.5rem 0 4rem; color: var(--paper-faint); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
footer a { color: var(--paper-dim); }

/* chapter pages */
.doc { padding: 1rem 0 5rem; max-width: 44rem; }
.doc h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin: 0.6rem 0 0.4rem; }
.doc .place { color: var(--paper-faint); font-style: italic; font-family: var(--serif); margin-bottom: 2rem; }
.doc h2 { font-size: 1.6rem; margin: 2.6rem 0 0.8rem; }
.doc h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; }
.doc ul:not(.finds), .doc ol { padding-left: 1.4rem; }
.doc ul:not(.finds) li, .doc ol li { margin-bottom: 0.55rem; }
.doc p a:not(.btn), .doc li a { color: var(--brass); }
.doc .story p { font-size: 1.15rem; }
.doc .shot { margin: 0 0 2rem; border: 1px solid var(--line); background: #05040b; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.doc .shot svg { width: 100%; height: 100%; display: block; }
.doc .shot::after { content: ''; position: absolute; inset: 0; mix-blend-mode: multiply; background: radial-gradient(circle at 60% 45%, #fff 0%, #fff1d2 14%, #1b2250 46%); }
.crumbs { font-size: 0.85rem; color: var(--paper-faint); padding-top: 1rem; }
.crumbs a { color: var(--paper-dim); }
.finds { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem; }
.finds li { border: 1px solid var(--line); padding: 0.7rem; display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.finds svg { width: 2.2rem; height: 2.2rem; flex: none; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; }

/* ============ the game ============ */
.game { position: fixed; inset: 0; z-index: 50; background: #04030a; display: flex; flex-direction: column; height: 100dvh; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.defs-host { position: absolute; width: 0; height: 0; overflow: hidden; }

.hud { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.75rem; background: linear-gradient(180deg, #14111f, #0c0a15); border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.hud-title { min-width: 0; flex: 1; line-height: 1.2; }
.hud-title small { display: block; color: var(--brass); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hud-title span { font-family: var(--serif); font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hud button { font: 600 0.76rem/1 var(--sans); color: var(--paper-dim); background: transparent; border: 1px solid var(--line); padding: 0.6rem 0.75rem; border-radius: 2px; cursor: pointer; white-space: nowrap; min-height: 2.4rem; transition: color 0.2s, border-color 0.2s, box-shadow 0.3s; }
.hud button:hover { color: var(--paper); border-color: var(--paper-faint); }
.hud button.icon { letter-spacing: 0.1em; min-width: 2.4rem; }
.hud button.moth:disabled { opacity: 0.4; }
.hud button.moth.ready { color: #1a1206; background: var(--brass); border-color: var(--brass); box-shadow: 0 0 18px rgba(227, 171, 78, 0.5); }
.meter { text-align: center; }
.meter small { display: block; font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 4px; }
.pips { display: flex; gap: 4px; justify-content: center; }
.pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--paper-faint); transition: background 0.3s, box-shadow 0.3s, border-color 0.3s; }
.pips.nerve i.on { background: var(--brass); border-color: var(--brass); box-shadow: 0 0 8px rgba(227, 171, 78, 0.9); }
.pips.near i { border-radius: 50% / 70%; width: 12px; }
.pips.near i.on { background: var(--blood); border-color: var(--blood); box-shadow: 0 0 9px rgba(209, 80, 63, 0.9); }
.dial { display: flex; align-items: center; gap: 0.5rem; }
.dial svg { width: 2.9rem; height: 2.9rem; }
.dial .rim { fill: #8f6f2c; }
.dial .face { fill: #efe6cf; }
.dial .ticks path { stroke: #2a2233; stroke-width: 2.4; fill: none; }
.dial .xiii { font: 700 13px var(--serif); fill: var(--blood); }
.dial .hand { fill: #1a1420; }
.dial .hub { fill: #8f6f2c; }
.dial b { font: 600 1.2rem/1 var(--serif); font-variant-numeric: tabular-nums; min-width: 3.1rem; }
.dial.low b { color: var(--blood); }
.dial.low .face { fill: #f2c9bf; }
.dial.hit b { animation: hit 0.6s; }
@keyframes hit { 0% { color: var(--blood); transform: scale(1.3); } 100% { transform: none; } }
@media (max-width: 44rem) { .hud .wide, .meter small { display: none; } .hud { gap: 0.45rem; } .dial svg { width: 2.4rem; height: 2.4rem; } }
@media (max-width: 24rem) { .hud-title small { display: none; } .dial b { display: none; } }

.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: crosshair; outline: none; background: #000; }
.world, .over { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.ly { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: transform; }
.over { pointer-events: none; }
.night, .glow, .grain, .vig { position: absolute; inset: 0; pointer-events: none; }
.night { mix-blend-mode: multiply; background: #1b2250; }
.glow { mix-blend-mode: screen; }
.grain { opacity: 0.13; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vig { background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.6) 100%); }
.stage.pulse .vig { animation: pulse 0.44s ease-out; }
@keyframes pulse { 0% { box-shadow: inset 0 0 110px 14px rgba(209, 80, 63, 0.38); } 100% { box-shadow: inset 0 0 110px 14px rgba(209, 80, 63, 0); } }
.stage.seen { animation: seen 0.6s; }
.stage.seen .glow { animation: seenflash 0.8s; }
@keyframes seen { 0%, 100% { transform: none; } 15% { transform: translate(-8px, 3px); } 35% { transform: translate(7px, -4px); } 55% { transform: translate(-4px, 2px); } 75% { transform: translate(3px, 0); } }
@keyframes seenflash { 0% { background-color: rgba(209, 80, 63, 0.5); } 100% { background-color: rgba(209, 80, 63, 0); } }

/* scene motion */
.spin, .spin-r, .swing, .sway, .bob, .t .ti { transform-box: fill-box; }
.spin { transform-origin: center; animation: spin 90s linear infinite; }
.spin-r { transform-origin: center; animation: spin 60s linear infinite reverse; }
.swing { transform-origin: 50% 0; animation: swing 3.2s ease-in-out infinite alternate; }
.sway { transform-origin: 50% 0; animation: sway 6s ease-in-out infinite alternate; }
.bob { animation: bob 5s ease-in-out infinite alternate; }
.tw { animation: tw 3.4s ease-in-out infinite alternate; }
.drift { animation: drift 40s ease-in-out infinite alternate; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swing { from { transform: rotate(-4.5deg); } to { transform: rotate(4.5deg); } }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes bob { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
@keyframes tw { from { opacity: 0.25; } }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(50px); } }

.t .ti { transform-origin: center; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s; }
.t.got .ti { transform: scale(2) translateY(-14px); opacity: 0; }
.t.final:not(.got) .ti { animation: arrive 1.6s ease-out; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

/* the Watcher */
.eyes { position: absolute; width: 0; height: 0; --px: 0px; --py: 0px; --hold: 0; }
.eyes i { position: absolute; top: -8px; width: 28px; height: 15px; border-radius: 50%; background: radial-gradient(circle at calc(50% + var(--px)) calc(50% + var(--py)), #0a0608 0 3.6px, #ffd88a 4.2px, #e98a2a 100%); box-shadow: 0 0 16px 4px rgba(255, 180, 80, 0.6); transition: transform 0.25s, opacity 0.4s; }
.eyes i:first-child { left: -34px; }
.eyes i:last-child { left: 6px; }
.eyes.n1 { scale: 1.35; }
.eyes.n2 { scale: 1.8; }
.eyes.warn i { transform: scaleY(0.14); opacity: 0.6; }
.eyes.open i { transform: scaleY(1); animation: blink 2.4s; }
@keyframes blink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.08); } }
.eyes.finale { scale: 1.2; }
.eyes.finale i { animation: none; }
.eyes.finale::after { content: ''; position: absolute; left: -66px; top: -66px; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(#ffd88a calc(var(--hold) * 360deg), rgba(255, 216, 138, 0.14) 0); -webkit-mask: radial-gradient(circle, transparent 60px, #000 61px); mask: radial-gradient(circle, transparent 60px, #000 61px); }
.eyes.finale.held i { box-shadow: 0 0 26px 8px rgba(255, 226, 160, 0.85); }

/* the moth */
.mothfx { position: absolute; width: 0; height: 0; transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1), top 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.mothfx i { position: absolute; left: -11px; top: -8px; width: 22px; height: 16px; animation: orbit 1.7s linear infinite; }
.mothfx i::before, .mothfx i::after { content: ''; position: absolute; top: 0; width: 11px; height: 16px; background: #efe2c2; border-radius: 80% 20% 60% 40%; box-shadow: 0 0 12px 3px rgba(255, 226, 160, 0.7); animation: flap 0.12s ease-in-out infinite alternate; }
.mothfx i::before { left: 0; transform-origin: right center; }
.mothfx i::after { right: 0; transform-origin: left center; border-radius: 20% 80% 40% 60%; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(0.25); } }
@keyframes orbit { from { transform: rotate(0) translateX(26px) rotate(0); } to { transform: rotate(360deg) translateX(26px) rotate(-360deg); } }

.fx { position: absolute; width: 0; height: 0; }
.fx::before { content: ''; position: absolute; border-radius: 50%; left: -32px; top: -32px; width: 64px; height: 64px; }
.fx.spark::before { border: 2px solid #ffd88a; box-shadow: 0 0 24px 4px rgba(255, 216, 138, 0.6); animation: ring 0.9s ease-out forwards; }
.fx.miss::before { border: 2px solid var(--blood); animation: ring 0.6s ease-out forwards; }
.fx.glint::before { left: -5px; top: -5px; width: 10px; height: 10px; background: #fff; box-shadow: 0 0 16px 6px rgba(255, 240, 200, 0.9); animation: glint 1.2s ease-in-out forwards; }
@keyframes ring { from { transform: scale(0.3); opacity: 1; } to { transform: scale(2.3); opacity: 0; } }
@keyframes glint { 0%, 100% { transform: scale(0); opacity: 0; } 40% { transform: scale(1); opacity: 0.9; } }

.banner { position: absolute; left: 50%; top: 1rem; transform: translate(-50%, -8px); max-width: calc(100% - 2rem); font: italic 600 1.2rem/1.3 var(--serif); text-align: center; padding: 0.6rem 1.2rem; background: rgba(9, 8, 18, 0.88); border: 1px solid var(--line); border-radius: 2px; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.banner.on { opacity: 1; transform: translate(-50%, 0); }
.banner.warn { color: #ffd88a; border-color: var(--brass-deep); }
.banner.bad { color: #ffa497; border-color: var(--blood); }
.banner.calm { color: var(--calm); }
.story-line { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%) rotate(-0.6deg); width: min(36rem, calc(100% - 1.5rem)); margin: 0; font: italic 1.08rem/1.45 var(--serif); text-align: center; color: #2a2118; background: linear-gradient(175deg, #f4ecd6, #e2d6b6); padding: 0.75rem 1.1rem; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.story-line.on { opacity: 1; }

/* the list */
.tray { list-style: none; margin: 0; padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)); display: flex; gap: 0.45rem; overflow-x: auto; background: linear-gradient(0deg, #14111f, #0c0a15); border-top: 1px solid var(--line); scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.tray li { flex: none; display: flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.75rem 0.3rem 0.4rem; border-radius: 2px; font-size: 0.84rem; color: #2a2118; background: linear-gradient(175deg, #f1e8d0, #dccfae); box-shadow: 0 2px 0 #a3966f; transition: opacity 0.4s, filter 0.4s; }
.tray .ic { width: 2rem; height: 2rem; display: grid; place-items: center; }
.tray .ic svg { width: 100%; height: 100%; }
.tray .ic.sil svg { filter: none; }
.tray .ic.sil { background: #2a2233; border-radius: 2px; width: 2.6rem; height: 2.6rem; padding: 3px; }
.tray .ic.q { font: 600 1.15rem var(--serif); color: #8a7c5c; }
.tray .nm.dim { color: #8a7c5c; font-style: italic; }
.tray.mode-shadow li:not(.done):not(.locked) .nm.dim { display: none; }
.tray.mode-shadow li:not(.done):not(.locked) { padding-right: 0.4rem; }
.tray .clue { font: italic 0.95rem/1.25 var(--serif); max-width: 13rem; padding: 0.25rem 0.2rem 0.25rem 0.35rem; }
.tray li.locked { background: transparent; box-shadow: none; border: 1px dashed var(--line); color: var(--paper-faint); }
.tray li.locked .nm.dim, .tray li.locked .ic.q { color: var(--paper-faint); }
.tray li.new { animation: glow 1.8s ease-out; }
@keyframes glow { from { box-shadow: 0 0 0 5px rgba(227, 171, 78, 0.7); } to { box-shadow: 0 2px 0 #a3966f; } }
.tray li.done { opacity: 0.4; filter: saturate(0.5); }
.tray li.done .nm { text-decoration: line-through; }
@media (min-width: 62rem) { .tray { justify-content: safe center; } }

/* cards */
.card { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 1.2rem; background: rgba(4, 3, 10, 0.93); overflow-y: auto; animation: cardin 0.6s; }
.card.cine { background: linear-gradient(90deg, rgba(4, 3, 10, 0.96) 0%, rgba(4, 3, 10, 0.88) 46%, rgba(4, 3, 10, 0.5) 100%); place-items: center start; padding-left: clamp(1.2rem, 7vw, 6rem); }
@media (max-width: 48rem) { .card.cine { background: rgba(4, 3, 10, 0.93); padding-left: 1.2rem; } }
.card.cold { background: #020206; text-align: center; }
@keyframes cardin { from { opacity: 0; } }
.card-in { width: min(100%, 35rem); padding: 1rem 0; }
.card .eyebrow { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass); margin-bottom: 1rem; }
.card h2 { font-size: clamp(2.1rem, 7vw, 3.5rem); margin-bottom: 0.3rem; }
.card .place { font: italic 1.02rem var(--serif); color: var(--moon); margin-bottom: 1.5rem; }
.card .prose p { font: 1.16rem/1.6 var(--serif); margin-bottom: 0.9em; }
.card .prose.stagger p { opacity: 0; animation: line 0.9s ease-out forwards; }
.card .prose.stagger p:nth-child(1) { animation-delay: 0.3s; }
.card .prose.stagger p:nth-child(2) { animation-delay: 1.3s; }
.card .prose.stagger p:nth-child(3) { animation-delay: 2.3s; }
.card .prose.stagger p:nth-child(4) { animation-delay: 3.3s; }
.card .prose.stagger p:nth-child(5) { animation-delay: 4.3s; }
.card .prose.stagger p:nth-child(6) { animation-delay: 5.3s; }
.card .prose.stagger.slow p:nth-child(2) { animation-delay: 2s; }
.card .prose.stagger.slow p:nth-child(3) { animation-delay: 4s; }
.card .prose.stagger.slow p:nth-child(4) { animation-delay: 6s; }
.card .prose.stagger.slow p:nth-child(5) { animation-delay: 8s; }
.card .prose.stagger.slow p:nth-child(6) { animation-delay: 10s; }
@keyframes line { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card .rules { margin: 1.4rem 0; padding: 1rem 1rem 1rem 2.2rem; border-left: 2px solid var(--brass-deep); background: rgba(240, 231, 208, 0.04); color: var(--paper-dim); font-size: 0.93rem; }
.card .rules li + li { margin-top: 0.45rem; }
.card .row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.card .row.col { flex-direction: column; align-items: stretch; max-width: 22rem; }
.card .row.centre { justify-content: center; }
.card .row.choice { opacity: 0; animation: line 1s ease-out 10.5s forwards; }
.card .score { color: var(--paper-dim); margin: 0.8rem 0 1.4rem; }
.candles { letter-spacing: 0.3em; color: var(--line); margin-right: 0.6rem; }
.candles .lit { color: var(--brass); text-shadow: 0 0 12px rgba(227, 171, 78, 0.9); }
.fourteen { font: 600 clamp(2.4rem, 8vw, 4rem)/1 var(--serif); color: var(--blood); margin: 1.4rem 0 0.4rem; opacity: 0; animation: line 1.2s ease-out 11s forwards; }
.next-season { font: italic 1.3rem var(--serif); color: var(--brass); margin: 0; opacity: 0; animation: line 1.2s ease-out 12.5s forwards; }

.toll { font: 600 clamp(5rem, 22vw, 11rem)/1 var(--serif); color: var(--paper); min-height: 1.1em; margin: 1.5rem 0; letter-spacing: 0.04em; }
.toll.ring { animation: toll 0.6s ease-out; }
.toll.thirteen { color: var(--blood); text-shadow: 0 0 60px rgba(209, 80, 63, 0.7); }
.toll.thirteen.ring { animation: toll 3s ease-out; }
@keyframes toll { 0% { transform: scale(1.18); opacity: 0.2; } 30% { opacity: 1; } 100% { transform: scale(1); } }
.card.cold .row { justify-content: center; }

/* holding the last object */
.card.inspect { perspective: 1400px; }
.card.inspect .card-in { width: min(100%, 24rem); }
.held { position: relative; aspect-ratio: 3 / 4; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.3, 0.1, 0.2, 1); animation: lift 0.8s ease-out; }
.held.turned { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: linear-gradient(165deg, #f5edd8, #dccfae); color: #2a2118; padding: 1.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 30px 80px #000, inset 0 0 60px rgba(120, 90, 40, 0.22); }
.face.backside { transform: rotateY(180deg); }
.face .big { width: min(72%, 13rem); }
.face .big svg { width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(40, 20, 0, 0.35)); }
.face .eyebrow { color: #8a6a2a; margin: 1rem 0 0.6rem; }
.hand { font: italic 1.12rem/1.5 var(--serif); margin: 0 0 0.6rem; }
.hand.loud { font: 700 1.25rem/1.35 var(--serif); font-style: normal; letter-spacing: 0.02em; transform: rotate(-1.5deg); margin-top: 0.8rem; }
@keyframes lift { from { transform: translateY(40px) scale(0.8); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- additions: daily bell, epilogue, journal, modes, containers ---------- */
html.in-journal, html.in-journal body { overflow: hidden; }
.ending-line { font: italic 1rem var(--serif); color: var(--moon); margin: 0.9rem 0 0; }
.daily { background: linear-gradient(180deg, #0d0b18, var(--night)); }
.bellno { font: 600 clamp(2.4rem, 7vw, 4.2rem)/1 var(--serif); color: var(--brass); margin: 0; }
.big-p { font: 1.22rem/1.6 var(--serif); }
.daily .status { color: var(--paper-faint); font-size: 0.95rem; }
.daily .row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.modes-note { color: var(--paper-dim); font-size: 0.98rem; margin-bottom: 1.6rem; }
.chapter.epilogue { margin-top: 1rem; border: 1px solid var(--line); }
.chapter.epilogue:not(.locked) { border-color: var(--brass-deep); box-shadow: 0 0 40px rgba(227, 171, 78, 0.12); }

.game.no-clock .dial, .game.no-watcher .meter.watcher { display: none; }
.hud button[hidden] { display: none; }
@media (max-width: 34rem) { .hud .wide2 { display: none; } }
.banner.toll { font: 600 2.4rem/1 var(--serif); font-style: normal; letter-spacing: 0.08em; padding: 0.5rem 1.4rem; }

.t.taken .ti { transform: translateY(-40px) scale(0.6); opacity: 0; transition-duration: 1.4s; }
.t.shown .ti { animation: arrive 0.9s ease-out; }
.tray li.taken { opacity: 0.3; filter: grayscale(1); }
.tray li.taken .nm { text-decoration: line-through wavy var(--blood); }
.fx.locked::before { border: 2px dashed #ffd88a; animation: ring 0.7s ease-out forwards; }

.modes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.4rem; }
.modes .mode { font: 600 0.8rem/1 var(--sans); padding: 0.55rem 0.9rem; border: 1px solid var(--line); background: transparent; color: var(--paper-dim); border-radius: 2px; cursor: pointer; }
.modes .mode.on { background: var(--paper); color: #1a1206; border-color: var(--paper); }
.modes p { flex-basis: 100%; margin: 0.3rem 0 0; font-size: 0.86rem; color: var(--paper-faint); }
.next-line { font: italic 1rem/1.5 var(--serif); color: var(--paper-dim); margin: 0.5rem 0 0; opacity: 0; animation: line 1.2s ease-out 13.5s forwards; }

.journal { position: fixed; inset: 0; z-index: 70; background: rgba(4, 3, 10, 0.86); overflow-y: auto; padding: clamp(0.6rem, 3vw, 2.5rem); animation: cardin 0.3s; }
.journal-in { max-width: 46rem; margin: 0 auto; color: #2a2118; background: linear-gradient(175deg, #f5edd8, #e0d3b2); padding: clamp(1.2rem, 4vw, 2.6rem); box-shadow: 0 30px 90px #000, inset 0 0 80px rgba(120, 90, 40, 0.2); }
.journal header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.journal .eyebrow { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: #8a6a2a; margin-bottom: 0.6rem; }
.journal h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 0.6rem; }
.journal .btn.ghost { color: #2a2118; border-color: #8a7c5c; background: transparent; }
.jfacts { font: italic 0.98rem var(--serif); color: #6a5a3a; border-bottom: 1px solid #b9ad92; padding-bottom: 1rem; }
.journal h3 { font-size: 1.4rem; margin: 1.8rem 0 0.8rem; }
.journal h3 small { display: block; font: 600 0.68rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: #8a6a2a; margin-bottom: 0.4rem; }
.jpage ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.jpage li { display: grid; grid-template-columns: 3rem 1fr; gap: 0.9rem; align-items: start; }
.jpage .ic { width: 3rem; height: 3rem; display: grid; place-items: center; }
.jpage .ic svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(40, 20, 0, 0.3)); }
.jpage .ic.q { font: 600 1.4rem var(--serif); color: #a3966f; border: 1px dashed #a3966f; }
.jpage b { font-family: var(--serif); font-size: 1.08rem; }
.jpage p { margin: 0.1rem 0 0; font: italic 1rem/1.45 var(--serif); }
.jpage em { display: block; margin-top: 0.3rem; font: 700 0.95rem var(--serif); font-style: normal; letter-spacing: 0.02em; }
.jpage li.gap b { color: #a3966f; font-weight: 400; font-style: italic; }
.journal .empty { font: italic 1.1rem var(--serif); margin-top: 1.5rem; }
.theory .hint { font: italic 0.95rem var(--serif); color: #6a5a3a; }
.theory fieldset { border: 0; border-top: 1px solid #b9ad92; margin: 0; padding: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.theory legend { font: 600 1.1rem var(--serif); padding: 0; margin-bottom: 0.6rem; float: left; width: 100%; }
.theory .pick { font: 1rem var(--serif); padding: 0.5rem 0.9rem; border: 1px solid #8a7c5c; background: transparent; color: #2a2118; border-radius: 2px; cursor: pointer; }
.theory .pick.on { background: #2a2118; color: var(--paper); border-color: #2a2118; }
.theory .pick:disabled { cursor: default; opacity: 0.75; }
.theory .verdict { flex-basis: 100%; margin: 0.2rem 0 0; font: italic 0.95rem var(--serif); }
.theory .verdict.yes { color: #2f6e4a; }
.theory .verdict.no { color: #a53a2c; }

/* ============ game skin ============
   Everything above sets the layout. This block is the look: engraved brass and iron plates
   for anything you press, framed panels for anything you read, and no plain web type. */
:root {
  --caps: 'Cinzel', Copperplate, 'Copperplate Gothic Bold', 'Copperplate Gothic', 'Perpetua Titling MT', 'Felix Titling', 'Trajan Pro', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: var(--serif);
  --plate: linear-gradient(180deg, #f8d68a 0%, #e3ab4e 45%, #b47f2c 100%);
  --iron: linear-gradient(180deg, #2c2743 0%, #161324 100%);
  --rivet: #7d74a0;
}
body { font: 1.25rem/1.6 var(--serif); }

/* cursors */
html { cursor: url(/img/cur-arrow.svg) 4 3, auto; }
a, button, summary, label, .btn, .hud button, .modes .mode, .theory .pick, .faq summary { cursor: url(/img/cur-press.svg) 4 3, pointer; }
.btn:disabled, button:disabled { cursor: url(/img/cur-arrow.svg) 4 3, not-allowed; }
.stage { cursor: url(/img/cur-light.svg) 16 16, crosshair; }
.stage.over-thing { cursor: url(/img/cur-take.svg) 20 20, pointer; }

/* engraved lettering for every small label */
.kicker, .label, .card .eyebrow, .journal .eyebrow, .hud-title small, .meter small, .facts dt, .journal h3 small, .chapter .status, .fine { font-family: var(--caps); }
.label, .card .eyebrow { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; letter-spacing: 0.22em; }
.label::before, .card .eyebrow::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--brass); transform: rotate(45deg); box-shadow: 0 0 10px rgba(227, 171, 78, 0.7); }
.label::after, .card .eyebrow::after { content: ''; flex: 0 1 5rem; height: 1px; background: linear-gradient(90deg, var(--brass-deep), transparent); }
.face .eyebrow { display: block; }
.face .eyebrow::before, .face .eyebrow::after { display: none; }
.kicker { font-size: 0.86rem; letter-spacing: 0.26em; text-shadow: 0 0 18px rgba(227, 171, 78, 0.5), 0 2px 8px #000; }
.fine { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.chapter .status { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* buttons: an iron plate by default, a brass plate for the main action */
.btn { --rivets: radial-gradient(circle at 8px 8px, var(--rivet) 0 1.4px, transparent 2.1px), radial-gradient(circle at calc(100% - 8px) 8px, var(--rivet) 0 1.4px, transparent 2.1px), radial-gradient(circle at 8px calc(100% - 8px), var(--rivet) 0 1.4px, transparent 2.1px), radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), var(--rivet) 0 1.4px, transparent 2.1px); }
.btn {
  position: relative; font: 700 0.92rem/1 var(--caps); letter-spacing: 0.15em; text-transform: uppercase; padding: 1.1rem 1.7rem 1rem; border-radius: 3px;
  border: 1px solid #05040b; color: var(--brass); background: var(--rivets), var(--iron); text-shadow: 0 -1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(227, 171, 78, 0.3), 0 4px 0 #05040b, 0 10px 22px rgba(0, 0, 0, 0.55);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s, color 0.15s;
}
.btn:hover { color: #ffe2a6; border-color: #05040b; filter: brightness(1.18); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(227, 171, 78, 0.55), 0 5px 0 #05040b, 0 14px 28px rgba(0, 0, 0, 0.6), 0 0 24px rgba(227, 171, 78, 0.2); }
.btn:active { transform: translateY(3px); filter: brightness(0.95); box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(227, 171, 78, 0.3), 0 1px 0 #05040b; }
.btn.primary { --rivet: #6a4a14; color: #2a1a04; border-color: #3a2606; background: var(--rivets), var(--plate); text-shadow: 0 1px 0 rgba(255, 244, 210, 0.6); box-shadow: inset 0 1px 0 rgba(255, 250, 225, 0.85), inset 0 -3px 0 rgba(90, 55, 10, 0.4), inset 0 0 0 1px rgba(120, 80, 20, 0.45), 0 4px 0 #6a4a14, 0 5px 0 #05040b, 0 12px 26px rgba(0, 0, 0, 0.6); }
.btn.primary:hover { color: #1a1206; background: var(--rivets), var(--plate); box-shadow: inset 0 1px 0 rgba(255, 250, 225, 0.9), inset 0 -3px 0 rgba(90, 55, 10, 0.4), inset 0 0 0 1px rgba(120, 80, 20, 0.45), 0 5px 0 #6a4a14, 0 6px 0 #05040b, 0 16px 30px rgba(0, 0, 0, 0.6), 0 0 38px rgba(227, 171, 78, 0.5); }
.btn.primary:active { box-shadow: inset 0 3px 8px rgba(90, 55, 10, 0.7), inset 0 0 0 1px rgba(120, 80, 20, 0.45), 0 1px 0 #6a4a14, 0 2px 0 #05040b; }
.btn.big { font-size: 1.06rem; padding: 1.35rem 2.3rem 1.25rem; }
.btn.ghost { color: var(--paper-dim); }
.btn:disabled { filter: grayscale(0.8) brightness(0.65); transform: none; }
.hero .btn.primary.big { animation: beckon 2.8s ease-in-out infinite; }
@keyframes beckon { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.1) drop-shadow(0 0 16px rgba(227, 171, 78, 0.6)); } }
.chapter .btn { padding: 0.85rem 1.3rem 0.75rem; font-size: 0.8rem; }
.journal .btn.ghost { background: rgba(255, 255, 255, 0.28); text-shadow: none; box-shadow: inset 0 0 0 1px rgba(90, 70, 30, 0.35), 0 3px 0 #8a7c5c; }
.hero .row { gap: 1.1rem; margin-top: 0.4rem; }

/* landing page */
.mark { font-family: var(--caps); font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase; }
.top a { font-family: var(--caps); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; }
.hero h1 { text-shadow: 0 3px 0 #000, 0 0 70px rgba(227, 171, 78, 0.28), 0 6px 40px #000; }
.lede { font-size: 1.2rem; line-height: 1.6; }
section { position: relative; }
section + section { border-top: 1px solid; border-image: linear-gradient(90deg, transparent, var(--brass-deep) 30%, var(--brass-deep) 70%, transparent) 1; }
section + section::before { content: ''; position: absolute; left: 50%; top: -6px; width: 11px; height: 11px; margin-left: -6px; background: var(--night); border: 1px solid var(--brass); transform: rotate(45deg); }
h2 { text-shadow: 0 2px 0 #000; }
.chapters { gap: 0.9rem; background: none; border: 0; }
.chapter { border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(180deg, #17142a, #0c0a17); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 0 #05040b, 0 12px 24px rgba(0, 0, 0, 0.4); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.chapter:hover { background: linear-gradient(180deg, #1d1934, #0e0c1a); border-color: var(--brass-deep); transform: translateY(-2px); }
.chapter.locked { opacity: 0.72; }
.chapter.locked:hover { transform: none; border-color: var(--line); }
.chapter .num, .steps li::before {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; font: 700 1.5rem/1 var(--serif); color: #2a1a04;
  background: radial-gradient(circle at 34% 28%, #fbe0a0, #d99c3c 55%, #a06f22 100%); text-shadow: 0 1px 0 rgba(255, 244, 210, 0.6);
  box-shadow: inset 0 0 0 2px rgba(70, 40, 5, 0.45), inset 0 0 0 4px rgba(255, 240, 200, 0.25), 0 3px 0 #5a3d10, 0 8px 14px rgba(0, 0, 0, 0.5);
}
.chapter.locked .num { color: var(--paper-faint); text-shadow: none; background: radial-gradient(circle at 34% 28%, #3d3857, #1a1729); box-shadow: inset 0 0 0 2px #0b0910, 0 3px 0 #05040b; }
.chapter.done .num { box-shadow: inset 0 0 0 2px rgba(70, 40, 5, 0.45), inset 0 0 0 4px rgba(255, 240, 200, 0.25), 0 3px 0 #5a3d10, 0 0 22px rgba(227, 171, 78, 0.5); }
.steps li { padding-left: 4.4rem; min-height: 3.2rem; }
.steps li::before { top: 0; font-size: 1.3rem; width: 2.9rem; height: 2.9rem; }
.steps strong { font-size: 1.3rem; }
.facts { gap: 0.6rem; background: none; border: 0; }
.facts div { border: 1px solid var(--line); border-radius: 3px; background: linear-gradient(180deg, #151226, #0c0a17); box-shadow: 0 3px 0 #05040b; }
.facts dt { color: var(--brass); }
.bellno { text-shadow: 0 3px 0 #000, 0 0 50px rgba(227, 171, 78, 0.4); }
.faq summary { padding: 0.2rem 0; transition: color 0.15s; }
.faq summary:hover { color: var(--brass); }
.faq summary::after { font-size: 1.4rem; line-height: 1; }

/* in-game: the bar along the top */
.hud { position: relative; z-index: 2; gap: 0.8rem; padding: 0.5rem 0.9rem; background: linear-gradient(180deg, #211c36, #0c0a15); border-bottom: 1px solid #000; box-shadow: inset 0 -1px 0 rgba(227, 171, 78, 0.4), 0 8px 22px rgba(0, 0, 0, 0.7); }
.hud-title small { font-size: 0.68rem; }
.hud-title span { font-size: 1.14rem; text-shadow: 0 2px 0 #000; }
.hud button { font: 700 0.7rem/1 var(--caps); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); background: var(--iron); border: 1px solid #05040b; border-radius: 3px; padding: 0.72rem 0.85rem 0.62rem; text-shadow: 0 -1px 0 #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 0 0 1px rgba(227, 171, 78, 0.28), 0 3px 0 #05040b; transition: transform 0.08s, box-shadow 0.08s, filter 0.15s, color 0.15s; }
.hud button:hover { color: #ffe2a6; border-color: #05040b; filter: brightness(1.22); }
.hud button:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(227, 171, 78, 0.28), 0 1px 0 #05040b; }
.hud button.moth.ready { color: #2a1a04; background: var(--plate); border-color: #3a2606; text-shadow: 0 1px 0 rgba(255, 244, 210, 0.6); box-shadow: inset 0 1px 0 rgba(255, 250, 225, 0.85), inset 0 0 0 1px rgba(120, 80, 20, 0.45), 0 3px 0 #6a4a14, 0 0 20px rgba(227, 171, 78, 0.6); animation: beckon 2.2s ease-in-out infinite; }
.meter small { font-size: 0.58rem; color: var(--brass-deep); }
.pips { gap: 5px; }
.pips i { width: 11px; height: 11px; background: #07060d; border: 1px solid var(--brass-deep); box-shadow: inset 0 1px 2px #000; }
.pips.near i { width: 14px; }
.dial svg { filter: drop-shadow(0 3px 0 #05040b) drop-shadow(0 0 10px rgba(227, 171, 78, 0.25)); }
.dial b { font-size: 1.3rem; text-shadow: 0 2px 0 #000; }

/* in-game: messages over the scene */
.banner { top: 1.1rem; font-size: 1.3rem; padding: 0.7rem 1.7rem; border-radius: 3px; background: linear-gradient(180deg, rgba(28, 24, 46, 0.96), rgba(8, 7, 14, 0.96)); border: 1px solid var(--brass-deep); box-shadow: 0 0 0 3px rgba(9, 8, 18, 0.85), 0 0 0 4px rgba(227, 171, 78, 0.25), 0 12px 34px #000; text-shadow: 0 2px 0 #000; }
.banner.bad { box-shadow: 0 0 0 3px rgba(9, 8, 18, 0.85), 0 0 0 4px rgba(209, 80, 63, 0.4), 0 0 40px rgba(209, 80, 63, 0.35); }
.story-line { font-size: 1.15rem; padding: 0.9rem 1.4rem; border-radius: 2px; box-shadow: 0 3px 0 #a3966f, 0 16px 44px rgba(0, 0, 0, 0.75), inset 0 0 30px rgba(120, 90, 40, 0.2); }

/* in-game: the list, as luggage tags */
.tray { gap: 0.65rem; padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom)); background: linear-gradient(0deg, #211c36, #0c0a15); border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(227, 171, 78, 0.4), 0 -8px 22px rgba(0, 0, 0, 0.7); position: relative; z-index: 2; }
.tray li { position: relative; padding: 0.4rem 0.95rem 0.4rem 1.55rem; border-radius: 3px; font: 600 0.98rem/1.1 var(--serif); box-shadow: 0 3px 0 #a3966f, 0 7px 14px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(120, 90, 40, 0.18); }
.tray li::before { content: ''; position: absolute; left: 0.5rem; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-radius: 50%; background: #14111f; box-shadow: inset 0 1px 1px #000, 0 0 0 1.5px #a3966f; }
.tray li:nth-child(odd) { transform: rotate(-1.2deg); }
.tray li:nth-child(even) { transform: rotate(0.9deg); }
.tray li.locked { box-shadow: none; }
.tray li.locked::before { display: none; }
.tray.mode-shadow li:not(.done):not(.locked) { padding-right: 0.5rem; }

/* in-game: cards are framed panels */
.card-in { position: relative; width: min(100%, 38rem); padding: clamp(1.5rem, 4.5vw, 2.6rem) clamp(1.3rem, 4.5vw, 2.8rem); background: linear-gradient(180deg, rgba(26, 22, 42, 0.95), rgba(9, 8, 17, 0.97)); border: 1px solid var(--brass-deep); border-radius: 3px; box-shadow: 0 0 0 5px #08070f, 0 0 0 6px rgba(227, 171, 78, 0.4), 0 40px 90px #000, inset 0 0 70px rgba(0, 0, 0, 0.55); }
.card-in::before, .card-in::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--brass); pointer-events: none; }
.card-in::before { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.card-in::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.card.cold .card-in, .card.inspect .card-in { background: none; border: 0; box-shadow: none; padding: 1rem 0; }
.card.cold .card-in::before, .card.cold .card-in::after, .card.inspect .card-in::before, .card.inspect .card-in::after { display: none; }
.card.inspect .card-in { width: min(100%, 24rem); }
.card h2 { text-shadow: 0 3px 0 #000, 0 0 50px rgba(227, 171, 78, 0.22); margin-bottom: 0.4rem; }
.card .prose p { font-size: 1.2rem; }
.card .rules { list-style: none; margin: 1.6rem 0; padding: 1.1rem 1.2rem; border: 0; border-top: 1px solid rgba(227, 171, 78, 0.28); border-bottom: 1px solid rgba(227, 171, 78, 0.28); background: rgba(0, 0, 0, 0.28); font-size: 1rem; line-height: 1.5; }
.card .rules li { position: relative; padding-left: 1.5rem; }
.card .rules li + li { margin-top: 0.6rem; }
.card .rules li::before { content: ''; position: absolute; left: 0.2rem; top: 0.55em; width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); }
.card .row { gap: 1rem; margin-top: 1.9rem; }
.card .score { font-size: 1.1rem; }
.candles { font-size: 1.5rem; }
.modes { gap: 0; margin-bottom: 0.6rem; }
.modes .mode { font: 700 0.76rem/1 var(--caps); letter-spacing: 0.15em; text-transform: uppercase; padding: 0.8rem 1.15rem 0.7rem; margin-right: -1px; border: 1px solid #05040b; border-radius: 0; color: var(--paper-dim); background: var(--iron); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(227, 171, 78, 0.25), 0 3px 0 #05040b; transition: filter 0.15s, color 0.15s; }
.modes .mode:first-child { border-radius: 3px 0 0 3px; }
.modes .mode:nth-of-type(3) { border-radius: 0 3px 3px 0; }
.modes .mode:hover { color: #ffe2a6; filter: brightness(1.2); }
.modes .mode.on { color: #2a1a04; background: var(--plate); border-color: #3a2606; text-shadow: 0 1px 0 rgba(255, 244, 210, 0.6); box-shadow: inset 0 3px 7px rgba(90, 55, 10, 0.55), inset 0 0 0 1px rgba(120, 80, 20, 0.45), 0 1px 0 #05040b; transform: translateY(2px); }
.modes p { margin-top: 0.8rem; font-style: italic; font-size: 0.95rem; }

/* the journal */
.theory .pick { font: 600 1rem var(--serif); padding: 0.6rem 1rem; border-radius: 3px; background: rgba(255, 255, 255, 0.28); box-shadow: 0 3px 0 #8a7c5c; transition: transform 0.08s, box-shadow 0.08s; }
.theory .pick:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a7c5c; }
.theory .pick.on { box-shadow: inset 0 2px 5px #000; transform: translateY(2px); }

/* guide pages */
.doc .btn.primary { margin: 0.6rem 0 0.4rem; }

/* paper surfaces keep flat ink, and the phone bar lets a long chapter name wrap */
.journal h2, .journal h3, .note h2 { text-shadow: none; }
@media (max-width: 44rem) {
  .hud-title span { white-space: normal; font-size: 0.92rem; line-height: 1.08; }
  .hud button { padding: 0.72rem 0.65rem 0.62rem; letter-spacing: 0.1em; }
  .label, .card .eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; }
}
@media (max-width: 30rem) {
  .hud { gap: 0.4rem; padding: 0.5rem 0.55rem; }
  .hud-title span { font-size: 0.86rem; }
  .pips { gap: 3px; }
  .pips i { width: 8px; height: 8px; }
  .pips.near i { width: 10px; }
}

/* sizes tuned for the bundled faces: Cinzel runs wide, EB Garamond runs small */
.btn { letter-spacing: 0.1em; font-size: 0.9rem; }
.btn.big { font-size: 1.02rem; }
.hud button, .modes .mode { letter-spacing: 0.1em; }
.label, .card .eyebrow { letter-spacing: 0.18em; }
.kicker { letter-spacing: 0.2em; }
.hero h1 { font-weight: 500; letter-spacing: -0.015em; }
.card .prose p { font-size: 1.3rem; line-height: 1.5; }
.card .rules { font-size: 1.08rem; }
.story p { font-size: 1.32rem; }
.tray li { font-size: 1.06rem; }
.steps span, .chapter p, .faq details p { font-size: 1.12rem; }

/* ---------- cookie sheet and ad slots ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 0.8rem; pointer-events: none; }
html[data-consent='settled'] .consent, html.in-game .consent, html.in-journal .consent { display: none; }
.consent-in { pointer-events: auto; max-width: 40rem; margin: 0 auto; padding: 1.3rem 1.5rem 1.4rem; border: 1px solid var(--brass-deep); border-radius: 3px; background: linear-gradient(180deg, rgba(26, 22, 42, 0.98), rgba(9, 8, 17, 0.99)); box-shadow: 0 0 0 4px #08070f, 0 0 0 5px rgba(227, 171, 78, 0.35), 0 -10px 60px rgba(0, 0, 0, 0.8); }
.consent h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.consent p { font-size: 1.05rem; line-height: 1.5; color: var(--paper-dim); margin-bottom: 1rem; }
.consent .row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.consent .btn { padding: 0.9rem 1.4rem 0.8rem; }
.consent a { font-size: 1rem; }
.ad { display: block; width: min(100% - 2.5rem, var(--page)); margin: 2.5rem auto; min-height: 280px; padding-top: 1.4rem; position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc .ad { width: 100%; }
.ad-label { position: absolute; top: 0.35rem; left: 0; font: 600 0.62rem/1 var(--caps); letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); }
.ad .adsbygoogle { display: block; width: 100%; }
footer nav a[data-open-consent] { color: var(--brass); }
