/* The vault reader's one stylesheet: Fancyland's night palette, art first, one reading column. Body text never below 1rem. */
:root {
  --bg: #02040a;
  --panel: #0b1018;
  --line: #262d38;
  --ink: #eceef3;
  --body: #c9d0da;
  --muted: #8e98a6;
  --gold: #d4af37;
  --brass: #c7b18a;
  --ice: #a3b9dc;
  --paper: #eeeae2;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 1.0625rem/1.65 var(--sans);
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px));
}
a { color: var(--ice); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main { max-width: 720px; margin: 0 auto; padding-block: 20px 72px; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px 18px; }
.brand a.mark { font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); text-decoration: none; }
.brand a.full { font-size: 0.9375rem; }

.art { margin: 0 0 22px; }
.art img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.art figcaption { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }

.kind { font: 600 0.8125rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
h1 { font: 600 clamp(2.2rem, 8vw, 3.2rem)/1.05 var(--serif); color: var(--paper); margin: 0 0 6px; text-wrap: balance; }
.subtitle { font: italic 500 1.375rem/1.35 var(--serif); color: var(--brass); margin: 0 0 18px; }
.bio { color: var(--body); margin: 0 0 26px; }
.bio p { margin: 0 0 12px; }

.note { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 14px 16px; margin: 0 0 22px; color: var(--body); }
.note strong { color: var(--ink); }

h2 { font: 600 1.6rem/1.15 var(--serif); color: var(--paper); margin: 34px 0 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 8px; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.gallery figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 6px; }

details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 0 0 10px; }
details > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "›"; color: var(--brass); transition: transform 160ms; }
details[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details > summary::after { transition: none; } }
details .inner { padding: 0 16px 14px; }
details .inner p { margin: 0 0 10px; }
details .inner h3 { font: 600 1.0625rem/1.4 var(--sans); color: var(--ink); margin: 14px 0 4px; }
details .inner ul { margin: 0 0 10px; padding-left: 1.2em; }
details .inner li { margin-bottom: 4px; }
details.secret { border-color: #5b4a1c; background: #0f0c05; }
details.secret > summary { color: var(--gold); }

.story { border-left: 2px solid var(--gold); padding: 2px 0 2px 14px; margin: 0 0 16px; }
.story .when { font-size: 0.875rem; color: var(--muted); }
.story h3 { font: 600 1.25rem/1.3 var(--serif); color: var(--paper); margin: 2px 0 4px; }

.open { display: block; text-align: center; margin: 36px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--gold); color: #1a1405; font-weight: 600; text-decoration: none; }
.open:hover { filter: brightness(1.06); }
footer { margin-top: 28px; font-size: 0.9375rem; color: var(--muted); text-align: center; }

/* the front page */
.front { min-height: 70vh; display: grid; align-content: center; gap: 18px; }
.front h1 { font-size: clamp(2.6rem, 10vw, 3.8rem); }
.front .lede { font-size: 1.1875rem; margin: 0; max-width: 34ch; }
form.serial { display: grid; gap: 10px; margin-top: 8px; }
form.serial label { font-weight: 600; color: var(--ink); }
form.serial input { font: 500 1.125rem/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px; width: 100%; }
form.serial button { font: 600 1.0625rem/1 var(--sans); color: #1a1405; background: var(--gold); border: 0; border-radius: 12px; padding: 15px 18px; cursor: pointer; }
.hint { font-size: 0.9375rem; color: var(--muted); margin: 0; }
