/* Night Court: decorative only. Keep statistics opaque and Yahoo branding untouched. */
:root {
  --court-purple: rgb(108 44 216 / .08);
  --court-ice: rgb(45 159 211 / .09);
  --court-edge: rgb(95 63 171 / .22);
  --court-art: .19;
  --court-shadow: 0 12px 32px rgb(36 54 88 / .06);
}
:root[data-theme="dark"] {
  --court-purple: rgb(118 53 228 / .19);
  --court-ice: rgb(100 199 245 / .10);
  --court-edge: rgb(170 134 255 / .32);
  --court-art: .20;
  --court-shadow: 0 14px 36px rgb(0 0 0 / .17);
}
body {
  background-color: var(--ui-page);
  background-image: radial-gradient(ellipse 650px 510px at 98% 130px, var(--court-purple), transparent 76%),
    radial-gradient(ellipse 460px 640px at 0 470px, var(--court-ice), transparent 75%);
  background-repeat: no-repeat;
}
.page > header, .topbar { position: relative; }
.page > header::after, .topbar::after {
  content: ""; position: absolute; pointer-events: none; height: 1px;
  left: 0; right: 0; bottom: -1px;
  background: linear-gradient(90deg, transparent, var(--ui-purple) 30%, var(--ui-ice) 68%, transparent);
  opacity: .6;
}
.topbar { background: var(--ui-surface); }
.hero { position: relative; isolation: isolate; }
.hero-copy { position: relative; }
.hero h1 em { color: var(--ui-purple); }
[data-theme="dark"] .hero h1 em {
  background: linear-gradient(110deg, #b59aff 12%, #d6c9ff 62%, #b7e8ff);
  color: transparent; background-clip: text; -webkit-background-clip: text;
}
.page .primary {
  position: relative; background: linear-gradient(115deg, #7130db, #5920b9);
  border: 1px solid rgb(198 173 255 / .4);
  box-shadow: 0 7px 26px var(--court-purple), inset 0 1px rgb(255 255 255 / .15);
}
.scoreboard {
  border-color: var(--court-edge); box-shadow: var(--court-shadow), 0 0 42px var(--court-purple);
  border-top: 2px solid var(--ui-purple);
}
.scoreboard .board-top { border-bottom-color: var(--court-edge); }
.scoreboard .board-kicker { color: var(--ui-ice); }
.scoreboard .board-bottom strong { color: var(--ui-ice); }
.court-mark { display: none; }
.features { gap: 18px; }
.features article, .features article:first-child, .features article:last-child {
  padding: 26px; border: 1px solid var(--ui-line); border-top: 2px solid var(--court-edge);
  border-radius: 12px; background: var(--ui-surface); box-shadow: var(--court-shadow);
}
.feature-number { color: var(--ui-ice); font-size: 13px; }
.launch { background: linear-gradient(120deg, var(--ui-soft), var(--ui-surface)); border-color: var(--court-edge); }
.sidebar { background: linear-gradient(180deg, var(--ui-surface), var(--ui-page) 850px); }
.sidebar-bottom .court { border-color: var(--court-edge); }
.sidebar-bottom .court::after, .sidebar-bottom .court i { border-color: var(--court-edge); }
.nav-active { border-left: 2px solid var(--ui-purple); }
.league-switcher { border-color: var(--court-edge); box-shadow: var(--court-shadow); }
.page-heading { position: relative; isolation: isolate; }
.page-heading .eyebrow { display: flex; align-items: center; gap: 9px; color: var(--ui-ice); }
.page-heading .eyebrow::before {
  content: ""; width: 18px; height: 2px; flex-shrink: 0;
  background: var(--ui-ice); box-shadow: 0 0 10px var(--court-ice);
}
.panel { box-shadow: var(--court-shadow); }
.matrix-panel { border-top: 2px solid var(--court-edge); }
.metric { position: relative; box-shadow: var(--court-shadow); border-top-color: var(--court-edge); }
.metric.primary {
  background: linear-gradient(125deg, #7130db, #5620aa);
  border: 1px solid rgb(197 163 255 / .45); box-shadow: 0 9px 27px var(--court-purple);
}
.metric.primary::after {
  content: ""; position: absolute; pointer-events: none; width: 42px; height: 2px;
  bottom: 0; right: 18px; background: #b7e8ff; box-shadow: 0 0 12px rgb(183 232 255 / .4);
}
.ranking-panel .section-no, .profile-panel .section-no { color: var(--ui-ice); }
.matrix-view-toggle button[aria-pressed="true"] { box-shadow: 0 3px 12px var(--court-purple); }
.score-button { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.score-button:focus-visible { outline-color: var(--ui-ice); }
.opponent-card, .languages button, .theme-toggle, .arrow, select {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.features article, .page .primary { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
select:focus-visible { border-color: var(--ui-ice); }
@media (hover: hover) and (pointer: fine) {
  .features article:hover { transform: translateY(-3px); border-color: var(--court-edge); }
  .page .primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px var(--court-purple); }
  .score-button:hover { box-shadow: inset 0 0 0 1px currentColor; }
}
@keyframes court-arrive { from { opacity: .55; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .preview-wrap { animation: court-arrive .45s ease-out both; }
  .preview-wrap { animation-delay: .08s; }
  .summary .metric { animation: court-arrive .28s ease-out both; }
  .summary .metric:nth-child(2) { animation-delay: .035s; }
  .summary .metric:nth-child(3) { animation-delay: .07s; }
  .summary .metric:nth-child(4) { animation-delay: .105s; }
  dialog[open] { animation: court-arrive .18s ease-out; }
}
@media (max-width: 1000px) {
}
@media (max-width: 780px) {
  .features { gap: 18px; }
  .features article, .features article:first-child, .features article:last-child { padding: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .preview-wrap, .summary .metric, dialog[open] { animation: none; }
  .features article, .page .primary, .score-button, .opponent-card, .languages button, .theme-toggle, .arrow, select { transition: none; }
  .features article:hover, .page .primary:hover { transform: none; }
}


/* Arena refresh: brighter courtside lighting, player watermarks, quieter data textures. */
:root {
  --court-purple: rgb(116 55 222 / .18);
  --court-ice: rgb(53 173 226 / .18);
  --court-edge: rgb(125 70 213 / .4);
  --court-art: .48;
  --court-line-art: url('/assets/court-lines-light.svg');
  --court-texture: url('/assets/court-texture-light.svg');
  --court-orb-opacity: .75;
}
:root[data-theme="dark"] {
  --court-purple: rgb(130 53 246 / .32);
  --court-ice: rgb(81 198 255 / .23);
  --court-edge: rgb(172 128 255 / .55);
  --court-art: .5;
  --court-line-art: url('/assets/court-lines.svg?v=arena1');
  --court-texture: url('/assets/court-texture-dark.svg');
  --court-orb-opacity: 1;
}
body { isolation: isolate; }
.court-atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.court-orb { position: absolute; display: block; width: 680px; height: 680px; border-radius: 50%; opacity: var(--court-orb-opacity); }
.court-orb-purple { right: -400px; top: 6%; background: radial-gradient(circle, var(--court-purple), transparent 68%); }
.court-orb-ice { left: -420px; top: 45%; background: radial-gradient(circle, var(--court-ice), transparent 68%); }
.page > header::after, .topbar::after {
  height: 2px; opacity: .95;
  background: linear-gradient(90deg, transparent, #9255eb 24%, #b8a0ff 45%, #8cdfff 72%, transparent);
  box-shadow: 0 0 16px var(--court-purple), 0 3px 18px var(--court-ice);
}
.scoreboard, .panel, .metric:not(.primary), .summary .metric:nth-child(2) {
  background-image: var(--court-texture); background-size: 360px 360px; background-position: right top;
}
.scoreboard, .matrix-panel { border-top-color: var(--ui-purple); box-shadow: var(--court-shadow), 0 0 30px var(--court-purple); }
.panel, .scoreboard, .metric, .features article { position: relative; isolation: isolate; }
.metric.primary { box-shadow: 0 0 28px var(--court-purple), 0 8px 28px var(--court-purple); }
.metric.primary::after { width: 65px; height: 3px; box-shadow: 0 0 15px rgb(155 223 255 / .65); }
.page .primary { box-shadow: 0 0 30px var(--court-purple), 0 8px 24px var(--court-purple); }
.opponent-card { background-image: var(--court-texture); background-size: 360px; background-position: right center; }
.score-button { background-image: radial-gradient(ellipse at top right, rgb(155 223 255 / .09), transparent 72%); }
.league-switcher { border-color: var(--court-edge); box-shadow: var(--court-shadow), 0 0 22px var(--court-purple); }
.nav-active { box-shadow: -5px 0 20px var(--court-purple); }
.brand img, .league-icon img { filter: drop-shadow(0 0 11px var(--court-purple)); }
.match-table { background: var(--court-texture) right top / 320px; }
/* One matchup header: two teams and a clearly separated score. Context remains accessible. */
#match-dialog { padding: 18px 24px 20px; border-color: var(--court-edge); box-shadow: 0 0 42px var(--court-purple), 0 28px 90px rgb(0 0 0 / .25); }
#match-dialog .dialog-top { height: 0; position: sticky; top: 0; z-index: 2; justify-content: flex-end; align-items: flex-start; padding: 0; margin: 0; border: 0; background: transparent; }
#match-dialog .close { width: 44px; height: 44px; flex-shrink: 0; background: var(--ui-soft); }
#match-dialog .match-hero { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 14px; padding: 48px 0 22px; margin: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--court-edge); }
#match-dialog .match-team { min-width: 0; gap: 10px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
#match-dialog .match-team .avatar { width: 52px; height: 52px; font-size: 16px; border: 1px solid var(--court-edge); box-shadow: 0 0 22px var(--court-purple); }
#match-dialog .match-score strong { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 44px; letter-spacing: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
#match-dialog .score-separator { font-size: .6em; color: var(--ui-faint); font-weight: 400; }
#match-dialog .has-ties strong { font-size: 34px; gap: 8px; }
#match-dialog .dialog-footer { margin-top: 16px; }
@keyframes arena-glow-drift { from { transform: translateY(-20px) scale(.95); } to { transform: translateY(30px) scale(1.08); } }
@media (prefers-reduced-motion: no-preference) {
  .court-orb { animation: arena-glow-drift 9s ease-in-out infinite alternate; }
  .court-orb-ice { animation-delay: -4s; animation-duration: 12s; }
}
@media (hover: hover) and (pointer: fine) {
  .score-button:hover { box-shadow: 0 0 14px var(--court-ice), inset 0 0 0 1px currentColor; }
  .features article:hover { box-shadow: 0 0 28px var(--court-purple); }
  .page .primary:hover { box-shadow: 0 0 38px var(--court-purple), 0 8px 24px var(--court-purple); }
}
@media (max-width: 1000px) {
}
@media (max-width: 780px) {
  .court-orb-purple { right: -500px; }
  .court-orb-ice { left: -510px; }
  #match-dialog { width: calc(100% - 20px); padding: 12px 16px 18px; }
  #match-dialog .match-hero { gap: 8px; padding-top: 48px; padding-bottom: 18px; margin-bottom: 8px; }
  #match-dialog .match-team { font-size: 13px; }
  #match-dialog .match-score strong { font-size: 38px; gap: 9px; }
  #match-dialog .has-ties strong { font-size: 29px; gap: 6px; }
  #match-dialog .match-team .avatar { width: 44px; height: 44px; font-size: 14px; }
}
@media (max-width: 380px) {
  #match-dialog { padding-left: 12px; padding-right: 12px; }
  #match-dialog .match-team { font-size: 12px; }
  #match-dialog .match-score strong { font-size: 34px; gap: 8px; }
  #match-dialog .has-ties strong { font-size: 26px; gap: 5px; }
  #match-dialog .match-team .avatar { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .court-orb { animation: none; } }


/* One centered player per data surface; no tiled basketball lines or repeated row artwork. */
:root { --player-ink: #7130db; --player-opacity: .065; --player-mask: url('/assets/royce-player-silhouette.png'); }
:root[data-theme="dark"] { --player-ink: #b7e8ff; --player-opacity: .065; }
.scoreboard, .panel, .metric:not(.primary), .summary .metric:nth-child(2), .opponent-card, .match-table { background-image: none; }
#mobile-results, .matrix-scroll, .ranking-scroll, #profile, #match-content { position: relative; isolation: isolate; }
.scoreboard::before, #mobile-results::before, .matrix-scroll::before, .ranking-scroll::before, #profile::before, #match-content::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: min(82%, 460px); height: min(75%, 520px); transform: translate(-50%, -50%);
  background: var(--player-ink); opacity: var(--player-opacity);
  -webkit-mask: var(--player-mask) center / contain no-repeat;
  mask: var(--player-mask) center / contain no-repeat;
  pointer-events: none; z-index: -1;
}
#match-content::before { top: 59%; height: 58%; }
#mobile-results::before { width: 88%; height: min(75%, 660px); }
/* Every displayed score uses a short hyphen with spacing independent of font kerning. */
.scoreline {
  display: inline-flex; align-items: center; justify-content: center; gap: .18em;
  white-space: nowrap; letter-spacing: normal; font-variant-numeric: tabular-nums; vertical-align: baseline;
}
.scoreline > .score-number { display: inline-block; color: inherit; margin: 0; }
.scoreline > .score-separator {
  display: inline-block; font-size: .65em; line-height: 1; font-weight: 400;
  color: inherit; opacity: .8; letter-spacing: 0; margin: 0;
}
.your-result strong .scoreline, .your-result strong .scoreline > span,
.page .score .scoreline, .page .score .scoreline > span { margin: 0; color: inherit; }
#ranking .scoreline { gap: .14em; }
#match-dialog .match-score strong { gap: 12px; }
#match-dialog .score-separator { font-size: .6em; letter-spacing: 0; }
@media (max-width: 700px) {
  .scoreline { gap: .18em; }
  #ranking .scoreline { gap: .1em; }
  #match-dialog .match-score strong { gap: 10px; }
  #match-dialog .has-ties strong { gap: 7px; }
}
@media (max-width: 380px) {
  #match-dialog .match-score strong { gap: 9px; }
  #match-dialog .has-ties strong { gap: 6px; }
}




/* Courtside details: distinct basketball motifs outside the player-marked data tables. */
:root {
  --arena-art: #7544bb;
  --arena-detail-opacity: .27;
  --arena-dot: rgb(93 71 151 / .18);
  --half-court: url('/assets/court-half.svg');
  --hoop-art: url('/assets/court-hoop.svg?v=2');
  --play-art: url('/assets/court-play.svg');
  --ball-art: url('/assets/court-ball.svg');
  --rise-art: url('/assets/court-rise.svg');
}
:root[data-theme="dark"] { --arena-art: #a9dfff; --arena-detail-opacity: .33; --arena-dot: rgb(153 208 244 / .19); }
.court-sideline {
  position: absolute; width: 320px; height: 440px; left: -210px; top: 36%;
  background: linear-gradient(150deg, var(--ui-purple), var(--ui-ice));
  -webkit-mask: var(--half-court) center / contain no-repeat; mask: var(--half-court) center / contain no-repeat;
  opacity: .26; transform: rotate(-24deg); pointer-events: none;
}
.court-lights {
  position: absolute; width: 360px; height: 420px; right: -240px; top: 57%;
  border: 1px solid var(--court-edge); border-radius: 50%; transform: rotate(-28deg);
  box-shadow: -12px 0 35px var(--court-purple), inset 14px 0 35px var(--court-ice);
  opacity: .5;
}
.court-lights::after { content: ''; position: absolute; inset: 25px; border: 1px solid var(--court-edge); border-radius: inherit; }
.hero::before {
  content: ''; position: absolute; width: 440px; height: 400px; right: 6%; top: 0;
  background: linear-gradient(135deg, var(--ui-purple), var(--arena-art));
  -webkit-mask: var(--half-court) center / contain no-repeat; mask: var(--half-court) center / contain no-repeat;
  opacity: .23; transform: rotate(26deg); pointer-events: none; z-index: -1;
}
.hero::after {
  content: ''; position: absolute; width: 110px; height: 84px; left: 34%; bottom: 38px;
  background-image: radial-gradient(circle, var(--arena-dot) 1px, transparent 1.5px);
  background-size: 10px 10px; -webkit-mask-image: linear-gradient(135deg,#000,transparent); mask-image: linear-gradient(135deg,#000,transparent);
  pointer-events: none; z-index: -1;
}
.page-heading::after {
  content: ''; position: absolute; width: 235px; height: 165px; top: 0; right: 11%;
  background: linear-gradient(115deg, var(--ui-purple), var(--arena-art) 75%);
  -webkit-mask: var(--hoop-art) center / contain no-repeat; mask: var(--hoop-art) center / contain no-repeat;
  opacity: var(--arena-detail-opacity); pointer-events: none; z-index: -1;
}
.page-heading::before { content: none; }
.sidebar-note::after { content: none; }
.league-player {
  display: block; width: 44px; height: 44px; background: linear-gradient(135deg, var(--ui-purple), var(--ui-ice));
  -webkit-mask: var(--ball-art) center / contain no-repeat; mask: var(--ball-art) center / contain no-repeat;
}
.panel::before { content: none; }
.metric::before {
  content: ''; position: absolute; width: 72px; height: 80px; left: auto; top: auto; right: 7px; bottom: 5px;
  background: var(--arena-art); -webkit-mask: var(--metric-art) center / contain no-repeat; mask: var(--metric-art) center / contain no-repeat;
  opacity: .13; pointer-events: none; z-index: -1; transform: none;
}
.metric:nth-child(1) { --metric-art: var(--play-art); }
.metric:nth-child(2) { --metric-art: var(--ball-art); }
.metric:nth-child(3) { --metric-art: var(--hoop-art); }
.metric:nth-child(4) { --metric-art: var(--rise-art); }
.metric.primary::before { background: #d9edff; opacity: .24; }
.features article { overflow: hidden; }
.features article::before {
  content: ''; position: absolute; left: auto; top: auto; right: -9px; bottom: -9px; width: 124px; height: 103px;
  background: var(--arena-art); -webkit-mask: var(--feature-art) center / contain no-repeat; mask: var(--feature-art) center / contain no-repeat;
  opacity: .15; pointer-events: none; z-index: -1; transform: rotate(-6deg);
}
.features article:nth-child(1) { --feature-art: var(--play-art); }
.features article:nth-child(2) { --feature-art: var(--hoop-art); }
.features article:nth-child(3) { --feature-art: var(--rise-art); }
.features .feature-foot { position: relative; z-index: 1; }
@media (max-width: 1100px) { .page-heading::after { right: 8%; width: 180px; opacity: .16; } }
@media (max-width: 780px) {
  .court-sideline { left: -252px; opacity: .19; }
  .court-lights { right: -285px; opacity: .35; }
  .hero::before { width: 210px; height: 250px; top: 20px; right: 36px; opacity: .14; transform: rotate(18deg); }
  .hero::after { content: none; }
  .page-heading::after { right: 0; top: 5px; width: 145px; height: 120px; opacity: .13; }
  .metric::before { width: 56px; height: 56px; right: 4px; bottom: 4px; opacity: .11; }
  .metric.primary::before { opacity: .22; }
  .features article::before { width: 105px; height: 90px; }
}
