:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  color: #f2f4f7;
  background: #101216;
  --accent: #d6fb64;
  --muted: #adb2bd;
  --border: #343943;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
header { min-height: 70px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 12px max(24px, calc((100vw - 1000px) / 2)); }
.brand { color: inherit; text-decoration: none; font-size: 1rem; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.brand span, .label { color: var(--accent); }
a { color: var(--accent); }
#screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.screen-card { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; overflow-wrap: anywhere; }
.screen-stage { position: relative; background: #000; }
.screen-stage img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.screen-stage span { position: absolute; inset: 10px auto auto 10px; background: #101216de; color: white; border-radius: 6px; padding: 6px 10px; pointer-events: none; }
.screen-stage:fullscreen img { width: 100%; height: 100%; }
#new-team { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 16px; }
main { max-width: 1048px; padding: 32px 24px; margin: auto; }
.card { background: #191c23; border: 1px solid var(--border); border-radius: 18px; padding: clamp(20px, 4vw, 36px); margin-bottom: 18px; }
.narrow { max-width: 480px; margin: 28px auto; }
.hero { text-align: center; background: radial-gradient(ellipse at 50% 0, #283323, #191c23 75%); padding-block: clamp(32px, 8vw, 74px); }
.label { font-size: .875rem; font-weight: 750; margin: 0 0 12px; }
h1 { font-size: clamp(2.25rem, 7vw, 4.4rem); line-height: 1.05; letter-spacing: -.045em; margin: 0 0 18px; }
h2 { font-size: 1.35rem; margin: 0; }
.muted { color: var(--muted); }
p { line-height: 1.55; }
form, label { display: grid; gap: 8px; }
form { gap: 18px; }
input, select { min-width: 0; width: 100%; padding: 11px 12px; background: #11141a; color: inherit; border: 1px solid var(--border); border-radius: 9px; font: inherit; }
select { width: auto; max-width: 100%; }
button { cursor: pointer; font: inherit; font-weight: 780; color: #182108; background: var(--accent); border: 1px solid transparent; border-radius: 9px; padding: 11px 16px; }
button:hover { filter: brightness(1.12); }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { background: #232831; color: #f2f4f7; border-color: var(--border); }
.hero button { margin-top: 12px; padding: 14px 34px; }
.section-head, .actions, .player { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.section-head { justify-content: space-between; margin-bottom: 20px; }
.invite-grid { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; }
#qr-box:has(img[hidden]) { display: none; }
#qr-box img { display: block; border-radius: 9px; max-width: 100%; height: auto; }
.code { color: var(--accent); font: 800 clamp(1.8rem, 6vw, 3rem) ui-monospace, monospace; margin: 0 0 16px; }
#share-link { margin-top: 12px; }
.player { padding: 12px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.player .actions { margin-inline-start: auto; }
#message, #player-state { background: #262d1c; border-radius: 9px; padding: 12px 16px; }
@media (max-width: 560px) {
  main { padding: 20px 14px; }
  .invite-grid { grid-template-columns: 1fr; }
  .player .actions { margin-inline-start: 0; width: 100%; }
}
