:root {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #f7fbff;
  background: #061f32;
  font-synthesis: none;
  --navy-950: #031725;
  --navy-900: #06263b;
  --blue-700: #0b5f91;
  --blue-500: #1b91d0;
  --green: #0b7a69;
  --lime: #d8f04b;
}

html, body, #root { min-height: 100%; background: var(--navy-950); }
body { color: #f7fbff; font-size: 15px; font-weight: 450; letter-spacing: -.012em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible { outline: 3px solid #58c5ff; outline-offset: 3px; }
.app-shell { isolation: isolate; background: transparent; }
.app-shell > :not(.court-backdrop) { position: relative; z-index: 1; }
.court-backdrop { z-index: 0 !important; background: #061f32; }
.court-backdrop img { filter: blur(3px) saturate(.78) contrast(1.08); opacity: .78; }
.court-color-wash { background: linear-gradient(135deg, rgba(3,23,37,.82) 0%, rgba(4,39,58,.68) 48%, rgba(4,39,58,.56) 100%); }
.court-line-art { display: none; }
.app-header { border-bottom: 1px solid rgba(139, 217, 236, .2); background: rgba(3, 22, 35, .86); box-shadow: 0 14px 45px rgba(0,0,0,.22); backdrop-filter: blur(18px); }
.brand-lockup { display: flex; align-items: center; gap: .72rem; white-space: nowrap; }
.nplus-brand-logo { display: block; width: 92px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-lockup small { color: #a6c2cc; font-size: .62rem; font-weight: 650; letter-spacing: .22em; }
.event-summary { color: #a1bbc4; font-size: .74rem; font-weight: 520; letter-spacing: .005em; }
.app-nav { border: 1px solid rgba(135,202,222,.18); border-radius: .78rem; background: rgba(5, 36, 54, .8); padding: .24rem; }
.nav-button { color: #9cbeca; font-size: .93rem !important; font-weight: 560 !important; letter-spacing: .01em; }
.nav-button:active { background: rgba(255,255,255,.08); }
.nav-button.is-active { color: #fff; background: #146f9f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 5px 16px rgba(0,0,0,.2); }

.scoreboard-stage { max-width: 1040px; width: 100%; margin: 0 auto; }
.scoreboard-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .72rem 1rem; border: 1px solid rgba(134,206,226,.2); border-radius: .72rem; background: rgba(4,30,45,.78); box-shadow: 0 12px 35px rgba(0,0,0,.18); }
.scoreboard-round { color: #f4faff; font-size: .94rem; font-weight: 610; letter-spacing: .025em; }
.scoreboard-rule { margin-left: .8rem; color: #91b5c2; font-size: .71rem; font-weight: 480; }
.scoreboard-statuses { display: flex; align-items: center; gap: .45rem; }
.status-pill { border: 1px solid rgba(132,205,255,.3); border-radius: 999px; background: rgba(18,101,151,.3); padding: .24rem .62rem; color: #bde9ff; font-size: .7rem; font-weight: 750; }
.status-pill.green { border-color: color-mix(in srgb, var(--green), white 18%); background: var(--green); color: white; }
.live-score-layout { display: flex; min-height: 0; flex: 1; flex-direction: column; justify-content: center; gap: .85rem; }
.broadcast-board { overflow: hidden; border: 1px solid rgba(142,214,234,.24); border-radius: .84rem; background: rgba(4,25,39,.94); box-shadow: 0 24px 65px rgba(0,0,0,.34); }
.broadcast-board-head, .broadcast-score-row { display: grid; grid-template-columns: minmax(0, 1fr) clamp(72px, 15vw, 150px) clamp(92px, 19vw, 185px); align-items: stretch; }
.broadcast-board-head { min-height: 2.5rem; align-items: center; border-bottom: 1px solid rgba(255,255,255,.11); color: #789eaa; font-size: .66rem; font-weight: 760; letter-spacing: .16em; }
.broadcast-board-head > span { padding: 0 1.2rem; }
.broadcast-board-head > span:nth-child(n+2) { text-align: center; }
.broadcast-score-row { min-height: clamp(104px, 20vh, 176px); border-bottom: 1px solid rgba(255,255,255,.1); }
.broadcast-score-row:last-child { border-bottom: 0; }
.broadcast-player { display: flex; min-width: 0; align-items: center; gap: clamp(.7rem, 2vw, 1.25rem); padding: 0 clamp(1rem, 3vw, 2rem); }
.broadcast-player-name { overflow: hidden; color: #f8fbfc; font-family: "Avenir Next", "Helvetica Neue", "PingFang SC", sans-serif; font-size: clamp(1.7rem, 5vw, 4.05rem); font-weight: 600; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.server-ball { width: clamp(.78rem, 1.7vw, 1.15rem); height: clamp(.78rem, 1.7vw, 1.15rem); flex: 0 0 auto; border-radius: 999px; background: rgba(205,231,77,.13); }
.server-ball.is-serving { background: var(--lime); box-shadow: 0 0 0 4px rgba(216,240,75,.12), 0 0 20px rgba(216,240,75,.48); }
.handicap-tag { flex: 0 0 auto; border-radius: 999px; background: var(--green); padding: .22rem .52rem; color: white; font-size: .66rem; font-weight: 650; }
.broadcast-game-cell, .broadcast-point-cell { position: relative; display: flex; align-items: center; justify-content: center; border-left: 1px solid rgba(255,255,255,.12); font-variant-numeric: tabular-nums; }
.broadcast-game-cell { background: rgba(8,41,61,.76); }
.broadcast-point-cell { background: linear-gradient(145deg, #126da2, #1594c6); box-shadow: inset 10px 0 24px rgba(0,0,0,.12); }
.broadcast-game-cell strong, .broadcast-point-cell strong { font-family: "DIN Alternate", "Arial Narrow", "Avenir Next Condensed", sans-serif; font-size: clamp(3rem, 10vw, 7.5rem); font-stretch: condensed; font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.score-label { position: absolute; top: .72rem; left: .8rem; color: rgba(220,242,249,.55); font-size: .64rem; font-weight: 740; letter-spacing: .1em; }
.score-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.score-point-button { display: flex; min-height: 66px; touch-action: manipulation; align-items: center; justify-content: center; gap: .55rem; border: 1px solid rgba(255,255,255,.2); border-radius: .55rem; color: white; font-size: clamp(.98rem, 2.5vw, 1.2rem); font-weight: 620; letter-spacing: .025em; box-shadow: 0 10px 22px rgba(0,0,0,.18); transition: transform .06s ease, filter .06s ease; }
.score-point-button.side-a { background: linear-gradient(135deg, #0b6ca3, #087bac); }
.score-point-button.side-b { background: var(--green); }
.score-point-button:active { transform: translateY(1px) scale(.988); filter: brightness(1.14); }
.touch-note { margin: -.25rem 0 0; text-align: center; color: #83a9b6; font-size: .72rem; font-weight: 560; }
.scoreboard-tools { display: flex; justify-content: center; gap: .65rem; padding: .55rem; border: 1px solid rgba(135,202,222,.16); border-radius: .7rem; background: rgba(3,25,39,.72); }
.scoreboard-tool-button { display: flex; align-items: center; gap: .4rem; border: 1px solid rgba(152,215,232,.22); border-radius: .6rem; background: rgba(255,255,255,.06); padding: .7rem 1.2rem; color: #bfd7de; font-size: .88rem; font-weight: 650; }
.scoreboard-tool-button.danger { color: #b0c4ca; }
.scoreboard-tool-button:disabled { opacity: .28; }
.match-start-card { border: 1px solid rgba(135,205,225,.2); background: rgba(4,28,43,.86); box-shadow: 0 24px 60px rgba(0,0,0,.28); color: white; }
.match-start-card .text-zinc-500, .match-start-card .text-zinc-600 { color: #9ab8c2 !important; }
.match-start-card .text-zinc-400 { color: #7898a3 !important; }
.match-start-card .text-\[\#1f5b46\], .match-start-card .text-\[\#435149\] { color: white !important; }
.first-server-button { border: 1px solid rgba(255,255,255,.18); color: white; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.first-server-button.side-a { background: linear-gradient(145deg, #0a6da5, #09537c); }
.first-server-button.side-b { background: var(--green); }
.first-server-button span { color: white !important; }

/* Legacy schedule / standings / records: one green, neutral surfaces, tighter type. */
.bg-\[\#193f32\] { background-color: var(--green) !important; }
.bg-\[\#e3eee8\], .bg-\[\#e5eee8\], .bg-\[\#edf2ee\], .bg-\[\#edf3ef\], .bg-\[\#eef3ef\] { background-color: #edf3f6 !important; }
.text-\[\#1f5b46\], .text-\[\#245b47\], .text-\[\#2f6b56\], .text-\[\#315746\], .text-\[\#425148\], .text-\[\#435149\], .text-\[\#48564e\], .text-\[\#536158\] { color: var(--green) !important; }
.border-\[\#2f6b56\] { border-color: var(--green) !important; }
.focus\:border-\[\#2f6b56\]:focus { border-color: var(--green) !important; }
.accent-\[\#245b47\] { accent-color: var(--green) !important; }
.font-mono { font-family: "DIN Alternate", "Arial Narrow", "Avenir Next Condensed", sans-serif !important; }
.font-bold { font-weight: 650 !important; }
.font-semibold { font-weight: 560 !important; }
.rounded-2xl { border-radius: .6rem !important; }
.rounded-xl { border-radius: .5rem !important; }
[class*="rounded-[1.75rem]"] { border-radius: .65rem !important; }

@media (max-width: 640px) {
  .nplus-brand-logo { width: 76px; height: 25px; }
  .event-summary { font-size: .69rem; }
  .app-nav { width: 100%; }
  .nav-button { padding: .55rem .15rem; font-size: .8rem; }
  .scoreboard-stage { padding: .55rem; gap: .55rem; }
  .scoreboard-meta { padding: .55rem .7rem; }
  .scoreboard-round { font-size: .87rem; }
  .scoreboard-rule { display: none; }
  .status-pill { padding: .18rem .45rem; font-size: .61rem; }
  .broadcast-board-head, .broadcast-score-row { grid-template-columns: minmax(0, 1fr) 64px 88px; }
  .broadcast-board-head { min-height: 2rem; font-size: .55rem; }
  .broadcast-board-head > span { padding: 0 .55rem; }
  .broadcast-score-row { min-height: 92px; }
  .broadcast-player { gap: .55rem; padding: 0 .7rem; }
  .broadcast-player-name { font-size: clamp(1.45rem, 8.2vw, 2.25rem); }
  .server-ball { width: .68rem; height: .68rem; }
  .handicap-tag { display: none; }
  .broadcast-game-cell strong, .broadcast-point-cell strong { font-size: 2.8rem; }
  .score-label { top: .4rem; left: .45rem; font-size: .5rem; }
  .score-actions { gap: .55rem; }
  .score-point-button { min-height: 62px; border-radius: .7rem; font-size: .98rem; }
  .scoreboard-tools { padding: .4rem; }
  .scoreboard-tool-button { padding: .62rem .86rem; font-size: .78rem; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .app-header > div { padding-top: .4rem; padding-bottom: .4rem; }
  .scoreboard-stage { gap: .45rem; padding-top: .45rem; padding-bottom: .45rem; }
  .broadcast-score-row { min-height: 80px; }
  .score-point-button { min-height: 48px; }
  .touch-note { display: none; }
  .scoreboard-tool-button { padding-top: .45rem; padding-bottom: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
