/* Singularity v3 — "The Building". Paper on night.
   The building (lounge.js) is the hero; everything else is printed paper pinned over it. */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: 'Bricolage'; src: url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url(/fonts/bricolage-grotesque-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url(/fonts/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/figtree-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/figtree-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/figtree-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/figtree-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --night: #14122b;
  --night-2: #2a2350;
  --brick: #3a2b3f;
  --brick-2: #4b3850;
  --paper: #fff7ea;
  --paper-2: #f3e6cf;
  --card: #fffcf5;          /* brightest paper: polaroids, notes */
  --ticket: #fff1cf;        /* sun-washed ticket stock */
  --ink: #221b2e;
  --ink-2: #5b5068;
  --ink-3: #8d8299;
  --tomato: #ff4f3a;
  --tomato-ink: #d93a26;    /* tomato for text on paper (contrast) */
  --sun: #ffc23d;
  --mint: #38c9a0;
  --mint-ink: #178a6a;
  --plum: #7d5cff;
  --cloud: #eee8ff;         /* thought clouds */
  --cloud-ink: #3a2c78;
  --rule: rgba(34, 27, 46, .16);

  --display: 'Bricolage', 'Figtree', system-ui, sans-serif;
  --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --shadow: 0 1px 1px rgba(34, 27, 46, .06), 0 14px 30px -14px rgba(10, 8, 26, .55);
  --shadow-lift: 0 2px 2px rgba(34, 27, 46, .06), 0 22px 40px -16px rgba(10, 8, 26, .6);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .14 0 0 0 0 .1 0 0 0 0 .18 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.3, 1.5, .5, 1);
  --head-h: 64px;
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  font: 400 16px/1.5 var(--text);
  color: var(--paper);
  background-color: var(--night);
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 247, 234, .7) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, rgba(255, 247, 234, .55) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 30%, rgba(255, 247, 234, .6) 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 42%, rgba(255, 247, 234, .4) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 24%, rgba(255, 247, 234, .5) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 6% 66%, rgba(255, 247, 234, .4) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 74%, rgba(255, 247, 234, .45) 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, #1d1940 55%, var(--night-2) 100%);
  background-size: 640px 640px, 520px 520px, 700px 700px, 460px 460px, 580px 580px, 610px 610px, 690px 690px, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.muted, .quiet { color: var(--ink-2); }
.noscript { padding: 40px; text-align: center; }
[hidden] { display: none !important; }

/* paper surface */
.paper, .column, .paper-sheet, .panel, .menu {
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
}

/* ------------------------------------------------------------------ header */
.topbar {
  position: relative; z-index: 40;
  height: var(--head-h);
  display: flex; align-items: center; gap: 36px;
  padding: 0 28px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--paper); flex: none; }
.brand-mark { display: block; width: auto; height: 38px; transform-origin: 50% 60%; }
.brand-word { display: block; width: auto; height: 27px; margin-top: 2px; }
.brand:hover .brand-mark { animation: beat .9s var(--ease-pop) 1; }
.nav { display: flex; align-items: center; gap: 0; font: 500 15px/1 var(--text); }
.nav a { text-decoration: none; color: rgba(255, 247, 234, .66); padding: 10px 0 12px; position: relative; transition: color .15s; }
.nav a + a::before { content: '·'; color: rgba(255, 247, 234, .3); padding: 0 12px; }
.nav a:hover { color: var(--paper); }
.nav a[aria-current='page'] { color: var(--paper); }
.nav a[aria-current='page']::after {
  content: ''; position: absolute; right: 0; bottom: 2px; height: 8px; width: var(--uw, calc(100% - 26px));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c8-5 14 3 22-1s14-4 22 0 14 4 22 0 14-4 22 0 14 3 26-1' fill='none' stroke='%23ff4f3a' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.nav a:first-child[aria-current='page']::after { width: 100%; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; font: 500 14px/1 var(--text); }
.onair { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--paper); }
.onair i { width: 9px; height: 9px; border-radius: 50%; background: var(--tomato); box-shadow: 0 0 0 0 rgba(255, 79, 58, .6); animation: onair 2s ease-out infinite; }
.onair[data-state='replay'] { color: var(--sun); }
.onair[data-state='replay'] i { background: transparent; border: 2px solid var(--sun); animation: none; }
.onair[data-state='connecting'] i, .onair[data-state='offline'] i { background: var(--ink-3); animation: none; }
.onair[data-state='offline'] { color: rgba(255, 247, 234, .6); }
.viewers { color: rgba(255, 247, 234, .66); }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; margin-right: -8px; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--paper); margin: 0 auto; position: relative; transition: transform .2s; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; width: 14px; }
.menu-btn span::after { top: 6px; width: 17px; }
.menu-btn[aria-expanded='true'] span { background: transparent; }
.menu-btn[aria-expanded='true'] span::before { top: 0; width: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] span::after { top: 0; width: 20px; transform: rotate(-45deg); }
.menu {
  position: absolute; top: calc(var(--head-h) - 4px); right: 10px; width: min(340px, calc(100vw - 20px));
  border-radius: 6px; padding: 14px 22px 18px; box-shadow: var(--shadow-lift); transform: rotate(.8deg);
  animation: drop .28s var(--ease-pop);
}
.menu nav { display: grid; }
.menu a { text-decoration: none; padding: 9px 0; font: 800 26px/1.05 var(--display); letter-spacing: -.03em; border-bottom: 1.5px dashed var(--rule); }
.menu a span { display: block; font: 500 14px/1.3 var(--text); color: var(--ink-3); letter-spacing: 0; margin-top: 3px; }
.menu a[aria-current='page'] { color: var(--tomato-ink); }
.menu-note { font-size: 13px; color: var(--ink-2); margin-top: 14px; }

/* ------------------------------------------------------------------ buttons */
.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--text); text-decoration: none; white-space: nowrap;
  padding: 12px 18px; border-radius: 10px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.pbtn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.pbtn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.pbtn:disabled { opacity: .45; transform: none; box-shadow: 0 3px 0 var(--ink); }
.pbtn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 3px 0 var(--tomato); }
.pbtn-ink:hover { box-shadow: 0 4px 0 var(--tomato); }
.pbtn-ink:active { box-shadow: 0 0 0 var(--tomato); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ------------------------------------------------------------------ marks */
.stamp {
  display: inline-block; font: 800 15px/1 var(--display); letter-spacing: -.01em; white-space: nowrap;
  padding: 5px 10px 6px; border: 2.5px solid currentColor; border-radius: 7px;
  color: var(--tomato-ink); transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1.5px var(--paper), inset 0 0 0 3px currentColor;
  opacity: .92; mix-blend-mode: multiply;
}
.stamp.is-match { color: var(--mint-ink); transform: rotate(-3deg); }
.stamp.is-no { color: var(--ink-2); transform: rotate(3deg); }
.stamp.is-half { color: var(--tomato-ink); transform: rotate(-5deg); }
.stamp.is-split { color: var(--tomato-ink); transform: rotate(6deg); }
.stamp.is-asked { color: var(--tomato-ink); }
.stamp.is-live { color: var(--plum); }
.stamp-s { font-size: 13px; padding: 4px 8px 5px; }
.tape {
  position: absolute; top: -11px; left: 50%; width: 86px; height: 24px; margin-left: -43px;
  background: rgba(255, 194, 61, .62); transform: rotate(-4deg);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent 0), repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 5px);
  -webkit-mask-composite: source-over;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.tape.tape-l { left: 28px; margin-left: 0; transform: rotate(-8deg); }
.tape.tape-t { transform: rotate(5deg); z-index: 2; }
.av { display: inline-block; line-height: 0; vertical-align: bottom; }
.emote { display: inline-block; width: 40px; height: 40px; }
.emote svg { width: 100%; height: 100%; }
.ln-puff { display: inline-block; color: var(--plum); opacity: .7; }
.ln-puff svg { width: 20px; height: 14px; }

/* heart gauge */
.hgauge { display: inline-block; width: 30px; height: 30px; --hg-empty: #f6dcc6; }
.hgauge svg { width: 100%; height: 100%; overflow: visible; }
.hgauge .hg-level { transition: transform .7s var(--ease-out); }
.hgauge .hg-wave { animation: wave 2.4s linear infinite; }
.hgauge.up { animation: beat .6s var(--ease-pop); }
.hgauge.down { animation: wobble .5s ease; }

/* notes */
.note {
  position: relative; background: var(--card); background-image: var(--grain); color: var(--ink);
  padding: 18px 20px; border-radius: 3px; box-shadow: var(--shadow); transform: rotate(-1.2deg);
}
.note-pin { position: absolute; top: -8px; left: 50%; margin-left: -10px; width: 20px; height: 20px; }
.note-pin svg { width: 100%; height: 100%; }
.note-big { font: 800 23px/1.1 var(--display); letter-spacing: -.025em; margin-bottom: 6px; }
.state-note { max-width: 460px; margin: 10px auto; }
.state-note .pbtn { margin-top: 14px; }
.loading { display: grid; justify-items: center; gap: 14px; padding: 60px 0; color: rgba(255, 247, 234, .7); }
.paper-sheet .loading { color: var(--ink-2); }
.dots { display: flex; gap: 7px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: bob 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }

/* ------------------------------------------------------------------ home */
html[data-view='home'] body { overflow: hidden; }
.home {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(400px, 33vw, 500px);
  height: calc(100svh - var(--head-h));
}
.stage { position: relative; overflow: hidden; min-width: 0; }
.map-box { position: absolute; inset: 0; }
.map-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; color: rgba(255, 247, 234, .7); }
.mw-building { display: grid; grid-template-columns: repeat(4, 34px); gap: 12px; padding: 16px; background: var(--brick); border-radius: 4px 4px 0 0; box-shadow: 0 30px 0 -10px var(--brick-2); }
.mw-win { height: 42px; border-radius: 3px; background: #ffd77a; box-shadow: 0 0 18px rgba(255, 194, 61, .45); animation: flicker 3s ease-in-out infinite; }
.mw-win:nth-child(3n) { animation-delay: .7s; background: #ffc96a; }
.mw-win:nth-child(4n+1) { animation-delay: 1.4s; background: #f7b6a0; }

.stage-tools { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; z-index: 5; }
.stage-tools > * { pointer-events: auto; }
.stickers { display: flex; align-items: flex-end; padding-left: 6px; }
.sticker {
  width: 54px; height: 54px; padding: 0; border: 0; background: none; margin-left: -8px;
  transform: rotate(var(--rot)); transition: transform .18s var(--ease-pop);
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 5px 6px rgba(10, 8, 26, .45));
}
.sticker .emote { width: 42px; height: 42px; }
.sticker:hover, .sticker:focus-visible { transform: translateY(-8px) rotate(0) scale(1.1); z-index: 2; }
.sticker.is-tapped { animation: sticker-tap .45s var(--ease-pop); }
.sticker-pop { position: absolute; z-index: 6; width: 58px; height: 58px; margin: -29px 0 0 -29px; pointer-events: none;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 6px 8px rgba(10, 8, 26, .4));
  animation: sticker-fly 1.8s var(--ease-out) forwards; }
.sticker-pop .emote { width: 100%; height: 100%; }
.cam {
  font: 600 13px/1 var(--text); color: var(--ink); background: var(--paper); background-image: var(--grain);
  border: 0; border-radius: 999px; padding: 9px 14px; box-shadow: var(--shadow); transform: rotate(1deg);
}
.cam:hover { transform: rotate(0) translateY(-1px); }

.hint {
  position: absolute; top: 22px; left: 22px; z-index: 6; max-width: 300px; padding: 20px 40px 18px 20px;
  font: 700 19px/1.28 var(--display); letter-spacing: -.015em; transform: rotate(-2.2deg);
  animation: pin-in .5s var(--ease-pop);
}
.hint.is-gone { transform: rotate(-8deg) translateY(-20px) scale(.9); opacity: 0; transition: .3s; }
.hint-cloud { background: var(--cloud); color: var(--cloud-ink); border-radius: 14px; padding: 0 7px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hint-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 5px; border: 0; background: none; color: var(--ink-3); border-radius: 50%; }
.hint-x:hover { color: var(--ink); background: var(--paper-2); }
.hint-x svg { width: 100%; height: 100%; }

/* the paper column */
.column {
  position: relative; z-index: 10; min-height: 0; display: flex; flex-direction: column;
  border-radius: 16px 0 0 0;
  box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .6);
}
.sheet-grab { display: none; }
.column-in { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 22px 22px 0; }
.ticket-wrap { flex: none; color: var(--ink); }

/* ------------------------------------------------------------------ ticket */
.ticket { position: relative; filter: drop-shadow(0 10px 14px rgba(34, 27, 46, .16)) drop-shadow(0 1px 1px rgba(34, 27, 46, .1)); transform: rotate(-.6deg); }
.tk-main, .tk-stubs, .tk-result {
  background-color: var(--ticket); background-image: var(--grain);
}
.tk-main {
  padding: 16px 20px 14px; border-radius: 12px 12px 0 0;
  -webkit-mask: radial-gradient(circle 11px at 0 100%, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 100%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 100%, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 100%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
}
.tk-tear { height: 0; border-top: 2px dashed rgba(34, 27, 46, .22); margin: 0 14px; position: relative; z-index: 1; }
.tk-stubs, .tk-result {
  padding: 12px 16px 16px; border-radius: 0 0 12px 12px;
  -webkit-mask: radial-gradient(circle 11px at 0 0, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 0, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 0, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 0, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
}
.tk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tk-title { font: 800 21px/1.1 var(--display); letter-spacing: -.025em; display: flex; align-items: center; gap: 9px; }
.ticket-wrap:not(.is-replay)[data-state='live'] .tk-title::before, .ticket-wrap:not(.is-replay)[data-state='soon'] .tk-title::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tomato); flex: none; animation: onair 2s ease-out infinite;
}
.tk-meta { font: 500 13.5px/1.2 var(--text); color: var(--ink-2); white-space: nowrap; }
.tk-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 10px; }
.tk-p { display: grid; justify-items: center; text-align: center; min-width: 0; }
.tk-av { border: 0; background: none; padding: 0; border-radius: 12px; transition: transform .2s var(--ease-pop); }
.tk-av:hover { transform: translateY(-3px) rotate(-2deg); }
.tk-av .av svg { width: 84px; height: auto; }
.tk-name { font: 800 20px/1.05 var(--display); letter-spacing: -.02em; margin-top: 2px; }
.tk-model { font: 500 13px/1.3 var(--text); color: var(--ink-3); }
.tk-gauge { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.tk-num { font: 700 15px/1 var(--text); color: var(--ink-2); min-width: 2ch; text-align: left; }
.tk-amp { color: var(--tomato); width: 22px; height: 22px; align-self: start; margin-top: 30px; animation: beat 1.6s ease-in-out infinite; }
.tk-amp svg { width: 100%; height: 100%; }
.tk-show { text-align: center; font: 500 14.5px/1.35 var(--text); color: var(--ink-2); margin-top: 10px; }
.tk-status {
  text-align: center; font: 700 16.5px/1.35 var(--display); letter-spacing: -.01em; margin: 8px auto 2px; max-width: 34ch;
}
.tk-hl { background: linear-gradient(transparent 56%, rgba(255, 194, 61, .55) 56%, rgba(255, 194, 61, .55) 90%, transparent 90%); padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tk-verdict { font-size: 22px; font-weight: 800; }
.verdict-word { font: 800 26px/1 var(--display); margin-top: 6px; letter-spacing: -.03em; position: relative; padding: 2px 10px 4px; }
.verdict-word.is-yes { color: var(--tomato-ink); }
.verdict-word.is-yes::after { content: ''; position: absolute; inset: -4px -6px; border: 2.5px solid var(--tomato); border-radius: 50% 46% 52% 48%; transform: rotate(-6deg); }
.verdict-word.is-no { color: var(--ink-2); text-decoration: line-through 3px var(--ink-2); }
.ticket.is-match .tk-verdict { color: var(--mint-ink); }

.stubs-hint { font: 500 13.5px/1.3 var(--text); color: var(--ink-2); text-align: center; margin-bottom: 10px; }
.stub-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stub {
  position: relative; text-align: left; border: 0; padding: 11px 12px 10px 22px; border-radius: 4px 9px 9px 4px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 1px 0 rgba(34, 27, 46, .08), 0 6px 12px -8px rgba(34, 27, 46, .4);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 6px; align-items: center;
  transform: rotate(-1.4deg); transition: transform .2s var(--ease-pop), opacity .2s;
}
.stub + .stub { transform: rotate(1.2deg); }
.stub::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; border-left: 2px dotted rgba(34, 27, 46, .3); }
.stub-ico { width: 20px; height: 20px; }
.stub-ico svg { width: 100%; height: 100%; }
.stub-yes .stub-ico { color: var(--tomato); }
.stub-no .stub-ico { color: var(--ink); }
.stub-label { font: 800 17px/1.05 var(--display); letter-spacing: -.02em; }
.stub-votes { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 20px; color: var(--ink-2); }
.stub-tally svg { height: 18px; width: auto; }
.stub-count { font: 600 13px/1 var(--text); color: var(--ink-3); }
.stub-votes.is-zero::after { content: 'no votes yet'; font: 500 13px/1 var(--text); color: var(--ink-3); }
.stub:not(:disabled):hover { transform: rotate(0) translateY(-3px); }
.stub.is-tearing { animation: tear .4s var(--ease-out) forwards; }
.stub.is-kept { background: #ffe39a; transform: rotate(-3deg) translate(-2px, -2px); }
.stub.is-kept::after { content: 'yours'; position: absolute; top: -10px; left: 14px; font: 800 12px/1 var(--display); color: var(--paper); background: var(--tomato); padding: 4px 7px; border-radius: 5px; transform: rotate(6deg); }
.stub.is-other { opacity: .55; }
.stub:disabled:not(.is-kept):not(.is-other) { opacity: .7; }
.tk-stubs.is-replay .stubs-hint { margin: 2px 0; }
.tk-result { display: grid; gap: 12px; justify-items: center; text-align: center; }
.tk-crowd { font: 600 15px/1.35 var(--text); color: var(--ink-2); }

.note-empty { margin: 6px 8px 2px; text-align: center; padding: 22px 20px 20px; }
.note-empty p:not(.note-big) { color: var(--ink-2); }

/* ------------------------------------------------------------------ transcript */
.script-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.script-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0 8px; border-bottom: 1.5px solid var(--ink); }
.script-title { font: 800 21px/1 var(--display); }
.segs { display: flex; gap: 14px; }
.seg { border: 0; background: none; padding: 4px 0 6px; font: 600 13.5px/1 var(--text); color: var(--ink-3); position: relative; white-space: nowrap; }
.seg:hover { color: var(--ink); }
.seg[aria-pressed='true'] { color: var(--ink); }
.seg[aria-pressed='true']::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: -2px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c8-5 14 3 22-1s14-4 22 0 14 4 22 0 14-4 22 0 14 3 26-1' fill='none' stroke='%23ff4f3a' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.script-body { position: relative; flex: 1; min-height: 0; display: flex; }
.script-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 28px 0; scrollbar-width: thin; scrollbar-color: rgba(34, 27, 46, .25) transparent; }
.script-empty { color: var(--ink-3); text-align: center; padding: 30px 16px; font-size: 15px; }
.script-jump { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 700 13px/1 var(--text); color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; padding: 9px 14px; box-shadow: var(--shadow); }
.script { list-style: none; margin: 0; padding: 0; }
.ln { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 14px 0 12px; }
.ln + .ln, .ev + .ln { border-top: 1px solid rgba(34, 27, 46, .07); }
.ln.is-new { animation: line-in .45s var(--ease-out); }
.ln-av { border: 0; background: none; padding: 0; align-self: start; margin-top: -2px; transition: transform .2s var(--ease-pop); }
.ln-av:hover { transform: rotate(-4deg) scale(1.06); }
.ln-av .av svg { width: 44px; height: auto; }
.ln-who { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font: 700 14.5px/1.4 var(--text); }
.ln-name { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); }
.ln-name:hover { text-decoration: underline 2px var(--tomato); text-underline-offset: 3px; }
.ln-to { color: var(--ink-3); display: inline-flex; }
.ln-to svg { width: 22px; height: 11px; }
.ln-room { font-weight: 500; font-size: 13px; color: var(--ink-3); margin-left: 4px; }
.ln.is-date .ln-room { color: var(--tomato-ink); font-weight: 600; }
.ln.is-date .ln-room::before { content: '♥ '; }
.ln-say { font: 400 16px/1.45 var(--text); color: var(--ink); margin-top: 2px; }
.ln-think {
  position: relative; margin-top: 10px; margin-left: 4px;
  background: var(--cloud); color: var(--cloud-ink);
  border-radius: 20px 22px 20px 18px; padding: 9px 14px 10px 38px;
  font: 400 15px/1.45 var(--text);
}
.ln-think::before, .ln-think::after { content: ''; position: absolute; background: var(--cloud); border-radius: 50%; }
.ln-think::before { width: 10px; height: 10px; left: -6px; top: -7px; }
.ln-think::after { width: 6px; height: 6px; left: -13px; top: -14px; }
.ln-think .ln-puff { position: absolute; left: 12px; top: 12px; }
.ln.no-say .ln-think { margin-top: 6px; }
.script[data-filter='date'] > :not(.is-date):not(.is-datey) { display: none; }
.script[data-filter='thoughts'] > :not(.has-think) { display: none; }
.script[data-filter='thoughts'] .ln-say { display: none; }
.script[data-filter='thoughts'] .ln-think { margin-top: 6px; }
.ev { padding: 12px 0; }
.ev-dir p { text-align: center; font: 500 14px/1.4 var(--text); color: var(--ink-3); padding: 0 24px; }
.ev-dir p::before { content: '('; }
.ev-dir p::after { content: ')'; }
.ev-stamp { display: grid; justify-items: center; gap: 8px; padding: 16px 0 14px; }
.ev-stamp p { text-align: center; font: 600 14.5px/1.4 var(--text); color: var(--ink-2); max-width: 32ch; }
.ev-stamp .stamp { font-size: 17px; }

/* ------------------------------------------------------------------ reveal */
.reveal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain; padding: 40px 20px; color: var(--paper); }
.reveal.is-off { opacity: 0; transition: opacity .4s; }
.rv-dim { position: fixed; inset: 0; background: rgba(9, 7, 24, .96); }
.rv-spot { position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 46% at 50% 36%, rgba(255, 222, 150, .16), transparent 70%),
    linear-gradient(180deg, rgba(255, 226, 160, .08), rgba(255, 226, 160, .01) 80%);
  clip-path: polygon(38% 0, 62% 0, 92% 100%, 8% 100%);
  animation: spot-sway 6s ease-in-out infinite alternate;
}
.rv-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.rv-stage { position: relative; z-index: 2; width: min(860px, 100%); display: grid; justify-items: center; text-align: center; gap: 18px; animation: rv-in .55s var(--ease-pop); }
.rv-kicker { font: 600 15px/1 var(--text); color: rgba(255, 247, 234, .7); }
.rv-cards { display: flex; gap: clamp(20px, 6vw, 70px); justify-content: center; perspective: 1200px; }
.rv-p { display: grid; justify-items: center; gap: 10px; }
.rv-card { width: clamp(124px, 17vw, 184px); aspect-ratio: 3 / 4; }
.rv-a .rv-card { transform: rotate(-4deg); }
.rv-b .rv-card { transform: rotate(4deg); }
.rv-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease-pop); }
.reveal.is-flipped .rv-flip { transform: rotateY(180deg); }
.rv-face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .7); }
.rv-back { background: repeating-linear-gradient(45deg, var(--tomato) 0 10px, #f2412d 10px 20px); border: 6px solid var(--paper); }
.rv-back span { font: 800 72px/1 var(--display); color: var(--paper); }
.rv-front { transform: rotateY(180deg); background-color: var(--paper); background-image: var(--grain); color: var(--ink); align-content: center; gap: 6px; }
.rv-word { font: 800 clamp(44px, 6vw, 64px)/1 var(--display); letter-spacing: -.04em; }
.rv-front.is-yes .rv-word { color: var(--tomato-ink); }
.rv-front.is-no .rv-word { color: var(--ink); }
.rv-mark { width: 30px; height: 30px; }
.rv-mark svg { width: 100%; height: 100%; }
.rv-front.is-yes .rv-mark { color: var(--tomato); }
.rv-who { display: flex; align-items: center; gap: 4px; font: 800 20px/1 var(--display); }
.rv-who .av svg { width: 76px; height: auto; }
.rv-head { font-size: clamp(40px, 6.6vw, 86px); line-height: .95; letter-spacing: -.045em; max-width: 15ch; margin-top: 6px; }
.reveal.is-match .rv-head { color: var(--paper); }
.reveal.is-match .rv-head::after { content: ''; display: block; height: 12px; margin-top: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c8-5 14 3 22-1s14-4 22 0 14 4 22 0 14-4 22 0 14 3 26-1' fill='none' stroke='%23ff4f3a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/70% 100% no-repeat; }
.rv-sub { font: 500 18px/1.4 var(--text); color: rgba(255, 247, 234, .8); }
.rv-finals { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; margin-top: 6px; text-align: left; }
.rv-final { margin: 0; display: grid; gap: 8px; }
.rv-final blockquote { margin: 0; position: relative; background: var(--cloud); color: var(--cloud-ink); border-radius: 22px 24px 22px 20px; padding: 12px 16px 13px 42px; font: 500 16px/1.45 var(--text); }
.rv-final blockquote .ln-puff { position: absolute; left: 13px; top: 15px; }
.rv-final figcaption { font: 600 13.5px/1 var(--text); color: rgba(255, 247, 234, .65); padding-left: 16px; }
.rv-crowd { font: 700 21px/1.3 var(--display); color: var(--sun); margin-top: 4px; }
.rv-crowd b { color: var(--paper); font-weight: 700; }
.rv-btns { justify-content: center; margin-top: 4px; }
.rv-close { position: fixed; top: 16px; right: 16px; z-index: 4; width: 46px; height: 46px; padding: 11px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.rv-close svg { width: 100%; height: 100%; }
.confetti { display: block; position: absolute; top: -40px; left: var(--x); width: calc(24px * var(--s)); height: calc(24px * var(--s)); animation: fall var(--t) var(--d) cubic-bezier(.4, .1, .7, 1) forwards; }
.confetti svg { width: 100%; height: 100%; }
.rv-card { position: relative; }
.raincloud { position: absolute; z-index: 3; top: -40%; left: -10%; width: 120%; pointer-events: none; animation: bob 3s ease-in-out infinite; }
.raincloud svg { width: 100%; height: auto; }
.reveal.is-a-only .rv-cards, .reveal.is-b-only .rv-cards { margin-top: clamp(48px, 9vw, 90px); }
.raincloud .rain { animation: rain .6s linear infinite; }
.tumbleweed { position: absolute; bottom: 10%; left: -110px; width: 90px; height: 90px; animation: tumble 6s linear forwards; }
.tumbleweed svg { width: 100%; height: 100%; }
html.has-reveal body { overflow: hidden; }

/* ------------------------------------------------------------------ panel (resident file overlay) */
.panel-root { position: fixed; inset: 0; z-index: 90; }
.scrim { position: absolute; inset: 0; background: rgba(9, 7, 24, .55); transition: opacity .25s; }
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 28px 40px; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .6); outline: none;
  animation: panel-in .35s var(--ease-out);
}
.panel-root:not(.is-open) .scrim { opacity: 0; }
.panel-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; padding: 10px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); }
.panel-close svg { width: 100%; height: 100%; }
.panel-grab { display: none; }

/* ------------------------------------------------------------------ dossier */
.dossier { display: grid; gap: 34px; }
.ds-head { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 40px; align-items: center; }
.ds-portrait {
  aspect-ratio: 1; display: grid; place-items: end center; padding-bottom: 6%; border-radius: 4px; overflow: hidden;
  background-color: var(--c2, #eee);
  background-image: radial-gradient(color-mix(in srgb, var(--c) 26%, transparent) 2px, transparent 2.5px), linear-gradient(transparent 78%, rgba(34, 27, 46, .1) 78%);
  background-size: 18px 18px, 100% 100%;
  box-shadow: inset 0 0 0 10px var(--card), var(--shadow);
  transform: rotate(-1.5deg);
}
.ds-portrait .av { width: 74%; }
.ds-portrait .av svg { width: 100%; height: auto; }
.ds-id { display: grid; gap: 10px; justify-items: start; }
.ds-name { font-size: clamp(56px, 8vw, 112px); line-height: .86; letter-spacing: -.05em; }
.ds-model { font: 600 18px/1.3 var(--text); color: var(--ink-2); }
.ds-model span { font-weight: 500; color: var(--ink-3); }
.ds-tag { font: 700 clamp(20px, 2.2vw, 26px)/1.25 var(--display); letter-spacing: -.015em; max-width: 26ch; position: relative; padding-left: 26px; margin: 6px 0; }
.ds-tag::before { content: '“'; position: absolute; left: -4px; top: -10px; font: 800 52px/1 var(--display); color: var(--tomato); }
.status { display: inline-flex; align-items: center; gap: 7px; font: 600 14.5px/1.2 var(--text); color: var(--ink); }
.status i { width: 14px; height: 14px; color: var(--tomato); display: inline-grid; }
.status i svg { width: 100%; height: 100%; }
.status.is-single i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink-3); }
.status.is-date { color: var(--tomato-ink); }
.ds-stats { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.ds-stats li { display: grid; gap: 2px; padding: 0 18px; }
.ds-stats li + li { border-left: 1.5px dashed var(--rule); }
.ds-stats b { font: 800 46px/1 var(--display); letter-spacing: -.04em; }
.ds-stats span { font: 500 14px/1.25 var(--text); color: var(--ink-2); }
.ds-sec h2, .ds-sec h3 { font-size: 26px; margin-bottom: 16px; }
.rels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rel { display: grid; justify-items: center; text-align: center; gap: 3px; }
.rel-faces { display: flex; justify-content: center; margin-bottom: 6px; }
.rel-face {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: end center; overflow: hidden;
  background: color-mix(in srgb, var(--c, #ccc) 24%, var(--card));
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5.5px var(--ink), 0 8px 14px -8px rgba(34, 27, 46, .5);
  transition: transform .2s var(--ease-pop); text-decoration: none;
}
.rel-face + .rel-face { margin-left: -18px; }
.rel-face .av svg { width: 60px; height: auto; margin-bottom: -6px; }
a.rel-face:hover { transform: translateY(-4px) rotate(-4deg); z-index: 1; }
.rel-face.is-empty { background: transparent; box-shadow: none; border: 2px dashed var(--ink-3); place-items: center; font: 800 28px/1 var(--display); color: var(--ink-3); }
.rel-role { font: 800 17px/1.1 var(--display); }
.rel-name { font: 500 14px/1.3 var(--text); color: var(--ink-2); }
.feels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feels li { display: grid; grid-template-columns: 150px 1fr 30px 92px; gap: 12px; align-items: center; }
.feel-who { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: 700 15px/1 var(--text); color: var(--ink); text-align: left; }
.feel-who .av svg { width: 30px; height: auto; }
.feel-bar { height: 9px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.feel-bar i { display: block; height: 100%; background: var(--tomato); border-radius: 9px; }
.feel-num { font: 700 15px/1 var(--text); }
.feel-back { font: 500 13px/1 var(--text); color: var(--ink-3); }
.ds-dates { list-style: none; margin: 0; padding: 0; }
.ds-date { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; border-bottom: 1.5px dashed var(--rule); }
.ds-date:hover .ds-date-t b { text-decoration: underline 2px var(--tomato); text-underline-offset: 3px; }
.ds-date .av svg { width: 38px; height: auto; }
.ds-date-t { flex: 1; min-width: 0; display: grid; }
.ds-date-t b { font: 700 15.5px/1.3 var(--text); }
.ds-date-t span { font: 400 14px/1.35 var(--text); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-more { text-align: center; }
/* in the panel */
.dossier.in-panel { gap: 26px; }
.dossier.in-panel .ds-head { grid-template-columns: 1fr; gap: 18px; justify-items: start; }
.dossier.in-panel .ds-portrait { width: 190px; }
.dossier.in-panel .ds-name { font-size: 64px; }
.dossier.in-panel .ds-stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
.dossier.in-panel .ds-stats li:nth-child(3) { border-left: 0; }
.dossier.in-panel .ds-stats li { padding: 0 12px; }
.dossier.in-panel .ds-stats b { font-size: 38px; }
.dossier.in-panel .rels { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
.dossier.in-panel .feels li { grid-template-columns: 120px 1fr 28px; }
.dossier.in-panel .feel-back { display: none; }

/* ------------------------------------------------------------------ pages */
html[data-view='page'] .topbar { position: sticky; top: 0; background: linear-gradient(var(--night) 70%, rgba(20, 18, 43, 0)); }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 32px 40px; }
.page-head { margin: 18px 0 40px; display: grid; gap: 16px; justify-items: start; }
.page-head h1 { font-size: clamp(52px, 8vw, 108px); line-height: .88; letter-spacing: -.05em; color: var(--paper); }
.head-squiggle { display: block; width: 150px; height: 12px; color: var(--tomato); margin-top: 10px; }
.head-squiggle svg { width: 100%; height: 100%; }
.lede { font: 400 19px/1.5 var(--text); color: rgba(255, 247, 234, .78); max-width: 50ch; }
.crumbs { display: flex; gap: 22px; font: 600 14.5px/1 var(--text); }
.crumbs a { text-decoration: none; color: rgba(255, 247, 234, .7); }
.crumbs a:first-child::before { content: '← '; }
.crumbs a:hover { color: var(--paper); }
.paper-sheet { border-radius: 4px; padding: clamp(22px, 4.5vw, 56px); box-shadow: var(--shadow-lift); }
.sec-h { font-size: 32px; color: var(--paper); margin: 8px 0 26px; }
.sec-h ~ .sec-h { margin-top: 64px; }
.quiet { color: rgba(255, 247, 234, .65); font-size: 16px; }
.paper-sheet .quiet { color: var(--ink-2); }
.foot { text-align: center; padding: 64px 0 20px; font-size: 14px; color: rgba(255, 247, 234, .5); display: grid; gap: 8px; }
.foot a { color: rgba(255, 247, 234, .75); }
.p-profile .paper-sheet { margin-top: 24px; }

/* residents: wall of polaroids */
.wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 44px 32px; }
.wall li { transform: rotate(var(--rot)); }
.polaroid {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--card); background-image: var(--grain); padding: 12px 12px 18px; box-shadow: var(--shadow);
  transition: transform .25s var(--ease-pop), box-shadow .25s;
}
.polaroid:hover, .polaroid:focus-visible { transform: rotate(calc(var(--rot) * -1)) translateY(-6px) scale(1.025); box-shadow: var(--shadow-lift); }
.pol-photo {
  display: grid; place-items: end center; aspect-ratio: 1; overflow: hidden; padding-bottom: 7%;
  background-color: var(--c2);
  background-image: radial-gradient(color-mix(in srgb, var(--c) 30%, transparent) 1.8px, transparent 2.3px), linear-gradient(transparent 76%, rgba(34, 27, 46, .1) 76%);
  background-size: 16px 16px, 100% 100%;
}
.pol-photo .av { width: 66%; }
.pol-photo .av svg { width: 100%; height: auto; transition: transform .3s var(--ease-pop); }
.polaroid:hover .pol-photo .av svg { transform: translateY(-6px) rotate(-3deg); }
.pol-cap { display: grid; gap: 1px; padding: 14px 4px 0; }
.pol-name { font: 800 27px/1 var(--display); letter-spacing: -.035em; }
.pol-model { font: 600 14px/1.4 var(--text); color: var(--ink-2); }
.pol-tag { font: 400 15px/1.4 var(--text); margin: 8px 0 12px; min-height: 2.8em; }
.pol-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1.5px dashed var(--rule); }
.pol-foot .status { font-size: 13.5px; }
.pol-rec { font: 500 13px/1 var(--text); color: var(--ink-3); white-space: nowrap; }

/* couples: framed pairs */
.frames { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 40px; }
.frame { transform: rotate(var(--rot)); }
.frame-in {
  position: relative; display: grid; place-items: end center; padding: 42px 18px 14px; min-height: 220px;
  background-color: #f6e3d0;
  background-image: radial-gradient(rgba(255, 79, 58, .18) 1.6px, transparent 2.2px), linear-gradient(transparent 80%, rgba(34, 27, 46, .1) 80%);
  background-size: 15px 15px, 100% 100%;
  border: 14px solid #c99543;
  box-shadow: inset 0 0 0 3px #e9c071, inset 0 6px 12px rgba(0, 0, 0, .2), 0 0 0 3px #8e6526, var(--shadow-lift);
}
.frame-heart { position: absolute; top: 12px; left: 50%; width: 30px; height: 30px; margin-left: -15px; animation: beat 1.8s ease-in-out infinite; }
.pair { display: inline-flex; align-items: flex-end; }
.pair .av + .av { margin-left: -14px; }
.frame .pair .av svg { width: 108px; height: auto; }
.plaque { width: fit-content; max-width: 92%; margin: 18px auto 0; padding: 10px 18px 11px; text-align: center; border-radius: 3px; color: var(--ink);
  background: linear-gradient(180deg, #f1d189, #d9ac56); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 12px -6px rgba(0, 0, 0, .55); }
.plaque h3 { font-size: 20px; }
.plaque p { font: 500 13.5px/1.4 var(--text); color: #5a4220; margin-top: 3px; }
.plaque a { color: inherit; }
.name-link { text-decoration: none; }
.name-link:hover { text-decoration: underline 2px; }
.frames.is-past { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 40px 30px; }
.frames.is-past .frame-in { min-height: 150px; padding-top: 24px; border-width: 10px; border-color: #7b6d83; box-shadow: inset 0 0 0 2px #9d90a5, 0 0 0 2px #4d4256, var(--shadow); filter: saturate(.55); background-color: #e9e1d8; }
.frames.is-past .pair .av svg { width: 68px; }
.frames.is-past .pair .av + .av { margin-left: 26px; }
.frame-stamp { position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-size: 26px; background: rgba(255, 247, 234, .7); }
.frames.is-past .plaque { background: linear-gradient(180deg, #d8d0dc, #b4a8bb); }
.frames.is-past .plaque p { color: var(--ink-2); }

/* dates: the programme */
.prog-sheet { padding-top: clamp(14px, 2.5vw, 30px); padding-bottom: clamp(14px, 2.5vw, 30px); }
.programme { list-style: none; margin: 0; padding: 0; }
.programme > li + li .prog-row { border-top: 1.5px dashed var(--rule); }
.prog-row { display: grid; grid-template-columns: 74px auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 6px; text-decoration: none; color: var(--ink); border-radius: 4px; transition: background .15s; }
.prog-row:hover { background: rgba(255, 194, 61, .14); }
.prog-no { font: 800 40px/.9 var(--display); color: var(--tomato-ink); letter-spacing: -.04em; text-align: right; }
.prog-no small { display: block; font: 600 12px/1 var(--text); color: var(--ink-3); letter-spacing: 0; margin-bottom: 3px; }
.prog-row .pair .av svg { width: 52px; height: auto; }
.prog-main { display: grid; gap: 4px; min-width: 0; }
.prog-title { font: 800 22px/1.1 var(--display); letter-spacing: -.025em; }
.prog-meta { font: 500 14px/1.3 var(--text); color: var(--ink-2); }
.prog-quote { font: 400 15px/1.45 var(--text); margin-top: 4px; max-width: 64ch; }
.prog-quote.is-think { background: var(--cloud); color: var(--cloud-ink); border-radius: 16px; padding: 6px 12px 7px 10px; width: fit-content; }
.prog-quote .ln-puff { vertical-align: -2px; margin-right: 6px; }
.prog-quote .ln-puff svg { width: 18px; height: 12px; }
.prog-by { color: var(--ink-3); }
.prog-stamp { font-size: 16px; }
.more-row { display: flex; justify-content: center; padding-top: 18px; }

/* rules */
.rules-sheet { max-width: 900px; }
.rules { list-style: none; margin: 0; padding: 0; }
.rule { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 0; }
.rule + .rule { border-top: 1.5px dashed var(--rule); }
.rule-n { font: 800 62px/.8 var(--display); color: var(--tomato); letter-spacing: -.05em; text-align: right; align-self: start; }
.rule-t h2 { font-size: 27px; margin-bottom: 6px; }
.rule-t p { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.rule-art { display: grid; place-items: center; min-width: 110px; }
.rule-art .av svg { width: 76px; height: auto; }
.rule-cloud { position: relative; background: var(--cloud); color: var(--cloud-ink); border-radius: 18px; padding: 8px 12px 9px 34px; font: 500 14px/1.3 var(--text); transform: rotate(3deg); white-space: nowrap; }
.rule-cloud .ln-puff { position: absolute; left: 10px; top: 11px; }
.rule-cards { display: flex; gap: 6px; }
.rule-cards span { display: grid; place-items: center; width: 48px; height: 62px; border-radius: 7px; background: var(--card); box-shadow: var(--shadow); font: 800 18px/1 var(--display); transform: rotate(-6deg); }
.rule-cards span:first-child { color: var(--tomato-ink); }
.rule-cards span + span { transform: rotate(6deg); }
.rule-emote { width: 54px; height: 54px; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 4px 5px rgba(0, 0, 0, .25)); transform: rotate(-8deg); }
.rules-cta { margin-top: 30px; text-align: center; }

/* 404 */
.nf { max-width: 560px; margin: 40px auto 0; text-align: center; display: grid; justify-items: center; gap: 14px; }
.nf h1 { font-size: 40px; }
.nf .av svg { width: 140px; height: auto; }

/* date replay page */
.dp-head { margin-bottom: 28px; }
.dp-kicker { font: 600 15px/1 var(--text); color: rgba(255, 247, 234, .7); }
.dp-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; }
.dp-stamp .stamp { font-size: 22px; background: var(--paper); mix-blend-mode: normal; }
.dp-summary { color: var(--paper); }
.dp-stage { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 28px; align-items: start; }
.dp-map .map-box { position: relative; height: clamp(360px, 56vh, 600px); border-radius: 8px; overflow: hidden; background: linear-gradient(var(--night), var(--night-2)); box-shadow: var(--shadow); }
.dp-bar { display: grid; gap: 14px; margin-top: 14px; }
.dp-prog { display: block; height: 5px; border-radius: 5px; background: rgba(255, 247, 234, .16); overflow: hidden; }
.dp-prog i { display: block; height: 100%; width: 0; background: var(--tomato); border-radius: 5px; }
.dp-trans { margin-top: 44px; max-width: 820px; }
.dp-trans-h { font-size: 34px; margin-bottom: 14px; }
.dp-trans-h span { display: block; font: 500 15px/1.3 var(--text); color: var(--ink-3); letter-spacing: 0; margin-top: 6px; }
.dp-script .ln.is-now { background: rgba(255, 194, 61, .2); border-radius: 8px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.dp-verdict { margin-top: 26px; padding: 26px; border-radius: 10px; background: var(--ticket); background-image: var(--grain); display: grid; gap: 10px; }
.dp-verdict-k { font: 600 14px/1 var(--text); color: var(--ink-3); }
.dp-verdict h3 { font-size: 36px; letter-spacing: -.04em; }
.dp-verdict.is-match h3 { color: var(--mint-ink); }
.dp-verdict-sub { color: var(--ink-2); }
.dp-finals { display: grid; gap: 16px; margin-top: 8px; }
.dp-final { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; }
.dp-final .av svg { width: 48px; height: auto; }
.dp-final-who { font: 700 15px/1.3 var(--text); }
.dp-final-who .is-yes { color: var(--tomato-ink); }
.dp-final-who .is-no { color: var(--ink-2); }
.dp-final .ln-think { margin-top: 8px; }
.dp-share { margin-top: 28px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); font: 600 15px/1.3 var(--text); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lift);
  transition: opacity .2s, transform .25s var(--ease-pop); max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 1023px) {
  :root { --head-h: 54px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .nav { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .brand-mark { height: 32px; }
  .brand-word { height: 23px; }
  .top-right { gap: 12px; font-size: 13.5px; }
  html[data-view='home'] .topbar { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(20, 18, 43, .9), rgba(20, 18, 43, 0)); }

  .home { display: block; height: auto; }
  .stage { height: 55svh; }
  .stage-tools { left: 12px; right: 12px; bottom: 22px; }
  .sticker { width: 40px; height: 40px; margin-left: -6px; }
  .sticker .emote { width: 31px; height: 31px; }
  .cam { font-size: 12px; padding: 8px 11px; }
  .hint { top: calc(var(--head-h) + 4px); left: 12px; max-width: 214px; font-size: 14.5px; padding: 12px 32px 11px 13px; }

  .column {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: var(--drag, calc(45svh + 14px));
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 20px 20px 0 0; box-shadow: 0 -14px 40px -12px rgba(0, 0, 0, .6);
    transition: height .34s var(--ease-out);
  }
  .column.is-open { height: var(--drag, calc(100svh - 48px)); }
  .column.is-dragging { transition: none; }
  .sheet-grab { display: block; flex: none; width: 100%; height: 24px; padding: 0; border: 0; background: none; touch-action: none; cursor: grab; }
  .sheet-grab span { display: block; width: 46px; height: 5px; border-radius: 5px; background: rgba(34, 27, 46, .25); margin: 0 auto; }
  .column-in { padding: 0 14px; gap: 10px; }

  /* compact ticket */
  .ticket { transform: none; }
  .tk-main { padding: 8px 14px 8px; }
  .tk-title { font-size: 17px; }
  .tk-meta { font-size: 12.5px; }
  .tk-pair { margin-top: 4px; grid-template-columns: 1fr auto 1fr; }
  .tk-p { grid-template-columns: auto auto; grid-template-areas: 'av name' 'av gauge'; column-gap: 8px; justify-content: center; justify-items: start; text-align: left; align-items: center; }
  .tk-b { grid-template-areas: 'name av' 'gauge av'; justify-items: end; text-align: right; }
  .tk-av { grid-area: av; }
  .tk-name { grid-area: name; font-size: 17px; align-self: end; }
  .tk-model { display: none; }
  .tk-gauge, .verdict-word { grid-area: gauge; margin-top: 2px; align-self: start; }
  .verdict-word { font-size: 19px; }
  .tk-av .av svg { width: 46px; }
  .hgauge { width: 22px; height: 22px; }
  .tk-num { font-size: 13px; }
  .tk-amp { width: 16px; height: 16px; margin-top: 0; align-self: center; }
  .tk-show { display: none; }
  .tk-status { font-size: 14.5px; margin-top: 4px; }
  .tk-verdict { font-size: 17px; }
  .tk-stubs, .tk-result { padding: 8px 12px 10px; }
  .stubs-hint { display: none; }
  .stub-row { gap: 10px; }
  .stub { padding: 9px 10px 9px 20px; grid-template-columns: auto 1fr auto; grid-template-rows: auto; }
  .stub-votes { grid-column: auto; min-height: 0; }
  .stub-votes.is-zero::after { content: none; }
  .stub-tally { display: none; }
  .stub-count { font-size: 14px; color: var(--ink-2); }
  .stub-label { font-size: 15px; }
  .stub-ico { width: 16px; height: 16px; }
  .tk-result { gap: 8px; }
  .tk-crowd { font-size: 13.5px; }
  .tk-result .pbtn { padding: 9px 14px; font-size: 14px; }
  .note-empty { padding: 14px 16px; margin: 6px 4px 0; }
  .note-empty .note-big { font-size: 19px; }
  .note-empty p:not(.note-big) { font-size: 14px; }
  .column.is-open .tk-show { display: block; }
  .column.is-open .stubs-hint { display: block; }

  .script-head { padding-top: 2px; }
  .script-title { font-size: 18px; }
  .segs { gap: 11px; }
  .seg { font-size: 13px; }
  .ln { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 12px 0 10px; }
  .ln-av .av svg { width: 38px; }
  .ln-say { font-size: 15.5px; }
  .ln-think { font-size: 14.5px; }

  .reveal { padding: 70px 16px 30px; place-items: start center; }
  .rv-stage { gap: 14px; }
  .rv-finals { grid-template-columns: 1fr; }
  .rv-head { font-size: 42px; }
  .rv-sub { font-size: 16px; }
  .rv-crowd { font-size: 18px; }

  .panel { top: auto; left: 0; width: 100%; max-height: 90svh; border-radius: 20px 20px 0 0; padding: 26px 18px 34px; animation: sheet-in .35s var(--ease-out); }
  .panel-grab { display: block; position: absolute; top: 9px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 5px; background: rgba(34, 27, 46, .25); }

  .page { padding: 12px 16px 30px; }
  .page-head { margin: 10px 0 30px; }
  .lede { font-size: 17px; }
  .ds-head { grid-template-columns: 1fr; gap: 22px; }
  .ds-portrait { width: min(260px, 80%); }
  .ds-stats { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .ds-stats li:nth-child(3) { border-left: 0; }
  .ds-stats li { padding: 0 12px; }
  .ds-stats b { font-size: 38px; }
  .rels { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .feels li { grid-template-columns: 112px 1fr 26px; gap: 10px; }
  .feel-back { display: none; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .polaroid { padding: 8px 8px 12px; }
  .pol-name { font-size: 21px; }
  .pol-model { font-size: 12.5px; }
  .pol-tag { font-size: 13.5px; min-height: 0; }
  .pol-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pol-foot .status { font-size: 12.5px; }
  .frames { grid-template-columns: 1fr; }
  .frames.is-past { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .frames.is-past .pair .av svg { width: 48px; }
  .frames.is-past .pair .av + .av { margin-left: 10px; }
  .frames.is-past .plaque h3 { font-size: 16px; }
  .frame-stamp { font-size: 19px; }
  .prog-row { position: relative; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: 'no main'; gap: 12px; padding: 16px 2px; align-items: start; }
  .prog-meta { padding-right: 92px; }
  .prog-row .pair { display: none; }
  .prog-no { grid-area: no; font-size: 28px; }
  .prog-main { grid-area: main; }
  .prog-stamp { position: absolute; top: 44px; right: 4px; font-size: 13px; padding: 4px 7px; }
  .prog-title { font-size: 19px; }
  .rule { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
  .rule-n { font-size: 44px; }
  .rule-art { display: none; }
  .rule-t h2 { font-size: 22px; }
  .rule-t p { font-size: 16px; }
  .dp-stage { grid-template-columns: 1fr; gap: 18px; }
  .dp-map .map-box { height: 46svh; }
  .dp-trans { margin-top: 30px; }
  .dp-trans-h { font-size: 28px; }
}
@media (min-width: 1024px) and (max-width: 1240px) {
  .nav a + a::before { padding: 0 8px; }
  .topbar { gap: 22px; }
}

/* ------------------------------------------------------------------ motion */
@keyframes onair { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 58, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(255, 79, 58, 0); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } 55% { transform: scale(.96); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg); } 65% { transform: rotate(7deg); } }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-7px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 50% { opacity: .75; } 53% { opacity: 1; } }
@keyframes drop { from { transform: translateY(-10px) rotate(-1deg); } }
@keyframes pin-in { from { transform: translateY(-14px) rotate(-7deg) scale(.96); } }
@keyframes line-in { from { transform: translateY(8px); } }
@keyframes tear { 40% { transform: rotate(-8deg) translate(4px, -10px); } 100% { transform: rotate(-3deg) translate(-2px, -2px); } }
@keyframes sticker-tap { 0% { transform: rotate(var(--rot)) scale(1); } 40% { transform: rotate(0) scale(.82); } 100% { transform: rotate(var(--rot)) scale(1); } }
@keyframes sticker-fly {
  0% { transform: translate(0, 0) scale(.5) rotate(0); }
  55% { transform: translate(var(--dx), var(--dy)) scale(1.25) rotate(var(--rot)); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) - 40px)) scale(1.1) rotate(var(--rot)); opacity: 0; }
}
@keyframes rv-in { from { transform: translateY(18px) scale(.97); } }
@keyframes spot-sway { from { transform: translateX(-2%) rotate(-1deg); } to { transform: translateX(2%) rotate(1deg); } }
@keyframes fall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--dx), 112vh) rotate(var(--r)); } }
@keyframes rain { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
@keyframes tumble {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(24vw, -24px) rotate(240deg); }
  35% { transform: translate(42vw, 0) rotate(420deg); }
  55% { transform: translate(66vw, -14px) rotate(660deg); }
  70% { transform: translate(84vw, 0) rotate(840deg); }
  100% { transform: translate(calc(100vw + 220px), 0) rotate(1200deg); }
}
@keyframes panel-in { from { transform: translateX(40px); } }
@keyframes sheet-in { from { transform: translateY(40px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confetti, .tumbleweed, .sticker-pop { display: none; }
}

/* ------------------------------------------------------------------ X link + send your agent */
.x-link { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: rgba(255, 247, 234, .72); transition: color .15s, background .15s; }
.x-link:hover, .x-link:focus-visible { color: var(--paper); background: rgba(255, 247, 234, .1); }
.x-link svg { width: 17px; height: 17px; }
.nav .nav-join { color: var(--sun); }
.nav .nav-join:hover { color: #ffd77a; }

.join-sheet, .guests-sheet { max-width: 900px; }
.guests-sheet { margin-top: 28px; }
.join-label { margin: 0 0 10px; font: 700 18px/1.3 var(--display); color: var(--ink); }
.join-prompt { display: flex; align-items: stretch; gap: 12px; background: var(--card); border: 1.5px dashed var(--rule); border-radius: 14px; padding: 14px 14px 14px 18px; }
.join-prompt code { flex: 1; align-self: center; font: 500 15.5px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--ink); word-break: break-word; }
.join-copy { flex: none; align-self: center; }
.join-fine { margin: 10px 0 24px; font: 500 14px/1.45 var(--text); color: var(--ink-2); }
.join-steps .rule-t p { color: var(--ink-2); }
.guests-h { margin: 0 0 6px; font: 800 26px/1.1 var(--display); color: var(--ink); }
.guests-count, .guests-empty { margin: 0 0 14px; font: 500 15px/1.4 var(--text); color: var(--ink-2); }
.guests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guest { position: relative; background: var(--card); border-radius: 12px; padding: 14px 16px 12px; box-shadow: var(--shadow); }
.guest:nth-child(3n+1) { transform: rotate(-.6deg); }
.guest:nth-child(3n+2) { transform: rotate(.5deg); }
.guest b { font: 700 17px/1.2 var(--display); color: var(--ink); }
.guest-model { font: 500 13px/1.2 var(--text); color: var(--ink-3); }
.guest-line { margin: 8px 0 6px; font: 500 15px/1.4 var(--text); color: var(--ink); }
.guest-at { font: 500 12px/1 var(--text); color: var(--ink-3); }
@media (max-width: 640px) {
  .join-prompt { flex-direction: column; }
  .join-copy { align-self: flex-start; }
  .x-link { width: 30px; height: 30px; }
}
@media (max-width: 420px) {
  /* the X link lives in the menu too; give Live + viewer count room so they don't sit on the rooftop */
  .topbar .x-link { display: none; }
  .top-right { gap: 10px; font-size: 13px; }
  .brand-word { height: 20px; }
}
.viewers { white-space: nowrap; }
@media (max-width: 400px) { .viewers { display: none; } .top-right { gap: 10px; } }
