:root {
  --navy: #0A1128;
  --navy-2: #0F1A3C;
  --card: #121B3E;
  --line: #24305C;
  --white: #F5F7FF;
  --muted: #8C93B8;
  --gold: #F4C542;
  --green: #2ECC71;
  --red: #E4573D;
  --radius: 16px;

  --team-a: #F4C542;
  --team-b: #4EA8DE;
  --team-c: #FF6B6B;
  --team-d: #9D4EDD;
  --team-e: #FF9F5A;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--navy);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, #203b68 0%, var(--navy) 100%);
  border-bottom: 1px solid var(--line);
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 22px;
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.brand {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.brand-logo {
  display: block;
  width: min(86vw, 580px);
  height: auto;
  object-fit: contain;
  margin: 0 auto 8px;
}
.event-title {
  font-size: clamp(22px, 5.6vw, 34px);
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: var(--white);
}
.event-date {
  margin-top: 7px;
  font-size: clamp(16px, 4.2vw, 22px);
  font-weight: 400;
  color: #b4bad0;
}
.conn-indicator {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 26, 60, 0.82);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}
.conn-indicator[data-status="live"] {
  color: var(--green);
  border-color: rgba(46, 204, 113, 0.38);
  background: rgba(46, 204, 113, 0.10);
}
.conn-indicator[data-status="reconnecting"] {
  color: var(--gold);
  border-color: rgba(244, 197, 66, 0.38);
  background: rgba(244, 197, 66, 0.10);
}
.conn-indicator[data-status="offline"] {
  color: var(--red);
  border-color: rgba(228, 87, 61, 0.38);
  background: rgba(228, 87, 61, 0.10);
}

main {
  padding: 12px 12px calc(110px + env(safe-area-inset-bottom, 0px));
  max-width: 640px;
  margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: var(--navy-2); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-btn {
  flex: 1; padding: 12px 0; background: none; border: none; color: var(--muted);
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
}
.nav-btn.active { color: var(--gold); border-top: 2px solid var(--gold); }

/* Skeleton loading */
.skel-row {
  height: 44px; border-radius: 10px; margin-bottom: 6px;
  background: linear-gradient(90deg, var(--navy-2) 25%, #1a2650 37%, var(--navy-2) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease infinite;
}
.skel-row.short { height: 28px; }
@keyframes skel-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Schedule */
.round-block { margin-bottom: 14px; }
.round-block:last-child { margin-bottom: 0; }
.round-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; }
.round-title { font-weight: 800; color: var(--gold); font-size: 13px; }
.round-time { font-size: 12px; color: var(--muted); }
.round-rest { font-size: 11px; color: var(--muted); margin-left: auto; }
.sched-row {
  display: flex; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 10px;
  background: var(--navy-2); margin-bottom: 6px; cursor: pointer;
}
.sched-court-wrap {
  width: 52px;
  flex-shrink: 0;
}
.sched-court {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.sched-target {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.8;
  white-space: nowrap;
}
.sched-teams {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.sched-teams .vs {
  color: var(--muted);
  font-weight: 400;
  margin: 0 3px;
}
.sched-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  min-width: 36px;
  text-align: right;
  white-space: nowrap;
}

.team-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.team-a-color { color: var(--team-a); } .dot-a { background: var(--team-a); }
.team-b-color { color: var(--team-b); } .dot-b { background: var(--team-b); }
.team-c-color { color: var(--team-c); } .dot-c { background: var(--team-c); }
.team-d-color { color: var(--team-d); } .dot-d { background: var(--team-d); }
.team-e-color { color: var(--team-e); } .dot-e { background: var(--team-e); }

.badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.5px; }
.badge-pending { background: #2A3363; color: var(--muted); }
.badge-live { background: rgba(46, 204, 113, 0.15); color: var(--green); }
.badge-final { background: rgba(244, 197, 66, 0.15); color: var(--gold); }

/* Rosters */
.roster-card { border-bottom: 1px solid var(--line); padding: 8px 0; }
.roster-card:last-child { border-bottom: none; }
.roster-card summary { cursor: pointer; font-weight: 700; font-size: 13px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.roster-card summary::-webkit-details-marker { display: none; }
.roster-card ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.roster-card ul li { margin-bottom: 4px; }

/* Standings */
.standings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.standings-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.standings-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.standings-table tr:first-child td { font-weight: 700; }

.secondary-btn {
  background: var(--navy-2); color: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font-weight: 700; width: 100%; font-size: 13px;
}

/* Share / QR */
.share-card { display: flex; flex-direction: column; gap: 12px; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.qr-wrap img { border-radius: 10px; background: #fff; padding: 6px; }
.qr-caption { font-size: 11px; color: var(--muted); }

/* Scorer gate */
.scorer-gate { }
.gate-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#scorer-lock-status { font-weight: 800; font-size: 13px; letter-spacing: 0.5px; color: var(--muted); }
#scorer-lock-status.unlocked { color: var(--green); }
.pin-form { display: flex; gap: 8px; }
.pin-form input {
  flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-2); color: var(--white); font-size: 15px;
}
.pin-form button {
  background: var(--gold); color: var(--navy); border: none; border-radius: 10px;
  padding: 12px 18px; font-weight: 800; font-size: 14px;
}
.pin-error { color: var(--red); font-size: 12px; margin: 8px 0 0; min-height: 14px; }

.sound-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.sound-toggle-row input { width: 36px; height: 20px; accent-color: var(--gold); }

/* Match picker */
.match-picker {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-2); color: var(--white); font-size: 13px;
}

/* Scoring panel */
.match-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }

.stage-progress { display: flex; align-items: center; margin-bottom: 14px; }
.stage-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.stage-dot {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--navy-2); border: 2px solid var(--line); font-size: 11px; font-weight: 800; color: var(--muted);
}
.stage-step.done .stage-dot { background: var(--green); border-color: var(--green); color: var(--navy); }
.stage-step.active .stage-dot { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.stage-tag { font-size: 9px; color: var(--muted); white-space: nowrap; }
.stage-step.active .stage-tag { color: var(--gold); font-weight: 700; }
.stage-line { flex: 1; height: 2px; background: var(--line); margin: 0 2px; margin-bottom: 16px; }

.stage-current {
  text-align: center; font-weight: 800; letter-spacing: 0.5px; color: var(--gold);
  font-size: 13px; margin-bottom: 14px;
}

.winner-banner {
  text-align: center; background: linear-gradient(135deg, rgba(244,197,66,0.15), rgba(46,204,113,0.1));
  border: 1px solid var(--gold); border-radius: 12px; padding: 16px; margin-bottom: 12px;
  font-size: 14px; line-height: 1.8;
}
.winner-name { color: var(--gold); font-size: 20px; font-weight: 900; }
.winner-score { font-size: 22px; font-weight: 900; }

.stage-history { margin-bottom: 14px; }
.history-row {
  display: flex; justify-content: space-between; padding: 8px 10px; background: var(--navy-2);
  border-radius: 8px; margin-bottom: 6px; font-size: 13px; font-weight: 700;
}

.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.score-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.team-name { font-size: 13px; font-weight: 800; text-align: center; min-height: 32px; display: flex; align-items: center; }
.score-big { font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; color: var(--white); }
.score-big.pulse { animation: score-pulse 0.35s ease; }
@keyframes score-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); color: var(--green); }
  100% { transform: scale(1); }
}
.plus-btn {
  width: 100%; padding: 22px 0; font-size: 24px; font-weight: 900; border-radius: 16px;
  border: none; background: var(--green); color: var(--navy); box-shadow: 0 4px 0 #1f9c56;
}
.plus-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #1f9c56; }
.plus-btn:disabled { background: #2A3363; color: var(--muted); box-shadow: none; }

.scorer-controls { display: flex; gap: 10px; margin-bottom: 10px; }
.scorer-controls button {
  flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-2); color: var(--white); font-weight: 700; font-size: 13px;
}
.scorer-controls button.danger { border-color: var(--red); color: var(--red); }
.scorer-controls.hidden { display: none; }

.save-status { min-height: 18px; text-align: center; font-size: 12px; font-weight: 700; }
.save-saving { color: var(--muted); }
.save-ok { color: var(--green); }
.save-fail { color: var(--red); }

/* Results */
.result-card {
  display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px;
  background: var(--navy-2); margin-bottom: 6px;
}
.result-card.status-live { border: 1px solid rgba(46,204,113,0.4); }
.result-court { font-size: 11px; color: var(--muted); width: 52px; flex-shrink: 0; }
.result-teams { flex: 1; font-size: 13px; font-weight: 600; }
.result-teams .vs { color: var(--muted); font-weight: 400; margin: 0 4px; }
.result-score { font-size: 15px; font-weight: 800; color: var(--gold); min-width: 56px; text-align: right; }

.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(10,17,40,0.75); display: flex;
  align-items: center; justify-content: center; z-index: 20; padding: 20px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; max-width: 320px; width: 100%; font-size: 14px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 10px; font-weight: 700; }
.modal-actions .danger { background: var(--red); color: var(--white); border: none; }

/* Toasts */
.toast-stack {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 0; right: 0;
  z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; padding: 0 12px;
}
.toast {
  background: var(--card); border: 1px solid var(--gold); color: var(--white);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4); animation: toast-in 0.25s ease, toast-out 0.3s ease 3.2s forwards;
  max-width: 100%;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* Confetti */
.confetti-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -20px; width: 8px; height: 14px; opacity: 0.9;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.2; }
}

@media (min-width: 480px) {
  .score-big { font-size: 76px; }
  .plus-btn { padding: 26px 0; font-size: 26px; }
}


@media (max-width: 420px) {
  .sched-row {
    gap: 5px;
    padding: 9px 7px;
  }

  .sched-court-wrap {
    width: 48px;
  }

  .sched-teams {
    font-size: 12px;
    letter-spacing: -0.1px;
  }

  .sched-score {
    font-size: 12px;
    min-width: 32px;
  }

  .badge {
    font-size: 9px;
    padding: 3px 7px;
  }
}


/* ============================================================
   STAGE 2A — DASHBOARD TOURNAMENT SCHEDULE
   Mobile-first visual redesign only. Scoring logic unchanged.
   ============================================================ */

#schedule-list .round-block {
  margin-bottom: 22px;
}

#schedule-list .round-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "title time"
    "rest rest";
  align-items: center;
  column-gap: 10px;
  row-gap: 5px;
  margin-bottom: 10px;
}

#schedule-list .round-title {
  grid-area: title;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.25px;
}

#schedule-list .round-time {
  grid-area: time;
  justify-self: end;
  font-size: 13px;
  color: var(--muted);
}

#schedule-list .round-rest {
  grid-area: rest;
  justify-self: start;
  font-size: 11px;
  color: var(--muted);
}

#schedule-list .sched-row {
  display: block;
  padding: 12px 13px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 13px;
  background: var(--navy-2);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 120ms ease;
}

#schedule-list .sched-row:active {
  transform: scale(0.995);
}

#schedule-list .sched-row.status-live {
  border-color: rgba(46, 204, 113, 0.42);
  background:
    linear-gradient(90deg, rgba(46, 204, 113, 0.08), transparent 42%),
    var(--navy-2);
  box-shadow: inset 3px 0 0 rgba(46, 204, 113, 0.75);
}

#schedule-list .sched-row.status-final {
  border-color: rgba(244, 197, 66, 0.22);
}

#schedule-list .sched-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#schedule-list .sched-team {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

#schedule-list .sched-team-a {
  justify-content: flex-start;
}

#schedule-list .sched-team-b {
  justify-content: flex-end;
  text-align: right;
}

#schedule-list .sched-vs {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

#schedule-list .sched-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.055);
}

#schedule-list .sched-meta {
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

#schedule-list .sched-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

#schedule-list .sched-score {
  min-width: auto;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
  white-space: nowrap;
}

#schedule-list .badge {
  flex-shrink: 0;
}

@media (max-width: 420px) {
  #schedule-list .sched-row {
    padding: 11px 10px;
  }

  #schedule-list .sched-matchup {
    gap: 5px;
  }

  #schedule-list .sched-team {
    gap: 4px;
    font-size: 13px;
    letter-spacing: -0.15px;
  }

  #schedule-list .sched-vs {
    font-size: 10px;
  }

  #schedule-list .sched-meta-row {
    margin-top: 8px;
    padding-top: 7px;
  }

  #schedule-list .sched-score {
    font-size: 13px;
  }
}


/* ============================================================
   STAGE 2B — TEAMS + MOBILE STANDINGS
   Presentation only. Tournament ranking calculations unchanged.
   ============================================================ */

.roster-card {
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: rgba(15, 26, 60, 0.46);
}

.roster-card summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 12px 13px;
  cursor: pointer;
  list-style: none;
}

.roster-card summary::-webkit-details-marker {
  display: none;
}

.roster-team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 850;
}

.roster-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.roster-card .chevron {
  color: var(--muted);
  font-size: 12px;
  transition: transform 160ms ease;
}

.roster-card[open] .chevron {
  transform: rotate(180deg);
}

.roster-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 13px 13px;
}

.roster-player {
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 9px;
  background: rgba(255,255,255,0.025);
  font-size: 12px;
  color: var(--text);
  text-align: center;
}

/* Standings cards replace the wide 8-column mobile table. */
.standings-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.standing-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 12px;
  background: rgba(15, 26, 60, 0.48);
}

.standing-card.rank-1 {
  border-color: rgba(244, 197, 66, 0.30);
  background:
    linear-gradient(90deg, rgba(244, 197, 66, 0.075), transparent 45%),
    rgba(15, 26, 60, 0.48);
}

.standing-rank {
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.standing-main {
  min-width: 0;
}

.standing-team {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.standing-points {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.standing-record {
  min-width: 62px;
  text-align: right;
}

.standing-wl {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.standing-diff {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.standing-diff.positive {
  color: var(--green);
}

.standing-diff.negative {
  color: var(--red);
}

@media (max-width: 380px) {
  .roster-count {
    display: none;
  }

  .standing-card {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    padding: 9px 10px;
  }

  .standing-team {
    font-size: 13px;
  }
}


/* ============================================================
   STAGE 3A — SCORE SCREEN LAYOUT
   Visual-only redesign. Scoring/Supabase logic unchanged.
   ============================================================ */

.scoring-card {
  padding: 16px 14px 18px;
}

.score-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.score-meta-bar span {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(15,26,60,0.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25px;
}

.score-matchup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
}

.score-matchup-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.score-matchup-vs {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.score-grid-focus {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 2px;
  margin-bottom: 16px;
}

.score-divider {
  width: 1px;
  min-height: 174px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255,255,255,0.09) 18%,
    rgba(255,255,255,0.09) 82%,
    transparent
  );
}

.score-grid-focus .score-col {
  justify-content: space-between;
  gap: 14px;
}

.score-grid-focus .score-big {
  font-size: clamp(72px, 20vw, 104px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin: 8px 0 2px;
}

.score-grid-focus .plus-btn {
  min-height: 92px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.plus-symbol {
  display: block;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.plus-team {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  opacity: 0.82;
}

.scorer-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.scorer-controls button {
  width: 100%;
}

.scorer-controls button.danger {
  margin-top: 4px;
  background: rgba(228,87,61,0.06);
}

@media (max-width: 420px) {
  .scoring-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .score-matchup-team {
    font-size: 13px;
  }

  .score-grid-focus {
    gap: 9px;
  }

  .score-grid-focus .score-big {
    font-size: clamp(68px, 21vw, 92px);
  }

  .score-grid-focus .plus-btn {
    min-height: 86px;
  }
}


/* ============================================================
   STAGE 4A — LIVE RESULTS
   Spectator-friendly mobile result cards
   ============================================================ */

.live-results-round {
  margin-bottom: 24px;
}

.live-results-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.live-results-round-head .round-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
}

.live-results-round-head .round-time {
  font-size: 12px;
  color: var(--muted);
}

.live-result-card {
  padding: 13px 14px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: var(--navy-2);
}

.live-result-card.status-live {
  border-color: rgba(46, 204, 113, 0.45);
  background:
    linear-gradient(
      90deg,
      rgba(46, 204, 113, 0.08),
      transparent 45%
    ),
    var(--navy-2);
  box-shadow:
    inset 3px 0 0 rgba(46, 204, 113, 0.8);
}

.live-result-card.status-final {
  border-color: rgba(244, 197, 66, 0.3);
  background:
    linear-gradient(
      90deg,
      rgba(244, 197, 66, 0.055),
      transparent 45%
    ),
    var(--navy-2);
}

.live-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.live-result-court {
  font-size: 11px;
  color: var(--muted);
}

.live-result-matchup {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    20px
    minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.live-result-team {
  text-align: center;
  min-width: 0;
}

.live-result-team-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.live-result-score {
  margin-top: 7px;
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.status-pending .live-result-score {
  opacity: 0.4;
}

.live-result-vs {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.live-result-footer {
  margin-top: 11px;
  padding-top: 9px;
  border-top:
    1px solid rgba(255,255,255,0.055);
  text-align: center;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.4px;
}

.live-now {
  color: var(--green);
}

.final-result {
  color: var(--gold);
}

.pending-result {
  color: var(--muted);
}

@media (max-width: 420px) {
  .live-result-card {
    padding: 12px 11px 11px;
  }

  .live-result-team-name {
    font-size: 12px;
  }

  .live-result-score {
    font-size: 38px;
  }
}
