/* ===================================================================
   THE DRAGONS' DEN — "late-night game show inside a neon vault"
   One loud thing: the TV. Everything around it stays disciplined.
   =================================================================== */
:root {
  --bg: #150b26;          /* studio aubergine */
  --bg-2: #1f1238;
  --panel: #26184a;
  --panel-2: #312060;
  --ink: #000;            /* cartoon outline */
  --onair: #ff3b5c;       /* on-air red */
  --teal: #22e1d0;        /* broadcast teal */
  --gold: #ffc23a;        /* dragon gold / money */
  --text: #fbf6ff;
  --muted: #b9acd9;
  --line: 3px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --pop-lg: 8px 8px 0 var(--ink);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 26px;
  --display: "Bungee", "Rubik", system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 50% -120px, #3d1d6e 0%, transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--teal); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; word-break: break-all; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  font: 700 15px/1 var(--body);
  color: #000;
  background: var(--gold);
  border: var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-big { width: 100%; padding: 18px; font: 400 20px/1 var(--display); background: var(--onair); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--muted); box-shadow: none; }
.btn-wallet { background: var(--teal); }
.btn-wallet.connected { background: var(--panel-2); color: var(--text); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(14px, 3vw, 32px);
  background: rgba(21, 11, 38, .88);
  backdrop-filter: blur(10px);
  border-bottom: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { font-size: 30px; filter: drop-shadow(2px 2px 0 #000); }
.brand-text { font: 400 22px/1 var(--display); letter-spacing: .5px; color: var(--gold); text-shadow: 2px 2px 0 #000, 0 0 18px rgba(255,194,58,.35); }
.brand-the { font-size: 12px; display: block; color: var(--teal); text-shadow: none; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.building { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.building .dot { width: 10px; height: 10px; border-radius: 50%; background: #6bdc6b; box-shadow: 0 0 0 3px rgba(107,220,107,.2); }
.building.away .dot { background: #888; box-shadow: none; }
.dryrun-banner { background: var(--gold); color: #000; text-align: center; font-weight: 700; font-size: 14px; padding: 6px; border-bottom: var(--line); }

/* ---------- live layout ---------- */
main { padding: 24px clamp(14px, 3vw, 32px) 0; max-width: 1480px; margin: 0 auto; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

/* ---------- THE TV ---------- */
.tv {
  background: linear-gradient(160deg, #3a2a68, #1b1033 60%);
  border: 4px solid #000;
  border-radius: 34px;
  padding: 18px 18px 0;
  box-shadow: var(--pop-lg), inset 0 2px 0 rgba(255,255,255,.12);
  position: relative;
}
.tv-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 4px solid #000;
  border-radius: 22px;
  overflow: hidden;
  container-type: inline-size;
  background: #0d0620;
  isolation: isolate;
}
.tv-chin { display: flex; align-items: center; gap: 16px; padding: 12px 6px 14px; }
.tv-brand { font: 400 18px/1 var(--display); color: var(--muted); letter-spacing: 2px; }
.tv-knob { width: 42px; height: 42px; border-radius: 50%; border: var(--line); background: radial-gradient(circle at 35% 30%, #6a5aa0, #2b1d55); font-size: 18px; cursor: pointer; box-shadow: 2px 2px 0 #000; margin-left: auto; }
.sentiment { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; }
.sent-btn { font: 700 14px var(--body); border: var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; box-shadow: 2px 2px 0 #000; }
.sent-btn.up { background: var(--gold); }
.sent-btn.down { background: #8f86ad; }
.sent-btn:disabled { opacity: .4; cursor: default; }
.sent-btn.pulse { animation: pulse .4s; }
.meter { width: min(260px, 30vw); height: 14px; border: var(--line); border-radius: 999px; background: #57507a; overflow: hidden; }
.meter i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--onair), var(--gold)); transition: width .5s; }

/* studio set */
.studio { position: absolute; inset: 0; }
.studio::before { /* back wall */
  content: ""; position: absolute; inset: 0 0 34% 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 8cqw),
    radial-gradient(70cqw 30cqw at 50% 0, #4a2190 0%, transparent 70%),
    linear-gradient(#24104a, #160a30);
}
.studio-sign {
  position: absolute; top: 2.4cqw; left: 50%; transform: translateX(-50%);
  font: 400 3.4cqw/1 "Bungee Shade", var(--display); color: var(--onair);
  text-shadow: 0 0 1.4cqw rgba(255,59,92,.9); letter-spacing: .4cqw;
  animation: flicker 6s infinite;
}
.floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background:
    linear-gradient(transparent 0 0),
    repeating-linear-gradient(90deg, rgba(34,225,208,.25) 0 1px, transparent 1px 6cqw),
    repeating-linear-gradient(0deg, rgba(34,225,208,.18) 0 1px, transparent 1px 2.4cqw),
    linear-gradient(#170a33, #0a0418);
  transform-origin: top; border-top: 3px solid #000;
}
.spot {
  position: absolute; right: 7cqw; bottom: 0; width: 26cqw; height: 100%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(255,230,160,.22), transparent 70%);
  opacity: 0; transition: opacity .8s;
}

/* coves */
.coves { position: absolute; top: 8.5cqw; left: 3cqw; right: 3cqw; display: flex; justify-content: space-between; }
.cove-wrap { width: 17cqw; position: relative; display: flex; flex-direction: column; align-items: center; }
.cove {
  width: 100%; height: 15cqw; position: relative; overflow: hidden;
  border: .45cqw solid #000; border-bottom: none;
  border-radius: 8.5cqw 8.5cqw 0 0;
  background: radial-gradient(ellipse at 50% 120%, #2c1a4f 0%, #07030f 70%);
  box-shadow: inset 0 0 0 .7cqw #4b3a73, inset 0 0 0 1.1cqw #000;
}
.cove-lip { width: 110%; height: 1.3cqw; background: #4b3a73; border: .35cqw solid #000; border-radius: .6cqw; position: relative; z-index: 2; margin-top: -.3cqw; }
.nameplate { margin-top: .5cqw; font: 400 1.25cqw/1 var(--display); color: var(--d, var(--gold)); text-shadow: .12cqw .12cqw 0 #000; white-space: nowrap; }
.dragon {
  position: absolute; left: 6%; bottom: -6%; width: 88%;
  transform: translateY(105%);
  transition: transform .9s cubic-bezier(.3,1.5,.5,1), filter .6s;
  transition-delay: var(--delay, 0s);
}
.dragon svg { display: block; width: 100%; overflow: visible; }
.mood {
  position: absolute; top: -3.2cqw; left: 50%; transform: translate(-50%, 6px) scale(.8);
  background: #fff; color: #000; border: .3cqw solid #000; border-radius: 99px;
  font: 700 1.15cqw/1 var(--body); padding: .45cqw .9cqw; white-space: nowrap;
  opacity: 0; transition: opacity .3s, transform .3s; z-index: 3;
}
.mood::after { content: ""; position: absolute; left: 50%; bottom: -.9cqw; border: .5cqw solid transparent; border-top-color: #000; transform: translateX(-50%); }
.vote-card {
  position: absolute; top: 10.4cqw; left: 50%; z-index: 4;
  font: 400 2.1cqw/1 var(--display); padding: .7cqw 1.2cqw; border: .35cqw solid #000; border-radius: 1cqw;
  transform: translateX(-50%) scale(0) rotate(-12deg); transition: transform .35s cubic-bezier(.3,1.8,.5,1);
  white-space: nowrap; box-shadow: .35cqw .35cqw 0 #000;
}
.vote-card.in { background: var(--gold); color: #000; }
.vote-card.out { background: #5d5577; color: #ddd; }
.vote-card.show { transform: translateX(-50%) scale(1) rotate(-6deg); }

/* dragon face parts (SVG) */
.dragon .lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); transition: transform .3s; }
.dragon .brow { transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.dragon .pupil { transition: transform .4s; }
.dragon .smoke { opacity: 0; }
.dragon.blink .lid { animation: blink 5s infinite; animation-delay: var(--blink, 0s); }

.cove-wrap[data-mood="asleep"] .lid { transform: scaleY(1); animation: none; }
.cove-wrap[data-mood="bored"] .lid { transform: scaleY(.55); animation: none; }
.cove-wrap[data-mood="bored"] .pupil { transform: translateY(2px); }
.cove-wrap[data-mood="sceptical"] .brow-l { transform: translateY(3px) rotate(14deg); }
.cove-wrap[data-mood="sceptical"] .brow-r { transform: translateY(-5px) rotate(-8deg); }
.cove-wrap[data-mood="sceptical"] .pupil { transform: translateX(-2px); }
.cove-wrap[data-mood="furious"] .brow-l { transform: translateY(5px) rotate(24deg); }
.cove-wrap[data-mood="furious"] .brow-r { transform: translateY(5px) rotate(-24deg); }
.cove-wrap[data-mood="furious"] .smoke { opacity: 1; animation: smoke 1.4s infinite; }
.cove-wrap[data-mood="impressed"] .brow { transform: translateY(-6px); }
.cove-wrap[data-mood="impressed"] .pupil { transform: scale(1.25); transform-box: fill-box; transform-origin: center; }
.cove-wrap[data-mood="hungry"] .tongue { opacity: 1; }
.cove-wrap[data-mood="hungry"] .brow { transform: translateY(-3px); }
.cove-wrap[data-mood="curious"] .pupil { transform: translateY(-2px) translateX(2px); }
.dragon .tongue { opacity: 0; transition: opacity .3s; }

/* podium + pitcher */
.podium { position: absolute; right: 9cqw; bottom: 3.5cqw; width: 13cqw; z-index: 2; }
.podium-screen { height: 6cqw; margin: 0 1.5cqw; background: #000; border: .4cqw solid #000; border-radius: .8cqw .8cqw 0 0; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 .3cqw #3a2a68; }
.podium-screen img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.podium-body { height: 8cqw; background: linear-gradient(#ff3b5c, #b3163a); border: .4cqw solid #000; border-radius: .6cqw; display: grid; place-items: center; font: 400 1.6cqw/1 var(--display); color: #fff; text-shadow: .15cqw .15cqw 0 #000; }
.pitcher { position: absolute; right: -14cqw; bottom: 3cqw; width: 9cqw; z-index: 1; transition: right 2.6s linear; }
.pitcher svg { width: 100%; display: block; }
.pitcher.walking svg { animation: bob .35s infinite alternate; }

/* screen graphics */
.bug-live { position: absolute; top: 1.6cqw; left: 1.8cqw; z-index: 20; display: flex; align-items: center; gap: .7cqw; background: rgba(0,0,0,.65); border: .25cqw solid #000; color: #fff; font: 400 1.4cqw/1 var(--display); padding: .6cqw 1cqw; border-radius: .8cqw; }
.bug-live .rec { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #666; }
.tv.on-air .bug-live .rec { background: var(--onair); animation: rec 1s infinite; }
.tv.on-air .bug-live { background: var(--onair); }
.tv.on-air .bug-live .rec { background: #fff; }
.bug-clock { position: absolute; top: 1.6cqw; right: 1.8cqw; z-index: 20; font: 700 1.5cqw/1 var(--body); color: #fff; background: rgba(0,0,0,.65); padding: .6cqw 1cqw; border-radius: .8cqw; font-variant-numeric: tabular-nums; }
.scanlines { position: absolute; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.55)); }

.ov { position: absolute; inset: 0; z-index: 10; display: none; }

/* idle */
.ov-idle { place-items: end center; padding-bottom: 3cqw; }
.ov-idle > * { position: relative; }
.ov-idle { flex-direction: column; justify-content: flex-end; align-items: center; }
.ov-kicker { margin: 0; font: 600 1.6cqw/1 var(--body); color: var(--muted); }
.ov-count { margin: .5cqw 0 1.4cqw; font: 400 7cqw/1 var(--display); color: var(--gold); text-shadow: .35cqw .35cqw 0 #000, 0 0 3cqw rgba(255,194,58,.4); font-variant-numeric: tabular-nums; }
.upnext { display: flex; align-items: center; gap: 1.2cqw; background: rgba(0,0,0,.6); border: .3cqw solid #000; padding: .9cqw 1.4cqw; border-radius: 1.2cqw; font-size: 1.5cqw; }
.upnext img { width: 4cqw; height: 4cqw; border-radius: .8cqw; border: .25cqw solid #000; object-fit: cover; }
.upnext strong { font-family: var(--display); font-weight: 400; color: var(--teal); }
.crown { color: var(--gold); }

/* break: test card */
.ov-break { background: #000; }
.bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.bars i:nth-child(1) { background: #c0c0c0; } .bars i:nth-child(2) { background: #c0c000; } .bars i:nth-child(3) { background: #00c0c0; }
.bars i:nth-child(4) { background: #00c000; } .bars i:nth-child(5) { background: #c000c0; } .bars i:nth-child(6) { background: #c00000; } .bars i:nth-child(7) { background: #0000c0; }
.break-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-2deg); background: #000; border: .5cqw solid #fff; border-radius: 1.6cqw; padding: 2.4cqw 3.6cqw; text-align: center; box-shadow: .8cqw .8cqw 0 rgba(0,0,0,.6); }
.break-title { margin: 0; font: 400 4.4cqw/1 var(--display); color: #fff; }
.break-sub { margin: 1.2cqw 0 0; font-size: 1.6cqw; color: #ddd; max-width: 40cqw; }

/* intro */
.ov-intro { place-items: center; background: radial-gradient(circle, rgba(0,0,0,.2), rgba(0,0,0,.55)); }
.title-card { margin: 0; text-align: center; animation: slam .9s cubic-bezier(.2,1.6,.4,1) both; }
.title-card span { display: block; font: 600 1.8cqw/1 var(--body); color: var(--teal); margin-bottom: .8cqw; }
.title-card strong { font: 400 9cqw/1 var(--display); color: var(--gold); text-shadow: .5cqw .5cqw 0 #000, 0 0 4cqw rgba(255,194,58,.5); }

/* lower third */
.lower-third {
  position: absolute; left: 2cqw; bottom: 2cqw; width: 62cqw; z-index: 12;
  background: rgba(10, 4, 24, .92); border: .35cqw solid #000; border-radius: 1.4cqw;
  box-shadow: .5cqw .5cqw 0 #000; overflow: hidden;
  transform: translateY(140%); transition: transform .6s cubic-bezier(.3,1.3,.5,1);
}
.lt-tag { position: absolute; top: 0; right: 0; background: var(--onair); color: #fff; font: 400 1.2cqw/1 var(--display); padding: .6cqw 1.1cqw; border-bottom-left-radius: 1cqw; }
.lt-main { display: flex; gap: 1.2cqw; align-items: center; padding: 1.2cqw 1.4cqw .6cqw; }
.lt-main img { width: 4.6cqw; height: 4.6cqw; border-radius: .9cqw; border: .3cqw solid #000; object-fit: cover; background: #222; }
.lt-name { font: 400 2.3cqw/1.05 var(--display); color: var(--gold); }
.lt-meta { font-size: 1.25cqw; color: var(--muted); margin-top: .3cqw; }
.prompter { height: 9cqw; overflow: hidden; margin: 0 1.4cqw; position: relative; mask-image: linear-gradient(transparent, #000 18%, #000 75%, transparent); }
.prompter-inner { font-size: 1.55cqw; line-height: 1.45; color: #fff; will-change: transform; padding: 1.6cqw 0; }
.prompter-inner p { margin: 0 0 1cqw; }
.prompter-inner .pl { color: var(--teal); font-weight: 700; }
.phase-bar { height: .5cqw; background: #2a1e48; margin-top: .6cqw; }
.phase-bar i { display: block; height: 100%; width: 0; background: var(--onair); }

/* deliberation */
.ov-deliberation { place-items: start center; padding-top: 30cqw; pointer-events: none; }
.delib { margin: 0; font: 400 2.4cqw/1 var(--display); color: #fff; background: rgba(0,0,0,.7); border: .3cqw solid #000; padding: 1cqw 2cqw; border-radius: 99px; text-shadow: .2cqw .2cqw 0 #000; }
.dots i { font-style: normal; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }

/* launching */
.ov-launching { place-items: center; background: rgba(5,2,14,.75); }
.launching { text-align: center; }
.launching p { margin: 0 0 1.4cqw; font: 400 3.4cqw/1 var(--display); color: var(--teal); }
.mint-bar { width: 40cqw; height: 2cqw; border: .35cqw solid #000; border-radius: 99px; background: #241544; overflow: hidden; }
.mint-bar i { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(45deg, var(--gold) 0 1cqw, #ffdf8a 1cqw 2cqw); animation: mint 1.3s linear infinite; }

/* rejected / error */
.ov-rejected, .ov-error { place-items: center; background: rgba(5,2,14,.55); }
.stamp { font: 400 10cqw/1 var(--display); color: var(--onair); border: 1cqw solid var(--onair); padding: 1cqw 3cqw; border-radius: 2cqw; transform: rotate(-10deg); animation: stamp .5s cubic-bezier(.2,1.8,.4,1) both; text-shadow: none; background: rgba(0,0,0,.35); }
.err-card { font: 600 2.2cqw/1.3 var(--body); background: #000; border: .4cqw solid var(--gold); padding: 2cqw 3cqw; border-radius: 1.6cqw; max-width: 60cqw; text-align: center; }

/* launched */
.ov-launched { place-items: center; background: radial-gradient(circle at 50% 40%, #3b1d73, #0b0418 75%); }
.launch-card { position: relative; z-index: 2; background: var(--panel); border: .5cqw solid #000; border-radius: 2.4cqw; padding: 2.6cqw 3.2cqw; width: 64cqw; box-shadow: 1cqw 1cqw 0 #000; animation: slam .8s cubic-bezier(.2,1.6,.4,1) both; }
.lc-kicker { margin: 0 0 1.4cqw; font: 600 1.6cqw/1 var(--body); color: var(--teal); }
.lc-head { display: flex; align-items: center; gap: 2cqw; }
.lc-head img { width: 10cqw; height: 10cqw; border-radius: 1.6cqw; border: .45cqw solid #000; object-fit: cover; }
.lc-head h2 { margin: 0; font: 400 4.6cqw/1 var(--display); color: var(--gold); text-shadow: .3cqw .3cqw 0 #000; }
.lc-ticker { margin: .6cqw 0 0; font: 700 2.2cqw/1 var(--body); }
.lc-deal { font-size: 1.6cqw; color: var(--muted); margin: 1.6cqw 0; }
.ca { display: flex; align-items: center; gap: 1cqw; background: #000; border-radius: 1cqw; padding: .9cqw 1.2cqw; margin-bottom: 1.6cqw; }
.ca code { flex: 1; font-size: 1.45cqw; color: var(--teal); }
.ca .btn { font-size: 1.3cqw; padding: .7cqw 1.2cqw; }
.btn-buy { width: 100%; font: 400 2.2cqw/1 var(--display); padding: 1.4cqw; background: var(--gold); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -3cqw; width: 1cqw; height: 1.6cqw; border: .15cqw solid #000; animation: fall linear infinite; }

/* ---------- phase switching ---------- */
.tv[data-phase="idle"] .ov-idle { display: flex; }
.tv[data-phase="break"] .ov-break { display: block; }
.tv[data-phase="intro"] .ov-intro { display: grid; }
.tv[data-phase="deliberation"] .ov-deliberation { display: grid; }
.tv[data-phase="launching"] .ov-launching { display: grid; }
.tv[data-phase="rejected"] .ov-rejected { display: grid; }
.tv[data-phase="error"] .ov-error { display: grid; }
.tv[data-phase="launched"] .ov-launched { display: grid; }
.tv[data-phase="pitch"] .lower-third,
.tv[data-phase="deliberation"] .lower-third,
.tv[data-phase="verdict"] .lower-third { transform: none; }
.tv[data-phase="pitch"] .spot, .tv[data-phase="deliberation"] .spot, .tv[data-phase="verdict"] .spot { opacity: 1; }
.tv[data-phase="pitch"] .podium-screen img, .tv[data-phase="deliberation"] .podium-screen img, .tv[data-phase="verdict"] .podium-screen img { opacity: 1; }

/* dragon positions per phase */
.tv[data-phase="idle"] .dragon { transform: translateY(46%); filter: brightness(.28) saturate(.4); }
.tv[data-phase="idle"] .dragon .eye-white { fill: #ffe066; }
.tv[data-phase="intro"] .dragon,
.tv[data-phase="pitch"] .dragon,
.tv[data-phase="deliberation"] .dragon,
.tv[data-phase="verdict"] .dragon,
.tv[data-phase="launching"] .dragon,
.tv[data-phase="rejected"] .dragon,
.tv[data-phase="error"] .dragon { transform: translateY(0); }
.tv[data-phase="pitch"] .mood, .tv[data-phase="deliberation"] .mood, .tv[data-phase="verdict"] .mood { opacity: 1; transform: translate(-50%, 0) scale(1); }
.tv[data-phase="deliberation"] .dragon svg { animation: ponder 2.2s ease-in-out infinite alternate; animation-delay: var(--delay); }
.tv[data-phase="rejected"] .cove-wrap[data-vote="out"] .dragon { transform: translateY(70%); transition-delay: 1.2s; }

/* ---------- queue ---------- */
.queue-strip { margin-top: 18px; background: var(--panel); border: var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--pop); }
.queue-strip h3 { margin: 0 0 10px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.count { background: var(--gold); color: #000; border: 2px solid #000; border-radius: 99px; padding: 0 9px; font-size: 13px; }
.queue-list { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.queue-list li { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 2px solid #000; border-radius: 12px; padding: 6px 12px 6px 6px; font-size: 14px; }
.queue-list li.bribed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,194,58,.25); }
.queue-list img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; border: 2px solid #000; }
.queue-list .pos { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-list .empty { color: var(--muted); background: none; border: none; padding: 4px 0; }

/* ---------- chat ---------- */
.chat { position: sticky; top: 86px; background: var(--panel); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--pop-lg); display: flex; flex-direction: column; height: calc(100vh - 110px); min-height: 420px; max-height: 780px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: var(--line); }
.chat-head h3 { margin: 0; font: 400 16px/1 var(--display); color: var(--teal); }
.viewers { font-size: 13px; color: var(--muted); }
.chat-list { list-style: none; margin: 0; padding: 12px 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.chat-list li { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-list .who { font-weight: 700; margin-right: 6px; }
.chat-list .sys { background: rgba(255,194,58,.1); border-left: 3px solid var(--gold); padding: 6px 8px; border-radius: 0 8px 8px 0; color: #ffe6a8; font-weight: 500; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: var(--line); }
.chat-form input { min-width: 0; }
.chat-name { width: 76px; flex: 0 0 76px; }
.chat-form input:not(.chat-name) { flex: 1; }

/* ---------- inputs ---------- */
input, textarea, select {
  font: 500 15px/1.4 var(--body); color: var(--text);
  background: var(--bg); border: 2px solid #000; border-radius: var(--r-sm);
  padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(34,225,208,.25); }
textarea { resize: vertical; }
input.upper { text-transform: uppercase; }

/* ---------- sections ---------- */
.section { padding: 72px 0 0; }
.section-head { max-width: 680px; margin-bottom: 28px; }
.h-display { margin: 0 0 10px; font: 400 clamp(30px, 4.4vw, 52px)/1.02 var(--display); color: var(--gold); text-shadow: 3px 3px 0 #000; }
.lede { margin: 0; font-size: 18px; color: var(--muted); max-width: 62ch; }
.panel { background: var(--panel); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--pop); }

/* pitch form */
.pitch-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.form { padding: 24px; }
fieldset { border: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; }
legend { font: 400 18px/1 var(--display); color: var(--teal); margin-bottom: 14px; padding: 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.logo-drop { grid-template-columns: 76px 1fr !important; align-items: center; gap: 14px !important; padding: 12px; border: 2px dashed var(--muted); border-radius: var(--r); cursor: pointer; font-weight: 500 !important; color: var(--muted); }
.logo-drop.drag { border-color: var(--teal); background: rgba(34,225,208,.08); }
.logo-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.logo-drop:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.logo-prev { width: 76px; height: 76px; border-radius: 14px; border: 3px solid #000; display: grid; place-items: center; background: var(--bg) center / cover; font-size: 13px; color: var(--muted); }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; border: 2px solid #000; border-radius: 999px; background: var(--bg); cursor: pointer; font-weight: 700; }
.seg input:checked + span { background: var(--teal); color: #000; box-shadow: 2px 2px 0 #000; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.stake { background: var(--bg); border: 2px solid #000; border-radius: var(--r); padding: 14px 16px; }
.stake-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; gap: 12px; }
.stake output { font: 400 30px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 14px; border-radius: 99px; padding: 0; margin: 14px 0 10px; background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 55%, var(--onair) 100%); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid #000; box-shadow: 2px 2px 0 #000; cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #000; cursor: grab; }
.stake-note { margin: 0; font-size: 14px; color: var(--muted); min-height: 3em; }
.stake-note strong { color: var(--text); }

.bribe-box { background: linear-gradient(135deg, rgba(255,194,58,.18), rgba(255,59,92,.12)); border: 2px solid var(--gold); border-radius: var(--r); padding: 16px; }
.bribe-box legend { float: left; width: 100%; color: var(--gold); }
.check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; accent-color: var(--gold); padding: 0; }
.form-error { color: #ff8b9c; font-weight: 600; min-height: 1.5em; margin: 0 0 10px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }

.pitch-side { display: grid; gap: 20px; position: sticky; top: 90px; }
.side-title { margin: 0 0 12px; font-weight: 700; color: var(--muted); }
.preview, .mine { padding: 20px; }
.pf-card { display: flex; gap: 12px; background: #111; border-radius: 12px; padding: 12px; border: 1px solid #333; }
.pf-card img, .pf-ph { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 8px; object-fit: cover; }
.pf-ph { background: #222; display: grid; place-items: center; font: 400 28px var(--display); color: #555; }
.pf-name { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.pf-tick { color: #86efac; }
.pf-desc { margin: 0; color: #aaa; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.my-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.my-list .empty { color: var(--muted); font-size: 14px; }
.my-item { background: var(--bg); border: 2px solid #000; border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.my-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 2px solid #000; }
.my-item .t { font-weight: 700; }
.my-item .s { font-size: 13px; color: var(--muted); }
.my-item .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 2px solid #000; background: var(--panel-2); }
.status.queued { background: var(--teal); color: #000; }
.status.live { background: var(--onair); }
.status.launched { background: var(--gold); color: #000; }

/* funded */
.funded-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.fund { background: var(--panel); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--pop); padding: 18px; display: grid; gap: 14px; }
.fund-head { display: flex; gap: 12px; align-items: center; }
.fund-head img { width: 56px; height: 56px; border-radius: 12px; border: 3px solid #000; object-fit: cover; }
.fund-head h3 { margin: 0; font-size: 18px; }
.fund-head p { margin: 0; color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.stats div { background: var(--bg); border-radius: 10px; padding: 8px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.up-c { color: #6bdc6b; } .down-c { color: #ff8b9c; }
.investors { display: flex; gap: 4px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.investors .chip { border: 2px solid #000; border-radius: 99px; padding: 1px 8px; color: #000; font-weight: 700; }
.fund-actions { display: flex; gap: 8px; }
.fund-actions .btn { flex: 1; }
.funded-empty { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted); border: 2px dashed var(--panel-2); border-radius: var(--r-lg); }

/* how */
.how-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 74px; background: var(--panel); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; background: var(--gold); color: #000; border: var(--line); border-radius: 50%; font: 400 20px var(--display); }
.steps h3 { margin: 0 0 4px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); }
.loop { margin: 0; padding: 20px; text-align: center; }
.loop svg { width: 100%; max-width: 420px; }
.loop .node circle { fill: var(--panel-2); stroke: #000; stroke-width: 4; }
.loop .node text { fill: var(--text); font: 700 14px var(--body); text-anchor: middle; }
.loop .center { font-size: 46px; text-anchor: middle; }
.loop .center-sub { fill: var(--muted); font: 600 13px var(--body); text-anchor: middle; }
.loop .flow { stroke-dasharray: 10 8; animation: flow 1.6s linear infinite; }
.loop figcaption { color: var(--muted); font-size: 15px; max-width: 46ch; margin: 8px auto 0; }
.faq { margin-top: 36px; display: grid; gap: 12px; max-width: 820px; }
.faq details { padding: 16px 20px; box-shadow: 3px 3px 0 #000; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 17px; }
.faq p { color: var(--muted); margin: 10px 0 0; max-width: 70ch; }

.foot { margin-top: 80px; padding: 30px; text-align: center; color: var(--muted); font-size: 14px; border-top: var(--line); }
.foot p { margin: 4px 0; }

/* modal + toasts */
.modal { border: var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--text); padding: 0; box-shadow: var(--pop-lg); width: min(420px, 92vw); }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.modal-inner { padding: 24px; display: grid; gap: 16px; }
.modal h3 { margin: 0; font: 400 22px var(--display); color: var(--gold); }
.wallet-list { display: grid; gap: 10px; }
.wallet-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bg); border: 2px solid #000; border-radius: 14px; color: var(--text); font: 700 16px var(--body); cursor: pointer; text-decoration: none; }
.wallet-opt:hover { border-color: var(--teal); }
.wallet-opt small { font-weight: 500; color: var(--muted); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(440px, 92vw); }
.toast { background: var(--panel-2); border: var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--pop); font-weight: 600; animation: toastIn .3s; }
.toast.err { background: #5a1325; }
.toast.ok { background: #14453f; }

/* ---------- animation ---------- */
@keyframes rec { 50% { opacity: .2; } }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .4; } 95% { opacity: 1; } 96% { opacity: .6; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(0); } 97% { transform: scaleY(1); } }
@keyframes smoke { 0% { transform: translateY(0) scale(.6); opacity: .9; } 100% { transform: translateY(-14px) scale(1.4); opacity: 0; } }
@keyframes bob { to { transform: translateY(-4%); } }
@keyframes ponder { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(2%); } }
@keyframes slam { 0% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes stamp { 0% { transform: rotate(-10deg) scale(3); opacity: 0; } 100% { transform: rotate(-10deg) scale(1); opacity: 1; } }
@keyframes dot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
@keyframes mint { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes fall { to { transform: translateY(70cqw) rotate(720deg); } }
@keyframes flow { to { stroke-dashoffset: -36; } }
@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .live-grid { grid-template-columns: 1fr; }
  .chat { position: static; height: 460px; }
  .pitch-grid, .how-grid { grid-template-columns: 1fr; }
  .pitch-side { position: static; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .building #buildingText { display: none; }
  .tv { padding: 10px 10px 0; border-radius: 22px; }
  .tv-screen { border-radius: 14px; }
  .tv-brand { display: none; }
  .sent-btn { padding: 6px 10px; font-size: 13px; }
  .row-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* idle: dragons lurk in the dark with half-open glowing eyes */
.tv[data-phase="idle"] .dragon .lid { transform: scaleY(.45) !important; animation: none !important; }
/* visually-hidden native inputs stay inside their label */
.seg label, .logo-drop { position: relative; }
.seg input, .logo-drop input { width: 1px; height: 1px; left: 0; top: 0; padding: 0; }
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 10px 12px; }
  .brand-text { font-size: 16px; }
  .brand-mark { font-size: 24px; }
  .btn-wallet { padding: 9px 12px; font-size: 13px; }
  .sent-btn { white-space: nowrap; }
  .sentiment { gap: 6px; }
  .meter { width: auto; flex: 1; }
}
