/* Padel Scorer TV — brand: Padel Invitational
   Editorial luxe direction: oxblood + antique gold + Didot. See
   /Users/.../padel-invitational-style.html for the source guide. Stylesheet
   defines design tokens at :root, then component styles consume them.
*/

:root {
  /* Brand palette */
  --burgundy:      #4B0F1E;
  --deep-burgundy: #260810;
  --oxblood:       #6E182B;
  --antique-gold:  #C6A15B;
  --soft-gold:     #E4C77D;
  --champagne:     #F6E8C8;
  --ivory:         #F8F5EF;
  --warm-white:    #FFFDF8;
  --black:         #080706;
  --charcoal:      #171311;
  --stone:         #B8AEA0;

  /* Functional aliases */
  --bg:            var(--black);
  --bg-2:          var(--charcoal);
  --panel:         rgba(255, 253, 248, 0.055);   /* ivory glass on dark */
  --panel-strong:  rgba(255, 253, 248, 0.10);
  --panel-light:   var(--ivory);                 /* for white-on-dark cards */
  --text:          var(--ivory);
  --text-muted:    var(--stone);
  --accent:        var(--antique-gold);
  --accent-hi:     var(--soft-gold);
  --danger:        #c0392b;
  --warn:          var(--soft-gold);
  --team1:         var(--soft-gold);             /* gold */
  --team2:         var(--oxblood);               /* oxblood */
  --border-gold:   rgba(198, 161, 91, 0.45);
  --border-gold-2: rgba(198, 161, 91, 0.26);
  --border-soft:   rgba(228, 199, 125, 0.24);
  --shadow-lg:     0 30px 90px rgba(0, 0, 0, 0.48);
  --shadow:        0 12px 40px rgba(0, 0, 0, 0.45);
  --radius:        14px;
  --radius-lg:     22px;

  /* Type stacks */
  --serif:  Didot, "Bodoni 72", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans:   "Avenir Next", "Helvetica Neue", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02";
  letter-spacing: 0.01em;
  background: var(--black);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Default page surface — layered radial halos over wine→black gradient. */
.surface,
.shell,
.umpire,
.viewer,
.login,
.setup {
  background:
    radial-gradient(circle at 18% 14%, rgba(198, 161, 91, 0.18), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(110, 24, 43, 0.32), transparent 36%),
    linear-gradient(135deg, var(--black) 0%, var(--deep-burgundy) 48%, var(--black) 100%);
}

a { color: var(--accent-hi); text-decoration: none; }
button { font: inherit; color: inherit; }

/* ── Type fragments ─────────────────────────────────────────────────────── */
.serif      { font-family: var(--serif); letter-spacing: -0.035em; font-weight: 400; }
.script     { font-family: var(--script); letter-spacing: -0.02em; color: var(--antique-gold); font-weight: 400; }
.eyebrow    { font-family: var(--sans); font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--soft-gold); font-weight: 600; }
.smallcaps  { font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }

/* ── Shell layout ────────────────────────────────────────────────────────── */
.shell { min-height: 100%; display: flex; flex-direction: column; }
.shell > header {
  padding: 18px 28px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border-gold-2);
}
.shell > main { flex: 1; padding: 28px; }
.shell > footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-gold-2);
  display: flex; gap: 14px; align-items: center;
  color: var(--text-muted); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
.brand {
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  color: var(--soft-gold); text-transform: uppercase; letter-spacing: 0.34em;
}
.spacer { flex: 1; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 1px solid var(--border-gold-2);
  background: rgba(255, 253, 248, 0.04);
  color: var(--ivory);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 80ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
  min-height: 48px;
  touch-action: manipulation;
}
.btn:hover { background: rgba(255, 253, 248, 0.09); border-color: var(--border-gold); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--soft-gold) 0%, var(--antique-gold) 100%);
  color: var(--black);
  border-color: transparent;
}
.btn-primary:hover { background: var(--soft-gold); color: var(--black); }
.btn-danger { background: var(--danger); color: var(--warm-white); border-color: transparent; }
.btn-warn   { background: var(--oxblood); color: var(--soft-gold); border-color: var(--border-gold); }
.btn-ghost  { background: transparent; border-color: var(--border-gold-2); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; max-width: 580px; }
.form label { display: grid; gap: 8px; }
.form label > * + * { /* fallback for the inner caption */ }
.form label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form input, .form select {
  appearance: none;
  background: rgba(255, 253, 248, 0.05);
  color: var(--ivory);
  border: 1px solid var(--border-gold-2);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: none;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.form input:focus, .form select:focus {
  border-color: var(--antique-gold);
  background: rgba(255, 253, 248, 0.08);
}
.form .row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

.card {
  background: rgba(255, 253, 248, 0.055);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}
.card h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.035em;
  line-height: 1;
}
.card h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--soft-gold);
}

/* ── Landing — full hero treatment ────────────────────────────────────────── */
.landing {
  display: grid;
  gap: 40px;
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 24px 56px;
}
.hero {
  position: relative;
  border: 1px solid var(--border-gold);
  border-radius: 28px;
  padding: clamp(36px, 5vw, 64px);
  min-height: 460px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(75, 15, 30, 0.72), rgba(8, 7, 6, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 84px);
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: "";
  position: absolute; inset: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  pointer-events: none;
}
.hero .eyebrow { margin-bottom: 28px; display: block; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.055em;
  margin: 0;
  max-width: 980px;
}
.hero h1 .script {
  display: block;
  margin-top: 12px;
  font-family: var(--script);
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.02em;
}
.hero-tagline {
  margin-top: 28px;
  max-width: 560px;
  color: var(--stone);
  line-height: 1.65;
  font-size: 15px;
}

.links {
  margin-top: 56px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  position: relative;
}
.link-card {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.055);
  border: 1px solid var(--border-gold);
  color: inherit;
  transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
  backdrop-filter: blur(12px);
}
.link-card:hover {
  background: rgba(255, 253, 248, 0.10);
  transform: translateY(-2px);
  border-color: var(--antique-gold);
}
.link-card .label {
  color: var(--soft-gold); font-size: 11px;
  letter-spacing: 0.32em; text-transform: uppercase; font-weight: 600;
}
.link-card strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.025em;
  color: var(--warm-white);
}
.link-card span {
  color: var(--stone);
  font-size: 13px; line-height: 1.55;
}

/* ── Umpire scoreboard ───────────────────────────────────────────────────── */
.umpire {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
}
.umpire-header {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-gold-2);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}
.umpire-header .center { text-align: center; }
.umpire-header strong { color: var(--soft-gold); font-weight: 600; }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
  height: 100%;
  min-height: 0;
}
.team-panel {
  position: relative;
  display: grid; grid-template-rows: auto 1fr auto;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 253, 248, 0.06) 0%, rgba(255, 253, 248, 0.025) 100%);
  overflow: hidden;
  border: 1px solid var(--border-gold-2);
  cursor: pointer;
  transition: transform 60ms ease, border-color 140ms ease, background 140ms ease;
}
.team-panel::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none; opacity: 0.55;
}
.team-panel:active { transform: scale(0.99); }
.team-panel[data-team="1"] { border-top: 4px solid var(--soft-gold); }
.team-panel[data-team="2"] { border-top: 4px solid var(--oxblood); }
.team-panel.serving {
  border-color: var(--antique-gold);
  box-shadow: inset 0 0 0 1px var(--antique-gold), 0 18px 60px rgba(198, 161, 91, 0.18);
}

.team-meta { padding: 22px 26px 14px; position: relative; }
.team-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--warm-white);
}
.team-players {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
}
.serving-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(198, 161, 91, 0.16);
  color: var(--soft-gold);
  border: 1px solid var(--border-gold);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  margin-top: 12px;
}
.serving-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--soft-gold); box-shadow: 0 0 8px var(--antique-gold);
}

.team-score { display: grid; place-items: center; padding: 8px; position: relative; }
.point-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(80px, 18vh, 220px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--warm-white);
}
.point-display.gp {
  color: var(--soft-gold);
  font-size: clamp(60px, 14vh, 180px);
  letter-spacing: -0.02em;
  font-style: italic;
}

.team-aux {
  display: grid; grid-template-columns: 1fr auto;
  gap: 18px; padding: 18px 26px;
  border-top: 1px solid var(--border-gold-2);
  background: rgba(8, 7, 6, 0.4);
  align-items: center;
}
.set-pips { display: flex; gap: 12px; flex-wrap: wrap; }
.set-pip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 56px;
  padding: 0 16px; border-radius: 12px;
  background: rgba(255, 253, 248, 0.06);
  border: 1px solid var(--border-gold-2);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--stone);
}
.set-pip.complete {
  background: rgba(110, 24, 43, 0.30);
  color: var(--soft-gold);
  border-color: var(--border-gold);
}
.set-pip.current {
  outline: 1px solid var(--antique-gold);
  color: var(--warm-white);
}
.set-pip sup {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  margin-left: 4px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  vertical-align: super;
}
.sets-count {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--soft-gold);
}

.umpire-controls {
  display: grid; grid-auto-flow: column; gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-gold-2);
  align-items: center; justify-content: stretch;
}
.umpire-controls .btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--soft-gold); color: var(--black);
  padding: 10px 18px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: var(--shadow); z-index: 50;
}
.banner.error { background: var(--danger); color: var(--warm-white); }
.banner.success { background: var(--soft-gold); color: var(--black); }

/* ── Match-end overlay ───────────────────────────────────────────────────── */
.match-end-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 7, 6, 0.88);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.match-end-card { text-align: center; padding: 40px 56px; max-width: 560px; }
.match-end-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 48px;
  letter-spacing: -0.04em;
}
.match-end-card .winner {
  margin-top: 14px;
  font-family: var(--serif);
  color: var(--soft-gold);
  font-size: 36px;
  letter-spacing: -0.025em;
}

/* ── Viewer / TV display ─────────────────────────────────────────────────── */
.viewer {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
  padding: 4vmin;
  gap: 3vmin;
}
.viewer-header {
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(11px, 1.3vw, 15px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--soft-gold);
  font-weight: 600;
}
.viewer-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2vmin;
  align-content: center;
}
.viewer-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto auto;
  align-items: center;
  gap: 2vmin;
  padding: 2.6vmin 3vmin;
  background:
    linear-gradient(135deg, rgba(75, 15, 30, 0.55), rgba(8, 7, 6, 0.85));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold-2);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.viewer-row::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none; opacity: 0.4;
}
.viewer-row.row-1 { border-left: 6px solid var(--soft-gold); }
.viewer-row.row-2 { border-left: 6px solid var(--oxblood); }
.viewer-row.serving {
  border-color: var(--antique-gold);
  box-shadow: 0 0 0 1px var(--antique-gold), var(--shadow-lg);
}
.viewer-team {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 4.2vw, 60px);
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--warm-white);
}
.viewer-team .players {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--stone);
  font-size: clamp(10px, 1.2vw, 16px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-top: 8px;
}
.viewer-cell {
  font-family: var(--serif);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-align: center;
  min-width: 1.4em;
  font-size: clamp(28px, 5vw, 84px);
  color: var(--warm-white);
}
.viewer-cell.dim { color: var(--stone); opacity: 0.55; }
.viewer-cell.won {
  color: var(--soft-gold);
  text-shadow: 0 0 18px rgba(228, 199, 125, 0.25);
}
.viewer-cell.point { color: var(--soft-gold); }
.viewer-cell.gp { color: var(--soft-gold); font-style: italic; font-size: clamp(22px, 3vw, 50px); }
.viewer-cell sup {
  font-family: var(--sans); font-weight: 500;
  font-size: 0.4em; vertical-align: super; opacity: 0.8;
  letter-spacing: 0.04em;
}
.viewer-footer {
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.login .card { width: 100%; max-width: 380px; }
.pin-input {
  text-align: center;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.3em;
  padding: 16px 14px;
  font-variant-numeric: tabular-nums;
}

/* ── Result rows (completed matches in picker, import preview) ──────────── */
.results-list {
  display: grid;
  gap: 8px;
}
.result-row {
  display: grid;
  grid-template-columns: minmax(80px, auto) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.04);
  border: 1px solid var(--border-gold-2);
  font-size: 13px;
  line-height: 1.4;
}
.result-row .result-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--soft-gold);
}
.result-row .result-verdict {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ivory);
}
.result-row .result-verdict .result-winner { color: var(--soft-gold); }
.result-row .result-score {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  color: var(--soft-gold);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .result-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 14px;
  }
  .result-row .result-verdict { font-size: 16px; }
  .result-row .result-score { font-size: 16px; }
}

/* ── Setup ───────────────────────────────────────────────────────────────── */
.setup { max-width: 820px; margin: 32px auto; padding: 0 20px 56px; }
.setup h1 {
  margin: 16px 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.04em;
}
.setup .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .setup .row { grid-template-columns: 1fr; } }
.setup .actions { display: flex; gap: 10px; margin-top: 28px; align-items: center; }

/* ── Hidden ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── OBS Browser Source overlay mode ─────────────────────────────────────────
   ?overlay=1 (default) — body / page background fully transparent (no
   gradient halos, no surface), but the team panels themselves keep their
   brand fill so the text stays readable on any video underneath.

   ?overlay=clean — strips the panels too. Pure text + drop shadow only;
   relies on busy-but-not-bright footage underneath, or chroma key.
*/
/* ?overlay=1 — transparent everywhere except inside each oxblood row.
   Layout, sizing and positioning use the regular full-canvas viewer styles;
   the operator sizes / positions the source in OBS itself. */
html.overlay,
html.overlay body,
html.overlay .viewer {
  background: transparent !important;
}
html.overlay .viewer-header,
html.overlay .viewer-footer { display: none; }
html.overlay .viewer-team,
html.overlay .viewer-cell {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Strip the panels too if you want pure text-on-video. */
html.overlay-clean .viewer-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html.overlay-clean .viewer-row::before { display: none !important; }
html.overlay-clean .viewer-team,
html.overlay-clean .viewer-cell,
html.overlay-clean .viewer-team .players {
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.75);
}

/* ── Portrait stack on iPad / mid screens ────────────────────────────────── */
@media (orientation: portrait) and (max-width: 900px) {
  .score-grid { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
}

/* ── iPhone-sized screens ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .umpire-header {
    grid-template-columns: 1fr 1fr;
    padding: 10px 14px;
    font-size: 10px;
    letter-spacing: 0.24em;
    gap: 8px;
  }
  .umpire-header > :first-child { display: none; }
  .umpire-header .center { text-align: left; }

  .score-grid { padding: 8px; gap: 8px; }
  .team-meta { padding: 14px 16px 10px; }
  .team-name { font-size: 24px; }
  .team-players { font-size: 10px; letter-spacing: 0.22em; }
  .team-aux { padding: 10px 14px; }
  .point-display { font-size: clamp(60px, 14vh, 140px); }
  .point-display.gp { font-size: clamp(46px, 11vh, 110px); }
  .set-pip { min-width: 44px; height: 38px; font-size: 22px; padding: 0 10px; }
  .set-pip sup { font-size: 10px; margin-left: 2px; }
  .sets-count { font-size: 36px; }
  .serving-pill { font-size: 9px; padding: 4px 10px; }

  .umpire-controls {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(44px, auto);
    gap: 8px;
    padding: 10px;
  }
  .umpire-controls .btn { min-height: 36px; font-size: 10px; padding: 6px 6px; letter-spacing: 0.12em; }
  #btn-end-match { grid-column: span 2; }
  #btn-signout   { grid-column: span 1; }

  /* Landing on phone */
  .hero { padding: 32px; min-height: 380px; }
  .hero::before { inset: 14px; }
  .hero h1 { font-size: clamp(48px, 13vw, 84px); }
}

/* ── iPhone landscape — short height ─────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 480px) {
  .umpire-header { padding: 6px 14px; font-size: 10px; }
  .score-grid { padding: 8px; gap: 8px; }
  .team-meta { padding: 8px 14px 6px; }
  .team-name { font-size: 20px; line-height: 1; }
  .team-players { font-size: 9px; letter-spacing: 0.22em; }
  .team-aux { padding: 8px 12px; gap: 10px; }
  .set-pip { min-width: 36px; height: 32px; font-size: 18px; padding: 0 8px; }
  .set-pip sup { font-size: 10px; }
  .sets-count { font-size: 28px; }
  .point-display { font-size: clamp(50px, 38vh, 140px); }
  .umpire-controls { padding: 6px 10px; gap: 6px; }
  .umpire-controls .btn { min-height: 32px; font-size: 10px; padding: 5px 8px; }
}
