/* Live courts consume Ganak's existing type, color, control and motion tokens. */
:root{--court-panel:color-mix(in srgb,var(--court) 87%,black);--court-line:color-mix(in srgb,var(--court-ink) 28%,transparent);--court-subtle:color-mix(in srgb,var(--court-ink) 85%,var(--court));--court-gap:1rem;--court-pad:1.5rem}

#liveCourts{width:min(100%,75rem);margin:0 auto;padding:2rem 1.5rem;display:grid;grid-template-columns:minmax(0,1fr);gap:1.5rem}
.court-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--court-gap)}
.court-heading h1{font-size:2rem;letter-spacing:0;line-height:1.2}
.court-heading p{margin:.375rem 0 0;color:var(--muted);font-size:.875rem}
.court-heading p[data-state=error]{color:var(--warning)}
.court-heading button{flex:none;white-space:nowrap}
.court-switch{display:flex;flex-wrap:wrap;background:var(--chipS);padding:.375rem;border:1px solid var(--line);border-radius:var(--radius);width:min(100%,26rem);gap:.375rem}
.court-switch button{flex:1;display:flex;justify-content:center;align-items:center;gap:.5rem;min-height:3rem;padding:.625rem .75rem;font-weight:600;white-space:nowrap;color:var(--muted);border-radius:var(--small-radius)}
.court-switch button:hover{background:var(--hover)}
.court-switch button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.court-live-dot{height:.375rem;width:.375rem;flex:none;border-radius:50%;background:var(--win)}
#liveCourtCards{display:grid;gap:var(--court-gap)}
.live-court{background:var(--court);color:var(--court-ink);border-radius:var(--radius);overflow:hidden;min-width:0;box-shadow:var(--shadow)}
.live-court-head{display:flex;justify-content:space-between;align-items:center;gap:var(--court-gap);padding:var(--court-pad)}
.live-court-head h2{font-size:1.25rem;line-height:1.3;letter-spacing:0}
.live-court-head p{font-size:.875rem;color:var(--court-subtle);margin:.25rem 0 0}
.live-indicator{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--court-line);padding:.25rem .625rem;border-radius:var(--small-radius);font-size:.875rem;font-weight:600;white-space:nowrap}
.live-indicator>span,.live-serving i{width:.5rem;height:.5rem;border-radius:50%;background:var(--ball);flex:none}
.live-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--court-gap);padding:0 var(--court-pad)}
.live-side{min-width:0;background:var(--court-panel);border:1px solid var(--court-line);border-radius:var(--small-radius);padding:var(--court-pad);display:flex;flex-direction:column;gap:2.5rem}
.live-player{min-height:4.25rem}
.live-player h3{font:600 clamp(1.25rem,2.2vw,1.75rem)/1.3 var(--body);letter-spacing:0;text-wrap:initial;overflow-wrap:normal;word-break:normal}
.live-serving{display:flex;align-items:center;gap:.375rem;margin-top:.5rem;font-size:.875rem;color:var(--court-subtle)}
.live-numbers{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--court-gap);font-variant-numeric:tabular-nums}
.live-numbers>div{display:grid;gap:.5rem;text-align:center}
.live-numbers span{font-size:.875rem;color:var(--court-subtle)}
.live-numbers strong{font-size:clamp(4rem,7vw,6rem);line-height:1;font-weight:700;min-width:1.4em}
.live-points strong{background:var(--ball);color:var(--ball-ink);border-radius:var(--small-radius);padding:.125em .2em;margin-top:-.125em}
.live-court-foot{display:flex;justify-content:space-between;align-items:center;gap:var(--court-gap);padding:1rem var(--court-pad)}
.live-situation{font-size:.875rem;color:var(--court-subtle)}
.court-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-left:auto}
.court-actions .share-summary{font:600 .875rem/1.5 var(--body);background:none;min-height:2.75rem;padding:.625rem 1rem;border-radius:var(--radius);text-decoration:none;color:var(--court-ink);border-color:var(--court-line)}
.court-actions .share-summary:hover{background:color-mix(in srgb,var(--court-ink) 12%,transparent)}
.court-action{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;color:var(--court-ink);border:1px solid var(--court-line);font-size:.875rem;font-weight:600;white-space:nowrap;min-height:2.75rem}
.court-action:hover{background:color-mix(in srgb,var(--court-ink) 12%,transparent)}
.live-court :is(button,a):focus-visible{outline-color:var(--ball)}
/* Keep the score itself dominant, with one quiet surface per court. */
.live-side{background:transparent;border:0;border-radius:0}
.live-side+.live-side{border-left:1px solid var(--court-line)}
.both-courts .live-side+.live-side{border-left:0;border-top:1px solid var(--court-line)}
.both-courts{grid-template-columns:repeat(2,minmax(0,1fr))}
.both-courts .live-sides{grid-template-columns:minmax(0,1fr)}
.both-courts .live-side{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--court-gap);padding:1.25rem}
.both-courts .live-player{min-height:0;flex:1;min-width:0}
.both-courts .live-player h3{font-size:1.125rem}
.both-courts .live-numbers{flex:none;gap:1rem}
.both-courts .live-numbers strong{font-size:2.5rem}
.both-courts .live-court-foot{flex-wrap:wrap}.both-courts .court-actions{flex:1;justify-content:flex-end}
.live-court-empty{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.live-court-empty .live-court-head{border-bottom:1px solid var(--line)}
.live-court-empty .live-court-head>span{font-size:.875rem;color:var(--muted)}
.live-empty-body{padding:3rem var(--court-pad);display:grid;justify-items:start;gap:var(--court-gap)}
.live-empty-body h3{font-size:1.375rem}.live-empty-body p{margin:0;color:var(--muted)}
.live-empty-body .court-action{color:var(--ink);border-color:var(--line)}
.live-empty-body .court-action:hover{background:var(--hover)}
.court-home-action{display:flex;align-items:center;gap:.5rem;white-space:normal;max-width:100%}
@media(prefers-reduced-motion:no-preference){#liveCourts:not([hidden]){animation:court-enter var(--motion) ease-out}@keyframes court-enter{from{opacity:.5}to{opacity:1}}}
@media(max-width:900px){.both-courts{grid-template-columns:1fr}.both-courts .live-sides{grid-template-columns:repeat(2,minmax(0,1fr))}.both-courts .live-side{flex-direction:column;align-items:stretch;gap:1rem}.both-courts .live-player{min-height:3.5rem}}
@media(max-width:600px){
 :root{--court-pad:1rem;--court-gap:.75rem}
 #liveCourts{padding:1.25rem 1rem;gap:1rem}.court-heading{align-items:center}.court-heading h1{font-size:1.5rem}.court-heading p{font-size:.875rem}.court-heading button{font-size:.875rem;padding:.5rem .75rem}.court-switch{width:100%}
 .live-sides,.both-courts .live-sides{grid-template-columns:1fr}
 .live-side,.both-courts .live-side{flex-direction:row;flex-wrap:wrap;align-items:center;gap:1rem;padding:1rem;min-height:7rem}
 .live-player,.both-courts .live-player{flex:1 1 7rem;min-height:0;min-width:0}
 .live-player h3,.both-courts .live-player h3{font-size:1.125rem}
 .live-numbers,.both-courts .live-numbers{flex:none;gap:.875rem}
 .live-numbers strong,.both-courts .live-numbers strong{font-size:2.25rem}
 .live-numbers span{font-size:.875rem}.live-serving{font-size:.875rem}
 .live-court-foot{padding:.75rem var(--court-pad);flex-wrap:wrap}.court-action{gap:.5rem;padding:.5rem .625rem}.court-actions{width:100%;gap:.75rem}.court-actions>*{flex:1 1 8rem}.court-actions .share-summary{padding:.5rem .625rem}
 .live-situation{font-size:.875rem;flex-basis:100%}.live-court-head{padding:1rem}.live-court-head h2{font-size:1.125rem}
 .both-courts .court-actions{flex:1 0 100%;justify-content:stretch}
 .both-courts .live-side{min-height:4.5rem;padding:.5rem .75rem}.both-courts .live-sides{gap:.5rem}.both-courts .live-court-head{padding:.75rem 1rem}.both-courts .live-court-head p{margin:.125rem 0 0}.both-courts .live-court-foot{padding:.5rem 1rem;gap:.25rem}
 .both-courts .live-court-head>div{display:flex;align-items:center;flex-wrap:wrap;gap:.25rem .625rem}.both-courts .live-court-head h2{font-size:1rem;white-space:nowrap}.both-courts .live-court-head p{margin:0;font-size:.875rem}
}
@media(max-width:360px){.live-side,.both-courts .live-side{gap:.5rem;padding:.75rem}.live-numbers,.both-courts .live-numbers{gap:.5rem}.live-numbers strong,.both-courts .live-numbers strong{font-size:2rem}}
@media(max-width:600px){
 #liveCourts{gap:.75rem;padding-top:.75rem}
 .live-side+.live-side{border-left:0;border-top:1px solid var(--court-line)}
 .live-side{min-height:5.5rem;padding:.75rem 0}
 .live-empty-body{padding:1.5rem var(--court-pad)}
}
@media(min-width:601px){.is-court-landing .sitebar{min-height:5rem}}

@media(max-width:600px){#liveCourts:has(.both-courts){padding-top:.75rem;gap:.5rem}.both-courts .live-court-head{padding:.5rem 1rem}.both-courts .live-side{padding:.375rem .75rem}#liveCourtCards.both-courts{gap:.5rem}}
