:root{color-scheme:light;--ink:#17372f;--muted:#667871;--green:#176c51;--lime:#d4f47c;--line:#dce6df;--paper:#fff;--bg:#f2f6f2}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5}.container{width:min(1120px,calc(100% - 40px));margin:auto}.hero{background:#102b26;color:white;padding:44px 0 55px;border-bottom:5px solid var(--lime)}.header-content,.section-heading,.competition-heading,.round-banner,.players-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.hero h1{font-size:clamp(25px,4vw,42px);letter-spacing:-1.5px;margin:8px 0}.hero h1 span{font-size:.8em}.hero p:last-child{color:#bbd1c6;margin-bottom:0}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;margin:0;color:var(--green)}.hero .eyebrow{color:var(--lime)}.edition{font-size:11px;letter-spacing:1px;border:1px solid #577067;border-radius:30px;padding:10px 16px;white-space:nowrap}main{padding-top:30px}h2{font-size:25px;letter-spacing:-.6px;margin:3px 0 10px}h3{font-size:17px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:28px;margin-bottom:24px;box-shadow:0 5px 20px #102b2605}.badge{background:#edf4e6;color:#3b6224;font-size:12px;font-weight:650;border-radius:20px;padding:7px 12px;white-space:nowrap}.form-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:18px;margin-top:20px}label{display:block;font-size:13px;font-weight:650}input,select{display:block;width:100%;font:inherit;font-weight:400;color:var(--ink);background:#fbfdfb;border:1px solid #cbd9d0;border-radius:10px;padding:12px;margin-top:7px;min-height:46px}input:focus,select:focus{outline:2px solid var(--green);outline-offset:2px}.players-heading{margin-top:22px}.players-heading span,.muted,.legend,.scope-note{color:var(--muted);font-size:13px}.player-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.button{border:0;border-radius:10px;font:inherit;font-size:14px;font-weight:700;padding:13px 20px;cursor:pointer;min-height:46px}.primary{background:var(--green);color:white}.primary:hover{background:#10513c}.secondary{background:white;color:var(--ink);border:1px solid #cbd9d0}.button:disabled{cursor:default;opacity:.65}button:focus-visible{outline:3px solid #759b25;outline-offset:3px}.competition-heading{margin-bottom:20px}.competition-heading h2{overflow-wrap:anywhere}.competition-heading p{margin:0}.round-banner{background:var(--ink);color:white;padding:20px 26px;border-radius:16px;margin-bottom:24px}.round-banner strong{font-size:22px}.round-banner p{font-size:13px;color:#c8dbd0;margin:4px 0}.timer{text-align:right}.timer span{font-size:28px;font-weight:750;font-variant-numeric:tabular-nums}.timer small{display:block;color:#c8dbd0;font-size:11px}.courts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-bottom:24px}.court{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden}.court.king{border:2px solid #a4c74b}.court-header{background:#edf3ed;padding:15px 20px;display:flex;justify-content:space-between;align-items:center;gap:10px}.king .court-header{background:var(--lime)}.court-header h3{font-size:12px;letter-spacing:.5px;margin:0}.court-state{font-size:11px;white-space:nowrap}.court-body{padding:22px}.match{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);gap:8px;align-items:center;text-align:center}.pair{font-weight:700;min-height:52px;overflow-wrap:anywhere}.versus{font-size:11px;font-weight:800;color:var(--muted)}.score{font-size:48px;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums}.score-controls{display:flex;justify-content:center;gap:10px;margin:10px 0 18px}.score-controls button{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:#f2f6f2;color:var(--ink);font-size:24px;cursor:pointer}.score-controls button:disabled{opacity:.35;cursor:default}.save-result{width:100%;margin-top:4px}.winner{font-size:13px;color:var(--green);font-weight:700;margin:14px 0 0;text-align:center;overflow-wrap:anywhere}.error{color:#ae2f2f;background:#fff1f0;padding:10px 12px;border-radius:8px;font-size:13px}.notice{background:#fff1d9;border:1px solid #e3ca90;border-radius:10px;padding:12px;font-size:14px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th{color:var(--muted);font-size:11px;letter-spacing:.4px;text-transform:uppercase;background:#f5f8f4}th,td{padding:13px 12px;border-bottom:1px solid var(--line);white-space:nowrap}td:nth-child(2){font-weight:650}tbody tr:first-child td{background:#f7faef}.legend{font-size:11px;margin-bottom:0}.scope-note{text-align:center;margin:25px auto;max-width:720px}footer{padding:12px 0 30px;text-align:center;font-size:11px;letter-spacing:1px;color:var(--muted)}[hidden]{display:none!important}@media(max-width:760px){.form-grid{grid-template-columns:1fr}.player-fields{grid-template-columns:repeat(2,1fr)}.courts{grid-template-columns:1fr}.edition{display:none}.panel{padding:20px}.section-heading{align-items:flex-start;flex-wrap:wrap}.competition-heading{align-items:flex-start}.competition-heading .button{flex-shrink:0;padding:10px 13px}.hero{padding:30px 0}.container{width:calc(100% - 28px)}.round-banner{padding:18px}.timer span{font-size:24px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s ease}}

.action-buttons{display:flex;gap:10px;flex-wrap:wrap}.round-actions{margin-bottom:24px}.round-actions p{margin:8px 0}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.timer small{margin:4px 0}#summary-details{white-space:pre-line}@media(max-width:760px){.form-grid{grid-template-columns:1fr}.competition-heading{flex-wrap:wrap}.round-banner{flex-wrap:wrap}.timer{text-align:left}}

/* Touch controls and contained tables preserve the desktop layout. */
button{touch-action:manipulation}
.container,.panel,.court,.table-scroll,.competition-heading>div{min-width:0}
.table-scroll{max-width:100%;overscroll-behavior-x:contain}
#pwa-status{letter-spacing:0;overflow-wrap:anywhere}
@media(max-width:760px){
  input,select{font-size:16px}
  .button{min-height:48px}
  .action-buttons{width:100%}
  .action-buttons .button{flex:1;min-height:48px}
  .round-actions .button{width:100%}
  .round-banner{position:sticky;top:0;z-index:5;gap:6px;padding:12px 16px;box-shadow:0 3px 12px #102b2626}
  .round-banner>div{min-width:0}
  .round-banner strong{font-size:23px}
  .round-banner p{margin:2px 0}
  .timer{width:100%}
  .timer span{font-size:clamp(22px,6.5vw,28px)}
  .timer small{font-size:13px;margin:2px 0}
  .court-header{flex-wrap:wrap;padding:14px 16px}
  .court-body{padding:18px 12px}
  .score{font-size:clamp(48px,15vw,64px);overflow-wrap:anywhere}
  .score-controls{gap:8px}
  .score-controls button{width:48px;height:48px;flex-shrink:0;font-size:28px}
  .match{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);gap:4px}
  .panel{padding:18px}
  th,td{padding:11px 9px}
  td:nth-child(2){white-space:normal;min-width:100px;max-width:180px;overflow-wrap:anywhere}
  #history-wrapper td:nth-child(3),#history-wrapper td:nth-child(4){white-space:normal;min-width:140px;max-width:200px;overflow-wrap:anywhere}
  .hero h1{overflow-wrap:anywhere}
}
@media(max-width:359px){.player-fields{grid-template-columns:1fr}.score-controls{gap:4px}.container{width:calc(100% - 20px)}}

.report-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.report-actions a{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:760px){.report-actions>*{flex:1 1 100%;text-align:center}}
