/* GeoDraft — football/scoreboard theme. No red (reads as error); accents are
   turf green, stadium orange, and teal. Mobile-first. */

:root {
  --turf: #0b3d2e;
  --turf-dark: #072318;
  --panel: #10241b;
  --panel-2: #16342681;
  --line: #2f6b4f;
  --chalk: #eaf3ee;
  --muted: #9fc4b2;
  --orange: #ff7a1a;
  --teal: #23c4ad;
  --gold: #f5c451;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--turf-dark);
  color: var(--chalk);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  /* Faint yard-line stripes down the field */
  background-image: repeating-linear-gradient(
    0deg,
    var(--turf) 0,
    var(--turf) 58px,
    #0d4433 58px,
    #0d4433 60px
  );
  min-height: 100dvh;
}

h1, h2, h3, .eyebrow, button, .tab {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
}
.brand .pill {
  background: var(--orange);
  color: #201000;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

select, input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c2a1f;
  color: var(--chalk);
  font-size: 16px; /* ≥16px prevents iOS zoom-on-focus */
}

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 800;
  color: #10241b;
  background: var(--orange);
  width: 100%;
  transition: transform 0.05s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--chalk); border: 1px solid var(--line); }
button.teal { background: var(--teal); }

.hidden { display: none !important; }
.err { color: var(--gold); font-size: 14px; margin-top: 12px; min-height: 18px; }
.center { text-align: center; }
.spacer { flex: 1; }

/* ---- Game view ---- */
#view-game { position: fixed; inset: 0; display: flex; flex-direction: column; }
#pano { flex: 1; background: #06170f; }
.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}
.scoreband {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.timer { font-size: 22px; color: var(--gold); }
.timer.low { color: var(--orange); }

.guess-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; }
.guess-bar button { box-shadow: var(--shadow); }

/* ---- Bottom sheet city picker ---- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: flex-end;
  z-index: 50;
}
.sheet {
  background: var(--panel);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 2px solid var(--orange);
  width: 100%;
  max-height: 78dvh;
  display: flex; flex-direction: column;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
}
.sheet h3 { margin: 6px 0 12px; text-align: center; }
.city-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.city-grid button {
  background: #0c2a1f;
  color: var(--chalk);
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 14px 10px;
  text-transform: none;
  letter-spacing: 0;
}
.city-grid button.sel { background: var(--teal); color: #062019; border-color: var(--teal); }

/* ---- Reveal ---- */
.reveal-score { font-size: 52px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.reveal-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.badge-correct { color: var(--teal); font-weight: 800; }
.badge-miss { color: var(--orange); font-weight: 800; }

/* ---- Leaderboard / results table ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.pick { color: var(--gold); font-weight: 900; }
tr.you td { background: #123f2d; }
.tag-inc { font-size: 11px; color: var(--orange); border: 1px solid var(--orange); border-radius: 6px; padding: 1px 5px; margin-left: 6px; }

/* ---- Admin ---- */
.rounds-list, .players-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.round-item, .player-item {
  display: flex; align-items: center; gap: 12px;
  background: #0c2a1f; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}
.round-item img { width: 88px; height: 66px; object-fit: cover; border-radius: 6px; background: #06170f; }
.round-item .meta { flex: 1; }
.round-item button, .player-item button { width: auto; padding: 8px 12px; font-size: 12px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.statebar { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; }
.chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid var(--line); }
.chip.setup { color: var(--gold); }
.chip.open { color: var(--teal); border-color: var(--teal); }
.chip.locked { color: var(--orange); border-color: var(--orange); }
h2 { margin: 26px 0 4px; }
.muted-note { color: var(--muted); font-size: 13px; }
