@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans',Arial,sans-serif;color:#18332b;background:#f3f5f0;font-synthesis:none;--ink:#142c27;--lime:#d7fa71;--line:#dbe2d7;--muted:#637567}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.38;cursor:not-allowed}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #779923;outline-offset:4px}button{border:0;border-radius:8px;padding:12px 18px;font-weight:600;color:inherit;background:#e7edde}button:hover:not(:disabled){filter:brightness(.96)}a{color:inherit}header{height:85px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:30px;padding:0 max(24px,calc((100vw - 1232px)/2))}.brand{font:700 34px 'Space Grotesk',sans-serif;letter-spacing:-2px;text-decoration:none}.brand span,h1>span{color:#8aad3c}.edition{font-size:11px;letter-spacing:2px;border-left:1px solid var(--line);padding-left:30px}.save-status{margin-left:auto;font-size:13px;color:#59734d}.save-status.error{color:#aa3a25}main{max-width:1240px;margin:auto;padding:34px 24px}.heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.8px;color:#74806c}h1{font:500 clamp(27px,3vw,36px) 'Space Grotesk',sans-serif;letter-spacing:-1.3px;margin:8px 0 0}nav{display:flex;border-bottom:1px solid var(--line);gap:30px;margin:30px 0 26px}nav button{background:none;border-radius:0;padding:14px 1px;color:#6b7a68;border-bottom:3px solid transparent;font-size:15px}nav button.active{border-color:#18332b;color:#18332b}nav button span{background:#e0e7d8;padding:3px 6px;font-size:10px;border-radius:4px;margin-left:5px}.subtle{background:transparent;border:1px solid #cbd5c5;font-size:14px}.primary{background:var(--ink);color:var(--lime)}.lime{background:var(--lime);color:var(--ink)}.danger{background:#fbe9e2;color:#942f24}#error,#notice{border-radius:8px;padding:14px 18px;margin-bottom:18px;font-size:14px}#error{background:#ffeae2;color:#862e1c}#notice{background:#e0edd1}.scorer-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px}.scoreboard{background:var(--ink);color:#f5f8ef;border-radius:15px;overflow:hidden}.board-top{display:flex;align-items:center;justify-content:space-between;padding:20px 26px;border-bottom:1px solid #ffffff1a;gap:12px;font-size:13px;color:#b9c9bb}.board-top strong{color:var(--lime);font-size:13px;letter-spacing:1px}.timer{font:500 24px 'Space Grotesk',sans-serif;letter-spacing:1px;color:#f5f8ef}.small{font-size:12px;color:var(--muted)}.timer-wrap{text-align:right}.timer-wrap .small{color:#9eb09f;font-size:10px}.team-grid{display:flex}.team-card{width:50%;padding:24px 28px 22px;text-align:center;min-width:0}.team-card+.team-card{border-left:1px solid #ffffff1a}.team-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;letter-spacing:1.3px;color:#aabdac;height:24px}.serve-badge{color:var(--lime);background:#d7fa7118;padding:5px 7px;border-radius:4px;font-size:10px}.players{margin:18px 0 0;min-height:64px;display:flex;flex-direction:column;justify-content:center;gap:5px}.player{font-size:clamp(15px,1.8vw,21px);line-height:1.35;overflow-wrap:anywhere;font-weight:500}.player.serving{color:var(--lime)}.player small{font-size:10px;display:inline-block;margin-left:6px;border:1px solid #d7fa7166;padding:2px 4px;border-radius:3px;vertical-align:middle}.score{font:500 clamp(80px,10vw,128px)/1.15 'Space Grotesk',sans-serif;letter-spacing:-5px;margin:4px 0 6px}.team-card.a .score{color:var(--lime)}.team-card.b .score{color:#d6e9e3}.timeout-button{border:1px solid #ffffff30;background:transparent;color:#cbd8cb;font-size:12px;padding:11px;width:100%}.court-position{font-size:11px;color:#a3b59f;margin:10px 0}.board-controls{padding:0 26px 20px}.point-button{width:100%;font-size:20px;padding:18px}.serve-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.serve-controls button{background:#ffffff0e;border:1px solid #ffffff26;color:#edf3e8;padding:15px;font-size:15px}.score-call{display:flex;justify-content:space-between;gap:16px;align-items:center;border-top:1px solid #ffffff1a;padding:18px 26px}.score-call .label{color:#9aaf9d;font-size:10px;letter-spacing:1.4px}.score-call strong{font:500 28px 'Space Grotesk',sans-serif;letter-spacing:2px}.score-call>div:last-child{font-size:12px;color:#b9c9bb;max-width:50%;text-align:right}.board-bottom{display:flex;justify-content:space-between;gap:10px;padding:0 26px 20px}.board-bottom button{background:none;color:#c4d3c5;padding:8px 0;font-size:12px}.state-banner{margin:0 26px 20px;background:#e8f3d8;color:#163429;padding:18px;border-radius:8px;text-align:center}.state-banner h3{margin:0 0 8px;font:500 24px 'Space Grotesk',sans-serif}.state-banner p{font-size:14px;line-height:1.6;margin:8px 0 14px}.state-banner .countdown{font:600 44px 'Space Grotesk',sans-serif}.state-banner button{background:#18332b;color:var(--lime);width:100%}.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;margin-bottom:18px}.panel h2{font-size:17px;margin:0 0 18px;font-weight:600}.panel .eyebrow{font-size:10px}.queue-match{border-top:1px solid #e4e9de;padding:15px 0}.queue-match:last-child{padding-bottom:0}.queue-match p{font-size:14px;line-height:1.5;margin:8px 0}.queue-match button{width:100%;margin-top:8px;font-size:13px}.queue-meta{display:flex;justify-content:space-between;font-size:11px;color:#72806a}.match-tag{font-size:11px;font-weight:700;color:#21432d}.rule-list{display:grid;grid-template-columns:1fr auto;font-size:13px;gap:13px;color:#647361}.rule-list strong{color:#29402f;font-weight:500}.empty{background:#fff;border:1px solid var(--line);padding:40px;border-radius:12px;text-align:center;color:#667660}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.toolbar h2{font:500 23px 'Space Grotesk',sans-serif;margin:0}.toolbar select{max-width:220px}.filters{display:flex;gap:10px;flex-wrap:wrap}.match-list{display:grid;gap:10px}.match-row{background:white;border:1px solid var(--line);border-radius:10px;padding:18px 20px;display:grid;grid-template-columns:95px 1fr 70px 120px;gap:16px;align-items:center}.match-row h3{font-size:14px;line-height:1.5;margin:0;font-weight:500}.match-row h3 span{font-size:11px;color:#889580;display:block;margin:2px 0}.match-meta{font-size:12px;line-height:1.8;color:#7c8975}.match-meta strong{color:#1c3b28;display:block;font-size:14px}.status{font-size:10px;letter-spacing:.6px;padding:5px 7px;border-radius:4px;display:inline-block;background:#edf1e8;color:#667762;margin-top:4px}.status.live{background:#d7fa71;color:#2c4917}.status.review{background:#fff0cb;color:#85621c}.result-score{font:600 22px 'Space Grotesk',sans-serif;text-align:center;white-space:nowrap}.match-row button{font-size:13px}.standings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.standings-grid .panel{margin:0;overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;color:#7a8672;font-size:10px;letter-spacing:.7px;padding:12px 6px;border-bottom:1px solid var(--line)}td{padding:14px 6px;border-bottom:1px solid #eef1e9;line-height:1.5}td.num,th.num{text-align:right;white-space:nowrap}td.team-name{min-width:150px}td strong{font-size:12px}tr.qualified td:first-child{border-left:3px solid #8eae39}.table-note{font-size:12px;color:#75816c;line-height:1.5;margin-top:14px}.playoff-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;margin-top:24px}.round-title{font-size:12px;letter-spacing:1px;color:#7b8873;margin:0 0 15px}.playoff-card{background:white;border:1px solid var(--line);border-radius:10px;padding:18px;margin-bottom:12px}.playoff-card p{font-size:13px;line-height:1.5;min-height:40px}.playoff-card h3{font-size:12px;margin:0 0 10px;color:#718165}.playoff-card .pair{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:1.5;padding:10px 0;border-bottom:1px solid #eef1e9}.playoff-card button{width:100%;margin-top:15px;font-size:12px}.medal-card{border-color:#9fbb5d;background:#f5fbe9}.section-heading{font:500 24px 'Space Grotesk',sans-serif;margin:30px 0 12px}.info-note{font-size:13px;line-height:1.7;color:#6d7d65}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{font-size:14px;display:flex;flex-direction:column;gap:8px;margin:16px 0}select,input,textarea{width:100%;border:1px solid #cdd7c5;background:white;color:#203c2c;border-radius:7px;padding:12px;font:inherit;font-size:14px}textarea{min-height:80px}.modal-head{display:flex;justify-content:space-between;align-items:start;gap:15px}.modal-head h2{font:500 27px 'Space Grotesk',sans-serif;margin:5px 0 15px}.modal-head button{background:none;padding:5px;font-size:20px}.modal-actions{display:flex;gap:10px;margin-top:24px}.modal-actions>button{flex:1}dialog{border:0;border-radius:15px;width:calc(100% - 28px);max-width:570px;padding:28px;color:#18332b;box-shadow:0 30px 90px #0004}dialog::backdrop{background:#10231dcc;backdrop-filter:blur(3px)}.rules-box{background:#f0f4e9;padding:15px;border-radius:8px;font-size:14px;line-height:1.8}.event-list{margin-top:15px;border-top:1px solid var(--line);max-height:150px;overflow:auto}.event-list p{font-size:12px;color:#718068;border-bottom:1px solid #edf0e7;padding:9px 0;margin:0}.record-summary{display:flex;gap:24px;margin-bottom:22px}.record-summary strong{font:500 28px 'Space Grotesk',sans-serif}.record-summary span{font-size:12px;color:#6d7d65;display:block}.champion{padding:24px;border-radius:12px;background:var(--ink);color:var(--lime);margin-bottom:22px}.champion h2{font:500 28px 'Space Grotesk',sans-serif;margin:8px 0}footer{display:flex;justify-content:space-between;gap:12px;padding:30px 0 0;color:#8b9681;font-size:10px;letter-spacing:1px}[hidden]{display:none!important}@media(max-width:1000px){.scorer-layout{grid-template-columns:minmax(0,1fr) 250px}.team-card{padding:22px 20px}.edition{display:none}}@media(max-width:780px){main{padding:25px 15px}.scorer-layout{grid-template-columns:1fr}.side-panels{display:grid;grid-template-columns:1fr 1fr;gap:15px}.standings-grid{grid-template-columns:1fr}.playoff-grid{grid-template-columns:1fr}.heading{align-items:start}.heading .subtle{font-size:12px;padding:10px}.eyebrow{font-size:9px}h1{font-size:27px}.match-row{grid-template-columns:70px 1fr 65px;gap:12px}.match-row>button{grid-column:2/4}.record-summary{gap:18px}.player{font-size:19px}}@media(max-width:460px){header{height:73px;padding:0 18px;gap:15px}.brand{font-size:30px}.save-status{font-size:11px}.heading{display:block}.heading .subtle{margin-top:15px}nav{gap:22px;margin-top:20px}nav button{font-size:14px}nav button span{display:none}.team-card{padding:20px 15px 16px}.team-top{font-size:9px}.serve-badge{font-size:9px}.player{font-size:16px}.players{min-height:83px}.score{font-size:86px}.board-top{padding:17px}.board-controls{padding:0 17px 20px}.score-call{padding:15px 17px}.board-bottom{padding:0 17px 17px}.state-banner{margin:0 17px 18px}.side-panels{grid-template-columns:1fr}.toolbar{align-items:start;flex-direction:column}.filters{width:100%}.filters select{flex:1;min-width:110px}.match-row{padding:15px;grid-template-columns:54px 1fr 50px;gap:10px}.match-meta{font-size:10px}.result-score{font-size:17px}.form-row{grid-template-columns:1fr;gap:0}.timer{font-size:22px}.panel{padding:19px}.serve-controls button{font-size:14px;padding:15px 10px}.timeout-button{font-size:11px;padding:11px 7px}dialog{padding:23px}.record-summary strong{font-size:23px}footer{font-size:9px}}
/* Tournament branding and mobile courtside layout. */
h1 .venue{display:block;color:#18332b;font-size:.48em;letter-spacing:1.6px;line-height:1.5;margin-top:5px}
#rotate-prompt,.setup-rotate{display:none}
.court-tools{display:flex;gap:8px;margin-left:auto}
.court-tools button{background:#ffffff12;color:#dfebd9;font-size:12px;padding:10px 12px;min-height:44px}
.modal-actions{flex-wrap:wrap}.setup-rotate{flex:0 0 100%;font-size:14px;background:#eef5df;padding:12px;border-radius:8px;line-height:1.5}
@media(max-width:600px){
  header{padding:0 16px;height:65px}main{padding:20px 12px}
  h1{font-size:29px;letter-spacing:-1px}h1 .venue{font-size:14px;letter-spacing:.7px}
  .heading .subtle{min-height:44px}nav{gap:0;justify-content:space-between;margin:18px 0}
  nav button{min-height:48px;padding:12px 8px}.toolbar select,button{min-height:44px}
  .match-row h3{font-size:15px}.match-row{grid-template-columns:55px minmax(0,1fr) 48px}.match-row .small{font-size:12px}
  .court-tools{display:none}footer{flex-direction:column;line-height:1.6;letter-spacing:.6px}
  .players .player{font-size:16px}input,select,textarea{font-size:16px}
}
@media(max-width:600px) and (orientation:portrait){
  .setup-rotate{display:block}
  body.match-active #content{display:none}
  body.match-active #rotate-prompt{display:block;background:#142c27;color:#f3f9e9;text-align:center;padding:35px 22px;border-radius:14px;margin:18px 0}
  #rotate-prompt h2{font:500 27px/1.2 'Space Grotesk',sans-serif;margin:12px 0}
  #rotate-prompt p{font-size:16px;color:#c6d7bd;line-height:1.7}
  #rotate-prompt button{background:#d7fa71;color:#142c27;min-height:48px;margin-top:8px;width:100%}
  .rotate-symbol{font:400 70px/1 Arial,sans-serif;color:#d7fa71}
}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){
  body.match-active{background:#142c27}
  body.match-active>header,body.match-active .heading,body.match-active nav,body.match-active footer,body.match-active .side-panels{display:none}
  body.match-active main{padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));max-width:none}
  body.match-active .scorer-layout{display:block}
  body.match-active .scoreboard{display:grid;grid-template-columns:minmax(0,1fr) minmax(205px,29%);grid-template-rows:44px minmax(180px,1fr) 48px 44px;min-height:calc(100dvh - 12px);border-radius:8px;gap:0}
  body.match-active .board-top{grid-column:1/3;grid-row:1;padding:3px 10px;font-size:11px}
  body.match-active .board-top strong{font-size:12px}.board-top>div:first-child>div{margin-top:2px!important}
  body.match-active .court-tools{display:flex;gap:6px}.court-tools button{font-size:12px;padding:8px 12px}
  body.match-active .timer-wrap{display:flex;gap:9px;align-items:center}.timer-wrap .small{max-width:35px}
  body.match-active .timer{font-size:23px}
  body.match-active .team-grid{grid-column:1;grid-row:2;min-width:0}
  body.match-active .team-card{padding:8px 15px 4px;display:flex;flex-direction:column;justify-content:center}
  body.match-active .team-top{height:18px;min-height:18px;font-size:10px}
  body.match-active .players{margin:6px 0 0;min-height:0;gap:2px}
  body.match-active .player{font-size:clamp(14px,2vw,18px);line-height:1.25}
  body.match-active .player small{font-size:9px;padding:1px 3px}
  body.match-active .score{font-size:clamp(50px,20vh,82px);line-height:1.05;margin:2px 0;letter-spacing:-3px}
  body.match-active .timeout-button{min-height:44px;padding:8px;font-size:12px}
  body.match-active .court-position{display:none}
  body.match-active .board-controls{grid-column:2;grid-row:2/4;padding:10px 8px 8px 12px;display:flex;flex-direction:column;justify-content:center;border-left:1px solid #ffffff18}
  body.match-active .point-button{min-height:68px;font-size:21px;padding:18px 8px;flex:1;max-height:140px}
  body.match-active .serve-controls{grid-template-columns:1fr;gap:8px;margin-top:8px}
  body.match-active .serve-controls button{min-height:46px;padding:10px;font-size:15px}
  body.match-active .score-call{grid-column:1;grid-row:3;padding:5px 15px;gap:10px}
  body.match-active .score-call>div:first-child{display:flex;align-items:center;gap:12px}
  body.match-active .score-call strong{font-size:25px;white-space:nowrap}.score-call .label{max-width:60px}
  body.match-active .score-call>div:last-child{font-size:12px;line-height:1.4}
  body.match-active .board-bottom{grid-column:1/3;grid-row:4;padding:0 12px;border-top:1px solid #ffffff1a;justify-content:space-around}
  body.match-active .board-bottom button{min-height:44px;font-size:14px;padding:6px 20px}
  body.match-active .state-banner{grid-column:2;grid-row:2/4;align-self:center;margin:8px;padding:12px}
  body.match-active .state-banner h3{font-size:20px}.state-banner p{font-size:13px}
  body.match-active .state-banner button{padding:10px;min-height:44px;font-size:13px}
  body.match-active.match-interrupted .board-controls{display:none}
  body.match-active #error,body.match-active #notice{font-size:13px;margin:0 0 5px;padding:8px}
}

/* SSO: white courts, black typography, yellow and orange actions. */
:root{color:#171717;background:#f5f5f5;--ink:#171717;--lime:#ffb800;--line:#e2e2e2;--muted:#666}
header{background:#fff;border-bottom:1px solid #ddd}.brand{letter-spacing:0;gap:10px;display:flex;align-items:center}
.sso-mark{background:#ffb800!important;color:#171717!important;border-radius:9px;padding:9px 10px;font:800 24px 'Space Grotesk',sans-serif;letter-spacing:-1px;transform:skew(-5deg)}
.brand .brand-name{font-size:13px;color:#171717;letter-spacing:1.4px}.edition{color:#666}.save-status{color:#555}h1,h1 .venue{color:#171717}h1 .venue{letter-spacing:1.2px}
button{background:#eee;color:#171717}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline-color:#dc7900}
.primary,.lime,.rally-button,.point-button{background:#ffb800;color:#171717}.primary:hover,.lime:hover{background:#ffa500}
.subtle{background:#fff;border-color:#ccc}.eyebrow,.small,.info-note,.table-note{color:#696969}nav button{color:#666}nav button.active{border-color:#f5a000;color:#171717}nav button span{background:#fff0ca;color:#7b4a00}
.scoreboard{background:#fff;color:#171717;border:1px solid #c7c7c7;border-radius:10px;box-shadow:none}
.board-top{color:#555;border-bottom:1px solid #bbb}.board-top strong{color:#171717}.timer{color:#171717}.timer-wrap .small{color:#666}
.team-card{background:#fff}.team-card+.team-card{border-left:2px solid #a7a7a7}.team-top{color:#666}.serve-badge{color:#171717;background:#ffce58;font-weight:700}
.player,.player.serving{color:#171717}.player.serving{font-weight:700}.player small{border-color:#eea100;background:#fff2cb;color:#805000}
.team-card.a .score,.team-card.b .score{color:#171717}.timeout-button{color:#333;border-color:#c8c8c8;background:#fafafa}.court-position{color:#666}
.point-button{background:#ffb800;color:#171717}.serve-controls button{color:#171717;border-color:#bbb;background:#fff}.serve-controls button:not(:disabled):last-child{background:#171717;color:#fff}
.score-call{border-color:#bbb;background:#fafafa}.score-call .label,.score-call>div:last-child{color:#626262}.board-bottom button{color:#171717}.board-bottom{border-color:#ccc}
.court-tools button{background:#f1f1f1;color:#171717;border:1px solid #ddd}.court-tools #edit-referee{max-width:220px;white-space:normal;overflow-wrap:anywhere}
.state-banner{background:#fff1c7;color:#171717;border:1px solid #f4c563}.state-banner button{background:#ffb800;color:#171717}
.panel,.flow-panel,.playoff-card,.match-row,.standings-grid .panel{border-color:#dedede;background:#fff}.match-tag,.rule-list strong{color:#171717}.rule-list,.queue-meta,.event-list p{color:#666}
.status{background:#eee;color:#444}.status.live{background:#ffb800;color:#171717}.status.review{background:#fff0c4;color:#8b5000}.medal-card{background:#fffaf0;border-color:#e9b94d}.champion{background:#171717;color:#ffb800}
th{color:#686868;border-color:#ddd}td{border-color:#eee}tr.qualified td:first-child{border-left-color:#ffa600}.table-note{color:#666}
.rules-box{background:#f5f5f5;color:#333}dialog{color:#171717}dialog::backdrop{background:#0009}.setup-rotate{background:#fff1ce;color:#623d00}
#notice{background:#fff1c8;color:#5e3c00}footer{color:#777}.match-ref{font-size:12px;color:#666;margin-top:8px;font-weight:400}
.match-detail{background:#fff;border:1px solid #ddd;border-radius:12px;overflow:hidden;max-width:840px;margin:0 auto}
.detail-top{padding:18px 24px;display:flex;align-items:center;justify-content:space-between;gap:14px}.detail-top button{min-height:44px}.detail-status{background:#fff0c8;border:1px solid #ffd56b;color:#7b4d00;padding:9px 14px;border-radius:24px;font-size:13px;font-weight:600}
.tournament-strip{display:flex;align-items:center;gap:12px;background:#f2f2f2;padding:17px 25px;font-size:14px;letter-spacing:.4px}.mini-mark{background:#ffb800;border-radius:5px;font-size:12px;font-weight:800;padding:7px}
.detail-meta{padding:24px 25px 10px;display:flex;justify-content:space-between;gap:12px;color:#737373;font-size:12px;letter-spacing:.7px}.detail-teams{padding:12px 25px 18px;display:grid;gap:26px}.detail-team{display:flex;gap:22px;align-items:center}.detail-team>div:last-child{font-size:19px;line-height:1.8;font-weight:500}
.avatar{width:42px;height:42px;min-width:42px;border-radius:50%;background:#f0f0f0;border:1px solid #ddd;display:inline-grid;place-items:center;font-size:13px;font-weight:600;color:#666}.avatar-pair{display:flex}.avatar-pair .avatar+.avatar{margin-left:-10px;background:#fff1cb;border-color:#eed7a0;color:#8b5700}
.detail-actions{display:flex;gap:12px;padding:12px 25px 28px}.detail-actions .primary{flex:1;min-height:55px;font-size:18px}.section-band{background:#f2f2f2;color:#575757;font-size:13px;font-weight:500;letter-spacing:1.1px;padding:15px 25px;margin:0}
.detail-rows{margin:0;padding:15px 25px 25px}.detail-rows>div{display:flex;justify-content:space-between;gap:24px;padding:12px 0;font-size:16px;line-height:1.5}.detail-rows dt{color:#717171}.detail-rows dd{margin:0;text-align:right;max-width:60%;font-weight:500}
.setup-court{display:grid;grid-template-columns:1fr 90px 1fr;border:1px solid #aaa;margin:18px 0}.setup-team{min-width:0}.setup-team>span{display:block;padding:8px;font-size:10px;letter-spacing:1px;background:#f7f7f7;color:#666}.setup-player{display:flex;align-items:center;gap:8px;padding:12px 8px;min-height:65px}.setup-player+.setup-player{border-top:1px solid #ddd}.setup-player strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.setup-player .avatar{width:28px;min-width:28px;height:28px;font-size:10px}.setup-net{display:grid;place-content:center;border-inline:1px solid #999;text-align:center;font-size:11px;padding:8px;color:#666;background:#fafafa}
.referee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:16px}.referee-card{background:#fff;border:1px solid #ddd;border-radius:10px;padding:22px}.referee-heading{display:flex;align-items:center;gap:13px;margin-bottom:20px}.referee-heading h3{font-size:19px;margin:0}.referee-heading .avatar{background:#ffb800;color:#171717;border:0}.referee-counts{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.referee-counts strong{display:block;font:600 29px 'Space Grotesk',sans-serif}.referee-counts span{display:block;color:#777;font-size:11px;margin-top:5px}.referee-counts>div:last-child strong{color:#ac6000}
.assignment-list{border:1px solid #ddd;background:#fff;border-radius:10px}.assignment-row{display:grid;grid-template-columns:65px 1fr 1fr 90px;align-items:center;gap:14px;padding:14px 20px;font-size:14px;border-bottom:1px solid #eee}.assignment-row:last-child{border:0}.assignment-row>span{color:#666}.assignment-row button{min-height:44px}
@media(max-width:600px){
  header{padding:0 14px}.brand .brand-name{font-size:10px;letter-spacing:.7px}.sso-mark{font-size:22px}.save-status{font-size:10px}
  nav{overflow:auto;gap:8px}nav button{font-size:13px;padding:12px 5px;white-space:nowrap}h1{font-size:28px}h1 .venue{font-size:13px}
  .match-detail{border-radius:8px}.detail-top{padding:15px}.detail-status{font-size:11px;padding:8px}.detail-top button{padding:8px 12px;font-size:12px}.tournament-strip{padding:15px;font-size:12px}
  .detail-meta{padding:20px 15px 8px;font-size:10px}.detail-teams{padding:14px 15px 20px}.detail-team{gap:16px}.detail-team>div:last-child{font-size:16px;line-height:1.7}.avatar{width:36px;height:36px;min-width:36px;font-size:11px}
  .detail-actions{padding:0 15px 22px;flex-direction:column}.detail-actions .primary{min-height:53px}.section-band{padding:14px 16px;font-size:12px}.detail-rows{padding:10px 16px 20px}.detail-rows>div{font-size:14px;gap:14px}
  .assignment-row{grid-template-columns:50px 1fr 75px;gap:8px;padding:13px;font-size:12px}.assignment-row>span:nth-child(3){grid-column:2;grid-row:auto}.assignment-row button{grid-column:3;grid-row:span 2;padding:8px;font-size:12px}.referee-grid{grid-template-columns:1fr}
  .setup-court{grid-template-columns:1fr 48px 1fr}.setup-player{flex-direction:column;align-items:flex-start}.setup-net{font-size:10px;padding:4px}
  body.match-active #rotate-prompt{background:#fff;color:#171717;border:1px solid #ddd}.rotate-symbol{color:#e99800}#rotate-prompt p{color:#666}#rotate-prompt button{background:#ffb800;color:#171717}
}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){
  body.match-active{background:#fff}.scoreboard{border-radius:0}
  body.match-active .scoreboard{background:#fff;color:#171717;grid-template-columns:minmax(0,1fr) minmax(195px,28%)}
  body.match-active .board-top{border-color:#bbb}.board-top strong{color:#171717}.timer{color:#171717}
  body.match-active .court-tools{gap:5px}.court-tools button{min-height:36px;padding:6px 8px;font-size:11px}.court-tools #edit-referee{max-width:150px;font-size:11px}
  body.match-active .team-card{background:#fff}.team-card+.team-card{border-left-color:#999}.serve-badge{background:#ffce58;color:#171717}.player.serving{color:#171717}
  body.match-active .board-controls{border-left:1px solid #bbb}.serve-controls button{background:#fff;color:#171717;border-color:#bbb}
  body.match-active .score-call{border-color:#bbb;background:#f8f8f8}.score-call>div:last-child{color:#555}.score-call .label{color:#666}
  body.match-active .board-bottom{border-color:#bbb}.board-bottom button{color:#171717}.timeout-button{border-color:#bbb;color:#333;background:#fafafa}
  body.match-active .state-banner{background:#fff1c7;color:#171717}.state-banner button{background:#ffb800;color:#171717}
}

/* Court layout: teams flank the centered score. */
.team-grid{display:flex;align-items:stretch}.team-card{width:34%;padding:18px 12px}.central-score{width:32%;border-inline:1px solid #aaa;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;background:#fffaf0}.central-score>strong{font:600 clamp(40px,6vw,76px)/1 'Space Grotesk',Arial,sans-serif;white-space:nowrap}.central-score>strong span{color:#999;font-size:.45em;vertical-align:middle}.central-score .label,.server-number{font-size:10px;letter-spacing:1px}.server-number{background:#ffce58;padding:8px;border-radius:4px}.player-note{display:block;font-size:12px;font-style:normal;font-weight:400;color:#777;white-space:pre-wrap;overflow-wrap:anywhere}.players{gap:14px;margin:16px 0}.team-card+.team-card{border-left:0}.match-row{grid-template-columns:75px 1fr 125px 55px 100px}.detail-actions{flex-wrap:wrap}fieldset{border:1px solid #ddd;margin:16px 0;padding:14px}textarea{width:100%;font:inherit;min-height:64px;border:1px solid #ccc;border-radius:6px;padding:10px} .timer-wrap .small{color:#777}
@media(max-width:600px){.match-row{grid-template-columns:55px 1fr 50px}.match-row>button{grid-column:2/4}.match-row .result-score{grid-column:3;grid-row:1}.detail-actions{flex-direction:column}}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){
body.match-active .scoreboard{display:flex;flex-direction:column;min-height:calc(100dvh - 12px)}
body.match-active .board-top{min-height:44px;padding:4px 8px}body.match-active .team-grid{flex:1;min-height:160px}
body.match-active .team-card{width:34%;padding:8px 12px}body.match-active .central-score{width:32%;gap:10px}body.match-active .central-score>strong{font-size:clamp(48px,16vh,78px)}
body.match-active .players{gap:10px;flex:1;justify-content:space-around;margin:7px 0}.player-note{font-size:11px}body.match-active .timeout-button{min-height:36px}
body.match-active .board-controls{display:flex;flex-direction:row;padding:8px;gap:8px;border:0;border-top:1px solid #ccc}
body.match-active .point-button{flex:1;width:auto;min-height:42px;max-height:none;padding:10px;font-size:17px}
body.match-active .serve-controls{display:flex;flex:1;gap:8px;margin:0}body.match-active .serve-controls button{flex:1;min-height:42px;padding:8px;font-size:14px}
body.match-active .score-call{display:none}body.match-active .board-bottom{min-height:40px;padding:0 12px}body.match-active .board-bottom button{min-height:40px;padding:6px 15px;font-size:12px}
body.match-active .state-banner{margin:6px;padding:8px}body.match-active .state-banner h3{font-size:17px}body.match-active .state-banner p{margin:5px;font-size:12px}
body.match-active .court-tools button{font-size:10px;padding:6px}body.match-active .timer{font-size:18px}
}
.central-score>strong{font-size:clamp(36px,5vw,65px);letter-spacing:-2px}.confirm-servers{display:flex;align-items:flex-start;gap:10px;line-height:1.5}.confirm-servers input{width:22px;min-width:22px;height:22px;margin:0}.coin-toss button{background:#ffb800}.coin-toss p{font-size:14px;line-height:1.5}.board-top .court-tools{margin-left:auto}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){body.match-active .central-score>strong{font-size:clamp(38px,7vw,64px)}}
.scorer-layout{display:block}.setup-player{flex-direction:column;align-items:flex-start}.setup-player small{font-size:10px;color:#976000}.setup-team>button{width:100%;font-size:11px;padding:10px}.setup-team>span{min-height:40px}#first-mark{background:#fff1cb;padding:12px;font-weight:600}details summary{cursor:pointer;margin:12px 0} .central-score{min-height:180px}
.paddle{width:25px;height:30px;vertical-align:middle;display:inline-block;margin-left:7px}.setup-player label{width:100%;font-size:12px;margin:4px 0}.setup-player input{width:100%;min-width:0;font-size:14px}.setup-player textarea{min-height:50px;font-size:12px}.setup-court{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}.court-position{display:none}
.setup-player label{position:relative}.setup-player label .paddle{position:absolute;right:8px;top:29px;z-index:1}.setup-player input{padding-right:38px}
dialog:has(#start-form){max-width:720px}#start-form .setup-court{margin:12px 0}#start-form .setup-player{padding:8px 12px}#start-form .setup-player textarea{min-height:42px;height:42px}#start-form .prep-tools{display:flex;justify-content:space-between;gap:12px}#start-form .prep-tools button{font-size:13px;min-height:44px}#start-form .prep-hint{font-size:12px;color:#777;margin:10px 0}#start-form .modal-actions .primary{width:100%;min-height:50px;font-size:17px}#start-form fieldset{border-radius:8px;padding:12px 16px}#start-form #first-mark{font-size:13px;margin:8px 0 0;padding:8px;border-radius:5px}
@media(max-width:600px){#start-form .prep-tools{flex-wrap:wrap}#start-form .prep-tools button{flex:1}#start-form .setup-player{padding:8px}}
.saved-run{display:flex;justify-content:space-between;align-items:center;gap:15px;background:white;border:1px solid #ddd;padding:16px;border-radius:8px}.saved-run p{font-size:12px;color:#777}.saved-run button{min-height:44px;font-size:13px}
.match-clock{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px;border-top:1px solid #ddd;font-size:11px;color:#777}.match-clock strong{font-size:18px;font-variant-numeric:tabular-nums;color:#171717}.court-tools #exit-court{background:#fff1cb;color:#171717;white-space:nowrap}
.serving-now{display:block;width:fit-content;margin:6px auto 0;background:#ffb800;color:#171717;border-radius:16px;padding:5px 10px;font-size:11px;font-weight:700;white-space:nowrap}.player.serving{background:#fff5d9;border-radius:8px;padding:6px}.current-server{text-align:center;padding:0 8px}.current-server>span{display:block;color:#8b5900;font-size:10px;margin-bottom:4px}.current-server>strong{font-size:16px;line-height:1.3;display:block;overflow-wrap:anywhere}.central-score{gap:12px}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){body.match-active .central-score{gap:6px}.current-server>strong{font-size:13px}.serving-now{font-size:10px;padding:3px 8px;margin:3px auto}.player.serving{padding:3px}}
body.signed-out main{display:none}.auth-card{max-width:440px;margin:45px auto;padding:30px;background:white;border:1px solid #ddd;border-radius:16px}.auth-card h1{font-size:28px;margin-top:24px}.auth-card>p{color:#666;font-size:14px;line-height:1.5}.auth-card label{display:grid;gap:8px;margin-top:18px;font-size:14px}.auth-card input{padding:12px;border:1px solid #bbb;border-radius:8px;width:100%;min-height:46px}.auth-card button{width:100%;margin-top:14px;min-height:46px}#auth-error{color:#a32113;font-size:14px}.signed-out #install-app{display:none}@media(max-width:600px){.auth-card{margin:20px 14px;padding:24px}#logout{font-size:11px;padding:8px}header{gap:10px}}

#demo-banner:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#ffb800;color:#171717;padding:12px 18px;border-radius:12px;margin:12px 0;}body.demo-mode nav,body.demo-mode #demo-scoring{display:none;}#demo-banner span{font-size:14px;}

.remember-login{display:flex;align-items:center;gap:10px}.remember-login input{width:20px;height:20px;flex:none;accent-color:#ffb800}

.baseline-board{background:white;border:1px solid #c6c6c6;border-radius:14px;padding:18px;max-width:1500px;margin:auto;color:#171717}.court-toolbar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px;align-items:center;margin-bottom:18px}.court-toolbar button{min-height:58px;background:#f1f1f1;border:1px solid #aaa;font-size:18px}.court-toolbar .court-undo{background:#fff2d2;border-color:#e2af47}.court-toolbar>div{text-align:center;font-size:14px}.court-toolbar small{display:block;margin-top:6px;font-size:11px;color:#666}.court-map{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);min-height:300px;border:1px solid #999}.court-half{position:relative;display:grid;grid-template-rows:1fr 1fr;background:#f4f4f4;min-width:0}.court-half.has-serve{background:#fff3cd}.court-team-label{position:absolute;top:5px;left:9px;font-size:9px;letter-spacing:1px;color:#74613a}.court-player{display:flex;align-items:center;gap:12px;padding:22px 16px 12px;min-width:0}.court-player+.court-player{border-top:1px solid #aaa}.court-avatar{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;background:#e3e3e3;color:#777;font-weight:600;font-size:15px}.court-person{min-width:0;flex:1}.court-person>strong{font-size:20px;line-height:1.35;overflow-wrap:anywhere;font-weight:500}.court-person>small{display:block;color:#666;font-size:12px;overflow-wrap:anywhere;margin-top:3px}.active-player .court-person>strong{font-weight:750}.active-player .court-avatar{background:#ffb800;color:#171717}.court-serving{display:block;width:fit-content;font-size:11px;font-weight:700;background:#ffb800;padding:3px 8px;border-radius:4px;margin-top:5px}.court-person .paddle{width:19px;height:23px;margin-left:5px}.court-center{border-inline:1px solid #999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:18px 10px;min-width:0}.court-center>span{font-size:10px;letter-spacing:1px}.court-call{font-size:clamp(40px,5.7vw,82px);line-height:1.05;letter-spacing:-2px;white-space:nowrap;color:#171717;font-variant-numeric:tabular-nums}.court-server-caption{font-size:12px;text-align:center;overflow-wrap:anywhere}.court-timeouts{display:flex;width:100%;gap:8px;margin-top:auto;padding-top:12px}.court-timeouts button{flex:1;font-size:11px;padding:8px 3px;min-height:44px;background:white;border:1px solid #bbb;line-height:1.6}.court-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:16px}.court-actions button{font-size:21px;min-height:68px;border-radius:7px}.court-point{background:#ffb800;color:#171717}.court-fault{background:#171717;color:white}.court-actions button:disabled{background:#f0e5c7;color:#948b73;opacity:1}.court-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}.court-footer button{background:transparent;color:#444;padding:8px;font-size:12px;min-height:36px}.court-footer>span{font-size:11px;color:#666}.court-footer strong{font-size:17px;color:#171717;margin:0 5px;font-variant-numeric:tabular-nums}.court-message{background:#fff3cd;border:1px solid #e4c568;padding:12px;display:flex;justify-content:center;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px;border-radius:8px}.court-message h3,.court-message p{margin:0;font-size:14px}.court-message button{background:#ffb800;min-height:44px}.court-message .countdown{font-size:24px}.court-option-list{display:grid;gap:12px}.court-option-list button{min-height:48px;background:#f5f5f5;border:1px solid #ccc}
@media(orientation:landscape) and (max-height:600px){body.match-active .baseline-board{border:0;border-radius:0;padding:4px;min-height:calc(100dvh - 16px);display:flex;flex-direction:column}body.match-active .court-toolbar{gap:12px;margin-bottom:10px;grid-template-columns:1fr 1.1fr 1fr}body.match-active .court-toolbar button{min-height:42px;font-size:15px;padding:8px}body.match-active .court-map{flex:1;min-height:160px}body.match-active .court-player{padding:16px 9px 6px;gap:8px}body.match-active .court-avatar{width:32px;height:32px;font-size:11px}body.match-active .court-person>strong{font-size:clamp(13px,2vw,19px)}body.match-active .court-center{padding:8px;gap:6px}body.match-active .court-call{font-size:clamp(35px,6.2vw,66px)}body.match-active .court-timeouts{gap:5px;padding-top:3px}body.match-active .court-timeouts button{font-size:10px;min-height:34px;padding:3px}body.match-active .court-actions{margin-top:10px;gap:12px}body.match-active .court-actions button{min-height:44px;font-size:17px;padding:9px}body.match-active .court-footer{margin-top:3px}body.match-active .court-footer button{min-height:30px}body.match-active .court-server-caption{font-size:10px}body.match-active .court-serving{font-size:9px;margin-top:2px}body.match-active .court-person>small{font-size:10px}body.match-active #demo-banner:not([hidden]){padding:5px 10px;margin:0;font-size:10px}body.match-active #demo-banner span{display:none}body.match-active #demo-banner button{min-height:28px;padding:4px 10px;font-size:10px}}

@media(orientation:landscape) and (max-height:600px){body.demo-mode.match-active .baseline-board{min-height:calc(100dvh - 54px)}}
/* Video-style referee preparation court */
dialog:has(#start-form.video-prep){width:calc(100vw - 24px);max-width:1280px;max-height:calc(100dvh - 16px);padding:16px;border-radius:10px}.video-prep .prep-header{display:grid;grid-template-columns:1fr 1.4fr 1.4fr 1fr;gap:16px;align-items:center;margin-bottom:18px}.prep-header>div{text-align:center}.prep-header small{display:block;font-size:12px;color:#777;margin-top:6px}.video-prep .prep-header label{margin:0;font-size:11px;gap:4px}.prep-header button{min-height:48px;border:1px solid #ccc;background:#fff}.video-prep .prep-court{display:grid;grid-template-columns:1fr 1fr 1fr;border:1px solid #909090;min-height:300px}.prep-half{position:relative;display:grid;grid-template-rows:1fr 1fr;min-width:0}.prep-team-label{position:absolute;top:8px;left:12px;font-size:10px;letter-spacing:1px;color:#777;z-index:1}.prep-person{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:22px 18px 12px}.prep-person:last-of-type{border-top:1px solid #909090}.prep-pick{display:flex;gap:12px;align-items:center;background:none;text-align:left;font-size:20px;min-height:70px;padding:8px;width:100%;font-weight:500}.prep-pick>span:last-child{overflow-wrap:anywhere;min-width:0}.prep-pick small{display:block;font-size:10px;color:#777;font-weight:400;margin-top:5px}.prep-pick em{display:block;font-size:12px;font-weight:400;color:#777;margin-top:4px}.prep-pick.chosen{color:#111;font-weight:700}.prep-pick.chosen .court-avatar{background:#ffbd00}.prep-pick:not(.chosen){color:#707070}.prep-pick svg{width:24px;height:28px;vertical-align:middle;margin-left:7px}.prep-swap{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;border:1px solid #aaa;border-radius:6px;font-size:26px;padding:5px 14px;background:#eee}.prep-center{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-inline:1px solid #909090;padding:20px 14px 0;gap:14px}.prep-center p{font-size:20px;line-height:1.5;margin:0}.prep-center>span{font-size:12px;color:#777}.prep-first{display:flex;width:100%;gap:8px}.prep-first button{flex:1;border:1px solid #ccc;background:white}.prep-first button.chosen{background:#ffbf00;border-color:#ed9900}.prep-center #swap-ends{border-radius:0;border-top:1px solid #909090;width:calc(100% + 28px);margin-top:auto;min-height:60px;background:#f1f2f4;font-size:19px}.prep-bottom{display:flex;flex-direction:column;gap:10px;margin-top:12px}.prep-bottom>span{text-align:center;font-size:12px;color:#777}.prep-bottom button{width:100%;font-size:22px;min-height:60px}.prep-edit-fields{display:flex;flex-direction:column;gap:4px}.prep-edit-fields input{padding:7px;font-size:13px}.prep-edit-fields input+input{font-size:11px}.video-prep:has(.prep-edit-fields) .prep-pick{min-height:35px;font-size:14px;padding:0}.video-prep:has(.prep-edit-fields) .court-avatar{display:none}
@media(orientation:landscape) and (max-height:600px){dialog:has(#start-form.video-prep){padding:10px;margin:auto}.video-prep .prep-header{gap:8px;margin-bottom:10px;grid-template-columns:.7fr 1.2fr 1fr 1fr}.prep-header strong{font-size:12px}.prep-header small{font-size:10px}.prep-header button{font-size:12px;min-height:40px;padding:8px}.prep-header input{padding:7px;font-size:12px}.video-prep .prep-court{min-height:0;height:calc(100dvh - 164px)}.prep-person{padding:15px 8px 5px}.prep-pick{font-size:15px;gap:7px;min-height:0}.prep-pick .court-avatar{width:32px;height:32px;min-width:32px;font-size:12px}.prep-pick small{font-size:9px}.prep-center{gap:6px;padding:10px 10px 0}.prep-center p{font-size:14px}.prep-center #swap-ends{min-height:38px;font-size:14px;width:calc(100% + 20px);padding:8px}.prep-first button{font-size:12px;padding:8px}.prep-swap{font-size:20px;padding:2px 10px}.prep-bottom{gap:5px;margin-top:7px}.prep-bottom>span{font-size:10px}.prep-bottom button{min-height:40px;padding:8px;font-size:17px}.prep-team-label{font-size:8px;top:4px;left:8px}.prep-edit-fields input{padding:4px}.video-prep:has(.prep-edit-fields) .prep-court{height:auto;min-height:220px}}
@media(orientation:portrait) and (max-width:600px){.video-prep .prep-header{grid-template-columns:1fr 1fr;gap:10px}.video-prep .prep-court{min-width:640px}.video-prep #position-preview{overflow-x:auto}.video-prep .setup-rotate{display:block;margin:8px 0}}


.prep-orientation{display:none}
@media(max-width:600px) and (orientation:portrait){dialog:has(#start-form.video-prep){width:100vw;height:100dvh;max-height:100dvh;max-width:100vw;margin:0;padding:24px;border-radius:0}.video-prep{display:none}.prep-orientation{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:16px}.prep-orientation>div{font-size:80px;color:#f5a900}.prep-orientation h2{font-size:28px;margin:0}.prep-orientation p{font-size:16px;line-height:1.6;max-width:300px;margin:0 0 10px}.prep-orientation button{width:100%;max-width:320px;min-height:50px}.prep-orientation #prep-rotate{background:#ffbf00}}
@media(orientation:landscape) and (max-height:600px){dialog:has(#start-form.video-prep){width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;border-radius:0;padding:10px max(10px,env(safe-area-inset-right)) 10px max(10px,env(safe-area-inset-left))}.video-prep .setup-rotate{display:none}}
