/* Shadows of History -- The Archive
   Direction: a museum exhibition catalogue. Warm ivory paper, deep ink,
   Egyptian red ochre as the single accent (the colour of Ankhhaf's painted
   plaster), an editorial variable serif for display and reading, a quiet
   grotesk for labels. Cards are "double-bezel": a hairline tray holding a
   brighter sheet. Mobile-first at 390px; widened with min-width queries.
   The previous dark version is kept at .tmp/shadows-archive-content/style.dark.css */

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d7;
  --sheet: #fbf9f4;
  --ink: #1b1813;
  --ink-2: #3f3930;
  --muted: #857b6d;
  --rule: rgba(27, 24, 19, 0.1);
  --rule-strong: rgba(27, 24, 19, 0.2);
  --ochre: #9a3a24;
  --ochre-deep: #6f2616;
  --ochre-soft: rgba(154, 58, 36, 0.09);
  --ok: #3f6b45;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --r-xl: 2rem;
  --r-lg: 1.5rem;
  --gutter: 16px;
  --shadow-sheet: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 24px 48px -28px rgba(60, 40, 20, 0.28);
  --shadow-float: 0 18px 40px -18px rgba(40, 28, 14, 0.35);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, #fbf8f1 0%, rgba(251, 248, 241, 0) 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 110px; /* room for the dock */
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.4em;
  color: var(--ink);
}
em { font-style: italic; }
h1 em, h2 em, .masthead__brand em, .footer__mark em { color: var(--ochre); }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
img { display: block; max-width: 100%; }

::selection { background: var(--ochre); color: var(--sheet); }

:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Paper grain: fixed, never on a scrolling container. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.38  0 0 0 0 0.28  0 0 0 0.09 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* -------------------------------------------------------------------- */
/* Masthead                                                              */
/* -------------------------------------------------------------------- */
.masthead {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px var(--gutter) 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
}
.masthead__brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.masthead__meta {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* -------------------------------------------------------------------- */
/* Floating dock (primary nav): thumb reach, glass over paper            */
/* -------------------------------------------------------------------- */
.dock {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(251, 249, 244, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-float);
  width: max-content;
  max-width: calc(100% - 24px);
}
.dock a {
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 500ms var(--ease), color 500ms var(--ease);
}
.dock a.is-active {
  background: var(--ink);
  color: var(--sheet);
}

/* -------------------------------------------------------------------- */
/* Layout                                                                */
/* -------------------------------------------------------------------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow,
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.label--quiet { color: var(--muted); font-weight: 500; }
.label--light { color: #e2b7a5; }

.lede {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}

.note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ochre);
  border-bottom: 1px solid rgba(154, 58, 36, 0.3);
  padding-bottom: 2px;
  transition: gap 400ms var(--ease), border-color 400ms var(--ease);
}
.text-link:hover { gap: 10px; border-color: var(--ochre); }

.file-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ochre);
  font-variant-numeric: lining-nums tabular-nums;
}

/* Hero */
.hero { padding: 56px 0 36px; }
.hero--page { padding-top: 44px; }
.hero__title {
  font-size: clamp(2.7rem, 12.5vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.012em;
  margin: 18px 0 18px;
}
.hero__title em { font-weight: 400; }

.page-title {
  font-size: clamp(2.1rem, 9.5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.012em;
  margin: 10px 0 24px;
}

.card-title {
  font-size: 1.7rem;
  font-weight: 350;
  margin: 10px 0 20px;
}

/* -------------------------------------------------------------------- */
/* Double-bezel card                                                     */
/* -------------------------------------------------------------------- */
.bezel {
  display: block;
  width: 100%;
  padding: 6px;
  margin: 0 0 18px;
  border-radius: var(--r-xl);
  background: rgba(27, 24, 19, 0.035);
  border: 1px solid var(--rule);
  text-align: left;
  color: inherit;
  font: inherit;
}
.bezel__core {
  border-radius: calc(var(--r-xl) - 6px);
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  padding: 24px 20px;
}

/* Featured (open now) */
.featured .bezel__core { padding: 26px 22px 22px; }
.featured__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.featured__title {
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  font-weight: 350;
  margin-bottom: 14px;
}
.featured__q {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 14px;
  border-left: 2px solid var(--ochre);
  margin: 0 0 24px;
}
.featured__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pill--live { background: var(--ochre-soft); color: var(--ochre); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ochre);
  box-shadow: 0 0 0 0 rgba(154, 58, 36, 0.45);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(154, 58, 36, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(154, 58, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(154, 58, 36, 0); }
}

/* -------------------------------------------------------------------- */
/* Buttons: pill with the arrow nested in its own circle                 */
/* -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 500ms var(--ease), background-color 500ms var(--ease), box-shadow 500ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn__icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 500ms var(--ease);
}
.btn:hover .btn__icon { transform: translateX(3px) scale(1.05); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: progress; }

.btn--primary { background: var(--ink); color: var(--sheet); box-shadow: 0 10px 24px -14px rgba(27, 24, 19, 0.7); }
.btn--primary .btn__icon { background: var(--ochre); color: var(--sheet); }
.btn--primary:hover { background: #2a251e; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost .btn__icon { background: var(--ink); color: var(--sheet); }

.btn--light { background: var(--sheet); color: var(--ink); }
.btn--light .btn__icon { background: var(--ochre); color: var(--sheet); }

/* admin buttons (no icon) */
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.82rem; justify-content: center; }
.btn--danger { background: transparent; color: var(--ochre-deep); border-color: rgba(111, 38, 22, 0.35); }

/* -------------------------------------------------------------------- */
/* Vault dial: six ivory tumblers, found ones turn red ochre             */
/* -------------------------------------------------------------------- */
.vault-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dial {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
}
.tumbler {
  position: relative;
  height: clamp(64px, 19vw, 88px);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 45%, var(--paper-2) 100%);
  border: 1px solid var(--rule);
  box-shadow: inset 0 2px 4px rgba(60, 40, 20, 0.08), inset 0 -1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tumbler__i {
  position: absolute;
  top: 6px;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.tumbler__d {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  font-weight: 350;
  color: rgba(27, 24, 19, 0.22);
  font-variant-numeric: lining-nums;
}
.tumbler.is-found {
  background: linear-gradient(180deg, #a84a30 0%, var(--ochre) 50%, var(--ochre-deep) 100%);
  border-color: var(--ochre-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 18px -10px rgba(111, 38, 22, 0.8);
}
.tumbler.is-found .tumbler__i { color: rgba(251, 249, 244, 0.6); }
.tumbler.is-found .tumbler__d { color: var(--sheet); }

.vault-card--big .bezel__core { padding: 34px 20px 28px; text-align: center; }
.vault-card__lock { color: var(--ochre); display: flex; justify-content: center; margin-bottom: 20px; }
.progress {
  height: 3px;
  border-radius: 3px;
  background: var(--paper-2);
  overflow: hidden;
  margin: 4px 0 14px;
}
.progress span { display: block; height: 100%; background: var(--ochre); border-radius: 3px; }
.vault-card__count { font-size: 0.9rem; color: var(--muted); margin: 0; }
.vault-card__count strong { color: var(--ink); font-weight: 600; }
.vault-note { padding: 18px 4px 10px; }
.vault-note p {
  font-family: var(--serif);
  font-variation-settings: "opsz" 20;
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 36ch;
  margin-bottom: 22px;
}

/* -------------------------------------------------------------------- */
/* The Files: catalogue index                                            */
/* -------------------------------------------------------------------- */
.index { padding: 36px 0 12px; }
.index__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.index__title { font-size: 1.9rem; font-weight: 350; margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--rule); }
.row__link {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  transition: padding 500ms var(--ease), background-color 500ms var(--ease);
}
a.row__link:hover { padding-left: 8px; background: rgba(154, 58, 36, 0.035); }
.row__no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ochre);
  font-variant-numeric: lining-nums tabular-nums;
}
.row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row__title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36;
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--ink);
}
.row__meta { font-size: 0.78rem; color: var(--muted); }
.row.is-sealed .row__title,
.row.is-sealed .row__no { color: rgba(27, 24, 19, 0.35); }

.state {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.state--open { background: var(--ink); color: var(--sheet); }
.state--solved { background: var(--ochre-soft); color: var(--ochre); }
.state--sealed { color: var(--muted); border: 1px dashed var(--rule-strong); }

/* -------------------------------------------------------------------- */
/* File page                                                             */
/* -------------------------------------------------------------------- */
.back-link {
  display: inline-block;
  margin: 26px 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 400ms var(--ease);
}
.back-link:hover { color: var(--ink); }

.file-page { padding-top: 18px; }
.file-page__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.question { position: relative; margin: 34px 0 34px; padding: 0; }
.question__mark {
  position: absolute;
  top: -34px;
  left: -6px;
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 1;
  color: var(--ochre);
  opacity: 0.18;
  pointer-events: none;
}
.question blockquote {
  margin: 0;
  font-family: var(--serif);
  font-variation-settings: "opsz" 40;
  font-size: clamp(1.3rem, 5.6vw, 1.6rem);
  font-weight: 350;
  line-height: 1.38;
  color: var(--ink);
}

.answer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border-radius: var(--r-lg);
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sheet);
}
.answer__input {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 350;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--rule-strong);
  border-radius: 0;
  padding: 8px 0 12px;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 500ms var(--ease);
}
.answer__input::placeholder { color: rgba(27, 24, 19, 0.25); }
.answer__input:focus { border-bottom-color: var(--ochre); }
.answer .btn { width: 100%; }
.answer.is-wrong { animation: shake 520ms var(--ease-out); }
@keyframes shake {
  15% { transform: translateX(-7px); }
  35% { transform: translateX(6px); }
  55% { transform: translateX(-4px); }
  75% { transform: translateX(2px); }
}

.hint { margin: 18px 4px 0; }
.hint summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ochre);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.hint summary::-webkit-details-marker { display: none; }
.hint summary::after { content: "+"; font-size: 1.1rem; transition: transform 400ms var(--ease); }
.hint[open] summary::after { transform: rotate(45deg); }
.hint p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-2);
  margin: 4px 0 0;
  padding: 14px 16px;
  background: var(--ochre-soft);
  border-radius: 14px;
}

.feedback { min-height: 1.2em; font-size: 0.9rem; font-weight: 500; color: var(--ok); }
.feedback:empty { display: none; }
.feedback--wrong { color: var(--ochre); }
.feedback--error { color: var(--ochre-deep); }
.feedback--light { color: #cfe3c9; }

/* Sealed file */
.sealed { text-align: center; padding: 48px 0 20px; }
.sealed__lock { color: var(--ochre); display: flex; justify-content: center; margin-bottom: 18px; }
.sealed .lede { margin: 0 auto; }

/* -------------------------------------------------------------------- */
/* Reveal: an exhibition page                                            */
/* -------------------------------------------------------------------- */
.reveal { padding-top: 10px; }
.reveal__stamp { display: flex; justify-content: center; margin: 10px 0 26px; }
.reveal__stamp span {
  display: inline-block;
  padding: 7px 16px;
  border: 1.5px solid var(--ochre);
  border-radius: 6px;
  color: var(--ochre);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.reveal.is-fresh .reveal__stamp span { animation: stamp 700ms var(--ease-out) both; }
@keyframes stamp {
  0% { transform: rotate(-3deg) scale(1.9); opacity: 0; }
  60% { transform: rotate(-3deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-3deg) scale(1); }
}

.exhibit { margin: 0 0 30px; }
.exhibit__mat {
  padding: 14px;
  background: var(--sheet);
  border-radius: 6px;
  border: 1px solid var(--rule);
  box-shadow: 0 30px 50px -30px rgba(60, 40, 20, 0.45), 0 2px 6px -2px rgba(60, 40, 20, 0.12);
}
.exhibit__mat img { width: 100%; height: auto; border-radius: 2px; }
.exhibit__label {
  display: grid;
  gap: 3px;
  margin: 16px 2px 0;
  padding-left: 12px;
  border-left: 2px solid var(--ochre);
}
.exhibit__name { font-family: var(--serif); font-size: 1.3rem; font-variation-settings: "opsz" 36; }
.exhibit__place {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
}
.exhibit__credit { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.exhibit__credit a { border-bottom: 1px solid var(--rule-strong); }

.prose p {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1.1em;
}
.prose p:first-child::first-letter {
  float: left;
  font-size: 3.6rem;
  line-height: 0.9;
  padding: 6px 8px 0 0;
  color: var(--ochre);
  font-variation-settings: "opsz" 144;
}

.sources { margin: 26px 0 38px; }
.sources ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: s; }
.sources li { counter-increment: s; border-bottom: 1px solid var(--rule); }
.sources li:first-child { border-top: 1px solid var(--rule); }
.sources a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  font-size: 0.95rem;
  color: var(--ink);
  transition: color 400ms var(--ease), padding 400ms var(--ease);
}
.sources a::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--serif);
  font-style: italic;
  color: var(--ochre);
  margin-right: 12px;
}
.sources a span { flex: 1; }
.sources a svg { color: var(--muted); flex: none; }
.sources a:hover { color: var(--ochre); padding-left: 4px; }

/* The earned digit: a wax seal */
.award {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--ink);
}
.award__text p {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink-2);
  margin: 6px 0 10px;
}
.seal {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 34% 28%, #c35a3e 0%, var(--ochre) 42%, var(--ochre-deep) 100%);
  box-shadow:
    inset 0 -6px 12px rgba(0, 0, 0, 0.25),
    inset 0 4px 8px rgba(255, 255, 255, 0.18),
    0 14px 26px -12px rgba(111, 38, 22, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  border: 1.5px dashed rgba(251, 249, 244, 0.35);
}
.seal__digit {
  position: relative;
  font-family: var(--serif);
  font-size: 2.9rem;
  font-weight: 400;
  color: var(--sheet);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.reveal.is-fresh .seal { animation: press 900ms var(--ease-out) 250ms both; }
@keyframes press {
  0% { transform: scale(1.35) rotate(-12deg); opacity: 0; }
  55% { transform: scale(0.96) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* Dark ink block (email) */
.ink-card {
  background: var(--ink);
  color: var(--sheet);
  border-radius: var(--r-xl);
  padding: 30px 22px 24px;
  margin: 0 0 18px;
  box-shadow: 0 30px 60px -30px rgba(27, 24, 19, 0.7);
}
.ink-card h3 {
  color: var(--sheet);
  font-size: 1.75rem;
  font-weight: 350;
  margin: 12px 0 22px;
}
.ink-card__form { display: flex; flex-direction: column; gap: 10px; }
.ink-card__form input {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(251, 249, 244, 0.18);
  background: rgba(251, 249, 244, 0.06);
  color: var(--sheet);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 400ms var(--ease);
}
.ink-card__form input::placeholder { color: rgba(251, 249, 244, 0.4); }
.ink-card__form input:focus { border-color: #e2b7a5; }
.ink-card__form .btn { width: 100%; }
.ink-card__small { font-size: 0.78rem; color: rgba(251, 249, 244, 0.5); margin: 14px 0 0; }
.ink-card .feedback { margin-top: 10px; }

.visit { padding: 28px 4px 10px; }
.visit h3 { font-size: 1.6rem; font-weight: 350; margin: 10px 0 8px; }
.visit p { color: var(--ink-2); margin-bottom: 20px; }

/* -------------------------------------------------------------------- */
/* Wall                                                                  */
/* -------------------------------------------------------------------- */
.wall { margin-bottom: 26px; }
.wall__group { margin-bottom: 30px; }
.wall__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.wall__head h3 { font-size: 1.3rem; font-weight: 400; margin: 0; }
.wall-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.print {
  margin: 0;
  padding: 10px 10px 16px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 22px 40px -26px rgba(60, 40, 20, 0.45);
}
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; background: var(--paper-2); }
.print figcaption { display: grid; gap: 2px; padding: 12px 4px 0; }
.print__name { font-family: var(--serif); font-size: 1.2rem; }
.print__city { font-size: 0.8rem; color: var(--muted); }
.print__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ochre-soft);
  color: var(--ochre);
}
.badge--founder { background: var(--ink); color: var(--sheet); }

.upload-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.admin-gate input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 400ms var(--ease), background-color 400ms var(--ease);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23857b6d' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.field input:focus,
.field select:focus,
.admin-gate input:focus { border-color: var(--ochre); background-color: var(--sheet); }

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1.5px dashed var(--rule-strong);
  border-radius: 18px;
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 400ms var(--ease), background-color 400ms var(--ease);
}
.dropzone:hover { border-color: var(--ochre); background: var(--ochre-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__text { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.dropzone__text strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); }

.preview { display: none; }
.preview.is-visible { display: block; }
.preview img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; }

.consent-row { display: flex; align-items: flex-start; gap: 12px; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; }
.consent-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ochre); flex: none; }
.upload-form .btn { width: 100%; }

.empty-state {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  text-align: center;
  padding: 26px 16px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-lg);
}

.spinner-line {
  height: 1px;
  margin: 30px 0;
  background: linear-gradient(90deg, transparent, var(--ochre), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: sweep 1.3s var(--ease) infinite;
}
@keyframes sweep {
  0% { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}

/* -------------------------------------------------------------------- */
/* Footer                                                                */
/* -------------------------------------------------------------------- */
.footer {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 34px var(--gutter) 20px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.footer__mark { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 8px; }
.footer__line { font-family: var(--serif); font-style: italic; color: var(--ink-2); margin: 0 0 6px; }
.footer__small { font-family: var(--sans); font-style: normal; font-size: 0.75rem; color: var(--muted); }

/* -------------------------------------------------------------------- */
/* Admin (reuses the tokens above)                                       */
/* -------------------------------------------------------------------- */
.hero .section-title { font-size: 2.2rem; margin-top: 10px; }
.section-lede { color: var(--ink-2); }
.admin-gate {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.admin-card img { width: 100%; border-radius: 12px; margin-bottom: 12px; background: var(--paper-2); }
.admin-card__meta { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 12px; }
.admin-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* -------------------------------------------------------------------- */
/* Scroll entry                                                          */
/* -------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
.reveal-on-scroll.is-visible { opacity: 1; transform: none; filter: none; }

/* -------------------------------------------------------------------- */
/* Wider screens                                                         */
/* -------------------------------------------------------------------- */
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .hero { padding: 88px 0 48px; }
  .bezel__core { padding: 34px 32px; }
  .featured .bezel__core { padding: 36px 34px 30px; }
  .answer { padding: 30px 30px; }
  .answer .btn, .upload-form .btn { width: auto; align-self: flex-start; }
  .ink-card { padding: 40px 36px 32px; }
  .ink-card__form { flex-direction: row; }
  .ink-card__form .btn { width: auto; flex: none; }
  .wall-grid, .admin-grid { grid-template-columns: 1fr 1fr; }
  .print:nth-child(odd) { transform: rotate(-1.2deg); }
  .print:nth-child(even) { transform: rotate(1deg) translateY(12px); }
  .tumbler__d { font-size: 2.4rem; }
  .dial { gap: 10px; }
  .exhibit__mat { padding: 20px; }
}

/* -------------------------------------------------------------------- */
/* THE VAULT ROOM                                                        */
/* Dial (editable tumblers) -> Door (silent, CSS-only) -> Room (dark,    */
/* candlelit arch niches over room.webp) -> Scene player (crossfading    */
/* illustrated shots, particle fx, subtitles). Colors reuse --ochre from */
/* the root palette; the Room and Scene surfaces flip to near-black.     */
/* -------------------------------------------------------------------- */

/* -- Editable dial (the Vault's own entry form) ------------------------ */
.tumbler--input { cursor: text; }
.tumbler__input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  font-weight: 350;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  outline: none;
  padding-top: 10px;
  caret-color: var(--ochre);
}
.tumbler--input.is-found .tumbler__input { color: var(--sheet); }
.tumbler__input::selection { background: var(--ochre); color: var(--sheet); }
.dial--input.is-wrong { animation: shake 520ms var(--ease-out); }
@media (min-width: 640px) {
  .tumbler__input { font-size: 2.4rem; }
}

/* -- Door: full-screen, silent, bronze -----------------------------------
   The real room (public/vault/room.webp) is already rendered in the DOM
   underneath this overlay by the time it appears (see playDoorThenRoom in
   vault.js) -- .vault-door__scrim and .vault-door__glow dissolve in sync
   with the slab's swing so the room is a genuine reveal, not a cut. Total
   sequence (opening class -> finish) is silent and ~2.5s:
     0.00s  wheel begins turning (1.0s, eased)
     0.55s  bolts begin retracting outward (0.45s, finish ~1.0s w/ wheel)
     1.10s  slab (door + frame + wheel + bolts, as one bronze unit) begins
            its rotateY swing (1.4s, finishes ~2.5s); scrim/glow dissolve
            over the same window so the painted room shows through as it
            turns away.
----------------------------------------------------------------------- */
.vault-door {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vault-door__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 38%, #2a1c13 0%, #0c0805 68%, #060402 100%);
  opacity: 1;
  transition: opacity 1.3s ease;
  transition-delay: 0s;
}
.vault-door.is-opening .vault-door__scrim { opacity: 0; transition-delay: 1.05s; }
.vault-door--plain { background: var(--ink); opacity: 1; transition: opacity 380ms ease; }
.vault-door--plain.is-opening { opacity: 0; }
.vault-door__plainfill { position: absolute; inset: 0; }
.vault-door__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 50% 56%, rgba(255, 158, 84, 0.4) 0%, rgba(6, 4, 2, 0) 70%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 1.1s ease;
  transition-delay: 0.9s;
  pointer-events: none;
}
.vault-door.is-opening .vault-door__glow { opacity: 1; }

/* -- the slab: a riveted bronze-and-iron vault door -------------------- */
.vault-door__slab {
  position: relative;
  width: min(72vw, 340px);
  height: min(72vw, 340px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 244, 224, 0.5) 0%, rgba(255, 244, 224, 0) 10%),
    conic-gradient(from 220deg at 50% 50%,
      #6b431f 0deg, #caa063 35deg, #4a2c14 78deg, #c76a44 128deg,
      #3a220f 176deg, #b98a52 224deg, #5c3a1c 272deg, #caa063 316deg, #6b431f 360deg),
    radial-gradient(circle at 32% 28%, #c76a44 0%, var(--ochre) 46%, var(--ochre-deep) 100%);
  box-shadow:
    0 0 0 10px rgba(0, 0, 0, 0.35),
    inset 0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 -10px 24px rgba(255, 255, 255, 0.08),
    0 40px 90px -30px rgba(0, 0, 0, 0.8);
  transform-origin: 8% 50%;
  transform: perspective(1400px) rotateY(0deg);
}
.vault-door.is-opening .vault-door__slab {
  /* --ease-out is a snappy curve tuned for short (400-900ms) UI pops
     elsewhere on this site -- it front-loads almost all of its motion into
     the first ~30% of a longer duration, which made a 1.4s swing look like
     it vanished almost instantly instead of swinging open. A gentler
     accelerate-then-decelerate curve spreads the rotation across the full
     duration. */
  animation: doorSwing 1.4s cubic-bezier(0.45, 0, 0.2, 1) forwards;
  animation-delay: 1.1s;
}
@keyframes doorSwing {
  to { transform: perspective(1400px) rotateY(-100deg); opacity: 0.05; }
}

/* thick outer frame -- a darker riveted bezel behind the slab's own face */
.vault-door__frame-ring {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #241608 0deg, #4a2c14 25%, #1c1108 50%, #4a2c14 75%, #241608 100%);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.5),
    0 30px 80px -20px rgba(0, 0, 0, 0.85);
}

/* engraved inner ring, between the rivets and the wheel */
.vault-door__rim {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  border: 2px solid rgba(251, 249, 244, 0.2);
  box-shadow:
    inset 0 0 0 5px rgba(0, 0, 0, 0.22),
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 -1px 2px rgba(255, 244, 224, 0.12);
}

/* ring of decorative rivets set into the frame */
.vault-door__rivet-rot { position: absolute; inset: 0; }
.vault-door__rivet {
  position: absolute;
  top: 1%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f6e6c4 0%, #a2723c 55%, #5c3a1c 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

/* locking bolts -- retract outward, then the whole slab swings */
.vault-door__bolt-rot { position: absolute; inset: 0; }
.vault-door__bolt {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 13px;
  height: 15%;
  min-height: 22px;
  margin-left: -6.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f1d9be 0%, #caa063 50%, #7a4a26 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.vault-door__bolt-head {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 19px;
  height: 10px;
  margin-left: -9.5px;
  border-radius: 4px;
  background: radial-gradient(circle at 35% 30%, #f6e3c2, #9a6a34 70%, #5c3a1c 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.vault-door.is-opening .vault-door__bolt {
  animation: doorBoltRetract 450ms var(--ease-out) forwards;
  animation-delay: 0.55s;
}
@keyframes doorBoltRetract {
  to { transform: translateY(34px); opacity: 0.3; }
}

/* central spoked wheel */
.vault-door__wheel {
  position: absolute;
  inset: 29%;
  border-radius: 50%;
  border: 3px solid rgba(251, 249, 244, 0.5);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle, rgba(0, 0, 0, 0.18), transparent 70%);
}
.vault-door.is-opening .vault-door__wheel {
  animation: doorWheelSpin 1000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes doorWheelSpin { to { transform: rotate(300deg); } }
.vault-door__spoke {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46%;
  height: 4px;
  margin-top: -2px;
  background: linear-gradient(90deg, rgba(251, 249, 244, 0.6), rgba(251, 249, 244, 0.35));
  transform-origin: 0 50%;
}
.vault-door__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  height: 20%;
  margin: -10% 0 0 -10%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 244, 224, 0.4) 0%, rgba(27, 24, 19, 0.55) 55%);
  border: 2px solid rgba(251, 249, 244, 0.5);
}

/* -- Room: the painting IS the room --------------------------------------
   .vault-stage is the pannable viewport; .vault-stage__frame is sized to
   the room.webp aspect ratio (1536:1024) exactly, so every .vault-arch
   positioned in % inside it lands on its painted arch (see ARCHES in
   vault.js) at any scale -- panned wider-than-screen on mobile, or fitted
   to width with margin on desktop.
----------------------------------------------------------------------- */
.vault-room {
  position: relative;
  background: #0c0906;
  color: #efe6d8;
  /* Break out of the site's narrow content column: inside the Vault the dark room is the
     whole window, and on desktop the painting needs the width for its seven arches. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
/* 100vw includes a desktop scrollbar; clip the few px instead of adding a horizontal scroll. */
html:has(.vault-room) { overflow-x: clip; }
.vault-room__inner {
  max-width: 960px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  box-sizing: border-box;
}
.vault-room__head { text-align: center; padding-top: 44px; padding-bottom: 22px; }
.vault-room__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  color: #f4efe6;
  text-shadow: 0 0 40px rgba(200, 90, 50, 0.28);
  margin: 0 0 12px;
}
.vault-room__sub {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 20;
  color: #cbbfa9;
  max-width: 34ch;
  margin: 0 auto;
}

.vault-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  background: #060402;
}
.vault-stage::-webkit-scrollbar { display: none; }
.vault-stage__frame {
  position: relative;
  height: 100%;
  width: auto;
  aspect-ratio: 1536 / 1024;
  will-change: transform;
}
.vault-room__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.92) saturate(1.02);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.vault-stage__frame::after {
  /* vignette -- darkens the frame's own edges so the arch hotspots read
     clearly regardless of where the viewer has panned to */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% 42%, rgba(8, 6, 4, 0) 55%, rgba(8, 6, 4, 0.55) 100%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .vault-stage {
    width: 100%;
    height: auto;
    overflow: visible;
    display: flex;
    justify-content: center;
    padding: 4px var(--gutter) 32px;
    background: none;
    touch-action: auto;
  }
  .vault-stage__frame {
    height: auto;
    width: min(1100px, 92vw);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  }
}

/* -- Arch hotspots ------------------------------------------------------ */
.vault-arch {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.vault-arch:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 4px;
  border-radius: 50% 50% 4px 4px;
}
.vault-arch__mask {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #140d07;
  box-shadow:
    inset 0 0 0 2px rgba(8, 6, 4, 0.5),
    inset 0 10px 16px rgba(0, 0, 0, 0.55),
    inset 0 -6px 10px rgba(0, 0, 0, 0.4);
}
.vault-arch__glow {
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 158, 84, 0.55) 0%, rgba(255, 120, 50, 0) 62%);
  mix-blend-mode: screen;
  animation: candleFlicker 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes candleFlicker {
  0%, 100% { opacity: 0.55; }
  30% { opacity: 0.85; }
  45% { opacity: 0.5; }
  60% { opacity: 0.75; }
  80% { opacity: 0.6; }
}
.vault-arch__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: sepia(0.4) saturate(1.05) brightness(0.82) contrast(1.05);
  transition: transform 500ms var(--ease), filter 300ms ease;
}
.vault-arch:hover .vault-arch__img,
.vault-arch:focus-visible .vault-arch__img {
  transform: scale(1.08);
  filter: sepia(0.25) saturate(1.15) brightness(0.92) contrast(1.05);
}
.vault-arch__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 13, 7, 0) 50%, rgba(10, 6, 3, 0.6) 100%);
  pointer-events: none;
}
.vault-arch__check {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ochre);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.vault-arch.is-watched .vault-arch__check { display: flex; }

/* ink-plate label -- own background/border so it stays legible over any
   part of the painting, at any pan position */
.vault-arch__label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 7px 4px;
  width: max-content;
  max-width: 22vw;
  background: linear-gradient(180deg, rgba(38, 27, 16, 0.9), rgba(20, 13, 7, 0.94));
  border: 1px solid rgba(201, 168, 106, 0.35);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.vault-arch__label-file {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e7c98e;
  white-space: nowrap;
}
.vault-arch__label-witness {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.68rem;
  color: #f2e8d4;
  line-height: 1.15;
  text-align: center;
}
@media (min-width: 900px) {
  /* The seven arches sit close together at the desktop fitted-to-width
     scale (well under 60px between neighbours at typical widths) -- too
     tight for a permanent two-line "File 001 / Merer" plate on every arch
     without them colliding. Default to just the File number; reveal the
     witness name on hover/focus, same as a tooltip, so it is still fully
     readable without any arch's label overlapping its neighbour's. */
  .vault-arch__label { max-width: 40px; padding: 2px 4px; }
  .vault-arch__label-file { font-size: 0.46rem; letter-spacing: 0.06em; }
  .vault-arch__label-witness { display: none; }
  .vault-arch:hover .vault-arch__label,
  .vault-arch:focus-visible .vault-arch__label {
    max-width: 130px;
    z-index: 6;
  }
  .vault-arch:hover .vault-arch__label-witness,
  .vault-arch:focus-visible .vault-arch__label-witness {
    display: block;
    font-size: 0.62rem;
  }
}

.vault-arch--sealed { cursor: default; }
.vault-arch--sealed .vault-arch__mask { background: linear-gradient(135deg, #241a12 0%, #171009 100%); }
.vault-arch__cloth {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(100deg, rgba(0, 0, 0, 0.18) 0 10px, rgba(255, 255, 255, 0.03) 10px 20px),
    linear-gradient(160deg, #3a2b1c 0%, #1c140d 70%);
  clip-path: polygon(0% 8%, 12% 2%, 26% 9%, 40% 1%, 54% 8%, 68% 2%, 82% 9%, 100% 3%, 100% 100%, 0% 100%);
}
.vault-arch--sealed .vault-arch__label-file,
.vault-arch--sealed .vault-arch__label-witness { color: #8c7f66; }

/* -- Keepers ---------------------------------------------------------------- */
.vault-keepers { margin-top: 44px; text-align: center; }
.vault-keepers__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.7rem;
  color: #f4efe6;
  margin-bottom: 18px;
}
.vault-keepers__band {
  padding: 22px 16px;
  border-radius: 14px;
  background:
    radial-gradient(120% 200% at 10% 0%, rgba(255, 255, 255, 0.03), transparent 40%),
    linear-gradient(180deg, #211a12 0%, #17110b 100%);
  border: 1px solid rgba(201, 168, 106, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  margin-bottom: 22px;
}
.vault-keepers__names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}
.vault-keepers__names li {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e3d4ae;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.vault-keepers__empty { font-family: var(--serif); font-style: italic; color: #a99a7c; margin: 0; }
.vault-keepers__form {
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.vault-keepers__lede { font-family: var(--serif); font-style: italic; color: #d9cba8; margin: 0 0 2px; text-align: center; }
.field--light .field__label { color: #b8a988; }
.field--light input {
  background: rgba(251, 249, 244, 0.06);
  border-color: rgba(251, 249, 244, 0.18);
  color: #f4efe6;
}
.field--light input::placeholder { color: rgba(244, 239, 230, 0.38); }
.field--light input:focus { border-color: var(--ochre); background: rgba(251, 249, 244, 0.1); }
.vault-keepers__form .btn { align-self: center; }

.btn--ghost-light { background: transparent; color: #f4efe6; border-color: rgba(251, 249, 244, 0.35); }
.btn--ghost-light .btn__icon { background: rgba(251, 249, 244, 0.15); color: #f4efe6; }
.spinner-line--light {
  background: linear-gradient(90deg, transparent, #e3b98a, transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
}

/* -- Scene player ------------------------------------------------------------ */
.vault-scene {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #030201;
  color: #f4efe6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vault-scene__loading { margin: auto; text-align: center; width: 200px; }
.vault-scene__loading p { font-family: var(--serif); font-style: italic; color: #cbbfa9; margin: 14px 0 0; }
.vault-scene__stage { position: absolute; inset: 0; overflow: hidden; background: #060402; }
.vault-scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  transform-origin: 50% 50%;
}
.vault-scene__img.is-active { opacity: 1; }
/* Tall screens (phones): the paintings are 3:2, so show each one WHOLE instead of cropping it
   (Seif: "it doesnt show the full image ... it have to be 9:16"), sitting a little above centre,
   with a blurred, darkened copy of the same shot filling the rest of the screen. */
.vault-scene__bg {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(22px) brightness(0.68) saturate(1.05);
  opacity: 0;
  transition: opacity 1.2s ease;
  display: none;
}
.vault-scene__bg.is-active { opacity: 1; }
@media (max-aspect-ratio: 1/1) {
  .vault-scene__bg { display: block; }
  .vault-scene__img {
    object-fit: contain;
    object-position: 50% 40%;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6));
  }
  /* the corner vignette is for a full-bleed image; here it only muddies the blurred fill */
  .vault-scene__vignette { background: radial-gradient(140% 70% at 50% 40%, transparent 55%, rgba(3, 2, 1, 0.55) 100%); }
  /* the small note would sit behind the controls on a phone; put it at the top instead */
  .vault-scene__caption { top: calc(env(safe-area-inset-top, 0px) + 14px); bottom: auto; left: 0; right: 0; max-width: none; text-align: center; }
}
.vault-scene__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vault-scene__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(3, 2, 1, 0.75) 100%);
}
.vault-scene__titlecard {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(3, 2, 1, 0.42);
  transition: opacity 500ms ease;
  pointer-events: none;
}
.vault-scene__titlecard.is-hidden { opacity: 0; }
.vault-scene__tc-file { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: #e2b7a5; }
.vault-scene__tc-title { font-family: var(--serif); font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 350; max-width: 20ch; }
.vault-scene__tc-witness { font-family: var(--serif); font-style: italic; color: #cbbfa9; }
.vault-scene__subtitle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px;
  z-index: 3;
  text-align: center;
  padding: 0 22px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}
.vault-scene__subtitle.is-visible { opacity: 1; transform: none; }
.vault-scene__speaker {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e08a5c;
  margin-bottom: 6px;
}
.vault-scene__text {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4.6vw, 1.4rem);
  line-height: 1.4;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.vault-scene__progress {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 76px;
  z-index: 3;
  height: 2px;
  border-radius: 2px;
  background: rgba(251, 249, 244, 0.18);
  overflow: hidden;
}
.vault-scene__progress span { display: block; height: 100%; width: 0%; background: var(--ochre); }
.vault-scene__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
}
.vault-scene__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(251, 249, 244, 0.28);
  background: rgba(8, 6, 4, 0.55);
  color: #f4efe6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 300ms var(--ease), transform 300ms var(--ease);
}
.vault-scene__btn:hover { background: rgba(154, 58, 36, 0.5); }
.vault-scene__btn:active { transform: scale(0.94); }
.vault-scene__btn--text { width: auto; border-radius: 999px; padding: 0 18px; font-size: 0.82rem; font-weight: 500; }
.vault-scene__btn--close { margin-left: 8px; }
.vault-scene__caption {
  position: absolute;
  left: 16px;
  bottom: 6px;
  z-index: 3;
  font-size: 0.6rem;
  color: rgba(244, 239, 230, 0.42);
  margin: 0;
  max-width: 60vw;
}
.vault-scene__end {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 2, 1, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* The [hidden] attribute alone loses to the `display: flex` above (author
   CSS always beats the UA stylesheet's [hidden]{display:none} regardless of
   specificity), which left this panel's dark, blurred background covering
   the whole stage for the entire scene, not just at the end. Restate it
   explicitly. */
.vault-scene__end[hidden] { display: none; }
.vault-scene__endcard { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 24px; }
.vault-scene__endcard h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 7vw, 2.2rem); color: #f4efe6; }

body.is-vault-locked,
body.is-vault-scene-open { overflow: hidden; }

@media (min-width: 640px) {
  .vault-scene__subtitle { bottom: 116px; }
  .vault-scene__progress { bottom: 92px; left: 24px; right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-on-scroll { opacity: 1; transform: none; filter: none; }
}

.vault-scene__tap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.4);
  background: rgba(154, 58, 36, 0.92);
  color: #f4efe6;
  font-family: var(--serif);
  font-size: 1.15rem;
  cursor: pointer;
}
