
:root{
  --bg:#06111b;
  --panel:#0a1b2a;
  --panel2:#0d2234;
  --line:#24445d;
  --text:#f4f7fb;
  --muted:#8fa7ba;
  --blue:#1688ff;
  --green:#3f942e;
  --red:#d93025;
  --gold:#f4b41a;
  --sidebar:250px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
button,input,select{font:inherit}
button{touch-action:manipulation}
.app-shell{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}
.sidebar{
  border-right:1px solid var(--line);
  background:linear-gradient(180deg,#071625 0%,#06111b 100%);
  padding:12px 12px 16px;
  position:sticky;top:0;height:100vh;overflow:auto
}
.logo-wrap{display:flex;justify-content:center;align-items:center;padding:3px 0 10px;border-bottom:1px solid var(--line)}
.logo-wrap img{width:100%;max-height:245px;object-fit:contain;border-radius:14px}
.sidebar h3{font-size:14px;margin:17px 4px 9px;color:#d9e7f3;letter-spacing:.04em}
.player-list{display:grid;gap:8px}
.player-side{
  width:100%;display:flex;align-items:center;gap:10px;background:#0a1c2c;border:1px solid #24445d;
  color:white;border-radius:9px;padding:11px 12px;text-align:left;cursor:pointer
}
.player-side .num{width:28px;height:28px;border:1px solid var(--blue);border-radius:7px;display:grid;place-items:center;color:#58b0ff;font-weight:700}
.player-side .arrow{margin-left:auto;color:#9ab2c6}
.side-note{margin-top:18px;padding:15px 10px;border-top:1px solid var(--line);text-align:center;color:#d4dfeb;line-height:1.65;font-size:13px}
.main{padding:10px 12px 18px;min-width:0}
.top-tabs{display:flex;gap:5px;align-items:stretch;overflow-x:auto;padding-bottom:6px}
.round-tab,.summary-tab{
  flex:0 0 50px;background:#081521;color:#fff;border:1px solid #29465d;border-radius:8px;
  padding:11px 7px;font-weight:700;cursor:pointer
}
.round-tab.active,.summary-tab.active{background:#0b5ec8;border-color:#1688ff}
.summary-tab{flex-basis:112px;margin-left:6px}
.round-header{
  display:grid;grid-template-columns:auto minmax(240px,1fr) auto auto;gap:16px;align-items:center;
  background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:13px 16px;margin-bottom:8px
}
.round-title{font-size:22px;font-weight:800;color:#25a2ff;white-space:nowrap}
.opponent-box{display:flex;align-items:center;gap:8px}
.opponent-box label{color:#d1dfeb;font-size:12px;white-space:nowrap}
.opponent-box input{
  width:100%;background:#f5f5f5;border:0;border-radius:6px;padding:10px 12px;color:#111;font-weight:700;font-size:18px
}
.date-box{color:#dce8f1;font-size:13px;white-space:nowrap}
.status-pill{background:#3b7f25;color:#fff;border-radius:6px;padding:9px 15px;font-weight:800;white-space:nowrap}
.section{
  background:var(--panel);border:1px solid var(--line);border-radius:10px;margin-bottom:8px;overflow:hidden
}
.section-title{padding:11px 14px 4px;color:#27a6ff;font-size:20px;font-weight:800}
.section-title small{font-size:13px;font-weight:500;margin-left:7px;color:#54b7ff}
.match-table{width:100%;border-collapse:collapse;table-layout:fixed}
.match-table th{font-size:11px;font-weight:700;color:#c8d7e4;padding:6px 6px;text-align:center}
.match-table td{padding:4px 6px;text-align:center}
.match-table tr + tr td{border-top:1px solid rgba(45,72,94,.28)}
.slot{width:44px}
.ours1{width:210px}.ours2{width:210px}
.vs{width:40px}.opp1{width:220px}.opp2{width:220px}
.leg{width:85px}.point{width:70px}
.match-id{display:grid;place-items:center;background:#081927;border:1px solid #087dcc;border-radius:6px;height:42px;color:#33aaff;font-weight:800}
.our-select,.opp-input{
  width:100%;height:42px;border-radius:6px;padding:0 11px;border:1px solid #cfd7dd;background:#f4f4f4;color:#111
}
.our-select{font-weight:600}
.opp-input{font-style:italic}
.vs-cell{font-weight:800;color:#e8f0f6}
.leg-btn{
  width:100%;height:42px;border-radius:6px;border:1px solid #31506a;background:#152534;color:#cbd8e2;
  font-size:18px;font-weight:900;cursor:pointer
}
.leg-btn.w{background:var(--green);border-color:#4ba33a;color:#fff}
.leg-btn.l{background:var(--red);border-color:#e64337;color:#fff}
.point-box{
  height:42px;border:1px solid #29465d;border-radius:6px;display:grid;place-items:center;font-size:21px;font-weight:900
}
.point-box.win{color:#61b84b}.point-box.loss{color:#ef3c30}
.section-total{
  display:flex;justify-content:flex-end;gap:12px;align-items:center;padding:6px 30px 10px;color:#20a3ff;font-weight:800
}
.section-total strong{font-size:28px;color:#57a936}
.round-footer{
  display:grid;grid-template-columns:1fr auto 1fr auto;align-items:center;gap:18px;background:var(--panel);border:1px solid var(--line);
  border-radius:10px;padding:12px 18px;margin-bottom:8px
}
.score-team{text-align:center}
.score-team .label{font-weight:900;color:#24a4ff;font-size:17px}
.score-team.opponent .label{color:#fff}
.big-score{font-size:58px;line-height:1;font-weight:900;color:#57a936}
.score-team.opponent .big-score{color:#ef382b}
.result-card{text-align:center;padding:0 25px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
.result-card .result{font-size:23px;font-weight:900;color:#57a936}
.result-card .sub{font-size:13px;color:#dce6ee;margin-top:5px}
.save-btn{
  background:#0866d9;border:1px solid #188dff;color:white;border-radius:8px;padding:18px 24px;font-weight:900;font-size:18px;cursor:pointer
}
.bye-btn{
  background:#082138;border:1px solid #1688ff;color:#57b6ff;border-radius:7px;padding:9px 12px;font-weight:800;cursor:pointer
}
.legend{
  display:flex;align-items:center;justify-content:center;gap:16px;background:var(--panel);border:1px solid var(--line);
  border-radius:10px;padding:10px 16px;color:#dbe5ed;font-size:13px
}
.key{display:inline-flex;align-items:center;gap:7px}
.key-chip{width:40px;height:35px;display:grid;place-items:center;border-radius:5px;font-weight:900}
.key-chip.w{background:var(--green)}.key-chip.l{background:var(--red)}.key-chip.n{background:#172534;border:1px solid #31506a}
.summary{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:16px}
.summary h2{margin:0 0 12px;color:#29a7ff}
.summary-table{width:100%;border-collapse:collapse}
.summary-table th,.summary-table td{padding:9px;border-bottom:1px solid #1f4058;text-align:left}
.win-text{color:#62b84e;font-weight:800}.loss-text{color:#ef4538;font-weight:800}.bye-text{color:#f4b41a;font-weight:800}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.72);display:grid;place-items:center;z-index:50;padding:18px}
.modal{width:min(560px,95vw);background:#0a1a29;border:1px solid #3b607d;border-radius:14px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.5)}
.modal h2{margin:0 0 16px}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.stat-btn{height:72px;border-radius:50%;border:0;color:white;font-weight:900;font-size:17px;cursor:pointer}
.stat-btn.s180{background:#6a2f9e}.stat-btn.s171{background:#3b8f2d}.stat-btn.spoo{background:#d37a00}.stat-btn.sbnb{background:#1268c7}
.modal-stat-values{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center;margin-top:8px;color:#cbd9e5}
.high-row{display:flex;align-items:center;justify-content:center;gap:10px;margin:20px 0}
.high-row input{width:120px;padding:12px;text-align:center;font-size:24px;border-radius:7px;border:0}
.modal-actions{display:flex;gap:10px;justify-content:flex-end}
.modal-actions button{padding:11px 18px;border-radius:7px;border:1px solid #31506a;background:#102538;color:#fff;font-weight:800;cursor:pointer}
.modal-actions .primary{background:#0866d9;border-color:#1688ff}
.toast{position:fixed;right:20px;bottom:20px;background:#173a20;border:1px solid #4b9f55;color:white;border-radius:8px;padding:12px 16px;z-index:80}
@media (max-width:1150px){
  :root{--sidebar:205px}
  .round-header{grid-template-columns:auto 1fr auto}
  .status-pill{display:none}
  .match-table{min-width:900px}.section{overflow-x:auto}
  .main{padding-right:8px}
}
@media (orientation:portrait){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto;display:none}
}


/* November 2026 tablet-friendly captain controls */
.captain-panel{background:#0c2234;border:1px solid #2876a4;border-radius:12px;padding:14px 16px;margin-bottom:10px}
.captain-heading{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.captain-heading strong{font-size:21px;color:#5db9ff}
.captain-heading span{font-size:13px;color:#d4e9f8}
.captain-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
.captain-controls label{display:grid;gap:6px;flex:1 1 180px;font-size:14px;color:#d9eafa;font-weight:700}
.captain-controls select{min-height:48px;border-radius:8px;padding:8px 10px;background:#f7fbff;color:#102034;border:1px solid #89b1cf;font-size:17px}
.captain-controls button{min-height:48px;border-radius:8px;border:1px solid #51b5ff;background:#116bd1;color:white;padding:10px 18px;font-weight:800;cursor:pointer}
.captain-controls button:disabled{opacity:.5;cursor:not-allowed}
.captain-players,.sitout-history{font-size:14px;line-height:1.6;margin-top:10px;color:#c7ddea}
.captain-players b{color:#fff}
@media(max-width:1000px){
 .app-shell{grid-template-columns:180px minmax(0,1fr)}
 .main{padding:8px}
 .sidebar{padding:8px}
 .logo-wrap img{max-height:160px}
 .round-header{grid-template-columns:1fr 1fr;gap:8px}
 .match-table{min-width:850px}
 .section{overflow-x:auto}
 .leg-btn,.our-select,.opp-input{min-height:46px}
 .round-footer{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
 .app-shell{display:block}
 .sidebar{position:static;height:auto;border-right:0}
 .logo-wrap{display:none}
 .player-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .player-side{padding:8px 5px;font-size:12px;min-height:44px}
 .player-side .arrow{display:none}
 .side-note{display:none}
 .round-header{grid-template-columns:1fr}
 .captain-panel{padding:12px}
 .captain-controls button{width:100%}
}


/* Three temporary tournament-layout concepts: 1 Command, 2 Arena, 3 Pro */
.layout-switch{display:flex;gap:4px;margin-left:auto;flex:none}
.layout-switch button{height:44px;min-width:44px;border:1px solid #5c819b;border-radius:7px;background:#10283c;color:#fff;font-size:17px;font-weight:900;cursor:pointer}
.layout-switch button.selected{background:#10a7d5;color:#061522;border-color:#7de9ff}
.top-tabs{align-items:center}
.top-tabs .round-tab{flex:1 1 0;min-width:0;padding:10px 1px;font-size:12px;height:44px}
.top-tabs .summary-tab{flex:0 0 92px;font-size:12px;height:44px;padding:4px}
.captain-mini{margin:0 0 5px}
.captain-mini button{width:100%;min-height:35px;background:#11314a;border:1px solid #2776a7;border-radius:7px;color:#e1f4ff;text-align:left;padding:5px 12px;font-size:13px;font-weight:700;cursor:pointer}
.captain-overlay{position:fixed;inset:0;background:rgba(1,8,16,.76);display:flex;justify-content:flex-end;z-index:70}
.captain-dialog{width:min(580px,95vw);height:100%;overflow:auto;background:#071725;border-left:2px solid #31b6ef;padding:20px;box-shadow:-20px 0 50px #0008}
.captain-close{display:block;margin:0 0 14px auto;padding:12px 18px;background:#174467;border:1px solid #5aa3d3;border-radius:8px;color:white;cursor:pointer}
.captain-dialog .captain-panel{border:0;padding:0;background:transparent}
.scoring-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:5px}
.scoring-grid .section{margin:0;min-width:0}
.app-shell.layout-1,.app-shell.layout-2,.app-shell.layout-3{--sidebar:0px;grid-template-columns:minmax(0,1fr);min-height:100vh}
.layout-1 .sidebar,.layout-2 .sidebar,.layout-3 .sidebar{display:none}
.layout-1 .main,.layout-2 .main,.layout-3 .main{padding:5px 9px}
.layout-1 .round-header,.layout-2 .round-header,.layout-3 .round-header{padding:6px 10px;margin-bottom:5px;gap:9px;grid-template-columns:auto minmax(140px,1fr) auto auto}
.layout-1 .round-title,.layout-2 .round-title,.layout-3 .round-title{font-size:19px}
.layout-1 .opponent-box input,.layout-2 .opponent-box input,.layout-3 .opponent-box input{font-size:16px;padding:6px 9px;height:37px}
.layout-1 .status-pill,.layout-2 .status-pill,.layout-3 .status-pill{display:inline-block;font-size:12px;padding:7px}
.layout-1 .bye-btn,.layout-2 .bye-btn,.layout-3 .bye-btn{font-size:12px;padding:7px}
.layout-1 .section-title,.layout-2 .section-title,.layout-3 .section-title{font-size:15px;padding:5px 10px 0}
.layout-1 .section-title small,.layout-2 .section-title small,.layout-3 .section-title small{font-size:11px}
.layout-1 .match-table,.layout-2 .match-table,.layout-3 .match-table{min-width:0}
.layout-1 .match-table th,.layout-2 .match-table th,.layout-3 .match-table th{font-size:10px;padding:2px}
.layout-1 .match-table td,.layout-2 .match-table td,.layout-3 .match-table td{padding:2px 3px}
.layout-1 .match-id,.layout-2 .match-id,.layout-3 .match-id{height:35px;font-size:12px}
.layout-1 .our-select,.layout-1 .opp-input,.layout-1 .leg-btn,.layout-1 .point-box,
.layout-2 .our-select,.layout-2 .opp-input,.layout-2 .leg-btn,.layout-2 .point-box,
.layout-3 .our-select,.layout-3 .opp-input,.layout-3 .leg-btn,.layout-3 .point-box{height:35px;min-height:35px;font-size:14px;padding:0 5px}
.layout-1 .slot,.layout-2 .slot,.layout-3 .slot{width:34px}
.layout-1 .vs,.layout-2 .vs,.layout-3 .vs{width:28px}
.layout-1 .leg,.layout-2 .leg,.layout-3 .leg{width:55px}
.layout-1 .point,.layout-2 .point,.layout-3 .point{width:46px}
.layout-1 .ours1,.layout-1 .opp1{width:22%}
.layout-2 .ours1,.layout-2 .opp1,.layout-3 .ours1,.layout-3 .opp1{width:auto}
.layout-1 .section-total,.layout-2 .section-total,.layout-3 .section-total{padding:1px 10px 3px;font-size:12px}
.layout-1 .section-total strong,.layout-2 .section-total strong,.layout-3 .section-total strong{font-size:19px}
.layout-1 .round-footer,.layout-2 .round-footer,.layout-3 .round-footer{padding:5px 12px;margin:5px 0;gap:8px;grid-template-columns:1fr 1fr 1fr auto}
.layout-1 .big-score,.layout-2 .big-score,.layout-3 .big-score{font-size:35px}
.layout-1 .result-card .result,.layout-2 .result-card .result,.layout-3 .result-card .result{font-size:16px}
.layout-1 .result-card .sub,.layout-2 .result-card .sub,.layout-3 .result-card .sub{font-size:10px}
.layout-1 .save-btn,.layout-2 .save-btn,.layout-3 .save-btn{padding:10px 12px;font-size:13px}
.layout-1 .legend,.layout-2 .legend,.layout-3 .legend{padding:4px 8px;font-size:11px;gap:9px;flex-wrap:wrap}
.layout-1 .key-chip,.layout-2 .key-chip,.layout-3 .key-chip{width:23px;height:22px}
/* 1: Command Centre - wide scoreboard grid, navy and cyan */
.layout-1{--bg:#06131e;--panel:#0a1f30;--blue:#18a4ed}
.layout-1 .scoring-grid{grid-template-columns:1fr}
.layout-1 .section{border-color:#27779e}
/* 2: Arena - split singles/doubles with prominent golden highlights */
.layout-2{--bg:#100e19;--panel:#1b1830;--line:#55416d;--blue:#e4a73b;--gold:#ffca5a}
.layout-2 .main{background:linear-gradient(120deg,#110e1d,#24132b)}
.layout-2 .round-tab.active,.layout-2 .summary-tab.active{background:#a75b17;border-color:#ffd078}
.layout-2 .scoring-grid{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:7px}
.layout-2 .scoring-grid .section{overflow:hidden}
.layout-2 .scoring-grid .match-table{table-layout:fixed}
.layout-2 .scoring-grid .match-table .leg{width:34px}
.layout-2 .scoring-grid .match-table .point{width:30px}
.layout-2 .scoring-grid .match-table .slot{width:28px}
.layout-2 .scoring-grid .match-table .vs{width:22px}
.layout-2 .scoring-grid .our-select,.layout-2 .scoring-grid .opp-input{font-size:12px;padding:0 2px}
.layout-2 .scoring-grid .match-table th{font-size:8px}
.layout-2 .scoring-grid .section-title{color:#ffd179}
.layout-2 .captain-mini button{background:#342442;border-color:#b88a52}
/* 3: Tournament Pro - practical light/high-contrast, fastest to scan */
.layout-3{--bg:#e7eef5;--panel:#fff;--line:#a8bbca;--text:#132a3d;--muted:#45637b;--blue:#1568b2}
.layout-3 .main{background:#e7eef5;color:#132a3d}
.layout-3 .top-tabs .round-tab,.layout-3 .top-tabs .summary-tab{background:#d6e4ef;color:#12324a;border-color:#91afc4}
.layout-3 .top-tabs .active{background:#1764ac;color:white}
.layout-3 .round-header,.layout-3 .section,.layout-3 .round-footer,.layout-3 .legend{background:white;color:#152d41;border-color:#b3c6d5}
.layout-3 .round-title,.layout-3 .section-title{color:#1262a3}
.layout-3 .match-table th,.layout-3 .vs-cell,.layout-3 .section-total,.layout-3 .legend{color:#264c69}
.layout-3 .match-id{background:#e2f0fa;color:#075b9a}
.layout-3 .our-select,.layout-3 .opp-input{background:#f7fbff;border-color:#b7cbd9}
.layout-3 .leg-btn{background:#e3edf5;color:#183d58;border-color:#a8bfce}
.layout-3 .captain-mini button{background:#d5e8f5;color:#174b70}
.layout-3 .score-team .label,.layout-3 .score-team.opponent .label{color:#174b70}
.layout-3 .result-card .sub{color:#45637b}
.layout-3 .result-card .result{color:#2d7b31}
.layout-3 .section-total strong{color:#2d7b31}
@media(max-width:1050px){
 .layout-2 .scoring-grid{grid-template-columns:1fr}
 .layout-1 .round-header,.layout-2 .round-header,.layout-3 .round-header{grid-template-columns:auto 1fr auto}
 .layout-1 .date-box,.layout-2 .date-box,.layout-3 .date-box{display:none}
 .layout-1 .status-pill,.layout-2 .status-pill,.layout-3 .status-pill{display:none}
}


/* Hybrid concept: Arena split scoring + Pro light surface + subtle team watermark */
.layout-2{--bg:#e9f0f4;--panel:rgba(255,255,255,.94);--line:#a4bdcc;--text:#142c40;--blue:#176baf;--gold:#bd872a}
.layout-2 .main{
  background-image:linear-gradient(rgba(240,246,250,.92),rgba(240,246,250,.94)),url("./te-taniwha-logo.jpg");
  background-repeat:no-repeat;background-position:center center;background-size:auto, min(52vw,520px);
  background-attachment:scroll;color:#183149;
}
.layout-2 .top-tabs .round-tab,.layout-2 .top-tabs .summary-tab{background:#dceaf3;color:#16394f;border-color:#a1baca}
.layout-2 .top-tabs .active{background:#1169aa;color:#fff;border-color:#1169aa}
.layout-2 .round-header,.layout-2 .section,.layout-2 .round-footer,.layout-2 .legend{background:rgba(255,255,255,.88);color:#193449;border-color:#9dbbce}
.layout-2 .section-title,.layout-2 .scoring-grid .section-title{color:#1468a9}
.layout-2 .match-table th,.layout-2 .vs-cell,.layout-2 .section-total,.layout-2 .legend{color:#2c526e}
.layout-2 .match-id{background:#e3f1fa;color:#075d9c}
.layout-2 .our-select,.layout-2 .opp-input{background:#f9fcff;border-color:#b2c9d9}
.layout-2 .leg-btn{background:#e6eff6;color:#14364d;border-color:#a6bfd0}
.layout-2 .captain-mini button{background:#dceef8;color:#124e77;border-color:#9fc1d6}
.layout-2 .score-team .label,.layout-2 .score-team.opponent .label{color:#1c557d}
.layout-2 .result-card .sub{color:#48677d}
.layout-2 .result-card .result{color:#267b39}
.layout-2 .section-total strong{color:#267b39}
.layout-2 .scoring-grid{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
.layout-2 .scoring-grid .section{border:1px solid #a4bdcc}
.layout-2 .round-footer{margin:4px 0;min-height:58px}
.layout-2 .big-score{font-size:34px}
.layout-2 .round-footer .result-card{padding:0 12px}
@media(max-width:1050px){.layout-2 .scoring-grid{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}}


/* Tournament day quick controls */
.round-quick-actions{display:flex;align-items:center;gap:8px;margin:4px 0;flex-wrap:wrap}
.round-quick-actions button{border:1px solid #3389b8;background:#133b56;color:#fff;border-radius:7px;padding:8px 13px;min-height:40px;font-weight:800;cursor:pointer}
.round-quick-actions span{margin-left:auto;color:#83d5a1;font-size:12px}
.namepad{width:min(680px,96vw);max-height:94vh;overflow:auto}
.namepad-display{background:#e8f5ff;color:#102b42;border-radius:8px;padding:12px;min-height:50px;font-size:22px;font-weight:800;word-break:break-word;margin:8px 0}
.namepad-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.namepad-suggestions button{background:#194968;color:#fff;border:1px solid #4e96c4;border-radius:8px;padding:9px 12px;min-height:42px}
.namepad-keys{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;margin:10px 0}
.namepad-keys button{min-height:48px;border-radius:7px;background:#eef7ff;color:#0a2b44;border:1px solid #a6c4d7;font-weight:900;font-size:17px;cursor:pointer}
.namepad-keys .wide{grid-column:span 5;background:#d4e9f8}
.picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:15px 0}
.picker-grid button{background:#163f5c;color:#fff;border:1px solid #388ac1;border-radius:9px;min-height:52px;font-weight:800}
.notices-modal{max-height:90vh;overflow:auto}
.notices-modal li{padding:7px 0;border-bottom:1px solid #35536b;font-size:17px}
.notices-hint{font-size:13px;color:#a8c7dc}
.opp-input[readonly],#opponentTeam[readonly]{cursor:pointer}
@media print{body *{visibility:hidden}.notices-modal,.notices-modal *{visibility:visible}.notices-modal{position:absolute;left:0;top:0;color:black;background:white;width:100%;max-height:none}.modal-backdrop{background:white}}


/* Option 1: full-width landscape tablet split scoring */
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:7px}
 .layout-1 .scoring-grid .section{overflow:hidden}
 .layout-1 .scoring-grid .match-table{table-layout:fixed;min-width:0}
 .layout-1 .scoring-grid .match-table .slot{width:27px}
 .layout-1 .scoring-grid .match-table .vs{width:22px}
 .layout-1 .scoring-grid .match-table .leg{width:34px}
 .layout-1 .scoring-grid .match-table .point{width:29px}
 .layout-1 .scoring-grid .match-table th{font-size:8px}
 .layout-1 .scoring-grid .our-select,.layout-1 .scoring-grid .opp-input{font-size:12px;padding:0 2px}
}


/* Fullscreen toggle replaces temporary 1/2/3 selector */
.fullscreen-toggle{flex:0 0 48px;height:44px;margin-left:auto;border-radius:8px;border:1px solid #58b4ee;background:#0d3653;color:#fff;font-size:26px;font-weight:800;cursor:pointer;display:grid;place-items:center}
.fullscreen-toggle:focus-visible{outline:3px solid #9edfff;outline-offset:2px}


/* Command Centre refinements — logo, alignment and balanced screen */
.layout-1 .taniwha-team-label{display:flex;align-items:center;justify-content:center;gap:9px}
.layout-1 .score-logo{width:39px;height:39px;object-fit:contain;border-radius:6px;flex:none}
.layout-1 .round-footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;min-height:84px}
.layout-1 .round-footer .score-team{display:flex;align-items:center;justify-content:center;gap:18px}
.layout-1 .round-footer .score-team .label{font-size:15px}
.layout-1 .round-footer .big-score{font-size:40px}
.layout-1 .round-footer .result-card{display:flex;align-items:center;justify-content:center;gap:14px;padding:0 10px}
.layout-1 .round-footer .result-card .sub{margin-top:2px}
.layout-1 .scoring-grid{align-items:stretch}
.layout-1 .scoring-grid .section{display:flex;flex-direction:column}
.layout-1 .scoring-grid .section-total{margin-top:auto;padding:6px 10px 8px}
.layout-1 .scoring-grid .section-title{min-height:31px}
.layout-1 .match-table tr td{height:46px}
.layout-1 .our-select,.layout-1 .opp-input,.layout-1 .leg-btn,.layout-1 .point-box{height:40px;min-height:40px}
.layout-1 .match-id{height:40px}
.layout-1 .round-quick-actions{margin:5px 0}
.layout-1 .legend{margin-top:5px}
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
 .layout-1 .scoring-grid .match-table .leg{width:37px}
 .layout-1 .scoring-grid .match-table .point{width:31px}
}
@media(max-width:1099px){
 .layout-1 .round-footer .score-team{gap:7px}
 .layout-1 .score-logo{width:28px;height:28px}
 .layout-1 .round-footer .score-team .label{font-size:12px}
}


/* Precise scoring-column proportions for short first names */
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.07fr);gap:8px}
 .layout-1 .scoring-grid .match-table{width:100%;table-layout:fixed}
 .layout-1 .scoring-grid .match-table .slot{width:32px}
 .layout-1 .scoring-grid .match-table .vs{width:26px}
 .layout-1 .scoring-grid .match-table .leg{width:44px}
 .layout-1 .scoring-grid .match-table .point{width:44px}
 .layout-1 .scoring-grid .match-table .ours1{width:23%}
 .layout-1 .scoring-grid .match-table .opp1{width:29%}
 .layout-1 .scoring-grid .our-select,.layout-1 .scoring-grid .opp-input{font-size:13px;padding:0 5px;min-width:0}
 .layout-1 .scoring-grid .leg-btn,.layout-1 .scoring-grid .point-box{font-size:15px;padding:0}
 .layout-1 .scoring-grid .match-table td{padding:2px}
 /* Doubles: each first-name input gets a little more width than the old layout */
 .layout-1 .scoring-grid .section:nth-child(2) .match-table .ours1{width:24%}
 .layout-1 .scoring-grid .section:nth-child(2) .match-table .opp1{width:29%}
}


/* Use full landscape tablet height with achievements beside singles */
.layout-1 .scoring-grid{align-items:stretch}
.layout-1 .right-column{display:flex;flex-direction:column;gap:7px;min-width:0}
.layout-1 .right-column .section{flex:none}
.layout-1 .right-column .section-total{margin-top:0}
.layout-1 .achievements-panel{flex:1;min-height:185px;background:#0b2235;border:1px solid #26739d;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px}
.layout-1 .achievements-head{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#43b8fa;font-size:15px}
.layout-1 .achievements-head button{background:#0866c9;color:white;border:1px solid #2a9be7;border-radius:7px;padding:9px 13px;font-weight:800;min-height:42px}
.layout-1 .achievement-list{flex:1;min-height:0;display:flex;flex-direction:column;gap:5px}
.layout-1 .achievement-empty{color:#a8c8df;text-align:center;margin:auto;font-size:14px;line-height:1.7}
.layout-1 .achievement-row{display:flex;gap:10px;align-items:center;justify-content:space-between;text-align:left;min-height:42px;background:#14354c;color:#e9f7ff;border:1px solid #356987;border-radius:7px;padding:6px 10px}
.layout-1 .achievement-row span{font-size:12px;color:#b9e5ff}
.layout-1 .achievements-foot{font-size:11px;color:#84b8d2;border-top:1px solid #28506a;padding-top:7px}
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{min-height:min(58vh,540px);grid-template-columns:minmax(0,1fr) minmax(0,1.07fr)}
 .layout-1 .scoring-grid>.section{justify-content:space-between}
 .layout-1 .scoring-grid .section:nth-child(1) .match-table tr td{height:clamp(47px,6.4vh,65px)}
 .layout-1 .scoring-grid .section:nth-child(1) .our-select,
 .layout-1 .scoring-grid .section:nth-child(1) .opp-input,
 .layout-1 .scoring-grid .section:nth-child(1) .leg-btn,
 .layout-1 .scoring-grid .section:nth-child(1) .point-box{height:clamp(42px,5.5vh,56px);min-height:42px}
 .layout-1 .scoring-grid .section:nth-child(1) .match-id{height:clamp(42px,5.5vh,56px)}
 .layout-1 .scoring-grid .right-column .our-select{font-size:12px}
}
@media(max-width:1099px){
 .layout-1 .right-column .achievements-panel{min-height:170px}
}


/* Refined column allocations and record controls */
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}
 .layout-1 .scoring-grid>.section .match-table .ours1{width:20%}
 .layout-1 .scoring-grid>.section .match-table .opp1{width:24%}
 .layout-1 .scoring-grid>.section .match-table .leg{width:49px}
 .layout-1 .scoring-grid>.section .match-table .point{width:47px}
 .layout-1 .right-column .match-table .ours1{width:30%}
 .layout-1 .right-column .match-table .opp1{width:27%}
 .layout-1 .right-column .match-table .leg{width:32px}
 .layout-1 .right-column .match-table .point{width:30px}
 .layout-1 .right-column .our-select{font-size:11px;padding:0 1px}
 .layout-1 .right-column .opp-input{font-size:11px;padding:0 2px}
}
.record-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.record-counter{background:#12334b;border:1px solid #315d7d;border-radius:10px;padding:12px;text-align:center}
.record-counter b{font-size:19px}
.record-counter>div{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}
.record-counter button{width:56px;height:56px;border-radius:10px;border:1px solid #6eb4e0;background:#1568aa;color:white;font-size:32px;font-weight:800}
.record-counter strong{font-size:30px}
.peg-entry{margin:14px 0 22px}
.peg-entry label{display:block;margin-bottom:9px;font-size:17px;font-weight:700}
.peg-entry label small{font-size:12px;color:#a8c6da}
.peg-entry>div{display:flex;align-items:center;justify-content:center;gap:12px}
.peg-entry input{width:120px;height:52px;text-align:center;font-size:22px;border-radius:8px;border:1px solid #98b8cb;background:#fff;color:#142a3c}
.peg-entry span{font-size:28px}


/* Paperwork records plus personal-only counters */
.personal-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0;padding-top:14px;border-top:1px solid #355c75}
.personal-records .record-counter{background:#11283a;border-color:#34516a}
.personal-records .record-counter small{display:block;font-size:11px;font-weight:500;color:#9ebcd0;margin-top:3px}
.high-score-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}
.high-score-entry label{font-size:16px;font-weight:800}
.high-score-entry label small{display:block;font-size:12px;font-weight:500;color:#a8c6da;margin-top:3px}
.high-score-entry input{width:130px;height:48px;border:1px solid #9dbdd1;border-radius:8px;background:#fff;color:#102c43;text-align:center;font-size:20px}
@media(max-height:750px){.modal{max-height:94vh;overflow-y:auto}.record-counter button{height:46px;width:46px}}


/* Focused match workflow — maximum room for scoring */
.pre-match-actions{display:flex;align-items:center;gap:12px;margin:5px 0;color:#a7c9dd;font-size:13px}
.pre-match-actions button{min-height:46px;background:#1685ce;border:1px solid #63c9ff;color:#fff;border-radius:8px;padding:8px 20px;font-weight:900;font-size:16px}
.pre-match-actions button:disabled{opacity:.42;cursor:not-allowed}
.match-title{display:flex;align-items:center;justify-content:center;gap:14px;min-height:64px;margin:0 0 6px;background:#0b263b;border:1px solid #2b7eab;border-radius:9px;color:#fff;font-size:clamp(18px,2.2vw,29px)}
.match-title img{width:49px;height:49px;object-fit:contain}
.match-title span{color:#65bce9;font-size:16px;font-weight:800}
.match-title button{margin-left:auto;margin-right:10px;background:#193b53;color:#fff;border:1px solid #538eaf;border-radius:7px;padding:9px 12px;font-size:12px}
.match-mode .round-header{display:none}
.match-mode .scoring-grid{min-height:min(66vh,610px)}
.match-mode .scoring-grid>.section .match-table tr td{height:clamp(54px,7.5vh,76px)}
.match-mode .scoring-grid>.section .our-select,
.match-mode .scoring-grid>.section .opp-input,
.match-mode .scoring-grid>.section .leg-btn,
.match-mode .scoring-grid>.section .point-box,
.match-mode .scoring-grid>.section .match-id{height:clamp(48px,6.4vh,65px);min-height:48px}
.round-quick-actions .save-btn{margin-left:auto;min-height:42px}


/* Focused match: one scoreboard, one exit control, legible selections */
.match-mode .round-footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;min-height:88px;margin-top:0}
.match-exit-btn{min-height:44px;border-radius:8px;border:1px solid #5798c1;background:#17415d;color:#fff;padding:8px 13px;font-weight:800;white-space:nowrap;cursor:pointer}
.layout-1 .our-select{color:#10293e;background:#f8fbff;font-weight:750}
.layout-1 .our-select option{color:#10293e;background:#fff;font-weight:700}
.layout-1 .our-select:focus-visible{outline:3px solid #56c7ff;outline-offset:1px}
.layout-1 .our-select:has(option[value=""]:checked){color:#466b84}


/* Pre-match sequence: captain selection left, Go to Match right */
.pre-match-actions{display:flex;align-items:center;gap:12px;width:100%;margin:7px 0}
.pre-match-actions #setupCaptain{background:#143b56;border:1px solid #388bb8;color:#fff;min-height:46px;border-radius:8px;padding:9px 16px;font-size:15px;font-weight:800}
.pre-match-actions #goMatch{margin-left:auto;min-width:170px}
.pre-match-actions span{color:#b4d7e9;font-size:13px}
.pre-match-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:700px){.pre-match-actions{flex-wrap:wrap}.pre-match-actions span{order:3;width:100%}.pre-match-actions #goMatch{min-width:145px}}


/* Paired doubles rows and quick-record strip */
.layout-1 .right-column .match-table{table-layout:fixed;width:100%}
.layout-1 .right-column .match-table .ours1{width:30%}
.layout-1 .right-column .match-table .opp1{width:28%}
.layout-1 .right-column .match-table .slot{width:34px}
.layout-1 .right-column .match-table .vs{width:28px}
.layout-1 .right-column .match-table .leg{width:34px}
.layout-1 .right-column .match-table .point{width:32px}
.layout-1 .right-column .match-table td{padding:2px 3px;height:42px}
.layout-1 .right-column .doubles-first td,.layout-1 .right-column .doubles-second td{height:42px}
.layout-1 .right-column .doubles-first .our-select,.layout-1 .right-column .doubles-second .our-select,
.layout-1 .right-column .doubles-first .opp-input,.layout-1 .right-column .doubles-second .opp-input{width:100%;height:38px;min-height:38px;font-size:13px}
.layout-1 .right-column .doubles-first .leg-btn,.layout-1 .right-column .doubles-first .point-box,
.layout-1 .right-column .doubles-first .match-id{height:75px;min-height:75px;display:grid;place-items:center}
.layout-1 .right-column .doubles-first{border-top:1px solid #2b6589}
.quick-player-records{margin-top:7px;border:1px solid #2979a7;border-radius:9px;background:#0d283c;padding:10px 12px}
.quick-record-heading{font-weight:900;color:#52baff;display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:9px}
.quick-record-heading small{font-weight:500;color:#b7d4e5;font-size:12px}
.quick-player-buttons{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}
.quick-player-buttons button{min-height:48px;padding:7px 4px;border-radius:8px;background:#174e72;border:1px solid #4e9bcc;color:#fff;font-size:14px;font-weight:800;cursor:pointer}
.quick-player-buttons button:active{background:#127ac2}
.results-modal{width:min(650px,94vw);max-height:90vh;overflow:auto}
.results-score{padding:12px;background:#153a54;border-radius:8px;font-size:17px}
.results-score b{font-size:25px}
.result-record{display:flex;justify-content:space-between;gap:16px;padding:11px 7px;border-bottom:1px solid #355a72}
.result-record span{text-align:right}
@media(min-width:1100px) and (orientation:landscape){
 .layout-1 .scoring-grid{min-height:0}
 .layout-1 .scoring-grid>.section .match-table tr td{height:clamp(48px,6.1vh,62px)}
 .layout-1 .scoring-grid>.section .our-select,.layout-1 .scoring-grid>.section .opp-input,
 .layout-1 .scoring-grid>.section .leg-btn,.layout-1 .scoring-grid>.section .point-box{height:clamp(43px,5.3vh,55px);min-height:43px}
 .layout-1 .scoring-grid>.section .match-id{height:clamp(43px,5.3vh,55px)}
 .layout-1 .right-column .match-table td{height:clamp(38px,4.2vh,48px)}
 .layout-1 .right-column .doubles-first .leg-btn,.layout-1 .right-column .doubles-first .point-box,
 .layout-1 .right-column .doubles-first .match-id{height:clamp(72px,8.4vh,94px);min-height:72px}
}
@media(max-width:900px){.quick-player-buttons{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Tournament feedback: grouped match actions and eight centered record shortcuts */
.layout-1 .round-quick-actions{justify-content:flex-end;gap:8px;margin:5px 0}
.layout-1 .round-quick-actions .save-btn{margin-left:0;order:1;min-width:155px}
.layout-1 .round-quick-actions #roundResults{order:2;min-width:155px}
.layout-1 .quick-player-records{width:100%}
.layout-1 .quick-player-buttons{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;max-width:1100px;margin:0 auto}
.layout-1 .quick-player-buttons button{width:100%;min-width:0}
@media(max-width:750px){.layout-1 .quick-player-buttons{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Keep full eight-player strip visible, but clearly mark sit-outs */
.layout-1 .quick-player-buttons button:disabled{opacity:1;background:#263747;color:#9fb2c1;border:1px dashed #637d91;cursor:not-allowed}
.layout-1 .quick-player-buttons button:not(:disabled){background:#175a82;color:#fff}


/* Final match-mode polish: enlarge the live scoreboard to use freed header space */
.layout-1.match-mode .round-footer{min-height:132px;padding:14px 22px;margin:4px 0 8px;align-items:center}
.layout-1.match-mode .round-footer .score-team{gap:18px}
.layout-1.match-mode .round-footer .score-logo{width:62px;height:62px}
.layout-1.match-mode .round-footer .score-team .label{font-size:clamp(17px,1.6vw,24px);letter-spacing:.03em}
.layout-1.match-mode .round-footer .big-score{font-size:clamp(48px,5vw,74px);line-height:1}
.layout-1.match-mode .round-footer .result-card .result{font-size:clamp(20px,2vw,28px)}
.layout-1.match-mode .round-footer .result-card .sub{font-size:13px}
.layout-1.match-mode .match-exit-btn{min-height:48px;font-size:14px}
@media(max-height:760px){
 .layout-1.match-mode .round-footer{min-height:105px;padding:8px 14px}
 .layout-1.match-mode .round-footer .score-logo{width:48px;height:48px}
 .layout-1.match-mode .round-footer .big-score{font-size:48px}
}


/* Backup and restore controls, confined to the Summary screen */
.summary-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.summary-head h2{margin:0}
.backup-actions{display:flex;gap:8px;align-items:center}
.backup-actions button{min-height:44px;border-radius:8px;padding:9px 14px;background:#14517b;border:1px solid #51a6d6;color:#fff;font-weight:800;cursor:pointer}
.backup-actions button:focus-visible{outline:3px solid #8edbff}
.backup-note{font-size:13px;color:#b4d4e8;margin:10px 0 14px}


/* Tablet fullscreen: fill unused lower space with comfortable touch targets */
@media (min-width:1100px) and (orientation:landscape) and (min-height:760px){
 .layout-1.match-mode .scoring-grid{min-height:0;align-items:stretch}
 .layout-1.match-mode .scoring-grid>.section .match-table tr td{height:clamp(64px,8vh,84px)}
 .layout-1.match-mode .scoring-grid>.section .our-select,
 .layout-1.match-mode .scoring-grid>.section .opp-input,
 .layout-1.match-mode .scoring-grid>.section .leg-btn,
 .layout-1.match-mode .scoring-grid>.section .point-box,
 .layout-1.match-mode .scoring-grid>.section .match-id{height:clamp(58px,7.3vh,76px);min-height:58px}
 .layout-1.match-mode .right-column .match-table td{height:clamp(32px,4vh,42px)}
 .layout-1.match-mode .right-column .doubles-first .our-select,
 .layout-1.match-mode .right-column .doubles-second .our-select,
 .layout-1.match-mode .right-column .doubles-first .opp-input,
 .layout-1.match-mode .right-column .doubles-second .opp-input{height:clamp(31px,3.8vh,40px);min-height:31px}
 .layout-1.match-mode .right-column .doubles-first .leg-btn,
 .layout-1.match-mode .right-column .doubles-first .point-box,
 .layout-1.match-mode .right-column .doubles-first .match-id{height:clamp(64px,8vh,84px);min-height:64px}
 .layout-1.match-mode .quick-player-records{padding:14px 16px}
 .layout-1.match-mode .quick-player-buttons button{min-height:clamp(58px,7vh,74px);font-size:16px}
}


/* Match-mode doubles height with singles: 3 paired games = 6 singles rows */
@media (min-width:1100px) and (orientation:landscape){
 .layout-1.match-mode .scoring-grid{align-items:stretch}
 .layout-1.match-mode .right-column{height:100%}
 .layout-1.match-mode .right-column>.section{height:100%;display:flex;flex-direction:column}
 .layout-1.match-mode .right-column .match-table{flex:1;height:100%;table-layout:fixed}
 .layout-1.match-mode .right-column .match-table tbody{height:100%}
 .layout-1.match-mode .right-column .match-table tbody tr{height:16.6667%}
 .layout-1.match-mode .right-column .match-table td{height:auto}
 .layout-1.match-mode .right-column .doubles-first .our-select,
 .layout-1.match-mode .right-column .doubles-second .our-select,
 .layout-1.match-mode .right-column .doubles-first .opp-input,
 .layout-1.match-mode .right-column .doubles-second .opp-input{height:clamp(45px,6.6vh,68px);min-height:45px}
 .layout-1.match-mode .right-column .doubles-first .leg-btn,
 .layout-1.match-mode .right-column .doubles-first .point-box,
 .layout-1.match-mode .right-column .doubles-first .match-id{height:clamp(100px,15vh,156px);min-height:100px}
 .layout-1.match-mode .right-column .section-total{margin-top:auto}
}
