@import url('../assets/fonts/fonts.css');

:root {
  --ink: #000;
  --paper: #f0ece4;
  --paper-70: rgba(240,236,228,.70);
  --paper-45: rgba(240,236,228,.45);
  --paper-28: rgba(240,236,228,.28);
  --line: rgba(240,236,228,.12);
  --brass: #b9975b;
  --accent: #b9975b;
  --display: 'Cormorant Garamond', 'Times New Roman', Times, serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #000;
  color: var(--paper);
  font-family: var(--ui);
  font-weight: 300;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 3px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.eyebrow {
  font-size: 10px; font-weight: 500; letter-spacing: .32em;
  text-transform: uppercase; color: var(--paper-28); margin: 0;
}

kbd {
  display: inline-grid; place-content: center;
  min-width: 26px; height: 24px; padding: 0 .5rem;
  border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--ui); font-size: 9.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--paper-70);
  background: rgba(255,255,255,.03);
}

.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none;
  opacity: .026;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(5) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)}
  40%{transform:translate(2%,-2%)} 60%{transform:translate(-2%,-3%)} 80%{transform:translate(3%,1%)}
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ══════════════ Loader ══════════════ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: grid; place-content: center;
  transition: opacity .9s var(--ease), visibility .9s;
}
#loader.done { opacity: 0; visibility: hidden; }
.ld-inner { display: grid; justify-items: center; gap: 1.9rem; }
.ld-mark { font-size: 11px; letter-spacing: .58em; text-indent: .58em; color: var(--paper-45); margin: 0; }
.ld-bar { width: min(260px, 52vw); height: 1px; background: rgba(240,236,228,.12); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--brass); transition: width .4s var(--ease); }
.ld-status { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--paper-28); margin: 0; }

/* ══════════════ Entry ══════════════ */
#entry {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center;
  padding: 2rem;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,.55), rgba(0,0,0,.93));
  backdrop-filter: blur(3px);
  animation: fadeIn .9s var(--ease) both;
}
#entry[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.entry-card { max-width: 460px; text-align: center; }
.entry-card h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1;
  letter-spacing: -.02em; margin: 1.1rem 0 0;
}
.entry-lede {
  font-size: 14px; line-height: 1.8; color: var(--paper-45);
  margin: 1.1rem 0 2.2rem; max-width: 34ch; margin-inline: auto;
}
.keys { display: grid; gap: .7rem; margin-bottom: 2.4rem; justify-items: center; }
.keys[hidden] { display: none; }
.keys > div { display: flex; align-items: center; gap: .45rem; }
.keys span { font-size: 11px; letter-spacing: .1em; color: var(--paper-45); margin-left: .5rem; }

.btn-enter {
  display: inline-flex; align-items: center; gap: .9rem;
  padding: 1.05rem 2.6rem;
  border: 1px solid rgba(185,151,91,.45); border-radius: 1px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--brass);
  position: relative; overflow: hidden;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn-enter span { position: relative; z-index: 1; }
.btn-enter::before {
  content: ''; position: absolute; inset: 0; background: var(--brass);
  transform: translateY(101%); transition: transform .55s var(--ease-out);
}
.btn-enter:hover { color: #000; border-color: var(--brass); }
.btn-enter:hover::before { transform: translateY(0); }
.btn-enter .arw { transition: transform .5s var(--ease-out); }
.btn-enter:hover .arw { transform: translateX(4px); }

.btn-tour {
  display: block; margin: 1.3rem auto 0;
  font-size: 11px; letter-spacing: .16em; color: var(--paper-28);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn-tour:hover { color: var(--paper-70); border-bottom-color: var(--line); }

/* ══════════════ HUD ══════════════ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.7rem) clamp(1rem, 3vw, 2.2rem);
  pointer-events: none;
  animation: fadeIn 1.2s var(--ease) both;
}
.hud[hidden] { display: none; }
.hud > * { pointer-events: auto; }
.hud-back {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--paper-45);
  transition: color .4s var(--ease);
}
.hud-back:hover { color: var(--paper); }
.hud-back .arw { transition: transform .4s var(--ease-out); }
.hud-back:hover .arw { transform: translateX(-4px); }

.hud-tools { display: flex; gap: .55rem; }
.hud-btn {
  padding: .52rem .95rem;
  border: 1px solid var(--line); border-radius: 1px;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-45);
  background: rgba(0,0,0,.35); backdrop-filter: blur(8px);
  transition: color .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.hud-btn:hover { color: var(--paper); border-color: var(--paper-28); }
.hud-btn[aria-pressed="true"] { color: #000; background: var(--brass); border-color: var(--brass); }

/* ══════════════ Plan ══════════════ */
.map {
  position: fixed; z-index: 40;
  right: clamp(1rem, 3vw, 2.2rem);
  top: clamp(4.2rem, 9vh, 5.6rem);
  width: clamp(150px, 15vw, 210px);
  padding: .55rem;
  border: 1px solid var(--line); border-radius: 2px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  pointer-events: none;
  animation: fadeIn 1.4s var(--ease) both;
}
.map[hidden] { display: none; }
.map svg { display: block; width: 100%; height: auto; }
.m-room { fill: rgba(240,236,228,.035); stroke: rgba(240,236,228,.26); stroke-width: .22; }
.m-work { fill: rgba(240,236,228,.55); }
.m-work.near { fill: var(--brass); }
.m-you  { fill: var(--brass); }
.m-cone { fill: rgba(185,151,91,.42); }

/* ══════════════ Plaque ══════════════ */
.plaque {
  position: fixed; z-index: 40;
  pointer-events: none;              /* a label, never a target */
  left: clamp(1rem, 3vw, 2.2rem);
  bottom: clamp(1.2rem, 4vh, 2.4rem);
  max-width: min(330px, 74vw);
  padding: 1.15rem 1.35rem 1.2rem;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.42));
  backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease-out);
}
.plaque[hidden] { display: none; }
.plaque.show { opacity: 1; transform: none; }
.pl-n { margin: 0; font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.plaque h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.15;
  margin: .5rem 0 .45rem; letter-spacing: -.01em;
}
.pl-meta { margin: 0; font-size: 11px; letter-spacing: .1em; color: var(--paper-45); }
.pl-cue { margin: .9rem 0 0; font-size: 10px; letter-spacing: .14em; color: var(--paper-28); display: flex; align-items: center; gap: .5rem; }
.touch-mode .pl-cue kbd { display: none; }

/* ══════════════ Reticle & hint ══════════════ */
.reticle {
  position: fixed; z-index: 35; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: rgba(240,236,228,.34);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s var(--ease);
  pointer-events: none;
}
.reticle[hidden] { display: none; }
.reticle.hot {
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  background: transparent; border: 1px solid var(--accent);
}

.hint {
  position: fixed; z-index: 40; left: 50%; bottom: clamp(1.4rem, 5vh, 3rem);
  transform: translateX(-50%);
  margin: 0; font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--paper-28); pointer-events: none; text-align: center;
  transition: opacity .6s var(--ease);
}
.hint[hidden] { display: none; }

/* ══════════════ Transition curtain ══════════════ */
.fade {
  position: fixed; inset: 0; z-index: 80;
  background: #000;
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease), visibility .6s;
  pointer-events: none;
}
.fade.on { opacity: 1; visibility: visible; }

/* ══════════════ The album world ══════════════ */
.world {
  position: fixed; inset: 0; z-index: 45;
  display: none;
  pointer-events: none;
}
body.in-world .world { display: block; }
body.in-world .hud-tools,
body.in-world .plaque,
body.in-world .hint,
body.in-world .map,
body.in-world .touch { display: none !important; }
body.in-world .hud-back { opacity: 0; pointer-events: none; }

.wr-close {
  position: fixed; z-index: 3;
  top: clamp(1rem, 2.4vw, 1.7rem); left: clamp(1rem, 3vw, 2.2rem);
  display: inline-flex; align-items: center; gap: .6rem;
  pointer-events: auto;
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--paper-45);
  opacity: 0; transform: translateX(-8px);
  transition: color .4s var(--ease), opacity .7s var(--ease) .35s, transform .7s var(--ease-out) .35s;
}
.world.reveal .wr-close { opacity: 1; transform: none; }
.wr-close:hover { color: var(--paper); }
.wr-close .arw { transition: transform .4s var(--ease-out); }
.wr-close:hover .arw { transform: translateX(-4px); }

/* the copy sits in the right half; the record floats in the left */
.wr-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(46vw, 620px);
  display: flex;
  padding: clamp(4.5rem, 9vh, 7rem) clamp(1.6rem, 3.2vw, 3.4rem) 0 0;
  pointer-events: none;
}
/* a soft falloff so the copy never has to fight the room behind it */
.wr-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 0 -14vw;
  background: linear-gradient(90deg, transparent, rgba(3,3,6,.62) 34%, rgba(3,3,6,.88) 62%);
  pointer-events: none;
}
.wr-scroll { position: relative; z-index: 1; }
.wr-scroll {
  pointer-events: auto;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 5rem;
  padding-right: .9rem;
  scrollbar-width: thin;
  /* bottom fade only — a top fade would swallow the eyebrow */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3.5rem), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 3.5rem), transparent 100%);
}
.wr-scroll::-webkit-scrollbar { width: 3px; }
.wr-scroll::-webkit-scrollbar-thumb { background: rgba(240,236,228,.16); }

/* everything in the panel drifts up on arrival, in sequence */
.wr-scroll > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s var(--ease-out), transform .95s var(--ease-out);
}
.world.reveal .wr-scroll > * { opacity: 1; transform: none; }
.world.reveal .wr-scroll > :nth-child(1) { transition-delay: .05s }
.world.reveal .wr-scroll > :nth-child(2) { transition-delay: .13s }
.world.reveal .wr-scroll > :nth-child(3) { transition-delay: .21s }
.world.reveal .wr-scroll > :nth-child(4) { transition-delay: .29s }
.world.reveal .wr-scroll > :nth-child(5) { transition-delay: .36s }
.world.reveal .wr-scroll > :nth-child(6) { transition-delay: .42s }
.world.reveal .wr-scroll > :nth-child(7) { transition-delay: .48s }
.world.reveal .wr-scroll > :nth-child(n+8) { transition-delay: .54s }

.wr-eyebrow {
  display: flex; align-items: center; gap: .9rem; margin: 0 0 1.1rem;
  font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--paper-28);
}
.wr-eyebrow .n { color: var(--accent); font-variant-numeric: tabular-nums; }
.wr-eyebrow .sep { width: 26px; height: 1px; background: var(--line); }

.wr-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: .98;
  letter-spacing: -.025em; margin: 0;
}
.wr-tag {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.42rem); line-height: 1.45;
  color: var(--accent); margin: 1rem 0 0; max-width: 30ch;
}
.wr-body { font-size: 13.5px; line-height: 1.92; color: var(--paper-45); margin: 1.6rem 0 0; }
.wr-body em { font-style: italic; color: var(--paper-70); }

.wr-facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.15rem 1.5rem;
  margin: 1.9rem 0 0; padding: 1.5rem 0; border-block: 1px solid rgba(240,236,228,.08);
}
.wr-facts dt { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--paper-28); }
.wr-facts dd { margin: .38rem 0 0; font-size: 13px; color: var(--paper-70); }

.wr-peaks { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 0; }
.wr-peak {
  padding: .36rem .66rem; border: 1px solid var(--line); border-radius: 1px;
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-28);
}
.wr-peak b { color: var(--accent); font-weight: 500; font-size: 11px; }

.wr-note {
  font-size: 12px; line-height: 1.8; color: var(--paper-28);
  border-left: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  padding-left: 1rem; margin: 1.6rem 0 0;
}
.wr-note em { font-style: italic; color: var(--paper-45); }

.wr-th {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2.2rem 0 .2rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--paper-45);
}
.wr-th .hint { color: var(--paper-28); letter-spacing: .1em; text-transform: none; font-size: 10px; }

.wr-tracks { margin-top: .2rem; }

.wr-track {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem 30px 1fr auto;
  gap: .8rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: .72rem .6rem;
  border-radius: 3px;
  border-bottom: 1px solid rgba(240,236,228,.05);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out),
              background .3s var(--ease);
  transition-delay: calc(var(--i) * 22ms);
}
.wr-track.in { opacity: 1; transform: none; }
.wr-track.has-audio { cursor: pointer; }

/* the played portion, drawn behind the row */
.wr-track::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: calc(var(--prog, 0) * 100%);
  border-radius: 3px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    color-mix(in srgb, var(--accent) 6%, transparent));
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.wr-track.playing::before { opacity: 1; }

/* a hairline that grows from the left on hover */
.wr-track::after {
  content: '';
  position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: center;
  transition: transform .4s var(--ease-out);
}
.wr-track.has-audio:hover::after,
.wr-track.playing::after { transform: scaleY(1); }
.wr-track.has-audio:hover { background: rgba(240,236,228,.035); }
.wr-track > * { position: relative; z-index: 1; }

.wr-track .n {
  font-size: 9.5px; letter-spacing: .14em; color: var(--paper-28);
  font-variant-numeric: tabular-nums; transition: color .3s var(--ease);
}
.wr-track .t {
  font-size: 13.5px; line-height: 1.35; color: var(--paper-70);
  transition: color .3s var(--ease), transform .4s var(--ease-out);
}
.wr-track .d {
  font-size: 10.5px; color: var(--paper-28);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.wr-track.has-audio:hover .t { transform: translateX(3px); color: var(--paper); }
.wr-track.playing .t, .wr-track.playing .n { color: var(--accent); }

.wr-track .pl {
  position: relative;
  width: 30px; height: 30px;
  display: grid; place-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--paper-28);
  transition: all .3s var(--ease);
}
.wr-track.has-audio:hover .pl { border-color: var(--accent); color: var(--accent); transform: scale(1.08); }
.wr-track.playing .pl { background: var(--accent); border-color: var(--accent); color: #000; }
.wr-track.loading .pl { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.wr-track.loading .pl::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid transparent; border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.wr-track .pl svg { width: 9px; height: 9px; fill: currentColor; }
.wr-track:not(.has-audio) .pl { opacity: .16; }

/* level meter, shared with the now-playing strip */
.eq { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.eq i { display: block; width: 2px; background: currentColor; border-radius: .5px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.45s }
.eq i:nth-child(2) { height: 90%; animation-delay: -.15s }
.eq i:nth-child(3) { height: 60%; animation-delay: -.6s }
.eq i:nth-child(4) { height: 100%; animation-delay: -.3s }
@keyframes eq { 0%,100% { transform: scaleY(.35) } 50% { transform: scaleY(1) } }
@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none } .wr-track.loading .pl::after { animation: none }
}

/* ── now playing, pinned to the world ─────────────────────── */
.wr-now {
  position: absolute;
  left: clamp(1rem, 3vw, 2.2rem);
  bottom: clamp(1.2rem, 4vh, 2.2rem);
  z-index: 4;
  width: min(340px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .8rem;
  align-items: center;
  padding: .8rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 2px;
  background: rgba(6,6,10,.82);
  backdrop-filter: blur(18px);
  pointer-events: none;
  opacity: 0; transform: translateY(14px); visibility: hidden;
  transition: opacity .5s var(--ease), transform .6s var(--ease-out), visibility .5s;
}
.wr-now.on { opacity: 1; transform: none; visibility: visible; }
.wr-now-eq { color: var(--accent); display: grid; place-content: center; }
.wr-now-t {
  font-size: 12.5px; color: var(--paper-70);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wr-now-time { font-size: 10px; color: var(--paper-28); font-variant-numeric: tabular-nums; }
.wr-now-bar {
  grid-column: 1 / -1; height: 1px; margin-top: .15rem;
  background: rgba(240,236,228,.12); overflow: hidden;
}
.wr-now-bar i {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(var(--prog, 0)); transform-origin: left;
}

.wr-bonus { margin: 1.2rem 0 0; font-size: 11.5px; line-height: 1.7; color: var(--paper-28); }

.wr-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin: 2.4rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.wr-nav button {
  display: flex; flex-direction: column; gap: .35rem; max-width: 46%;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-28);
  transition: color .4s var(--ease);
}
.wr-nav button:last-child { text-align: right; align-items: flex-end; }
.wr-nav button:hover:not(:disabled) { color: var(--paper); }
.wr-nav button:disabled { opacity: .3; cursor: default; }
.wr-nav button .t {
  font-family: var(--display); font-size: 14px; letter-spacing: 0;
  text-transform: none; color: var(--paper-45); line-height: 1.25;
}
.wr-nav button:hover:not(:disabled) .t { color: var(--accent); }

.wr-full {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.8rem;
  padding: .85rem 1.5rem; border: 1px solid var(--line); border-radius: 1px;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--paper-45);
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.wr-full:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

/* narrow: the record sits above, the copy reads as a sheet below it */
@media (max-width: 999px) {
  /* The record sits in the top of the frame and the copy is a sheet below it,
     so the two never occupy the same pixels. */
  .wr-panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; height: 58svh;
    padding: 0;
    background: rgba(4,4,8,.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-top: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -24px 60px -30px #000;
  }
  .wr-panel::before { display: none; }          /* the wide-screen falloff */
  /* a grabber, so it reads as a sheet */
  .wr-panel::after {
    content: '';
    position: absolute; top: .55rem; left: 50%;
    width: 38px; height: 3px; margin-left: -19px;
    border-radius: 2px; background: rgba(240,236,228,.20);
  }
  .wr-scroll {
    padding: 1.7rem clamp(1.1rem, 5vw, 1.8rem) 3.5rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent 100%);
  }
  .wr-title { font-size: clamp(1.75rem, 6.4vw, 2.4rem); }
  .wr-tag { font-size: 1.02rem; }
  .wr-body { font-size: 13px; }

  /* now playing rides just above the sheet, never inside the list */
  .wr-now {
    left: 50%; right: auto;
    bottom: calc(58svh + .7rem);
    transform: translate(-50%, 10px);
    width: min(420px, calc(100vw - 1.6rem));
  }
  .wr-now.on { transform: translate(-50%, 0); }

  .wr-close {
    top: max(env(safe-area-inset-top, 0px) + .8rem, 1rem);
    background: rgba(4,4,8,.6);
    padding: .5rem .8rem; border-radius: 2px;
    border: 1px solid var(--line);
  }
}

/* ══════════════ Touch ══════════════ */
.touch { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.touch[hidden] { display: none; }
.stick {
  position: absolute;
  left: max(5vw, env(safe-area-inset-left, 0px) + 1rem);
  bottom: max(4vh, env(safe-area-inset-bottom, 0px) + 1rem);
  width: 132px; height: 132px; border-radius: 50%;
  border: 1px solid rgba(240,236,228,.16);
  background: rgba(0,0,0,.30); backdrop-filter: blur(8px);
  pointer-events: auto; touch-action: none;
  display: grid; place-content: center;
  opacity: .5; transition: opacity .3s var(--ease);
}
/* the finger target is bigger than the ring it draws */
.stick::before {
  content: ''; position: absolute; inset: -22px; border-radius: 50%;
}
.stick.active { opacity: .95; }
.stick i {
  display: block; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(240,236,228,.26);
  box-shadow: 0 0 0 1px rgba(240,236,228,.12);
  transition: transform .05s linear;
}

/* the one control that matters, as a real button instead of a 3D plate */
.tap-enter {
  position: absolute;
  right: max(5vw, env(safe-area-inset-right, 0px) + 1rem);
  bottom: max(7vh, env(safe-area-inset-bottom, 0px) + 2rem);
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: .7rem;
  padding: 1.05rem 1.5rem;
  border: 1px solid var(--accent); border-radius: 2px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(10px);
  color: var(--accent);
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  opacity: 0; transform: translateY(14px) scale(.96); visibility: hidden;
  transition: opacity .4s var(--ease), transform .5s var(--ease-out), visibility .4s;
}
.tap-enter.on { opacity: 1; transform: none; visibility: visible; }
.tap-enter:active { background: var(--accent); color: #000; }

/* ══════════════ noscript ══════════════ */
.noscript {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: grid; place-content: center; text-align: center; padding: 2rem;
}
.noscript h1 { font-family: var(--display); font-weight: 300; font-size: 2rem; margin: 0 0 1rem; }
.noscript p { color: var(--paper-45); font-size: 14px; }
.noscript a { color: var(--brass); border-bottom: 1px solid currentColor; }

@media (max-width: 720px) {
  .map { display: none; }
  /* keep the readout clear of the thumbstick entirely */
  .plaque {
    top: calc(env(safe-area-inset-top, 0px) + 3.6rem);
    bottom: auto;
    left: 50%; transform: translate(-50%, -10px);
    width: min(420px, calc(100vw - 2rem)); max-width: none;
    text-align: center;
    border-left: 0; border-top: 2px solid var(--accent);
    background: linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,.42));
    padding: .85rem 1rem .9rem;
  }
  .plaque.show { transform: translate(-50%, 0); }
  .plaque h2 { font-size: 1.35rem; margin: .3rem 0 .3rem; }
  .plaque .pl-cue { display: none; }

}

/* ── the toggle in the gallery HUD ─────────────────────────── */
.hud-toggle {
  display: inline-grid; place-content: center;
  width: 32px; height: 32px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(0,0,0,.35); backdrop-filter: blur(8px);
  color: var(--paper-45);
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .5s var(--ease-out);
}
.hud-toggle:hover { color: var(--paper); border-color: var(--paper-28); transform: rotate(18deg); }
.hud-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.hud-toggle .i-sun { display: none; }
:root[data-theme="day"] .hud-toggle .i-sun { display: block; }
:root[data-theme="day"] .hud-toggle .i-moon { display: none; }

/* daylight: the chrome over a lit room needs to read against pale walls */
:root[data-theme="day"] .hud-back,
:root[data-theme="day"] .hud-btn,
:root[data-theme="day"] .hud-toggle {
  color: #efece5;
  border-color: rgba(255,255,255,.28);
  background: rgba(0,0,0,.42);
}
:root[data-theme="day"] .hud-btn[aria-pressed="true"] { color: #14130f; background: #e8c98a; border-color: #e8c98a; }
:root[data-theme="day"] .hint { color: rgba(255,255,255,.6); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
:root[data-theme="day"] .map { background: rgba(0,0,0,.45); }

/* ══════════════════════════════════════════════════════════════
   The darkroom
   ══════════════════════════════════════════════════════════════ */
.darkroom {
  position: fixed; inset: 0; z-index: 46;
  display: none;
  pointer-events: none;
}
body.in-dark .darkroom { display: block; }
body.in-dark .hud-tools,
body.in-dark .plaque,
body.in-dark .hint,
body.in-dark .map,
body.in-dark .touch { display: none !important; }
body.in-dark .hud-back { opacity: 0; pointer-events: none; }

.dr-close {
  position: fixed; z-index: 3;
  top: clamp(1rem, 2.4vw, 1.7rem); left: clamp(1rem, 3vw, 2.2rem);
  display: inline-flex; align-items: center; gap: .6rem;
  pointer-events: auto;
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,205,160,.6);
  opacity: 0; transform: translateX(-8px);
  transition: color .4s var(--ease), opacity .7s var(--ease) .3s, transform .7s var(--ease-out) .3s;
}
.darkroom.reveal .dr-close { opacity: 1; transform: none; }
.dr-close:hover { color: rgba(255,205,160,.95); }
.dr-close .arw { transition: transform .4s var(--ease-out); }
.dr-close:hover .arw { transform: translateX(-4px); }

.dr-head {
  position: absolute;
  top: clamp(4.2rem, 10vh, 6.5rem); left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 2.5rem));
  text-align: center;
  opacity: 0;
  transition: opacity .9s var(--ease) .35s;
}
.darkroom.reveal .dr-head { opacity: 1; }
.dr-eyebrow {
  margin: 0; font-size: 9.5px; letter-spacing: .34em;
  text-transform: uppercase; color: rgba(255,170,110,.65);
}
.dr-head h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.1;
  letter-spacing: -.02em; margin: .6rem 0 0;
  color: rgba(255,232,212,.92);
}
.dr-sub {
  margin: .7rem 0 0; font-size: 11.5px; line-height: 1.7;
  color: rgba(255,205,170,.42);
}

.dr-cap {
  position: absolute;
  left: 50%; bottom: clamp(4.6rem, 11vh, 7rem);
  transform: translate(-50%, 14px);
  width: min(440px, calc(100vw - 2.5rem));
  display: grid; gap: .3rem; justify-items: center; text-align: center;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255,160,90,.22);
  border-radius: 2px;
  background: rgba(24,10,4,.72);
  backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), transform .6s var(--ease-out), visibility .5s;
}
.dr-cap.on { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.dr-idx { font-size: 9px; letter-spacing: .28em; color: rgba(255,170,110,.6); font-variant-numeric: tabular-nums; }
.dr-title {
  font-family: var(--display); font-size: 1.35rem; font-weight: 300;
  color: rgba(255,236,220,.95);
}
.dr-by { font-size: 10px; letter-spacing: .06em; color: rgba(255,205,170,.44); }
.dr-by a { border-bottom: 1px solid rgba(255,180,130,.3); }
.dr-by a:hover { color: rgba(255,205,160,.9); }

.dr-nav {
  position: absolute;
  left: 50%; bottom: clamp(1.4rem, 4vh, 2.4rem);
  transform: translateX(-50%);
  display: flex; gap: .6rem;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .8s var(--ease) .45s;
}
.darkroom.reveal .dr-nav { opacity: 1; }
.dr-nav button {
  width: 44px; height: 40px;
  display: grid; place-content: center;
  border: 1px solid rgba(255,160,90,.26);
  border-radius: 2px;
  background: rgba(24,10,4,.6);
  color: rgba(255,205,170,.72);
  font-size: 15px;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.dr-nav button:hover {
  color: #1a0c04; background: rgba(255,170,110,.9); border-color: rgba(255,170,110,.9);
}

@media (max-width: 720px) {
  .dr-head h2 { font-size: 1.3rem; }
  .dr-sub { font-size: 10.5px; }
  .dr-cap { bottom: 5.4rem; }
}
