:root{--ink:#202019;--soft:#6a685d;--ground:#f7f6f2;--paper:#fff;--stroke:#e7e4da;--gold:#ffdb32;--pale:#fff6c5;--nav:#22231e;--green:#177245;--radius:14px;font-family:Inter,system-ui,sans-serif;color:var(--ink);background:var(--ground);font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.button{border:1px solid var(--stroke);background:#fff;color:var(--ink);padding:9px 13px;border-radius:9px;cursor:pointer;font-weight:650;text-decoration:none;display:inline-flex;align-items:center;gap:7px;justify-content:center}button:hover,.button:hover{border-color:#a5a18b;background:#faf9f4}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #937600;outline-offset:2px}button:disabled{opacity:.48;cursor:default}.primary,.primary:hover{background:var(--gold);border-color:var(--gold);color:#221d06}.primary:hover{filter:brightness(.96)}.quiet{padding:5px 9px;font-size:.85rem}.danger{color:#a02c20}.layout{min-height:100vh;display:grid;grid-template-columns:235px minmax(0,1fr)}aside{background:var(--nav);color:white;padding:28px 17px;display:flex;flex-direction:column;gap:26px;position:sticky;top:0;height:100vh}a{color:inherit}.brand{display:flex;align-items:center;gap:11px;padding:0 7px}.brand strong{display:block;font-size:20px;letter-spacing:-.6px}.brand small{display:block;color:#bab9ad;margin-top:2px;font-size:11px}.logo{width:39px;height:39px;flex:none;background:var(--gold);border-radius:11px;display:grid;place-items:center;color:#272318;font-size:25px;line-height:1}nav{display:grid;gap:5px}nav button{background:transparent;border-color:transparent;color:#d4d2c5;justify-content:start;text-align:left;padding:11px 10px;font-weight:600}nav button:hover{background:#35362d;color:#fff;border-color:transparent}nav button.active{background:var(--gold);color:#222;border-color:transparent}nav i{width:22px;text-align:center;font-style:normal;font-size:15px}.sidefoot{margin-top:auto;color:#bdbbb0;padding:8px;font-size:12px}.shell{min-width:0}.top{height:auto;min-height:66px;padding:10px clamp(15px,3.2vw,45px);display:flex;gap:10px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--stroke);background:white}.top select{max-width:min(310px,48vw);font-weight:650}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.content{max-width:1460px;margin:auto;padding:29px clamp(15px,3.2vw,45px) 50px}.hero{background:var(--pale);border:1px solid #f0e39d;border-radius:18px;padding:28px 29px;margin-bottom:21px;position:relative;overflow:hidden;isolation:isolate}.hero:after{content:"";position:absolute;z-index:-1;width:340px;height:340px;right:-50px;top:-131px;border:34px solid #f6e79c;border-radius:50%;box-shadow:0 0 0 18px #fff1ab,inset 0 0 0 17px #fff1ab;opacity:.72;pointer-events:none}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-weight:750;font-size:10px;color:#65551c}.hero h1{margin:7px 0 10px;font-size:clamp(25px,3.4vw,46px);letter-spacing:-.06em;line-height:1.07}.hero p{color:#655b36;margin:0 0 17px}.hero p:last-child{margin-bottom:0}.heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 17px}.heading h1,.heading h2{margin:0}.heading h1{font-size:29px;letter-spacing:-.04em}h2{font-size:18px;letter-spacing:-.025em;margin:0 0 12px}h3{margin:0 0 10px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:21px}.card{background:var(--paper);border:1px solid var(--stroke);border-radius:var(--radius);padding:17px;min-width:0}.stat{display:grid;grid-template-columns:1fr auto;align-items:start;gap:5px}.stat b{grid-column:1;font-size:27px;letter-spacing:-.05em}.stat em{font-style:normal;background:#f8f6ee;border-radius:8px;grid-column:2;grid-row:1/3;padding:7px 9px;color:#716339}.muted,.stat span{color:var(--soft)}.columns{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,1fr);gap:16px}.stack{display:grid;gap:14px;align-content:start}.court{display:flex;justify-content:space-between;gap:10px;padding:13px 0;border-top:1px solid var(--stroke);align-items:center}.court p{margin:4px 0 0}.court:last-child{padding-bottom:0}.tag{border-radius:999px;background:#f0eee6;color:#5c594d;font-weight:700;font-size:11px;white-space:nowrap;padding:4px 8px;display:inline-block}.tag.live{background:#ffe68a;color:#6b4e00}.tag.done{background:#e5f4eb;color:var(--green)}.tag.assigned{background:#e9eefb;color:#314b83}.tag-dot:before{content:"";width:6px;height:6px;background:currentColor;display:inline-block;border-radius:50%;margin-right:6px;vertical-align:1px}.list{list-style:none;padding:0;margin:0}.list li{padding:10px 0;border-top:1px solid var(--stroke)}.list small{display:block;margin-top:4px;color:var(--soft)}.formgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:14px}.field{display:grid;gap:5px;min-width:0;font-weight:650;font-size:12px}.wide{grid-column:1/-1}input,select,textarea{width:100%;min-width:0;border:1px solid #dcd9cf;border-radius:8px;padding:9px;background:#fff;color:var(--ink)}textarea{min-height:92px;resize:vertical}form{margin:0}.scroll{overflow:auto}.filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.filters select{width:auto}.table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}.table th,.table td{border-bottom:1px solid var(--stroke);padding:10px 9px;vertical-align:middle}.table th{white-space:nowrap;color:#5a584c;background:#faf9f5;font-weight:650}.table tr:last-child td{border-bottom:0}.table td:first-child{font-variant-numeric:tabular-nums}.table small{color:var(--soft)}.matchline{display:flex;gap:8px;align-items:center}.scoreform{display:grid;gap:10px;margin-top:12px}.setrow{display:grid;grid-template-columns:75px minmax(45px,90px) 14px minmax(45px,90px);align-items:center;gap:8px}.small{font-size:12px}.public .top{position:sticky;top:0;z-index:2}.public .brand strong{color:var(--ink)}.public .brand small{color:var(--soft)}.public .content{max-width:1100px}.empty{padding:15px 0;color:var(--soft);margin:0}.loading{padding:3rem}.progress{height:7px;background:#efede3;border-radius:10px;overflow:hidden;margin:12px 0}.progress span{display:block;height:100%;background:#e1b900}.metric{display:flex;justify-content:space-between;gap:8px}.print-option{display:flex;justify-content:space-between;gap:10px;align-items:center}.print-option p{margin:4px 0 0}.inline-select{max-width:160px}.placeholder{text-align:center;margin:8vh auto;max-width:650px}.accesslinks{display:grid;gap:9px;margin-top:11px}.accesslinks input{font-size:12px}.mobile-brand{display:none}#notice{position:fixed;bottom:20px;right:20px;max-width:min(460px,90vw);z-index:5;background:#22231e;color:white;padding:12px 16px;border-radius:10px;box-shadow:0 6px 22px #0002}#notice:empty,#paper{display:none}
@media(max-width:950px){.layout{grid-template-columns:185px minmax(0,1fr)}aside{padding-inline:10px}.columns{grid-template-columns:1fr}.stat em{display:none}.hero:after{opacity:.44}}
@media(max-width:680px){.layout{display:block}aside{position:static;height:auto;padding:10px;gap:8px}aside nav{display:flex;overflow:auto}aside nav button{white-space:nowrap;padding:7px 9px}aside nav i,.sidefoot{display:none}.brand strong{font-size:16px}.brand .logo{width:30px;height:30px;font-size:19px}.content{padding-top:17px}.stats{grid-template-columns:repeat(2,1fr);gap:8px}.formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding:18px}.top{align-items:flex-start}.top .actions{justify-content:end}.heading{align-items:flex-start;flex-wrap:wrap}.card{padding:12px}}
@media print{body>*{display:none!important}body>#paper{display:block!important;font-family:Arial,sans-serif;font-size:11pt;color:#000}.printtitle{font-size:19pt;margin:0 0 4mm}.paper-table{width:100%;border-collapse:collapse;margin-bottom:5mm}.paper-table td,.paper-table th{border:1px solid #777;text-align:left;padding:2mm}.print-group{break-inside:avoid}@page{margin:12mm}}

.scoreboard{background:#faf9f5;border:1px solid var(--stroke);border-radius:12px;padding:clamp(10px,2vw,18px);margin:12px 0}
.score-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
.score-side{background:white;border:1px solid var(--stroke);border-radius:10px;padding:clamp(7px,2vw,16px);display:grid;grid-row:span 3;grid-template-rows:subgrid;text-align:center;row-gap:6px;overflow-wrap:anywhere}
.score-side>strong{min-block-size:2.7em;align-content:center}
.score-side output{font-size:clamp(44px,10vw,82px);line-height:1;font-weight:800;font-variant-numeric:tabular-nums}
.score-controls{display:grid;grid-template-columns:44px minmax(0,1fr);gap:6px;align-items:center}
.score-controls button{touch-action:manipulation;padding:0}
.score-minus{min-height:44px;font-size:26px}
.score-plus{min-height:62px;font-size:38px}
.score-summary{margin:10px 0}
.manual-score{margin-top:12px}
.live-score{color:#685007;white-space:nowrap;font-variant-numeric:tabular-nums}
.live-score strong{font-size:1.25rem;margin-left:4px}
.scoreboard-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.scoreboard-heading h3{margin:0}
.correction-dialog{color:var(--ink);border:1px solid var(--stroke);border-radius:var(--radius);width:min(530px,calc(100% - 24px));padding:20px;max-height:calc(100% - 24px)}
.correction-dialog::backdrop{background:#20201980}
.correction-error:empty{display:none}
.tournament-logo,.logo-preview{width:auto;max-width:112px;height:46px;object-fit:contain}
#config-general input[type="color"]{height:38px;padding:0;overflow:hidden;cursor:pointer}
#config-general input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
#config-general input[type="color"]::-webkit-color-swatch{border:0;border-radius:7px}
#config-general input[type="color"]::-moz-color-swatch{border:0;border-radius:7px}
.primary,.primary:hover,nav button.active,.logo{color:var(--accent-ink,#000)}
.hero{border-color:color-mix(in srgb,var(--pale) 82%,#24231c)}
.hero:after{border-color:color-mix(in srgb,var(--pale) 87%,#24231c);box-shadow:0 0 0 18px var(--pale),inset 0 0 0 17px var(--pale)}
.hero h1,.hero p,.hero .eyebrow{color:var(--hero-ink,#202019)}
.tournament-brand{display:flex;align-items:center;justify-content:flex-start;min-width:0}
.tournament-brand .tournament-logo,.public .top .tournament-logo{display:block;width:auto;max-width:min(180px,40vw);height:auto;max-height:64px;object-fit:contain;object-position:left center}
@media(max-width:680px){.tournament-brand .tournament-logo,.public .top .tournament-logo{max-height:44px}}
.tournament-brand{gap:10px}
.tournament-brand:has(.tournament-caption) .tournament-logo{max-width:min(80px,25vw)}
.tournament-caption{line-height:1.2;overflow-wrap:anywhere;min-width:0}
.court-score{margin-top:6px}
.court-score small{color:var(--soft)}
.match-clock{font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}
.match-timing{margin-top:5px;font-size:12px}
.match-timing summary{cursor:pointer}
.match-timing div{margin-top:4px;white-space:nowrap}
.score-duration{display:block;margin-top:3px;color:var(--soft)}
.score-duration .match-clock{font-weight:500}
.live-view .live-matches td:nth-child(5){text-align:center}
.schedule-score-edit{margin-top:5px}
.set-score{font-variant-numeric:tabular-nums;margin-bottom:3px}
.set-score strong{font-size:1.25rem}
.set-score small{color:var(--soft)}
.live-score + .set-score{margin-top:4px;white-space:nowrap}
.live-score + .set-score strong{font-size:inherit}

.head-referee-settings{margin-top:18px}
.head-referee-settings:empty{display:none}

/* Public standings keep the same numeric columns aligned from row to row. */
.live-view .print-group{min-width:0;margin-top:16px}
.live-view .print-group .heading{margin-bottom:6px}
.live-view .print-group h3{margin:0}
.live-view .live-standings{font-variant-numeric:tabular-nums}
.live-view .live-standings :is(td,th):not(:nth-child(2)){text-align:center}
.live-view .live-standings tbody tr:nth-child(even){background:#f8f7f3}
.live-view .live-standings td:first-child{font-weight:750}
.live-view .live-standings td:nth-child(2){overflow-wrap:anywhere}

@media screen and (max-width:760px){
  .live-view .content,.live-view .content>.card{min-width:0}
  .live-view h1,.live-view .tournament-caption{overflow-wrap:anywhere}
  .live-view .top .tag{flex-shrink:0}
  .live-view .scroll{overflow:visible}
  .live-view .live-matches,.live-view .live-matches tbody{display:block;width:100%}
  .live-view .live-matches thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .live-view .live-matches tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,40%);
    gap:7px 10px;
    padding:11px;
    margin-bottom:8px;
    border:1px solid var(--stroke);
    border-radius:9px;
    background:#faf9f5;
  }
  .live-view .live-matches td{display:block;padding:0;border:0;min-width:0;overflow-wrap:anywhere}
  .live-view .live-matches td:nth-child(1){grid-area:1/1;font-weight:750}
  .live-view .live-matches td:nth-child(2){grid-area:3/1;color:var(--soft);font-size:12px}
  .live-view .live-matches td:nth-child(3){grid-area:2/1;font-weight:700;line-height:1.35}
  .live-view .live-matches td:nth-child(4){grid-area:1/1;margin-left:3.5em;color:var(--soft);font-size:12px}
  .live-view .live-matches td:nth-child(4)::before{content:'Boisko '}
  .live-view .live-matches td:nth-child(5){grid-area:1/2;justify-self:end}
  .live-view .live-matches td:nth-child(6){grid-area:2/2/span 2;text-align:right;font-weight:700}
  .live-view .live-matches .live-score{white-space:normal}
  .live-view .live-matches .set-score{white-space:normal}
  .live-view .live-standings th,.live-view .live-standings td{padding:9px 4px}
  .live-view .live-standings :is(th,td):nth-child(2){width:100%;line-height:1.3}
  .live-view .live-standings :is(th,td):is(:nth-child(4),:nth-child(6),:nth-child(8)){display:none}
}

.live-filter summary{list-style:none;cursor:pointer}
.live-filter summary::-webkit-details-marker{display:none}
.live-filter summary h2{display:flex;align-items:center;gap:8px;margin:0;min-height:40px}
.follow-count{font-size:.75rem;padding:2px 7px;border-radius:99px;background:#fff0ab;color:#241d00;letter-spacing:normal}
.follow-chevron{width:9px;height:9px;margin:0 6px 4px auto;border-right:2px solid var(--soft);border-bottom:2px solid var(--soft);transform:rotate(45deg)}
#team-picker[open] .follow-chevron{transform:rotate(225deg);margin-bottom:0}
.follow-description{margin:0 0 10px;color:var(--soft);line-height:1.4}
.follow-picker{margin-top:8px}
#team-search{font-size:16px;margin-top:5px}
.live-filter fieldset{display:grid;gap:5px;margin:12px 0 4px;border:1px solid var(--stroke);border-radius:9px;padding:8px;max-height:17rem;overflow:auto;min-width:0}
.live-filter legend{color:var(--soft);font-size:.85rem}
.follow-option{display:flex;align-items:center;gap:10px;min-height:44px;padding:5px 9px;border:1px solid var(--stroke);border-radius:7px;cursor:pointer;overflow-wrap:anywhere}
.follow-option:has(input:checked){background:#fff4c4;border-color:#e6ce68;color:#241d00;font-weight:650}
.follow-option input{width:18px;height:18px;flex:none;accent-color:#795d00}
.follow-selection,.follow-chips{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.follow-selection{margin-top:5px}
.follow-chips:empty{display:none}
#follow-summary{min-width:0;overflow-wrap:anywhere;color:var(--soft);margin:0}
.follow-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:36px;border-radius:99px;background:#fff4c4;color:#241d00}
.follow-chip span:first-child{overflow-wrap:anywhere}
.follow-chip span:last-child{font-size:1.1rem}
.live-filter [hidden]{display:none}
.followed-team{background:#fff0ab;color:#241d00;border-radius:4px;padding:2px 4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}

.mobile-start-time{display:none}
@media screen and (max-width:760px){
  .live-view .desktop-start-time{display:none}
  .live-view .mobile-start-time{display:inline-block;margin-left:6px;font-size:inherit;font-weight:700;white-space:nowrap}
  .live-view .mobile-start-time:empty{display:none}
}

.live-sponsors{display:grid;gap:9px;text-align:center;padding:12px 15px}
.sponsor-label{color:var(--soft);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.sponsor-logos{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px 18px}
.sponsor-logos img{width:clamp(62px,16vw,126px);height:clamp(36px,8vw,58px);object-fit:contain}
.sponsor-banner img{display:block;width:100%;max-height:116px;object-fit:contain}
#sponsor-preview{display:flex;flex-wrap:wrap;gap:8px}
.sponsor-preview-item{display:grid;justify-items:center;gap:6px;padding:8px;border:1px solid var(--stroke);border-radius:8px;min-width:0}
.sponsor-preview-item img{max-width:175px;width:100%;height:54px;object-fit:contain}
.sponsor-preview-item button{white-space:normal;overflow-wrap:anywhere;max-width:190px}

.tv-screen{min-height:100vh;background:#131612;color:#f8f8f4;padding:clamp(12px,1.5vw,28px);font-size:clamp(14px,1.12vw,22px)}
.tv-screen:fullscreen{overflow:auto}
.tv-header,.tv-identity,.tv-court-top{display:flex;align-items:center;gap:12px}
.tv-header,.tv-court-top{justify-content:space-between}
.tv-header{min-width:0}
.tv-identity{min-width:0}
.tv-qr{flex:none}
.tv-identity img{width:clamp(42px,5vw,88px);height:clamp(42px,5vw,88px);object-fit:contain}
.tv-identity p{color:#ffdf55;margin:0 0 2px;font-weight:750}
.tv-identity h1{font-size:clamp(24px,2.6vw,50px);line-height:1.08;margin:0;overflow-wrap:anywhere}
.tv-screen{display:grid;gap:clamp(8px,1.2vh,16px);grid-template-rows:auto auto minmax(0,1fr)}
.tv-lists{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(8px,1vw,16px);min-height:0}
.tv-lists section{display:flex;flex-direction:column;min-height:0}
.tv-lists section h2{flex:none}
.tv-sponsors .live-sponsors{gap:4px;padding:5px 10px}
.tv-sponsors .sponsor-banner img{max-height:clamp(32px,8vh,90px)}
.tv-sponsors .sponsor-logos img{height:clamp(24px,5vh,58px)}
.tv-sponsors[hidden]{display:none}
.tv-screen h2{font-size:1.13em;margin:0 0 8px}
.tv-screen h2 small{font-size:.66em;color:#c6c9bf;margin-left:.5em;white-space:nowrap}
.tv-courts{display:grid;grid-auto-rows:1fr;align-items:stretch;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,1vw,16px)}
.tv-court,.tv-lists section{background:#232821;border:1px solid #454d41;border-radius:12px;padding:clamp(9px,1vw,18px);min-width:0}
.tv-court h3{font-size:.92em;color:#d7dccf;margin:0}
.tv-match-meta{font-size:.72em;color:#d7dccf;line-height:1.2;margin-top:3px;overflow-wrap:anywhere}
.tv-match-body{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:clamp(7px,1vw,18px);margin-top:5px}
.tv-match-body.has-score{grid-template-columns:minmax(0,1fr) minmax(0,42%)}
.tv-court-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 8px;min-width:0}
.tv-set-label{font-size:.72em;font-weight:800;color:#ffdf55}
.tv-match-info{--tv-team-size:clamp(20px,4.5vh,62px);--tv-team-line:clamp(22px,4.95vh,68.2px);--tv-history-size:clamp(13px,2.5vh,36px);min-width:0;display:grid;grid-template-rows:auto 1fr;gap:7px}
.tv-teams{display:grid;grid-template-columns:minmax(0,1fr);gap:.13em;margin:0;font-size:var(--tv-team-size);font-weight:800;line-height:var(--tv-team-line);white-space:nowrap}
.tv-teams span{min-width:0}
.tv-history{align-self:end;min-height:clamp(16px,3vh,43.2px);font-size:var(--tv-history-size);line-height:clamp(16px,3vh,43.2px);color:#e6e8df;white-space:nowrap}
.tv-history .set-score{margin:0}
.tv-history .set-score strong{font-size:inherit}
.tv-history .set-score small{font-size:.88em;color:#b9beb2}
.tv-score{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:0;line-height:1;font-size:clamp(30px,9vh,128px);font-weight:900;font-variant-numeric:tabular-nums;color:#ffdf55;white-space:nowrap}
.tv-score strong{font-size:inherit}
.tv-court-status{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px 7px}
.tv-clock{font-size:.8em;color:#d7dccf}
.tv-empty{color:#c6c9bf}
.tv-qr a{display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:center;text-decoration:none;color:inherit}
.tv-qr svg{width:clamp(78px,13vh,155px);height:auto;grid-row:span 2;border-radius:5px}
.tv-qr strong{align-self:end;line-height:1.18}
.tv-qr a span{align-self:start;font-size:.74em;color:#d7dccf}
.tv-lists ul{list-style:none;padding:0;margin:0}
.tv-lists li{padding:5px 0;border-top:1px solid #454d41;overflow-wrap:anywhere;font-size:.8em;line-height:1.18}
.tv-lists li+li{border-top-color:#697366}
.tv-lists li small{display:block;margin-top:2px;color:#d7dccf}
.tv-result-teams{font-weight:650}
.tv-result-line{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;column-gap:8px}
.tv-result{margin-top:3px;color:#ffdf55;font-weight:750;font-variant-numeric:tabular-nums}
.tv-result .set-score{margin:0;white-space:nowrap}
.tv-result .set-score strong{font-size:inherit}
.tv-result .set-score small{display:inline;color:#e6e8df}
@media(max-width:650px){
  .tv-lists{grid-template-columns:minmax(0,1fr)}
  .tv-courts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tv-qr a{display:block;text-align:center}
  .tv-qr strong,.tv-qr a span{display:none}
  .tv-header{align-items:flex-start}
  .tv-identity h1{font-size:20px}
}
@media(min-width:900px) and (max-height:800px){
  .tv-screen{font-size:clamp(13px,2.3vh,18px);padding:12px}
  .tv-identity img{width:44px;height:44px}
  .tv-identity h1{font-size:clamp(20px,4vh,32px)}
  .tv-court,.tv-lists section{padding:8px 10px}
  .tv-score{font-size:clamp(32px,8.5vh,94px)}
  .tv-qr svg{width:100px}
  .tv-lists li{padding:3px 0}
}
@media (min-width:651px) and (min-height:470px){
  .tv-screen{height:100vh;height:100dvh;min-height:0;overflow:hidden}
  .tv-screen:fullscreen{overflow:hidden}
  .tv-live{min-height:0}
  .tv-court{display:flex;flex-direction:column;justify-content:center}
  .tv-list-viewport{flex:1;min-height:0;max-height:none}
}
@media (min-width:651px) and (max-height:780px){
  .tv-court{padding:6px 9px}
  .tv-match-info{--tv-team-size:clamp(17px,4.1vh,42px);--tv-team-line:clamp(18.7px,4.51vh,46.2px)}
  .tv-teams{margin:4px 0 2px}
  .tv-score{font-size:clamp(30px,8vh,85px)}
}

.tv-list-viewport{overflow:auto;overflow-anchor:none;scrollbar-width:none}
.tv-list-viewport::-webkit-scrollbar{display:none}

.tv-schedule li:not(.tv-empty){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.tv-start-time{white-space:nowrap;color:#ffdf55;font-size:1.13em;font-variant-numeric:tabular-nums}

@media (max-width:650px),(max-height:469px){.tv-list-viewport{max-height:clamp(110px,30vh,280px)}}
@media (min-width:651px) and (max-height:600px){
  .tv-courts[data-count="4"] .tv-court,.tv-courts[data-count="5"] .tv-court,.tv-courts[data-count="6"] .tv-court{font-size:12px;gap:0}
  .tv-court-top{gap:4px}
  .tv-court-top .tag{font-size:9px;padding:2px 5px}
  .tv-clock{line-height:1.1}
  .tv-score{font-size:clamp(26px,7vh,50px)}
}

@media(max-width:650px){.tv-score{font-size:clamp(28px,10vw,64px)}}

.tv-screen .tv-live[hidden],.tv-screen .tv-lists[hidden]{display:none}
.tv-screen[data-view="courts"],.tv-screen[data-view="lists"]{grid-template-rows:auto minmax(0,1fr)}
.tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-match-info{
  --tv-team-size:clamp(16px,3vh,46px);
  --tv-team-line:clamp(18px,3.3vh,51px);
  --tv-history-size:clamp(12px,1.9vh,27px);
  gap:3px;
}
.tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-history{
  min-height:clamp(14px,2.2vh,31px);
  line-height:clamp(14px,2.2vh,31px);
}
.tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-score{font-size:clamp(27px,7vh,105px)}
@media (min-width:651px) and (min-height:470px){
  .tv-screen[data-view="courts"] .tv-live{align-self:start}
}
@media (min-width:651px) and (max-height:650px){
  .tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-court{padding:4px 7px}
  .tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-match-info{
    --tv-team-size:clamp(12px,2.6vh,18px);
    --tv-team-line:clamp(13px,2.9vh,20px);
    --tv-history-size:11px;
    gap:0;
  }
  .tv-courts:is([data-count="7"],[data-count="8"],[data-count="9"]) .tv-teams{margin:0}
}

.placement-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:16px;align-items:start}
.placement-zone{border:1px dashed var(--stroke);border-radius:10px;background:var(--ground);padding:12px;min-width:0}
.placement-zone h3,.placement-zone p{margin:0}
.placement-tiles{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.placement-tile{min-width:42px;min-height:42px;cursor:grab}
.placement-tile[aria-pressed="true"]{background:var(--gold);color:var(--accent-ink);border-color:var(--gold)}
.placement-carry{display:flex;align-items:center;gap:8px;font-size:.875rem}
.placement-carry input{width:auto;flex:none}
@media(max-width:760px){.placement-grid{grid-template-columns:minmax(0,1fr)}}

.cup-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cup-slot{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:54px;padding:5px;border:1px dashed var(--stroke);border-radius:8px;overflow-wrap:anywhere}
.cup-slot .placement-tile{max-width:100%;white-space:normal;overflow-wrap:anywhere}

[data-form="config-later-stage"] .field[hidden]{display:none}

.game-summary-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));gap:12px;margin:0}
.game-summary-fields dt{color:var(--soft);font-size:.8rem}
.game-summary-fields dd{margin:3px 0 0;font-weight:650;overflow-wrap:anywhere}

.registration-content{max-width:760px;width:100%;margin-inline:auto}
.registration-content .hero{margin-bottom:0}
.registration-editor{width:min(820px,calc(100% - 24px))}
.registration-editor .registration-view{margin-top:12px;border:1px solid var(--stroke);border-radius:var(--radius);overflow:hidden}
.registration-editor .registration-view .top{position:static}
.registration-answers{margin-top:6px}
.registration-answers dl{margin:8px 0;overflow-wrap:anywhere}
.registration-answers dt{font-weight:650}
.registration-answers dd{margin:0 0 5px}

.team-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(155px,100%),1fr));gap:8px;list-style:none;margin:0;padding:0}
.team-tile{min-width:0;background:var(--paper);border:1px solid var(--stroke);border-radius:9px;padding:6px}
.team-tile-name{display:block;width:100%;text-align:left;overflow-wrap:anywhere;white-space:normal;padding:8px}
button.team-tile-name{cursor:grab}
.team-tile-name small{display:block;color:var(--soft);margin-top:3px}
.team-tile-name[aria-pressed="true"]{border-color:var(--gold);background:var(--gold);color:var(--accent-ink)}
.team-tile-name[aria-pressed="true"] small{color:inherit}
.team-group-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(235px,100%),1fr));gap:12px}

.group-match-list{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.group-match-tile{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;overflow-wrap:anywhere}
.group-match-tile[draggable="true"]{cursor:grab}
.group-match-tile small{display:block;color:var(--soft)}
.group-match-tile .actions{flex-shrink:0}
.group-match-tile .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.court-assignments{container-type:inline-size}
.court-assignments .court>div:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
.court-assignments .court>.actions{flex:none;flex-wrap:nowrap;justify-content:flex-end}
@container (max-width:400px){
  .court-assignments .court{flex-wrap:wrap}
  .court-assignments .court>div:first-child{flex-basis:100%}
  .court-assignments .court>.actions{flex-wrap:wrap;width:100%;justify-content:flex-start}
}

.result-approved-label{display:block;margin-top:4px;color:var(--green);font-weight:650}

.court-praise{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100%;max-height:none;border:0;background:var(--pale);color:var(--hero-ink);padding:clamp(20px,6vw,70px)}
.court-praise[open]{display:grid;place-items:safe center}
.court-praise-body{text-align:center;width:min(100%,760px)}
.court-praise-icon{font-size:clamp(48px,12vw,96px)}
.court-praise h2{font-size:clamp(30px,8vw,76px);line-height:1.04;margin:16px 0;overflow-wrap:anywhere}
.court-praise p{font-size:clamp(17px,4vw,25px);margin:0 0 24px}
.court-praise button{min-height:46px}

@media print{
  .protocol{height:64mm;margin-bottom:4mm;border:.6pt solid #617895;border-radius:2mm;overflow:hidden;break-inside:avoid;color:#142841;display:flex;flex-direction:column;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .protocol:nth-of-type(4n):not(:last-child){break-after:page}
  .protocol-header{display:flex;justify-content:space-between;align-items:center;gap:3mm;min-height:9mm;padding:1.5mm 4mm;background:#142841;color:#fff;text-transform:uppercase;font-size:9.5pt;line-height:1.12;overflow-wrap:anywhere}
  .protocol-title{min-width:0}
  .protocol-meta{text-align:right;max-width:45%}
  .protocol-court{font-size:8pt;margin:2mm 4mm}
  .protocol-teams{display:grid;grid-template-columns:1fr 1fr;margin:0 4mm;flex:1;min-height:0}
  .protocol-team{min-width:0;padding-right:3mm;display:grid;grid-template-rows:auto minmax(0,1fr) auto;grid-row:span 3;grid-template-rows:subgrid}
  .protocol-team+.protocol-team{border-left:.5pt solid #a6b4c6;padding-left:4mm;padding-right:0}
  .protocol-side{font-size:8.5pt}
  .protocol-name{font-size:10pt;overflow-wrap:anywhere}
  .protocol-sets{display:grid;gap:1mm}
  .protocol-set{display:grid;grid-template-columns:18mm 17mm;align-items:center;font-size:8pt}
  .protocol-box{height:6mm;border:.6pt solid #617895;border-radius:1mm;display:grid;place-items:center;font-size:10pt}
  .protocol:is([data-set-count="4"],[data-set-count="5"],[data-set-count="6"],[data-set-count="7"],[data-set-count="8"],[data-set-count="9"]) .protocol-sets{grid-template-columns:repeat(2,minmax(0,1fr));gap:1mm 2mm}
  .protocol:is([data-set-count="4"],[data-set-count="5"],[data-set-count="6"],[data-set-count="7"],[data-set-count="8"],[data-set-count="9"]) .protocol-set{grid-template-columns:13mm 12mm}
  .protocol-footer{text-align:right;margin:2mm 4mm 2.5mm;font-size:7pt}
}

.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));gap:13px}
.report-stat{display:grid;gap:7px;align-content:start}
.report-stat h2{margin:0;font-size:15px}
.report-stat strong{font-size:clamp(21px,2.3vw,30px);font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.report-stat small{color:var(--soft)}
.report-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:14px}
.report-records li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px 10px}
.report-records small{grid-column:1/-1;margin:0}
.report-totals{margin:0}
.report-totals div{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--stroke);padding:10px 0}
.report-totals dd{margin:0;font-weight:700;white-space:nowrap}
.report-period{margin:0 0 12px}
.report-note{font-size:.88rem;margin:12px 0 0}
.report-usage{display:flex;align-items:center;gap:9px;white-space:nowrap}
.report-usage meter{width:72px;flex:none;accent-color:var(--green)}
.report-court-table td{white-space:nowrap}
@media(min-width:681px){.layout>aside{overflow-y:auto}}

.report-forecast-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));column-gap:20px;margin-bottom:12px}
.report-forecast-table td:nth-last-child(-n+3){white-space:nowrap;font-variant-numeric:tabular-nums}

.release-overview{display:flex;flex-wrap:wrap;gap:10px 26px;margin-bottom:20px;color:var(--soft)}
.release-overview span{display:grid;gap:4px}
.release-overview b{font-size:23px;color:var(--ink);font-variant-numeric:tabular-nums}
.release-list{list-style:none;padding:0;margin:0}
.release-item{display:grid;grid-template-columns:minmax(125px,.32fr) minmax(0,1fr) auto;align-items:center;gap:8px 16px;padding:11px 0;border-top:1px solid var(--stroke)}
.release-list[data-filter="major"] .release-item[data-major="false"]{display:none}
.release-meta,.release-note{display:flex;align-items:center;gap:5px 10px;flex-wrap:wrap}
.release-meta time,.release-help{color:var(--soft)}
.release-meta time{font-size:.86rem}
.release-help:last-child{margin-bottom:0}
@media(max-width:680px){
  .release-item{grid-template-columns:minmax(0,1fr) auto}
  .release-note{grid-column:1/-1;grid-row:2}
  .release-item button{grid-column:2;grid-row:1}
}

.finish-time{display:block;font-size:clamp(24px,3vw,36px);font-weight:750;line-height:1.15;font-variant-numeric:tabular-nums}
.finish-time small{font-size:.48em;font-weight:600;color:var(--soft)}
#tournament-finish p{margin:8px 0 0}

.group-court-controls{margin-bottom:12px}
#group-court-fields .formgrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr))}

.simulation-result{background:var(--ground);border-radius:9px;padding:11px 13px}
.simulation-settings{margin-top:14px}
.simulation-settings summary{cursor:pointer;font-weight:650}
.simulation-settings .formgrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr))}

.catalog-settings{margin:16px 0;padding:12px 0;border-block:1px solid var(--stroke)}
.catalog-settings summary{cursor:pointer;font-weight:650}
.catalog-settings form{margin-top:12px}
.catalog-settings .formgrid,.club-public .formgrid{margin-bottom:0}
.catalog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,275px),1fr));gap:14px}
.catalog-event{align-content:start}
.catalog-event h2,.catalog-event p{margin:0}

.catalog-section-title,.catalog-event h3,.live-tournament-title{margin:0}
.catalog-event{position:relative}
.catalog-event-link{text-decoration:none}
.catalog-event-link:hover{text-decoration:underline}
.catalog-event-link::after{content:"";position:absolute;inset:0;border-radius:var(--radius)}
.catalog-event:focus-within{outline:2px solid var(--ink);outline-offset:2px}
.catalog-event .actions a{position:relative;z-index:1}
.catalog-view-label{font-weight:700}
.live-tournament-title{font-size:clamp(1.2rem,3vw,1.8rem);overflow-wrap:anywhere}
