@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Montserrat:wght@500;600;700;800&display=swap');
:root{--forest:#0d4b3b;--deep:#073c30;--mint:#dff5e9;--coral:#ff705a;--ink:#17362d;--muted:#687c75;--line:#dbe7e2;--paper:#f3f8f5;--white:#fff;--gold:#f2cf68}*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--ink);background:radial-gradient(circle at 5% 0,#dcf3e7 0,transparent 28%),linear-gradient(140deg,#f8fbf9,#ecf4f0);font-family:Montserrat,Arial,sans-serif}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1320px)/2));border-bottom:1px solid rgba(13,75,59,.12);background:rgba(255,255,255,.9);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:var(--forest);text-decoration:none}.brand>span:last-child{display:grid}.brand strong{font:800 13px Manrope,sans-serif;letter-spacing:.11em}.brand small{font-size:8px;letter-spacing:.22em;margin-top:2px}.brand-mark{width:34px;height:34px;position:relative;display:block}.brand-mark i{position:absolute;width:8px;height:8px;border-radius:50%;background:var(--coral)}.brand-mark i:nth-child(1){left:3px;top:3px}.brand-mark i:nth-child(2){right:3px;top:10px;background:var(--gold)}.brand-mark i:nth-child(3){left:10px;bottom:2px;background:#8fdab6}.connection{padding:6px 9px;border-radius:99px;color:#18543e;background:#dff3e8;font-size:8px;font-weight:800;letter-spacing:.09em}.connection.down{color:#7d452e;background:#ffe7dd}main{width:min(1320px,calc(100% - 30px));margin:24px auto 60px}.loading{min-height:60vh;display:grid;place-items:center;align-content:center;gap:14px;color:var(--muted)}.spinner{width:38px;height:38px;border:4px solid var(--mint);border-top-color:var(--forest);border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}button,input,select{font:700 12px Montserrat,sans-serif}button{cursor:pointer}.primary,.secondary{min-height:46px;padding:0 18px;border:0;border-radius:12px;font-weight:800}.primary{color:#fff;background:var(--coral);box-shadow:0 9px 24px rgba(255,112,90,.24)}.secondary{color:var(--forest);background:var(--mint)}button:disabled{opacity:.45;cursor:not-allowed}.compact{min-height:38px;padding:0 13px;font-size:9px}.wide{width:100%;margin-top:8px}.text-button{padding:6px 0;border:0;color:var(--forest);background:transparent;font-size:10px}.eyebrow{display:block;margin-bottom:12px;color:var(--coral);font-size:9px;font-weight:800;letter-spacing:.16em}.welcome{min-height:calc(100vh - 150px);display:grid;align-content:center;max-width:980px;margin:auto}.welcome>h1,.center-card h1,.setup-copy h1{margin:0;font:800 clamp(34px,6vw,68px)/1.02 Manrope,sans-serif;letter-spacing:-.04em}.welcome h1 em{color:var(--forest);font-style:normal}.welcome>p{max-width:630px;margin:20px 0 30px;color:var(--muted);font-size:14px;line-height:1.7}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.mode-card{min-height:220px;padding:27px;border:1px solid var(--line);border-radius:23px;text-align:left;background:#fff;box-shadow:0 18px 55px rgba(13,75,59,.08)}.mode-card span{font-size:8px;letter-spacing:.13em;color:var(--coral)}.mode-card strong{display:block;margin:30px 0 8px;font:800 25px Manrope,sans-serif}.mode-card small{display:block;max-width:350px;color:var(--muted);font-size:10px;line-height:1.6}.mode-card b{display:block;margin-top:24px;color:var(--forest);font-size:10px}.mode-card.offline{background:var(--deep);color:#fff}.mode-card.offline small{color:#c6ddd5}.mode-card.offline b{color:#aee5ca}.rule-note{margin-top:18px;color:#71847d;font-size:9px}.center-card{width:min(600px,100%);min-height:520px;margin:35px auto;padding:40px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 20px 60px rgba(13,75,59,.09);display:grid;align-content:center}.center-card>p{margin:15px 0 28px;color:var(--muted);font-size:11px;line-height:1.65}.center-card .text-button{position:absolute;align-self:start}.stack{display:grid;gap:14px}.stack label,.setup-form label{display:grid;gap:7px;color:#52675f;font-size:9px;text-transform:uppercase;letter-spacing:.06em}input,select{width:100%;min-height:48px;padding:0 13px;border:1px solid var(--line);border-radius:11px;color:var(--ink);background:#fff;outline:none}input:focus,select:focus{border-color:#70b497;box-shadow:0 0 0 3px rgba(112,180,151,.15)}.list-page{padding-top:12px}.page-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}.page-head h1{margin:0;font:800 36px Manrope,sans-serif}.page-head p{margin:7px 0 0;color:var(--muted);font-size:10px}.match-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.match-card{padding:20px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:0 12px 35px rgba(13,75,59,.06)}.match-card>div{display:flex;justify-content:space-between;gap:10px;align-items:center}.match-card small{color:var(--muted);font-size:8px}.match-card h2{margin:22px 0 7px;font:800 17px Manrope,sans-serif}.match-card p{margin:0 0 20px;color:var(--muted);font-size:9px}.status{padding:5px 8px;border-radius:99px;background:#e8f0ec;font-size:7px;font-weight:800;letter-spacing:.08em}.status.playing{color:#fff;background:var(--coral)}.status.called{background:var(--mint)}.status.delayed,.status.result_pending{background:#fff1c8}.status.completed{color:#fff;background:var(--forest)}.empty{grid-column:1/-1;padding:70px;text-align:center;border:1px dashed #bdd1c8;border-radius:18px;color:var(--muted)}.logout{margin-top:22px}.setup-page{max-width:1050px;margin:auto}.setup-copy{padding:25px 0 30px}.setup-copy h1{font-size:44px}.setup-copy p{color:var(--muted);font-size:11px}.setup-form{padding:26px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 18px 50px rgba(13,75,59,.07)}.players-setup{display:grid;grid-template-columns:1fr 1fr;gap:16px}.players-setup fieldset{display:grid;grid-template-columns:1.4fr 1fr;gap:12px;margin:0;padding:18px;border:1px solid var(--line);border-radius:14px}.players-setup legend{padding:0 7px;color:var(--forest);font-size:9px;font-weight:800}.rules-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-top:20px}.rules-hint{margin:14px 0;color:var(--muted);font-size:8px;line-height:1.55}.timer-page{min-height:calc(100vh - 145px);display:grid;place-items:center;align-content:center;text-align:center}.timer{font:800 clamp(90px,18vw,210px)/.9 Manrope,sans-serif;letter-spacing:-.08em;color:var(--deep)}.timer-page h1{margin:28px 0 24px;font:800 28px Manrope,sans-serif}.timer-page h1 i{color:var(--muted);font:600 13px Montserrat,sans-serif}.half{margin:22px 0 5px;padding:8px 12px;border-radius:99px;color:#577068;background:#e8f0ed;font-size:9px;letter-spacing:.12em}.half.active{color:#6d5116;background:#ffe69c}.serve-start{display:grid;gap:5px;margin:25px 0}.serve-start strong{font:800 19px Manrope,sans-serif}.serve-start span{color:var(--muted);font-size:10px}.hero-button{min-width:300px;margin:8px}.desk{min-height:calc(100vh - 120px)}.desk-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin-bottom:15px;color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.1em}.desk-head .secondary{justify-self:end}.scoreboard{display:grid;grid-template-columns:1fr 170px 1fr;gap:12px}.player-score{position:relative;min-height:365px;padding:25px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 16px 45px rgba(13,75,59,.07);text-align:center;overflow:hidden}.player-score .dress{position:absolute;left:0;top:0;width:100%;height:9px;background:var(--dress)}.player-score small{color:var(--muted);font-size:9px;letter-spacing:.1em}.player-score h1{min-height:54px;margin:18px 0 5px;font:800 clamp(18px,3vw,32px) Manrope,sans-serif}.player-score>strong{display:block;font:800 clamp(105px,16vw,190px)/.8 Manrope,sans-serif;color:var(--deep);letter-spacing:-.08em}.player-score>button{width:100%;min-height:56px;margin-top:27px;border:0;border-radius:13px;color:#fff;background:var(--dress);font-weight:800}.serve-column{display:grid;place-items:center;align-content:center;gap:9px;text-align:center}.serve-column>span{font-size:8px;letter-spacing:.12em;color:var(--muted)}.serve-column>strong{font:800 14px Manrope,sans-serif}.serve-column>b{padding:7px 11px;border-radius:99px;color:#fff;background:var(--forest);font-size:9px}.side-choice{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:18px;padding:10px;border:1px solid #e6c878;border-radius:12px;background:#fff7dd}.side-choice small{grid-column:1/-1;color:#775b20;font-size:7px}.side-choice button{min-height:34px;border:0;border-radius:8px;color:#fff;background:var(--forest);font-size:8px}.decision-panel{display:grid;grid-template-columns:.7fr 1fr 1fr;gap:12px;margin-top:12px}.decision-panel>div{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px;border:1px solid var(--line);border-radius:15px;background:#fff}.decision-panel span{grid-column:1/-1;color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.1em}.decision-panel button{min-height:49px;border:0;border-radius:10px;color:var(--forest);background:var(--mint);font-size:9px;font-weight:800}.decision-panel .let{grid-column:1/-1;color:#fff;background:var(--forest)}.last-call{text-align:center;margin-top:12px;color:var(--muted);font-size:8px}.finished{min-height:calc(100vh - 150px);display:grid;place-items:center;align-content:center;text-align:center}.finished h1{margin:0;font:800 clamp(34px,6vw,70px) Manrope,sans-serif}.finished>strong{font:800 80px Manrope,sans-serif;color:var(--forest)}.games{display:flex;gap:10px;margin:20px}.games span{display:grid;gap:4px;padding:10px 15px;border-radius:10px;background:#fff;color:var(--muted);font-size:8px}.games b{font:800 17px Manrope,sans-serif;color:var(--ink)}.finished p{max-width:540px;color:var(--muted);font-size:10px;line-height:1.6}.toast{position:fixed;right:20px;bottom:20px;max-width:380px;padding:13px 16px;border-radius:11px;color:#fff;background:var(--deep);box-shadow:0 12px 30px rgba(0,0,0,.2);font-size:10px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:50}.toast.show{opacity:1;transform:none}
@media(max-width:900px){main{width:min(100% - 20px,760px)}.match-grid{grid-template-columns:1fr 1fr}.rules-grid{grid-template-columns:1fr 1fr}.scoreboard{grid-template-columns:1fr 110px 1fr}.player-score{min-height:330px;padding:20px 12px}.decision-panel{grid-template-columns:1fr 1fr}.decision-panel>div:first-child{grid-column:1/-1}.desk{min-height:auto}}
@media(max-width:620px){.topbar{height:64px;padding:0 14px}.brand strong{font-size:10px}.brand small{font-size:7px}.mode-grid,.match-grid,.players-setup{grid-template-columns:1fr}.welcome{align-content:start;padding-top:35px}.welcome>h1{font-size:42px}.center-card{padding:26px;min-height:480px}.page-head{align-items:start}.page-head h1{font-size:29px}.setup-copy h1{font-size:33px}.players-setup fieldset{grid-template-columns:1fr}.rules-grid{grid-template-columns:1fr 1fr}.scoreboard{grid-template-columns:1fr 74px 1fr;gap:6px}.player-score{min-height:300px;padding:18px 7px}.player-score h1{font-size:15px;min-height:42px}.player-score>strong{font-size:90px}.player-score>button{font-size:8px;padding:6px}.serve-column>strong{font-size:9px;word-break:break-word}.decision-panel{grid-template-columns:1fr}.decision-panel>div:first-child{grid-column:auto}.timer{font-size:100px}.desk-head{grid-template-columns:1fr auto}.desk-head>span{display:none}.finished>strong{font-size:60px}}

body.splash-active{overflow:hidden;background:#f4f8f6}.splash-active .topbar{display:none}.splash-active main{width:100%;margin:0}.splash{width:100%;min-height:100vh;padding:28px;border:0;display:grid;place-items:center;align-content:center;color:var(--forest);background:radial-gradient(circle at 50% 38%,#fff 0,#edf6f1 45%,#e3efe9 100%);font-family:Montserrat,sans-serif}.splash-device{position:relative;width:min(360px,68vw);display:block;transition:transform .25s ease}.splash-device>.tablet-image{display:block;width:100%;height:auto;filter:drop-shadow(0 28px 35px rgba(7,60,48,.18))}.splash-device>.splash-emblem{position:absolute;left:50%;top:48%;width:47%;height:auto;object-fit:contain;transform:translate(-50%,-50%) rotate(-2deg);filter:grayscale(1) brightness(0) invert(1)}.splash:hover .splash-device{transform:translateY(-5px)}.splash-brand{margin-top:28px;font:800 clamp(18px,3vw,30px) Manrope,sans-serif;letter-spacing:.13em}.splash>strong{margin-top:4px;color:var(--coral);font-size:12px;letter-spacing:.34em}.splash>em{margin-top:34px;padding:12px 22px;border:1px solid rgba(13,75,59,.22);border-radius:99px;color:var(--forest);font-size:10px;font-style:normal;letter-spacing:.13em;background:rgba(255,255,255,.62)}
.desk-head{grid-template-columns:1fr auto}.desk-actions{justify-self:end;display:flex;align-items:center;gap:8px}.icon-button{width:42px;height:42px;border:0;border-radius:12px;color:var(--forest);background:var(--mint);font-size:20px;line-height:1}.player-name{width:100%;min-height:68px;margin:10px 0 0!important;padding:4px!important;border:0!important;display:grid;place-items:center;align-content:center;gap:3px;color:var(--ink)!important;background:transparent!important;box-shadow:none!important}.player-name b{font:800 clamp(18px,3vw,32px) Manrope,sans-serif}.player-name i{color:var(--muted);font-size:7px;font-style:normal;letter-spacing:.07em;text-transform:uppercase}.player-name:hover b{text-decoration:underline;text-decoration-color:var(--dress);text-decoration-thickness:3px;text-underline-offset:5px}
.modal-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px;background:rgba(5,35,28,.72);backdrop-filter:blur(8px)}.settings-sheet,.color-sheet{width:min(760px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:26px;border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3)}.color-sheet{width:min(650px,100%)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:22px}.modal-head .eyebrow{margin-bottom:6px}.modal-head h2{margin:0;font:800 28px Manrope,sans-serif}.modal-head .icon-button{font-size:27px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.settings-grid label{display:grid;gap:6px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.settings-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.danger-button{min-height:46px;padding:0 18px;border:1px solid #e8b9b1;border-radius:12px;color:#a13b2e;background:#fff}.local-note,.color-sheet>p{margin:16px 0 0;color:var(--muted);font-size:8px}.color-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}.color-grid button{aspect-ratio:1;border:3px solid #fff;border-radius:11px;background:var(--swatch);box-shadow:0 0 0 1px rgba(7,60,48,.14)}.color-grid button:hover,.color-grid button:focus-visible{transform:scale(1.09);box-shadow:0 0 0 3px var(--forest);outline:0}
@media(max-width:620px){.splash-device{width:min(300px,76vw)}.splash-brand{font-size:17px}.settings-sheet,.color-sheet{padding:20px}.settings-grid{grid-template-columns:1fr}.color-grid{gap:5px}.color-grid button{border-radius:8px}.player-name b{font-size:15px}.player-name{min-height:57px}.player-name i{font-size:6px}.desk-actions .secondary{font-size:0}.desk-actions .secondary::after{content:'↶';font-size:18px}}

.desk-head{grid-template-columns:1fr auto 1fr;min-height:54px}.desk-head>span{justify-self:start}.undo-button{justify-self:center;min-width:180px;min-height:50px;padding:0 24px;border:0;border-radius:14px;color:#fff;background:var(--forest);box-shadow:0 9px 24px rgba(7,60,48,.2);font-size:11px;font-weight:800}.desk-settings{justify-self:end;width:50px;height:50px}.time-strip{display:flex;align-items:center;justify-content:center;gap:16px;margin:-4px 0 14px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.09em}.time-strip span{display:flex;align-items:baseline;gap:7px}.time-strip strong{color:var(--deep);font:800 16px Manrope,sans-serif;letter-spacing:0}.time-strip i{width:1px;height:20px;background:var(--line)}.games small{color:var(--muted);font-size:8px;font-weight:800}
.interval-match-time{margin:5px 0 12px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.1em}.interval-match-time b{margin-left:7px;color:var(--deep);font:800 16px Manrope,sans-serif;letter-spacing:0}
.pause-score{width:min(650px,100%);margin:5px 0 4px}.pause-score h2{margin:0 0 12px;font:800 clamp(24px,4vw,42px) Manrope,sans-serif;color:var(--deep)}.pause-games{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.pause-games span{min-width:92px;padding:9px 13px;border:1px solid var(--line);border-radius:12px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;text-align:left;background:#fff;box-shadow:0 7px 20px rgba(13,75,59,.06)}.pause-games small{grid-column:1/-1;color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.1em}.pause-games b{font:800 18px Manrope,sans-serif;color:var(--ink)}.pause-games em{color:var(--muted);font-size:8px;font-style:normal;font-weight:800}
.service-box-button{display:grid;place-items:center;gap:2px;padding:7px 13px;border:0;border-radius:12px;color:#fff;background:var(--forest)}.service-box-button b{font-size:9px}.service-box-button small{font-size:6px;letter-spacing:.1em;opacity:.72}.service-box-button:hover,.service-box-button:focus-visible{background:var(--coral);outline:0}.player-score>.score-number{display:block;width:100%;min-height:150px;margin:4px 0 0;padding:0;border:0;border-radius:18px;color:var(--deep);background:transparent;box-shadow:none;font:800 clamp(105px,16vw,190px)/.8 Manrope,sans-serif;letter-spacing:-.08em}.player-score>.score-number:hover,.player-score>.score-number:focus-visible{color:var(--dress);background:color-mix(in srgb,var(--dress) 7%,transparent);outline:3px solid color-mix(in srgb,var(--dress) 25%,transparent)}.player-score>.score-number:disabled{color:var(--deep);background:transparent;opacity:.62;outline:0}.side-choice .side-question{grid-column:1/-1;color:#674b12;font:800 10px/1.35 Manrope,sans-serif;text-transform:none}
.start-match-button{justify-self:center;min-width:210px;min-height:54px;padding:0 26px;border:0;border-radius:15px;color:#fff;background:var(--coral);box-shadow:0 10px 28px rgba(255,112,90,.3);font-size:11px;font-weight:800}.player-title{display:flex;align-items:center;justify-content:center;gap:9px}.nation-badge{font-size:27px;line-height:1;filter:drop-shadow(0 2px 2px rgba(0,0,0,.12))}.player-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:18px}.player-editor-fields label{display:grid;gap:6px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.field-label{display:block;margin-bottom:9px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.07em}.player-color-grid button.selected{box-shadow:0 0 0 4px var(--forest);transform:scale(.92)}
.ready-head{grid-template-columns:1fr auto}.ready-head .desk-settings{grid-column:2;justify-self:end}.pregame-actions{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;max-width:800px;margin:-4px auto 13px}.warmup-board-button{justify-self:end;min-height:54px;padding:0 22px;border:0;border-radius:15px;color:var(--forest);background:var(--mint);box-shadow:0 9px 24px rgba(7,60,48,.1);font-size:10px;font-weight:800}.pregame-actions .undo-button{justify-self:center}.pregame-actions .start-match-button{justify-self:start}.pregame-serve{display:grid;gap:6px;width:100%}.pregame-serve>span{font-size:7px;font-weight:800;letter-spacing:.09em;color:var(--muted)}.pregame-serve>div{display:grid;grid-template-columns:1fr 1fr;gap:5px}.pregame-serve button{min-width:0;min-height:38px;padding:4px 6px;border:1px solid var(--line);border-radius:9px;color:var(--forest);background:#fff;font-size:7px;font-weight:800;line-height:1.2}.pregame-serve button.selected{border-color:var(--forest);color:#fff;background:var(--forest)}.settings-grid.basic-settings{grid-template-columns:repeat(3,1fr)}.settings-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.settings-summary article{padding:17px;border:1px solid var(--line);border-radius:14px;background:var(--paper)}.settings-summary span{display:block;margin-bottom:7px;color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.settings-summary strong{font:800 17px Manrope,sans-serif;color:var(--deep)}.online-settings-note{margin:15px 0;color:var(--muted);font-size:9px;line-height:1.6}
@media(max-width:620px){.start-match-button{min-width:145px;min-height:48px;padding:0 12px;font-size:9px}.nation-badge{font-size:20px}.player-editor-fields{grid-template-columns:1fr}}
@media(max-width:620px){.desk-head{grid-template-columns:1fr auto 1fr}.ready-head{grid-template-columns:1fr auto}.desk-head>span{display:block;font-size:7px}.undo-button{min-width:126px;min-height:48px;padding:0 12px;font-size:9px}.desk-settings{width:48px;height:48px}.time-strip{gap:9px}.time-strip strong{font-size:13px}.time-strip span{gap:4px}.pregame-actions{grid-template-columns:1fr auto 1fr;gap:5px;margin-bottom:10px}.pregame-actions button{min-width:0;min-height:46px;padding:0 7px;font-size:7px}.pregame-actions .undo-button{min-width:96px}.pregame-serve button{font-size:6px}.settings-grid.basic-settings,.settings-summary{grid-template-columns:1fr}.player-score>.score-number{min-height:105px;font-size:90px}.side-choice .side-question{font-size:7px}}
.game-progress-button{justify-self:start;min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:10px;color:var(--forest);background:#fff;font-size:8px;font-weight:800;letter-spacing:.08em}.game-progress-button:hover,.game-progress-button:focus-visible{border-color:var(--forest);background:var(--mint);outline:0}.pause-games button{min-width:92px;padding:9px 13px;border:1px solid var(--line);border-radius:12px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;text-align:left;background:#fff;box-shadow:0 7px 20px rgba(13,75,59,.06)}.pause-games button:hover,.pause-games button:focus-visible{border-color:var(--forest);outline:0}.history-hint{margin:9px auto 0!important;color:var(--muted);font-size:7px!important}.games button{display:grid;gap:4px;padding:10px 15px;border:1px solid transparent;border-radius:10px;background:#fff;color:var(--muted);font-size:8px}.games button>span{display:block;padding:0;border-radius:0;background:transparent;color:var(--muted);font-size:8px}.games button:hover,.games button:focus-visible{border-color:var(--forest);outline:0;box-shadow:0 7px 20px rgba(13,75,59,.1)}.history-sheet{width:min(720px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:26px;border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3)}.history-legend{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:13px;color:var(--muted);font-size:8px;font-weight:800}.history-legend span:last-child{text-align:right}.history-legend i{font-size:7px;font-style:normal;font-weight:600}.point-sequence{display:grid;gap:7px;margin:0;padding:0;list-style:none}.point-step{display:grid;grid-template-columns:30px 1fr auto 34px;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.sequence-number{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;color:var(--muted);background:#fff;font-size:8px;font-weight:800}.sequence-player{min-height:36px;padding:6px 10px 6px 14px;border-radius:9px;background:#fff;box-shadow:inset 5px 0 var(--sequence-color);display:grid;gap:2px}.sequence-player b{font:800 12px Manrope,sans-serif}.sequence-player small{color:var(--muted);font-size:7px}.point-step>strong{font:800 18px Manrope,sans-serif;color:var(--deep)}.point-step>em{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;color:#fff;background:var(--forest);font-size:9px;font-style:normal;font-weight:800}.history-empty{padding:45px 20px;border:1px dashed var(--line);border-radius:14px;text-align:center;color:var(--muted);font-size:9px}
@media(max-width:620px){.game-progress-button{padding:0 8px;font-size:7px}.history-sheet{padding:20px}.history-legend{grid-template-columns:1fr 1fr}.history-legend i{grid-column:1/-1;grid-row:2;text-align:center}.point-step{grid-template-columns:24px 1fr auto 28px;gap:6px;padding:7px}.sequence-number{width:21px;height:21px}.sequence-player{padding-left:10px}.sequence-player b{font-size:10px}.point-step>strong{font-size:15px}.point-step>em{width:26px;height:26px;font-size:8px}}
.desk-tools{justify-self:end;display:flex;align-items:center;gap:8px}.incident-button{min-height:42px;padding:0 14px;border:1px solid #e7b6ae;border-radius:12px;color:#9d392d;background:#fff;font-size:8px;font-weight:800}.incident-button:hover,.incident-button:focus-visible{color:#fff;background:#b94435;outline:0}.incident-sheet{width:min(760px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:26px;border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3)}.incident-intro{margin:-5px 0 18px;color:var(--muted);font-size:9px;line-height:1.6}.incident-menu{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.incident-menu button{min-height:145px;padding:20px;border:1px solid var(--line);border-radius:15px;display:grid;align-content:center;gap:9px;text-align:left;color:var(--deep);background:var(--paper)}.incident-menu button:hover,.incident-menu button:focus-visible{border-color:var(--forest);background:var(--mint);outline:0}.incident-menu .danger-choice{border-color:#ebc5bf;background:#fff7f5}.incident-menu b{font:800 16px Manrope,sans-serif}.incident-menu span{color:var(--muted);font-size:8px;line-height:1.55}.rule-source{margin:16px 0 0;color:var(--muted);font-size:7px;line-height:1.5}.incident-form{display:grid;gap:14px}.incident-form label{display:grid;gap:6px;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.incident-form textarea{min-height:82px;resize:vertical}.rule-preview{padding:14px 16px;border-left:4px solid var(--coral);border-radius:10px;color:#5d5c55;background:#fff6e5;font-size:8px;line-height:1.6}.wide{width:100%;justify-content:center}.injury-page{min-height:calc(100vh - 130px);display:grid;place-items:center;align-content:center;text-align:center}.injury-page h1{margin:10px 0 3px;font:800 clamp(34px,6vw,68px) Manrope,sans-serif}.injury-page>p{margin:0 0 20px;color:var(--muted);font-size:10px}.injury-clock{min-width:min(460px,90vw);padding:28px;border:1px solid #edc5be;border-radius:24px;background:#fff8f6;box-shadow:0 18px 55px rgba(110,40,30,.09)}.injury-clock.elapsed{border-color:#bcd4ca;background:#f2f8f5}.injury-clock span,.injury-clock small{display:block;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.1em}.injury-clock strong{display:block;margin:5px 0;font:800 clamp(72px,13vw,145px)/.9 Manrope,sans-serif;color:#b94435;letter-spacing:-.07em}.injury-clock.elapsed strong{color:var(--forest)}.injury-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin:18px 0}.injury-note{max-width:680px;padding:12px 16px;border-radius:12px;color:var(--muted);background:#fff;font-size:8px;line-height:1.55}.termination-summary{display:grid;gap:5px;max-width:600px;margin:14px auto 0;padding:13px 18px;border-left:4px solid var(--coral);border-radius:10px;text-align:left;background:#fff6e5}.termination-summary b{color:var(--deep);font-size:10px}.termination-summary span{color:var(--muted);font-size:8px;line-height:1.5}
@media(max-width:760px){.incident-menu{grid-template-columns:1fr}.incident-menu button{min-height:95px}.desk-tools{gap:4px}.incident-button{max-width:118px;padding:0 8px;font-size:7px}.injury-actions{display:grid;width:min(420px,100%)}.injury-actions button{width:100%}}
@media(max-width:620px){.incident-sheet{padding:20px}.desk-head{grid-template-columns:auto auto 1fr}.desk-tools{justify-self:end}.incident-button{font-size:0;max-width:45px}.incident-button::before{content:'⚠';font-size:18px}.injury-clock{padding:20px}.injury-clock strong{font-size:74px}}

/* APODOT facade pass: stronger distance legibility and clearer touch hierarchy. */
:root{--muted:#536b62;--line:#cbdcd5;--paper:#f4f8f6}
body{background:radial-gradient(circle at 7% 0,rgba(187,232,210,.62) 0,transparent 29%),radial-gradient(circle at 94% 18%,rgba(255,226,180,.24) 0,transparent 22%),linear-gradient(145deg,#fbfdfc,#edf5f1)}
button{transition:transform .14s ease,box-shadow .14s ease,background-color .14s ease,border-color .14s ease,color .14s ease}
button:not(:disabled):active{transform:scale(.975)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(255,112,90,.42);outline-offset:3px}
.topbar{border-bottom-color:rgba(7,60,48,.16);box-shadow:0 5px 22px rgba(7,60,48,.045)}
.connection{padding:7px 11px;border:1px solid rgba(13,75,59,.08);font-size:9px}
.splash>em{padding:14px 28px;border-color:rgba(13,75,59,.3);background:rgba(255,255,255,.82);box-shadow:0 9px 24px rgba(7,60,48,.08);font-size:11px;font-weight:800}
.splash:hover>em,.splash:focus-visible>em{color:#fff;background:var(--forest);box-shadow:0 12px 30px rgba(7,60,48,.22)}
.desk-head{margin-bottom:12px}
.time-strip{margin:0 0 14px;padding:7px 14px;border:1px solid rgba(13,75,59,.08);border-radius:999px;background:rgba(255,255,255,.72);width:max-content;max-width:100%;margin-inline:auto}
.time-strip strong{font-size:18px}
.player-score{border-color:rgba(13,75,59,.17);box-shadow:0 18px 50px rgba(7,60,48,.095)}
.player-score .dress{height:10px}
.player-score small{font-weight:800;color:#536b62}
.player-score>.score-number{border-radius:20px}
.player-score>.score-number:not(:disabled){cursor:pointer}
.player-score>.score-number:not(:disabled):hover,.player-score>.score-number:not(:disabled):focus-visible{box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--dress) 22%,transparent)}
.player-score>button:not(.player-name):not(.score-number){min-height:62px;font-size:11px;letter-spacing:.02em;box-shadow:0 8px 20px color-mix(in srgb,var(--dress) 20%,transparent)}
.serve-column>span,.pregame-serve>span{color:#536b62;font-weight:800}
.pregame-serve button{min-height:42px;border-color:#bfd2ca;font-size:8px}
.decision-panel>div{border-color:rgba(13,75,59,.16);box-shadow:0 8px 24px rgba(7,60,48,.045)}
.decision-panel span{color:#536b62;font-size:8px}
.decision-panel button{border:1px solid rgba(13,75,59,.08);font-size:10px}
.decision-panel button:not(:disabled):hover,.decision-panel button:not(:disabled):focus-visible{border-color:var(--forest);background:#ccebdc;box-shadow:0 7px 18px rgba(7,60,48,.1)}
.decision-panel .let:not(:disabled):hover,.decision-panel .let:not(:disabled):focus-visible{background:var(--deep)}
.last-call{min-height:22px;font-size:9px;line-height:1.5}
.incident-button{min-height:46px;font-size:9px;font-weight:800}
.game-progress-button{min-height:40px;font-size:9px}
.undo-button,.desk-settings{box-shadow:0 9px 24px rgba(7,60,48,.14)}
.start-match-button{box-shadow:0 12px 30px rgba(255,112,90,.33)}
.start-match-button:not(:disabled):hover,.primary:not(:disabled):hover{background:#f15f49;box-shadow:0 14px 34px rgba(255,112,90,.38)}
.warmup-board-button:not(:disabled):hover,.secondary:not(:disabled):hover{background:#ccebdc}

@media(min-width:760px) and (max-height:900px){
  main{margin-top:16px;margin-bottom:24px}
  .desk{min-height:auto}
  .desk-head{min-height:48px;margin-bottom:7px}
  .pregame-actions{margin-bottom:8px}
  .time-strip{margin-bottom:9px;padding-block:5px}
  .scoreboard{grid-template-columns:1fr 160px 1fr}
  .player-score{min-height:340px;padding-top:21px;padding-bottom:20px}
  .player-score h1{margin-top:10px}
  .player-score>.score-number{min-height:125px}
  .player-score>button:not(.player-name):not(.score-number){margin-top:14px}
  .decision-panel{margin-top:9px}
  .decision-panel>div{padding:11px}
}

.rules-grid{grid-template-columns:repeat(3,1fr)}
.pregame-draw-note{display:grid;place-items:center;gap:5px;text-align:center}
.pregame-draw-note span{color:var(--ap-muted);font-size:7px;font-weight:800;letter-spacing:.1em}
.pregame-draw-note strong{font:800 13px Manrope,Arial,sans-serif;color:var(--ap-text)}
.pregame-draw-note small{max-width:130px;color:var(--ap-muted);font-size:7px;line-height:1.35}
.serve-draw-sheet{width:min(680px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:28px;border:1px solid var(--ap-line);border-radius:22px;color:var(--ap-text);background:var(--ap-surface);box-shadow:0 30px 90px rgba(0,0,0,.42)}
.serve-draw-sheet>p{margin:-7px 0 22px;color:var(--ap-muted);font-size:10px;line-height:1.6}
.serve-draw-players{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.serve-draw-players button{min-height:92px;padding:16px;border:2px solid var(--ap-line);border-radius:15px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--ap-text);background:var(--ap-input);font-size:13px}
.serve-draw-players button i{width:18px;height:18px;border-radius:50%;background:var(--player-color);box-shadow:0 0 0 3px var(--ap-surface)}
.serve-draw-players button.selected,.serve-draw-players button:focus-visible{border-color:var(--ap-accent);background:var(--ap-surface-alt);outline:0}
.serve-draw-side{margin:18px 0;padding:17px;border:1px solid var(--ap-line);border-radius:15px;background:var(--ap-surface-alt);text-align:center}
.serve-draw-side>span{color:var(--ap-muted);font-size:7px;font-weight:800;letter-spacing:.11em}
.serve-draw-side>p{min-height:18px;margin:8px 0 13px;color:var(--ap-text);font-size:10px;font-weight:700}
.serve-draw-side>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.serve-draw-side button{min-height:48px;border:1px solid var(--ap-line);border-radius:11px;color:var(--ap-text);background:var(--ap-input)}
.serve-draw-side button.selected{color:var(--ap-on-accent);border-color:var(--ap-accent-fill);background:var(--ap-accent-fill)}

@media(max-width:620px){
  .rules-grid{grid-template-columns:1fr}
  .serve-draw-sheet{padding:20px}
  .serve-draw-sheet .modal-head h2{font-size:22px}
  .serve-draw-players{grid-template-columns:1fr}
  .serve-draw-players button{min-height:64px}
}

@media(min-width:760px) and (max-height:800px){
  .desk-head{min-height:42px}
  .pregame-actions{margin-top:-8px}
  .pregame-actions button{min-height:48px}
  .time-strip{margin-bottom:7px}
  .player-score{min-height:290px;padding:16px 20px}
  .player-name{min-height:52px;margin-top:5px!important}
  .player-score>.score-number{min-height:92px;font-size:clamp(86px,13vw,145px)}
  .player-score>button:not(.player-name):not(.score-number){min-height:50px;margin-top:9px}
  .decision-panel>div{padding:8px 10px}
  .decision-panel button{min-height:43px}
  .last-call{margin-top:7px}
}

@media(max-width:620px){
  main{width:calc(100% - 14px);margin-top:12px;padding-bottom:env(safe-area-inset-bottom)}
  .topbar{padding-top:env(safe-area-inset-top);height:calc(64px + env(safe-area-inset-top))}
  .connection{font-size:8px}
  .time-strip{width:100%;padding:6px 8px}
  .player-score{border-radius:18px;box-shadow:0 12px 30px rgba(7,60,48,.08)}
  .player-score>.score-number{min-height:112px}
  .player-score>button:not(.player-name):not(.score-number){min-height:54px;margin-top:14px;font-size:8px}
  .decision-panel button{font-size:9px}
  .last-call{font-size:8px}
}

@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* APODOT Rackets brand themes. */
html[data-theme=light]{
  color-scheme:light;
  --ap-bg:#f7f4ed;--ap-surface:#fffdf8;--ap-surface-alt:#eee9df;--ap-deep:#e7e1d5;
  --ap-accent:#806022;--ap-accent-fill:#dfbe78;--ap-accent-hover:#ecd299;--ap-text:#282c2e;
  --ap-muted:#565950;--ap-line:#c8bfae;--ap-header:#fcfaf5;--ap-input:#fffdf8;--ap-on-accent:#282c2e;
  --forest:#806022;--deep:#282c2e;--mint:#eee9df;--coral:#806022;--ink:#282c2e;
  --muted:#565950;--line:#c8bfae;--paper:#f7f4ed;--white:#fffdf8;--gold:#dfbe78;
}
html[data-theme=dark]{
  color-scheme:dark;
  --ap-bg:#343638;--ap-surface:#3e4143;--ap-surface-alt:#474a4c;--ap-deep:#2b2d2f;
  --ap-accent:#dfbe78;--ap-accent-fill:#dfbe78;--ap-accent-hover:#ebd09a;--ap-text:#f5f3ed;
  --ap-muted:#c6c7c3;--ap-line:#62625c;--ap-header:#343638;--ap-input:#2b2d2f;--ap-on-accent:#282c2e;
  --forest:#dfbe78;--deep:#2b2d2f;--mint:#474a4c;--coral:#dfbe78;--ink:#f5f3ed;
  --muted:#c6c7c3;--line:#62625c;--paper:#343638;--white:#3e4143;--gold:#dfbe78;
}
body{color:var(--ap-text);background:radial-gradient(ellipse at 82% 4%,color-mix(in srgb,var(--ap-accent-fill) 12%,transparent),transparent 29%),var(--ap-bg)}
.topbar{color:var(--ap-text);border-bottom-color:var(--ap-line);background:color-mix(in srgb,var(--ap-header) 94%,transparent);box-shadow:0 8px 25px rgba(0,0,0,.08)}
.brand{color:var(--ap-text);gap:13px}
.brand-mark{width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:0;background:transparent}
.brand-mark img{width:42px;height:42px;display:block;object-fit:contain;filter:none}
.brand-copy{display:grid;gap:3px}
.brand-wordmark{display:block;width:132px;height:auto;filter:none}
.brand small{color:var(--ap-accent);font-size:7px;letter-spacing:.22em}
.topbar-actions{display:flex;align-items:center;gap:10px}
.theme-toggle{min-height:38px;padding:0 13px;border:1px solid var(--ap-line);border-radius:3px;color:var(--ap-text);background:transparent;font-size:9px;font-weight:800;letter-spacing:.06em;white-space:nowrap}
.theme-toggle:hover,.theme-toggle:focus-visible{color:var(--ap-accent);border-color:var(--ap-accent)}
.theme-toggle[hidden]{display:none}
.header-help{width:38px;height:38px;padding:0;border:1px solid var(--ap-line);border-radius:50%;color:var(--ap-text);background:transparent;font:800 15px/1 Arial,sans-serif}
.header-help:hover,.header-help:focus-visible{color:var(--ap-on-accent);border-color:var(--ap-accent-fill);background:var(--ap-accent-fill)}
.connection{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface-alt)}
.connection.down{color:#fff;background:#984c42}
.primary,.start-match-button{color:var(--ap-on-accent);background:var(--ap-accent-fill);box-shadow:0 10px 28px color-mix(in srgb,var(--ap-accent-fill) 24%,transparent)}
.primary:not(:disabled):hover,.start-match-button:not(:disabled):hover{color:var(--ap-on-accent);background:var(--ap-accent-hover);box-shadow:0 13px 32px color-mix(in srgb,var(--ap-accent-fill) 30%,transparent)}
.secondary,.warmup-board-button{color:var(--ap-text);background:var(--ap-surface-alt);border:1px solid var(--ap-line)}
.secondary:not(:disabled):hover,.warmup-board-button:not(:disabled):hover{color:var(--ap-accent);border-color:var(--ap-accent);background:var(--ap-surface-alt)}
.text-button,.eyebrow{color:var(--ap-accent)}
input,select,textarea{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-input)}
input:focus,select:focus,textarea:focus{border-color:var(--ap-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--ap-accent-fill) 18%,transparent)}

body.splash-active{background:var(--ap-bg)}
.splash{color:var(--ap-text);background:radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--ap-accent-fill) 16%,var(--ap-bg)) 0,var(--ap-bg) 58%,var(--ap-deep) 100%)}
.splash-device>.tablet-image{filter:drop-shadow(0 28px 35px rgba(0,0,0,.28))}
.splash-device>.splash-emblem{filter:none}
.splash-brand{display:block;width:min(220px,55vw);margin-top:28px}
.splash-brand img{display:block;width:100%;height:auto}
.splash>strong{color:var(--ap-accent)}
.splash>em{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface);box-shadow:0 10px 28px rgba(0,0,0,.12)}
.splash:hover>em,.splash:focus-visible>em{color:var(--ap-on-accent);border-color:var(--ap-accent-fill);background:var(--ap-accent-fill);box-shadow:0 12px 30px color-mix(in srgb,var(--ap-accent-fill) 22%,transparent)}

.mode-card,.center-card,.match-card,.setup-form,.players-setup fieldset,.player-score,.decision-panel>div,
.settings-sheet,.color-sheet,.incident-sheet,.history-sheet,.pause-games button,.games button,.injury-note,
.settings-summary article,.termination-summary{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface);box-shadow:0 18px 50px rgba(0,0,0,.1)}
.mode-card.offline{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-deep)}
.mode-card.offline small,.mode-card small,.center-card>p,.page-head p,.match-card p,.match-card small,
.setup-copy p,.rules-hint,.player-score small,.last-call,.local-note,.color-sheet>p,.online-settings-note,
.incident-intro,.rule-source,.injury-page>p,.injury-note,.termination-summary span,.history-hint{color:var(--ap-muted)}
.mode-card b,.mode-card.offline b,.match-card h2,.page-head h1,.setup-copy h1,.modal-head h2,
.timer-page h1,.finished h1,.injury-page h1,.termination-summary b{color:var(--ap-text)}
.status{color:var(--ap-text);background:var(--ap-surface-alt)}
.status.playing{color:var(--ap-on-accent);background:var(--ap-accent-fill)}
.status.called,.status.completed{color:var(--ap-on-accent);background:var(--ap-accent-fill)}
.status.delayed,.status.result_pending{color:var(--ap-on-accent);background:#dfbe78}
.empty{color:var(--ap-muted);border-color:var(--ap-line)}

.undo-button{color:var(--ap-on-accent);background:var(--ap-accent-fill);box-shadow:0 9px 24px color-mix(in srgb,var(--ap-accent-fill) 20%,transparent)}
.icon-button,.desk-settings{color:var(--ap-text);border:1px solid var(--ap-line);background:var(--ap-surface-alt)}
.time-strip{color:var(--ap-muted);border-color:var(--ap-line);background:color-mix(in srgb,var(--ap-surface) 86%,transparent)}
.time-strip strong,.interval-match-time b,.timer,.pause-score h2,.finished>strong{color:var(--ap-text)}
.time-strip i{background:var(--ap-line)}
.player-score{border-color:var(--ap-line);background:var(--ap-surface)}
.player-name,.player-name b{color:var(--ap-text)!important}
.player-name i{color:var(--ap-muted)}
.player-score>.score-number,.player-score>.score-number:disabled{color:var(--ap-text);background:transparent}
.serve-column>span,.serve-column>strong,.pregame-serve>span{color:var(--ap-muted)}
.pregame-serve button{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-input)}
.pregame-serve button.selected,.side-choice button,.service-box-button{color:var(--ap-on-accent);border-color:var(--ap-accent-fill);background:var(--ap-accent-fill)}
.side-choice{border-color:var(--ap-accent);background:color-mix(in srgb,var(--ap-accent-fill) 16%,var(--ap-surface))}
.side-choice small,.side-choice .side-question{color:var(--ap-text)}
.decision-panel>div{border-color:var(--ap-line);background:var(--ap-surface)}
.decision-panel span{color:var(--ap-muted)}
.decision-panel button{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface-alt)}
.decision-panel button:not(:disabled):hover,.decision-panel button:not(:disabled):focus-visible{color:var(--ap-accent);border-color:var(--ap-accent);background:var(--ap-surface-alt)}
.decision-panel .let,.decision-panel .let:not(:disabled):hover,.decision-panel .let:not(:disabled):focus-visible{color:var(--ap-on-accent);border-color:var(--ap-accent-fill);background:var(--ap-accent-fill)}
.game-progress-button{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface)}
.game-progress-button:hover,.game-progress-button:focus-visible{color:var(--ap-accent);border-color:var(--ap-accent);background:var(--ap-surface-alt)}

.half{color:var(--ap-muted);background:var(--ap-surface-alt)}
.half.active{color:var(--ap-on-accent);background:var(--ap-accent-fill)}
.pause-games button,.games button{color:var(--ap-muted);border-color:var(--ap-line);background:var(--ap-surface)}
.pause-games b,.games b{color:var(--ap-text)}
.history-sheet,.incident-sheet,.settings-sheet,.color-sheet{background:var(--ap-surface)}
.point-step{border-color:var(--ap-line);background:var(--ap-surface-alt)}
.sequence-number,.sequence-player{color:var(--ap-text);background:var(--ap-surface)}
.sequence-player small,.history-legend,.point-step>strong{color:var(--ap-muted)}
.point-step>em{color:var(--ap-on-accent);background:var(--ap-accent-fill)}
.incident-menu button{color:var(--ap-text);border-color:var(--ap-line);background:var(--ap-surface-alt)}
.incident-menu button:hover,.incident-menu button:focus-visible{border-color:var(--ap-accent);background:color-mix(in srgb,var(--ap-accent-fill) 12%,var(--ap-surface-alt))}
.incident-menu span{color:var(--ap-muted)}
.rule-preview,.termination-summary{color:var(--ap-text);border-left-color:var(--ap-accent-fill);background:color-mix(in srgb,var(--ap-accent-fill) 14%,var(--ap-surface))}
.injury-clock{border-color:#b86b61;background:color-mix(in srgb,#b86b61 13%,var(--ap-surface));box-shadow:0 18px 55px rgba(0,0,0,.12)}
.injury-clock.elapsed{border-color:var(--ap-line);background:var(--ap-surface-alt)}
.injury-clock span,.injury-clock small{color:var(--ap-muted)}
.injury-clock strong{color:#d97869}
.injury-clock.elapsed strong{color:var(--ap-accent)}
.danger-button{color:#fff;border-color:#a85b51;background:#984c42}
.danger-button:hover,.danger-button:focus-visible{background:#ad594e}
.incident-button{color:#e48a7e;border-color:#a85b51;background:transparent}
.incident-button:hover,.incident-button:focus-visible{color:#fff;background:#984c42}
.toast{color:var(--ap-on-accent);background:var(--ap-accent-fill)}

.help-sheet{width:min(900px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:28px;border:1px solid var(--ap-line);border-radius:22px;color:var(--ap-text);background:var(--ap-surface);box-shadow:0 30px 90px rgba(0,0,0,.34)}
.help-intro{margin:-7px 0 20px;color:var(--ap-muted);font-size:11px;line-height:1.65}
.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.help-grid article{min-height:112px;padding:16px;border:1px solid var(--ap-line);border-radius:13px;display:grid;grid-template-columns:34px 1fr;align-content:start;gap:12px;background:var(--ap-surface-alt)}
.help-grid article>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:var(--ap-on-accent);background:var(--ap-accent-fill);font-size:11px;font-weight:800}
.help-grid h3{margin:1px 0 5px;color:var(--ap-text);font:800 14px Manrope,Arial,sans-serif}
.help-grid p{margin:0;color:var(--ap-muted);font-size:9px;line-height:1.58}
.help-callout{margin:14px 0 10px;padding:14px 16px;border-left:4px solid var(--ap-accent-fill);border-radius:8px;color:var(--ap-muted);background:color-mix(in srgb,var(--ap-accent-fill) 11%,var(--ap-surface));font-size:9px;line-height:1.65}
.help-callout b{color:var(--ap-text)}

@media(max-width:620px){
  .brand-mark{width:35px;height:35px}.brand-mark img{width:35px;height:35px}
  .brand-wordmark{width:104px}.brand small{font-size:6px;letter-spacing:.17em}.theme-toggle{min-height:36px;padding:0 9px;font-size:8px}
  .topbar-actions{gap:6px}.header-help{width:34px;height:34px}.connection{padding-inline:8px}
  .help-sheet{padding:20px}.help-grid{grid-template-columns:1fr}.help-grid article{min-height:auto}
}

.finished-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:10px}
.archive-sheet{width:min(760px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:28px;border:1px solid var(--ap-line);border-radius:22px;color:var(--ap-text);background:var(--ap-surface);box-shadow:0 30px 90px rgba(0,0,0,.34)}
.archive-intro{margin:-6px 0 18px;color:var(--ap-muted);font-size:10px;line-height:1.65}
.archive-list{display:grid;gap:10px}
.archive-card{width:100%;padding:16px 18px;border:1px solid var(--ap-line);border-radius:14px;display:grid;grid-template-columns:1fr auto;gap:6px 14px;text-align:left;color:var(--ap-text);background:var(--ap-surface-alt)}
.archive-card:hover,.archive-card:focus-visible{border-color:var(--ap-accent);background:color-mix(in srgb,var(--ap-accent-fill) 9%,var(--ap-surface-alt));outline:0}
.archive-card>span{grid-column:1/-1;color:var(--ap-accent);font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.archive-card>strong{font:800 15px Manrope,Arial,sans-serif}.archive-card>strong i{padding:0 6px;color:var(--ap-accent);font-style:normal}
.archive-card>small{align-self:center;color:var(--ap-muted);font-size:9px;font-weight:700}
.archive-empty{padding:42px 20px;border:1px dashed var(--ap-line);border-radius:14px;display:grid;gap:7px;text-align:center;color:var(--ap-muted)}
.archive-empty strong{color:var(--ap-text);font:800 16px Manrope,Arial,sans-serif}.archive-empty span{font-size:9px}
.archive-score{display:grid;justify-items:center;gap:6px;padding:12px 0 18px;text-align:center}
.archive-score>strong{font:800 64px Manrope,Arial,sans-serif;color:var(--ap-text)}
.archive-score>span{font:800 17px Manrope,Arial,sans-serif}.archive-score>small{color:var(--ap-muted);font-size:9px}
.archive-games{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin:18px 0 8px}
.archive-games button{min-width:104px;padding:12px;border:1px solid var(--ap-line);border-radius:12px;display:grid;gap:4px;color:var(--ap-text);background:var(--ap-surface-alt)}
.archive-games button:hover,.archive-games button:focus-visible{border-color:var(--ap-accent);outline:0}
.archive-games span,.archive-games small{color:var(--ap-muted);font-size:8px}.archive-games b{font:800 20px Manrope,Arial,sans-serif}

@media(max-width:620px){
  .archive-sheet{padding:20px}.archive-card{grid-template-columns:1fr}.archive-card>small{justify-self:start}.archive-score>strong{font-size:52px}
}

.match-card.target-match{border:2px solid var(--ap-accent);box-shadow:0 16px 42px color-mix(in srgb,var(--ap-accent) 20%,transparent)}
.target-label{display:block;margin:-6px 0 13px;color:var(--ap-accent);font-size:7px;letter-spacing:.1em}
.court-pairing{margin:0 0 18px;padding:15px 18px;border:1px solid var(--ap-line);border-left:5px solid var(--ap-accent-fill);border-radius:12px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:4px 14px;color:var(--ap-text);background:var(--ap-surface);box-shadow:0 10px 28px rgba(0,0,0,.08)}
.court-pairing>span{grid-column:1/-1;color:var(--ap-accent);font-size:7px;font-weight:800;letter-spacing:.12em}
.court-pairing>strong{font:800 18px Manrope,Arial,sans-serif}.court-pairing>small{color:var(--ap-muted);font-size:9px}.court-pairing>button{grid-column:3;grid-row:2/4;white-space:nowrap}
.court-code-entry{width:min(560px,100%)}
.court-code-entry h1{max-width:500px}
.court-code-input{font:800 clamp(28px,8vw,44px) Manrope,Arial,sans-serif!important;letter-spacing:.16em;text-align:center}
.official-note{display:block;min-height:30px;margin:0 0 14px;color:var(--ap-muted);font-size:8px;line-height:1.45}
.official-confirm h1{font-size:clamp(28px,5vw,48px)}
.official-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.official-choice button{width:100%}
.tournament-id-fallback{margin-top:22px;padding-top:18px;border-top:1px solid var(--ap-line)}
.tournament-id-fallback summary{cursor:pointer;color:var(--ap-muted);font-size:9px;font-weight:800;text-align:center}
.tournament-id-fallback .stack{margin-top:16px}
.landscape-match-clock{display:none}
@media(min-width:761px){.incident-menu{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.court-pairing{grid-template-columns:1fr}.court-pairing>button{grid-column:1;grid-row:auto;justify-self:start}}

/* High-contrast score in the night theme. */
html[data-theme=dark] .player-score>.score-number,
html[data-theme=dark] .player-score>.score-number:disabled{color:#fff}

/* Centered point history: player one left, player two right. */
.timeline-history{width:min(620px,100%)}
.history-players{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
  margin:0 auto 14px;
  color:var(--ap-text);
  font-size:9px;
  font-weight:800;
}
.history-players>span{display:flex;align-items:center;gap:8px;min-width:0}
.history-players>span:last-child{justify-content:flex-end;text-align:right}
.history-players>span i{
  flex:0 0 auto;
  width:12px;
  height:12px;
  border:2px solid color-mix(in srgb,var(--player-color) 75%,var(--ap-line));
  border-radius:50%;
  background:var(--player-color);
}
.history-players>b{color:var(--ap-muted);font-size:7px;letter-spacing:.09em}
.timeline-sequence{
  position:relative;
  width:min(440px,100%);
  margin:0 auto;
  padding:4px 0;
  display:grid;
  gap:5px;
}
.timeline-sequence::before{
  content:'';
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:2px;
  background:var(--ap-line);
  transform:translateX(-50%);
}
.timeline-step{
  position:relative;
  min-height:43px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);
  align-items:center;
  list-style:none;
}
.timeline-event{display:flex;align-items:center;gap:8px;z-index:1}
.timeline-step.p0 .timeline-event{grid-column:1;justify-self:end}
.timeline-step.p1 .timeline-event{grid-column:3;justify-self:start;flex-direction:row-reverse}
.timeline-event small{
  max-width:135px;
  overflow:hidden;
  color:var(--ap-muted);
  font-size:7px;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.timeline-score{
  flex:0 0 auto;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:2px solid color-mix(in srgb,var(--score-color) 70%,var(--ap-line));
  border-radius:50%;
  color:var(--score-ink);
  background:var(--score-color);
  box-shadow:0 5px 13px color-mix(in srgb,var(--score-color) 25%,transparent);
  font:800 10px/1 Manrope,Arial,sans-serif;
}
.timeline-node{
  grid-column:2;
  grid-row:1;
  justify-self:center;
  z-index:2;
  width:9px;
  height:9px;
  border:2px solid var(--ap-surface);
  border-radius:50%;
  background:var(--ap-accent-fill);
  box-shadow:0 0 0 1px var(--ap-line);
}
.history-final{
  position:relative;
  width:min(250px,100%);
  margin:14px auto 0;
  padding:12px 18px;
  border:1px solid var(--ap-line);
  border-radius:14px;
  display:grid;
  place-items:center;
  gap:3px;
  color:var(--ap-text);
  background:var(--ap-surface-alt);
}
.history-sanctions{
  width:min(440px,100%);
  margin:13px auto 0;
  display:grid;
  gap:8px;
}
.history-sanctions article{
  position:relative;
  padding:11px 14px 11px 17px;
  border:1px solid var(--ap-line);
  border-left:5px solid var(--sanction-color);
  border-radius:12px;
  display:grid;
  gap:3px;
  color:var(--ap-text);
  background:var(--ap-surface-alt);
  box-shadow:0 8px 22px color-mix(in srgb,var(--sanction-color) 12%,transparent);
}
.history-sanctions span{color:var(--ap-accent);font-size:7px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.history-sanctions strong{font:800 13px/1.25 Manrope,Arial,sans-serif}
.history-sanctions small{color:var(--ap-muted);font-size:7px;font-weight:700}
.history-sanctions em{margin-top:2px;color:var(--ap-muted);font-size:7px;font-style:normal;line-height:1.45}
.history-final span{color:var(--ap-muted);font-size:7px;font-weight:800;letter-spacing:.09em}
.history-final strong{font:800 27px/1 Manrope,Arial,sans-serif}
.timeline-note{margin:9px 0 0;text-align:center;color:var(--ap-muted);font-size:7px}

@media(max-width:620px){
  .timeline-history{padding:17px}
  .timeline-history .modal-head{margin-bottom:12px}
  .history-players{gap:7px;margin-bottom:9px;font-size:8px}
  .history-players>b{font-size:6px}
  .timeline-sequence{width:min(390px,100%);gap:3px}
  .timeline-step{min-height:38px;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}
  .timeline-score{width:35px;height:35px;font-size:9px}
  .timeline-event{gap:5px}
  .timeline-event small{max-width:135px;font-size:6px}
  .history-final{margin-top:10px;padding:9px 14px}
  .history-sanctions{margin-top:9px;gap:6px}
  .history-sanctions article{padding:8px 10px 8px 12px}
  .history-final strong{font-size:23px}
}

/* Phone landscape: keep the complete scoring desk inside the visible viewport. */
@media (orientation:landscape) and (max-height:600px){
  body.scoring-active{
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    overflow:hidden;
    overscroll-behavior:none;
  }
  body.scoring-active .topbar{display:none}
  body.scoring-active main{
    width:100%;
    height:100vh;
    height:100dvh;
    margin:0;
    padding:max(4px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));
    overflow:hidden;
  }
  body.scoring-active .desk{
    width:100%;
    height:100%;
    min-height:0;
    display:grid;
    grid-template-rows:28px 0 0 minmax(0,1fr) 39px 10px;
    gap:3px;
    overflow:hidden;
  }
  body.scoring-active .desk-head{
    grid-row:1;
    grid-column:1;
    min-height:0;
    height:28px;
    margin:0;
    grid-template-columns:1fr auto 1fr;
    font-size:7px;
  }
  body.scoring-active .ready-head{grid-template-columns:1fr auto}
  body.scoring-active .ready-head>span{align-self:center}
  body.scoring-active .game-progress-button{
    min-height:26px;
    height:26px;
    padding:0 8px;
    border-radius:8px;
    font-size:7px;
  }
  body.scoring-active .undo-button{
    min-width:112px;
    min-height:26px;
    height:26px;
    padding:0 10px;
    border-radius:8px;
    font-size:8px;
    box-shadow:none;
  }
  body.scoring-active .desk-tools{gap:4px}
  body.scoring-active .incident-button{
    width:34px;
    min-width:34px;
    max-width:34px;
    min-height:26px;
    height:26px;
    padding:0;
    border-radius:8px;
    font-size:0;
  }
  body.scoring-active .incident-button::before{content:'⚠';font-size:14px}
  body.scoring-active .desk-settings{
    width:26px;
    height:26px;
    border-radius:8px;
    font-size:16px;
    box-shadow:none;
  }
  body.scoring-active .pregame-actions{
    grid-row:1;
    grid-column:1;
    width:min(470px,calc(100% - 156px));
    margin:0 auto;
    gap:4px;
    align-self:center;
    z-index:2;
  }
  body.scoring-active .pregame-actions button{
    min-width:0;
    min-height:24px;
    height:24px;
    padding:0 7px;
    border-radius:7px;
    font-size:6px;
    box-shadow:none;
  }
  body.scoring-active .pregame-actions .undo-button{min-width:100px}
  body.scoring-active .time-strip{
    grid-row:3;
    grid-column:1;
    display:none;
  }
  body.scoring-active .time-strip span{gap:4px}
  body.scoring-active .time-strip strong{font-size:11px}
  body.scoring-active .time-strip i{height:12px}
  body.scoring-active .scoreboard{
    grid-row:4;
    grid-column:1;
    min-width:0;
    min-height:0;
    height:100%;
    grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr);
    gap:4px;
  }
  body.scoring-active .player-score{
    min-width:0;
    min-height:0;
    height:100%;
    padding:7px 7px 5px;
    border-radius:11px;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) 23px;
    align-items:center;
    box-shadow:none;
  }
  body.scoring-active .player-score .dress{height:5px}
  body.scoring-active .player-score small{font-size:6px}
  body.scoring-active .player-name{
    min-height:28px;
    height:28px;
    margin:0!important;
    padding:1px!important;
    overflow:hidden;
  }
  body.scoring-active .player-name b{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:clamp(11px,2.25vw,18px);
  }
  body.scoring-active .player-name i{display:none}
  body.scoring-active .nation-badge{font-size:15px}
  body.scoring-active .player-score>.score-number{
    min-height:0;
    height:100%;
    margin:0;
    border-radius:8px;
    font-size:clamp(48px,19vh,86px);
    line-height:.84;
  }
  body.scoring-active .player-score>button:not(.player-name):not(.score-number){
    min-height:21px;
    height:21px;
    margin:0;
    padding:2px 5px;
    border-radius:7px;
    font-size:7px;
    box-shadow:none;
  }
  body.scoring-active .serve-column{
    min-width:0;
    min-height:0;
    gap:3px;
    overflow:hidden;
  }
  body.scoring-active .landscape-match-clock{
    display:grid;
    place-items:center;
    gap:1px;
    width:100%;
    padding:3px 2px;
    border:1px solid var(--ap-line);
    border-radius:7px;
    color:var(--ap-text);
    background:var(--ap-surface);
  }
  body.scoring-active .landscape-match-clock span{
    color:var(--ap-muted);
    font-size:5px;
    font-weight:800;
    letter-spacing:.05em;
  }
  body.scoring-active .landscape-match-clock strong{
    font:800 12px/1 Manrope,Arial,sans-serif;
  }
  body.scoring-active .serve-column>span,
  body.scoring-active .pregame-serve>span{font-size:5px;letter-spacing:.05em}
  body.scoring-active .serve-column>strong{font-size:7px;word-break:break-word}
  body.scoring-active .service-box-button{
    padding:5px 7px;
    border-radius:7px;
  }
  body.scoring-active .service-box-button b{font-size:7px}
  body.scoring-active .pregame-serve{gap:2px}
  body.scoring-active .pregame-serve>div{gap:2px}
  body.scoring-active .pregame-serve button{
    min-height:27px;
    padding:2px;
    border-radius:6px;
    font-size:5px;
  }
  body.scoring-active .side-choice{
    grid-template-columns:1fr 1fr;
    gap:3px;
    margin-top:3px;
    padding:4px;
    border-radius:7px;
  }
  body.scoring-active .side-choice .side-question{
    font-size:6px;
    line-height:1.15;
  }
  body.scoring-active .side-choice button{
    min-height:25px;
    padding:2px;
    border-radius:5px;
    font-size:6px;
  }
  body.scoring-active .decision-panel{
    grid-row:5;
    grid-column:1;
    height:39px;
    margin:0;
    grid-template-columns:.7fr 1fr 1fr;
    gap:4px;
  }
  body.scoring-active .decision-panel>div,
  body.scoring-active .decision-panel>div:first-child{
    grid-column:auto;
    min-width:0;
    padding:3px;
    gap:3px;
    border-radius:8px;
    box-shadow:none;
  }
  body.scoring-active .decision-panel span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:5px;
    letter-spacing:.05em;
  }
  body.scoring-active .decision-panel button{
    min-width:0;
    min-height:21px;
    height:21px;
    padding:2px 3px;
    overflow:hidden;
    text-overflow:ellipsis;
    border-radius:6px;
    font-size:6px;
    white-space:nowrap;
  }
  body.scoring-active .last-call{
    grid-row:6;
    grid-column:1;
    min-height:0;
    height:10px;
    margin:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:6px;
    line-height:10px;
  }
}
