/* ===========================================================
   DRONE KART theme: arcade cabinet in Nintendo colours.
   Shared by TV, sign-in, copilot and setup pages.
   Only looks live here; no game logic.
   =========================================================== */
@font-face { font-family: "DK Pixel"; src: url(/fonts/pixel.woff2) format("woff2"); font-display: swap; }
.actions.tag-heading-controls { display:grid; grid-template-columns:36px 32px minmax(52px,1fr) 32px; gap:8px; align-items:center; }
.tag-heading-controls svg { width:36px; height:36px; }
.row .tag-heading-controls input { min-width:0; width:100%; padding:8px; }
.tag-heading-controls button { padding:8px 4px; }
@font-face { font-family: "DK Round"; font-weight: 700; src: url(/fonts/nunito-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "DK Round"; font-weight: 900; src: url(/fonts/nunito-900.woff2) format("woff2"); font-display: swap; }

:root {
  --red: #ff2d4b; --blue: #2f7bff; --yellow: #ffd500; --green: #2fe06b; --white: #fff;
  --bg: #0f0a33; --panel: #231a5c; --panel2: #2e2373; --line: #4a3bb0; --text: #fff; --dim: #b4aee8;
  --gold: var(--yellow); --good: var(--green); --bad: #ff3355; --accent: var(--blue);
  --pixel: "DK Pixel", "Courier New", monospace;
  --display: "DK Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "DK Round", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { font-family: var(--body); font-weight: 700; }

/* chunky 3D keys / buttons */
kbd { font-family: var(--pixel) !important; font-size: 10px; background: #fff; color: #1a1446; border: 0 !important; border-radius: 4px !important;
  box-shadow: 0 4px 0 #8f86d8, 0 5px 0 #000; padding: 4px 8px !important; margin: 0 2px; }

/* the shared pixel-notch border: border-radius 0 + 4 shadows leaves cut corners */
.px { border-radius: 0 !important; }

/* ================= TV ================= */
body.tv {
  background:
    radial-gradient(2px 2px at 20px 30px, #fff6 50%, transparent 51%) 0 0/160px 120px,
    radial-gradient(2px 2px at 90px 80px, #ffd50066 50%, transparent 51%) 0 0/200px 150px,
    linear-gradient(180deg, #1b1066 0%, #0f0a33 55%, #0a0724 100%);
}
/* Lobby soundtrack follows the selected game's palette. */
body.tv .lobby-sound { --music-color:var(--yellow); display:flex; align-items:center; gap:14px; padding:14px 16px; margin:22px 0 26px; background:#0c0830; border-left:4px solid var(--music-color); box-shadow:0 3px 0 #0008; }
body.tv .lobby-sound[data-mode="joker"] { --music-color:#b395ff; }
body.tv .lobby-sound[data-mode="wespennest"] { --music-color:var(--green); }
body.tv .lobby-sound[data-mode="competition"] { --music-color:var(--red); }
body.tv .sound-label { display:flex; align-items:center; gap:12px; flex:none; }
body.tv .sound-label>span { font-size:24px; }
body.tv .sound-label label { font:9px var(--pixel); color:var(--music-color); text-align:left; line-height:1.6; }
body.tv .sound-label small { display:block; font:10px var(--body); letter-spacing:1px; color:var(--dim); }
body.tv .lobby-sound select { flex:1; min-width:120px; max-width:none; height:42px; padding:0 32px 0 12px; font:700 14px var(--body); color:#fff; background:#24185d; border:2px solid #514185; border-radius:0; color-scheme:dark; }
body.tv .lobby-sound select:focus-visible { outline:2px solid var(--music-color); outline-offset:3px; }
body.tv .music-repeat { flex:none; cursor:pointer; }
body.tv .music-repeat input { position:absolute; opacity:0; width:1px; height:1px; }
body.tv .music-repeat span, body.tv #lobby-play { display:block; font:10px var(--pixel); padding:13px 12px; border:2px solid #514185; background:#24185d; color:var(--dim); box-shadow:0 3px 0 #000; cursor:pointer; }
body.tv .music-repeat input:checked+span { color:var(--music-color); border-color:var(--music-color); }
body.tv .music-repeat input:focus-visible+span { outline:2px solid #fff; outline-offset:3px; }
body.tv #lobby-play { color:#130d33; background:var(--music-color); border-color:var(--music-color); min-width:100px; }
body.tv #lobby-play:disabled { opacity:.4; cursor:default; }
@media(max-width:800px) { body.tv .lobby-sound { flex-wrap:wrap; } body.tv .sound-label { width:100%; } }
body.tv header { height: 82px; background: linear-gradient(#2b1d86, #1c1366); border-bottom: 0; position: relative; padding: 0 28px; }
body.tv header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 10px; z-index: 3;
  background: radial-gradient(circle, var(--yellow) 3px, transparent 4px) 0 50%/24px 10px; animation: chase .9s steps(1) infinite; }
@keyframes chase { 0% { background-position: 0 50%; } 50% { background-position: 12px 50%; } }
body.tv .logo { font-family: var(--pixel); font-size: 22px; letter-spacing: 0; gap: 16px; color: #fff; text-shadow: 3px 3px 0 var(--blue), 6px 6px 0 #000; }
body.tv .logo b { color: var(--yellow); text-shadow: 3px 3px 0 var(--red), 6px 6px 0 #000; margin-left: 10px; }
body.tv .logo .flag { border: 3px solid #fff; border-radius: 0; box-shadow: 4px 4px 0 #000; }
body.tv .status-big { font-family: var(--pixel); font-size: 24px; text-shadow: 3px 3px 0 #000; letter-spacing: 0; }
body.tv .status-sub { font-family: var(--pixel); font-size: 10px; letter-spacing: 2px; color: var(--yellow); margin-top: 8px; }
body.tv .mini .m { font-family: var(--pixel); font-size: 10px; border: 0; border-radius: 0; background: #000a; box-shadow: 0 0 0 3px var(--pc); padding: 8px 12px; margin: 3px; }
body.tv .mini .m small { color: var(--yellow); }

body.tv #course { background: #160e4f; border-bottom: 4px solid #000; padding: 8px 28px; min-height: 70px; }
body.tv #course .lbl { font-family: var(--pixel); font-size: 10px; color: var(--yellow); }
body.tv #course .txt { font-size: 18px; font-weight: 900; }
body.tv #course .cs span { font-size: 14px; font-weight: 900; color: #fff; }
body.tv .jk { font-family: var(--pixel); font-size: 10px; border-radius: 0; border: 0; box-shadow: 0 0 0 3px var(--yellow); background: #000a; padding: 8px 12px; animation: blink 1.2s steps(1) infinite; }
body.tv .jk.used { animation: none; box-shadow: 0 0 0 3px #555; }
@keyframes blink { 50% { opacity: .55; } }

/* coin-style code chips */
body.tv .chip { border: 4px solid #fff; font-weight: 900; font-family: var(--display); color: #1a1446;
  box-shadow: 0 5px 0 rgba(0,0,0,.55), inset 0 -6px 0 rgba(0,0,0,.18), inset 0 6px 0 rgba(255,255,255,.35), 0 0 22px color-mix(in srgb, var(--gc, #333) 60%, transparent); }
body.tv .chip.empty { border: 4px dashed #6a5fd0; box-shadow: none; background: transparent; color: var(--dim); }
body.tv .chip.any { background: #3a2d99; color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.55); }
body.tv .chip.done { background: var(--green); color: #052a12; }

/* arcade monitors (tiles) */
body.tv main { padding: 18px; gap: 22px; }
body.tv .tile { border: 0; border-radius: 0; background: #0a0724; overflow: visible;
  box-shadow: 0 -5px 0 0 var(--pc), 0 5px 0 0 var(--pc), -5px 0 0 0 var(--pc), 5px 0 0 0 var(--pc), 0 0 28px color-mix(in srgb, var(--pc) 45%, transparent), 0 10px 0 5px rgba(0,0,0,.55); }
body.tv .tile.finished { --pc: var(--green) !important; }
body.tv .vid { border-right: 5px solid #000; }
body.tv .tile.dense .vid { border-right: 0; border-bottom: 5px solid #000; }
body.tv .panel { background: linear-gradient(#2a1e7d, #1b1366); position: relative; }
body.tv .panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.18) 3px 4px); }
body.tv .pname { font-family: var(--display); font-weight: 900; font-size: 26px; text-shadow: 2px 2px 0 #000; }
body.tv .pname i { border-radius: 0; width: 12px; box-shadow: 3px 3px 0 #000; }
body.tv .pts { font-family: var(--pixel); font-size: 9px; letter-spacing: 1px; color: var(--dim); }
body.tv .pts b { font-family: var(--pixel); font-size: 16px; color: var(--yellow); text-shadow: 2px 2px 0 #000; }
body.tv .lap { font-family: var(--pixel); font-size: 9px; border-radius: 0; background: var(--red); border: 0; color: #fff; padding: 4px 8px; box-shadow: 3px 3px 0 #000; }
body.tv .gblock .t { font-family: var(--pixel); font-size: 8px; color: var(--yellow); width: 62px; letter-spacing: 0; }
body.tv .gblock .n { font-weight: 900; font-size: 20px; text-shadow: 2px 2px 0 #000; }
body.tv .gblock .n small { font-family: var(--pixel); font-size: 7px; letter-spacing: 0; color: var(--dim); margin-top: 4px; }
body.tv .pip { border-radius: 0; width: 16px; height: 16px; background: #000; opacity: 1; border: 3px solid #5a4fc4; }
body.tv .pip.done { background: var(--green); border-color: #0b6b2b; }
body.tv .pip.cur { background: var(--yellow); border-color: #fff; animation: blink .8s steps(1) infinite; }
body.tv .rank { font-family: var(--pixel); font-size: 18px; border-radius: 0; padding: 8px 12px; color: #1a1446; box-shadow: 4px 4px 0 #000; }
body.tv .ptimer { font-family: var(--pixel); font-size: 17px; border-radius: 0; background: #000c; padding: 8px 10px; color: var(--yellow); }
body.tv .ptimer.done { color: var(--green); }
body.tv .toast { font-family: var(--pixel); font-size: 26px; border-radius: 0; padding: 14px 22px; box-shadow: 6px 6px 0 #000; border: 4px solid #fff; }
body.tv .toast.joker { background: var(--yellow); color: #1a1446; }
body.tv .nosig { font-family: var(--pixel); font-size: 16px; letter-spacing: 0; background: repeating-linear-gradient(135deg, #0a0724 0 14px, #120c3d 14px 28px); }
body.tv .nosig small { font-family: var(--body); font-weight: 700; }
body.tv .blackout .bt { font-family: var(--pixel); font-size: 20px; }
body.tv .blackout .bs { font-family: var(--pixel); font-size: 56px; color: var(--yellow); }
body.tv .hintarrow div { font-family: var(--pixel); border-radius: 0; border: 5px solid #fff; background: #000b; text-shadow: 4px 4px 0 var(--red); }
body.tv .hintarrow small { font-family: var(--pixel); font-size: 18px; letter-spacing: 3px; }

/* overlays = arcade menu screens */
body.tv .ov .card { background: #170f55; border: 0; border-radius: 0; padding: 30px 42px;
  box-shadow: 0 -6px 0 0 var(--yellow), 0 6px 0 0 var(--yellow), -6px 0 0 0 var(--yellow), 6px 0 0 0 var(--yellow), 0 0 0 12px #000, 0 20px 80px rgba(0,0,0,.8); }
body.tv .ov h2 { font-family: var(--pixel); font-size: 26px; font-weight: 400; letter-spacing: 0; line-height: 1.4; text-shadow: 3px 3px 0 var(--blue), 6px 6px 0 #000; }
body.tv .ov h2 b { color: var(--yellow); text-shadow: 3px 3px 0 var(--red), 6px 6px 0 #000; }
body.tv .ov .sub { font-family: var(--pixel); font-size: 10px; letter-spacing: 2px; color: var(--yellow); margin: 12px 0 24px; }
body.tv .ov .hint { font-family: var(--pixel); font-size: 10px; line-height: 2; color: var(--dim); }
body.tv #ov-lobby { background: rgba(10, 6, 40, .72); }
body.tv #ov-lobby .hint { animation: blink 1.4s steps(1) infinite; }
body.tv .modes { gap: 18px; }
body.tv .mode { border: 0; border-radius: 0; background: #241a73; padding: 18px 16px; position: relative;
  box-shadow: 0 -4px 0 0 #5a4fc4, 0 4px 0 0 #5a4fc4, -4px 0 0 0 #5a4fc4, 4px 0 0 0 #5a4fc4, 0 8px 0 4px #000; transition: transform .1s steps(2); }
body.tv .mode.sel { background: #3a2aa6; transform: translateY(-8px);
  box-shadow: 0 -4px 0 0 var(--yellow), 0 4px 0 0 var(--yellow), -4px 0 0 0 var(--yellow), 4px 0 0 0 var(--yellow), 0 12px 0 4px #000, 0 0 30px rgba(255,213,0,.4); }
body.tv .mode.sel::before { content: "▶"; position: absolute; left: 8px; top: 8px; font-family: var(--pixel); font-size: 14px; color: var(--yellow); animation: blink .8s steps(1) infinite; }
body.tv .mode .ic { font-size: 46px; text-shadow: 3px 3px 0 #000; }
body.tv .mode .tt { font-family: var(--pixel); font-size: 12px; line-height: 1.5; margin: 10px 0; color: #fff; text-shadow: 2px 2px 0 #000; }
body.tv .mode.sel .tt { color: var(--yellow); }
body.tv .mode .bl { font-size: 14px; font-weight: 700; color: #cfc9ff; }
body.tv .mode .us { font-family: var(--pixel); font-size: 8px; line-height: 1.6; color: var(--green); letter-spacing: 0; }
body.tv .roster .r { border: 0; border-radius: 0; background: #241a73; box-shadow: -8px 0 0 0 var(--pc), 0 4px 0 #000; margin-left: 8px; }
body.tv .roster .r .nm { font-family: var(--display); font-weight: 900; font-size: 24px; }
body.tv .roster .r .st { font-family: var(--pixel); font-size: 9px; }
body.tv .roster .r .no { font-family: var(--pixel); font-size: 11px; color: var(--yellow); }
body.tv .joinbox { border: 0; border-radius: 0; background: #241a73; box-shadow: 0 0 0 4px var(--blue), 0 8px 0 4px #000; }
body.tv .joinbox b { font-family: var(--pixel); font-size: 11px; line-height: 1.6; color: var(--yellow); }
body.tv .joinbox img { border-radius: 0; }
body.tv .note { font-weight: 700; }

body.tv table.res td { background: #241a73; font-weight: 900; }
body.tv table.res td:first-child { border-radius: 0; font-family: var(--pixel); font-size: 18px; color: var(--yellow); border-left-width: 10px; }
body.tv table.res td:last-child { border-radius: 0; }
body.tv table.res th { font-family: var(--pixel); font-size: 8px; letter-spacing: 0; color: var(--yellow); }
body.tv table.res .nm { font-family: var(--display); font-weight: 900; font-size: 24px; }
body.tv .podium .bar { font-family: var(--pixel); border-radius: 0; box-shadow: 0 0 0 4px #000; font-size: 44px; color: #1a1446; }
body.tv .podium .who { font-family: var(--display); font-weight: 900; }
body.tv .champ { font-family: var(--pixel); font-size: 34px; text-shadow: 4px 4px 0 var(--red), 8px 8px 0 #000; }
body.tv #count-num { font-family: var(--pixel); font-size: 26vh; color: var(--yellow); text-shadow: 10px 10px 0 var(--red), 20px 20px 0 #000; }
body.tv #count-num.go { color: var(--green); text-shadow: 10px 10px 0 #0b6b2b, 20px 20px 0 #000; }
body.tv .bgrp { border: 0; border-radius: 0; background: #241a73; box-shadow: 0 0 0 3px #5a4fc4; }
body.tv .bgrp.cur { box-shadow: 0 0 0 3px var(--yellow), 0 0 18px rgba(255,213,0,.5); animation: blink 1s steps(1) infinite; }
body.tv .pyr .plabel { font-family: var(--pixel); font-size: 8px; color: var(--yellow); letter-spacing: 0; }
body.tv .pyr .cbox { font-family: var(--pixel); font-size: 22px; }
body.tv #msg { font-family: var(--pixel); font-size: 12px; border-radius: 0; box-shadow: 4px 4px 0 #000; }

/* footer: sponsor/brand bar */
#brandbar { flex: none; height: 44px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: #0a0724; border-top: 4px solid #000; position: relative; z-index: 2; }
#brandbar .by { font-family: var(--pixel); font-size: 8px; color: var(--dim); }
#brandbar .logo-slot { display: flex; align-items: center; height: 100%; }
#brandbar img { max-height: 28px; max-width: 160px; display: block; }
#brandbar .wm { font-family: var(--pixel); font-size: 10px; color: #fff; display: none; }
#brandbar .x { color: var(--yellow); font-family: var(--pixel); font-size: 10px; }
#brandbar .spacer { flex: 1; }
#brandbar #soundhint { position: static; opacity: 1; font-family: var(--pixel); font-size: 8px; color: var(--dim); }
#brandbar #mute { font-family: var(--pixel); font-size: 9px; background: #fff; color: #1a1446; border: 0; padding: 6px 10px; cursor: pointer; box-shadow: 0 3px 0 #8f86d8, 0 4px 0 #000; }
.brand-lg { display:flex; gap: 22px; align-items:center; justify-content:center; margin-top: 18px; }
.brand-lg img { max-height: 44px; max-width: 220px; }
.brand-lg .wm { font-family: var(--pixel); font-size: 11px; color: #fff; display: none; }

/* ================= PHONES (join + copilot) ================= */
body.phone { background:
    radial-gradient(2px 2px at 20px 30px, #fff5 50%, transparent 51%) 0 0/140px 110px,
    linear-gradient(180deg, #1b1066, #0f0a33); color: #fff; }
body.phone h1 { font-family: var(--pixel); font-size: 20px; line-height: 1.5; text-shadow: 3px 3px 0 var(--blue), 5px 5px 0 #000; }
body.phone h1 b { color: var(--yellow); text-shadow: 3px 3px 0 var(--red), 5px 5px 0 #000; }
body.phone p { color: var(--dim); }
body.phone label { font-family: var(--pixel); font-size: 10px; color: var(--yellow); line-height: 1.6; }
body.phone input { border: 0 !important; border-radius: 0 !important; background: #0a0724 !important; color: #fff !important; font-family: var(--display); font-weight: 900;
  box-shadow: 0 0 0 4px #5a4fc4; }
body.phone input:focus { outline: 0; box-shadow: 0 0 0 4px var(--yellow); }
body.phone button#go { border-radius: 0; background: var(--green); color: #052a12; font-family: var(--pixel); font-size: 14px; box-shadow: 0 6px 0 #0b6b2b, 0 7px 0 #000; }
body.phone button#go:active { transform: translateY(4px); box-shadow: 0 2px 0 #0b6b2b, 0 3px 0 #000; }
body.phone .box { border: 0; border-radius: 0; background: #241a73; box-shadow: 0 0 0 4px #5a4fc4; }
body.phone .box h2 { font-family: var(--pixel); font-size: 9px; letter-spacing: 0; color: var(--yellow); }
body.phone .brandline { display:flex; gap: 16px; align-items:center; justify-content:center; margin-top: 26px; opacity: .95; }
body.phone .brandline img { max-height: 30px; max-width: 120px; }
body.phone .brandline .wm { font-family: var(--pixel); font-size: 9px; display: none; }
/* copilot */
body.phone header { background: #2b1d86; border-bottom: 4px solid #000; }
body.phone header b { font-family: var(--display); font-weight: 900; font-size: 20px; text-shadow: 2px 2px 0 #000; }
body.phone #status { font-family: var(--pixel); font-size: 10px; color: var(--yellow); line-height: 1.6; }
body.phone svg { border: 0 !important; border-radius: 0 !important; box-shadow: 0 0 0 4px var(--blue), 0 8px 0 4px #000; background: #0a0724; }
body.phone .pad button { border: 0; border-radius: 0; background: #3a2aa6; color: #fff; font-family: var(--pixel); font-size: 24px;
  box-shadow: 0 6px 0 #1b1370, 0 7px 0 #000; }
body.phone .pad button small { font-family: var(--pixel); font-size: 8px; letter-spacing: 0; color: var(--yellow); margin-top: 6px; }
body.phone .pad button:active { transform: translateY(5px); box-shadow: 0 1px 0 #1b1370, 0 2px 0 #000; background: var(--yellow); color: #1a1446; }
body.phone .pad button:disabled { opacity: .3; }

/* ================= SETUP (admin) keeps its layout, gets the colours + chunky buttons ================= */
body.admin { background: var(--bg); }
body.admin h1 { font-family: var(--pixel); font-size: 20px; text-shadow: 3px 3px 0 var(--blue), 5px 5px 0 #000; }
body.admin h1 b { color: var(--yellow); text-shadow: 3px 3px 0 var(--red), 5px 5px 0 #000; }
body.admin section { border-radius: 0; border: 0; box-shadow: 0 0 0 3px #5a4fc4; background: #1b1370; }
body.admin h2 { font-family: var(--pixel); font-size: 10px; letter-spacing: 1px; color: var(--yellow); }
body.admin button, body.admin .button-link { border-radius: 0; border: 0; font-family: var(--display); font-weight: 900; box-shadow: 0 4px 0 #000; background: #3a2aa6; }
body.admin .button-link { display:inline-flex; align-items:center; padding:10px 18px; color:var(--text); font-size:14px; text-decoration:none; margin:0; }
body.admin nav { display:flex; gap:10px; flex-wrap:wrap; }
body.admin .button-link:active { transform:translateY(3px); box-shadow:0 1px 0 #000; }
body.admin .button-link:hover { background:#5a49e0; }
body.admin input[type=file]::file-selector-button { border:0; border-radius:0; padding:10px 18px; font:900 14px var(--display); background:#3a2aa6; color:var(--text); box-shadow:0 4px 0 #000; cursor:pointer; margin-right:10px; }
body.admin.control details { margin:12px 0; }
body.admin.control .record-table { overflow:auto; }
body.admin.control .room-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; }
body.admin.control .room-tile { text-align:left; padding:14px; }
body.admin.control .room-tile small { display:block; color:var(--dim); margin:8px 0; }
body.admin.control [data-gallery-tag] b { display:block; margin-top:8px; }
body.admin.control .room-icons { display:flex; gap:6px; }
@media(max-width:600px) { body.admin.control .row { grid-template-columns:1fr; } }
body.admin button.primary { background: var(--blue); }
body.admin button.danger { color: #fff; background: #b3173a; }
body.admin button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
body.admin .modebtn.sel { background: #5a49e0; box-shadow: 0 4px 0 #000, 0 0 0 3px var(--yellow); }
body.admin input[type=text], body.admin input[type=number], body.admin select { border-radius: 0; background: #0a0724; border: 0; box-shadow: 0 0 0 2px #5a4fc4; }
body.admin .pill { border-radius: 0; font-family: var(--pixel); font-size: 10px; }

/* ---- fixes ---- */
html { background: #0f0a33; }
body.phone { min-height: 100vh; background-attachment: fixed; }
body.tv #ov-cup .podium { height: 300px; }
body.tv .blackout .bt { margin-bottom: 18px; }
body.tv .blackout .bs { line-height: 1.2; }
body.tv #ov-round .card, body.tv #ov-cup .card, body.tv #ov-draw .card {
  box-shadow: 0 -4px 0 0 var(--yellow), 0 4px 0 0 var(--yellow), -4px 0 0 0 var(--yellow), 4px 0 0 0 var(--yellow), 0 0 0 8px #000, 0 10px 40px rgba(0,0,0,.7); }
