:root {
  --velvet: #3A0C2C;
  --velvet-deep: #1E0517;
  --amber: #FFB21A;
  --tangerine: #FF5A1F;
  --avocado: #6F8A3A;
  --cream: #FFF2D2;
  --cop-blue: #2F6BFF;
  --cop-red: #FF2E3F;
  --glass: rgba(30, 5, 23, 0.72);
  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --brand: "Shrikhand", "Cooper Black", Georgia, serif; /* the logo stays in English on every channel */
  --gap: clamp(0.6rem, 1.6vw, 1.2rem);
  color-scheme: dark;
}
/* Shrikhand and Archivo have no Cyrillic or Chinese, so each channel brings its own pair */
html[lang="ru"] { --display: "Lobster", "Cooper Black", Georgia, serif; --ui: "Rubik", "Helvetica Neue", Arial, sans-serif; }
html[lang="zh-CN"] {
  --display: "ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--velvet-deep); }
body { color: var(--cream); font-family: var(--ui); font-size: 15px; line-height: 1.4; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* One screen: the set fills it, broadcast graphics sit on top */
.show { position: relative; height: 100dvh; overflow: hidden; }
.stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 50% 46%, transparent 55%, rgba(20, 3, 15, 0.55)),
    linear-gradient(rgba(20, 3, 15, 0.55), transparent 18%, transparent 70%, rgba(20, 3, 15, 0.85));
}

/* ---------- camera ---------- */
/* the resting shot sits a little high so the captions clear Maggie's lap; it only moves on big moments,
   because moving the whole set every frame is what made the page heavy */
#camera { transform-box: view-box; transform-origin: 800px 430px; transform: translate(0, -46px); transition: transform 1.1s cubic-bezier(.3, .8, .3, 1); }
#camera[data-shot="face"] { transform: translate(0, 40px) scale(1.55); }
#camera[data-shot="wide"] { transform: translate(0, -40px) scale(0.92); }
#camera[data-shot="ring"] { transform: translate(-120px, -46px); }

/* ---------- Maggie's rig ---------- */
/* Idle motion (breathing, nod, tail, purr) is driven from stage.js at ~10 fps, like a hand-drawn cartoon.
   Running CSS animations on SVG costs a style pass every frame; mood animations here are short and finite. */
.stage #g-mouth > g { display: none; }
.stage[data-mouth="smile"] #g-mouth [data-shape="smile"],
.stage[data-mouth="a"] #g-mouth [data-shape="a"],
.stage[data-mouth="e"] #g-mouth [data-shape="e"],
.stage[data-mouth="o"] #g-mouth [data-shape="o"],
.stage[data-mouth="frown"] #g-mouth [data-shape="frown"],
.stage[data-mouth="purse"] #g-mouth [data-shape="purse"],
.stage[data-mouth="shout"] #g-mouth [data-shape="shout"],
.stage[data-mouth="laugh"] #g-mouth [data-shape="laugh"] { display: inline; }

.stage #g-head { transform-box: fill-box; transform-origin: 50% 85%; transition: transform 0.4s ease; }
.stage #g-eye-l, .stage #g-eye-r, .stage #g-brow-l, .stage #g-brow-r, .stage #g-cheek-l, .stage #g-cheek-r,
.stage #g-eyes-happy, .stage #g-arm-lap, .stage #g-arm-chest, .stage #g-cat-ear-l, .stage #g-cat-ear-r,
.stage #g-cat-eyes-open, .stage #g-cat-eyes-closed, .stage #g-cat-body {
  transform-box: fill-box; transform-origin: center; transition: transform 0.3s ease, opacity 0.3s ease;
}
.stage.is-blinking:not([data-mood="amused"]) #g-eye-l,
.stage.is-blinking:not([data-mood="amused"]) #g-eye-r { transform: scaleY(0.1); transition-duration: 0.06s; }

.stage[data-mood="suspicious"] #g-brow-l { transform: translateY(6px) rotate(12deg); }
.stage[data-mood="suspicious"] #g-brow-r { transform: translateY(-9px) rotate(-8deg); }
.stage[data-mood="suspicious"] #g-eye-l, .stage[data-mood="suspicious"] #g-eye-r { transform: scaleY(0.55); }
.stage[data-mood="suspicious"] #g-cat-eyes-open { opacity: 1; }
.stage[data-mood="suspicious"] #g-cat-eyes-closed { opacity: 0; }

.stage[data-mood="angry"] #g-brow-l { transform: translate(4px, 8px) rotate(24deg); }
.stage[data-mood="angry"] #g-brow-r { transform: translate(-4px, 8px) rotate(-24deg); }
.stage[data-mood="angry"] #g-eye-l, .stage[data-mood="angry"] #g-eye-r { transform: scaleY(0.6); }
.stage[data-mood="angry"] #g-cheek-l, .stage[data-mood="angry"] #g-cheek-r { transform: scale(1.5); }
.stage[data-mood="angry"] #g-head { animation: fume 0.32s ease-in-out 6; }
.stage[data-mood="angry"] #g-cat-ear-l { transform: rotate(-60deg); }
.stage[data-mood="angry"] #g-cat-ear-r { transform: rotate(60deg); }
.stage[data-mood="angry"] #g-cat-eyes-open { opacity: 1; }
.stage[data-mood="angry"] #g-cat-eyes-closed { opacity: 0; }
@keyframes fume { 25% { transform: rotate(-2.4deg); } 75% { transform: rotate(2.4deg); } }

.stage[data-mood="amused"] #g-eye-l, .stage[data-mood="amused"] #g-eye-r { opacity: 0; }
.stage[data-mood="amused"] #g-eyes-happy { opacity: 1; }
.stage[data-mood="amused"] #g-cheek-l, .stage[data-mood="amused"] #g-cheek-r { transform: scale(1.3); }
.stage[data-mood="amused"] #g-head { animation: giggle 0.45s ease-in-out 5; }
.stage[data-mood="amused"] #g-cat-eyes-open { opacity: 1; }
.stage[data-mood="amused"] #g-cat-eyes-closed { opacity: 0; }
@keyframes giggle { 50% { transform: translateY(-4px) rotate(-2deg); } }

.stage[data-mood="scared"] #g-brow-l, .stage[data-mood="scared"] #g-brow-r { transform: translateY(-12px); }
.stage[data-mood="scared"] #g-eye-l, .stage[data-mood="scared"] #g-eye-r { transform: scale(1.25); }
.stage[data-mood="scared"] #g-arm-lap { opacity: 0; }
.stage[data-mood="scared"] #g-arm-chest { opacity: 1; }
.stage[data-mood="scared"] #g-head { animation: tremble 0.12s linear 14; }
.stage[data-mood="scared"] #g-cat-body { transform: scale(1.08); }
.stage[data-mood="scared"] #g-cat-eyes-open { opacity: 1; }
.stage[data-mood="scared"] #g-cat-eyes-closed { opacity: 0; }
@keyframes tremble { 50% { transform: translateX(1.5px); } }

.stage[data-mood="confused"] #g-brow-l { transform: translateY(-9px) rotate(-8deg); }
.stage[data-mood="confused"] #g-head { transform: rotate(5deg); animation: none; }

/* Her phone is ringing: handset on the table, hands in her lap, eyes on the phone. Each ring rattles the
   handset and pops a RING!; these loops only run for the few seconds before she picks up. */
.stage #g-ring, .stage #g-arm-rest { display: none; }
.stage.is-ringing #g-ring, .stage.is-ringing #g-arm-rest { display: inline; }
.stage.is-ringing #g-phone, .stage.is-ringing #g-arm-phone, .stage.is-ringing #g-cord { display: none; }
.stage.is-ringing #g-eye-l, .stage.is-ringing #g-eye-r { transform: translate(7px, -2px); }
.stage.is-ringing #g-brow-l, .stage.is-ringing #g-brow-r { transform: translateY(-9px); }
.stage.is-bell #g-cat-eyes-open { opacity: 1; }
.stage.is-bell #g-cat-eyes-closed { opacity: 0; }
.stage.is-bell #g-cat-ear-r { transform: rotate(18deg); }
#g-ring-waves, .ring-word { opacity: 0; }
#g-ring-handset, .ring-word { transform-box: fill-box; transform-origin: 50% 100%; }
.ring-word { font-family: var(--display); font-size: 46px; fill: var(--amber); stroke: var(--velvet-deep); stroke-width: 9px; paint-order: stroke; stroke-linejoin: round; }
.stage.is-bell #g-ring-handset { animation: rattle 0.08s linear infinite alternate; }
.stage.is-bell #g-ring-waves { opacity: 1; animation: waves 0.3s steps(1) infinite; }
.stage.is-bell .ring-word { opacity: 1; animation: ring-pop 0.35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes rattle { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-6px) rotate(3deg); } }
@keyframes waves { 50% { opacity: 0.35; } }
@keyframes ring-pop { from { transform: scale(0.3) rotate(-14deg); } }
#g-phone, #g-arm-phone { transform-box: fill-box; transform-origin: 50% 100%; }
.stage.is-pickup #g-phone, .stage.is-pickup #g-arm-phone { animation: pickup 0.5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pickup { from { transform: translate(40px, 70px) scale(0.6); opacity: 0; } }

/* Biscuit idles: tail swish, breathing, ear twitch */
.stage.is-twitching:not([data-mood="angry"]) #g-cat-ear-r { transform: rotate(18deg); }

/* police lights wash over the set */
#cops rect { opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.cops__red { fill: var(--cop-red); }
.cops__blue { fill: var(--cop-blue); }
.stage.is-cops .cops__red { animation: siren 0.5s steps(1) infinite; }
.stage.is-cops .cops__blue { animation: siren 0.5s steps(1) infinite -0.25s; }
@keyframes siren { 0% { opacity: 0.38; } 50% { opacity: 0; } }

/* ---------- broadcast graphics ---------- */
.bug { position: absolute; top: var(--gap); left: var(--gap); z-index: 3; }
.logo {
  margin: 0; font-family: var(--brand); font-weight: 400; line-height: 0.95;
  font-size: clamp(1.8rem, 4.2vw, 3.3rem); color: var(--amber);
  transform: rotate(-4deg); transform-origin: left bottom;
  text-shadow: 3px 3px 0 var(--tangerine), 6px 6px 0 var(--velvet-deep), 0 0 30px rgba(255, 178, 26, 0.35);
}
.on-air { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0.7rem 0 0; padding: 0.25rem 0.7rem; border-radius: 6px; background: var(--cop-red); font-weight: 800; font-stretch: 110%; color: #fff; }
.on-air__lamp { width: 8px; height: 8px; border-radius: 50%; background: #fff; transition: opacity 0.2s; }
.on-air__place { font-weight: 500; opacity: 0.9; }
@keyframes blink { 50% { opacity: 0.2; } }
/* on-air lamps blink from the idle timer in stage.js (a class flip), not an endless CSS animation */
.show.is-lamp-off .on-air__lamp, .show.is-lamp-off .calls__live::before, .show.is-lamp-off .calls-toggle__dot { opacity: 0.2; }

.jackpot { position: absolute; top: var(--gap); right: var(--gap); z-index: 3; text-align: right; }
.jackpot__label { display: block; font-size: 0.8rem; color: rgba(255, 242, 210, 0.85); }
.jackpot__value {
  display: inline-block; margin-top: 0.2rem; padding: 0.25rem 0.85rem; border-radius: 10px;
  background: #140310; box-shadow: inset 0 0 0 2px rgba(255, 178, 26, 0.55), 0 8px 24px rgba(0, 0, 0, 0.4);
  font-weight: 900; font-stretch: 125%; font-size: clamp(1.2rem, 2.6vw, 2rem); font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--amber); text-shadow: 0 0 14px rgba(255, 178, 26, 0.75);
}
.jackpot__value.is-bumped { animation: bump 0.5s; }
.jackpot__prize { display: block; margin-top: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--amber); }
.jackpot.is-won .jackpot__value { animation: flash 0.25s steps(1) 12; }
@keyframes bump { 40% { transform: scale(1.08); color: #fff; } }
@keyframes flash { 50% { background: var(--amber); color: var(--velvet-deep); text-shadow: none; } }

.card {
  position: absolute; z-index: 3; width: clamp(200px, 19vw, 270px);
  padding: 0.85rem; border-radius: 16px;
  background: rgba(30, 5, 23, 0.86);
  box-shadow: inset 0 0 0 1.5px rgba(255, 178, 26, 0.45), 0 14px 40px rgba(0, 0, 0, 0.4);
}
.card--caller { left: var(--gap); bottom: var(--gap); }
.card--audience { right: var(--gap); bottom: var(--gap); }
.card__title { margin: 0 0 0.2rem; font-family: var(--display); font-weight: 400; font-size: 1.05rem; color: var(--amber); }

.caller { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; }
.caller__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tangerine); color: var(--velvet-deep); font-family: var(--display); font-size: 1.2rem; }
.caller__name, .caller__pitch { margin: 0; }
.caller__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caller__text { min-width: 0; }
.caller__pitch { font-size: 0.8rem; color: rgba(255, 242, 210, 0.8); }
.clock { position: relative; width: 52px; height: 52px; }
.clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.clock__track { fill: #140310; stroke: #3a1430; stroke-width: 6; }
.clock__arc { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 163.4; }
.clock.is-low .clock__arc { stroke: var(--cop-red); }
.clock__value { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-stretch: 120%; font-variant-numeric: tabular-nums; }


.gauge { display: block; width: 100%; height: auto; }
.gauge__needle { transform-box: view-box; transform-origin: 100px 100px; transform: rotate(-70deg); transition: transform 0.9s cubic-bezier(.3, 1.6, .5, 1); }
.gauge__labels { display: flex; justify-content: space-between; margin: 0; font-size: 0.72rem; color: rgba(255, 242, 210, 0.75); }
.audience__q { margin: 0.8rem 0 0.4rem; font-weight: 700; }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-items: center; }
.vote__btn { padding: 0.35rem 0.7rem; border-radius: 99px; border: 1.5px solid var(--amber); background: transparent; font-weight: 800; font-size: 0.85rem; }
.vote__btn[data-vote="no"] { border-color: var(--cop-red); }
.vote__btn[aria-pressed="true"] { background: var(--amber); color: var(--velvet-deep); }
.vote__btn[data-vote="no"][aria-pressed="true"] { background: var(--cop-red); color: #fff; }




/* calls panel: everyone's calls, live and finished, open to watch */
.caller__mode { margin: 0; font-size: 0.7rem; font-weight: 800; color: var(--amber); }
.card--calls { right: var(--gap); top: 7.4rem; display: flex; flex-direction: column; max-height: calc(100dvh - 7.4rem - 330px); min-height: 150px; }
.calls__head { display: flex; align-items: center; gap: 0.5rem; }
.calls__head .card__title { margin: 0; flex: 1; }
.calls__live { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 800; color: var(--cop-red); }
.calls__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cop-red); transition: opacity 0.2s; }
.calls__close { display: none; border: 0; background: transparent; font-size: 1.1rem; color: var(--cream); }
.calls { list-style: none; margin: 0.6rem 0 0; padding: 0 0.2rem 0 0; display: grid; gap: 0.35rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 178, 26, 0.5) transparent; }
.call-row {
  display: grid; gap: 0.15rem; width: 100%; padding: 0.45rem 0.6rem; text-align: left;
  border: 1.5px solid rgba(255, 242, 210, 0.12); border-radius: 10px; background: rgba(255, 242, 210, 0.04);
  transition: border-color 0.2s, background 0.2s;
}
.call-row:hover { border-color: rgba(255, 178, 26, 0.6); background: rgba(255, 178, 26, 0.08); }
.call-row.is-watching { border-color: var(--amber); background: rgba(255, 178, 26, 0.14); }
.call-row.is-mine { box-shadow: inset 4px 0 0 var(--tangerine); }
.call-row__top { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; }
.call-row__nick { font-weight: 800; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-row__preview { font-size: 0.74rem; color: rgba(255, 242, 210, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { flex: none; padding: 0.05rem 0.45rem; border-radius: 99px; font-size: 0.66rem; font-weight: 800; background: rgba(255, 242, 210, 0.12); }
.badge--live { background: var(--cop-red); color: #fff; }
.badge--ringing { background: var(--amber); color: var(--velvet-deep); }
.badge--replay { background: rgba(255, 242, 210, 0.16); color: var(--cream); }
.result--won { background: var(--amber); color: var(--velvet-deep); }
.result--almost { background: #9fd17a; color: #1d3a10; }
.result--cops { background: var(--cop-blue); color: #fff; }
.result--hungup { background: rgba(255, 242, 210, 0.16); color: var(--cream); }
.calls-toggle { display: none; }

.toast {
  position: absolute; z-index: 6; left: 50%; top: 1rem; margin: 0; padding: 0.5rem 1rem; border-radius: 99px;
  background: var(--amber); color: var(--velvet-deep); font-weight: 800; white-space: nowrap; pointer-events: none;
  transform: translate(-50%, -160%); opacity: 0;
}
.toast.is-on { animation: toast 3.2s ease forwards; }
@keyframes toast { 10%, 85% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -160%); opacity: 0; } }

/* call transcript: the whole conversation, scrolling inside its own box */
.chat { position: absolute; z-index: 3; left: 50%; bottom: calc(5.6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, 92vw); }
.chat__log {
  list-style: none; margin: 0; padding: 2.2rem 0.4rem 0.2rem; display: flex; flex-direction: column; gap: 0.4rem;
  max-height: 30vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 178, 26, 0.5) transparent;
  -webkit-mask-image: linear-gradient(transparent, #000 2.4rem); mask-image: linear-gradient(transparent, #000 2.4rem);
}
.msg {
  max-width: 82%; padding: 0.45rem 0.75rem; border-radius: 14px; font-size: 0.95rem; line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); animation: chyron 0.3s ease-out;
}
.msg__who { display: block; font-size: 0.72rem; font-weight: 800; opacity: 0.75; }
.msg--granny { align-self: flex-start; background: var(--cream); color: var(--velvet); border-bottom-left-radius: 4px; }
.msg--granny .msg__who { color: var(--tangerine); opacity: 1; }
.msg--caller, .msg--you { align-self: flex-end; background: rgba(46, 8, 36, 0.88); color: var(--cream); border: 1px solid rgba(255, 178, 26, 0.35); border-bottom-right-radius: 4px; }
.msg--you { border-color: var(--tangerine); }
.msg-divider { align-self: center; padding: 0.15rem 0.7rem; border-radius: 99px; background: rgba(20, 3, 15, 0.7); font-size: 0.72rem; font-weight: 700; color: var(--amber); }
@keyframes chyron { from { transform: translateY(8px); opacity: 0; } }

/* call bar */
.callbar { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 0.7rem; padding: 0 1rem calc(1rem + env(safe-area-inset-bottom)); }
.call-btn {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.9rem 1.7rem; border: 0; border-radius: 99px;
  background: var(--tangerine); color: #fff; font-weight: 900; font-stretch: 110%; font-size: 1.1rem; white-space: nowrap;
  box-shadow: 0 6px 0 #b33a10, 0 12px 34px rgba(255, 90, 31, 0.5);
  transition: transform 0.12s, box-shadow 0.12s;
}
.call-btn svg { width: 1.25em; height: 1.25em; fill: currentColor; }
.call-btn:hover svg { animation: ring 0.5s; }
.call-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b33a10; }
.call-btn:disabled { filter: saturate(0.6); cursor: default; }
.call-btn--small { font-size: 1rem; padding: 0.75rem 1.3rem; }
.call-btn.is-hangup { background: var(--cop-red); box-shadow: 0 6px 0 #a3141f, 0 12px 34px rgba(255, 46, 63, 0.45); }
.call-btn.is-hangup svg { transform: rotate(135deg); }
@keyframes ring { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
.wallet-btn, .ghost-btn { padding: 0.8rem 1.2rem; border-radius: 99px; border: 2px solid var(--amber); background: var(--glass); color: var(--amber); font-weight: 800; white-space: nowrap; }
.wallet-btn.is-connected { border-color: #9fd17a; color: #cfe3a5; }

/* ringing lower-third: sits above the call bar until she picks up */
.ringing {
  position: absolute; z-index: 5; left: 50%; bottom: calc(5.8rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1.2rem 0.55rem 0.55rem; border-radius: 99px;
  background: var(--cream); color: var(--velvet); font-weight: 800; font-size: 1.05rem; white-space: nowrap;
  box-shadow: 0 0 0 4px var(--amber), 0 16px 40px rgba(0, 0, 0, 0.45); animation: chyron 0.3s ease-out;
}
.ringing[hidden] { display: none; }
.ringing__icon { position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--tangerine); }
.ringing__icon svg { width: 1.2rem; height: 1.2rem; fill: #fff; animation: ring 0.5s infinite; }
.ringing__icon::before, .ringing__icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--tangerine); animation: ripple 1.4s ease-out infinite;
}
.ringing__icon::after { animation-delay: 0.7s; }
@keyframes ripple { to { transform: scale(2); opacity: 0; } }
.ringing__dots { display: inline-flex; gap: 0.2rem; }
.ringing__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--tangerine); animation: dot 1s infinite; }
.ringing__dots i:nth-child(2) { animation-delay: 0.15s; }
.ringing__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 30% { transform: translateY(-5px); } 60% { transform: none; } }

/* big moments */
.stamp {
  position: absolute; z-index: 5; left: 50%; top: 38%; margin: 0; pointer-events: none; white-space: nowrap;
  font-family: var(--display); font-size: clamp(2.4rem, 7vw, 5.2rem); line-height: 1;
  color: var(--amber); text-shadow: 4px 4px 0 var(--tangerine), 8px 8px 0 var(--velvet-deep);
  transform: translate(-50%, -50%) rotate(-8deg) scale(0); opacity: 0;
}
.stamp.is-on { animation: stamp 2.4s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.stamp--cops { color: #fff; text-shadow: 4px 4px 0 var(--cop-blue), 8px 8px 0 var(--cop-red); }
.stamp--gloom { color: var(--cream); text-shadow: 4px 4px 0 #5b5161, 8px 8px 0 var(--velvet-deep); }
@keyframes stamp {
  0% { transform: translate(-50%, -50%) rotate(-8deg) scale(0); opacity: 0; }
  15%, 80% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.15); opacity: 0; }
}
.show.is-gloom .stage { filter: grayscale(0.85) brightness(0.55); transition: filter 0.4s; }
.show.is-shaking { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.applause {
  position: absolute; z-index: 5; left: 50%; top: 14%; transform: translateX(-50%); margin: 0; padding: 0.3rem 1.1rem;
  border: 3px solid var(--cop-red); border-radius: 10px; background: rgba(30, 5, 23, 0.85);
  font-family: var(--display); font-size: 1.5rem; color: var(--cop-red); text-shadow: 0 0 16px var(--cop-red);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.applause.is-on { opacity: 1; animation: blink 0.6s steps(1) infinite; }

.bug__buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.how-btn { display: block; padding: 0.35rem 0.85rem; border-radius: 99px; border: 1.5px solid rgba(255, 242, 210, 0.6); background: var(--glass); color: var(--cream); font-weight: 700; font-size: 0.85rem; }
.how-btn:hover { border-color: var(--amber); color: var(--amber); }
.lang-btn { display: inline-flex; align-items: center; gap: 0.3rem; }
.lang-btn svg { width: 1em; height: 1em; fill: currentColor; }

/* modal */
.modal { width: min(26rem, calc(100% - 2rem)); padding: 1.6rem; border: 0; border-radius: 18px; background: var(--cream); color: var(--velvet); box-shadow: 0 0 0 6px var(--amber), 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal::backdrop { background: rgba(20, 3, 15, 0.78); }
.modal__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--tangerine); }
.modal__body { margin: 0.6rem 0 1.2rem; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.modal--how { width: min(40rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.how-steps { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.8rem; }
.how-steps li { counter-increment: step; position: relative; min-height: 2.4rem; padding-left: 3.1rem; }
.how-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--tangerine); color: #fff; font-family: var(--display); font-size: 1.2rem;
}
.how-steps strong { display: block; }
/* a light map of a call: five small tiles joined by arrows */
.how-sub { margin: 1.2rem 0 0.5rem; font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--tangerine); }
.call-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.9rem; }
.call-flow li {
  position: relative; padding: 0.5rem 0.55rem; border-radius: 12px; background: rgba(58, 12, 44, 0.07);
  font-size: 0.8rem; line-height: 1.3;
}
.call-flow li + li::before {
  content: "›"; position: absolute; left: -0.78rem; top: 50%; transform: translateY(-50%);
  font-weight: 900; font-size: 1.1rem; color: var(--tangerine);
}
.call-flow b { display: block; margin-bottom: 0.15rem; font-size: 0.86rem; color: var(--velvet); }
.call-flow li:last-child { background: rgba(255, 90, 31, 0.12); }
.how-rules { margin: 1.1rem 0 1.3rem; padding: 0.8rem 1rem 0.8rem 2rem; border-radius: 12px; background: rgba(58, 12, 44, 0.08); font-size: 0.92rem; }
.how-rules li + li { margin-top: 0.3rem; }
.claim__label { display: block; font-weight: 800; font-size: 0.85rem; }
.claim__input {
  width: 100%; margin: 0.35rem 0 0.5rem; padding: 0.65rem 0.8rem; border-radius: 10px; border: 2px solid rgba(58, 12, 44, 0.25);
  background: #fff; color: var(--velvet); font: 0.9rem ui-monospace, SFMono-Regular, Menlo, monospace;
}
.claim__input:focus { outline: none; border-color: var(--tangerine); }
.claim__status { min-height: 1.3em; margin: 0 0 1rem; font-size: 0.88rem; }
.claim__status.is-error { color: #C0392B; font-weight: 700; }
.modal .ghost-btn { color: var(--velvet); border-color: var(--velvet); background: transparent; }

/* channel picker: three grannies on three TV screens */
.picker {
  position: fixed; z-index: 15; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); text-align: center;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(255, 178, 26, 0.28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 18px, transparent 18px 46px),
    linear-gradient(var(--velvet), var(--velvet-deep));
}
.picker[hidden] { display: none; }
.picker__close {
  position: absolute; top: 1rem; right: 1rem; display: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1.5px solid rgba(255, 242, 210, 0.6); background: var(--glass);
}
.picker.has-close .picker__close { display: block; }
.picker__logo {
  margin: 0; font-family: var(--brand); font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; color: var(--amber); transform: rotate(-4deg);
  text-shadow: 3px 3px 0 var(--tangerine), 6px 6px 0 var(--velvet-deep);
}
.picker__title { margin: 1.1rem 0 0.2rem; font-family: var(--ui); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.5rem); }
.picker__sub { margin: 0; color: rgba(255, 242, 210, 0.75); }
.picker__sub [lang="ru"] { font-family: "Lobster", Georgia, serif; font-size: 1.15em; }
.picker__sub [lang="zh-CN"] { font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif; font-size: 1.1em; }
.picker__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(0.8rem, 2.4vw, 1.8rem); margin: 1.6rem 0 0; padding: 0; }
/* Maggie is the headliner: big and in the middle; the other two channels sit at her sides, smaller and tilted */
.picker__item--left { order: 1; }
.picker__item--main { order: 2; }
.picker__item--right { order: 3; }
.picker__item--main .channel { width: clamp(250px, 29vw, 330px); }
.picker__item--main .channel__name { font-size: 1.9rem; }
.picker__item--left .channel, .picker__item--right .channel { width: clamp(170px, 18vw, 215px); opacity: 0.86; }
.picker__item--left .channel { rotate: -4deg; }
.picker__item--right .channel { rotate: 4deg; }
.picker__item--left .channel:hover, .picker__item--right .channel:hover,
.picker__item--left .channel:focus-visible, .picker__item--right .channel:focus-visible { opacity: 1; }
.picker__item--left .channel__name, .picker__item--right .channel__name { font-size: 1.2rem; }
.channel {
  display: grid; justify-items: center; gap: 0.15rem; width: clamp(200px, 24vw, 260px); padding: 0.8rem 0.8rem 1rem;
  border: 0; border-radius: 22px; background: #5A2A16; color: var(--cream);
  box-shadow: inset 0 0 0 4px #7B4426, 0 8px 0 #2A1006, 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.2s;
}
.channel:hover, .channel:focus-visible { transform: translateY(-6px) rotate(-1deg); }
.channel.is-suggested { box-shadow: inset 0 0 0 4px var(--amber), 0 8px 0 #2A1006, 0 20px 40px rgba(255, 178, 26, 0.25); }
.channel__num { justify-self: start; padding: 0 0.5rem; border-radius: 6px; background: var(--cop-red); color: #fff; font-weight: 800; font-size: 0.72rem; }
.channel__screen {
  display: block; width: 100%; aspect-ratio: 28 / 25; margin: 0.4rem 0 0.5rem; overflow: hidden; border-radius: 18px / 24px;
  background: radial-gradient(ellipse at 50% 40%, #8A9A4A, #4E5A26); box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
}
.channel__screen svg { display: block; width: 100%; height: 100%; transition: transform 0.3s ease; }
.channel:hover .channel__screen svg { transform: scale(1.06); }
.channel__lang { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.channel__name { font-size: 1.45rem; line-height: 1.15; }
.channel__from { font-size: 0.82rem; color: rgba(255, 242, 210, 0.7); }
.channel[lang="en"] .channel__name { font-family: "Shrikhand", Georgia, serif; }
.channel[lang="ru"] .channel__name { font-family: "Lobster", Georgia, serif; }
.channel[lang="zh-CN"] .channel__name { font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif; }
/* the chosen set switches on like an old TV */
.channel.is-tuning .channel__screen svg { animation: tune 0.42s ease-in forwards; }
@keyframes tune { 60% { transform: scale(1.1, 0.02); filter: brightness(3); } 100% { transform: scale(0, 0.02); filter: brightness(3); } }

/* ---------- off air (before launch): she naps, the game UI steps aside ---------- */
.lang-btn[hidden] { display: none; }
.show.is-off-air .card, .show.is-off-air .jackpot, .show.is-off-air .callbar, .show.is-off-air .chat,
.show.is-off-air .calls-toggle, .show.is-off-air .ringing, .show.is-off-air .on-air__place { display: none; }
.show.is-off-air .on-air { background: #5b5161; }
.show.is-off-air .on-air__lamp { opacity: 0.3; }
.off-air {
  position: absolute; z-index: 4; left: 50%; bottom: calc(1.4rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(30rem, calc(100% - 2rem)); padding: 1.4rem 1.5rem 1.3rem; border-radius: 18px; text-align: center;
  background: var(--cream); color: var(--velvet); box-shadow: 0 0 0 6px var(--amber), 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: chyron 0.5s ease-out;
}
.off-air[hidden] { display: none; }
.off-air__tag {
  position: absolute; top: -0.9rem; left: 50%; margin: 0; padding: 0.2rem 0.9rem; border-radius: 6px; transform: translateX(-50%) rotate(-3deg);
  background: var(--cop-red); color: #fff; font-weight: 900; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.off-air__title { margin: 0.3rem 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.1; color: var(--tangerine); }
.off-air__body { margin: 0.55rem 0 0; font-size: 0.98rem; }
.off-air__x { margin-top: 1rem; text-decoration: none; }
.off-air__x[hidden] { display: none; }
/* her nap: phone on the table, hands in her lap, eyes shut */
.stage.is-off-air #g-ring, .stage.is-off-air #g-arm-rest { display: inline; }
.stage.is-off-air #g-phone, .stage.is-off-air #g-arm-phone, .stage.is-off-air #g-cord { display: none; }
.stage.is-off-air #g-eye-l, .stage.is-off-air #g-eye-r { transform: scaleY(0.1); }
.zzz { font-family: var(--display); font-size: 42px; fill: var(--cream); stroke: var(--velvet-deep); stroke-width: 6px; paint-order: stroke; }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.demo { position: fixed; z-index: 30; top: 0.5rem; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; max-width: 60vw; padding: 0.3rem; border-radius: 14px; background: rgba(20, 3, 15, 0.9); }
.demo[hidden] { display: none; }
.demo button { padding: 0.2rem 0.6rem; border-radius: 99px; border: 1px solid var(--amber); background: transparent; color: var(--amber); font-size: 0.72rem; }

/* tablets: drop the room's side cards to slim strips */
@media (max-width: 1100px) {
  .card { width: 210px; padding: 0.7rem; }
}
/* phones: Maggie fills the frame; graphics stack around her */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .on-air__place { display: none; }
  .card--caller { top: 8.6rem; bottom: auto; left: 0.6rem; width: auto; max-width: 52vw; padding: 0.45rem 0.55rem; }
  .card--caller .caller__pitch { display: none; }
  .caller { grid-template-columns: auto auto auto; }
  .clock { width: 40px; height: 40px; }
  .card--audience { top: 8.6rem; bottom: auto; right: 0.6rem; width: 128px; padding: 0.45rem; }
  .gauge__labels { display: none; }
  .vote__btn { padding: 0.2rem 0.4rem; font-size: 0.75rem; }
  .card--audience .card__title, .audience__q { display: none; }
  .vote { grid-template-columns: 1fr 1fr; }
  .calls-toggle {
    display: inline-flex; align-items: center; gap: 0.4rem; position: absolute; z-index: 4; right: 0.6rem; top: 5.4rem;
    padding: 0.35rem 0.75rem; border-radius: 99px; border: 1.5px solid rgba(255, 242, 210, 0.6); background: var(--glass); font-weight: 700; font-size: 0.8rem;
  }
  .calls-toggle__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cop-red); transition: opacity 0.2s; }
  .card--calls {
    position: fixed; z-index: 8; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 70dvh; min-height: 0;
    border-radius: 18px 18px 0 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateY(110%); transition: transform 0.3s ease;
  }
  .card--calls.is-open { transform: none; }
  .calls__close { display: block; }
  .chat { bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  .chat__log { max-height: 24vh; }
  .msg { font-size: 0.88rem; }
  .callbar { gap: 0.5rem; padding-left: 0.6rem; padding-right: 0.6rem; }
  .call-btn { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0.8rem 1rem; font-size: 1rem; }
  .call-btn span { overflow: hidden; text-overflow: ellipsis; }
  .ringing { bottom: calc(5rem + env(safe-area-inset-bottom)); font-size: 0.92rem; }
  .call-flow { grid-template-columns: 1fr; gap: 0.35rem; }
  .call-flow li { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.4rem 0.6rem; }
  .call-flow li + li::before { display: none; }
  .call-flow b { flex: none; margin: 0; }
  .off-air { padding: 1.2rem 1.1rem 1.1rem; }
  .off-air__body { font-size: 0.9rem; }
  .picker { justify-content: flex-start; }
  .picker__list { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; gap: 0.7rem; }
  .picker__item--main { order: 0; }
  .picker__item--main .channel, .picker__item--left .channel, .picker__item--right .channel { width: 100%; rotate: none; }
  .picker__item--main .channel__name { font-size: 1.45rem; }
  .picker__item--main .channel { grid-template-columns: 120px 1fr; }
  .channel { width: 100%; grid-template-columns: 96px 1fr; grid-template-rows: auto auto auto auto; justify-items: start; text-align: left; column-gap: 0.8rem; padding: 0.6rem; }
  .channel__screen { grid-column: 1; grid-row: 1 / 5; margin: 0; }
  .channel__num { grid-column: 2; }
  .channel__name { font-size: 1.2rem; }
  .wallet-btn { flex: 0 1 auto; min-width: 0; max-width: 42vw; padding: 0.45rem 0.8rem; font-size: 0.82rem; line-height: 1.15; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
