/* =============================================================================
   Tāmaki Paenga Hira — Exhibition Hall
   A dark gallery: deep charcoal walls, brass and gold light, spotlit objects,
   generous negative space, museum-label typography.
   ============================================================================ */

:root {
  --wall: #14110b;
  --wall-2: #181410;
  --wall-3: #1e1913;
  --panel: #211b13;
  --ink: #ede3d0;
  --ink-2: #c9bda4;
  --ink-3: #9b8f77;
  --ink-4: #6f6650;
  --brass: #c5a05c;
  --brass-2: #8a7340;
  --gold: #e3c88a;
  --hairline: rgba(197, 160, 92, 0.28);
  --hairline-dim: rgba(197, 160, 92, 0.13);
  --danger: #c98b6d;
  --focus: #e3c88a;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-spot: 0 34px 60px -30px rgba(0, 0, 0, 0.85);
  --ease-theatre: cubic-bezier(0.22, 0.61, 0.21, 1);
  --dur-reveal: 640ms;
  --gutter: clamp(20px, 4.5vw, 56px);
  --measure: 1360px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(120% 42% at 50% -6%, rgba(197, 160, 92, 0.10), transparent 60%),
    radial-gradient(90% 30% at 50% 108%, rgba(197, 160, 92, 0.05), transparent 70%);
  background-attachment: fixed;
}

::selection { background: rgba(197, 160, 92, 0.35); color: #fff; }

/* Wall texture ---------------------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* Access utilities ------------------------------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -48px; left: 16px; z-index: 100;
  background: var(--panel); color: var(--gold); padding: 10px 16px;
  border: 1px solid var(--hairline); border-radius: 2px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: top 200ms var(--ease-theatre);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f0d9a4; }

/* Chrome (header) -------------------------------------------------------------- */
.chrome {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "mark search" "nav nav";
  gap: 4px 18px;
  align-items: center;
  padding: 14px var(--gutter) 12px;
  background: linear-gradient(rgba(20, 17, 11, 0.92), rgba(20, 17, 11, 0.82));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-dim);
}
.wordmark { grid-area: mark; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wordmark-museum {
  font-family: var(--serif); font-weight: 500; font-size: clamp(17px, 2.2vw, 21px);
  letter-spacing: 0.035em; color: var(--ink); white-space: nowrap;
}
.wordmark-sub {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chrome-nav { grid-area: nav; display: flex; gap: clamp(14px, 3vw, 34px); }
.chrome-nav a {
  font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2); padding: 6px 2px; border-bottom: 1px solid transparent;
}
.chrome-nav a:hover { color: var(--ink); }
.chrome-nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--brass); }

.searchbar {
  grid-area: search; display: flex; align-items: center; gap: 6px;
  background: rgba(33, 27, 19, 0.75);
  border: 1px solid var(--hairline-dim); border-radius: 2px;
  padding: 4px 6px 4px 12px; min-width: 0;
  max-width: min(420px, 44vw);
  transition: border-color 300ms var(--ease-theatre);
}
@media (max-width: 640px) {
  .searchbar { max-width: 46vw; }
}
.searchbar:focus-within { border-color: var(--hairline); }
.searchbar input {
  background: none; border: 0; color: var(--ink); font-family: var(--sans);
  font-size: 15px; min-width: 0; width: 100%; padding: 7px 0;
}
.searchbar input::placeholder { color: var(--ink-4); }
.searchbar input:focus { outline: none; }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchbar button {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: none; border: 0; color: var(--ink-3); cursor: pointer;
  border-radius: 2px;
}
.searchbar button:hover { color: var(--gold); }

.netlamp { grid-area: search; justify-self: end; align-self: start; display: none; }

/* Network / snapshot bar -------------------------------------------------------- */
.netbar {
  position: sticky; top: var(--chrome-h, 96px); z-index: 39;
  background: rgba(46, 36, 20, 0.94);
  border-bottom: 1px solid var(--hairline);
  color: var(--gold);
  font-size: 12.5px; letter-spacing: 0.06em;
  text-align: center; padding: 8px 16px;
}
.netbar[data-tone="offline"] { background: rgba(58, 32, 20, 0.95); color: #e8b890; }

/* Layout ------------------------------------------------------------------------ */
.view {
  flex: 1; width: 100%; max-width: var(--measure);
  margin: 0 auto; padding: 0 var(--gutter) 96px;
  position: relative; z-index: 1;
}

.section { margin-top: clamp(44px, 7vh, 84px); }
.kicker {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 10px;
}
.kicker::after {
  content: ""; display: block; width: 44px; height: 1px;
  background: var(--hairline); margin-top: 10px;
}
.display {
  font-family: var(--serif); font-weight: 340; line-height: 1.06;
  letter-spacing: 0.005em; margin: 0; text-wrap: balance;
  color: var(--ink);
}
.display em { font-style: italic; color: var(--gold); font-weight: 400; }
.h-display { font-size: clamp(38px, 6.4vw, 84px); }
.h-room { font-size: clamp(30px, 4.6vw, 56px); }
.h-section { font-size: clamp(24px, 3vw, 34px); }
.lede { color: var(--ink-2); max-width: 62ch; font-size: clamp(15.5px, 1.35vw, 18px); margin: 14px 0 0; }
.count-line { color: var(--ink-3); font-size: 13.5px; margin-top: 12px; letter-spacing: 0.03em; }
.count-line b { color: var(--ink-2); font-weight: 600; }

/* Provenance badge ---------------------------------------------------------------- */
.provenance {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--hairline-dim);
  padding: 6px 12px; border-radius: 2px; margin-top: 16px;
}
.provenance .pip {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}
.provenance[data-origin="live"] { color: #b9d3a6; border-color: rgba(185, 211, 166, 0.25); }
.provenance[data-origin="live"] .pip { background: #9fc57e; box-shadow: 0 0 10px rgba(159, 197, 126, 0.8); }
.provenance[data-origin="snapshot"] { color: var(--gold); border-color: var(--hairline); }
.provenance[data-origin="snapshot"] .pip { background: var(--brass); box-shadow: 0 0 10px rgba(197, 160, 92, 0.8); }
.provenance time { text-transform: none; letter-spacing: 0.02em; color: var(--ink-2); }

/* Cards — the spotlit wall --------------------------------------------------------- */
.grid { display: grid; gap: clamp(18px, 2.6vw, 34px); margin-top: 34px; }
.grid-objects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid-objects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid-objects { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: block; color: var(--ink);
  opacity: 0; transform: translateY(22px);
  animation: card-in var(--dur-reveal) var(--ease-theatre) forwards;
  animation-play-state: paused;
}
.card.is-revealed { animation-play-state: running; }
@keyframes card-in { to { opacity: 1; transform: none; } }

.card-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background:
    radial-gradient(90% 62% at 50% 26%, rgba(197, 160, 92, 0.13), transparent 62%),
    linear-gradient(175deg, var(--wall-3), var(--wall-2) 55%, #15110c);
  border: 1px solid rgba(197, 160, 92, 0.1);
  box-shadow: var(--shadow-spot);
  transition: border-color 500ms var(--ease-theatre), box-shadow 500ms var(--ease-theatre);
}
/* the ceiling spot washing the object */
.card-frame::before {
  content: ""; position: absolute; inset: -30% -18% auto; height: 96%;
  background: radial-gradient(46% 56% at 50% 18%, rgba(227, 200, 138, 0.14), transparent 70%);
  opacity: 0.75; transition: opacity 560ms var(--ease-theatre);
  pointer-events: none; z-index: 1;
}
.card:hover .card-frame, .card:focus-visible .card-frame {
  border-color: var(--hairline);
  box-shadow: 0 40px 74px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(197, 160, 92, 0.08);
}
.card:hover .card-frame::before { opacity: 1; }
.card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  padding: 11% 9% 13%;
  filter: saturate(0.96) brightness(0.98);
  transition: transform 900ms var(--ease-theatre), filter 900ms var(--ease-theatre);
  z-index: 2;
}
.card:hover .card-img { transform: translateY(-4px) scale(1.025); filter: saturate(1.02) brightness(1.04); }
.card-img[hidden] { display: none; }
.card-plate {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 6px;
  text-align: center; padding: 18%;
}
.card-plate .plate-glyph { font-family: var(--serif); font-size: 34px; color: var(--ink-4); line-height: 1; }
.card-plate .plate-note { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4); }
.card.is-person .card-frame { aspect-ratio: 4 / 5; }
.card.is-person .card-plate { place-content: center; }
.card.online-only .card-frame { opacity: 0.82; }
.card.online-only .card-title { color: var(--ink-2); }

.card-meta { padding: 14px 2px 0; }
.card-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.22; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub {
  margin-top: 6px; font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mark {
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brass); border: 1px solid var(--hairline-dim);
  padding: 3px 8px; border-radius: 1px;
}
.mark-plain { color: var(--ink-4); border-color: rgba(155, 143, 119, 0.2); }

/* Home — vestibule ------------------------------------------------------------------ */
.hero {
  display: grid; gap: clamp(26px, 4vw, 64px); align-items: center;
  grid-template-columns: 1fr; margin-top: clamp(30px, 5vh, 60px);
  min-height: min(72vh, 780px);
}
@media (min-width: 920px) { .hero { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); } }
.hero-stage {
  position: relative; aspect-ratio: 1 / 1.06; overflow: hidden;
  border: 1px solid var(--hairline-dim);
  background:
    radial-gradient(74% 54% at 50% 22%, rgba(227, 200, 138, 0.16), transparent 68%),
    linear-gradient(178deg, var(--wall-3), #151009 72%);
  box-shadow: var(--shadow-spot);
}
.hero-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 7%;
  opacity: 0; transition: opacity 1100ms var(--ease-theatre), transform 7000ms linear;
  z-index: 2;
}
.hero-stage img.is-on { opacity: 1; }
.hero-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.55);
}
.hero-copy .kicker::after { width: 56px; }
.hero-title { margin-top: 4px; }
.hero-desc {
  color: var(--ink-2); font-size: clamp(15px, 1.25vw, 17px); line-height: 1.75;
  max-width: 56ch; margin: 18px 0 0;
}
.hero-desc::first-letter { font-family: var(--serif); font-size: 1.5em; color: var(--gold); }
.hero-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 22px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid var(--hairline); color: var(--gold);
  background: rgba(197, 160, 92, 0.05);
  border-radius: 2px; cursor: pointer;
  transition: background 400ms var(--ease-theatre), border-color 400ms var(--ease-theatre), color 400ms var(--ease-theatre);
}
.btn:hover { background: rgba(197, 160, 92, 0.14); border-color: var(--brass); color: #f0d9a4; }
.btn-solid { background: var(--brass); color: #17120a; border-color: var(--brass); font-weight: 600; }
.btn-solid:hover { background: var(--gold); color: #17120a; }
.btn .arrow { font-family: var(--serif); font-size: 15px; }
.hero-dots { display: flex; gap: 10px; margin-top: 26px; }
.hero-dot {
  width: 34px; height: 44px; border: 0; padding: 0; cursor: pointer;
  background: none; position: relative;
}
.hero-dot::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%;
  height: 3px; margin-top: -1.5px; border-radius: 1px;
  background: rgba(197, 160, 92, 0.22);
  transition: background 400ms var(--ease-theatre);
}
.hero-dot[aria-current="true"]::before { background: var(--gold); }

/* Wings grid ------------------------------------------------------------------------- */
.wings { display: grid; gap: clamp(16px, 2.2vw, 28px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .wings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .wings { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wing {
  position: relative; display: flex; flex-direction: column; gap: 0;
  color: var(--ink); border-top: 1px solid var(--hairline-dim); padding-top: 18px;
  transition: border-color 500ms var(--ease-theatre);
}
.wing:hover { border-top-color: var(--brass); }
.wing-room {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 16px;
  background: radial-gradient(80% 70% at 50% 12%, rgba(197, 160, 92, 0.1), transparent 70%), var(--wall-3);
  border: 1px solid rgba(197, 160, 92, 0.08);
}
.wing-room img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; filter: saturate(0.9); transition: opacity 600ms var(--ease-theatre), transform 900ms var(--ease-theatre); }
.wing:hover .wing-room img { opacity: 1; transform: scale(1.04); }
.wing-name { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; margin: 0; }
.wing-note { color: var(--ink-3); font-size: 13px; margin-top: 6px; line-height: 1.5; min-height: 2.6em; }
.wing-count { margin-top: 10px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); }
.wing-more { margin-top: 34px; }

/* Gateway chips ------------------------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  font-family: var(--serif); font-size: 16px; color: var(--ink-2);
  border: 1px solid var(--hairline-dim); border-radius: 999px;
  transition: color 300ms var(--ease-theatre), border-color 300ms var(--ease-theatre), background 300ms var(--ease-theatre);
}
.chip:hover { color: var(--gold); border-color: var(--hairline); background: rgba(197, 160, 92, 0.06); }
.chip small { color: var(--ink-4); margin-left: 8px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; }

.gateway-cols { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 860px) { .gateway-cols { grid-template-columns: 1fr 1fr; } }
.gateway-list { display: flex; flex-direction: column; margin: 18px 0 0; padding: 0; list-style: none; }
.gateway-list li { border-bottom: 1px solid rgba(197, 160, 92, 0.08); }
.gateway-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 15px 2px; color: var(--ink-2); font-family: var(--serif); font-size: 19px;
  min-height: 44px;
  transition: color 300ms var(--ease-theatre), padding-left 300ms var(--ease-theatre);
}
.gateway-list a:hover { color: var(--gold); padding-left: 10px; }
.gateway-list .n { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.12em; color: var(--ink-4); white-space: nowrap; }

/* Object page — the plinth ----------------------------------------------------------------- */
.object-page { min-width: 0; }
.object-page > * { min-width: 0; }
.object-back { margin-top: 30px; }
.object-back a {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
  min-height: 44px; align-items: center;
}
.object-back a:hover { color: var(--gold); }
.object-page {
  display: grid; gap: clamp(28px, 4.5vw, 72px); margin-top: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) { .object-page { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.object-stage {
  position: relative; align-self: start;
  position: sticky; top: calc(var(--chrome-h, 96px) + 24px);
}
.stage-frame {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1.02;
  border: 1px solid var(--hairline-dim);
  background:
    radial-gradient(72% 52% at 50% 20%, rgba(227, 200, 138, 0.17), transparent 70%),
    linear-gradient(176deg, var(--wall-3), #141008 76%);
  box-shadow: var(--shadow-spot);
}
.stage-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5.5%; z-index: 2; transition: opacity 600ms var(--ease-theatre); }
.stage-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 160px rgba(0,0,0,0.5); pointer-events: none; z-index: 3; }
.stage-rail { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.stage-rail button {
  flex: 0 0 auto; width: 64px; height: 64px; padding: 0; cursor: pointer;
  border: 1px solid var(--hairline-dim); background: var(--wall-3);
  position: relative; overflow: hidden;
  transition: border-color 300ms var(--ease-theatre);
}
.stage-rail button img { width: 100%; height: 100%; object-fit: cover; }
.stage-rail button[aria-current="true"] { border-color: var(--gold); }
.stage-credit { margin-top: 8px; font-size: 11.5px; color: var(--ink-4); letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* The label block */
.label-block { padding-top: 6px; }
.label-titles { border-bottom: 1px solid var(--hairline-dim); padding-bottom: 22px; }
.label-title { font-family: var(--serif); font-weight: 340; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin: 0; text-wrap: balance; }
.label-alt { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); margin: 12px 0 0; line-height: 1.4; }
.label-desc { color: var(--ink-2); font-size: 16.5px; line-height: 1.8; margin: 22px 0 0; max-width: 58ch; }
.label-desc + .label-desc { margin-top: 12px; }

.label-rows { margin-top: 10px; }
.label-row { border-bottom: 1px solid rgba(197, 160, 92, 0.09); padding: 16px 0 15px; display: grid; grid-template-columns: minmax(120px, 168px) 1fr; gap: 6px 22px; }
@media (max-width: 560px) { .label-row { grid-template-columns: 1fr; gap: 4px; } }
.label-key { font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--brass); padding-top: 5px; }
.label-val { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; min-width: 0; }
.label-val a { border-bottom: 1px solid rgba(197, 160, 92, 0.3); }
.label-val a:hover { border-bottom-color: var(--gold); }
.label-val .sep { color: var(--ink-4); margin: 0 7px; }
.label-val ul { margin: 0; padding: 0; list-style: none; }
.label-val li + li { margin-top: 7px; }
.dim { color: var(--ink-3); }

.cultural-notice {
  margin: 26px 0 4px; padding: 18px 20px;
  border: 1px solid var(--hairline); border-left: 3px solid var(--brass);
  background: rgba(197, 160, 92, 0.05);
}
.cultural-notice h3 {
  margin: 0 0 8px; font-size: 11px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.cultural-notice p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }

.record-links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 14px 22px; font-size: 12.5px; color: var(--ink-4); }
.record-links a { color: var(--ink-3); border-bottom: 1px solid var(--hairline-dim); }
.record-links a:hover { color: var(--gold); }

/* Room navigation (prev / next) --------------------------------------------------------------- */
.room-nav {
  margin-top: clamp(48px, 8vh, 90px);
  border-top: 1px solid var(--hairline-dim);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.room-nav a {
  display: flex; flex-direction: column; gap: 8px; padding: 26px 8px 10px;
  min-height: 96px; color: var(--ink-2);
  transition: background 400ms var(--ease-theatre);
}
.room-nav a:hover { background: rgba(197, 160, 92, 0.04); }
.room-nav .dir { font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--brass); }
.room-nav .obj { font-family: var(--serif); font-size: clamp(16px, 1.7vw, 21px); color: var(--ink); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room-nav a.next { text-align: right; align-items: flex-end; border-left: 1px solid var(--hairline-dim); padding-left: 20px; }
.room-nav a.prev { padding-right: 20px; }
.room-nav .ghost { visibility: hidden; }

/* Pagination ------------------------------------------------------------------------------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; border-top: 1px solid var(--hairline-dim); padding-top: 22px; }
.pager-info { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.pager-actions { display: flex; gap: 12px; }

/* States ----------------------------------------------------------------------------------------- */
.state { display: grid; place-items: center; text-align: center; padding: clamp(60px, 14vh, 160px) 20px; gap: 6px; }
.state-glyph { font-family: var(--serif); font-size: clamp(40px, 6vw, 64px); color: var(--ink-4); line-height: 1; }
.state-title { font-family: var(--serif); font-weight: 340; font-size: clamp(24px, 3vw, 34px); color: var(--ink); margin: 14px 0 0; }
.state-copy { color: var(--ink-3); max-width: 52ch; margin: 10px 0 0; font-size: 15px; line-height: 1.7; }
.state-actions { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.skeleton-grid { display: grid; gap: clamp(18px, 2.6vw, 34px); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 34px; }
@media (min-width: 700px) { .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .skeleton-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.skeleton-card { aspect-ratio: 4 / 6.4; }
.skeleton-frame { aspect-ratio: 4 / 5; border: 1px solid var(--hairline-dim); background: linear-gradient(100deg, var(--wall-2) 30%, var(--wall-3) 48%, var(--wall-2) 64%); background-size: 240% 100%; animation: shimmer 2000ms infinite linear; }
@keyframes shimmer { to { background-position: -140% 0; } }
.skeleton-line { height: 12px; margin-top: 14px; border-radius: 1px; background: linear-gradient(100deg, var(--wall-2) 30%, var(--wall-3) 48%, var(--wall-2) 64%); background-size: 240% 100%; animation: shimmer 2000ms infinite linear; }
.skeleton-line.w2 { width: 62%; }
.state-note { margin-top: 18px; font-size: 12px; color: var(--ink-4); letter-spacing: 0.06em; }

.snapshot-scope-note {
  margin-top: 22px; padding: 12px 16px; border: 1px dashed var(--hairline-dim);
  color: var(--ink-3); font-size: 13px; line-height: 1.6;
}

/* Person page -------------------------------------------------------------------------------------- */
.person-page { max-width: 760px; }
.person-name { font-family: var(--serif); font-weight: 340; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; margin: 6px 0 0; }
.person-roles { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Colophon ------------------------------------------------------------------------------------------ */
.colophon { border-top: 1px solid var(--hairline-dim); margin-top: 40px; }
.colophon-inner { max-width: var(--measure); margin: 0 auto; padding: 34px var(--gutter) 44px; }
.colophon-line { color: var(--ink-3); font-size: 13px; line-height: 1.7; margin: 0 0 6px; }
.colophon-line strong { color: var(--ink-2); font-weight: 600; }
.colophon-fine { color: var(--ink-4); font-size: 11.5px; letter-spacing: 0.05em; margin: 10px 0 0; }

.noscript-note { max-width: var(--measure); margin: 60px auto; padding: 0 24px; text-align: center; color: var(--ink-2); }
.noscript-note a { color: var(--gold); }

/* Mobile refinements ---------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .chrome { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "mark search" "nav nav"; row-gap: 8px; padding-top: 12px; }
  .wordmark { min-height: 48px; justify-content: center; }
  .wordmark-sub { font-size: 9px; letter-spacing: 0.18em; }
  .searchbar { padding-left: 10px; max-width: 46vw; min-height: 48px; }
  .searchbar input { font-size: 16px; min-height: 44px; } /* defeat iOS zoom; touch box */
  .searchbar button { width: 44px; height: 44px; flex: 0 0 44px; }
  .chrome-nav { gap: clamp(14px, 5vw, 30px); }
  .chrome-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 2px; }
  .hero { min-height: 0; }
  .hero-copy { margin-top: 26px; }
  .object-stage { position: static; }
  .grid-objects { gap: 16px; }
  .card-meta { padding-top: 11px; }
  .card-sub { font-size: 16px; margin-top: 7px; }
  .wing-note { font-size: 16px; min-height: 0; }
  .lede, .hero-desc, .state-copy { font-size: 16px; }
  .label-val { font-size: 16px; }
  .label-desc { font-size: 16.5px; }
  .count-line { font-size: 14px; }
  .room-nav a { min-height: 84px; padding: 20px 4px 8px; }
  .room-nav a.next { padding-left: 12px; }
  .room-nav a.prev { padding-right: 12px; }
  .pager { flex-wrap: wrap; }
  .view { padding-bottom: 72px; }
  .stage-rail button { width: 56px; height: 56px; }
  .stage-rail { scroll-snap-type: x mandatory; }
  .stage-rail button { scroll-snap-align: start; }
  .hero-dot { width: 44px; flex: 0 0 44px; }
}

/* Touch targets: every actionable inline control gets a >=44px hit box on
   narrow viewports and coarse pointers alike */
@media (max-width: 640px), (pointer: coarse) {
  .label-val a, .record-links a, .gateway-list a, .chip, .btn,
  .chrome-nav a, .stage-rail button, .hero-dot, .room-nav a {
    min-height: 44px;
  }
  .label-val a, .record-links a {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 2px 2px; margin: 1px 0;
  }
}

/* Touch hint -------------------------------------------------------------------------------------------- */
.swipe-hint { display: none; }
@media (pointer: coarse) {
  .swipe-hint {
    display: flex; align-items: center; gap: 10px; margin-top: 14px;
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-4);
  }
  .swipe-hint .arrows { letter-spacing: 0.3em; color: var(--brass); }
}

/* Reduced motion ------------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .card { opacity: 1; transform: none; animation: none; }
  .hero-stage img { transition: opacity 200ms linear; }
}

/* Print — a quiet catalogue sheet ----------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #111; }
  .chrome, .netbar, .grain, .room-nav, .pager, .colophon-fine { display: none; }
  .card-frame, .stage-frame { border: 1px solid #999; }
}
