:root { --fox: #ff7a1a; --pink: #ff3d8b; --ink: #f6efe6; --dim: #b9aea2; --glass: rgba(16, 12, 10, .82); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #07060a; color: var(--ink);
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif; }
canvas { display: block; }
.hidden { display: none !important; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--fox), var(--pink)); }
button:hover { filter: brightness(1.1); }

#start { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50;
  background: radial-gradient(ellipse at center, rgba(40, 18, 8, .55), rgba(5, 4, 8, .92)); }
#start .card { text-align: center; padding: 36px 44px; background: var(--glass); border: 1px solid rgba(255, 122, 26, .4);
  border-radius: 22px; box-shadow: 0 30px 90px #000c; max-width: 92vw; }
#start h1 { margin: 0; font-size: 58px; letter-spacing: .06em; color: #ffd9b8;
  text-shadow: 0 0 12px var(--fox), 0 0 34px var(--fox); }
#start h1 span { color: #ffc2dc; text-shadow: 0 0 12px var(--pink), 0 0 34px var(--pink); }
.tag { color: var(--dim); margin: 4px 0 14px; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
#onair { margin: 0 0 18px; color: #ffb37a; }
#enter { font-size: 18px; padding: 14px 40px; }
.keys { color: var(--dim); font-size: 13px; margin: 16px 0 0; }
#loading { color: var(--dim); font-size: 12px; margin: 8px 0 0; }

#crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px #000; z-index: 10; }
#prompt { position: fixed; left: 50%; top: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px;
  background: var(--glass); border: 1px solid rgba(255, 122, 26, .5); font-weight: 600; z-index: 10; white-space: nowrap;
  pointer-events: none; }
canvas { touch-action: none; }
#prompt kbd { background: var(--fox); color: #000; border-radius: 5px; padding: 0 6px; margin-right: 6px; font-weight: 800; }
#coins { position: fixed; top: 16px; right: 18px; padding: 8px 14px; border-radius: 99px; background: var(--glass); z-index: 10; }
#np { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 9px 16px; border-radius: 99px;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, .12); z-index: 10; display: flex; gap: 10px; align-items: center;
  max-width: 92vw; white-space: nowrap; overflow: hidden; }
#np button { padding: 4px 10px; font-size: 12px; }
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--fox); font-weight: 600; z-index: 20; }

#panel { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); z-index: 30; }
.panel-card { position: relative; width: min(760px, 94vw); max-height: 86vh; overflow: auto; padding: 22px 24px;
  background: var(--glass); border: 1px solid rgba(255, 122, 26, .45); border-radius: 18px; box-shadow: 0 30px 90px #000c; }
#panel-x { position: absolute; top: 12px; right: 12px; padding: 4px 10px; background: rgba(255, 255, 255, .1); }
.panel-card h2 { margin: 0 0 4px; } .panel-card p { color: var(--dim); margin: 0 0 14px; }
.crate { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.sleeve { cursor: pointer; border-radius: 6px; overflow: hidden; background: #1b1512; transition: transform .15s; }
.sleeve:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 10px 24px #000a; }
.sleeve img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sleeve div { padding: 6px 8px; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sleeve small { display: block; color: var(--dim); font-weight: 400; }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .06); }
.item button { padding: 6px 12px; font-size: 13px; }
.onair-big { font-size: 22px; font-weight: 800; color: #ff5a5a; text-shadow: 0 0 12px #ff2a2a; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* tool buttons, side panels, lighting desk, Fox TV */
#tools { position: fixed; top: 14px; left: 16px; display: flex; gap: 8px; z-index: 10; }
#tools button { padding: 8px 14px; font-size: 14px; background: var(--glass); border: 1px solid rgba(255, 122, 26, .45); }
#tools button:hover { background: rgba(255, 122, 26, .3); }
#panel.side { background: none; pointer-events: none; place-items: center end; padding-right: 16px; }
#panel.side .panel-card { pointer-events: auto; width: min(400px, 94vw); }
.lbl { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.tg, .sc, .tab { background: rgba(255, 255, 255, .08); font-weight: 600; padding: 7px 12px; font-size: 13px; }
.tg.on, .tab.on { background: linear-gradient(135deg, var(--fox), var(--pink)); }
.sc { text-transform: none; }
.sw { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.sw.on { border-color: #fff; box-shadow: 0 0 10px #fff8; }
.sw.rb { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); font-size: 14px; }
input[type=range] { width: 100%; accent-color: var(--fox); }
.tabs { display: flex; gap: 8px; margin: 10px 0; }
#tv-form input { flex: 1; min-width: 200px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .4); color: var(--ink); font: inherit; }
.tvnow { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(122, 184, 255, .1); }
.tvnow button { padding: 6px 12px; font-size: 13px; }
#tv-status { margin: 12px 0 10px; }
.vid img { aspect-ratio: 16 / 9; background: #000; }
.keys-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.keys-t td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.keys-t td:first-child { font-weight: 700; color: #ffd0a8; width: 45%; }
#yt { position: fixed; right: 18px; bottom: 70px; width: 460px; z-index: 25; border-radius: 14px; overflow: hidden;
  background: #000; border: 1px solid rgba(255, 122, 26, .5); box-shadow: 0 20px 60px #000c; }
#yt.big { width: min(1100px, 92vw); }
#yt-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--glass); cursor: move; user-select: none; }
#yt-title { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#yt-bar button, #yt-bar a { padding: 3px 9px; font-size: 13px; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 7px; text-decoration: none; font-weight: 700; }
#yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
#tvbig { position: fixed; inset: 0; z-index: 40; background: #000e; display: grid; place-items: center; }
#tvbig-box { width: min(1400px, 96vw); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
#tvbig-box video { width: 100%; max-height: 82vh; background: #000; border-radius: 10px; }

/* Grokox inside the game: drawn off-screen onto the Fox TV wall, or full screen with "Watch big" */
#grokox-host { position: fixed; left: -4000px; top: 0; width: 1024px; height: 576px; pointer-events: none; }
#grokox-host.big { left: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: auto; }
#grokox-x { position: fixed; top: 18px; right: 18px; z-index: 41; }

/* Suno decks */
.dim { color: var(--dim); }
.queue { display: grid; gap: 6px; }
.queue .item button { padding: 3px 10px; font-size: 12px; background: rgba(255, 255, 255, .12); }
.sleeve.suno small .q { padding: 2px 8px; font-size: 11px; margin-top: 4px; }
.tiny { font-size: 12px; color: #ffb37a; }
#suno-q { flex: 1; min-width: 220px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .4); color: var(--ink); font: inherit; }

/* poster flip rack */
.poster-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.poster { background: #0d0b0a; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.poster img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.poster b { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.poster button { padding: 6px 10px; font-size: 13px; }
.owned { text-align: center; color: #7dffb0; font-weight: 700; font-size: 13px; }
.owned-row { display: flex; flex-wrap: wrap; gap: 6px; }
.owned-row img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; }
.ghostbtn { background: rgba(255, 255, 255, .1); }

/* the wall player (Suno / YouTube on the Fox TV screen) */
#wall-layer { position: fixed !important; inset: 0; pointer-events: none; z-index: 0; }   /* behind the shop */
.wall-player { width: 560px; height: 315px; background: #000; pointer-events: auto; }
.wall-player iframe { width: 100%; height: 100%; border: 0; display: block; }

body > canvas { position: relative; z-index: 1; }   /* the shop sits over the wall player; a TV-shaped window lets it show */
