:root {
  color-scheme: dark;
  font: 16px/1.5 "Cascadia Mono", Consolas, monospace;
  color: var(--pixel-ink);
  background: var(--pixel-base);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background-image: var(--pixel-grid); background-size: 32px 32px; }
h1, h2, p { margin: 0; }
a { color: var(--pixel-lime); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--pixel-lime); outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--pixel-lime); font-size: .85rem; }
.intro { padding: clamp(24px, 5vw, 56px) 0 24px; }
h1 { font: 700 clamp(2.5rem, 9vw, 6.25rem)/1 var(--pixel-display); letter-spacing: -.08em; }
h1 span { color: var(--pixel-lime); }
h2 { font: 700 1rem/1.4 var(--pixel-display); }
.intro p, .muted { color: var(--pixel-muted); }
.intro p, .muted { text-shadow: var(--pixel-copy-shadow); }
.intro p { margin-top: 12px; }
.panel { background: #1c211b; border: 1px solid var(--pixel-line); padding: 18px; }
.login { display: grid; max-width: 430px; gap: 12px; }
.login label { display: grid; gap: 5px; }
input:not([type="radio"]) { width: 100%; min-width: 0; border: 1px solid var(--pixel-line); border-radius: 0; background: #151714; color: var(--pixel-ink); padding: 9px; }
input[type="radio"] { accent-color: var(--pixel-lime); width: 18px; height: 18px; flex: none; }
.teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team { margin: 0; min-width: 0; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--pixel-line); background: #181d18; }
.team legend, .team h2 { padding: 0 6px; color: var(--team); }
.team { --team: #75e9d0; }
.team + .team { --team: #ff8290; }
.player { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--pixel-line); background: #212720; }
.player img { width: 43px; height: 43px; object-fit: contain; flex: none; }
.nick-input { font-size: .87rem; }
.agent-choice, .agent-grid button {
  display: grid;
  place-items: center;
  border: 1px solid var(--pixel-line);
  color: var(--pixel-muted);
  background: #151914;
}
.agent-choice { width: 50px; height: 50px; flex: none; padding: 3px; }
.agent-choice:hover, .agent-grid button:hover, .agent-grid button[aria-pressed="true"] {
  border-color: var(--pixel-lime);
  background: #273924;
}
#cheater-agent-picker {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 1px solid var(--pixel-lime);
  background: var(--pixel-panel);
  color: var(--pixel-ink);
}
#cheater-agent-picker::backdrop { background: #0e110de0; }
#cheater-agent-picker header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 8px; }
.agent-grid button { aspect-ratio: 1; min-width: 0; padding: 4px; }
.agent-grid img { width: 100%; max-height: 100%; object-fit: contain; }
.player.vote { width: 100%; text-align: left; color: inherit; }
.player.vote:hover:not(:disabled), .player.selected { border-color: var(--pixel-lime); background: #2b3928; }
.player.vote:disabled { cursor: default; }
.player.answer { border-color: var(--pixel-lime); }
.name { display: block; font-weight: 700; overflow-wrap: anywhere; }
.agent, .result { display: block; color: var(--pixel-muted); font-size: .8rem; }
.player-copy { flex: 1; min-width: 0; }
.votes { flex: none; font-size: .82rem; text-align: right; }
.answer .votes { color: var(--pixel-lime); }
meter { width: 100%; height: 8px; accent-color: var(--pixel-lime); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.action { border: 1px solid var(--pixel-lime); color: #141712; background: var(--pixel-lime); padding: 10px 15px; font-weight: 700; }
.action:hover:not(:disabled) { background: #d3ffac; }
.action:disabled { opacity: .48; cursor: default; }
.action.secondary { color: var(--pixel-lime); background: #171d16; }
.actions a { margin-left: auto; }
#status { border-left: 3px solid var(--pixel-lime); background: #242d20; padding: 9px 13px; margin: 0 0 14px; }
#status.error { border-color: #ff8290; }
.share { display: grid; gap: 10px; margin-bottom: 20px; }
.share summary { cursor: pointer; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; margin-top: 10px; }
.links button { text-align: left; overflow-wrap: anywhere; }
.ballots { margin: 18px 0; }
.ballots ul { margin: 10px 0 0; padding-left: 20px; }
main { padding-bottom: 40px; }
@media (max-width: 720px) { .teams { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .player { gap: 6px; } }
