*{box-sizing:border-box}
[hidden]{display:none!important}
:root{color-scheme:light;--bg:#f2f2f2;--panel:#fff;--ink:#171717;--muted:#555;--line:#aaa;--field:#fff;--accent:#245a8e;--selected:#dce8f3;--radius:2px;--font:system-ui;--gap:5px}
:root[data-color-mode=dark]{color-scheme:dark;--bg:#252525;--panel:#303030;--ink:#eee;--muted:#bbb;--line:#777;--field:#222;--accent:#a6cff5;--selected:#3b4a58}
@media(prefers-color-scheme:dark){:root[data-color-mode=system]{color-scheme:dark;--bg:#252525;--panel:#303030;--ink:#eee;--muted:#bbb;--line:#777;--field:#222;--accent:#a6cff5;--selected:#3b4a58}}
html,body{height:100%;margin:0}
body{height:100svh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:var(--bg);color:var(--ink);font:1rem/1.25 var(--font),sans-serif}
button,input,textarea,select{font:inherit;color:inherit}
button,input,select,textarea,summary{touch-action:manipulation}
button{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:5px 9px;cursor:pointer;white-space:nowrap;min-height:30px}
button:hover{background:var(--selected)}
button:disabled{opacity:.45;cursor:pointer}
button:focus-visible,input:focus,select:focus,textarea:focus,summary:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
button[aria-pressed=true],.tabs .selected{background:var(--selected);border-color:var(--accent)}
input,select,textarea{background:var(--field);border:1px solid var(--line);border-radius:var(--radius);padding:5px;min-width:0;width:100%;max-width:100%}
input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--accent)}
input[type=range]{padding:0}
input[type=file]{font-size:1rem}
textarea{resize:vertical}
label{display:flex;flex-direction:column;gap:3px;font-size:1rem;margin:5px 0}
h1,h2,h3,p{margin:0}
h1{font-size:1rem}h2,h3{font-size:1rem}p{margin:6px 0}
.muted{color:var(--muted)}.small{font-size:1rem}
.topbar{display:flex;align-items:center;gap:10px;flex-shrink:0;padding:3px 7px;border-bottom:1px solid var(--line);min-height:37px}
.brand{font-size:1rem;white-space:nowrap}.brand span{font-size:1rem;font-weight:400;margin-left:6px}
.top-actions{display:flex;gap:4px;align-items:center;margin-left:auto}
.cog{font-size:1.4375rem;line-height:1;padding:0 8px}
.status{font-size:1rem;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#match-context{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.status[data-status=error]{color:#b33a1c}
:root[data-color-mode=dark] .status[data-status=error]{color:#ffb99e}
#notice{background:var(--selected);border-bottom:1px solid var(--line);padding:5px 8px;font-size:1rem;flex-shrink:0;max-height:52px;overflow:auto;white-space:pre-line}
#notice[data-error=true]{background:#ffddbd;color:#341c0a}
#app{display:grid;grid-template-columns:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}
#desk{min-width:0;min-height:0;display:flex;flex-direction:column;padding:var(--gap);gap:var(--gap);overflow:hidden}
.match-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:30px}
.match-heading>div:first-child{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#match-title{font-size:1rem}#match-context{font-size:1rem;margin-left:10px}
.button-row{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.workspace-tabs{display:flex;gap:3px;flex-shrink:0}
.workspace-tabs button{font-size:1rem;padding:4px 12px}
.stage{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:auto minmax(65px,.34fr) minmax(0,.66fr) auto;gap:var(--gap);flex:1;min-height:0;position:relative;overflow:hidden}
.panel,.workspace-panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:7px;min-width:0;min-height:0;overflow:auto}
.panel-title,.section-title{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:5px;font-size:1rem;flex-shrink:0}
.panel-title h2{font-size:1rem}.panel-title>span{color:var(--muted);font-size:1rem}
.scoreboard{grid-row:1;grid-column:1/-1;overflow:hidden}
.scoreboard>.panel-title{margin:0 0 3px}
.score-cards{display:grid;grid-template-columns:repeat(var(--players,4),minmax(0,1fr));gap:3px}
.score-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;column-gap:6px;align-items:center;padding:2px 7px;border-left:1px solid var(--line)}
.score-card:first-child{border-left:0}
.seat-label{grid-column:1;grid-row:1;font-size:1rem;color:var(--muted)}
.player-name{grid-column:1;grid-row:2;font-size:clamp(1rem,1.3vw,18px);overflow-wrap:anywhere}
.score-value{grid-column:2;grid-row:1/4;font-size:clamp(1.5625rem,4.7vh,44px);font-variant-numeric:tabular-nums;line-height:1}
.score-meta{grid-column:1;grid-row:3;font-size:1rem;color:var(--muted)}
.score-card.active{background:var(--selected)}
.many-players .seat-label,.many-players .score-meta{display:none}
.many-players .score-card{grid-template-rows:1fr;padding:3px}
.many-players .player-name{grid-row:1;font-size:1rem}
.many-players .score-value{grid-row:1;font-size:1.25rem}
.question-panel{grid-column:1/11;grid-row:2/4;display:flex;flex-direction:column;gap:4px;overflow:hidden}
.question-content{display:flex;align-items:stretch;gap:8px;flex:1;min-height:0;overflow:auto}
.question-text{flex:1;min-width:0;overflow-wrap:anywhere;font-size:clamp(1rem,2.5vh,22px);line-height:1.35}
.question-text p{margin:0 0 .5em}
.media{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px;max-width:45%;min-width:0}
.media:empty{display:none}
.media img,.media video{max-height:100%;max-width:100%;object-fit:contain;min-height:0}
.media audio{max-width:100%;height:36px}
.question-text img,.question-text video,#answer-text img{max-width:100%;max-height:160px;object-fit:contain}
#reveal-answer{align-self:flex-start;font-size:1rem;flex-shrink:0}
#answer-block{flex:0 1 auto;max-height:40%;overflow:auto;border-top:1px solid var(--line);padding-top:4px}
.answer-label{font-size:1rem;color:var(--muted)}
#answer-text{font-size:clamp(1rem,2.2vh,19px);line-height:1.3}
#question-notes{margin-top:3px}
.language-label{flex-direction:row;align-items:center;gap:4px;font-size:1rem;margin:0}
.language-label select{font-size:1rem;padding:2px;width:auto;max-width:110px}
#timer{font:clamp(1.6875rem,5.8vh,56px)/1.05 monospace;font-variant-numeric:tabular-nums}
#timer-toggle.timer-warning,#media-timer.timer-warning{color:#171717;background:#ffd54f;border-color:#a97800;opacity:1}
#timer-toggle.timer-critical,#media-timer.timer-critical{color:#fff;background:#ba241d;border-color:#941b16;opacity:1}
#timer-toggle.timer-warning #timer,#timer-toggle.timer-critical #timer,#media-timer.timer-warning output,#media-timer.timer-critical output{color:inherit}
.queue-panel{grid-column:11/-1;grid-row:3}
.queue-panel .panel-title{margin-bottom:3px}
.queue-panel ol{list-style:none;margin:0;padding:0}
.queue-panel li{display:flex;justify-content:space-between;gap:5px;font-size:1rem;padding:4px 2px;border-top:1px solid var(--line)}
.queue-panel li.used{opacity:.45}
.queue-panel li.active{background:var(--selected);font-weight:600}
.queue-stats{white-space:nowrap;font-variant-numeric:tabular-nums}
.controls-panel{grid-column:1/-1;grid-row:4;display:flex;align-items:center;gap:12px;overflow:hidden;padding:5px 7px}
.answering{display:flex;flex-direction:column;min-width:100px;max-width:28%;gap:2px;font-size:1rem}
#answering-label{font-size:1rem;color:var(--muted)}
#answering-player{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.answer-buttons{display:flex;gap:6px;flex:1}
.answer-buttons button{flex:1;min-width:0;padding:10px 5px;font-size:1.0625rem;font-weight:600;border-color:#888}
.correct{background:#c6e6c6;color:#112f11}
.pass{background:#e0e0e0;color:#222}
.wrong{background:#f0c7c7;color:#481414}
.kill{background:#ddd0e8;color:#331744}
kbd{font:1rem monospace;margin-left:8px;opacity:.6}
.workspace-panel{overflow:auto}
#tiebreakers{grid-column:6/11;grid-row:2/4;display:flex;flex-direction:column;gap:3px}
body[data-workspace=tiebreakers] .question-panel{grid-column:1/6}
#positions-panel,#journal{grid-column:1/11;grid-row:2/4}
body[data-workspace=positions] .question-panel,body[data-workspace=journal] .question-panel{display:none}
.tb-toolbar{display:flex;justify-content:space-between;align-items:center;gap:4px;flex-shrink:0}
#tb-round-tabs{display:flex;gap:3px;flex-wrap:wrap}
#tb-round-tabs button,#tb-add-open{font-size:1rem;padding:3px 6px;min-height:25px}
#tb-need{font-size:1rem;flex-shrink:0}
#tb-rounds{flex:1;min-height:0;overflow:auto}
.tb-round{min-width:0}
.tb-round table{table-layout:fixed}
.tb-round th:first-child{width:25%}.tb-round th:last-child{width:12%}
.tb-round th:last-child{width:4rem}
.tb-result-label{display:none}
.tb-round td:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.round-heading{display:flex;justify-content:space-between;align-items:center;gap:5px;margin:3px 0}
.round-heading h3{font-size:1rem}
.round-heading label{flex-direction:row;align-items:center;margin:0}
.round-heading input{width:90px}
table{border-collapse:collapse;width:100%;font-size:1rem}
th{text-align:left;font-weight:500;font-size:1rem;color:var(--muted)}
th,td{padding:4px;border-bottom:1px solid var(--line);vertical-align:middle}
.tb-cell{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;min-width:66px;position:relative;padding-top:15px}
.tb-cell button{font-size:1rem;padding:2px;min-height:22px}
.tb-cell .read-cell{position:absolute;top:0;left:0;width:100%;min-height:13px;font-size:1rem;line-height:1;padding:0;border:0;text-align:left;background:transparent;color:var(--muted)}
.tb-cell.focused{outline:1px solid var(--accent)}
.tb-cell button.selected{outline:2px solid var(--ink);outline-offset:-2px}
.tb-numeric{min-width:0;width:100%;max-width:9rem}
#skin-dialog{margin:8px 8px 8px auto;max-height:calc(100dvh - 16px);width:min(560px,calc(100vw - 16px))}
#skin-dialog::backdrop{background:#0001}#skin-css{font-family:monospace;min-height:7rem}
.layout-editing #stage{background-image:radial-gradient(circle,var(--line) 1px,transparent 1px);background-size:2% 2%}
.standings-row{display:flex;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:7px 3px}
.standings-row .place{width:40px}.standings-row .name{flex:1}
.standings-row .eligibility{color:var(--muted);font-size:1rem}
.needed{padding:6px 0;font-size:1rem;color:var(--accent)}
.journal-tools{display:flex;gap:4px;flex-wrap:wrap}
.journal-tools button{font-size:1rem}
.journal-list{overflow:auto;margin-top:6px;font:1rem/1.3 monospace}
.journal-entry{display:flex;gap:8px;padding:3px 0;border-bottom:1px solid var(--line)}
.journal-entry button{font-size:1rem;padding:1px 4px;min-height:20px}
.journal-entry time{color:var(--muted);white-space:nowrap}
.review-banner{display:flex;gap:6px;align-items:center;flex-shrink:0;font-size:1rem;background:var(--selected);padding:3px}
.review-banner label{flex-direction:row;align-items:center;margin:0}
.review-banner input[type=range]{flex:1;min-width:50px}
.review-banner select{width:50px;padding:2px;font-size:1rem}
.review-banner button{min-height:24px;font-size:1rem;padding:2px 5px}
.settings{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--panel);border-left:1px solid var(--line);padding:6px;gap:5px;overflow:hidden}
.settings-heading{display:flex;justify-content:space-between;align-items:center;flex-shrink:0}
.settings-heading button{font-size:1.25rem;min-height:24px;padding:0 7px}
.settings-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;flex-shrink:0}
.settings-tabs button{font-size:1rem;padding:3px;min-height:27px}
#setup-form{display:flex;flex-direction:column;min-height:0;flex:1}
.settings-pane{min-height:0;overflow:auto;flex:1;padding:2px}
.wide-autocomplete{position:fixed;z-index:30;max-width:calc(100vw - 16px);overflow:auto;padding:3px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 2px 8px #0003;font:1rem/1.3 var(--font),sans-serif}
.wide-autocomplete [role=option]{padding:6px 8px;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.wide-autocomplete [role=option][aria-selected=true],.wide-autocomplete [role=option]:not([aria-disabled=true]):hover{background:var(--selected);outline:1px solid var(--accent);outline-offset:-1px}
.wide-autocomplete [aria-disabled=true]{color:var(--muted);cursor:default}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}
.form-grid label{margin:3px 0}
.form-grid input{padding:4px}
.check,.inline-label{flex-direction:row;align-items:center;gap:6px}
.inline-label input{width:60px}
.setup-footer{display:flex;flex-direction:column;gap:4px;flex-shrink:0;border-top:1px solid var(--line);padding-top:5px}
.setup-footer .button-row{justify-content:space-between}
#start-match{border-color:var(--accent);font-weight:600}
.tabs{display:flex;gap:4px;margin-bottom:6px}
.tabs button{font-size:1rem}
.table-scroll{overflow:auto}
.player-editor{table-layout:fixed;min-width:0;font-size:1rem}
.player-editor th,.player-editor td{padding:3px 2px;word-break:normal}
.player-editor th{font-size:1rem;line-height:1.15}
.player-editor th:first-child{width:2.25rem}
.player-editor th:nth-child(2){width:auto}
.player-editor th:nth-child(3){width:2.75rem}
.player-editor th:nth-child(n+4):nth-child(-n+8),.player-editor th:nth-child(10){width:3rem}
.player-editor th:nth-child(9){width:3.25rem}
.player-editor th:nth-child(11){width:6rem}
.player-editor .attended-cell{text-align:center}
.player-editor input{padding:4px 2px;font-size:1rem;min-width:0}
.player-editor input:not([type=color]),.player-editor tbody th{background:var(--player-background,var(--field));color:var(--player-text,var(--ink))}
.player-name-field{position:relative;min-width:0}
.player-editor .player-name-field input{padding-right:2rem}
.player-name-clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem;min-height:0;padding:0;border:0;background:transparent;color:var(--player-text,var(--ink))}
.player-name-clear:hover{background:transparent;opacity:.65}
.player-name-clear::before,.player-name-clear::after{content:"";position:absolute;left:50%;top:50%;width:45%;height:1.5px;border-radius:1px;background:currentColor;pointer-events:none;transform:translate(-50%,-50%) rotate(45deg)}
.player-name-clear::after{transform:translate(-50%,-50%) rotate(-45deg)}
.player-editor .player-colour-cell{text-align:center}
.player-editor input[type=color]{width:2.5rem;max-width:100%;height:2rem;padding:2px;cursor:pointer}
.player-colour-tools{display:flex;align-items:center;gap:4px;white-space:nowrap}
.player-colour-tools button{min-height:30px;padding:2px 5px}
.colour-contrast{font-size:1rem;color:var(--muted)}
@media(max-width:700px){.answer-buttons button{font-size:1rem;padding:9px 3px}}
[data-cuts]{white-space:normal;max-width:100%}
@media(max-width:800px){
 .player-editor,.player-editor tbody{display:block;width:100%}
 .player-editor thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .player-editor tbody tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px 0;border-bottom:1px solid var(--line)}
 .player-editor tbody th,.player-editor tbody td{display:block;min-width:0;width:auto;border:0;padding:2px}
 .player-editor td:nth-child(2){grid-column:span 2}
 .player-editor tbody [data-label]:before{content:attr(data-label);display:block;margin-bottom:3px;font-weight:400;line-height:1.15}
 .player-colour-tools{flex-wrap:wrap}
}
#recent-list{gap:5px;margin:6px 0}
#bank-validation{margin:6px 0;padding:8px;border:1px solid var(--line);border-left:3px solid var(--accent);overflow-wrap:anywhere}
#bank-validation[data-status=error]{border-left-color:#b33a1c}
#bank-validation[data-status=warning]{border-left-color:#9b6900}
#bank-validation ul{padding-left:1.5rem;margin:6px 0}
#bank-validation li+li{margin-top:4px}
#recent-list button{max-width:100%;white-space:normal;text-align:left;font-size:1rem}
dialog{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius);padding:12px;width:min(540px,95vw);max-height:94dvh;overflow:auto}
dialog::backdrop{background:#0006}
.dialog-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.dialog-title button{font-size:1.25rem;min-height:25px;padding:0 6px}
/* Draw close icons independently of the font's multiplication-sign baseline. */
.dialog-title button[aria-label^="Close"],#settings-close,#media-close{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:2rem;height:2rem;min-width:2rem;min-height:2rem;padding:4px;color:transparent;line-height:1}
.dialog-title button[aria-label^="Close"]::before,.dialog-title button[aria-label^="Close"]::after,#settings-close::before,#settings-close::after,#media-close::before,#media-close::after{content:"";position:absolute;left:50%;top:50%;width:55%;height:1.5px;border-radius:1px;background:var(--ink);pointer-events:none;transform:translate(-50%,-50%) rotate(45deg)}
.dialog-title button[aria-label^="Close"]::after,#settings-close::after,#media-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
dialog .button-row{margin-top:8px}
summary{cursor:pointer;font-size:1rem}
details[open]>summary{margin-bottom:5px}
#manual-positions{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}
#skin-visibility{display:flex;gap:6px;flex-wrap:wrap}
#skin-visibility label{flex-direction:row;align-items:center}
.file-picker{font-size:1rem}
.panel-handle{display:none}
.video-panel,.video-slot-panel{display:none}
.video-slot-panel{position:absolute;z-index:2}
.show-video .video-slot-panel{display:flex;align-items:center;justify-content:center}
.video-space{border:1px dashed var(--line);width:100%;height:100%;min-height:30px;display:grid;place-items:center;color:var(--muted);font-size:1rem}
.custom-layout .stage{display:block}
.custom-layout .stage>[data-panel]{position:absolute;overflow:auto;margin:0}
.layout-editing .panel{outline:1px dashed var(--accent);padding-top:19px}
.layout-editing .panel-handle{display:block;position:absolute;top:1px;left:4px;cursor:move;touch-action:none;font-size:1rem;color:var(--accent);z-index:4}
.layout-editing .resize-handle{top:auto;left:auto;right:3px;bottom:1px;font-size:1.125rem;cursor:nwse-resize}
.skin-hidden{display:none!important}
@media(orientation:landscape) and (max-height:500px){#tb-need{display:none}.round-heading h3{display:none}.round-heading{margin:0}.tb-cell{min-width:0;padding-top:9px}.tb-cell button{padding:1px;font-size:1rem;min-height:19px}.tb-cell .read-cell{min-height:9px;font-size:1rem}.tb-round th,.tb-round td{padding:2px 1px}.tb-round th{font-size:1rem}.tb-round td:first-child{font-size:1rem}}
@media(max-width:950px){.brand span{display:none}.score-meta{font-size:1rem}.panel{padding:5px}.queue-panel li{font-size:1rem}.answering{min-width:85px}.workspace-tabs button{padding:3px 8px}.tb-cell{min-width:58px}.tb-cell button{font-size:1rem}}
@media(max-width:700px){body.settings-open .settings{position:absolute;inset:0;z-index:10;border:0}.topbar{gap:6px}.brand{font-size:1rem}.status{font-size:1rem}.top-actions button{font-size:1rem;padding:4px 7px}.top-actions .cog{font-size:1.375rem;padding:0 7px}.match-heading{gap:4px}#match-context{display:none}#match-title{font-size:1rem}.match-heading button{font-size:1rem;padding:3px 6px}.stage{grid-template-columns:repeat(12,minmax(0,1fr))}.question-panel{grid-column:1/10}.timer-panel,.queue-panel{grid-column:10/-1}.score-card{padding:2px 4px;column-gap:3px}.score-meta{display:none}.score-value{font-size:1.75rem}.seat-label{font-size:1rem}.player-name{font-size:1rem}.language-label{font-size:1rem}.language-label select{max-width:80px}.question-text{font-size:1rem}.controls-panel{gap:6px}.answer-buttons{gap:4px}.answering{min-width:75px;max-width:26%;font-size:1rem}kbd{display:none}#tiebreakers{grid-column:5/10}body[data-workspace=tiebreakers] .question-panel{grid-column:1/5}#positions-panel,#journal{grid-column:1/10}.queue-panel .panel-title h2{font-size:1rem}.queue-panel li{font-size:1rem}.queue-panel{padding:3px}.panel-title{font-size:1rem}.journal-entry time{font-size:1rem}.journal-entry{gap:4px}.media{max-width:42%}}
@media(orientation:landscape) and (max-height:500px){body{font-size:1rem;--gap:3px}.topbar{min-height:29px;padding:1px 5px}.topbar button{min-height:24px;padding:2px 7px}.match-heading{min-height:24px}.match-heading button,.workspace-tabs button{min-height:24px;padding:2px 7px;font-size:1rem}#match-title{font-size:1rem}.scoreboard .panel-title{display:none}.score-card{padding:1px 5px}.score-value{font-size:1.75rem}.player-name{font-size:1rem}.seat-label{font-size:1rem}.score-meta{font-size:1rem}.panel{padding:4px}.panel-title{margin-bottom:2px}.question-text{font-size:1rem;line-height:1.25}.language-label{font-size:1rem}.language-label select{padding:0;font-size:1rem;max-width:90px}#reveal-answer{padding:2px 6px;min-height:23px;font-size:1rem}#answer-text{font-size:1rem}#timer{font-size:1.9375rem}.queue-panel li{padding:3px 2px;font-size:1rem}.controls-panel{padding:3px 5px;gap:8px}.answer-buttons button{padding:7px 3px;font-size:1rem;min-height:32px}.answering{font-size:1rem}.score-cards.many-players .score-card{padding:1px}.score-cards.many-players .score-value{font-size:1rem}.settings-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}.settings-tabs button{font-size:1rem;min-height:23px}.settings-heading{min-height:22px}.settings-heading h1{font-size:1rem}.settings-heading button{min-height:20px;font-size:1.125rem}.settings .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid label{font-size:1rem;margin:2px 0}.form-grid input{padding:3px;font-size:1rem}.settings-pane>label{font-size:1rem}.settings{padding:4px;gap:3px}.setup-footer{gap:2px;padding-top:3px}.setup-footer button{min-height:24px;padding:2px 6px;font-size:1rem}.setup-footer .small{font-size:1rem}.tb-cell{padding-top:11px;min-width:55px}.tb-cell button{min-height:20px}.tb-cell .read-cell{min-height:11px;font-size:1rem}#tb-need{font-size:1rem}th,td{padding:2px}.tb-toolbar button{font-size:1rem;min-height:21px;padding:2px 4px}.round-heading{margin:1px 0}.round-heading h3{font-size:1rem}}
@media(orientation:portrait) and (max-width:700px){.stage{grid-template-rows:auto minmax(90px,.35fr) minmax(0,.65fr) auto}.score-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.score-card:nth-child(odd){border-left:0}.score-card{padding:3px 5px}.score-value{font-size:1.625rem}.question-panel{grid-column:1/10}.queue-panel li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px}.media{max-width:100%;max-height:40%}.question-content{flex-direction:column}.question-text{flex:1}.controls-panel{align-items:stretch;flex-direction:column;gap:3px}.answering{max-width:100%;flex-direction:row;gap:6px;align-items:center}.answer-buttons button{padding:9px 3px}.settings .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-workspace=tiebreakers] .question-panel{display:none}#tiebreakers{grid-column:1/10}.workspace-tabs button{font-size:1rem;padding:3px 7px}}
@media(orientation:landscape) and (max-height:500px){.tb-round .tb-cell{display:block;min-width:0;padding:0}.tb-round .tb-cell>.correct,.tb-round .tb-cell>.pass,.tb-round .tb-cell>.wrong{display:none}.tb-round .tb-cell>.read-cell{position:static;display:block;min-height:24px;padding:2px;font-size:1rem;text-align:center;border:1px solid var(--line);background:var(--field);color:var(--ink)}.tb-round td,.tb-round th{padding:2px 1px}}

/* Reader layout: everything above the answer panel can be cropped for sharing. */
html{font-size:100%}
button,[role=button],input[type=button],input[type=submit]{cursor:pointer}
sup,sub,small{font-size:1rem}
#workspace-select{display:none;width:auto;max-width:9rem}
.topbar .brand{min-width:0;max-width:22vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1}
.topbar{flex-wrap:wrap}
.topbar #match-context{display:block;flex:1 1 18rem;min-width:0;max-width:100%;margin-left:0;overflow:visible;white-space:normal;text-overflow:clip;overflow-wrap:anywhere}
.topbar .status{min-width:0;flex-shrink:2;max-width:14rem}
.top-actions{flex-shrink:0}
.stage{grid-template-rows:auto auto minmax(0,1fr) auto auto}
.scoreboard{grid-row:1;grid-column:1/-1}
.score-meta{display:none}
.score-card{grid-template-rows:auto auto}
.score-value{grid-row:1/3}
.player-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.queue-panel{grid-row:4;grid-column:1/-1;display:flex;align-items:center;min-height:auto;overflow:visible;padding:3px 6px}
.queue-panel h2{font-size:1rem;white-space:nowrap;flex-shrink:0;font-weight:500}
#queue-viewport{position:relative;flex:1;min-width:0;overflow:visible}
#bonus-queue{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;list-style:none;margin:0;padding:3px;position:relative}
#bonus-queue li{display:inline-flex;align-items:center;justify-content:flex-start;min-width:0;max-width:100%;gap:4px;padding:0;border:0;font-size:1rem}
.queue-arrow{flex:none}
#bonus-queue li.active{background:transparent;font-weight:400}
.queue-player-name{display:block;padding:3px 4px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.queue-stats{font-size:1rem}
#queue-highlight{position:absolute;left:0;top:0;border:2px solid var(--accent);border-radius:3px;pointer-events:none;transition:transform .18s ease,width .18s ease,height .18s ease;will-change:transform}
.question-panel{grid-row:3;grid-column:1/11}
.controls-panel{grid-row:4;grid-column:1/-1;padding:4px}
.controls-panel .answering{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.answer-buttons{max-width:none;width:100%}
.answer-buttons button{font-size:1.1rem;min-height:38px;padding:6px}
.reader-answer-panel{grid-row:5;grid-column:1/-1;display:flex;flex-direction:column;gap:4px;max-height:20dvh;overflow:auto;border-top:2px dashed var(--line)}
.answer-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0}
.answer-label{font-size:1rem}
.reader-answer-content{min-width:0;overflow:auto}
#answer-block{max-height:20dvh;padding:5px 7px;flex:none;margin:0}
#answer-text{font-size:max(1rem,1.1rem)}
#question-notes{font-size:1rem;margin-top:3px}
#shared-answer{border-top:1px solid var(--line);padding-top:4px;max-height:40%;overflow:auto;flex-shrink:0;font-size:1.1rem}
#shared-answer-text{display:inline}
#shared-answer>strong{margin-right:.5rem}
#reveal-answer{align-self:auto;font-size:1rem}
#tiebreakers{grid-row:3;grid-column:6/11}
#positions-panel,#journal{grid-row:3;grid-column:1/11}
body[data-workspace=tiebreakers] .question-panel{grid-column:1/6}
.positions-table th,.positions-table td{font-size:1rem;padding:6px;text-align:left}
.positions-table th:first-child{width:5rem}
.positions-table .points{text-align:right}
#qualification-details{margin-top:.6rem}
.language-caption{font-size:1rem}
.settings-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.player-editor th{overflow-wrap:anywhere}
@media(max-width:950px){.topbar .status{max-width:9rem}.language-caption{display:none}}
@media(max-width:1100px){.topbar #match-context{order:1;flex-basis:100%}}
@media(max-width:700px){.topbar .brand{max-width:22vw}.topbar .status{max-width:8rem}.question-panel{grid-column:1/10}#tiebreakers{grid-column:5/10}body[data-workspace=tiebreakers] .question-panel{grid-column:1/5}#positions-panel,#journal{grid-column:1/10}.queue-panel h2{display:none}#bonus-queue li{gap:2px;padding:0 1px}.queue-player-name{padding:3px}.queue-stats{font-size:1rem}}
@media(orientation:landscape) and (max-height:500px){
 body{--gap:3px}
 .topbar{min-height:32px;gap:4px;padding:2px 4px}
 .topbar .brand{max-width:15vw}
 .topbar .status{max-width:10vw}
 .top-actions{gap:3px}.top-actions button{min-height:28px;padding:2px 5px}
 #review-open,#share-open{display:none}
 #workspace-select{display:block;font-size:1rem;padding:2px;width:8rem}
 .workspace-tabs{display:none}
 .scoreboard>.panel-title,.seat-label{display:none}
 .score-card{grid-template-rows:1fr;padding:1px 5px}
 .player-name,.score-value{grid-row:1}
 .score-value{font-size:1.6rem}
 .score-cards.many-players .score-value{font-size:1.25rem}
 .queue-panel{padding:1px 3px}
 #bonus-queue{padding:2px}
 .queue-player-name{padding:2px 4px}
 .question-panel .panel-title{gap:3px;margin:0}
 .language-label select{font-size:1rem;max-width:7rem}
 .question-text{font-size:1rem;line-height:1.25}
 .answer-buttons button{font-size:1rem;min-height:32px;padding:4px}
 .controls-panel{padding:2px}
 .reader-answer-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px}
 #answer-block{padding:3px 5px;max-height:16dvh}
 .answer-heading{display:contents}
 .answer-heading>.answer-label{display:none}
 .answer-heading>.button-row{grid-column:2;grid-row:1;gap:3px}
 .reader-answer-content{grid-column:1;grid-row:1;max-height:calc(16dvh - 8px)}
 .answer-heading button{min-height:30px;padding:3px 5px;font-size:1rem}
 #question-notes:empty{display:none}
 .tb-round .tb-cell>.read-cell{font-size:1rem;min-height:24px;padding:1px}
 .tb-read-label{display:none}.tb-result-label{display:inline}
 .tb-round td,.tb-round th{font-size:1rem;padding:1px}
 #tb-round-tabs button,#tb-add-open{font-size:1rem;min-height:26px;padding:1px 3px}
}
@media(orientation:landscape) and (min-width:600px) and (max-width:700px){.settings-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(orientation:portrait) and (max-width:700px){
 .topbar{flex-wrap:wrap}
 .topbar .brand{max-width:45vw}
 .topbar .status{max-width:45vw}
 .top-actions{width:100%;justify-content:flex-end}
 .top-actions button{padding:3px 6px;min-height:30px}
 .stage{grid-template-rows:auto auto minmax(0,1fr) auto auto}
 
 
 .queue-player-name{max-width:100%;padding:2px}
 .queue-stats{color:var(--muted)}
 .controls-panel{display:block}
 #answer-block{max-height:22dvh}
 .answer-heading{flex-wrap:wrap}
 .question-panel{grid-column:1/10}
 #tiebreakers{grid-column:1/10}
 .positions-table th,.positions-table td{padding:4px}
}
@media(prefers-reduced-motion:reduce){#queue-highlight{transition:none}}

/* Live statistics share the right side; the question keeps the main workspace. */
.stage{grid-template-rows:auto minmax(0,1fr) minmax(0,1fr) auto auto auto}
.scoreboard{grid-column:1/9;grid-row:1}
.queue-panel{grid-column:1/7;grid-row:4}
#timer{font-size:1.75rem;min-width:3.4ch;text-align:right}
.question-panel{grid-column:1/9;grid-row:2/4}
.controls-panel{grid-column:1/9;grid-row:5}
.reader-answer-panel{grid-row:6;grid-column:1/-1}
#positions-panel{grid-column:9/11;grid-row:1/4}
#seats-panel{grid-column:11/-1;grid-row:1/4}
#overview-panel{grid-column:9/-1;grid-row:4/6;display:flex;flex-direction:column;gap:3px}
.stats-panel h2,#overview-panel h2{margin-bottom:3px;flex-shrink:0}
.stats-panel table{table-layout:fixed;font-variant-numeric:tabular-nums}
.stats-panel th,.stats-panel td{font-size:1rem;padding:4px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stats-panel .table-player{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.positions-table th:first-child{width:2.5rem}
.positions-table th:last-child{width:2rem}
.positions-table .points{text-align:right}
.seats-table th:first-child{width:2.5rem}
.seats-table th:nth-child(3),.seats-table th:nth-child(4){width:2.1rem}
.seats-table th:last-child{width:1.7rem}
.seats-table th:nth-child(n+3),.seats-table td:nth-child(n+3){text-align:right}
#qualification-details{margin-top:5px}
#qualification-details summary{overflow-wrap:anywhere}
.standings-row{gap:3px;padding:4px 0;flex-wrap:wrap}
.standings-row .place{width:auto}
.needed{padding:3px 0;overflow-wrap:anywhere}
#finish-note{overflow-wrap:anywhere}
#overview-grid{flex:1;min-height:0}
.overview-table{width:100%;table-layout:auto;border-collapse:collapse;font-variant-numeric:tabular-nums}
.overview-table th,.overview-table td{padding:3px 2px;text-align:center;border-bottom:1px solid var(--line)}
.overview-table th:first-child{width:2.5rem;text-align:left}
.overview-table th:not(:first-child){border-left:1px solid var(--line)}
.overview-table td{border-left:1px solid var(--line)}
.round-dots{display:flex;align-items:center;justify-content:center;gap:4px;min-height:1rem}
.question-dot{display:inline-block;width:10px;height:10px;flex-shrink:0;border-radius:50%;border:1px solid var(--muted);background:transparent;vertical-align:middle}
.question-dot.direct{background:#287e36;border-color:#287e36}
.question-dot.bonus{background:#3169bb;border:2px solid #3169bb;box-shadow:inset 0 0 0 1px var(--panel)}
.question-dot.unanswered{background:var(--muted);border-radius:1px;transform:rotate(45deg);width:8px;height:8px;margin:1px}
.question-dot.current,.question-dot.active{outline:2px solid var(--accent);outline-offset:2px}
.stopwatch{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:2.25rem;min-height:2.25rem;padding:4px;margin:0 2px}
.stopwatch svg{width:1.5rem;height:1.5rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.stopwatch[aria-pressed=true]{background:var(--selected);border:2px solid var(--accent)}
#question-text>p:last-child,#question-text>div:last-child{display:inline}
#question-body{display:block}
#tiebreakers{grid-column:4/9;grid-row:2/4}
body[data-workspace=tiebreakers] .question-panel{grid-column:1/4}
#journal{display:flex;flex-direction:column;gap:4px}
#journal .section-title{margin:0}
#journal-list{min-height:0;flex:1}
.settings-tabs{display:flex;flex-wrap:wrap}
.settings-tabs button{flex:1 0 calc(25% - 4px)}
#server-skins{border-top:1px solid var(--line);margin-top:12px;padding-top:8px}
#server-skins a{color:var(--accent)}
@media(max-width:1150px) and (orientation:landscape){
 .scoreboard{grid-column:1/7}.queue-panel{grid-column:1/5}
 .question-panel{grid-column:1/7}.controls-panel{grid-column:1/7}
 #positions-panel{grid-column:7/9}#seats-panel{grid-column:9/-1}#overview-panel{grid-column:7/-1}
 #tiebreakers{grid-column:1/7}body[data-workspace=tiebreakers] .question-panel{display:none}
 .queue-panel h2{display:none}.queue-stats{display:none}
 .question-panel .panel-title{flex-wrap:nowrap}
 #question-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .question-content{gap:4px}.question-content>.media{max-width:30%}
 .stats-panel{padding:4px}.stats-panel th,.stats-panel td{padding:2px 1px}
 .positions-table th:first-child{width:2.25rem}.positions-table th:last-child{width:1.8rem}
}
@media(orientation:landscape) and (max-height:500px){
 .stats-panel th,.stats-panel td,.overview-table th,.overview-table td{padding:1px}
 .stats-panel h2,#overview-panel h2{margin-bottom:1px}
 #positions-panel,#seats-panel,#overview-panel{padding:3px}
 .round-dots{gap:3px}.question-dot{width:8px;height:8px}
 .question-dot.unanswered{width:6px;height:6px}
 .stopwatch{width:1.875rem;min-height:1.875rem;padding:3px}
 .stopwatch svg{width:1.25rem;height:1.25rem}
 #tiebreakers{grid-row:1/6}
 body[data-workspace=tiebreakers] .question-panel,body[data-workspace=tiebreakers] .scoreboard,body[data-workspace=tiebreakers] .queue-panel,body[data-workspace=tiebreakers] .timer-panel{display:none}
 body[data-workspace=tiebreakers] .controls-panel{grid-row:5;z-index:1}
 body[data-workspace=tiebreakers] #tiebreakers{grid-row:1/5}
}
@media(orientation:portrait) and (max-width:700px){
 .stage{grid-template-rows:auto auto minmax(80px,1fr) auto auto auto auto}
 .scoreboard{grid-column:1/-1;grid-row:1}.queue-panel{grid-column:1/10;grid-row:3}
 #timer{font-size:1.5rem;min-width:3.4ch}
 .question-panel{grid-column:1/-1;grid-row:2}
 #positions-panel{grid-column:1/6;grid-row:4}#seats-panel{grid-column:6/-1;grid-row:4}
 #overview-panel{grid-column:1/-1;grid-row:5}
 .controls-panel{grid-column:1/-1;grid-row:6}.reader-answer-panel{grid-column:1/-1;grid-row:7}
 .stats-panel th,.stats-panel td,.overview-table th,.overview-table td{padding:1px}
 .stats-panel{padding:3px}.stats-panel h2,#overview-panel h2{margin-bottom:1px}
 .queue-stats{display:none}
 .question-panel .panel-title{flex-wrap:wrap}
 body[data-workspace=tiebreakers] .question-panel{display:none}
 #tiebreakers{grid-column:1/-1;grid-row:2}
}

/* Setup controls and keyed rows share the same preview and gameplay surface. */
body:not(.has-match) #undo,body:not(.has-match) #redo,body:not(.has-match) #finish-open,body:not(.has-match) #review-open{display:none}
body.setup-preview #review-banner{display:none}



.queue-player-name{padding:3px 5px;border-radius:2px}


#queue-viewport.queue-moving #queue-highlight{transition:none}
#queue-highlight{z-index:3}
#queue-highlight[data-result]{border-width:4px;border-color:var(--queue-result-colour);box-shadow:0 0 0 1px color-mix(in srgb,var(--queue-result-colour) 65%,var(--ink));transition:none}
.match-context-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:1 1 18rem;min-width:0;max-width:100%}
.topbar .match-context-row #match-context{flex:0 1 auto;order:0}
#system-time{flex:none;min-width:8ch;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:1rem}
@media(max-width:1100px){.topbar .match-context-row{order:1;flex-basis:100%}}
.positions-table th:first-child{width:2.1rem}
.positions-table th:nth-child(3),.positions-table th:nth-child(4){width:2rem}
.positions-table th:last-child{width:1.6rem}
.positions-table th:nth-child(n+3){text-align:right}
.positions-table tbody tr{position:relative;background:var(--panel)}
.question-dot.bonus{display:inline-flex;align-items:center;justify-content:center;min-width:1.125rem;width:auto;height:1.125rem;font-size:1rem;line-height:1;border:1px solid currentColor;border-radius:3px;box-shadow:none;padding:0 1px;background:var(--selected);color:var(--ink)}
.question-dot.direct{border:1px solid var(--muted)}
.question-dot.unanswered{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1.125rem;margin:0;transform:none;background:none;border:0;border-radius:0;font-size:1rem;font-weight:600;line-height:1;color:var(--ink)}
.round-dots{min-height:1.25rem}
#question-label{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
input[type=color]{width:3rem;height:2rem;padding:2px;cursor:pointer}
#desk{container-type:inline-size}
@media(orientation:landscape){
 @container(max-width:1150px){
  .scoreboard{grid-column:1/7}.queue-panel{grid-column:1/5}.question-panel{grid-column:1/7}.controls-panel{grid-column:1/7}
  #positions-panel{grid-column:7/10}#seats-panel{grid-column:10/-1}#overview-panel{grid-column:7/-1}
  #tiebreakers{grid-column:1/7}body[data-workspace=tiebreakers] .question-panel{display:none}
 }
}
@media(max-width:1150px) and (orientation:landscape){
 #positions-panel{grid-column:7/10}#seats-panel{grid-column:10/-1}
 .positions-table th:first-child{width:2rem}.positions-table th:nth-child(3){width:1.8rem}.positions-table th:nth-child(4){width:1.9rem}.positions-table th:last-child{width:1.5rem}
 .seats-table th:first-child{width:2.2rem}.seats-table th:nth-child(3){width:1.8rem}.seats-table th:nth-child(4){width:1.9rem}.seats-table th:last-child{width:1.5rem}
}
@media(orientation:portrait) and (max-width:700px){
 #positions-panel{grid-column:1/7}#seats-panel{grid-column:7/-1}
 #bonus-queue li{flex-direction:row;padding:0}
 .positions-table th:first-child{width:2rem}.positions-table th:nth-child(3){width:1.8rem}.positions-table th:nth-child(4){width:1.9rem}.positions-table th:last-child{width:1.5rem}
 .seats-table th:first-child{width:2.2rem}.seats-table th:nth-child(3){width:1.8rem}.seats-table th:nth-child(4){width:1.9rem}.seats-table th:last-child{width:1.5rem}
}
/* Settings overlays gameplay, preserving the main layout while drafts update. */
#app{position:relative}
body.settings-open .settings{position:absolute;inset:0 0 0 auto;width:min(980px,92%);max-width:100%;z-index:10;border-left:1px solid var(--line);box-shadow:-3px 0 8px #0002;padding:10px;gap:8px}
.queue-player-name{background:transparent;color:var(--ink)}
.seats-table th:first-child{width:2.2rem}
.seats-table th:nth-child(2){width:2rem}
.seats-table th:nth-child(3){width:auto;text-align:left}
.seats-table td:nth-child(3){text-align:left}
.seats-table th:nth-child(4){width:1.8rem}
.seats-table th:nth-child(5){width:1.9rem}
.seats-table th:last-child{width:1.5rem}
.seats-table th:nth-child(n+4),.seats-table td:nth-child(n+4){text-align:right}
.question-dot.direct,.question-dot.bonus,.question-dot.unanswered{display:inline-flex;align-items:center;justify-content:center;min-width:1.125rem;width:auto;height:1.125rem;padding:0;border:1px solid transparent;border-radius:50%;font:1rem/1 var(--font),sans-serif;box-shadow:none;transform:none;margin:0}
.question-dot.unanswered{background:transparent;color:var(--ink);border-color:var(--muted)}
.question-dot.unanswered{position:relative;color:transparent}
.question-dot.unanswered::before,.question-dot.unanswered::after{content:"";position:absolute;left:50%;top:50%;width:70%;height:.08em;border-radius:1px;background:var(--ink);pointer-events:none;transform:translate(-50%,-50%) rotate(45deg)}
.question-dot.unanswered::after{transform:translate(-50%,-50%) rotate(-45deg)}
.question-dot.current,.question-dot.active{outline-width:1px;outline-offset:1px}
.score-flight{position:fixed;z-index:9;pointer-events:none;padding:.08em .18em;border-radius:.18em;background:var(--flight-background,var(--panel));color:var(--flight-ink,var(--ink));font:800 clamp(3.5rem,8vw,7rem)/1 var(--font),sans-serif;box-shadow:0 3px 14px #0003;will-change:transform,opacity}
@media(min-width:800px){.settings .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){body.settings-open .settings{inset:0;width:100%;padding:6px;gap:5px}}
@media(orientation:landscape) and (max-height:500px){.stage{grid-template-rows:auto auto minmax(0,.4fr) minmax(0,.6fr) auto auto}.stats-panel h2,#overview-panel h2{line-height:1}#overview-panel{gap:0}.question-dot.direct,.question-dot.bonus,.question-dot.unanswered{min-width:1rem;height:1rem}.round-dots{gap:1px}.overview-table th:first-child{width:2rem}}
/* Give Seats room for its extra rank column while keeping the question area. */
.stage{grid-template-columns:repeat(8,minmax(0,1fr)) repeat(2,minmax(0,.88fr)) repeat(2,minmax(0,1.12fr))}
.seats-table th:first-child{width:2.5rem}
.seats-table th:nth-child(4){width:2rem}
.seats-table th:nth-child(5){width:2.2rem}
.seats-table th:last-child{width:1.75rem}
@media(orientation:landscape){@container(max-width:1150px){.stage{grid-template-columns:repeat(6,minmax(0,1fr)) repeat(3,minmax(0,.88fr)) repeat(3,minmax(0,1.12fr))}}}
@media(orientation:portrait) and (max-width:700px){.stage{grid-template-columns:repeat(6,minmax(0,.88fr)) repeat(6,minmax(0,1.12fr))}}
@media(orientation:landscape) and (max-height:500px),(orientation:portrait) and (max-width:700px){
 .seats-table th:first-child{width:2.1rem}.seats-table th:nth-child(2){width:1.7rem}.seats-table th:nth-child(4){width:1.7rem}.seats-table th:nth-child(5){width:1.9rem}.seats-table th:last-child{width:1.4rem}
}
.tb-round .tb-cell{display:flex;flex-direction:column;gap:2px;min-width:0;padding:0}
.tb-round .tb-cell>.read-cell{position:static;width:100%;min-height:26px;padding:2px;border:1px solid var(--line);color:var(--ink);background:var(--field);font-size:1rem;line-height:1.1;text-align:center;white-space:normal}
.tb-round th .read-cell{display:block;width:100%;padding:2px;min-height:26px;font-size:1rem;line-height:1.1;white-space:normal}
.tb-response{font-size:1rem;text-align:center;color:var(--muted)}
.tb-player{display:block;max-width:100%;padding:2px;min-height:24px;line-height:1.1;border:0;background:transparent;color:var(--ink);font-size:1rem;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb-phase-status{margin:3px 0;font-size:1rem;color:var(--muted)}
.tb-winner-label{display:inline;font-weight:600;color:var(--ink);white-space:normal}
.tb-round.nearest .tb-winner .tb-player{display:inline-block;max-width:calc(100% - 7rem);vertical-align:middle;margin-right:4px}
.tb-round.nearest table{width:100%;table-layout:fixed}.tb-round.nearest th:first-child{width:42%}.tb-round.nearest th:nth-child(2){width:32%}.tb-round.nearest th:last-child{width:26%}
.tb-round.nearest td{min-width:0;overflow-wrap:anywhere}.tb-round.nearest .table-scroll{overflow-x:hidden}.tb-round.nearest input{min-width:0;max-width:100%;width:8rem}.tb-round.nearest .round-heading{flex-wrap:wrap}
@media(orientation:landscape) and (max-height:500px){#tb-need{display:block;max-height:2.5rem;overflow:auto}.tb-round .tb-cell>.read-cell{min-height:24px;padding:1px}.tb-response{line-height:1}.tb-phase-status{margin:1px 0}.tb-round td,.tb-round th{padding:1px}.tb-round.nearest input{min-height:0;height:1.65rem;padding:2px;line-height:1.1}}
@media(orientation:landscape) and (max-height:500px){body[data-workspace=tiebreakers] #tiebreakers,body[data-workspace=tiebreakers] .controls-panel{grid-column:1/-1}body[data-workspace=tiebreakers] #positions-panel,body[data-workspace=tiebreakers] #seats-panel,body[data-workspace=tiebreakers] #overview-panel{display:none}}
@media(orientation:landscape) and (max-height:500px){.tb-phase-status,#tb-need{line-height:1.125}}
/* Scoring controls fill the editable panel, with generous default targets. */
.controls-panel{align-items:stretch;min-height:88px}
.answer-buttons{align-self:stretch;align-items:stretch;min-height:76px}
.answer-buttons button{min-height:0;height:auto;transition:opacity .12s ease}
.answer-buttons .correct:hover{background:#c6e6c6}
.answer-buttons .pass:hover{background:#e0e0e0}
.answer-buttons .wrong:hover{background:#f0c7c7}
.answer-buttons .kill:hover{background:#ddd0e8}
.answer-buttons button:not(:disabled):hover{opacity:.9}
.answer-icon{display:inline-block;vertical-align:middle}
.save-server[data-pending=true]::after{content:'…'}
.custom-layout .controls-panel,.custom-layout .answer-buttons{min-height:0}
.custom-layout .stage>.controls-panel{display:flex;flex-direction:row;overflow:hidden}
.custom-layout .answer-buttons{flex:1}
.question-dot,.question-dot.direct,.question-dot.bonus,.question-dot.unanswered{--dot-size:var(--overview-dot-size,1.125rem);display:inline-flex;align-items:center;justify-content:center;flex:0 0 var(--dot-size);width:var(--dot-size);min-width:var(--dot-size);height:var(--dot-size);min-height:var(--dot-size);padding:0;margin:0;border-radius:50%;font:1rem/1 var(--font),sans-serif}
.question-dot:not(.direct):not(.bonus):not(.unanswered){border-color:color-mix(in srgb,var(--muted) 35%,transparent)}
#new-match{margin-left:auto}
body:not(.has-match) #replay-start{display:none}
.panel-colours input[type=color]{height:2.5rem;width:100%;padding:2px}
#spares-dialog{width:min(440px,94vw)}
#spare-buttons{display:flex;flex-wrap:wrap;gap:8px}
#spare-buttons button{min-width:2.75rem;min-height:2.75rem}
@media(orientation:landscape) and (max-height:500px){
 .controls-panel{min-height:70px}.answer-buttons{min-height:64px}
 .question-dot,.question-dot.direct,.question-dot.bonus,.question-dot.unanswered{--dot-size:var(--overview-dot-size,1rem)}
 .topbar .brand{max-width:10vw}.topbar .status{max-width:12vw}
 .topbar .save-label{display:none}
 body[data-workspace=tiebreakers].numeric-tiebreaker .controls-panel{display:none}
 body[data-workspace=tiebreakers].numeric-tiebreaker #tiebreakers{grid-row:1/6}
}
@media(prefers-reduced-motion:reduce){.answer-buttons button{transition:none}}
@media(orientation:portrait) and (max-width:700px){#overview-grid{min-height:min(calc((var(--overview-rows,4) + 1)*1.45rem),24dvh)}}
/* A fixed, snapped fifth of the stage keeps the screen-sharing boundary steady. */
.stage{grid-template-rows:auto minmax(0,1fr) minmax(0,1fr) auto auto 20%;overflow-y:auto}
#answer-block{height:100%;max-height:none;min-height:0;overflow:hidden;border-top:2px solid var(--answer-border,#c62828)}
.reader-answer-content{display:flex;flex-direction:column;flex:1;min-height:0;max-height:none;overflow:auto;text-align:center;overflow-wrap:anywhere}
.answer-content-inner{flex:0 0 auto;width:100%;margin-block:auto}
.answer-placeholder{font:1rem/1.1 var(--font),sans-serif}
.answer-placeholder>strong{display:block}
.answer-placeholder>div{margin-top:2px}
.answer-waiting :is(#read-answer,#reveal-answer,#next-question){display:none}
#question-start{display:flex;flex:1;flex-direction:column;gap:10px;align-items:center;justify-content:center}
.first-question-tips{max-width:48ch;font-size:1rem;text-align:left}
.first-question-tips p{margin:4px 0}
:root{--question-font-default:clamp(1rem,2.5vh,22px)}
#question-text,#media-question{font-size:var(--question-font-size,var(--question-font-default))}
#answer-text,#shared-answer-text,#media-answer{font-size:var(--answer-font-size,var(--question-font-default))}
.question-slide-surface>.panel-title{flex-wrap:nowrap;align-items:flex-start}
.top-actions .cog{display:inline-flex;align-items:center;gap:4px}
.settings-label{font-size:1rem}.settings-icon{font-size:1.4375rem;line-height:1}
#question-label{flex:1;min-width:0}
#question-label .question-total{font-weight:400}
:is(#question-font-controls,#queue-font-controls,#answer-font-controls){display:inline-flex;flex:0 0 auto;align-items:center;border:1px solid var(--line);border-radius:var(--radius);background:var(--field);color:var(--ink);white-space:nowrap}
:is(#question-font-controls,#queue-font-controls,#answer-font-controls) button{font-size:1rem;line-height:1.1;padding:2px 4px;min-height:1.75rem;min-width:1.75rem;border:0}
:is(#question-font-controls,#queue-font-controls,#answer-font-controls) .font-size-reset{min-width:3.75rem;border-inline:1px solid var(--line);border-radius:0;font-variant-numeric:tabular-nums}
@media(max-width:700px){:root{--question-font-default:1rem}}
.tb-toolbar{flex-wrap:wrap}
#tb-need{flex:1 1 12rem;min-width:0}
@media(orientation:landscape) and (max-height:500px){
 .stage{grid-template-rows:auto minmax(0,.4fr) minmax(0,.6fr) auto auto 20%}
 #answer-block{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}
 .reader-answer-content{height:100%;max-height:none}
 #tiebreakers{padding:2px}#tb-round-tabs button,#tb-add-open{min-height:24px}
 #positions-panel,#seats-panel,#overview-panel{padding:2px}
 .stats-panel th,.stats-panel td,.overview-table th,.overview-table td{line-height:1.1}
}
@media(orientation:portrait) and (max-width:700px){
 .top-actions{flex-wrap:wrap}
 .stage{grid-template-rows:max-content minmax(120px,1fr) max-content max-content 20% max-content max-content;overflow-y:auto}
 .controls-panel{grid-row:4}.reader-answer-panel{grid-row:5}
 #positions-panel,#seats-panel{grid-row:6}#overview-panel{grid-row:7}
}
@media print{body{height:auto;overflow:visible;background:white;color:black}.topbar,.settings,.workspace-tabs,.controls-panel,.timer-panel,#review-banner,.panel-handle,#question-font-controls{display:none!important}#app,#desk,.stage{display:block;overflow:visible}.stage>[data-panel]{position:static!important;width:auto!important;height:auto!important;margin-bottom:8px}.panel{border-color:#888;background:white;color:black}.question-content{overflow:visible}}

/* Keep the reader controls with the question and give shared content one scroll area. */
button:disabled,input:disabled,select:disabled{cursor:not-allowed}
.queue-panel{grid-column:1/9}
.question-scroll{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
.question-content{flex:none;max-height:none;overflow:visible}
#shared-answer{flex:none;max-height:none;overflow:visible}
.stopwatch,#read-question,#read-answer{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:2.25rem;min-height:2.25rem;min-width:2.25rem;padding:4px 6px;font-size:1.25rem;line-height:1;vertical-align:middle}
.stopwatch{width:auto}
.stopwatch svg{flex:none;width:1.25rem;height:1.25rem}
.stopwatch #timer,.stopwatch output{font-size:1rem;line-height:1.2;min-width:3ch;font-variant-numeric:tabular-nums;letter-spacing:0}
#read-question,#read-answer{width:2.25rem}
#read-question>span,#read-answer>span{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;line-height:1}
#question-font-open,#question-font-controls{margin-left:auto}
#question-font-open,#answer-font-open{flex:none;padding:2px 5px;min-height:1.75rem;border-color:transparent;background:transparent;font-size:1rem;line-height:1.2}
#question-font-open:hover,#answer-font-open:hover{background:var(--selected)}
.queue-panel{position:relative}
#queue-viewport{padding-inline:2.25rem}
#bonus-queue,#bonus-queue li{font-size:var(--queue-font-size,1rem)}
.queue-font-tools{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:2rem;min-height:1.75rem;z-index:5}
#queue-font-open{width:100%;padding:2px 5px;min-height:1.75rem;border-color:transparent;background:transparent;font-size:1rem;line-height:1.2;opacity:0}
#queue-font-open:hover,#queue-font-open:focus-visible{opacity:1;background:var(--selected)}
#queue-font-controls{position:absolute;right:0;top:50%;transform:translateY(-50%)}
@media print{.queue-font-tools{display:none!important}#queue-viewport{padding-inline:0}}
#score-cards .score-card{display:flex;align-items:center;justify-content:space-between;gap:4px}
.player-info{display:flex;flex-direction:column;min-width:0;flex:1}
#score-cards .seat-label{display:block;font-size:1rem;font-weight:400;line-height:1.1}
.score-total{display:flex;align-items:baseline;gap:4px;flex:none;white-space:nowrap}
#score-cards .score-value{font-size:2rem;line-height:1}
.score-bonus{font-size:1rem;line-height:1.1}
.stats-panel .positions-table,.stats-panel .seats-table{width:100%;table-layout:auto}
.stats-panel th,.stats-panel td{padding-inline:1px;text-align:right;white-space:nowrap;overflow:visible;text-overflow:clip}
.stats-panel th:not(:nth-child(2)),.stats-panel td:not(:nth-child(2)){width:1%}
.stats-panel th:first-child,.stats-panel td:first-child{text-align:left;padding-right:4px}
.stats-panel th:nth-child(2),.stats-panel .table-player{width:100%;max-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis}
#standings,#seats-table{max-width:100%;overflow-x:auto}
.positions-table tr.cut-after>td{box-shadow:inset 0 -2px var(--ink)}
.cut-points-list{display:flex;align-items:center;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:4px 0}
.cut-points-list label{display:inline-flex;align-items:center;gap:3px}
.cut-points-list input{margin:0;cursor:pointer}
#shortcut-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#shortcut-fields label{min-width:0}#shortcut-fields input{width:100%;cursor:pointer}
.expandable-media{cursor:zoom-in}
#media-dialog{position:fixed;left:8px;width:calc(100% - 16px);max-width:none;max-height:none;margin:0;padding:8px;overflow:hidden}
#media-dialog[open]{display:flex}
#media-close{position:absolute;top:4px;right:4px;z-index:1}
.media-dialog-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:12px;min-width:0;min-height:0;width:100%;height:100%;padding-right:2.25rem;overflow:hidden}
.media-dialog-text{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;overflow:hidden}
#media-question,#media-answer{min-height:0;overflow:hidden;overflow-wrap:anywhere}
#media-timer{align-self:flex-start;flex-shrink:0;margin:0}
#media-large{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:hidden}
#media-large img,#media-large video{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
#media-large audio{width:100%;max-width:100%;max-height:100%}
#promotion-dialog{width:min(600px,94vw);max-height:85dvh;overflow:auto}
#promotion-content img{max-width:100%;height:auto}
#promotion-content section+section{margin-top:1rem;border-top:1px solid var(--line);padding-top:1rem}
@media(orientation:landscape){@container(max-width:1150px){.queue-panel{grid-column:1/7}}}
@media(max-width:1150px) and (orientation:landscape){.queue-panel{grid-column:1/7}}
@media(orientation:portrait) and (max-width:700px){.queue-panel,.question-panel{grid-column:1/-1}.stats-panel th,.stats-panel td{padding:1px}#shortcut-fields{grid-template-columns:1fr}}
@media print{#question-font-open,#answer-font-open,#answer-font-controls,#timer-toggle,#read-question,#read-answer{display:none!important}.question-scroll{overflow:visible}}
@media(orientation:landscape){.stage{grid-template-columns:repeat(8,minmax(0,1fr)) repeat(4,minmax(0,1.5fr))}@container(max-width:1150px){.stage{grid-template-columns:repeat(12,minmax(0,1fr))}}}
@media(orientation:landscape) and (max-height:500px){.round-dots{min-height:1rem}.overview-table th,.overview-table td{padding-block:0}}
@media(orientation:portrait) and (max-width:480px){.stage{grid-template-rows:max-content minmax(120px,1fr) max-content max-content 20% max-content max-content max-content}#positions-panel{grid-column:1/-1;grid-row:6}#seats-panel{grid-column:1/-1;grid-row:7}#overview-panel{grid-column:1/-1;grid-row:8}}
@media(orientation:landscape){@container(max-width:900px){.stage{grid-template-columns:repeat(6,minmax(0,.8fr)) repeat(6,minmax(0,1.2fr))}#score-cards .score-card{flex-direction:column;align-items:stretch;gap:1px}.player-info{width:100%}#score-cards .player-name{line-height:1.1}.score-total{justify-content:flex-start}}}
@media(orientation:landscape) and (max-height:500px){#overview-panel{padding-block:1px}#overview-panel h2{margin-bottom:0}}

.voice-test{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0}.voice-test p{margin:0}.voice-test button{flex:none}
@media(orientation:landscape){
 body:not(.custom-layout) .stage.many-players{grid-template-rows:max-content minmax(60px,1fr) minmax(60px,1fr) max-content max-content 20%}
 body:not(.custom-layout) .stage.many-players #positions-panel,body:not(.custom-layout) .stage.many-players #seats-panel,body:not(.custom-layout) .stage.many-players #overview-panel{contain:size}
}

.question-panel{position:relative}
.question-slide-surface{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;gap:4px;position:relative}
.question-slide-snapshot{position:absolute;z-index:2;pointer-events:none;overflow:hidden}

/* Tiebreaker administration stays inside the fixed reader-only Answer panel. */
.player-link{font:inherit;color:inherit;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;vertical-align:baseline}
button.player-link{display:inline;padding:0;min-height:0;border:0;border-radius:0;background:transparent;text-align:inherit;line-height:inherit;cursor:pointer}
button.player-link:hover{text-decoration:underline;text-underline-offset:.15em;background:transparent}
button.player-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.player-name{font-weight:700}
body.tiebreaker-mode .queue-panel,body.tiebreaker-mode .controls-panel{display:none!important}
body.tiebreaker-mode:not(.custom-layout) .question-panel{grid-row:2/6}
#answer-block #tiebreakers{position:static;display:block;flex:0 0 auto;min-width:0;min-height:0;max-height:none;overflow:visible;padding:0;border:0;background:transparent;box-shadow:none;text-align:left}
#answer-block #tiebreakers[hidden],#tb-submit-result[hidden],#tb-update-positions[hidden]{display:none!important}
#tiebreakers .tb-toolbar{display:none}
body.tiebreaker-mode .reader-answer-content{display:block}
body.tiebreaker-mode #answer-block{display:flex;flex-direction:column;gap:3px;padding-block:1px}
body.tiebreaker-mode .answer-heading{display:none}
#tb-player-picker{display:flex;align-items:center;gap:5px;min-width:0;margin-bottom:2px}
#tb-select-label{flex:none;white-space:nowrap}
#tb-player-buttons{display:grid;grid-template-columns:repeat(var(--tb-players,4),minmax(0,1fr));gap:3px;flex:1;min-width:0}
#tb-player-buttons button{min-width:0;padding:3px 2px;min-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem}
#tb-result-row{display:flex;align-items:center;gap:4px;min-width:0;margin-bottom:2px}
#tb-answer-actions{flex:none;min-width:0}#tb-answer-actions .button-row{justify-content:flex-end}
body.tiebreaker-mode .answer-content-inner{flex:none;width:100%;min-width:0;margin:0;max-height:none;overflow:visible;text-align:right}
body.tiebreaker-mode #answer-text{max-height:none;overflow:visible}
body.tiebreaker-mode .answer-content-inner img,body.tiebreaker-mode .answer-content-inner video{max-width:100%;max-height:var(--tb-answer-height,6rem);object-fit:contain}
.tb-reader-grid{display:flex;flex-wrap:wrap;align-items:stretch;gap:4px;min-width:0;width:100%}
.tb-reader-card{display:flex;flex:0 0 5.5rem;flex-direction:column;gap:2px;min-width:0;max-width:100%}
.tb-reader-answer{flex:1 1 10rem;min-width:8rem;max-width:100%;height:var(--tb-answer-height,6rem);max-height:var(--tb-answer-height,6rem);padding:2px 4px;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overflow-wrap:anywhere;text-align:right}
.tb-show{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;padding:0 2px;min-height:34px;line-height:1;font-size:1rem}
.tb-show[aria-pressed=true],#tb-player-buttons button[aria-pressed=true]{background:var(--selected);border-color:var(--accent);outline:2px solid var(--accent);outline-offset:-2px}
.tb-marks{display:flex;gap:2px}.tb-mark{flex:1;min-width:0;min-height:26px;padding:0 2px;font-size:1rem;line-height:1.1}
.tb-mark[aria-pressed=true]{background:var(--selected);outline:1px solid var(--accent);outline-offset:-1px}
.tb-mark[aria-pressed=true][data-result=C]{background:#198038;color:#fff;border-color:#116425;outline-color:#116425}
.tb-mark[aria-pressed=true][data-result=P]{background:#ffd666;color:#241a00;border-color:#997200;outline-color:#997200}
.tb-mark[aria-pressed=true][data-result=W]{background:#be3038;color:#fff;border-color:#92232a;outline-color:#92232a}
.tb-mark[aria-pressed=true]:focus-visible{outline-offset:2px}
.tb-input-open{width:100%;min-height:26px;padding:1px;font-size:1rem;line-height:1.1}
.tb-number-column{display:flex;flex:0 0 7.5rem;flex-direction:column;gap:2px;min-width:0;max-width:100%;margin:0;font-size:1rem;text-align:left}
.tb-number-column>span{display:flex;align-items:center;min-height:34px;line-height:1.05}
.tb-number-column input{display:block;width:100%;min-width:0;max-width:100%;min-height:26px;padding:2px;font-size:1rem;line-height:1.1}
.tb-out-column{flex-basis:5rem}
.tb-out-column output{display:block;min-height:26px;padding:2px;font-size:1rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#tb-status{display:block;flex:1;min-width:0;width:auto;margin:0;min-height:28px;max-height:2.5rem;padding:3px 5px;overflow-y:auto;white-space:normal;text-align:left;line-height:1.2;font-size:1rem;overflow-wrap:anywhere}
#tb-submit-result,#tb-update-positions{flex:0 0 auto;white-space:nowrap;padding:3px 6px;min-height:28px;font-size:1rem}
#tb-mode-choices{display:flex;flex-direction:column;gap:6px;width:100%;margin-top:6px;text-align:left}
#answer-block.tb-choosing>.reader-answer-content>.answer-content-inner{display:none}
#tb-mode-choices>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#tb-mode-choices button{flex:0 0 15.5rem;max-width:100%;padding:4px 6px;font-size:1rem}
#tb-mode-choices span{flex:1 1 18rem;font-size:1rem;line-height:1.2}
#tb-showcase-picker{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:4px}
#tb-showcase-picker .tb-show{flex:0 1 auto;width:auto;min-height:30px;padding:3px 6px;white-space:nowrap}
#tb-showcase-answer{height:var(--tb-answer-height,6rem);overflow:auto;scrollbar-gutter:stable}
body[data-tb-procedure=everyone] #tb-showcase-answer .answer-content-inner{text-align:center}
#tb-end{flex:0 0 auto;min-height:28px;padding:3px 6px;font-size:1rem}
body[data-tb-procedure=everyone] #tb-result-row{justify-content:flex-end}
#tb-needed-dialog{width:min(360px,94vw)}#tb-needed-dialog h2{font-size:1.125rem}#tb-show-last-answer{width:100%;margin-top:4px}
@media(orientation:portrait) and (max-width:700px){
 body.tiebreaker-mode:not(.custom-layout) .question-panel{grid-row:2/5}
 #tb-result-row{display:grid;grid-template-columns:max-content max-content minmax(0,1fr)}
 #tb-status{grid-row:1;grid-column:1/-1}
 #tb-update-positions{grid-row:2;grid-column:1;width:6rem;white-space:normal}
 #tb-submit-result{grid-row:2;grid-column:2;width:5rem;white-space:normal}
 #tb-answer-actions{grid-row:2;grid-column:3;justify-self:end;max-width:100%}
 #tb-answer-actions #reveal-answer{max-width:5.5rem;white-space:normal}
 #tb-end{grid-row:3;grid-column:1/-1;justify-self:start}
 body[data-tb-procedure=everyone] #tb-result-row{display:flex}
}
