/* Component-only polish. Data queries, canvas exports and ranking presentation geometry are unchanged. */
.creator-tools, .gfx, .rankings-page, .lab-rundown { --tool-line:var(--border,#d1d5db); --tool-soft:var(--surface-2,#f3f4f6); --tool-ink:var(--text,#111); --tool-accent:var(--brand,#38618c); }
.creator-tools .creator-heading { margin-bottom:22px; }
.creator-tools .creator-heading h1 { margin:6px 0 10px; letter-spacing:-.02em; }
.creator-tools .creator-heading p { max-width:72ch; line-height:1.55; }
.creator-tools .creator-tool-grid { gap:18px; }
.creator-tools .creator-tool-grid>a { padding:24px; border-radius:12px; min-height:190px; box-sizing:border-box; }
.creator-tools .creator-tool-grid p { margin:0 0 18px; }
.creator-tools .creator-tool-grid h2 { line-height:1.15; margin-bottom:12px; }
.creator-tools .creator-open { align-self:flex-start; padding:8px 0; }
.creator-tools .creator-tool-nav { gap:8px; padding:0 0 16px; margin-bottom:24px; }
.creator-tools .creator-tool-nav a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 12px; border-radius:7px; text-decoration:none; font-size:14px; box-sizing:border-box; }
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form) { border:1px solid var(--tool-line); background:var(--surface,#fff); border-radius:12px; padding:20px; gap:18px; }
.creator-tools .creator-board-rule-grid { margin:20px 0; }
.creator-tools .creator-board-picks { gap:16px; margin:20px 0; }
.creator-tools .creator-board-pick { border-radius:10px; padding:18px; gap:14px; }
.creator-tools :is(.creator-board-field,.creator-research-field,.ba-controls>label,.matchup-picker>label) { font-size:14px; line-height:1.4; gap:7px; }
.creator-tools :is(.creator-board-field>span,.creator-research-field>span,.ba-controls>label>span) { font-weight:650; color:var(--tool-ink); }
.creator-tools :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea), .gfx .gfx-sec :is(input:not([type=checkbox]):not([type=radio]):not([type=range])), .rankings-page .rankings-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=color])), .lab-rundown :is(input:not([type=checkbox]),textarea) { min-height:44px; padding:10px 11px; border:1px solid var(--tool-line); border-radius:6px; font-size:16px; line-height:1.3; color:var(--tool-ink); background:var(--surface,#fff); box-sizing:border-box; }
.creator-tools select, .creator-tools :is(.creator-board-field,.creator-research-field,.creator-board-pick,.matchup-picker,.ba-controls,.creator-blind-form) select, .gfx .gfx-sec select, .rankings-page .rankings-editor select { min-height:44px; padding:0 11px; border:1px solid var(--tool-line); border-radius:6px; font-size:16px; line-height:normal; color:var(--tool-ink); background:var(--surface,#fff); box-sizing:border-box; }
.creator-tools input[type=checkbox], .creator-tools input[type=radio], .gfx input[type=checkbox], .rankings-page input[type=checkbox], .lab-rundown input[type=checkbox] { width:18px; height:18px; flex:none; accent-color:var(--tool-accent); }
.creator-tools :is(button,.btn), .gfx :is(button,.btn), .rankings-page :is(button,.btn), .lab-rundown :is(button,.btn) { min-height:44px; font-size:14px; line-height:1.3; border-radius:6px; padding:10px 12px; white-space:normal; box-sizing:border-box; touch-action:manipulation; }
.creator-tools :is(button,.btn):disabled, .gfx :is(button,.btn):disabled, .rankings-page :is(button,.btn):disabled, .lab-rundown :is(button,.btn):disabled { opacity:.5; cursor:default; }
.creator-tools :is(a,button,input,select,textarea):focus-visible, .gfx :is(a,button,input,select):focus-visible, .rankings-page :is(a,button,input,select):focus-visible, .lab-rundown :is(button,input,textarea):focus-visible { outline:2px solid var(--tool-ink); outline-offset:3px; }
.creator-tools :is(.creator-board-actions,.ba-actions,.matchup-actions) { gap:10px; margin:20px 0; align-items:center; }
.creator-tools :is(.creator-research-controls,.ba-controls)>button[type=submit] { grid-column:1/-1; justify-self:start; min-width:180px; margin-top:4px; }
.creator-tools :is(.creator-board-status,.matchup-status):not(:empty) { line-height:1.55; padding:12px 14px; border-radius:7px; background:var(--tool-soft); margin:16px 0; }
.creator-tools :is(.creator-board-receipt,.ba-definition) { border-radius:7px; line-height:1.55; }
.creator-tools .creator-board-receipt:not(:empty) { padding:18px; }
.creator-tools .creator-board-receipt li { padding:4px 0; font-variant-numeric:tabular-nums; }
.creator-tools .creator-board-saves { display:flex; padding:20px; margin-top:24px; gap:12px; border:1px solid var(--tool-line); border-radius:10px; background:var(--surface,#fff); align-items:center; }
.creator-tools .creator-board-saves>h3 { font-size:18px; margin:0; }
.creator-tools .creator-board-saves>p { line-height:1.55; margin:0 0 2px; }
.creator-tools :is(.creator-episode-list,.creator-output-list) { flex-basis:100%; padding-left:24px; margin:4px 0; }
.creator-tools :is(.creator-episode-list,.creator-output-list)>li { border:1px solid var(--tool-line); border-radius:8px; background:var(--tool-soft); padding:14px; margin:10px 0; line-height:1.5; }
.creator-tools .creator-episode-list { list-style:none; padding-left:0; }
.creator-tools .creator-output-list>li { display:list-item; }
.creator-tools .creator-output-list>li>strong { display:block; margin-bottom:8px; }
.creator-tools .creator-output-list>li>label { display:inline-flex; align-items:center; gap:7px; min-height:44px; margin-right:14px; }
.creator-tools .creator-player-options { top:48px; border-radius:8px; border-color:var(--tool-line); box-shadow:0 8px 24px #0002; }
.creator-tools .creator-player-options button { border-radius:0; min-height:48px; padding:12px; text-align:left; }
.creator-tools .creator-player-picker>span[role=status] { display:block; font-size:12px; line-height:1.4; margin-top:5px; min-height:17px; }
.creator-tools .creator-research { border:0; padding:0; margin:0; }
.creator-tools .creator-research>p:first-of-type { max-width:80ch; line-height:1.55; margin-bottom:20px; }
.creator-tools .creator-research>p[role=alert]:not(:empty) { padding:14px; border:1px solid var(--tool-line); border-left:3px solid var(--tool-accent); border-radius:7px; background:var(--tool-soft); }
.creator-tools .creator-research output { min-height:44px; display:flex; align-items:center; font-size:15px; }
.creator-tools .creator-research table { font-size:14px; font-variant-numeric:tabular-nums; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) { border:1px solid var(--tool-line); border-radius:9px; overflow:auto; margin:18px 0; overscroll-behavior-x:contain; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) th { background:var(--tool-soft); color:var(--tool-ink); line-height:1.4; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) :is(th,td) { padding:13px 12px; }
.creator-tools .matchup-matrix-table { min-width:660px; font-size:14px; }
.creator-tools .matchup-matrix-table :is(td strong,td .matchup-matrix-delta) { font-variant-numeric:tabular-nums; }
.creator-tools .matchup-matrix-table td strong { font-size:18px; }
.creator-tools .matchup-matrix-table td span { font-size:13px; line-height:1.4; }
.creator-tools .matchup-matrix-table th:first-child { position:sticky; left:0; z-index:1; background:var(--surface,#fff); box-shadow:1px 0 var(--tool-line); }
.creator-tools .ba-table table { min-width:530px; font-size:15px; font-variant-numeric:tabular-nums; }
.creator-tools .ba-table tbody th { width:36%; background:var(--surface,#fff); }
.creator-tools .ba-samples { margin:18px 0; gap:14px; }
.creator-tools .ba-samples article { border-radius:10px; padding:16px; border-top:3px solid var(--tool-accent); }
.creator-tools .ba-samples article strong { font-size:17px; }
.creator-tools .ba-samples article p { line-height:1.45; }
.creator-tools .ba-sample-dates { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 6px; font-size:13px; color:var(--muted,#555); }
.creator-tools .ba-sample-dates time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.creator-tools details { margin:16px 0; border-top:1px solid var(--tool-line); padding-top:14px; }
.creator-tools details>summary { cursor:pointer; min-height:36px; font-size:14px; font-weight:650; line-height:1.5; }
.creator-tools .matchup-picker .matchup-matrix-toggle { min-height:44px; gap:10px; }
.creator-tools .matchup-matrix-options { border-radius:8px; gap:8px 14px; padding:14px; }
.creator-tools .matchup-matrix-options legend { padding:0 7px; font-size:14px; font-weight:650; }
.creator-tools .matchup-picker .matchup-matrix-options label { min-height:44px; padding:5px 7px; border-radius:6px; background:var(--tool-soft); font-size:14px; }
.creator-tools .matchup-metric, .creator-tools .matchup-panel { border-radius:10px; padding:18px; }
.creator-tools .matchup-metric h3 { font-size:15px; line-height:1.4; }
.creator-tools .matchup-game-list a { min-height:44px; align-items:center; border-bottom:1px solid var(--tool-line); padding:6px 0; }
.creator-tools .matchup-game-list li:last-child a { border:0; }
.creator-tools .matchup-game-list time { white-space:nowrap; }
/* Maker editor controls only; the canvas retains its native size, crop and export drawing. */
.gfx .gfx-panel { gap:14px; }
.gfx .gfx-sec { border-radius:9px; padding:15px; gap:11px; }
.gfx .gfx-sec h3 { font-size:16px; letter-spacing:.025em; }
.gfx .gfx-sec .field { font-size:14px; line-height:1.4; gap:6px; }
.gfx .gfx-layouts { gap:8px; }
.gfx .gfx-layouts button { border-radius:7px; min-height:100px; gap:5px; padding:12px; }
.gfx .gfx-layouts button span { font-size:13px; line-height:1.35; }
.gfx .gfx-layouts button[aria-pressed=true], .gfx .gfx-anims button[aria-pressed=true] { border-color:var(--tool-ink); box-shadow:inset 0 -3px var(--tool-accent); color:var(--tool-ink); background:var(--surface,#fff); }
.gfx .gfx-subj { gap:10px; padding:10px 0 10px 10px; }
.gfx .gfx-subj-tools { gap:4px; flex-shrink:0; }
.gfx .gfx-subj-tools .btn.small { min-width:40px; min-height:44px; padding:8px; }
.gfx .gfx-stats { gap:7px; }
.gfx .gfx-stats li { padding:8px; border-radius:6px; align-items:center; }
.gfx .gfx-stats li>span:first-of-type { white-space:normal; overflow:visible; overflow-wrap:anywhere; line-height:1.35; }
.gfx .gfx-stats li>span:first-of-type>.muted { display:block; font-size:12px; }
.gfx .gfx-sec .seg { flex-wrap:wrap; gap:3px; }
.gfx .gfx-row { gap:10px; }
.gfx .gfx-check { min-height:44px; gap:8px; line-height:1.45; }
.gfx .gfx-actions { gap:8px; padding:8px 0; }
.gfx .gfx-motion { border-radius:9px; }
.gfx .gfx-frame { border-radius:9px; }
.gfx .gfx-ac { border-radius:8px; }
.gfx .gfx-ac li { min-height:44px; display:flex; align-items:center; padding:10px; box-sizing:border-box; }
.gfx .gfx-try-card, .gfx .gfx-thumb { border-radius:7px; }
/* Rankings: edit controls are restyled; presentation rows and player images are deliberately untouched. */
.rankings-page>.controls-row { display:flex; flex-wrap:wrap; gap:9px; margin:18px 0; }
.rankings-page .rankings-editor { border-radius:10px; padding:22px; margin:22px 0; }
.rankings-page .rankings-editor>h2 { margin:0 0 18px; font-size:23px; }
.rankings-page .rankings-editor>.field { display:grid; gap:7px; margin:14px 0; font-size:14px; font-weight:600; }
.rankings-page .rankings-style-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; border:1px solid var(--tool-line); border-radius:9px; padding:18px; margin:22px 0; }
.rankings-page .rankings-style-controls legend { font-weight:650; padding:0 7px; }
.rankings-page .rankings-palette-field { display:grid; grid-template-columns:1fr 44px 100px; gap:8px; align-items:center; font-size:14px; }
.rankings-page input[type=color] { width:44px; height:44px; min-height:44px; padding:3px; border:1px solid var(--tool-line); border-radius:6px; background:var(--surface,#fff); }
.rankings-page .rankings-row-editor { display:grid; grid-template-columns:minmax(160px,1fr) auto minmax(90px,120px) auto; align-items:center; gap:10px; padding:12px; margin:12px 0; border:1px solid var(--tool-line); border-radius:8px; background:var(--tool-soft); }
.rankings-page .rankings-color-control { min-height:44px; display:flex; gap:8px; align-items:center; }
.rankings-page .rankings-results { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.rankings-page .rankings-results button { margin:0; }
/* Rundown dialog; audience styles and exported images remain unchanged. */
.lab-rundown.lab-rundown { width:min(1000px,calc(100% - 24px)); border-radius:12px; padding:22px; overscroll-behavior:contain; box-shadow:0 18px 70px #0005; }
.lab-rundown .rundown-heading { position:sticky; top:0; z-index:2; padding:12px 0; margin-top:-10px; background:var(--surface,#fff); border-bottom:1px solid var(--tool-line); }
.lab-rundown .rundown-heading h2 { font-size:23px; line-height:1.25; }
.lab-rundown .rundown-privacy { background:var(--tool-soft); border-left:3px solid var(--tool-accent); border-radius:6px; padding:12px; font-size:14px; line-height:1.55; }
.lab-rundown .rundown-toolbar { gap:10px; padding:14px 0; margin:16px 0; }
.lab-rundown .rundown-position { min-width:54px; padding:9px; text-align:center; border:1px solid var(--tool-line); border-radius:7px; font-variant-numeric:tabular-nums; }
.lab-rundown .rundown-notes-export { min-height:44px; align-items:center; gap:10px; font-size:14px; line-height:1.5; }
.lab-rundown .rundown-item { border-radius:9px; padding:18px; gap:18px; }
.lab-rundown .rundown-item label { font-size:14px; font-weight:600; }
.lab-rundown .rundown-item textarea { font-weight:400; min-height:110px; line-height:1.5; }
.lab-rundown .rundown-row-actions { gap:8px; }
@media(hover:hover) and (pointer:fine) {
 .creator-tools :is(.creator-tool-nav a,.creator-player-options button,.matchup-matrix-options label):hover, .gfx :is(.gfx-layouts button,.gfx-ac li):hover { color:var(--tool-ink); background:var(--tool-soft); }
}
@media(max-width:850px) {
 .creator-tools .creator-tool-nav { flex-wrap:nowrap; overflow-x:auto; max-width:100%; scrollbar-width:thin; padding-bottom:10px; overscroll-behavior-x:contain; }
 .creator-tools .creator-tool-nav a { flex:0 0 auto; white-space:nowrap; }
 .creator-tools .creator-tool-grid>a { min-height:176px; }
}
@media(max-width:600px) {
 .creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form) { padding:15px; gap:16px; }
 .creator-tools .creator-board-rule-grid, .creator-tools .creator-research-controls { grid-template-columns:1fr; }
 .creator-tools .creator-board-saves { padding:16px; }
 .creator-tools .creator-board-saves>input, .creator-tools .creator-board-saves>select { flex:1 1 100%; width:100%; }
 .creator-tools :is(.creator-board-actions,.ba-actions) .btn { flex:1 1 100%; width:100%; }
 .creator-tools :is(.creator-research-controls,.ba-controls)>button[type=submit] { width:100%; }
 .creator-tools .creator-tool-grid>a { padding:20px; }
 .creator-tools .ba-samples { gap:10px; }
 .creator-tools .ba-samples article { padding:13px; }
 .creator-tools .matchup-matrix-options { grid-template-columns:1fr; }
 .creator-tools .matchup-picker>label { flex-basis:100%; }
 .rankings-page .rankings-editor { padding:16px; }
 .rankings-page .rankings-row-editor { grid-template-columns:1fr auto; }
 .rankings-page .rankings-row-editor>input:first-child { grid-column:1/-1; width:100%; }
 .rankings-page .rankings-row-editor>input[type=text] { width:100%; max-width:none; }
 .rankings-page .rankings-row-editor>button { grid-column:1/-1; }
 .rankings-page .rankings-style-controls { grid-template-columns:1fr; padding:14px; }
 .rankings-page .rankings-palette-field { grid-template-columns:minmax(0,1fr) 44px 96px; }
 .lab-rundown.lab-rundown { padding:15px; max-height:calc(100dvh - 20px); }
 .lab-rundown .rundown-heading { top:0; }
 .lab-rundown .rundown-item { padding:14px; }
 .gfx .gfx-sec { padding:13px; }
 .gfx .gfx-layouts button { min-height:104px; }
}

/* Keep dynamically loaded rundown controls comfortably tappable. */
.lab-rundown .rundown-toolbar > .btn, .lab-rundown .rundown-row-actions > .btn { min-height: 44px; }

/* Keep the graphics prompt compact without removing any suggestions or actions. */
.gfx-ask { padding:12px; gap:8px; border-radius:10px; box-sizing:border-box; min-width:0; }
.gfx-ask .ask-input { min-height:44px; font-size:16px; min-width:0; }
.gfx-ask :is(button,.btn) { min-height:44px; box-sizing:border-box; }
.gfx-ask .gfx-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:600px) {
 .gfx-ask .ask-ideas { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; max-width:100%; min-width:0; padding:2px 18px 5px 0; gap:6px; scrollbar-width:thin; overscroll-behavior-x:contain; }
 .gfx-ask .ask-ideas > * { flex:0 0 auto; }
 .gfx-ask .ask-ideas .chip { white-space:nowrap; margin:0; padding:8px 12px; }
 .gfx-ask .gfx-toolbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; }
 .gfx-ask .gfx-toolbar > .btn { width:100%; justify-content:center; text-align:center; margin:0; }
}

@media(max-width:600px) {
 .gfx-ask .gfx-toolbar > .account-presets { min-width:0; margin:0; }
 .gfx-ask .gfx-toolbar > .account-presets > summary { width:100%; min-height:44px; box-sizing:border-box; text-align:center; }
 .gfx-ask .gfx-toolbar > .rundown-controls { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; margin:0; }
 .gfx-ask .gfx-toolbar .rundown-controls .btn { width:100%; min-height:44px; margin:0; justify-content:center; text-align:center; }
 .gfx-ask .gfx-toolbar .rundown-status:empty { display:none; }
 .gfx-ask .gfx-toolbar .rundown-status:not(:empty) { grid-column:1/-1; }
}
.ask-bar.gfx-ask > button.btn, .ask-bar.gfx-ask .ask-ideas > button.chip { min-height:44px; }
@media(max-width:600px) {
 .gfx-ask .gfx-ideas { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; max-width:100%; min-width:0; gap:6px; padding:2px 18px 5px 0; scrollbar-width:thin; }
 .gfx-ask .gfx-ideas > * { flex:0 0 auto; }
 .gfx-ask .gfx-ideas .chip { white-space:nowrap; max-width:none; min-height:44px; margin:0; padding:8px 12px; }
}

/* Extra actions in one field must not lower every sibling control in the row. */
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls) { align-items:start; }
.creator-tools :is(.creator-board-field,.creator-research-field) { align-content:start; }

.creator-tools :is(.creator-board-rule-grid,.creator-research-controls) > :is(.creator-board-field,.creator-research-field) > span { min-height:2.8em; }
.creator-tools .creator-field-help { display:block; margin-top:6px; font-size:13px; line-height:1.4; color:var(--muted); }

/* Palette controls must fit within their card, including during tablet rotation. */
.rankings-page .rankings-style-controls { grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.rankings-page .rankings-palette-field { min-width:0; grid-template-columns:minmax(0,1fr) 44px 100px; }
.rankings-page .rankings-palette-field > span { min-width:0; overflow-wrap:anywhere; }
