/* ============================================================
   SCAMPER - pastel, minimal, square. Matches the look of the maps:
   clean light surfaces, flat pastel colors, thin ink outlines, no rounding.
   ============================================================ */
:root {
  --ink: #1f2433;
  --muted: #6b7489;
  --bg: #e8edf2;
  --panel: #ffffff;
  --panel-2: #f3f5f8;
  --line: #d6dce6;
  --line-2: #b4bdcc;
  --blue: #8fb4ff;
  --pink: #ff8fa3;
  --yellow: #ffd166;
  --mint: #7ed6c8;
  --lilac: #c3a6ff;
  --red: #ff6b6b;
  --shadow: 4px 4px 0 rgba(31, 36, 51, 0.16);
}

* { box-sizing: border-box; border-radius: 0 !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: Rubik, system-ui, sans-serif; }
canvas { display: block; }
button { font-family: inherit; }
.hidden { display: none !important; }
.note { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ================= menu shell ================= */
.screen { position: fixed; inset: 0; z-index: 20; }
.screen.center { display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(232, 237, 242, 0.75); }
.shell { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; background: linear-gradient(90deg, rgba(232, 237, 242, 0.3), rgba(232, 237, 242, 0.72)); }
.shell.pause { background: rgba(232, 237, 242, 0.62); backdrop-filter: blur(4px); }

.side { display: flex; flex-direction: column; padding: 32px 24px 22px; background: var(--panel); border-right: 2px solid var(--ink); overflow-y: auto; }
.brand { margin-bottom: 30px; }
.logo {
  display: inline-block; margin: 0; white-space: nowrap;
  font-family: Bungee, Impact, sans-serif; font-weight: 400; font-size: 42px; line-height: 1; letter-spacing: 1px;
  color: var(--ink); text-shadow: 3px 3px 0 var(--yellow), 6px 6px 0 var(--pink);
}
.tagline { margin: 14px 0 0; color: var(--muted); font-weight: 500; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px;
  background: none; border: 2px solid transparent; color: var(--muted); font-size: 17px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.nav-btn:hover { background: var(--panel-2); color: var(--ink); }
.nav-btn.active { background: var(--panel-2); color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow); }
.nav-btn.active::before { content: ''; position: absolute; left: -2px; top: -2px; bottom: -2px; width: 7px; background: var(--blue); }
.nav-num { font-size: 12px; font-weight: 700; color: var(--line-2); font-variant-numeric: tabular-nums; }
.nav-btn.active .nav-num { color: var(--ink); }
.nav-btn.resume { background: var(--yellow); color: var(--ink); font-weight: 800; justify-content: center; margin-bottom: 10px; border-color: var(--ink); box-shadow: var(--shadow); }
.nav-btn.resume:hover { filter: brightness(1.04); }
.nav-btn.danger { margin-top: 10px; }
.nav-btn.danger:hover { color: var(--red); }
.side-foot { margin-top: auto; padding-top: 24px; font-size: 12px; color: var(--muted); }

.content { overflow-y: auto; padding: 32px clamp(16px, 4vw, 52px); }
.view { max-width: 660px; animation: viewIn 0.15s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }
.view-head { margin-bottom: 20px; }
.view-head h2 { margin: 0; display: inline-block; font-family: Bungee, Impact, sans-serif; font-weight: 400; font-size: 28px; padding: 2px 12px; background: var(--panel); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.view-head p { margin: 12px 0 0; color: var(--muted); }

.tile { background: var(--panel); border: 2px solid var(--ink); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.tile h3 { margin: 6px 0 6px; font-size: 20px; }
.tile p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; font-size: 15px; }
.tile-kicker { display: inline-block; padding: 3px 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); background: var(--mint); }

.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.howto .tile { margin: 0; }
.howto .wide { grid-column: 1 / -1; }
.tips { margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.6; }
.tips li { margin-bottom: 6px; }
.tips b { color: var(--ink); font-weight: 700; }

/* ================= form controls ================= */
.field { display: block; margin-bottom: 16px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.field input:not([type=range]):not([type=color]), .field select {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; background: var(--panel-2); border: 2px solid var(--line-2);
  color: var(--ink); font: 600 16px Rubik, system-ui, sans-serif; text-transform: none; letter-spacing: 0; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--ink); background: #fff; }
.field.range span { float: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.field input[type=range] { width: 100%; margin: 12px 0 0; accent-color: var(--ink); }

.btn {
  display: block; width: 100%; padding: 13px 16px; border: 2px solid var(--ink); background: var(--panel); color: var(--ink);
  font: 700 16px Rubik, system-ui, sans-serif; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.08s, box-shadow 0.08s, filter 0.12s;
}
.btn:hover { filter: brightness(0.98); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(31, 36, 51, 0.16); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.primary { background: var(--yellow); font-weight: 800; }
.btn.hot { background: var(--pink); font-weight: 800; }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; }
.big-btn { margin-top: auto; padding: 16px; font-size: 18px; }
.host-card h3 { margin-bottom: 18px; }
#menuStatus { min-height: 22px; margin-top: 12px; font-weight: 600; color: var(--muted); }
#menuStatus.bad { color: var(--red); }

.toggles { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.toggle { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 42px; height: 24px; flex: none; border: 2px solid var(--ink); background: var(--panel-2); }
.toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--line-2); transition: transform 0.12s, background 0.12s; }
.toggle input:checked + span { background: var(--mint); }
.toggle input:checked + span::after { transform: translateX(18px); background: var(--ink); }
.toggle input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.binds { width: 100%; border-collapse: collapse; }
.binds td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.binds td:first-child { font-weight: 600; }
.binds td:last-child { text-align: right; white-space: nowrap; }
.bind { min-width: 96px; margin-left: 8px; padding: 7px 12px; background: var(--panel-2); border: 2px solid var(--line-2); border-bottom-width: 4px; color: var(--ink); font: 700 14px Rubik, sans-serif; cursor: pointer; }
.bind:hover { border-color: var(--ink); }
.bind.empty { color: var(--muted); }
.bind.listening { background: var(--yellow); border-color: var(--ink); animation: blink 0.8s infinite alternate; }
@keyframes blink { to { opacity: 0.6; } }
.binds-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

.chip-btn { padding: 7px 12px; background: var(--panel); border: 2px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.chip-btn:hover { background: var(--yellow); }

/* ================= play page ================= */
.view.play-view { max-width: none; min-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.play-layout { flex: 1; display: grid; grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr); gap: 20px; min-height: 0; }
.char-card { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.char-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.char-hint { font-size: 12px; color: var(--muted); }
.stage { position: relative; flex: 1; min-height: 240px; margin-bottom: 16px; border: 2px solid var(--ink); overflow: hidden;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 64%, #dfe6ee 64%, #e8eef4 100%); }
.stage::after { content: ''; position: absolute; left: 0; right: 0; top: 64%; height: 2px; background: var(--line); }
.stage-floor { position: absolute; left: 32%; right: 32%; bottom: 10%; height: 12px; background: rgba(31, 36, 51, 0.14); filter: blur(4px); }
.stage #preview { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; z-index: 1; }
.stage #preview:active { cursor: grabbing; }
.char-card .field { margin-bottom: 12px; }
.pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.picker { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; border: 2px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.picker:hover { border-color: var(--ink); }
.picker-chip { width: 38px; height: 38px; flex: none; border: 2px solid var(--ink); }
.picker-text { display: flex; flex-direction: column; line-height: 1.15; }
.picker-text b { font-size: 15px; }
.picker-text small { font-size: 11px; color: var(--muted); }
.picker input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 26px; height: 26px; padding: 0; border: 2px solid var(--line-2); cursor: pointer; }
.swatch:hover { border-color: var(--ink); }
.swatch.on { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }

.play-actions { display: grid; grid-template-rows: auto 1fr; gap: 20px; min-height: 0; }
.action { margin: 0; display: flex; flex-direction: column; }
.action h3 { font-size: clamp(22px, 2.3vw, 28px); margin: 8px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips span { padding: 4px 10px; border: 2px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--muted); }
.host-card .tile-kicker { background: var(--yellow); }
.join-card .tile-kicker { background: var(--blue); }
.join-head { display: flex; justify-content: space-between; align-items: center; }
.join-hint { margin: -2px 0 14px !important; font-size: 14px !important; }
.join-hint b { color: var(--ink); letter-spacing: 0.08em; }
.code-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 16px; }
.code-boxes input {
  width: 100%; min-width: 0; height: clamp(62px, 9vh, 88px); text-align: center; text-transform: uppercase;
  font: 400 clamp(28px, 3.4vw, 42px) Bungee, Impact, sans-serif; color: var(--ink); caret-color: transparent;
  background: var(--panel-2); border: 2px solid var(--line-2); border-bottom-width: 6px; outline: none; transition: border-color 0.12s, background 0.12s;
}
.code-boxes input::placeholder { color: var(--line-2); }
.code-boxes input:focus { border-color: var(--blue); background: #fff; }
.code-boxes input.filled { border-color: var(--ink); background: #fff; }
.code-boxes.bad input { border-color: var(--red) !important; color: var(--red) !important; background: #fff0f0 !important; }
.code-boxes.bad { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
#joinBtn.ready { background: var(--blue); font-weight: 800; }

/* ================= pause / lobby ================= */
.pause-title { font-family: Bungee, Impact, sans-serif; font-size: 34px; color: var(--ink); text-shadow: 3px 3px 0 var(--yellow); }
.code-chip { display: block; margin-top: 16px; padding: 12px; background: var(--panel-2); border: 2px solid var(--ink); }
.code-chip > span { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.code-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.code-tiles i { font-style: normal; display: grid; place-items: center; height: 46px; font-family: Bungee, Impact, sans-serif; font-size: 25px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-bottom-width: 5px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-row .chip-btn { flex: 1; }

.view[data-view="lobby"] { max-width: 900px; }
.lobby-grid { display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: start; }
.lobby-grid .tile { margin: 0; }
.setup { padding: 16px 18px; }
.setup-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.setup-step { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.step-num { display: inline-grid; place-items: center; width: 20px; height: 20px; background: var(--ink); color: #fff; font-size: 11px; }
.map-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.map-card, .mode-card { position: relative; text-align: left; cursor: pointer; padding: 0; overflow: hidden; background: var(--panel); border: 2px solid var(--line-2); color: var(--ink); font-family: inherit; transition: transform 0.1s, border-color 0.1s; }
.map-card:hover:not(:disabled), .mode-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--ink); }
.map-card.on, .mode-card.on { border-color: var(--ink); box-shadow: var(--shadow); }
.map-card.on::after, .mode-card.on::after { content: '\2713'; position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 12px; }
.map-card:disabled, .mode-card:disabled { cursor: default; }
.locked .map-card:not(.on), .locked .mode-card:not(.on), .locked .pill:not(.on) { opacity: 0.45; }
.map-thumb { height: 34px; border-bottom: 2px solid var(--line-2); }
.map-card.on .map-thumb { border-bottom-color: var(--ink); }
.map-body { padding: 6px 9px 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.map-name { font-weight: 800; font-size: 13px; line-height: 1.15; }
.env-badge { flex: none; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 5px; background: var(--panel-2); color: var(--muted); }
.map-pick-blurb { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-card { padding: 9px 11px; }
.mode-card b { display: block; font-size: 14px; margin-bottom: 2px; }
.mode-card span { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.mode-card .warn { color: var(--red); margin-top: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 7px 14px; cursor: pointer; font: 700 13px Rubik, sans-serif; color: var(--ink); background: var(--panel); border: 2px solid var(--line-2); }
.pill:hover:not(:disabled) { border-color: var(--ink); }
.pill.on { background: var(--yellow); border-color: var(--ink); }
.pill:disabled { cursor: default; }
.duel-pills { display: grid; gap: 8px; }
.pill-row { display: flex; align-items: center; gap: 10px; }
.pill-row > span { width: 78px; font-size: 12px; color: var(--muted); font-weight: 600; }
.start-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.start-summary { flex: 1; font-weight: 600; font-size: 14px; color: var(--muted); }
.start-summary b { color: var(--ink); }
#hostControls { display: contents; }
#hostControls .big-btn { margin: 0; width: auto; min-width: 210px; padding: 13px 18px; font-size: 16px; }

.player-list { list-style: none; margin: 10px 0 0; padding: 0; }
.player-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.player-list li:last-child { border-bottom: 0; }
.player-list .tag { margin-left: auto; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; background: var(--panel-2); color: var(--muted); }
.player-list .tag.it { background: var(--pink); color: var(--ink); }
.player-list .you { color: var(--muted); font-weight: 400; }
.dot { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ink); margin-right: 4px; flex: none; }
.dialog { width: min(420px, 100%); text-align: center; }
.dialog h2 { margin: 0 0 8px; font-family: Bungee, Impact, sans-serif; font-weight: 400; }

@media (max-width: 900px) { .lobby-grid { grid-template-columns: 1fr; } .map-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .side { padding: 20px 16px 12px; border-right: 0; border-bottom: 2px solid var(--ink); overflow: visible; }
  .brand { margin-bottom: 14px; }
  .logo { font-size: 32px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-btn { width: auto; font-size: 15px; padding: 9px 12px; }
  .nav-num, .side-foot { display: none; }
  .content { padding: 20px 16px; overflow: visible; }
  .howto, .mode-cards { grid-template-columns: 1fr; }
  .view.play-view { min-height: 0; }
  .play-layout, .play-actions { grid-template-columns: 1fr; grid-template-rows: auto; }
  .stage { flex: none; height: 240px; }
  .start-row { flex-direction: column; align-items: stretch; }
}

/* ================= HUD ================= */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#topbar { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#codeBadge, #phaseBox, #roleBadge { background: rgba(255, 255, 255, 0.95); border: 2px solid var(--ink); padding: 7px 14px; box-shadow: var(--shadow); color: var(--ink); }
#codeBadge { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 0.12em; }
#codeBadge b { display: block; font-family: Bungee, Impact, sans-serif; font-weight: 400; font-size: 21px; color: var(--ink); letter-spacing: 0.14em; }
#phaseBox { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; min-width: 170px; }
#phaseText { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 0.12em; }
#timerText { font-family: Bungee, Impact, sans-serif; font-size: 26px; }
#timerText.urgent { color: var(--red); animation: pulse 0.45s infinite alternate; }
#roleBadge { margin-left: auto; font-family: Bungee, Impact, sans-serif; font-size: 18px; }
#roleBadge.it { background: var(--pink); animation: pulse 0.9s infinite alternate; }
#roleBadge.runner { background: var(--mint); }
@keyframes pulse { to { transform: scale(1.05); } }

#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; outline: 1.5px solid var(--ink); }

#banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(0.92); text-align: center; opacity: 0; transition: opacity 0.18s, transform 0.18s; width: min(560px, calc(100% - 32px)); font-weight: 700; font-size: 16px; color: var(--ink); }
#banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#banner > div:not(.big):not(.results) { display: inline-block; margin-top: 8px; padding: 5px 12px; background: rgba(255, 255, 255, 0.95); border: 2px solid var(--ink); }
#banner .big { display: inline-block; padding: 4px 18px; font-family: Bungee, Impact, sans-serif; font-weight: 400; font-size: clamp(32px, 7vw, 58px); line-height: 1.1; background: #fff; border: 3px solid var(--ink); box-shadow: 6px 6px 0 rgba(31, 36, 51, 0.25); }
#banner.show .big { animation: pop 0.35s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes pop { from { transform: scale(0.4); } }
#banner .red { background: var(--pink); color: var(--ink); }
#banner .lime { background: var(--mint); color: var(--ink); }
#banner .sub { display: block !important; width: fit-content; margin: 10px auto 0 !important; }
#banner .results { text-align: left; margin: 10px auto 0; padding: 12px 12px 12px 34px; max-width: 420px; background: #fff; border: 2px solid var(--ink); font-size: 15px; line-height: 1.7; }

#feed { position: absolute; left: 16px; top: 92px; display: flex; flex-direction: column; gap: 6px; }
.feed-item { background: rgba(255, 255, 255, 0.95); border: 2px solid var(--ink); border-left-width: 7px; border-left-color: var(--blue); padding: 5px 11px; font-weight: 600; font-size: 13px; color: var(--ink); animation: feedIn 0.18s; }
.feed-item:nth-child(even) { border-left-color: var(--pink); }
@keyframes feedIn { from { transform: translateX(-16px); opacity: 0; } }

#hint { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); text-align: center; padding: 5px 12px; font-weight: 600; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, 0.92); border: 2px solid var(--ink); }
#hint:empty { display: none; }
#speed { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 3px 10px; font-family: Bungee, Impact, sans-serif; font-size: 16px; color: var(--ink); background: rgba(255, 255, 255, 0.92); border: 2px solid var(--ink); }

#vignette { --danger: 0; position: absolute; inset: 0; box-shadow: inset 0 0 160px 40px rgba(255, 107, 107, calc(var(--danger) * 0.6)); transition: box-shadow 0.2s; }
#vignette.it { animation: itGlow 1.1s infinite alternate; }
@keyframes itGlow { from { box-shadow: inset 0 0 120px 20px rgba(255, 143, 163, 0.35); } to { box-shadow: inset 0 0 170px 45px rgba(255, 143, 163, 0.6); } }
#flash { position: absolute; inset: 0; opacity: 0; }
#flash.go { animation: flash 0.5s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

#speedlines { position: absolute; inset: -10%; opacity: 0; pointer-events: none; transition: opacity 0.15s;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0) 0deg 4deg, rgba(255, 255, 255, 0.3) 4deg 4.6deg, rgba(255, 255, 255, 0) 4.6deg 9deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 70%); mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 70%);
  animation: lines 0.35s linear infinite; }
@keyframes lines { to { transform: rotate(4.5deg); } }

#pointer { position: absolute; left: 0; top: 0; display: none; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
#pointer .arrow { width: 0; height: 0; margin: 0 auto 4px; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 24px solid currentColor; filter: drop-shadow(2px 2px 0 rgba(31, 36, 51, 0.5)); }
#pointer span { display: block; padding: 2px 8px; font-family: Bungee, Impact, sans-serif; font-size: 12px; letter-spacing: 0.04em; color: var(--ink); background: rgba(255, 255, 255, 0.95); border: 2px solid var(--ink); white-space: nowrap; }

#countdown { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 150px; height: 150px; display: grid; place-items: center; font-family: Bungee, Impact, sans-serif; font-size: 96px; color: var(--ink); background: var(--yellow); border: 4px solid var(--ink); box-shadow: 8px 8px 0 rgba(31, 36, 51, 0.25); opacity: 0; pointer-events: none; }
#countdown.go { animation: count 0.9s ease-out; }
@keyframes count { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(-6deg); } 30% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9) rotate(-3deg); } }

/* ================= scoreboard ================= */
#scoreboard { position: fixed; z-index: 15; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); background: #fff; border: 2px solid var(--ink); padding: 18px; box-shadow: var(--shadow); pointer-events: none; color: var(--ink); }
#scoreboard h3 { margin: 0 0 12px; font-family: Bungee, Impact, sans-serif; font-weight: 400; display: flex; justify-content: space-between; }
#scoreboard h3 span { font-size: 13px; color: var(--muted); }
#scoreboard table { width: 100%; border-collapse: collapse; }
#scoreboard th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 6px; }
#scoreboard td { padding: 8px 6px; border-top: 1px solid var(--line); font-weight: 600; }
#scoreboard tr.is-it td { background: #fff0f3; }
#scoreboard tr.is-me td:first-child { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; }

/* split color bar: left half = body, right half = eyes; click a half to pick */
.color-split { display: grid; grid-template-columns: 1fr 1fr; height: 64px; border: 2px solid var(--ink); box-shadow: var(--shadow); }
.color-split .half { position: relative; display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 10px; cursor: pointer; font-family: Bungee, Impact, sans-serif; font-size: 14px; letter-spacing: 0.06em; transition: filter 0.12s; }
.color-split .half + .half { border-left: 2px solid var(--ink); }
.color-split .half:hover { filter: brightness(1.06); }
.color-split .half::after { content: 'edit'; font: 700 11px Rubik, sans-serif; letter-spacing: 0.04em; opacity: 0.7; text-transform: uppercase; }
.color-split input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
