/* ==========================================================================
   ¡PADELAZO! — Clubhouse Velocity
   Deep-green confidence · ivory restraint · one electric lime moment.
   Built from the approved reference components. Manrope + Instrument Serif.
   ========================================================================== */

:root {
  /* surfaces */
  --surface: #f9f9f7;
  --surface-low: #f3f4f2;
  --surface-c: #edeeec;
  --surface-high: #e8e8e6;
  --surface-highest: #e2e3e1;
  --surface-lowest: #ffffff;
  --surface-dim: #d9dad8;
  /* ink */
  --on-surface: #1a1c1b;
  --on-surface-var: #414846;
  --outline: #717976;
  --outline-var: #c0c8c4;
  /* brand */
  --primary: #00261f;             /* darkest green — dark cards */
  --primary-container: #103d34;   /* Centre Court Green */
  --on-primary: #ffffff;
  --on-primary-container: #7ca89c;
  --ivory: #F4F0E7;               /* Clubhouse Ivory */
  --lime: #DFFF3F;                /* Rally Lime */
  --lime-dim: #c9e638;
  --night: #0D1411;               /* Night Court */
  --coral: #FF6047;               /* Match Point Coral */
  --secondary-dim: #cac6be;
  --surface-tint: #3c665c;

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --r-card: 16px; --r-btn: 16px; --r-sm: 8px; --r-pill: 999px;
  --gutter: 16px; --margin: 20px;
  --shadow-sm: 0 1px 3px rgba(13,20,17,.08);
  --shadow: 0 6px 20px rgba(13,20,17,.10);
  --glow: 0 8px 18px rgba(223,255,63,.32);

  --maxw: 500px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 78px;
}

/* -------------------------------- reset -------------------------------- */
* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--on-surface);
  background: var(--surface);
  background-image: radial-gradient(circle, rgba(16,61,52,.05) 2px, transparent 2px);
  background-size: 16px 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--primary-container); outline-offset: 2px; }
.tabnum { font-variant-numeric: tabular-nums; }

/* --------------------------- app frame / screens ----------------------- */
.app {
  position: relative; width: 100%; max-width: var(--maxw); min-height: 100dvh;
  margin: 0 auto; display: flex; flex-direction: column;
  background: var(--surface);
  background-image: radial-gradient(circle, rgba(16,61,52,.05) 2px, transparent 2px);
  background-size: 16px 16px;
}
@media (min-width: 540px) {
  .app { min-height: 100dvh; box-shadow: 0 0 60px rgba(13,20,17,.10); }
}
#view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0;
  animation: screenIn .22s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pad { padding: var(--margin); }
.stack > * + * { margin-top: 16px; }
.has-nav .scroll { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }

/* ------------------------------ typography ----------------------------- */
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.wordmark { font-family: var(--serif); font-style: italic; color: var(--primary);
  font-size: 30px; line-height: 1; letter-spacing: .01em; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--on-surface-var); }
.h-lg { font-size: 28px; font-weight: 700; line-height: 34px; letter-spacing: -.02em; }
.h-md { font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -.01em; }
.body { font-size: 16px; line-height: 24px; color: var(--on-surface); }
.muted { color: var(--on-surface-var); }
.center { text-align: center; }
.score { font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: .9; }

/* ------------------------------- app bar ------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 12px) var(--margin) 12px;
  background: var(--surface); border-bottom: 1px solid var(--outline-var);
}
.iconbtn { width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--on-surface-var);
  transition: background .12s, transform .08s; }
.iconbtn:active { transform: scale(.94); }
.iconbtn:hover { background: var(--surface-high); }
.iconbtn svg { width: 24px; height: 24px; }
.appbar .brand { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.badge { width: 34px; height: 34px; border-radius: 9px; object-fit: cover;
  border: 1px solid var(--primary-container); flex: 0 0 auto; }
.avatar { width: 40px; height: 40px; border-radius: var(--r-pill); overflow: hidden;
  background: var(--surface-c); border: 1px solid var(--outline-var);
  display: grid; place-items: center; color: var(--on-surface-var); flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.appbar--min .brand { justify-content: flex-start; }

/* ------------------------------ bottom nav ----------------------------- */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: 40;
  display: flex; justify-content: space-around; align-items: center;
  background: var(--night); color: var(--secondary-dim);
  padding: 8px 10px calc(10px + var(--safe-b));
  border-radius: 26px 26px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.28);
}
.navitem { display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 12px; border-radius: var(--r-pill); color: var(--secondary-dim);
  transition: color .12s, background .15s, transform .15s; }
.navitem svg { width: 24px; height: 24px; }
.navitem span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.navitem:active { transform: scale(.95); }
.navitem.on { background: var(--primary-container); color: var(--lime); transform: translateY(-8px);
  box-shadow: 0 6px 14px rgba(0,0,0,.35); }

/* ------------------------------- buttons ------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 16px; padding: 15px 20px; border-radius: var(--r-btn);
  background: var(--surface-lowest); color: var(--on-surface);
  border: 1px solid var(--outline-var); transition: transform .12s, box-shadow .15s, background .15s;
  width: 100%; }
.btn svg { width: 22px; height: 22px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--lime { background: var(--lime); color: var(--night); border-color: transparent;
  text-transform: uppercase; letter-spacing: .02em; font-weight: 800; box-shadow: var(--glow); }
.btn--lime:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(223,255,63,.4); }
.btn--lime:active { transform: translateY(0); box-shadow: none; }
.btn--dark { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.btn--ghost { background: transparent; border-color: var(--outline-var); }
.btn--sm { font-size: 14px; padding: 11px 14px; }
.btn-row { display: flex; gap: 12px; }
.btn-row > .btn { flex: 1; }

/* --------------------------------- cards ------------------------------- */
.card { background: var(--surface-c); border: 1px solid var(--outline-var);
  border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-sm); }
.card--low { background: var(--surface-low); }
.card--lowest { background: var(--surface-lowest); }
.card--dark { background: var(--primary); color: var(--on-primary); border-color: transparent; box-shadow: var(--shadow); }
.card--night { background: var(--night); color: var(--ivory); border-color: transparent;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.04) 1px, transparent 0);
  background-size: 14px 14px; }

/* section header with court-line + lime dot */
.sec-head { display: flex; align-items: center; gap: 8px; color: var(--primary);
  font-size: 22px; font-weight: 600; letter-spacing: -.01em;
  border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 14px; }
.sec-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }

/* chips / pills */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--r-pill); border: 1px solid var(--outline-var); background: var(--surface-lowest);
  font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--on-surface); }
.chip .x { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--surface); font-size: 12px; }
.chip.on { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.chip.on-lime { background: var(--lime); color: var(--night); border-color: transparent; }
.chip--soft { background: rgba(16,61,52,.08); border-color: transparent; color: var(--primary);
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-sm); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: var(--r-sm); }
.pill--lime { background: var(--lime); color: var(--primary); }
.pill--live { background: var(--surface-lowest); color: var(--primary); border: 1px solid var(--outline-var); }
.pill--live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: pulse 1.4s infinite; }
.pill--warm { background: var(--surface-high); color: var(--primary); }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.35 } }

/* --------------------------------- hero -------------------------------- */
.hero { text-align: center; background: var(--surface-low); border: 1px solid rgba(16,61,52,.15);
  border-radius: var(--r-card); padding: 34px 22px; box-shadow: var(--shadow-sm);
  transform: skewY(-1deg); }
.hero > * { transform: skewY(1deg); }
.hero .eyebrow { color: var(--on-surface-var); }
.hero h1 { color: var(--primary); margin: 8px 0 6px; }
.hero p { color: var(--on-surface-var); margin: 0 auto 22px; max-width: 22em; }

/* skewed lime CTA like the reference */
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--lime); color: var(--night); font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; font-size: 20px; padding: 18px 26px; border-radius: var(--r-pill);
  box-shadow: var(--glow); transform: skewX(-6deg); transition: transform .15s, box-shadow .15s; width: 100%; }
.cta > * { transform: skewX(6deg); display: inline-flex; align-items: center; gap: 10px; }
.cta:hover { transform: skewX(-6deg) translateY(-2px); box-shadow: 0 12px 26px rgba(223,255,63,.42); }
.cta:active { transform: skewX(-6deg) translateY(0); box-shadow: none; }
.cta svg { width: 24px; height: 24px; }

/* resume banner */
.resume { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.resume .meta { flex: 1; min-width: 0; }
.resume .meta .nm { font-weight: 700; font-size: 18px; }

/* -------------------------- format (bento) cards ----------------------- */
.fmt { position: relative; overflow: hidden; background: var(--surface-c);
  border: 1px solid var(--outline-var); border-radius: var(--r-card); padding: 20px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s; }
.fmt:hover { border-color: var(--primary-container); box-shadow: var(--shadow); }
.fmt:active { transform: translateY(1px); }
.fmt .ghost { position: absolute; right: -14px; top: -14px; color: var(--surface-dim); opacity: .5; }
.fmt .ghost svg { width: 110px; height: 110px; }
.fmt h3 { color: var(--primary); position: relative; z-index: 1; font-size: 22px; font-weight: 600; }
.fmt p { color: var(--on-surface-var); position: relative; z-index: 1; margin: 6px 0 16px; font-size: 15px; line-height: 21px; }
.fmt .foot { margin-top: auto; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.fmt .go { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--primary-container);
  display: grid; place-items: center; color: var(--primary); transition: background .15s, color .15s; }
.fmt:hover .go { background: var(--primary); color: var(--surface); }
.fmt.locked { opacity: .55; }

/* ----------------------------- court cards ----------------------------- */
.court { position: relative; overflow: hidden; border-radius: var(--r-card); padding: 18px;
  box-shadow: var(--shadow); }
.court + .court { margin-top: var(--gutter); }
.court--active { background: var(--primary); color: var(--on-primary); }
.court--idle { background: var(--surface-lowest); color: var(--on-surface); border: 1px solid var(--outline-var); box-shadow: var(--shadow-sm); }
.court--done { background: var(--primary-container); color: var(--on-primary); }
.court .ghost { position: absolute; right: 8px; top: 4px; opacity: .1; }
.court .ghost svg { width: 120px; height: 120px; }
.court-head { display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid rgba(223,255,63,.3); padding-bottom: 8px; margin-bottom: 12px; position: relative; z-index: 1; }
.court--idle .court-head { border-bottom-color: var(--outline-var); }
.court-head h3 { font-size: 20px; font-weight: 700; }
.court--active .court-head h3, .court--done .court-head h3 { color: var(--lime); }
.court--idle .court-head h3 { color: var(--primary); }
.court-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  position: relative; z-index: 1; margin: 6px 0 14px; }
.court-mid .num { font-size: 56px; font-weight: 800; letter-spacing: -.04em; text-align: center; font-variant-numeric: tabular-nums; }
.court-mid .dash { opacity: .4; font-size: 30px; text-align: center; }
.court--idle .court-mid { opacity: .5; }
.court-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; z-index: 1;
  border-top: 1px solid rgba(223,255,63,.25); padding-top: 12px; }
.court--idle .court-foot { border-top-color: var(--outline-var); }
.court-foot .r { text-align: right; }
.court-foot .who { font-size: 15px; font-weight: 600; }
.court-foot .who.win { color: var(--lime); }
.serve { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; }
.serve .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 8px rgba(223,255,63,.8); }
.court-tap { position: relative; z-index: 1; margin-top: 12px; font-size: 12px; text-align: center;
  text-transform: uppercase; letter-spacing: .05em; opacity: .75; }

/* bench + top3 */
.bench h3, .top3 h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.bench h3 { color: var(--primary); }
.bench li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--surface-high); }
.bench li:last-child { border-bottom: none; }
.bench .rest { font-size: 12px; color: var(--outline); text-transform: uppercase; letter-spacing: .04em; }
.top3 h3 { color: var(--lime); justify-content: space-between; }
.top3 .row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; }
.top3 .row.lead { background: rgba(16,61,52,.5); border: 1px solid var(--primary-container); }
.top3 .rank { width: 22px; text-align: center; font-weight: 700; }
.top3 .row.lead .rank, .top3 .row.lead .pts { color: var(--lime); }
.top3 .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top3 .pts { font-weight: 700; }
.top3 .muted { color: var(--secondary-dim); }

/* ------------------------------ standings ------------------------------ */
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--outline-var); border-radius: var(--r-card); background: var(--surface-lowest);
  box-shadow: var(--shadow-sm); }
.lb-row + .lb-row { margin-top: 10px; }
.lb-row .rank { width: 30px; text-align: center; font-weight: 800; font-size: 20px; color: var(--primary); }
.lb-row .grow { flex: 1; min-width: 0; }
.lb-row .nm { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .sub { font-size: 12px; color: var(--on-surface-var); margin-top: 2px; }
.lb-row .pts { font-weight: 800; font-size: 22px; color: var(--primary); font-variant-numeric: tabular-nums; }
.lb-row.p1 { background: var(--lime); border-color: transparent; }
.lb-row.p1 .rank, .lb-row.p1 .pts { color: var(--night); }
.lb-row.p2 { background: var(--surface-c); }
.lb-row.p3 { background: var(--surface-high); }
.bar { height: 7px; background: var(--surface-high); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--primary-container); }
.lb-row.p1 .bar { background: rgba(13,20,17,.15); }
.lb-row.p1 .bar > i { background: var(--night); }

/* --------------------- schedule / draw (scorecard) --------------------- */
.sch-round { border: 1px solid var(--outline-var); border-radius: var(--r-card); overflow: hidden;
  margin-bottom: 12px; background: var(--surface-lowest); }
.sch-round.cur { box-shadow: var(--shadow-sm); border-color: var(--primary-container); }
.sch-head { display: flex; align-items: center; gap: 8px; background: var(--surface-c);
  border-bottom: 1px solid var(--outline-var); padding: 8px 12px; font-weight: 700; color: var(--primary); }
.sch-round.cur .sch-head { background: var(--primary); color: var(--lime); }
.rnd-tag { margin-left: auto; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 6px; }
.rnd-tag.now { background: var(--lime); color: var(--night); }
.rnd-tag.done { background: rgba(16,61,52,.12); color: var(--primary); }
.rnd-tag.up { background: var(--surface-high); color: var(--on-surface-var); }
.sch-row { display: grid; grid-template-columns: 46px 1fr auto 1fr; align-items: center; gap: 6px;
  padding: 9px 10px; border-top: 1px solid var(--surface-high); }
.sch-row:first-of-type { border-top: none; }
.sch-court { font-size: 10px; text-transform: uppercase; letter-spacing: .02em; color: var(--on-surface-var); }
.sch-team { font-weight: 600; font-size: 13.5px; }
.sch-team.r { text-align: right; }
.sch-team.w { color: var(--primary-container); }
.sch-sc { font-weight: 800; font-size: 18px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sch-sc i { font-style: normal; color: var(--outline); padding: 0 3px; }
.sch-vs { font-size: 11px; color: var(--outline); }
.sch-bench { font-size: 11px; color: var(--on-surface-var); padding: 8px 12px; border-top: 1px dashed var(--outline-var); }

/* segmented / stepper / range / field (setup) */
.seg { display: flex; border: 1px solid var(--outline-var); border-radius: var(--r-btn); overflow: hidden; background: var(--surface-lowest); }
.seg button { flex: 1; padding: 12px 8px; font-weight: 700; font-size: 14px; color: var(--on-surface-var);
  border-right: 1px solid var(--outline-var); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--primary); color: var(--surface); }
.seg button svg { width: 18px; height: 18px; }
.stepper { display: flex; border: 1px solid var(--outline-var); border-radius: var(--r-btn); overflow: hidden; background: var(--surface-lowest); }
.stepper button { width: 54px; font-size: 26px; font-weight: 700; color: var(--primary); background: var(--surface-low); }
.stepper button:active { background: var(--lime); }
.stepper .val { flex: 1; display: grid; place-items: center; font-size: 26px; font-weight: 800;
  border-left: 1px solid var(--outline-var); border-right: 1px solid var(--outline-var); font-variant-numeric: tabular-nums; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--on-surface-var); margin-bottom: 9px; display: block; }
.field { width: 100%; padding: 14px 16px; border: 1px solid var(--outline-var); border-radius: var(--r-btn);
  background: var(--surface-lowest); font-weight: 600; }
.field::placeholder { color: var(--outline); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: var(--r-pill);
  background: var(--surface-high); border: 1px solid var(--outline-var); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -8px;
  border-radius: 50%; background: var(--lime); border: 2px solid var(--night); box-shadow: var(--shadow-sm); cursor: pointer; }
.range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--lime); border: 2px solid var(--night); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--on-surface-var); margin-top: 6px; padding: 0 2px; }

/* ---------------------- night-court full-screen scorer ----------------- */
.scorer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--night); color: var(--ivory);
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 16px 16px; }
.scorer-head { display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 14px) var(--margin) 14px; border-bottom: 1px solid var(--primary-container); }
.scorer-head .iconbtn { color: var(--secondary-dim); }
.scorer-head .mid { text-align: center; }
.scorer-head .mid .lbl { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary-dim); }
.scorer-head .mid .tm { font-weight: 700; font-size: 22px; color: var(--lime); font-variant-numeric: tabular-nums; margin-top: 2px; }
.scorer-body { flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--margin); max-width: 520px; margin: 0 auto; width: 100%; gap: 18px; }
.score-stack { transform: skewX(-5deg); border-radius: var(--r-card); overflow: hidden; }
.team-panel { background: var(--primary-container); border: 1px solid var(--primary); padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background .12s; }
.team-panel > .in { transform: skewX(5deg); display: flex; align-items: center; justify-content: space-between; width: 100%; }
.team-panel .name { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.team-panel .val { font-size: 84px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.team-panel.active .name, .team-panel.active .val { color: var(--ivory); }
.team-panel:not(.active) .name, .team-panel:not(.active) .val { color: var(--secondary-dim); }
.team-panel.flash { background: #16493c; }
.score-net { height: 4px; background: var(--night); }
.score-net > i { display: block; height: 1px; background: var(--surface-tint); margin-top: 1px; }
.team-panel .serve-tag { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.team-panel .serve-tag .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 8px rgba(223,255,63,.6); animation: pulse 1.4s infinite; }
.scorer-controls { display: flex; gap: var(--gutter); padding: 0 var(--margin) calc(20px + var(--safe-b)); max-width: 520px; margin: 8px auto 0; width: 100%; }
.ctrl { border-radius: var(--r-card); padding: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s; }
.ctrl:active { transform: translateY(-2px) scale(.98); }
.ctrl svg { width: 26px; height: 26px; }
.ctrl-minus { flex: 1; background: var(--surface-tint); color: var(--ivory); border: 1px solid var(--outline); }
.ctrl-point { flex: 2; background: var(--lime); color: var(--night); text-transform: uppercase; letter-spacing: .03em;
  font-size: 20px; box-shadow: 0 4px 20px rgba(223,255,63,.2); }
.scorer-target { text-align: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary-dim); }
.scorer-save { margin: 0 var(--margin); }

/* ---------------------------- champion / share ------------------------- */
.champ { position: relative; text-align: center; padding: 34px var(--margin);
  background: var(--night); color: var(--ivory); overflow: hidden;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.05) 1px, transparent 0); background-size: 18px 18px; }
.champ .crown { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime);
  display: inline-flex; align-items: center; gap: 8px; }
.champ .name { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; margin: 12px 0; color: var(--ivory); }
.champ .score { font-size: 14px; color: var(--secondary-dim); font-variant-numeric: tabular-nums; }

/* -------------------------------- sheet -------------------------------- */
.sheet-scrim { position: fixed; inset: 0; background: rgba(13,20,17,.55); z-index: 70;
  display: none; align-items: flex-end; justify-content: center; }
.sheet-scrim.on { display: flex; animation: fade .18s; }
.sheet { width: 100%; max-width: var(--maxw); background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 8px var(--margin) calc(20px + var(--safe-b)); animation: sheetUp .26s cubic-bezier(.2,.8,.2,1);
  max-height: 88dvh; overflow: auto; }
.sheet .grip { width: 44px; height: 5px; background: var(--outline-var); border-radius: 3px; margin: 8px auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; font-weight: 600; width: 100%;
  border-bottom: 1px solid var(--surface-high); }
.menu-item svg { width: 22px; height: 22px; color: var(--primary); }

/* -------------------------------- toast -------------------------------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 12px + var(--safe-b)); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--night); color: var(--ivory); font-weight: 600; padding: 12px 18px; border-radius: var(--r-pill);
  box-shadow: var(--shadow); animation: toastIn .28s; max-width: 90%; display: flex; align-items: center; gap: 8px; }
.toast.win { background: var(--lime); color: var(--night); }
.toast svg { width: 18px; height: 18px; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------ confetti ------------------------------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 75; overflow: hidden; }
.confetti i { position: absolute; top: -16px; width: 10px; height: 14px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ------------------------------- loaders ------------------------------- */
.ball-load { width: 44px; height: 44px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 3px var(--night) inset; animation: bounce 1s cubic-bezier(.5,.05,.5,.95) infinite; }
@keyframes bounce { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-14px) } }
.pop { animation: pop .3s cubic-bezier(.2,1.4,.5,1); }
@keyframes pop { from { transform: scale(.7); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* -------------------------------- utils -------------------------------- */
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt-s { margin-top: 8px; } .mt { margin-top: 16px; } .mt-l { margin-top: 28px; }
.actionbar { position: sticky; bottom: 0; padding: 14px var(--margin) calc(14px + var(--safe-b));
  background: linear-gradient(to top, var(--surface) 72%, transparent); }
.has-nav .actionbar { bottom: calc(var(--nav-h) + var(--safe-b)); }
.divider { height: 2px; background: var(--primary); opacity: .15; border-radius: 2px; margin: 18px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .ball-load { animation: none !important; }
}
