:root {
  --bg: #05060a;
  --bg2: #0b1022;
  --panel: #0a0f1f;
  --cyan: #3ef0ff;
  --pink: #ff5fa2;
  --amber: #ffb23e;
  --green: #5dffa0;
  --red: #ff3355;
  --blue: #3d8bff;
  --text: #e8f4ff;
  --muted: #9fb3c8;
  --pixel: 'Press Start 2P', monospace;
  --term: 'VT323', monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #101a36, var(--bg) 62%) fixed var(--bg);
  color: var(--text);
  font-family: var(--term);
  font-size: 20px;
  overflow: hidden;
  -webkit-font-smoothing: none;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }

/* ---------- title ---------- */
.title-inner { text-align: center; }
.neon-title {
  font-family: var(--pixel);
  font-size: clamp(22px, 6vw, 56px);
  line-height: 1.3;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 12px var(--pink), 0 0 28px var(--pink), 0 0 48px var(--pink);
  animation: flicker 6s infinite;
}
.tagline { font-family: var(--pixel); font-size: clamp(8px, 1.6vw, 12px); color: var(--cyan); letter-spacing: 1px; margin: 0 0 40px; }
.coin-btn {
  font-family: var(--pixel);
  font-size: clamp(14px, 3vw, 22px);
  padding: 18px 28px;
  background: transparent;
  border: 3px solid var(--red);
  border-radius: 6px;
  color: #fff;
  animation: coinPulse 1.6s infinite;
}
.hint { font-family: var(--pixel); font-size: 9px; color: var(--muted); margin-top: 18px; animation: blink 1.2s steps(1) infinite; }
.status { color: var(--amber); min-height: 1.2em; }
.noscript { padding: 24px; font-family: var(--pixel); font-size: 12px; }

/* ---------- panels & buttons ---------- */
.panel {
  background: linear-gradient(180deg, var(--bg2), var(--panel));
  border: 2px solid var(--cyan);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(62, 240, 255, 0.25), inset 0 0 40px rgba(0, 0, 0, 0.6);
  padding: 20px;
  color: var(--text);
}
.panel h2 { font-family: var(--pixel); font-size: 16px; color: var(--amber); margin: 0 0 16px; text-align: center; text-shadow: 0 0 10px rgba(255, 178, 62, 0.6); }
.btn {
  font-family: var(--pixel);
  font-size: 12px;
  padding: 12px 16px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 6px;
  color: #10040a;
  box-shadow: 0 4px 0 #7a1d48;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #7a1d48; }
.btn.small { font-size: 9px; padding: 8px 10px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--muted); box-shadow: none; }
.mini { font-family: var(--pixel); font-size: 9px; background: #121a33; border: 2px solid var(--muted); border-radius: 4px; padding: 6px 8px; }
.mini.wide { width: 100%; margin-top: 8px; }
.row { display: flex; gap: 12px; justify-content: flex-end; }
.error { color: var(--red); min-height: 1.2em; margin: 8px 0; }

/* ---------- creator ---------- */
/* Opened from the floor (AVATAR), the creator has to sit above it. */
#creator { z-index: 3; background: rgba(5, 6, 10, 0.82); }
.creator { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.creator-body { display: flex; gap: 20px; }
.preview-wrap { flex: 0 0 auto; text-align: center; }
#preview {
  width: 144px; height: 144px;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#151c35 0 25%, #10162b 0 50%) 0 0 / 24px 24px;
  border: 2px solid var(--muted);
  border-radius: 8px;
}
.preview-turn { display: flex; justify-content: space-between; margin-top: 8px; }
.options { flex: 1; min-width: 0; }
.field { display: block; margin-bottom: 12px; }
.field span, .swatches legend { font-family: var(--pixel); font-size: 9px; color: var(--cyan); display: block; margin-bottom: 6px; }
.field input {
  width: 100%;
  background: #04060c;
  border: 2px solid var(--muted);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 24px;
  text-transform: uppercase;
}
.field input:focus { border-color: var(--amber); outline: none; }
.swatches { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.swatches legend { padding: 0; }
.swatch {
  width: 28px; height: 28px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #2a3352;
  padding: 0;
}
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--amber), 0 0 10px var(--amber); }
.swatch.text { width: auto; padding: 0 8px; font-family: var(--pixel); font-size: 8px; background: #121a33; color: var(--text); }

/* ---------- floor ---------- */
#floor { padding: 0; display: block; }
#world, #labels { position: absolute; inset: 0; width: 100%; height: 100%; }
#world { image-rendering: pixelated; touch-action: none; }
#labels { pointer-events: none; }

.hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.85), transparent);
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-name { font-family: var(--pixel); font-size: 11px; color: var(--pink); text-shadow: 0 0 8px var(--pink); }
.spacer { flex: 1; }
.pill {
  font-family: var(--pixel); font-size: 8px;
  padding: 6px 8px;
  border: 1px solid var(--cyan); border-radius: 20px;
  color: var(--cyan); background: rgba(5, 6, 10, 0.7);
}
.pill.dim { border-color: var(--amber); color: var(--amber); }
.btn-pill:hover { background: rgba(62, 240, 255, 0.15); }

.chat {
  position: absolute; left: 12px; bottom: 12px;
  width: min(360px, calc(100% - 24px));
  display: flex; flex-direction: column;
}
.chat-log {
  list-style: none; margin: 0 0 6px; padding: 8px 10px;
  max-height: 30vh; overflow-y: auto;
  background: rgba(5, 6, 10, 0.72);
  border: 1px solid rgba(62, 240, 255, 0.35);
  border-radius: 8px;
  font-size: 19px; line-height: 1.1;
  overflow-wrap: anywhere;
}
.chat-log:empty { display: none; }
.chat-log li { margin: 2px 0; }
.chat-log .who { font-weight: normal; }
.chat-log .sys { color: var(--muted); font-style: italic; }
.chat-input-wrap { display: flex; }
#chat-input {
  width: 100%;
  background: rgba(5, 6, 10, 0.85);
  border: 2px solid var(--muted);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 20px;
}
#chat-input:focus { border-color: var(--amber); outline: none; }

.prompt {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(380px, calc(100% - 24px));
  padding: 12px 14px;
  background: rgba(10, 15, 31, 0.92);
  border: 2px solid var(--amber);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 178, 62, 0.3);
  text-align: center;
}
.prompt-title { font-family: var(--pixel); font-size: 12px; color: var(--amber); margin-bottom: 6px; }
.prompt-meta { font-family: var(--pixel); font-size: 8px; color: var(--cyan); margin-bottom: 6px; }
.prompt-desc { font-size: 19px; line-height: 1.05; margin-bottom: 6px; }
.prompt-score { font-size: 18px; color: var(--green); margin-bottom: 8px; }

.touch-hint { display: none; }

/* When the prompt is up on narrow screens, lift the chat above it. */
@media (max-width: 760px) {
  .chat { bottom: auto; top: 52px; width: min(300px, calc(100% - 24px)); }
  .chat-log { max-height: 18vh; font-size: 17px; }
  .hud-name { display: none; }
}
@media (pointer: coarse) {
  .touch-hint { display: block; position: absolute; bottom: 54px; right: 12px; font-family: var(--pixel); font-size: 7px; color: var(--muted); }
}

/* ---------- sound, music and the jukebox (hub/music.js) ---------- */
/* Under the cabinet overlay (z 10): while a game is open its frame has the floor. */
#audio-ui {
  position: fixed; right: 12px; bottom: 12px; z-index: 5;
  display: flex; gap: 6px; align-items: flex-end;
}
.ajb-btn {
  cursor: pointer; display: flex; align-items: center; gap: 7px; min-height: 34px;
  font: 8px var(--pixel); letter-spacing: 1px;
  background: rgba(5, 6, 10, 0.92); border: 2px solid; border-radius: 5px; padding: 5px 9px;
}
#jukebox {
  position: fixed; right: 12px; bottom: 56px; z-index: 6;
  width: min(320px, calc(100vw - 24px)); box-sizing: border-box;
  background: linear-gradient(180deg, #1a1026, #0b0e17);
  border: 2px solid var(--ajb-accent, var(--pink)); border-radius: 26px 26px 10px 10px; padding: 14px 14px 16px;
  box-shadow: 0 0 24px var(--ajb-glow, rgba(255, 95, 162, 0.45)), inset 0 0 26px rgba(255, 255, 255, 0.04);
  transition: border-color 1s, box-shadow 1s;
  font-family: var(--pixel); color: var(--text);
}
#jukebox[hidden] { display: none; }
.ajb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ajb-title { font-size: 11px; color: #ffd27a; text-shadow: 0 0 8px var(--amber); letter-spacing: 2px; }
.ajb-x { background: none; border: 1.5px solid #8aa0b8; color: #8aa0b8; border-radius: 4px; width: 28px; height: 28px; cursor: pointer; font: 10px var(--pixel); }
.ajb-x:hover { color: #fff; border-color: #fff; }
.ajb-now { font-size: 8px; line-height: 1.7; color: #8aa0b8; margin: 2px 0 10px; min-height: 28px; }
.ajb-now b { color: var(--cyan); font-weight: normal; text-shadow: 0 0 6px var(--cyan); }
.ajb-track {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-bottom: 7px; padding: 9px 10px; cursor: pointer;
  background: rgba(255, 178, 62, 0.06); border: 1.5px solid rgba(255, 178, 62, 0.55); border-radius: 6px; color: #ffd27a; font-family: inherit;
}
.ajb-track:hover { background: rgba(255, 178, 62, 0.18); }
.ajb-track.cur { border-color: var(--cyan); background: rgba(62, 240, 255, 0.12); color: #fff; box-shadow: 0 0 12px rgba(62, 240, 255, 0.4); }
.ajb-n { font-size: 12px; color: #ff9cc7; width: 14px; }
.ajb-t { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 9px; }
.ajb-t small { font: 17px var(--term); color: #8aa0b8; letter-spacing: 0; }
.ajb-eq { display: inline-flex; align-items: flex-end; height: 16px; gap: 2px; opacity: 0; }
.ajb-track.cur.live .ajb-eq { opacity: 1; }
.ajb-eq i { width: 3px; height: 16px; background: var(--pink); transform-origin: bottom; animation: ajbeq 0.7s ease-in-out infinite alternate; }
.ajb-eq i:nth-child(2) { animation-duration: 0.5s; animation-delay: 0.1s; }
.ajb-eq i:nth-child(3) { animation-duration: 0.9s; animation-delay: 0.2s; }
.ajb-eq i:nth-child(4) { animation-duration: 0.6s; animation-delay: 0.05s; }
@keyframes ajbeq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }
.ajb-ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ajb-ctl button { display: flex; align-items: center; justify-content: center; width: 38px; height: 34px; cursor: pointer; color: var(--cyan); background: none; border: 1.5px solid var(--cyan); border-radius: 4px; }
.ajb-ctl button:hover { background: var(--cyan); color: var(--bg); }
.ajb-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ajb-lab { width: 50px; font-size: 8px; letter-spacing: 1px; color: var(--ajb-accent, var(--pink)); }
.ajb-vol, .ajb-fx { flex: 1; min-width: 0; height: 18px; accent-color: var(--ajb-accent, var(--pink)); cursor: pointer; }
.ajb-pct { width: 38px; text-align: right; font-size: 8px; color: #8aa0b8; }
@media (max-width: 1100px) { .ajb-label { display: none; } }
@media (max-width: 600px) {
  #audio-ui { flex-direction: column; align-items: flex-end; }
  #jukebox { bottom: 150px; }
  .touch-hint { bottom: 4px; right: 60px; }
}
@media (prefers-reduced-motion: reduce) { .ajb-eq i { animation: none; transform: scaleY(0.6); } }

/* ---------- cabinet overlay ---------- */
.cabinet {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 12px;
  background: rgba(2, 3, 6, 0.88);
  z-index: 10;
}
.cab-frame {
  --cab: var(--pink);
  width: min(100%, calc((100dvh - 120px) * 4 / 3 + 40px));
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1a1a24, #0b0b12);
  border: 3px solid var(--cab);
  border-radius: 16px 16px 8px 8px;
  box-shadow: 0 0 30px color-mix(in srgb, var(--cab) 50%, transparent);
  padding: 0 16px 10px;
}
.cab-marquee {
  margin: 0 -16px 12px;
  padding: 10px;
  text-align: center;
  font-family: var(--pixel);
  font-size: clamp(10px, 2.2vw, 16px);
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cab) 70%, #000), #000);
  border-radius: 12px 12px 0 0;
  text-shadow: 0 0 8px var(--cab), 0 0 18px var(--cab);
  border-bottom: 2px solid #000;
}
.cab-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
  border: 6px solid #000;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px #333, 0 0 0 2px #222;
  overflow: hidden;
}
.cab-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.cab-panel { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-family: var(--pixel); font-size: 8px; color: var(--muted); }

/* ---------- games dialog ---------- */
.dialog { width: min(560px, calc(100% - 24px)); max-height: 80dvh; }
.dialog::backdrop { background: rgba(2, 3, 6, 0.75); }
.games-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.games-list li { border: 1px solid #2a3352; border-radius: 8px; padding: 8px 10px; }
.games-list .g-title { font-family: var(--pixel); font-size: 10px; color: var(--amber); }
.games-list .g-meta { font-family: var(--pixel); font-size: 7px; color: var(--cyan); margin: 4px 0; }
.games-list .g-row { display: flex; gap: 8px; margin-top: 6px; }
.dialog form { text-align: right; }

/* ---------- watching ---------- */
/* Like the cabinet overlay, but the chat stays usable on top of it. */
.watch { position: fixed; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(2, 3, 6, 0.8); z-index: 8; }
.watch[hidden] { display: none; }
body.watching .chat { z-index: 9; }
.watch-frame { --cab: var(--cyan); }
.watch-screen { display: grid; place-items: center; background: #000; }
#watch-img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
#watch-img:not([src]) { display: none; }
.watch-wait { position: absolute; font: 10px var(--pixel); color: var(--muted); animation: blink 1s steps(1) infinite; }
.prompt-watch { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.prompt-watch:empty { display: none; }
.prompt-watch .btn { background: transparent; color: var(--cyan); border-color: var(--cyan); box-shadow: none; }

/* ---------- tokens ---------- */
.wallet { display: inline-flex; align-items: center; gap: 6px; border-color: var(--amber); color: #ffd27a; }
.wallet b { color: #fff; font-weight: normal; }
.wallet.broke { border-color: var(--red); color: var(--red); animation: blink 1s steps(1) infinite; }
.wallet-cash { color: var(--green); margin-left: 4px; }
.token-icon {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
  background: radial-gradient(circle at 35% 35%, #fff3c4 0 15%, #ffd23e 16% 55%, #b07a10 56%);
  box-shadow: 0 0 6px rgba(255, 210, 62, 0.7);
}

.prompt-screen {
  display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; margin: 0 0 10px;
  background: #000; border-radius: 10px / 14px;
  border: 3px solid #05050a; box-shadow: 0 0 0 2px #2a3352, 0 0 18px rgba(62, 240, 255, 0.25);
  image-rendering: pixelated; object-fit: cover;
}
.prompt-screen[hidden] { display: none; }
.prompt-cost { font-family: var(--pixel); font-size: 8px; color: #ffd27a; margin-bottom: 8px; }
.prompt-cost:empty { display: none; }
.prompt-cost.broke { color: var(--red); animation: blink 1s steps(1) infinite; }
.prompt.is-changer { border-color: #ffe14a; box-shadow: 0 0 22px rgba(255, 225, 74, 0.35); }

/* ---------- token changer ---------- */
.changer {
  width: min(400px, calc(100% - 24px)); max-height: 92dvh; overflow-x: hidden; overflow-y: auto; box-sizing: border-box;
  padding: 14px; color: var(--text);
  background: linear-gradient(90deg, #5a6478, #8e9bb3 18%, #b6c2d6 50%, #8e9bb3 82%, #5a6478);
  border: 3px solid #2b3140; border-radius: 12px;
  box-shadow: 0 0 0 2px #0b0b12, 0 0 40px rgba(255, 225, 74, 0.3);
}
.changer::backdrop { background: rgba(2, 3, 6, 0.75); }
.ch-header { background: #0b0b12; border-radius: 6px; padding: 8px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px #2b3140; }
.ch-header h2 {
  margin: 0; text-align: center; font-family: var(--pixel); font-size: 14px; letter-spacing: 2px;
  color: #ffe14a; text-shadow: 0 0 8px #ffb23e, 0 0 16px #ff3355; animation: chMarquee 0.7s steps(1) infinite;
}
@keyframes chMarquee { 50% { color: #ff5fa2; text-shadow: 0 0 8px #ff3355, 0 0 16px #ffe14a; } }

/* The taped-on ad: a fluorescent card with a starburst, as in every 80s arcade. */
.ch-ad {
  position: relative; margin: 0 4px 12px; padding: 12px 12px 10px;
  background: #ffe14a; color: #1a0a0a; border: 3px dashed #d8263c; border-radius: 4px;
  transform: rotate(-1.2deg); box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.35);
}
.ch-burst {
  position: absolute; right: -14px; top: -18px; width: 60px; height: 60px; display: grid; place-items: center;
  font-family: var(--pixel); font-size: 10px; color: #fff; transform: rotate(14deg);
  background: #d8263c;
  clip-path: polygon(50% 0, 61% 18%, 82% 9%, 80% 31%, 100% 38%, 85% 54%, 98% 72%, 76% 75%, 74% 97%, 56% 84%, 40% 100%, 33% 79%, 11% 86%, 17% 64%, 0 52%, 17% 38%, 9% 17%, 31% 20%);
  animation: chPop 0.8s ease-in-out infinite alternate;
}
@keyframes chPop { to { transform: rotate(14deg) scale(1.12); } }
.ch-special {
  margin: 0 0 8px; font-family: var(--pixel); font-size: 13px; color: #d8263c; text-align: center;
  animation: blink 0.9s steps(1) infinite;
}
.ch-rates { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ch-rates li { display: flex; align-items: baseline; gap: 10px; font-size: 22px; line-height: 1; }
.ch-rates b { font-family: var(--pixel); font-size: 12px; width: 44px; color: #17307a; }
.ch-rates em { margin-left: auto; font-style: normal; font-family: var(--pixel); font-size: 9px; color: #fff; background: #d8263c; padding: 3px 5px; border-radius: 3px; }
.ch-rates li.best { font-size: 26px; }
.ch-fine { margin: 8px 0 0; font-family: var(--pixel); font-size: 6px; text-align: center; color: #5a2a00; }

.ch-acceptor { background: #1b1f2b; border-radius: 8px; padding: 10px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px #0b0b12; text-align: center; }
.ch-mouth {
  position: relative; height: 12px; margin: 0 auto 8px; width: 70%; overflow: hidden;
  background: #05050a; border-radius: 3px; box-shadow: 0 0 0 2px #3a4152, 0 0 10px rgba(93, 255, 160, 0.5);
}
.ch-feed {
  position: absolute; left: 10%; right: 10%; top: 0; height: 12px; opacity: 0;
  background: #7fc48a; color: #0e3b1a; font-family: var(--pixel); font-size: 7px; line-height: 12px;
}
.ch-feed.go { animation: chFeed 0.75s ease-in forwards; }
@keyframes chFeed { 0% { opacity: 1; transform: translateY(14px); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.ch-msg { margin: 0; font-family: var(--pixel); font-size: 9px; color: var(--green); text-shadow: 0 0 6px var(--green); }

.ch-bills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.bill {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0; cursor: pointer;
  background: none; border: 0; font-family: var(--pixel); color: #0b0b12;
}
.bill-face {
  position: relative; display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 6px;
  background: linear-gradient(135deg, #a8d8a0, #6fae76); border: 2px solid #2f6b3a; border-radius: 3px;
  box-shadow: inset 0 0 0 2px #cdeec5, 0 3px 0 #1f4a28; transition: transform 0.1s;
}
.bill-seal { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; background: #e7f6dd; color: #2f6b3a; border: 1px solid #2f6b3a; }
.bill-amt { font-size: 15px; color: #164022; }
.bill-get { font-size: 7px; color: #0b0b12; text-align: center; }
.bill-bonus { font-size: 7px; color: #fff; background: #d8263c; border-radius: 3px; padding: 2px 0; text-align: center; }
.bill:hover:not(:disabled) .bill-face { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #cdeec5, 0 5px 0 #1f4a28, 0 0 12px rgba(93, 255, 160, 0.6); }
.bill:active:not(:disabled) .bill-face { transform: translateY(2px); box-shadow: inset 0 0 0 2px #cdeec5, 0 1px 0 #1f4a28; }
.bill:disabled { cursor: default; opacity: 0.55; }
.bill.short .bill-get::after { content: ' · NEED CASH'; color: #9a1030; }

/* The payout tray: tokens clatter in and pile up. */
.ch-tray {
  position: relative; height: 44px; margin-bottom: 10px; overflow: hidden;
  background: linear-gradient(#05050a, #1b1f2b); border-radius: 4px 4px 14px 14px; box-shadow: inset 0 3px 8px #000, 0 0 0 2px #2b3140;
}
.ch-tray i {
  position: absolute; bottom: var(--b, 4px); width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4 0 15%, #ffd23e 16% 55%, #b07a10 56%);
  animation: chDrop 0.35s cubic-bezier(0.5, 0, 0.7, 1.4) both;
}
@keyframes chDrop { from { transform: translateY(-48px) rotate(var(--r, 0deg)); } to { transform: translateY(0) rotate(var(--r, 0deg)); } }
.ch-foot { display: flex; align-items: center; gap: 12px; font-family: var(--pixel); font-size: 8px; color: #0b0b12; }
.ch-foot b { font-weight: normal; color: #164022; }
.ch-foot form { margin-left: auto; }
.ch-foot .btn.ghost { color: #0b0b12; border-color: #2b3140; }

@media (prefers-reduced-motion: reduce) {
  .ch-header h2, .ch-burst, .ch-special, .wallet.broke, .prompt-cost.broke { animation: none; }
}

/* ---------- CRT overlay ---------- */
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 20;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
}

@keyframes flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20%, 63% { opacity: 0.6; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes coinPulse {
  0%, 100% { border-color: var(--red); box-shadow: 0 0 12px var(--red), inset 0 0 12px rgba(255, 51, 85, 0.4); }
  50% { border-color: var(--blue); box-shadow: 0 0 22px var(--blue), inset 0 0 12px rgba(61, 139, 255, 0.4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
  .creator-body { flex-direction: column; align-items: center; }
  .options { width: 100%; }
}
