/* ============================================================
   styles.css — The Human Journey
   Natural History Museum: charcoal, ivory, brass; serif display.
   ============================================================ */
:root {
  --ink: #0d100e;
  --ink-2: #14181a;
  --panel: rgba(20, 24, 26, 0.82);
  --panel-solid: #161a1c;
  --hair: rgba(232, 224, 205, 0.14);
  --ivory: #ece5d6;
  --ivory-dim: #b9b3a4;
  --ivory-faint: #8a857a;
  --brass: #c79a4e;
  --brass-bright: #e0b766;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 800px at 60% 30%, #182026 0%, #0b0e0c 60%, #07090a 100%);
  color: var(--ivory);
  font-family: var(--body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#root { height: 100vh; width: 100vw; }

.stage { position: fixed; inset: 0; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#globe:active { cursor: grabbing; }

/* ---- vignette + texture ---- */
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%);
  z-index: 2;
}

/* ---- on-page Layers toggle box (top-centre) ---- */
.layers-box { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 5px;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 30px; padding: 6px 8px 6px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.layers-box .lb-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ivory-faint); margin: 0 6px 0 0; }
.lb-row { display: flex; align-items: center; gap: 7px; background: rgba(232,224,205,0.04);
  border: 1px solid transparent; cursor: pointer; padding: 6px 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ivory-faint); border-radius: 20px; transition: all 0.15s; }
.lb-row:hover { background: rgba(232,224,205,0.09); }
.lb-row.on { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.lb-row .lb-check { width: 8px; height: 8px; border-radius: 50%; background: var(--ivory-faint);
  flex: none; transition: all 0.15s; }
.lb-row.on .lb-check { background: var(--ink); }

/* globe-type selector (sits just below the Map layers box) */
.globe-box { position: absolute; left: 34px; bottom: 30px; z-index: 5;
  display: flex; align-items: center; gap: 5px;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 30px; padding: 5px 8px 5px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.gt-row { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ivory-faint); background: rgba(232,224,205,0.04); border: 1px solid transparent;
  padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all 0.15s; }
.gt-row:hover { background: rgba(232,224,205,0.09); color: var(--ivory); }
.gt-row.on { color: var(--ink); background: var(--brass); border-color: var(--brass); }

/* draggable panels (Play mode) */
.draggable { cursor: grab; }
.draggable:active { cursor: grabbing; }
.draggable .leg-item, .draggable .lb-row, .draggable .gt-row,
.draggable button, .draggable .tl-track, .draggable .pg-scale { cursor: pointer; }
.draggable .tl-thumb { cursor: grab; }
.mast-grab { pointer-events: auto; display: inline-block; }

/* ---- in-film religion key (left, under the population graph) ---- */
.story-religions { position: fixed; left: 30px; right: auto; top: calc(9vh + 246px); bottom: auto; z-index: 9;
  pointer-events: none; min-width: 224px;
  background: rgba(8,10,9,0.46); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--hair); border-radius: 3px; padding: 11px 14px; }
.story-religions .sr-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ivory-faint); margin: 0 0 8px; }
.story-religions .sr-row { display: flex; align-items: flex-start; gap: 9px; margin: 5px 0;
  font-family: var(--body); font-size: 12px; line-height: 1.2; color: var(--ivory-dim); }
.story-religions .sr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 3px; border: 1px solid transparent; }
.story-religions .sr-none { color: var(--ivory-faint); font-style: italic; }
.story-religions .sr-row.sr-dim { opacity: 0.4; }
.story-religions .sr-row.sr-dim .sr-dot { box-shadow: none; }

@media (max-width: 900px) {
  .story-legend, .story-religions { display: none; }
  .layers-box .lb-title { display: none; }
}

/* ---- mobile-only readout (population + live beliefs, under the title) ---- */
.mobile-readout { display: none; }
.mobile-readout .mr-pop { display: inline-flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 4px; padding: 8px 14px; pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.mobile-readout .mr-time { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.mobile-readout .mr-big { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1;
  color: var(--ivory); font-variant-numeric: tabular-nums; }
.mobile-readout .mr-unit { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass); }
.mobile-readout .mr-cal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--brass-bright); font-weight: 600; }
.mobile-readout .mr-div { align-self: stretch; width: 1px; background: var(--hair); flex: none; margin: 2px 0; }
.mobile-readout .mr-pop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mobile-readout .mr-lab { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-faint); }
.mobile-readout .mr-val { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1;
  color: var(--brass-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mobile-readout .mr-faiths { margin-top: 8px; }
.mobile-readout .mr-faiths-lab { margin: 0 0 7px; }
.mobile-readout .mr-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mobile-readout .mr-chip { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 12px; line-height: 1; color: var(--ivory-dim);
  background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hair); border-radius: 20px; padding: 5px 10px 5px 8px; cursor: pointer; }
.mobile-readout .mr-chip.on { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.mobile-readout .mr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none;
  box-shadow: 0 0 5px currentColor; }
.mobile-readout .mr-none { font-family: var(--body); font-size: 13px; color: var(--ivory-faint); }

/* ---- global UI chrome scale (keeps panels small so the globe breathes) ---- */
.ui-scale { position: fixed; inset: 0; pointer-events: none; zoom: 0.85; z-index: 4; }
/* any-corner resize handles + photo box under the title */
.rsz-h { position: absolute; width: 20px; height: 20px; z-index: 1000; pointer-events: auto; }
.rsz-nw { top: 0; left: 0; cursor: nwse-resize; }
.rsz-ne { top: 0; right: 0; cursor: nesw-resize; }
.rsz-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.rsz-se { bottom: 0; right: 0; cursor: nwse-resize; }
.cap-under { position: fixed; right: 34px; left: auto; bottom: 26px; width: 360px; z-index: 8; }
.cap-under .cap-gallery { width: 100%; animation: none; }
.ui-scale > *:not(.story-overlay) { pointer-events: auto; }

/* ---- population graph (both modes) ---- */
.pop-graph { z-index: 9; background: rgba(8,10,9,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hair); border-radius: 4px; padding: 9px 11px 6px; }
.pop-graph.explore { position: fixed; left: 34px; bottom: 248px; box-shadow: 0 14px 36px rgba(0,0,0,0.45);
  overflow: hidden; min-width: 220px; min-height: 96px; display: flex; flex-direction: column; }
.pop-graph.explore svg { width: 100%; height: 100%; flex: 1; min-height: 0; display: block; }
.pop-graph.film { position: fixed; left: 30px; top: calc(9vh + 92px); pointer-events: none; }
.pop-graph .pg-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-faint); margin: 0 0 4px; }
.pop-graph .pg-grid { stroke: rgba(232,224,205,0.12); stroke-width: 0.5; }
.pop-graph .pg-axislabel { fill: var(--ivory-faint); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.04em; }
.pop-graph .pg-area { fill: rgba(199,154,78,0.14); }
.pop-graph .pg-line { fill: none; stroke: var(--brass-bright); stroke-width: 1.6; }
.pop-graph .pg-marker { stroke: var(--ivory); stroke-width: 0.7; stroke-dasharray: 2 2; opacity: 0.5; }
.pop-graph .pg-dot { fill: var(--ivory); stroke: var(--brass); stroke-width: 1.5; }
.pop-graph .pg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.pop-graph .pg-head .pg-title { margin: 0; }
.pg-scale { display: inline-flex; border: 1px solid var(--hair); border-radius: 20px; overflow: hidden;
  background: rgba(232,224,205,0.04); cursor: pointer; padding: 0; }
.pg-scale span { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; padding: 2px 6px; color: var(--ivory-faint); }
.pg-scale span.on { background: var(--brass); color: var(--ink); }
.pg-scale-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; color: var(--ivory-faint); text-transform: uppercase; }

/* speed control */
.speed-ctrl { display: inline-flex; align-items: center; gap: 2px; padding: 3px 5px;
  border: 1px solid var(--hair); border-radius: 20px; background: rgba(232,224,205,0.05); }
.speed-ctrl .sp-ic { display: grid; place-items: center; color: var(--brass); width: 15px; height: 15px; margin-right: 2px; }
.speed-ctrl .sp-ic svg { width: 13px; height: 13px; }
.speed-ctrl .sp-btn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; color: var(--ivory-dim);
  background: none; border: none; border-radius: 12px; padding: 3px 6px; cursor: pointer; line-height: 1; }
.speed-ctrl .sp-btn:hover { color: var(--ivory); }
.speed-ctrl .sp-btn.on { background: var(--brass); color: var(--ink); }
.speed-ctrl.dark { background: rgba(8,10,9,0.5); }

@media (max-width: 900px) { .pop-graph { display: none; } }

/* ---- masthead ---- */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 26px 34px; pointer-events: none;
}
.masthead .eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 4px;
}
.masthead h1 {
  font-family: var(--serif); font-weight: 600; font-size: 30px;
  letter-spacing: 0.01em; margin: 0; line-height: 1; color: var(--ivory);
}
.masthead h1 em { font-style: italic; color: var(--brass-bright); }
.credit { text-align: left; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.14em; color: var(--ivory-faint); text-transform: uppercase; margin: 9px 0 0; }
/* consolidated top-right toolbar */
.toolbar { position: absolute; top: 14px; right: 34px; z-index: 6; display: flex; align-items: center; gap: 7px;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 24px; padding: 5px 6px 5px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.tb-group { display: inline-flex; align-items: center; gap: 7px; }
.tb-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ivory-faint); }
.tb-select { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ivory-dim); background: rgba(232,224,205,0.05);
  border: 1px solid var(--hair); border-radius: 18px; padding: 4px 22px 4px 11px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23c79a4e' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; }
.tb-select:hover { color: var(--ivory); border-color: rgba(232,224,205,0.3); }
.tb-select option { background: var(--panel-solid); color: var(--ivory); text-transform: none; }
.tb-about { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: var(--brass); border: 1px solid var(--brass); border-radius: 18px;
  padding: 5px 14px; cursor: pointer; }
.tb-about:hover { background: var(--brass-bright); border-color: var(--brass-bright); }

/* "Explore" app-switcher dropdown — identical across modules */
.tb-related { position: relative; display: inline-flex; }
.tb-related-btn { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ivory-dim); background: rgba(232,224,205,0.05);
  border: 1px solid var(--hair); border-radius: 18px; padding: 5px 13px; cursor: pointer; transition: all 0.16s; }
.tb-related-btn:hover { color: var(--ivory); border-color: rgba(232,224,205,0.3); }
.tb-related-btn.on { color: var(--ivory); border-color: rgba(232,224,205,0.32); background: rgba(232,224,205,0.08); }
.tb-related-globe { width: 12px; height: 12px; margin-left: -2px; }
.tb-related-caret { width: 11px; height: 11px; margin-right: -3px; transition: transform 0.16s; }
.tb-related-btn.on .tb-related-caret { transform: rotate(180deg); }
.tb-related-menu { position: absolute; top: calc(100% + 9px); right: 0; min-width: 246px; z-index: 40;
  background: var(--panel-solid); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hair); border-radius: 14px; padding: 7px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5); animation: tbRelIn 0.16s ease; text-transform: none; }
@keyframes tbRelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.tb-related-head { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brass); margin: 5px 9px 7px; }
.tb-related-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  text-decoration: none; transition: background 0.13s; cursor: pointer; }
.tb-related-item:hover { background: rgba(232,224,205,0.07); }
.tb-related-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(199,154,78,0.12); border: 1px solid rgba(199,154,78,0.22); color: var(--brass-bright); }
.tb-related-ic svg { width: 16px; height: 16px; }
.tb-related-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tb-related-lab { font-family: var(--serif, Georgia), serif; font-size: 15px; font-weight: 600; line-height: 1.15; color: var(--ivory); letter-spacing: 0; }
.tb-related-note { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-dim); line-height: 1.3; }
.tb-related-go { flex: none; width: 15px; height: 15px; color: var(--ivory-dim); opacity: 0; transform: translateX(-3px); transition: all 0.14s; }
.tb-related-item:hover .tb-related-go { opacity: 1; transform: translateX(0); color: var(--brass-bright); }
.mobile-only { display: none; }
.tb-panel { place-items: center; width: 30px; height: 28px; border-radius: 16px;
  background: rgba(232,224,205,0.05); border: 1px solid var(--hair); color: var(--ivory-dim); cursor: pointer; }
.tb-panel:hover { color: var(--ivory); }
/* mobile controls bottom-sheet */
.sheet-overlay { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end;
  background: rgba(6,8,7,0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  pointer-events: auto; animation: aboutFade 0.25s ease both; }
.sheet { position: relative; width: 100%; max-height: 82vh; overflow-y: auto;
  background: var(--panel-solid); border-top: 1px solid var(--hair);
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6); animation: sheetUp 0.34s cubic-bezier(.2,.7,.2,1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 3px; background: var(--hair); margin: 0 auto 12px; }
.sheet-close { top: 12px; right: 12px; }
.sheet .pop-graph { position: static !important; transform: none !important; margin: 0 auto 6px; pointer-events: auto; }
.sheet-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-faint); margin: 18px 0 9px; }
.sheet-layers { display: flex; flex-wrap: wrap; gap: 7px; }
.sheet-focus { margin: 0 0 10px; }
.sheet-beliefs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
@media (max-width: 880px) { .tb-group { display: none; } }
.about-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(6,8,7,0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  pointer-events: auto; animation: aboutFade 0.3s ease both; padding: 4vh 20px; }
@keyframes aboutFade { from { opacity: 0; } to { opacity: 1; } }
.about-card { position: relative; width: min(640px, 92vw); max-height: 92vh; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--hair); border-radius: 6px;
  padding: 38px 40px 34px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: aboutRise 0.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes aboutRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.about-close { position: absolute; top: 16px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(232,224,205,0.06); border: 1px solid var(--hair);
  color: var(--ivory-dim); font-size: 13px; cursor: pointer; }
.about-close:hover { color: var(--ivory); background: rgba(232,224,205,0.12); }
.about-title { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.05;
  color: var(--ivory); margin: 0 0 14px; }
.about-intro { font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ivory-dim);
  margin: 0 0 26px; text-wrap: pretty; border-left: 2px solid var(--brass); padding-left: 16px; }
.about-sec { margin-bottom: 20px; }
.about-sec h3 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brass-bright); margin: 0 0 7px; }
.about-sec p { font-family: var(--body); font-size: 14.5px; line-height: 1.62; color: var(--ivory-dim);
  margin: 0; text-wrap: pretty; }
.about-learn { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair); }
.about-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.about-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(232,224,205,0.07); }
.about-links li:last-child { border-bottom: none; }
.about-links a { font-family: var(--body); font-size: 14.5px; line-height: 1.4; color: var(--brass-bright);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s, color 0.15s; }
.about-links a:hover { color: var(--ivory); border-bottom-color: var(--ivory); }
.about-links .al-note { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ivory-faint); }

/* ---- narrative panel (left) ---- */
.reader {
  position: fixed; top: 96px; left: 34px; width: 360px; z-index: 4;
  background: var(--panel);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 22px 24px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.reader .chapter-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 8px;
  display: flex; align-items: center; gap: 8px;
}
.reader .chapter-kicker::before {
  content: ""; width: 18px; height: 1px; background: var(--brass); display: inline-block;
}
.reader h2 {
  font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.05;
  margin: 0 0 12px; color: var(--ivory);
}
.reader p {
  font-size: 15px; line-height: 1.62; color: var(--ivory-dim); margin: 0;
  text-wrap: pretty;
}
.reader .read-fade { transition: opacity 0.45s ease; }

/* religion focus card appended in reader */
.relfocus {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair);
}
.relfocus .rf-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.relfocus .dot { width: 11px; height: 11px; border-radius: 50%; flex: none;
  box-shadow: 0 0 10px currentColor; }
.relfocus h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0; }
.relfocus .rf-when { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ivory-faint); text-transform: uppercase; margin: 0 0 9px; }
.relfocus p { font-size: 13.5px; line-height: 1.55; }
.relfocus .rf-ex { margin-top: 9px; font-size: 12px; color: var(--ivory-faint);
  font-style: italic; line-height: 1.5; }

/* ---- legend (right) ---- */
.legend {
  position: fixed; top: 96px; right: 34px; width: 232px; z-index: 4;
  max-height: calc(100vh - 200px); overflow: auto; min-width: 200px; min-height: 140px;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 3px; padding: 16px 16px 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.legend .leg-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ivory-faint); margin: 0 0 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.legend .leg-title button {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--brass);
  background: none; border: none; cursor: pointer; text-transform: uppercase;
}
.legend .leg-handle { display: inline-flex; align-items: center; gap: 8px; cursor: grab; }
.legend:active .leg-handle { cursor: grabbing; }
.legend .leg-grip { width: 9px; height: 11px; flex: none;
  background-image: radial-gradient(currentColor 41%, transparent 43%);
  background-size: 4px 4px; background-position: 0 0; color: var(--ivory-faint); opacity: 0.6; }
.legend .leg-handle:hover .leg-grip { opacity: 0.95; color: var(--brass); }
.leg-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 4px; background: none; border: none; cursor: pointer;
  font-family: var(--body); text-align: left; border-radius: 3px;
  transition: background 0.15s;
}
.leg-item:hover { background: rgba(232,224,205,0.05); }
.leg-item .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none;
  border: 1px solid rgba(255,255,255,0.25); transition: all 0.2s; }
.leg-item .lname { font-size: 13px; color: var(--ivory); line-height: 1.15; }
.leg-item .ldate { font-family: var(--mono); font-size: 9px; color: var(--ivory-faint);
  letter-spacing: 0.06em; }
.leg-item.off { opacity: 0.34; }
.leg-item.off .swatch { background: transparent !important; }
.leg-item.dormant .lname { color: var(--ivory-faint); }
.leg-item .pip { width: 5px; height: 5px; border-radius: 50%; margin-left: auto; flex: none;
  background: var(--brass-bright); box-shadow: 0 0 6px var(--brass-bright); opacity: 0; }
.leg-item.live .pip { opacity: 1; }

/* ---- timeline (bottom) ---- */
.timeline {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px;
  width: min(880px, calc(100vw - 80px)); z-index: 6;
  background: var(--panel); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hair); border-radius: 4px;
  padding: 16px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.tl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 16px; }
.tl-date { display: flex; align-items: baseline; gap: 12px; }
.tl-date .big { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1;
  color: var(--ivory); font-variant-numeric: tabular-nums; }
.tl-date .unit { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brass); }
.tl-date .cal { font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em;
  color: var(--brass-bright); font-weight: 600; }
.tl-date .era { font-family: var(--mono); font-size: 11px; color: var(--ivory-faint);
  letter-spacing: 0.08em; }
.tl-pop { display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  padding: 0 14px; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.tl-pop .lab { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-faint); }
.tl-pop .val { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--brass-bright);
  font-variant-numeric: tabular-nums; margin-top: 1px; }
.tl-controls { display: flex; align-items: center; gap: 8px; }

.btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ivory); background: rgba(232,224,205,0.06);
  border: 1px solid var(--hair); border-radius: 3px; padding: 8px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: all 0.16s;
}
.btn:hover { background: rgba(232,224,205,0.12); border-color: rgba(232,224,205,0.3); }
.btn.primary { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.btn.primary:hover { background: var(--brass-bright); }
.btn svg { width: 12px; height: 12px; }

/* slider track with era ticks */
.tl-track-wrap { position: relative; padding-top: 4px; }
.tl-ticks { position: relative; height: 16px; margin-bottom: 2px; }
.tl-tick { position: absolute; transform: translateX(-50%);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em;
  color: var(--ivory-faint); white-space: nowrap; }
.tl-tick::after { content: ""; position: absolute; left: 50%; top: 13px; width: 1px;
  height: 5px; background: var(--hair); }
.tl-track { position: relative; height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, #2a2018, #20262a);
  border: 1px solid var(--hair); cursor: pointer; }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(199,154,78,0.25), var(--brass)); }
.tl-thumb { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ivory); border: 2px solid var(--brass);
  transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,0.6); cursor: grab; }
.tl-thumb:active { cursor: grabbing; }
.tl-era-band { position: absolute; top: 0; bottom: 0; opacity: 0.0; }

/* hint */
.hint { position: absolute; bottom: 132px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ivory-faint); z-index: 4; pointer-events: none; opacity: 0.7;
  transition: opacity 0.6s; }
.hint.gone { opacity: 0; }

/* ---- story / video mode ---- */
.story-overlay { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.story-caption {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 130px)); text-align: center;
}
.story-caption .sc-kicker { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--brass-bright); margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.95), 0 0 2px rgba(0,0,0,0.8); }
.story-caption .sc-body { font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.36; margin: 0; color: var(--ivory);
  text-shadow: 0 2px 24px rgba(0,0,0,0.95); text-wrap: balance; }
.story-cap-anim { animation: capIn 0.9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes capIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.story-bars { position: fixed; inset: 0; z-index: 7; pointer-events: none; }
.story-bars::before, .story-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 9vh; background: #000;
}
.story-bars::before { top: 0; } .story-bars::after { bottom: 0; }

.story-controls {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 9;
  display: flex; align-items: center; gap: 16px;
  background: rgba(8,10,9,0.7); backdrop-filter: blur(8px);
  border: 1px solid var(--hair); border-radius: 40px; padding: 9px 9px 9px 18px;
}
.story-progress { width: min(420px, 50vw); height: 4px; background: rgba(232,224,205,0.16);
  border-radius: 3px; overflow: hidden; }
.story-progress .pg { height: 100%; background: var(--brass); width: 0%; }
.story-time { font-family: var(--mono); font-size: 11px; color: var(--ivory-dim);
  letter-spacing: 0.08em; min-width: 64px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brass); color: var(--ink); border: none; cursor: pointer; }
.icon-btn.ghost { background: rgba(232,224,205,0.08); color: var(--ivory); }
.icon-btn svg { width: 16px; height: 16px; }

.story-title-card { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center;
  text-align: center; pointer-events: none; }
.story-title-card .stc-inner { max-width: 640px; padding: 0 30px; }
.story-title-card .stc-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 18px; }
.story-title-card h2 { font-family: var(--serif); font-weight: 600; font-size: 58px; line-height: 1.02;
  margin: 0; color: var(--ivory); }
.story-title-card h2 em { font-style: italic; color: var(--brass-bright); }

.fade-in { animation: fadeIn 1.1s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- in-film year readout (top center) ---- */
.story-year {
  position: fixed; top: calc(9vh + 22px); left: 50%; transform: translateX(-50%);
  z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; pointer-events: none;
  text-shadow: 0 2px 18px rgba(0,0,0,0.85);
}
.story-year .sy-num { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1;
  color: var(--ivory); font-variant-numeric: tabular-nums; }
.story-year .sy-unit { font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--brass); margin-top: 3px; }
.story-year .sy-cal { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ivory-faint); margin-top: 2px; }
.story-year .sy-pop { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--brass-bright); margin-top: 8px; }

/* ---- in-film legend (bottom-left) ---- */
.story-legend {
  position: fixed; left: 30px; bottom: calc(9vh + 22px); z-index: 9;
  pointer-events: none;
  background: rgba(8,10,9,0.46); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--hair); border-radius: 3px; padding: 12px 14px;
}
/* Play: film caption + "On the map" legend reused alongside the explore chrome */
.play-overlay .story-caption { bottom: 178px; }
.play-caption { opacity: 1; transition: opacity 0.35s ease; }
.story-legend.play-onmap { left: 34px; right: auto; bottom: 80px; top: auto; padding: 10px 13px; z-index: 11;
  pointer-events: auto; overflow: hidden; min-width: 150px; min-height: 88px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.45); }
.story-legend.play-onmap .sl-row { margin: 4px 0; font-size: 11.5px; }
.story-legend .sl-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ivory-faint); margin: 0 0 9px; }
.story-legend .sl-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; min-height: 14px;
  font-family: var(--body); font-size: 12.5px; color: var(--ivory-dim); white-space: nowrap; }
.story-legend .sl-g { width: 22px; height: 12px; flex: none; display: inline-block; position: relative; }
.story-legend .sl-region { border-radius: 3px;
  background: radial-gradient(circle at 50% 50%, rgba(224,164,74,0.55), rgba(224,164,74,0.12)); }
.story-legend .sl-route::before { content: ""; position: absolute; top: 50%; left: 0; right: 0;
  border-top: 2px dashed #84e0f0; }
.story-legend .sl-dot::before { content: ""; position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%,-50%);
  background: #e8fdff; box-shadow: 0 0 7px rgba(130,224,242,0.9); }
.story-legend .sl-faith::before { content: ""; position: absolute; top: 50%; left: 50%;
  width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%,-50%);
  background: #5a72b8;
  box-shadow: 0 0 0 3px rgba(90,114,184,0.4), 0 0 10px rgba(90,114,184,0.7); }
.story-legend .sl-flow::before { content: ""; position: absolute; top: 50%; left: 0; right: 0;
  border-top: 2px solid transparent;
  background-image: linear-gradient(90deg, #c2553e, #cda544, #5a72b8); background-size: 100% 2px;
  background-repeat: no-repeat; background-position: 0 50%; height: 2px; box-shadow: 0 0 6px rgba(200,120,90,0.5); }
.story-legend .sl-bar { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.story-legend .sl-bar::before, .story-legend .sl-bar::after { content: ""; width: 3px;
  background: linear-gradient(to top, rgba(240,140,190,0.25), #ffc6e2); border-radius: 1px; }
.story-legend .sl-bar::before { height: 6px; }
.story-legend .sl-bar::after { height: 12px; }

/* ---- Tweaks panel: smaller + auto-fade, hidden during the film ---- */
.twk-panel { width: 212px !important;
  transform: scale(calc(var(--dc-inv-zoom, 1) * 0.92)) !important;
  animation: twkFade 0.7s 4.5s forwards; }
.twk-panel:hover { animation: none; opacity: 1; }
@keyframes twkFade { to { opacity: 0.28; } }
body.in-story .twk-panel { display: none !important; }

/* dim chrome during story */
.dim-chrome .reader, .dim-chrome .legend, .dim-chrome .timeline, .dim-chrome .masthead, .dim-chrome .hint {
  opacity: 0; pointer-events: none; transition: opacity 0.5s;
}

@media (max-width: 880px) {
  .reader, .legend { display: none; }
}

/* ---- phones ---- */
@media (max-width: 640px) {
  .ui-scale { zoom: 1; }                 /* full-size touch targets on phones */
  .masthead { padding: 10px 12px; flex-direction: column; align-items: stretch; }
  .masthead .eyebrow { font-size: 8.5px; letter-spacing: 0.18em; margin-bottom: 2px; }
  .masthead h1 { font-size: 25px; }
  .credit { display: none; }
  /* on mobile the title is fixed in place — only the counter below it drags */
  .mast-grab { cursor: default; pointer-events: none; }

  .toolbar { top: 8px; right: 8px; gap: 5px; padding: 4px 5px 4px 9px; border-radius: 20px; }
  .mobile-only { display: grid; }
  .tb-select { font-size: 9.5px; padding: 4px 20px 4px 9px; }
  .tb-about { font-size: 9.5px; padding: 6px 11px; }

  .layers-box, .pop-graph, .reader, .legend, .hint, .story-legend.play-onmap { display: none; }

  /* the readout flows directly below the title inside the masthead — no fixed
     offset, so it can never overlap the title however it wraps. Sits high,
     tucked under the title, to stay clear of the globe's ice caps below */
  .mobile-readout { display: block; margin-top: 4px; pointer-events: none; }
  .mobile-readout .mr-chip { pointer-events: auto; }
  /* the year+population counter can be dragged anywhere on the map */
  .mobile-readout .mr-pop { pointer-events: auto; cursor: grab; touch-action: none;
    position: relative; z-index: 6; }
  .mobile-readout .mr-pop:active { cursor: grabbing; }

  /* year/date is shown in the top readout now — drop it from the bottom slider */
  .tl-date { display: none; }
  .tl-top { justify-content: flex-end; margin-bottom: 11px; }

  .play-overlay .story-caption { bottom: 144px; width: calc(100vw - 28px); }
  .story-caption .sc-kicker { font-size: 12px; letter-spacing: 0.16em; margin-bottom: 8px; }
  .story-caption .sc-body { font-size: clamp(16px, 4.4vw, 20px); line-height: 1.34; }

  .timeline { width: calc(100vw - 14px); bottom: 10px; padding: 12px 14px 14px; border-radius: 12px; }
  .tl-top { gap: 8px; margin-bottom: 9px; }
  .tl-pop { display: none; }
  .tl-date { gap: 7px; align-items: baseline; }
  .tl-date .big { font-size: 21px; }
  .tl-date .unit { font-size: 9.5px; letter-spacing: 0.1em; }
  .tl-date .cal { font-size: 12px; }
  .tl-date .era { display: none; }
  .tl-controls { gap: 6px; }
  .speed-ctrl { padding: 2px 4px; }
  .speed-ctrl .sp-btn { font-size: 9px; padding: 3px 5px; }
  .btn { font-size: 11px; padding: 7px 13px; }
  .tl-tick { font-size: 7.5px; }
  .about-card { padding: 30px 22px 26px; }
  .about-title { font-size: 26px; }
}

/* ============================================================
   caption photo gallery
   ============================================================ */
/* lower-right stack: gallery card sits above the "On the map" key */
.br-stack {
  position: fixed; right: 34px; bottom: 26px; z-index: 9;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
  pointer-events: none;
}
.br-stack > * { pointer-events: auto; }
.br-stack .story-legend.play-onmap {
  position: static; left: auto; right: auto; top: auto; bottom: auto;
}

/* desktop carousel card */
.cap-gallery {
  width: 480px;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: 14px; padding: 9px 9px 8px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
  animation: cgIn 0.45s ease both;
}
/* "Gallery" link that sits just above the photo */
.cg-gallery-link {
  display: flex; align-items: center; gap: 5px; margin: 1px 2px 7px auto;
  background: none; border: none; cursor: pointer; padding: 2px 2px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass-bright); opacity: 0.92; transition: opacity 0.15s, color 0.15s;
}
.cg-gallery-link:hover { opacity: 1; color: var(--ivory); }
.cg-gallery-link svg { display: block; }
@keyframes cgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cg-frame {
  position: relative; width: 100%; aspect-ratio: 22 / 15; overflow: hidden;
  border-radius: 9px; background: #0d100e; border: 1px solid rgba(199,154,78,0.28);
}
.cg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.7s ease; user-select: none;
}
.cg-img.on { opacity: 1; }
/* faint brass corner tick, museum-plate flavour */
.cg-corner { position: absolute; top: 6px; left: 6px; width: 12px; height: 12px;
  border-top: 1px solid rgba(224,183,102,0.7); border-left: 1px solid rgba(224,183,102,0.7);
  pointer-events: none; }
.cg-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px 2px; }
.cg-cap { font-family: var(--body); font-size: 12px; line-height: 1.32; color: var(--ivory); text-wrap: pretty; }
.cg-credit { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ivory-faint); }
.cg-dots { display: flex; justify-content: center; gap: 7px; padding: 7px 0 2px; }
.cg-dot { width: 6px; height: 6px; padding: 0; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--brass); opacity: 0.5; transition: opacity 0.2s, background 0.2s; }
.cg-dot:hover { opacity: 0.85; }
.cg-dot.on { background: var(--brass); opacity: 1; }

/* keep the card from crowding the belief legend on short screens */
@media (max-height: 820px) { .cap-gallery { width: 356px; } }
@media (max-height: 660px) { .cap-gallery { width: 302px; } .cap-gallery .cg-meta { display: none; } }
@media (max-height: 470px) { .cap-gallery { display: none; } }

/* mobile: a "Photos" pill on the caption + fullscreen viewer */
.cg-mobile-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: var(--brass); border: none; border-radius: 20px;
  padding: 8px 15px; cursor: pointer; pointer-events: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.cg-mobile-btn:active { background: var(--brass-bright); }
.cg-lightbox {
  position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
  background: rgba(6,8,7,0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: aboutFade 0.25s ease both; padding: 5vh 16px; pointer-events: auto;
}
.cg-lb-inner { width: min(620px, 100%); display: flex; flex-direction: column; gap: 12px; }
.cg-lb-close { align-self: flex-end; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(20,24,26,0.85); border: 1px solid var(--hair); color: var(--ivory);
  font-size: 16px; cursor: pointer; }
.cg-lb-stage { position: relative; border-radius: 14px; overflow: hidden; background: #0d100e;
  border: 1px solid rgba(199,154,78,0.3); }
.cg-lb-stage img { display: block; width: 100%; max-height: 64vh; object-fit: contain; }
.cg-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border-radius: 50%; background: rgba(8,10,9,0.72); border: 1px solid var(--hair); color: var(--ivory);
  font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.cg-lb-nav.prev { left: 10px; } .cg-lb-nav.next { right: 10px; }
.cg-lb-meta { display: flex; flex-direction: column; gap: 3px; text-align: center; }
.cg-lb-meta .cg-cap { font-size: 15px; } .cg-lb-meta .cg-credit { font-size: 10px; }

/* mobile: row holding the Photos pill + Gallery link */
.cg-mobile-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; pointer-events: auto; }
.cg-mobile-row .cg-mobile-btn { margin-top: 0; }
.cg-gallery-link.mobile { margin: 0; font-size: 11px; pointer-events: auto; }

/* ---- full-screen Gallery view ---- */
.gv-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column;
  background: radial-gradient(1200px 800px at 60% 20%, #141a1e 0%, #0b0e0c 60%, #07090a 100%);
  animation: aboutFade 0.3s ease both; }
.gv-head { display: flex; align-items: center; justify-content: space-between;
  padding: 22px 34px 16px; border-bottom: 1px solid var(--hair); flex: none; }
.gv-title { font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--ivory); margin: 0;
  letter-spacing: 0.01em; }
.gv-close { position: static; }
.gv-scroll { flex: 1; overflow-y: auto; padding: 22px 34px 60px; }
.gv-beat { max-width: 1180px; margin: 0 auto 34px; }
.gv-beat-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px;
  font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ivory);
  border-bottom: 1px solid rgba(232,224,205,0.08); padding-bottom: 8px; }
.gv-num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--brass); }
.gv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gv-card { margin: 0; cursor: zoom-in; background: var(--panel); border: 1px solid var(--hair);
  border-radius: 12px; overflow: hidden; transition: transform 0.18s, border-color 0.18s; }
.gv-card:hover { transform: translateY(-3px); border-color: rgba(199,154,78,0.5); }
.gv-img-wrap { width: 100%; aspect-ratio: 4 / 3; background: #0d100e; overflow: hidden; }
.gv-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gv-card figcaption { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.gv-cap { font-family: var(--body); font-size: 13px; line-height: 1.35; color: var(--ivory); text-wrap: pretty; }
.gv-credit { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-faint); }
/* gallery zoom (click a card) */
.gv-zoom { position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 5vh 4vw;
  background: rgba(6,8,7,0.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: aboutFade 0.2s ease both; cursor: zoom-out; }
.gv-zoom img { max-width: min(1100px, 94vw); max-height: 76vh; object-fit: contain; cursor: default;
  border-radius: 10px; border: 1px solid rgba(199,154,78,0.35); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.gv-zoom-meta { display: flex; flex-direction: column; gap: 4px; text-align: center; max-width: 760px; }
.gv-zoom-meta .gv-cap { font-size: 17px; } .gv-zoom-meta .gv-credit { font-size: 10px; }
.gv-zoom-close { position: fixed; top: 22px; right: 28px; }
.gv-zoom-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 1; width: 52px; height: 52px;
  border-radius: 50%; background: rgba(20,24,26,0.8); border: 1px solid var(--hair); color: var(--ivory);
  font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s; }
.gv-zoom-nav:hover { background: rgba(199,154,78,0.28); border-color: var(--brass); }
.gv-zoom-nav.prev { left: 24px; } .gv-zoom-nav.next { right: 24px; }
@media (max-width: 640px) {
  .gv-head { padding: 14px 16px 12px; } .gv-title { font-size: 22px; }
  .gv-scroll { padding: 16px 14px 50px; } .gv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .gv-zoom-nav { width: 42px; height: 42px; font-size: 24px; }
  .gv-zoom-nav.prev { left: 8px; } .gv-zoom-nav.next { right: 8px; }
}
