:root{--bg:#090f18;--surface:#131e2c;--border:#29394d;--muted:#a5b5c9;--text:#edf4fc;--accent:#ffa45b}
body{background:#090f18;font-size:14px}header{grid-template-columns:100px minmax(200px,1fr) auto;padding:12px 24px;gap:16px;background:#101a27;border-bottom:1px solid #2a3e55}.studio-logo{width:100px}.studio-logo img{height:52px;object-fit:contain}.studio-title{text-align:left;grid-column:2}.studio-title strong{font-size:23px;letter-spacing:0}.studio-title .brand-sub{font-size:12px;color:#8ea6c1;margin-top:5px}.header-actions{grid-column:3;grid-row:1;width:auto;gap:9px}.status{padding:8px 10px;border:1px solid #354a61;border-radius:6px;background:#172637}.language-control>span{display:none}
main{max-width:1920px;padding:22px 24px;gap:20px;grid-template-columns:minmax(0,1fr) 350px;align-items:start}.sectionbar{margin-bottom:12px}h1{font-size:20px}.eyebrow{color:#63baff;letter-spacing:2px;font-size:10px}.sectionbar>.inline{gap:6px}.sectionbar button{font-size:12px;padding:8px 10px}.stage{border-radius:10px;border-color:#365271;box-shadow:0 10px 35px #0004;max-height:none}.stage-empty{background:radial-gradient(ellipse at 50% 35%,#1e3650 0,#101e2e 55%,#0b1420 100%)}.empty-mark{border-color:#43719c;color:#8bcfff;border-radius:50%;width:64px;height:64px;display:grid;place-items:center;padding:0;margin-bottom:18px}.stage-empty h2{font-size:24px}.stage-empty p{font-size:14px}.sourcebar{padding:12px;background:#101c2a;border:1px solid var(--border);border-radius:8px;margin:12px 0 18px}.sourcebar button,.sourcebar .button{min-height:40px;background:#1b2c40}.sourcebar button.active{background:#163d5e}.output-options{gap:6px}.source-meta:empty{display:none}
.panel{border-radius:10px;background:#131e2c;padding:16px}.panel-title{margin-bottom:14px}.panel-title h2{font-size:15px}.controls{gap:14px}.teams{gap:12px}.team input{background:#0d1724;padding:8px;font-size:15px;border:1px solid #2b3c50}.big-score{font-size:62px;line-height:1.15;margin:10px 0}.score-buttons button{min-height:48px;font-size:20px}.team-meta button,.timeout{padding:8px}.possession{margin-top:14px;padding-top:12px}.clock-display{font-size:54px;letter-spacing:-2px}.clock-panel .panel-title{margin-bottom:6px}.shot-row{margin:12px 0}.shot-display{font-size:34px}.clock-panel #clock-toggle{min-height:42px}.live-panel{border-top:2px solid #39a9f8}.live-panel #stream-open{background:#0876b9;border-color:#249edc;color:#fff;font-weight:700;min-height:44px}.live-panel #stream-open:hover{background:#0c8cd6}.live-panel .muted{font-size:12px}.live-panel #live-state{padding:5px 8px;background:#0b1521;border:1px solid #3a4d61;border-radius:5px}.production-grid{gap:14px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}button:hover,.button:hover{border-color:#6884a4}.activity-panel{background:#0d1723}.shortcuts{line-height:1.8}.clips-panel{margin-top:14px}.muted{font-size:13px}dialog{box-shadow:0 24px 90px #0009}button:focus-visible,select:focus-visible,input:focus-visible{outline-color:#71c9ff}
@media(min-width:1600px){main{grid-template-columns:minmax(0,1fr) 390px}.big-score{font-size:70px}.stage{max-height:680px}}
@media(max-width:1200px){header{grid-template-columns:90px 1fr}.header-actions{grid-column:1/-1;grid-row:2}.production-grid{grid-template-columns:1fr}main{grid-template-columns:minmax(0,1fr) 330px}}
@media(max-width:850px){main{display:flex;flex-direction:column;padding:14px}.workspace,.controls{width:100%}.controls{display:grid;grid-template-columns:1fr 1fr;margin-top:0}.production-grid{grid-template-columns:1fr}.header-actions{justify-content:flex-start}.stage-empty h2{font-size:20px}}
@media(max-width:600px){header{padding:12px 14px;gap:10px;grid-template-columns:76px 1fr}.studio-logo{width:76px}.studio-title strong{font-size:21px}.studio-title .brand-sub{font-size:11px}.header-actions{gap:6px}.header-actions button{min-height:38px}.status{font-size:11px}.controls{grid-template-columns:1fr}.sectionbar>.inline{width:100%;justify-content:flex-start}.stage-empty h2{font-size:17px}.stage-empty p{font-size:12px}.stage-empty .empty-mark{display:none}.stage-empty button{padding:7px 12px}.sourcebar{gap:6px}.sourcebar button,.sourcebar .button{font-size:12px}.output-options{width:100%;margin-left:0;justify-content:space-between}.panel{padding:14px}.big-score{font-size:64px}.score-buttons button{min-height:52px}.language-control select{max-width:80px}.stage{border-radius:6px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Director workspace: program + match controls, then one production dock. */
header{padding:10px 20px;grid-template-columns:88px minmax(160px,1fr) auto}.studio-logo{width:88px}.studio-title strong{font-size:20px}.header-actions{flex-wrap:wrap}.header-actions button{padding:10px 12px}.live-status{color:#a5b5c9;font-size:12px;padding:7px 10px;border:1px solid #344357;border-radius:5px}.stream-action{background:#0786ce;border-color:#2ca6eb;color:white;font-weight:700}
main#studio{max-width:1920px;padding:18px 20px;gap:16px;grid-template-columns:minmax(0,1fr) 320px}.workspace{min-width:0}.controls{gap:10px}.controls .panel{padding:12px}.controls .panel-title{margin-bottom:8px}.controls .big-score{font-size:48px;margin:4px 0;line-height:1.1}.controls .team-label{font-size:11px}.controls .team input{padding:5px}.controls .score-buttons button{min-height:38px;font-size:18px;padding:5px}.controls .team-meta button,.controls .timeout{padding:5px;font-size:12px}.controls .possession{margin-top:8px;padding-top:8px;gap:5px}.controls .possession button{padding:5px 8px;font-size:12px}.controls .clock-display{font-size:42px;line-height:1.1;padding:2px}.controls .clock-panel #clock-toggle{min-height:34px;padding:6px}.controls .shot-row{margin:7px 0}.controls .shot-display{font-size:30px}.controls .shot-row button:not(.shot-display),.controls .clock-panel>.inline button{font-size:12px;padding:6px 8px}.controls .clock-panel .panel-title select{padding:6px}.controls .clock-panel>.inline{gap:5px}.sectionbar{min-height:35px;margin-bottom:10px}.sectionbar h1{font-size:17px;margin:2px 0}.stage{border-radius:7px}.sourcebar{margin:10px 0 0;padding:9px;gap:6px}.sourcebar button,.sourcebar .button{font-size:12px;min-height:36px;padding:8px 10px}.output-options{margin-left:0}.sourcebar select{font-size:12px;padding:8px}.production-dock{grid-column:1/-1;min-width:0;border:1px solid #2d3e53;border-radius:8px;overflow:hidden;background:#101b29}.dock-tabs{display:flex;gap:0;border-bottom:1px solid #2d3e53;background:#0e1723;overflow-x:auto}.dock-tabs button{border:0;border-radius:0;background:transparent;padding:14px 24px;color:#9aacc2;white-space:nowrap;border-bottom:2px solid transparent}.dock-tabs button[aria-selected=true]{background:#17283a;border-bottom-color:#39b5ff;color:#e8f7ff}.production-dock>.panel{border:0;border-radius:0;margin:0;padding:18px 20px;box-shadow:none;background:transparent;min-height:160px}.production-dock .panel-title h2{font-size:14px}.production-dock .activity-panel ol{max-height:210px;overflow:auto}.production-dock .live-panel{max-width:800px}.production-dock .live-panel #remote-open{width:auto}.stage-empty .empty-mark{width:50px;height:50px;margin-bottom:10px}.stage-empty h2{font-size:22px;margin:7px}.stage-empty p{margin:8px 0 14px}
@media(min-width:1450px){main#studio{grid-template-columns:minmax(0,1fr) 360px}.controls .big-score{font-size:60px}.controls .score-buttons button{min-height:44px}.controls .clock-display{font-size:50px}}
@media(max-width:1200px){header{grid-template-columns:88px 1fr}.header-actions{grid-row:2;grid-column:1/-1;justify-content:flex-start}.header-actions .stream-action{margin-left:auto}}
@media(max-width:850px){main#studio{display:grid;grid-template-columns:1fr;padding:12px}.controls{display:grid;grid-template-columns:1fr 1fr}.production-dock{grid-column:1}.dock-tabs button{padding:12px 16px}.stage-empty h2{font-size:18px}}
@media(max-width:560px){header{padding:10px 12px}.header-actions{gap:5px}.header-actions button{font-size:12px;padding:8px}.header-actions .stream-action{margin-left:0}.controls{grid-template-columns:1fr}.sectionbar{flex-wrap:wrap;gap:8px}.sectionbar>.inline{width:100%;flex-wrap:wrap}.stage-empty p{display:none}.stage-empty h2{font-size:16px}.stage-empty .empty-mark{display:none}.stage-empty button{margin:3px;padding:6px 10px}.production-dock>.panel{padding:14px}.sourcebar{flex-wrap:wrap}.output-options{max-width:100%}.studio-title strong{font-size:20px}.live-status{font-size:11px}.source-meta{overflow-wrap:anywhere}}

/* Keep the 16:9 preview and its toolbar aligned without a width gap. */
@media(min-width:851px){main#studio{max-width:1600px;grid-template-columns:minmax(0,1fr) 320px;padding:12px 18px;gap:12px}.stage{max-height:none;width:100%;aspect-ratio:16/9}.sectionbar{margin-bottom:8px}.controls .big-score{font-size:44px}.controls .score-buttons button{min-height:36px}.controls .clock-display{font-size:40px}.production-dock>.panel{padding:12px 16px;min-height:130px}.dock-tabs button{padding:10px 20px}}
@media(min-width:851px){main#studio{max-width:1440px}}

@media(min-width:851px){#studio>.controls{margin-top:var(--program-heading-offset,53px)}}

@media(min-width:851px){#studio>.controls{height:var(--program-preview-height);display:grid;grid-template-rows:minmax(0,1.15fr) minmax(0,1fr);gap:10px}#studio>.controls>.panel{min-height:0;overflow:auto;display:flex;flex-direction:column}#studio>.controls .scoreboard-controls .teams{flex:1;align-content:center}#studio>.controls .clock-panel .shot-row{flex:1;align-items:center}#studio>.controls .clock-panel>.inline{margin-top:auto}}

.audio-readout{display:flex;align-items:center;gap:12px;padding:8px 10px;color:var(--muted);font-size:12px}.audio-readout meter{width:140px;height:10px;accent-color:#45d6a0}

.score-key-hint{font-size:11px;color:var(--muted);margin:5px 0 0}.scoreboard-controls .panel-title>.eyebrow{display:none}.scoreboard-controls .panel-title button{font-size:11px;padding:5px 8px}

#board-gallery{width:min(1080px,94vw);max-width:1080px;max-height:90vh;overflow:auto}.board-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.board-choice{padding:0;overflow:hidden;text-align:left}.board-choice canvas{width:100%;height:auto}.board-choice span{display:block;padding:10px 14px;font-weight:700}.board-choice:hover{border-color:#63baff;background:#203a51}@media(max-width:650px){.board-grid{grid-template-columns:1fr}}

.board-choice[aria-pressed="true"]{border-color:#5bd0ff;box-shadow:inset 0 0 0 2px #5bd0ff}

#team-brand{width:min(720px,94vw);max-height:90vh;overflow:auto}.brand-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}.brand-columns fieldset{border:1px solid #38536b;border-radius:8px;padding:16px}.brand-columns label{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0}.brand-columns input[type=file]{max-width:190px}.brand-columns img{object-fit:contain;background:#263342}.brand-columns img:not([src]){visibility:hidden}@media(max-width:650px){.brand-columns{grid-template-columns:1fr}}

.brand-live-preview{display:block;width:100%;height:auto;border:1px solid #38536b;margin:14px 0;border-radius:8px}

.brand-columns img{display:block;min-height:72px;margin-bottom:12px}.brand-columns label{white-space:nowrap}.brand-columns input[type=color]{width:160px;max-width:65%;flex-shrink:1}.brand-columns fieldset{min-width:0}

#score-position{position:absolute;border:2px dashed #63d7ff;z-index:8;cursor:move;touch-action:none;box-sizing:border-box}#score-position>span{position:absolute;bottom:100%;left:0;background:#092d43;color:#fff;padding:3px 7px;font-size:12px;white-space:nowrap}#score-resize{position:absolute;right:-9px;bottom:-9px;width:24px;height:24px;padding:0;min-height:24px;cursor:nwse-resize;touch-action:none;background:#42c7ff;color:#082535}.score-position-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:12px;background:#142536}.score-position-tools[hidden],#score-position[hidden]{display:none}.score-position-tools label{display:flex;gap:6px;align-items:center}.score-position-tools input[type=number]{width:80px}.score-position-tools input[type=range]{width:130px}.score-position-tools span{font-size:12px;color:#a1b5c5}

/* Local feedback without brightness/filter animation. */
button.button-feedback{outline:2px solid #8edaff;outline-offset:-3px;transition:none}
