/* MrNanai, Night Museum (2026-11-12).
   A gallery after closing: near-black grounds, Bodoni Moda for anything that
   speaks, the system face for anything that works, brass for museum labels.
   --accent is the selected subject's colour (History red by default) and the
   grounds take a faint tint of its hue, see applyTheme in app.js. */
:root {
  --bg: #070606;
  --wall: #0E0C0C;
  --card: #161313;
  --card-2: #1D1919;
  --line: #292424;
  --ink: #F1EBDF;
  --soft: #CFC8BB;
  --muted: #8E877B;
  --brass: #C9A66B;
  --accent: #FF2D3F;
  --serif: "Bodoni Moda", "Didot", "Bodoni MT", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
@property --bg { syntax: "<color>"; inherits: true; initial-value: #070606; }
@property --wall { syntax: "<color>"; inherits: true; initial-value: #0E0C0C; }
@property --card { syntax: "<color>"; inherits: true; initial-value: #161313; }
@property --card-2 { syntax: "<color>"; inherits: true; initial-value: #1D1919; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #292424; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #FF2D3F; }
:root { transition: --bg .7s ease, --wall .7s ease, --card .7s ease, --card-2 .7s ease, --line .7s ease, --accent .7s ease; }

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* Nothing is laid out wider than the viewport; `clip` is the backstop that
   keeps a stray element from ever producing a sideways scroll on a phone. */
html { scroll-behavior: smooth; background: var(--bg); overflow-x: clip; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--ink); overflow-x: clip;
  font-family: var(--sans); font-size: 17px; line-height: 1.55; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.04; text-wrap: balance; }
.serif i { color: var(--brass); }
.label { font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right));
}
.code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--card-2); color: var(--soft); white-space: nowrap; }

/* ---------- scroll reveals ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- header: one glass pill ---------- */
.site-head {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 20px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 66%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 12px 40px rgba(0,0,0,.5);
  max-width: calc(100vw - 20px);
}
.brand { font-family: var(--serif); font-style: italic; font-size: 1.2rem; text-decoration: none; margin-right: 10px; white-space: nowrap; }
.brand b, .hero h1 b { color: var(--accent); font-weight: 400; font-style: normal; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { font-size: .86rem; text-decoration: none; color: var(--soft); padding: 0 12px; border-radius: 999px; min-height: 38px; display: inline-flex; align-items: center; white-space: nowrap; transition: background .2s, color .2s; }
.site-nav a:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.site-nav a.cta { background: var(--ink); color: #111; font-weight: 600; margin-left: 6px; padding: 0 16px; }
.site-nav a.cta:hover { background: #fff; }
.nav-toggle { display: none; min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #111; font-weight: 600; font-size: .86rem; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .95rem; background: var(--ink); color: #111; text-align: center;
  transition: transform .2s var(--ease), background .2s;
}
.pill:hover { transform: scale(1.03); background: #fff; }
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.pill.ghost:hover { background: rgba(255,255,255,.08); }
.cta-row, .era-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.era-actions { margin-top: 34px; }

/* ---------- hero: the wall, and a torch ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: #000; --x: 50%; --y: 36%; --r: 23vmax; }
.wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.wall.dim { filter: grayscale(.85) brightness(.17) contrast(1.1); }
.wall.lit {
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, rgba(0,0,0,.75) 35%, transparent 100%);
          mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, rgba(0,0,0,.75) 35%, transparent 100%);
}
.beam { position: absolute; inset: 0; background: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(255,214,150,.13), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 2%, color-mix(in srgb, var(--bg) 86%, transparent) 26%, transparent 58%); pointer-events: none; }
.hint { position: absolute; right: 22px; top: 88px; z-index: 2; color: #B9B1A3; }
.hero-copy { position: absolute; left: 0; right: 0; bottom: clamp(40px, 8vh, 96px); z-index: 2; pointer-events: none; }
.hero-copy .wrap > * { pointer-events: auto; }
.hero h1 { font-size: clamp(4rem, 13vw, 12.5rem); font-style: italic; line-height: .86; margin: 10px 0 18px -.04em; }
.hero-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.hero-row p { max-width: 40ch; font-size: 1.14rem; color: #D8D1C4; }

/* ---------- wall text and the register ---------- */
.walltext { padding: clamp(80px, 12vw, 170px) 0 clamp(40px, 6vw, 80px); }
.walltext p.serif { font-size: clamp(1.9rem, 4.4vw, 3.9rem); max-width: 22ch; color: #6E685F; line-height: 1.08; }
.walltext p.serif > span { color: var(--ink); }
.register { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.reg-item { padding: 22px 16px 0 0; }
.reg-item .n { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1; font-variant-numeric: lining-nums; }
.reg-item .l { color: var(--muted); font-size: .9rem; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 110px) 0; }
.sec-head { margin-bottom: clamp(30px, 5vw, 64px); }
.sec-head h2 { font-size: clamp(2.5rem, 6.2vw, 5.4rem); margin-top: 14px; max-width: 15ch; }
.sec-head > p:not(.label) { color: var(--soft); max-width: 62ch; margin-top: 20px; }
.sec-head strong { color: var(--ink); }

/* ---------- rooms: History, year by year ---------- */
.room { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 90px); align-items: center; padding: clamp(28px, 4.5vw, 60px) 0; border-top: 1px solid var(--line); }
.room:nth-child(even) .plinth { order: 2; }
.plinth { position: relative; aspect-ratio: 5 / 4; border-radius: 26px; overflow: hidden; background: radial-gradient(ellipse 70% 80% at 50% 0, #2A241B, #0B0A09 72%); display: grid; place-items: center; }
.plinth img { max-width: 78%; max-height: 82%; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 60px rgba(0,0,0,.7); filter: brightness(.12) grayscale(.8); transform: scale(.96); transition: filter 1.5s ease .15s, transform 1.8s var(--ease) .15s; }
.room.on .plinth img { filter: none; transform: none; }
.plinth::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 60% at 50% -5%, rgba(255,220,165,.2), transparent 70%); opacity: 0; transition: opacity 1.5s ease .15s; pointer-events: none; }
.room.on .plinth::after { opacity: 1; }
.placard .label b { color: var(--muted); font-weight: 600; margin-left: 10px; }
.placard h3 { font-size: clamp(2rem, 3.8vw, 3.4rem); margin: 14px 0 20px; }
.placard ul { list-style: none; }
.placard li { padding: 11px 0; border-top: 1px solid var(--line); color: #D2CBBE; display: flex; justify-content: space-between; gap: 14px; }
.placard li:last-child { border-bottom: 1px solid var(--line); }
.placard li span { color: var(--muted); font-size: .86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.placard .obj { margin-top: 16px; font-size: .84rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.placard .obj::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); }
.placard .obj a { color: inherit; }
.placard .pill { margin-top: 22px; min-height: 44px; font-size: .9rem; }

/* ---------- the screening room ---------- */
.screen { border-radius: 26px; overflow: hidden; background: #000; position: relative; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 40px 90px rgba(0,0,0,.6); }
.screen video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.screen-cap { position: absolute; left: 18px; bottom: 16px; font-size: .78rem; color: #E8E1D4; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); }

/* ---------- the collection ---------- */
.coll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.work { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--card); display: flex; align-items: flex-end; isolation: isolate; text-align: left; width: 100%; }
.work img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(.5) saturate(.7); transition: filter .6s, transform 1.2s var(--ease); }
.work::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.92), rgba(0,0,0,0) 62%); }
.work::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: box-shadow .3s; pointer-events: none; }
.work:hover img, .work:focus-visible img { filter: none; transform: scale(1.05); }
.work:hover::after, .work:focus-visible::after { box-shadow: inset 0 0 0 1.5px var(--spine, var(--brass)); }
.work .t { padding: 18px; width: 100%; }
.work h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.04; }
.work p { font-size: .82rem; color: #BDB5A7; margin-top: 4px; font-variant-numeric: tabular-nums; }
.work.lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.work.lead h3 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-style: italic; }
.work.lead .label { display: block; margin-bottom: 10px; }
.work.find { align-items: stretch; }
.work.find::before { display: none; }
.work.find .t { display: flex; flex-direction: column; justify-content: space-between; }
.work.find h3 { font-style: italic; color: var(--brass); }

/* ---------- library: search ---------- */
.search-wrap { margin-bottom: 30px; }
.search-box { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 10px 0 20px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.search-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-icon { font-size: 1.3rem; color: var(--muted); }
#q { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 1.02rem; min-height: 44px; }
#q::placeholder { color: var(--muted); }
#q::-webkit-search-cancel-button { display: none; }
.search-kbd { font: 600 .78rem var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; }
.q-clear { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card-2); font-size: .86rem; font-weight: 600; }
.q-clear:hover { background: var(--ink); color: #111; }
.search-meta { min-height: 1.4em; margin: 10px 0 0 20px; font-size: .86rem; color: var(--muted); }
.search-empty { color: var(--soft); padding: 30px 0; }
.search-empty em { color: var(--brass); }
mark { background: color-mix(in srgb, var(--accent) 34%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.noscript-note { color: var(--soft); padding: 20px; border-radius: 16px; background: var(--card); }
#searchResults { margin-bottom: 40px; }

/* ---------- library: subject rail and panels ---------- */
.lib-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.tab-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 3px; max-height: calc(100svh - 104px); overflow-y: auto; scrollbar-width: none; }
.tab-rail::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 7px; border-radius: 14px; text-align: left; min-height: 48px; color: var(--soft); transition: background .2s, color .2s, box-shadow .2s; }
.tab:hover { background: var(--card); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--spine); }
.t-thumb { width: 46px; height: 34px; border-radius: 8px; overflow: hidden; flex: none; }
.t-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.8) brightness(.7); transition: filter .3s; }
.tab:hover .t-thumb img, .tab[aria-selected="true"] .t-thumb img { filter: none; }
.t-name { flex: 1; font-size: .95rem; font-weight: 500; }
.t-count { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.panel { display: none; }
.panel.active { display: block; animation: rise .6s var(--ease) both; }
.panel-hero { position: relative; height: 260px; border-radius: 24px; overflow: hidden; display: flex; align-items: flex-end; isolation: isolate; }
.panel-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ph-tint { display: none; }
.ph-grad { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.1) 70%); }
.ph-text { padding: 24px 26px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.ph-text h3, .subject-head h3 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; }
.ph-count { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--spine); }
.ph-credit { position: absolute; right: 12px; top: 12px; font-size: .66rem; color: #D8D1C4; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.55); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-credit:hover { color: #fff; }
.subject-blurb { color: var(--soft); font-size: 1.06rem; max-width: 66ch; margin: 22px 0 26px; }
.panel-video { border-radius: 22px; overflow: hidden; background: #000; margin-bottom: 28px; position: relative; }
.panel-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-cap { font-size: .8rem; color: var(--muted); padding: 10px 16px; background: var(--card); }

.year-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; position: sticky; top: 76px; z-index: 5; padding: 10px 0; background: linear-gradient(var(--bg) 78%, transparent); }
.year-pill { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--soft); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s; }
.year-pill:hover { color: var(--ink); background: var(--card-2); }
.year-pill[aria-pressed="true"] { background: var(--spine); color: #0c0c0c; box-shadow: none; font-weight: 600; }
.yp-count { font-size: .74rem; opacity: .7; font-variant-numeric: tabular-nums; }
.year-group { margin-top: 34px; }
.year-group.first { margin-top: 18px; }
.year-group[hidden] { display: none; }
.year-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.year-label h4 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1; }
.year-note { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dot { opacity: .5; }

/* ---------- unit cards ---------- */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.unit-card { background: var(--card); border-radius: 22px; padding: 22px 22px 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); transition: background .3s; }
.unit-card:hover { background: var(--card-2); }
.card-subject { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--spine); margin-bottom: 10px; }
.unit-card h4 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.08; text-wrap: balance; }
.unit-meta { font-size: .78rem; color: var(--muted); margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.unit-desc { font-size: .93rem; color: var(--soft); line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.unit-card.open .unit-desc { display: block; }
.more-btn { align-self: flex-start; min-height: 44px; font-size: .84rem; font-weight: 600; color: var(--brass); }
.more-btn:hover { color: var(--ink); }
.file-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 20px; }
.file-chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: .84rem; font-weight: 500; text-decoration: none; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s, box-shadow .2s; }
.unit-card:hover .file-chip { background: color-mix(in srgb, var(--ink) 9%, var(--card-2)); }
.file-chip:hover, .unit-card:hover .file-chip:hover { background: var(--spine); color: #0c0c0c; box-shadow: none; }
.file-chip.folder { background: transparent; color: var(--muted); }
.unit-shot { position: relative; margin: auto -22px 0; aspect-ratio: 16 / 9; overflow: hidden; }
.unit-shot img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.72) saturate(.85); transition: filter .5s, transform 1.2s var(--ease); }
.unit-card:hover .unit-shot img { filter: none; transform: scale(1.04); }
.us-tint { position: absolute; inset: 0; background: linear-gradient(var(--card), transparent 30%); transition: background .3s; pointer-events: none; }
.unit-card:hover .us-tint { background: linear-gradient(var(--card-2), transparent 30%); }
.us-credit { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: .62rem; color: #D8D1C4; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-credit a { text-decoration: none; }

/* ---------- approach ---------- */
.tenets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tenet { background: var(--card); border-radius: 24px; padding: clamp(22px, 3vw, 34px); }
.tenet h3 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); margin: 12px 0 12px; }
.tenet p:not(.label) { color: var(--soft); }

/* ---------- games room and store ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.game { background: var(--card); border-radius: 24px; padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 210px; position: relative; overflow: hidden; transition: transform .3s var(--ease), background .3s, opacity .9s var(--ease); }
.game::before { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: var(--c); filter: blur(60px); opacity: .22; transition: opacity .4s; }
.game:hover { transform: translateY(-4px); background: var(--card-2); }
.game:hover::before { opacity: .5; }
.game .label { color: var(--c); }
.game h3 { font-size: 1.9rem; }
.game p { font-size: .93rem; color: #A9A295; max-width: 60ch; }
.game .go { margin-top: auto; font-size: .88rem; font-weight: 600; padding-top: 10px; }
.game.lead { grid-column: 1 / -1; min-height: 0; padding: clamp(26px, 4vw, 48px); }
.game.lead h3 { font-size: clamp(3rem, 7vw, 6rem); font-style: italic; }
.game.lead p { font-size: 1.08rem; }
.game .store-prices { color: var(--brass); font-size: .88rem; font-weight: 600; margin-top: 6px; }
#store { padding-top: 0; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.about-copy p { color: var(--soft); margin-bottom: 18px; max-width: 64ch; }
.about-copy strong { color: var(--ink); }
.about-copy .about-lede { font-size: clamp(1.7rem, 3.2vw, 2.8rem); line-height: 1.1; color: var(--ink); margin-bottom: 30px; }
.fact-list { list-style: none; }
.fact { display: grid; grid-template-columns: 3.4ch 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); color: #BDB5A7; }
.fact:last-child { border-bottom: 1px solid var(--line); }
.f-n { font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--ink); line-height: 1; }

/* ---------- contact ---------- */
.close { text-align: center; padding: clamp(80px, 12vw, 170px) 0; background: radial-gradient(ellipse 60% 70% at 50% 0, #1E1A14, var(--bg) 70%); }
.close h2 { font-size: clamp(2.8rem, 8vw, 7rem); font-style: italic; margin: 16px auto 18px; max-width: 12ch; }
.contact-note { max-width: 46ch; margin: 0 auto 28px; color: #BDB5A7; }
.email-btn { max-width: 100%; overflow-wrap: anywhere; }
.email-btn .at { opacity: .55; margin: 0 1px; }
.contact-seal { width: 132px; height: 132px; display: block; margin: 0 auto 30px; }
.lg-ground { fill: rgba(0,0,0,.35); }
.lg-ring { fill: none; stroke: var(--brass); }
.lg-inner { fill: none; stroke: var(--brass); stroke-width: .5; opacity: .5; }
.lg-orbit { fill: none; stroke: var(--brass); stroke-width: .6; stroke-dasharray: .6 4; opacity: .7; }
.lg-sat { fill: var(--accent); }
.lg-spin { transform-origin: 70px 70px; animation: orbit 26s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.lg-eyebrow, .lg-tag { font-family: var(--sans); font-weight: 600; font-size: 5.6px; letter-spacing: .22em; fill: var(--brass); }
.lg-name { font-family: var(--serif); font-style: italic; font-size: 23px; fill: var(--ink); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 30px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .84rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 14px; }
.foot-links a { color: var(--soft); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--ink); }
.site-foot .legal { margin-top: 10px; max-width: 80ch; font-size: .78rem; }
.credits { margin-top: 14px; font-size: .78rem; }
.credits summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.credits a { color: var(--soft); }

/* ---------- tablets and phones: stack and wrap, never scroll sideways ---------- */
@media (max-width: 940px) {
  .site-head { padding-left: 18px; gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(280px, calc(100vw - 28px)); flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 22px; background: color-mix(in srgb, var(--card) 96%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 24px 60px rgba(0,0,0,.7); }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 46px; padding: 0 16px; font-size: .98rem; }
  .site-nav a.cta { margin: 6px 0 0; justify-content: center; }
}
@media (max-width: 900px) {
  .lib-grid { grid-template-columns: 1fr; gap: 22px; }
  .tab-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; max-height: none; overflow: visible; }
  .tab { padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--card); gap: 9px; min-height: 44px; }
  .t-thumb { width: 34px; height: 34px; border-radius: 50%; }
  .t-count { display: none; }
  .t-name { font-size: .88rem; }
  .year-filter { top: 70px; }
}
@media (max-width: 860px) {
  .wall { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
  .hero { --r: 42vmin; }
  .hint { display: none; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .register { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-item { padding-bottom: 8px; }
  .room { grid-template-columns: 1fr; }
  .room:nth-child(even) .plinth { order: 0; }
  .coll { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work.lead { aspect-ratio: 1; }
  .tenets, .bento, .about-grid { grid-template-columns: 1fr; }
  .game { min-height: 0; }
  .panel-hero { height: 190px; }
  .sec-head h2 { max-width: none; }
}
@media (max-width: 480px) {
  .cta-row .pill, .era-actions .pill { width: 100%; }
  .screen-cap { position: static; border-radius: 0; background: var(--card); backdrop-filter: none; padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .panel.active { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .plinth img, .plinth::after { transition: none; }
  .lg-spin { animation: none; }
  :root { transition: none; }
}
