/* BubbleRewind — "tungsten night".
   Warm lamp light on deep brown-black, InShot caption pills, camcorder date stamps,
   iridescent bubbles. */

:root {
  --night: #0d0907;
  --night-2: #16100c;
  --night-3: #221813;
  --paper: #f3e6d3;
  --paper-dim: #c9b9a3;
  --paper-faint: #8d7c69;
  --amber: #ffb35c;
  --amber-deep: #e0812c;
  --rose: #ff7a8a;
  --iris-a: #7fd6ff;
  --iris-b: #c79bff;
  --stamp: #ff9a3c;
  --line: rgba(243, 230, 211, 0.12);
  --line-strong: rgba(243, 230, 211, 0.24);
  --glass: rgba(22, 16, 12, 0.62);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  --radius: 18px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --hand: "Patrick Hand SC", "Comic Neue", ui-rounded, sans-serif;
  --stamp-font: "VT323", ui-monospace, monospace;
  --ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-film: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--paper);
  font: 400 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--amber); color: var(--night); }

/* Film grain over everything, very quiet. */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, -2%); }
  100% { transform: translate(3%, 1%); }
}

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: radial-gradient(ellipse at 50% 40%, #2a1a10 0%, var(--night) 60%);
  transition: opacity 0.6s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
.boot-bubble {
  width: 74px; height: 74px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 246, 230, 0.95) 0 6%, transparent 14%),
    conic-gradient(from 200deg, rgba(127, 214, 255, 0.5), rgba(199, 155, 255, 0.45), rgba(255, 122, 138, 0.45), rgba(255, 179, 92, 0.55), rgba(127, 214, 255, 0.5));
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 72%);
  mask: radial-gradient(circle, transparent 58%, #000 72%);
  animation: breathe 2.4s var(--ease-film) infinite;
}
.boot-osd, .osd { font: 400 26px/1 var(--stamp-font); color: var(--stamp); letter-spacing: 0.08em; text-shadow: 0 0 12px rgba(255, 154, 60, 0.6); margin: 0; }
@keyframes breathe { 50% { transform: scale(1.12) translateY(-6px); } }
.noscript { padding: 40px; text-align: center; }

/* ---------- shared atoms ---------- */
.pill {
  display: inline-block;
  font: 400 clamp(15px, 1.4vw, 19px)/1.15 var(--hand);
  color: #111;
  background: #fff;
  padding: 0.28em 0.6em 0.22em;
  border-radius: 6px;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pill.bare { background: none; color: #fff; box-shadow: none; padding: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.stamp { font: 400 19px/1 var(--stamp-font); color: var(--stamp); letter-spacing: 0.06em; text-shadow: 0 0 8px rgba(255, 154, 60, 0.55); white-space: nowrap; }
.eyebrow { font: 500 12px/1 var(--ui); letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-faint); }
.display { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; font-weight: 340; letter-spacing: -0.02em; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-strong); background: rgba(243, 230, 211, 0.06);
  padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.btn:hover { background: rgba(243, 230, 211, 0.12); border-color: var(--paper-dim); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--paper); color: var(--night); border-color: var(--paper); }
.btn.primary:hover { background: #fff; }
.btn.ghost { border-color: transparent; background: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s var(--ease-out), border-color 0.2s;
}
.icon-btn:hover { background: rgba(243, 230, 211, 0.14); border-color: var(--line-strong); }
.icon-btn.on { color: var(--rose); border-color: rgba(255, 122, 138, 0.5); }
.icon-btn svg { width: 20px; height: 20px; }
.chip {
  border: 1px solid var(--line); background: none; border-radius: 999px; padding: 7px 14px;
  font-size: 14px; color: var(--paper-dim); transition: all 0.2s;
}
.chip:hover { color: var(--paper); border-color: var(--line-strong); }
.chip.on { background: var(--paper); color: var(--night); border-color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) clamp(16px, 3vw, 36px) 14px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font: italic 400 22px/1 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav a { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--paper-dim); transition: all 0.2s; }
.nav a:hover { color: var(--paper); }
.nav a.on { background: var(--paper); color: var(--night); }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); object-fit: cover; }

/* ---------- intro / sign in ---------- */
.intro { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; }
.intro .sky { position: absolute; inset: 0; }
.intro-card { position: relative; z-index: 2; text-align: center; padding: 24px; display: grid; justify-items: center; gap: 22px; animation: rise 1.4s var(--ease-out) both; }
.intro-title { font-size: clamp(54px, 11vw, 148px); line-height: 0.9; margin: 0; }
.intro-title em { font-style: italic; color: var(--amber); }
.intro-sub { max-width: 34ch; color: var(--paper-dim); margin: 0; font-size: clamp(15px, 1.6vw, 18px); }
.intro-msg { color: var(--rose); font-size: 15px; margin: 0; }
.steam-btn {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 14px 26px 14px 18px; border-radius: 14px;
  background: linear-gradient(180deg, #1b2838, #0e1621); color: #e6eef7;
  border: 1px solid rgba(102, 192, 244, 0.35);
  box-shadow: 0 20px 50px -18px rgba(102, 192, 244, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 600; letter-spacing: 0.01em; transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.steam-btn:hover { transform: translateY(-2px); box-shadow: 0 26px 60px -18px rgba(102, 192, 244, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.steam-btn svg { width: 30px; height: 30px; }
.intro .osd { position: absolute; top: max(22px, env(safe-area-inset-top)); left: 26px; z-index: 2; }
.intro .osd-r { left: auto; right: 26px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }

/* ---------- the sky (home hero) ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; touch-action: pan-y; }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.sky.dragging { cursor: grabbing; }
.sky-fallback { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 30%, #3a2416, transparent 60%), radial-gradient(ellipse at 75% 70%, #2b1420, transparent 55%), var(--night); }
.hero-greet { position: absolute; left: clamp(16px, 5vw, 72px); top: clamp(92px, 16vh, 150px); z-index: 3; pointer-events: none; max-width: min(640px, 90vw); }
.hero-greet { text-shadow: 0 2px 30px rgba(13, 9, 7, 0.85), 0 0 2px rgba(13, 9, 7, 0.6); }
.hero-greet h1 { margin: 10px 0 12px; font-size: clamp(40px, 6.4vw, 92px); line-height: 0.95; }
.hero-greet h1 em { color: var(--amber); font-style: italic; }
.hero-greet p { margin: 0; color: var(--paper-dim); max-width: 42ch; }
.hero-hint { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 3; pointer-events: none; color: var(--paper-faint); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; animation: fadeHint 6s ease 2s both; }
@keyframes fadeHint { 0%, 100% { opacity: 0; } 15%, 75% { opacity: 1; } }
.bubble-label {
  position: absolute; z-index: 4; pointer-events: none;
  transform: translate(-50%, -100%);
  display: grid; justify-items: center; gap: 6px; text-align: center;
  transition: opacity 0.18s ease;
  max-width: 280px;
}
.bubble-label .stamp { font-size: 17px; }
.scroll-cue { position: absolute; z-index: 3; right: clamp(16px, 4vw, 48px); bottom: 150px; display: grid; justify-items: center; gap: 8px; color: var(--paper-faint); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; background: none; border: 0; }
.scroll-cue span { writing-mode: vertical-rl; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--paper-faint), transparent); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- the cassette timeline ---------- */
.deck {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(1100px, calc(100vw - 32px)); z-index: 5;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(40, 28, 20, 0.78), rgba(18, 12, 9, 0.82));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(1.2);
  user-select: none;
}
.reel {
  width: 46px; height: 46px; border-radius: 50%;
  background:
    radial-gradient(circle, #1a120d 0 18%, transparent 19%),
    repeating-conic-gradient(from 0deg, #e9d9c2 0 14deg, #3b2a1f 14deg 60deg),
    #3b2a1f;
  -webkit-mask: radial-gradient(circle, #000 0 66%, transparent 67% 72%, #000 73%);
  mask: radial-gradient(circle, #000 0 66%, transparent 67% 72%, #000 73%);
  box-shadow: inset 0 0 0 3px #2a1d15;
  opacity: 0.9;
}
.track { position: relative; height: 64px; cursor: ew-resize; touch-action: none; }
.track-bars { position: absolute; inset: 14px 0 22px; display: flex; align-items: flex-end; gap: 2px; }
.track-bars i { flex: 1; background: linear-gradient(180deg, var(--amber), rgba(255, 179, 92, 0.25)); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.45; transition: opacity 0.25s; }
.track-bars i.near { opacity: 1; }
.track-months { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; font: 400 15px/18px var(--stamp-font); color: var(--paper-faint); }
.track-months span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.track-months span.year { color: var(--paper-dim); }
.playhead { position: absolute; top: 4px; bottom: 16px; width: 2px; margin-left: -1px; background: var(--paper); box-shadow: 0 0 12px var(--amber); border-radius: 2px; pointer-events: none; }
.playhead::before { content: ""; position: absolute; left: 50%; top: -5px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: var(--paper); border-radius: 2px; }
.deck-readout { white-space: nowrap; position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(13, 9, 7, 0.82); border: 1px solid var(--line); }
.deck-readout .stamp { font-size: 20px; }

/* ---------- sections below the sky ---------- */
main.home { position: relative; z-index: 2; background: linear-gradient(180deg, transparent, var(--night) 140px); margin-top: -140px; padding-top: 140px; }
.section { width: min(1320px, calc(100vw - 32px)); margin: 0 auto; padding: clamp(40px, 7vw, 96px) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(34px, 4.6vw, 60px); line-height: 1; }
.section-head h2 em { font-style: italic; color: var(--amber); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

/* Spotlight: the latest letter */
.spotlight { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.spotlight-copy h3 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.02; margin: 14px 0; }
.spotlight-copy p { color: var(--paper-dim); max-width: 46ch; white-space: pre-wrap; }
.spotlight-copy .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }

/* Month groups + the letters wall */
.month { margin-top: 44px; }
.month-head { position: sticky; top: 66px; z-index: 6; display: flex; align-items: baseline; gap: 14px; padding: 10px 0; margin-bottom: 14px; background: linear-gradient(180deg, var(--night) 70%, transparent); }
.month-head h3 { margin: 0; font: italic 400 clamp(24px, 2.6vw, 34px)/1 var(--display); font-variation-settings: "SOFT" 100; }
.month-head .count { color: var(--paper-faint); font-size: 14px; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 44vw), 1fr)); gap: clamp(14px, 2vw, 26px); }

/* ---------- montage card ---------- */
.card {
  --deep: #2b1a10; --mid: #7a5134; --light: #f1d3a6;
  position: relative; display: block; text-decoration: none; text-align: left;
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  border: 0; padding: 0; width: 100%;
  background:
    radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--light) 45%, transparent), transparent 60%),
    radial-gradient(ellipse at 80% 90%, color-mix(in srgb, var(--mid) 70%, transparent), transparent 65%),
    var(--deep);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  isolation: isolate;
  animation: cardIn 0.8s var(--ease-out) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.card:hover, .card:focus-visible { transform: translateY(-6px) rotate(-0.4deg); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px color-mix(in srgb, var(--light) 40%, transparent), 0 0 60px -20px var(--mid); }
.card .print {
  position: absolute; border-radius: 6px; overflow: hidden; background: #000;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.85), 0 0 0 3px rgba(255, 255, 255, 0.92);
  transition: transform 0.6s var(--ease-out), opacity 0.4s;
}
.card .print img, .card .print video { width: 100%; height: 100%; object-fit: cover; }
.card .p1 { left: 18%; top: 9%; width: 64%; height: 68%; transform: rotate(-1.5deg); z-index: 3; }
.card .p2 { left: 4%; top: 18%; width: 40%; height: 40%; transform: rotate(-9deg); z-index: 2; opacity: 0.92; }
.card .p3 { right: 4%; top: 36%; width: 40%; height: 40%; transform: rotate(8deg); z-index: 2; opacity: 0.92; }
.card:hover .p1 { transform: rotate(0deg) scale(1.04); }
.card:hover .p2 { transform: rotate(-14deg) translate(-8%, -4%); }
.card:hover .p3 { transform: rotate(13deg) translate(8%, 4%); }
.card .live { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s; }
.card:hover .live.ready { opacity: 1; }
.card .caption { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 5; display: grid; justify-items: start; gap: 7px; }
.card .caption .pill { font-size: clamp(14px, 1.25vw, 17px); }
.card .meta { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5; display: flex; justify-content: space-between; align-items: center; }
.card .meta .stamp { font-size: 16px; }
.card .dur { font: 500 12px/1 var(--ui); padding: 4px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; backdrop-filter: blur(6px); }
.card .heart { color: var(--rose); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.card .watched { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--amber); z-index: 6; box-shadow: 0 0 10px var(--amber); }
.card.new::after { content: "NEW"; position: absolute; z-index: 6; right: 10px; bottom: 14px; font: 400 16px/1 var(--stamp-font); color: var(--night); background: var(--amber); padding: 3px 6px 2px; border-radius: 4px; }
.card.developing { filter: saturate(0.3) brightness(0.7); }
.card.developing::before { content: "developing…"; position: absolute; inset: 0; display: grid; place-items: center; z-index: 7; font: 400 22px var(--stamp-font); color: var(--stamp); }
.card.hidden-item { outline: 2px dashed rgba(255, 122, 138, 0.6); outline-offset: -2px; }
.card.big { aspect-ratio: 4 / 5; }
.card.big .caption .pill { font-size: clamp(17px, 1.8vw, 24px); }

/* Album montage covers */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 90vw), 1fr)); gap: clamp(16px, 2vw, 28px); }
.album-cover { position: relative; display: block; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--night-2); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9); border: 0; padding: 0; width: 100%; text-align: left; transition: transform 0.5s var(--ease-out); }
.album-cover:hover { transform: translateY(-5px); }
.album-cover .tile { position: absolute; overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 2px #fff, 0 12px 28px -10px rgba(0, 0, 0, 0.8); transition: transform 0.7s var(--ease-out); }
.album-cover .tile img { width: 100%; height: 100%; object-fit: cover; animation: kb 18s ease-in-out infinite alternate; }
.album-cover .t0 { left: 5%; top: 7%; width: 50%; height: 62%; transform: rotate(-3deg); z-index: 3; }
.album-cover .t1 { left: 47%; top: 4%; width: 46%; height: 42%; transform: rotate(4deg); z-index: 2; }
.album-cover .t2 { left: 52%; top: 44%; width: 42%; height: 48%; transform: rotate(-2deg); z-index: 4; }
.album-cover .t3 { left: 12%; top: 58%; width: 36%; height: 36%; transform: rotate(6deg); z-index: 5; }
.album-cover:hover .t0 { transform: rotate(-5deg) translate(-3%, -2%); }
.album-cover:hover .t1 { transform: rotate(7deg) translate(3%, -3%); }
.album-cover:hover .t2 { transform: rotate(-1deg) translate(3%, 3%); }
.album-cover:hover .t3 { transform: rotate(9deg) translate(-4%, 3%); }
.album-cover .caption { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
@keyframes kb { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-3%, -2%); } }

footer.end { text-align: center; padding: 120px 16px 80px; color: var(--paper-faint); }
footer.end .display { font-size: clamp(28px, 4vw, 48px); color: var(--paper); margin: 12px 0; font-style: italic; }

/* ---------- theater ---------- */
.theater { position: fixed; inset: 0; z-index: 60; background: #050302; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(16px, 3vw, 48px); padding: 76px clamp(16px, 3vw, 48px) 24px; overflow: hidden; animation: theaterIn 0.7s var(--ease-out) both; }
@keyframes theaterIn { from { clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); } }
.ambient { position: absolute; inset: -10%; width: 120%; height: 120%; filter: blur(60px) saturate(1.5) brightness(0.75); opacity: 0.85; transform: scale(1.1); pointer-events: none; }
.theater::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%); pointer-events: none; z-index: 1; }
.theater > * { position: relative; z-index: 2; }
.theater > .ambient { position: absolute; z-index: 0; }
.theater > .close-theater { position: absolute; z-index: 5; }
.screen { position: relative; height: calc(100svh - 150px); max-height: 1100px; aspect-ratio: var(--ar, 9 / 16); max-width: min(92vw, 1400px); border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 120px -30px rgba(0, 0, 0, 0.95), 0 0 140px -40px var(--glow, var(--amber)); }
.screen video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen .osd { position: absolute; top: 16px; left: 18px; font-size: 24px; pointer-events: none; transition: opacity 0.3s; }
.screen .osd-r { left: auto; right: 18px; }
.screen .big-play { position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(8px); color: #fff; transition: opacity 0.3s, transform 0.3s var(--ease-out); }
.screen .big-play svg { width: 34px; height: 34px; margin-left: 4px; }
.screen.playing .big-play { opacity: 0; transform: scale(0.8); pointer-events: none; }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); display: grid; gap: 10px; transition: opacity 0.35s; }
.screen.playing.idle .controls, .screen.playing.idle .osd { opacity: 0; }
.screen.playing.idle { cursor: none; }
.scrub { position: relative; height: 34px; cursor: pointer; touch-action: none; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.scrub .film { position: absolute; inset: 0; display: flex; opacity: 0.55; }
.scrub .film img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.scrub .done { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 179, 92, 0.35); border-right: 2px solid var(--paper); box-shadow: 0 0 14px var(--amber); }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ctl-row .left, .ctl-row .right { display: flex; align-items: center; gap: 8px; }
.ctl-row .time { font: 400 19px/1 var(--stamp-font); color: var(--paper); letter-spacing: 0.06em; }
.ctl-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; transition: background 0.2s; }
.ctl-btn:hover { background: rgba(255, 255, 255, 0.22); }
.ctl-btn svg { width: 18px; height: 18px; }
.rewind-fx { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 4px); }
.rewind-fx::before { content: ""; position: absolute; left: 0; right: 0; height: 18%; background: linear-gradient(transparent, rgba(255, 255, 255, 0.35), transparent); animation: track 0.5s linear infinite; }
.rewinding .rewind-fx { opacity: 1; }
.rewinding video { filter: saturate(1.6) contrast(1.2) hue-rotate(-10deg); transform: skewX(-1.5deg); }
@keyframes track { from { top: 100%; } to { top: -20%; } }
.side { max-width: 380px; display: grid; gap: 18px; align-content: center; }
.side.left { justify-self: end; text-align: right; justify-items: end; }
.side.right { justify-self: start; }
.side h1 { margin: 0; font-size: clamp(28px, 3vw, 46px); line-height: 1.02; }
.side .note { white-space: pre-wrap; color: var(--paper-dim); font: 400 clamp(17px, 1.3vw, 21px)/1.45 var(--hand); max-height: 40vh; overflow: auto; }
.side .row { display: flex; gap: 10px; flex-wrap: wrap; }
.side.left .row { justify-content: flex-end; }
.nextup { display: grid; gap: 10px; }
.nextup button { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 9, 7, 0.5); transition: background 0.2s, border-color 0.2s; }
.nextup button:hover { background: rgba(243, 230, 211, 0.08); border-color: var(--line-strong); }
.nextup img { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; }
.nextup .t { font: 400 16px/1.2 var(--hand); }
.close-theater { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; z-index: 5; }
.theater .topline { position: absolute; top: max(20px, env(safe-area-inset-top)); left: 22px; z-index: 5; display: flex; gap: 14px; align-items: center; }

/* ---------- album ---------- */
.album-page { padding-top: 76px; }
.montage-stage { position: relative; height: min(78svh, 900px); margin: 0 clamp(8px, 2vw, 24px); border-radius: 26px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease-film); }
.scene.on { opacity: 1; }
.scene .frame { position: absolute; overflow: hidden; background: #000; }
.scene .frame img, .scene .frame video { width: 100%; height: 100%; object-fit: cover; }
.scene.on .kb img { animation: kenburns 7s ease-out both; }
@keyframes kenburns { from { transform: scale(1.18) translate(2%, 1%); } to { transform: scale(1.02) translate(-1%, -1%); } }
.scene.single .frame { inset: 0; }
.scene.single .blur { position: absolute; inset: -5%; filter: blur(40px) brightness(0.55); }
.scene.single .frame.fit img { object-fit: contain; }
.scene.diptych .frame:nth-child(1) { left: 0; top: 0; bottom: 0; width: calc(50% - 3px); }
.scene.diptych .frame:nth-child(2) { right: 0; top: 0; bottom: 0; width: calc(50% - 3px); }
.scene.triptych .frame:nth-child(1) { left: 0; top: 0; bottom: 0; width: calc(40% - 4px); }
.scene.triptych .frame:nth-child(2) { left: 40%; top: 0; height: calc(50% - 3px); right: 0; }
.scene.triptych .frame:nth-child(3) { left: 40%; bottom: 0; height: calc(50% - 3px); right: 0; }
.scene.scatter { background: radial-gradient(ellipse at 50% 40%, #3b2516, #0d0907 70%); }
.scene.scatter .frame { width: 34%; aspect-ratio: 4 / 5; border-radius: 4px; box-shadow: 0 0 0 6px #fff, 0 30px 60px -20px rgba(0, 0, 0, 0.9); transition: transform 1.6s var(--ease-out); }
.scene.scatter .frame:nth-child(1) { left: 6%; top: 12%; transform: rotate(-8deg) translateY(30px); }
.scene.scatter .frame:nth-child(2) { left: 34%; top: 6%; transform: rotate(3deg) translateY(30px); z-index: 2; }
.scene.scatter .frame:nth-child(3) { left: 61%; top: 14%; transform: rotate(9deg) translateY(30px); }
.scene.scatter.on .frame:nth-child(1) { transform: rotate(-6deg); }
.scene.scatter.on .frame:nth-child(2) { transform: rotate(1deg); }
.scene.scatter.on .frame:nth-child(3) { transform: rotate(7deg); }
.montage-title { position: absolute; left: clamp(16px, 4vw, 48px); bottom: clamp(16px, 4vw, 44px); z-index: 4; display: grid; gap: 10px; justify-items: start; max-width: 70%; }
.montage-title h1 { margin: 0; font-size: clamp(34px, 5vw, 72px); line-height: 0.98; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); }
.montage-ctl { position: absolute; right: 18px; bottom: 18px; z-index: 4; display: flex; gap: 8px; }
.montage-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.65)); pointer-events: none; z-index: 3; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 30vw), 1fr)); gap: 8px; }
.grid button { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--night-2); }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out), opacity 0.4s; opacity: 0; }
.grid img.loaded { opacity: 1; }
.grid button:hover img { transform: scale(1.06); }
.grid .vid-badge { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; }
.grid .vid-badge svg { width: 12px; height: 12px; margin-left: 2px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(5, 3, 2, 0.94); backdrop-filter: blur(10px); display: grid; place-items: center; animation: fade 0.3s ease both; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 86svh; border-radius: 10px; box-shadow: var(--shadow); object-fit: contain; }
.lightbox .lb-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { right: 14px; }
.lightbox .lb-meta { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; }
.loading-osd { font: 400 24px var(--stamp-font); color: var(--stamp); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- booth (admin) ---------- */
.booth { padding: 90px 0 80px; width: min(1320px, calc(100vw - 32px)); margin: 0 auto; }
.booth h1 { font-size: clamp(36px, 5vw, 64px); margin: 6px 0 26px; line-height: 1; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 18px; }
.panel { background: linear-gradient(180deg, rgba(34, 24, 19, 0.7), rgba(22, 16, 12, 0.7)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; align-content: start; }
.panel h2 { margin: 0; font: italic 400 26px/1.1 var(--display); font-variation-settings: "SOFT" 100; }
.bar { height: 10px; border-radius: 99px; background: rgba(243, 230, 211, 0.08); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .ready { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.bar .working { background: var(--paper); }
.bar .failed { background: var(--rose); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--paper-faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.feed { display: grid; gap: 0; max-height: 380px; overflow: auto; font-size: 14px; }
.feed div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.feed .when { font: 400 16px/1.2 var(--stamp-font); color: var(--paper-faint); }
.input, .textarea { width: 100%; background: rgba(13, 9, 7, 0.6); color: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; font: inherit; }
.textarea { min-height: 90px; resize: vertical; font: 400 17px/1.4 var(--hand); }
.input:focus, .textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 179, 92, 0.2); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: rgba(243, 230, 211, 0.16); position: relative; transition: background 0.2s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); transition: transform 0.25s var(--ease-out); }
.switch input:checked { background: var(--amber-deep); }
.switch input:checked::after { transform: translateX(18px); }
.letters-admin { display: grid; gap: 10px; margin-top: 18px; }
.letter-row { display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(22, 16, 12, 0.55); }
.letter-row img { width: 64px; height: 86px; object-fit: cover; border-radius: 8px; background: #000; }
.letter-row .controls-col { display: grid; gap: 8px; justify-items: start; }
.letter-row .sub { font-size: 12px; color: var(--paper-faint); }
.letter-row.saved { border-color: rgba(255, 179, 92, 0.6); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--paper-faint); }
.status-dot.ready { background: var(--amber); }
.status-dot.working { background: var(--paper); animation: blink 1s infinite; }
.status-dot.failed { background: var(--rose); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 95; padding: 10px 18px; border-radius: 999px; background: var(--paper); color: var(--night); font-weight: 500; box-shadow: var(--shadow); animation: rise 0.4s var(--ease-out) both; }
.empty { text-align: center; color: var(--paper-faint); padding: 60px 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .theater { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; overflow: auto; align-items: start; justify-items: center; padding-top: 70px; }
  .side, .side.left { justify-self: center; text-align: center; justify-items: center; max-width: 640px; }
  .side.left .row { justify-content: center; }
  .screen { height: auto; width: min(92vw, calc((100svh - 160px) * var(--arn, 0.5625))); max-height: none; }
  .nextup { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 760px) {
  .nav a { padding: 6px 10px; font-size: 13px; }
  .brand-name { display: none; }
  .spotlight { grid-template-columns: 1fr; }
  .deck { grid-template-columns: 1fr; padding: 10px 12px; }
  .reel { display: none; }
  .hero-hint { display: none; }
  .scroll-cue { bottom: 150px; }
  .letter-row { grid-template-columns: 56px 1fr; }
  .letter-row > :nth-child(3), .letter-row > :nth-child(4) { grid-column: 1 / -1; }
  .scene.scatter .frame { width: 44%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  body::after { display: none; }
}
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- update modal (cannot be dismissed; reload is the only way on) ---------- */
.update-veil {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(13, 9, 7, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(0.8);
  backdrop-filter: blur(16px) saturate(0.8);
  animation: fade 0.35s ease both;
}
.update-card {
  width: min(440px, 100%); text-align: center; display: grid; gap: 14px; justify-items: center;
  padding: 30px 26px 26px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(40, 28, 20, 0.95), rgba(18, 12, 9, 0.97));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease-out) both;
}
.update-card h2 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.05; }
.update-card p { margin: 0; color: var(--paper-dim); }
.update-card .osd { font-size: 22px; color: var(--stamp); }
.update-card .btn { margin-top: 6px; padding: 12px 28px; font-size: 16px; }
