.auto-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:28px;margin-bottom:24px;align-items:center;border-color:var(--green)}.auto-copy>.eyebrow{margin-bottom:12px}.auto-copy .panel-heading{margin-bottom:13px}.auto-copy>.subtle{line-height:1.9}.auto-copy>.caption{margin:14px 0;line-height:1.9}.preview-toggle{display:flex;flex-direction:row;align-items:center;gap:9px;margin-top:18px;color:var(--muted)}.preview-toggle input{min-height:16px;width:16px;accent-color:var(--green)}.preview-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;color:var(--muted);margin-bottom:12px}.preview-heading button{font-size:10px;flex-shrink:0}.preview-boards{display:flex;justify-content:center;gap:20px}.preview-boards>div{width:120px;min-width:0}.preview-boards span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:10px;color:var(--muted);margin-bottom:8px}.preview-boards canvas{display:block;width:100%;aspect-ratio:10/22;border:1px solid var(--line);border-radius:4px}.auto-preview>.caption{margin-top:12px;line-height:1.8}#auto-phase{white-space:nowrap}#auto-message{min-height:48px}@media(max-width:800px){.auto-panel{grid-template-columns:1fr;gap:22px}.auto-preview{border-top:1px solid var(--line);padding-top:16px}.preview-boards>div{width:120px}.auto-panel .panel-heading{gap:10px}}
.preview-heading .text-button{width:auto;display:inline-flex;margin:0;padding:4px 0}.preview-heading>span{flex:1;min-width:0;line-height:1.7}.auto-copy .button-row{flex-wrap:wrap}
.cf-controls{display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:14px}.cf-controls[hidden]{display:none}.cf-controls p{flex-basis:100%;margin:0}.cf-controls .text-button{width:auto;margin:0;font-size:11px}

.fx-toggle{display:flex;flex-direction:row;gap:6px;align-items:center;font-size:11px;color:var(--muted);white-space:nowrap}.fx-toggle input{width:15px;min-height:15px;accent-color:var(--green)}

.replay-highlights{display:flex;flex-wrap:wrap;gap:8px 16px}.replay-highlights .text-button{width:auto;margin:10px 0 0;font-size:11px}
.strategy-role{border:1px solid var(--line);border-radius:10px;padding:14px;margin:12px 0}.strategy-role strong{font-size:13px}.strategy-role p{margin:7px 0 0;line-height:1.7}#strategy-league-results>h3{margin-top:20px}#strategy-league-results>.caption{line-height:1.8}
.search-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.search-summary>div{border:1px solid var(--line);border-radius:8px;padding:12px}.search-summary strong{display:block;font-size:25px;color:var(--green)}.search-summary span{display:block;font-size:10px;color:var(--muted);line-height:1.7;margin-top:5px}.strategy-role .search-current{color:var(--text);font-size:12px}.strategy-role details,#strategy-league-results>details{margin-top:12px}.strategy-role summary,#strategy-league-results>details>summary{cursor:pointer;font-size:11px;color:var(--muted);line-height:1.7}@media(max-width:520px){.search-summary{gap:6px}.search-summary>div{padding:8px}.search-summary strong{font-size:22px}}
.auto-preview{position:sticky;top:24px;align-self:start}@media(max-width:800px){.auto-preview{position:static}}
.chart-selectors{display:flex;flex-direction:column;gap:6px;max-width:205px}.chart-selectors select{width:100%;font-size:11px}.chart-panel .panel-heading{gap:12px;align-items:start}.chart-panel h2{font-size:20px}@media(max-width:520px){.chart-panel .panel-heading{flex-direction:column}.chart-selectors{max-width:none;width:100%;flex-direction:row}.chart-selectors select{min-width:0}}
.sequence-panel{margin-bottom:24px}.sequence-panel h2{margin-top:0}.sequence-panel>.caption{line-height:1.8}.sequence-table{width:100%;font-size:12px}.sequence-table th,.sequence-table td{text-align:left;padding:12px 10px;min-width:115px}.sequence-table td:first-child{min-width:220px}.sequence-table progress{display:block;width:100%;height:5px;margin-top:8px}.sequence-panel .replay-highlights{gap:8px 18px}
@media(max-width:650px){.sequence-table thead{display:none}.sequence-table tbody{display:block}.sequence-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}.sequence-table td,.sequence-table td:first-child{display:block;min-width:0;padding:5px 0;font-size:11px}.sequence-table td:first-child{grid-column:1/-1;font-size:12px}.sequence-table td[data-label]::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:6px}.auto-panel .button-row{flex-wrap:wrap}.auto-panel .button-row>button{flex:1 1 120px;min-width:0}}
.behavior-form{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:14px 0}.behavior-form label{display:flex;gap:7px;align-items:flex-start;flex-wrap:wrap}.behavior-form label:has(input[type=checkbox]){flex-direction:row;align-items:center;flex-wrap:nowrap}.behavior-form input[type=number]{width:80px;background:var(--bg);color:inherit;border:1px solid var(--line);border-radius:6px;padding:7px}.behavior-form input[type=checkbox]{width:16px;min-height:16px;flex:none}.behavior-form button{margin-top:6px;border:1px solid var(--line);border-radius:6px;padding:9px 12px;background:var(--green-light)}
.behavior-growth{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.behavior-growth>p,.behavior-growth>label{margin:10px 0}.behavior-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0}.behavior-profile{font-size:10px;padding:7px;background:var(--bg);border:1px solid var(--line);border-radius:6px;overflow-wrap:anywhere}.behavior-profile.active{border-color:var(--green)}#behavior-growth-chart svg{display:block;width:100%;min-height:120px}#behavior-growth-details details{margin:12px 0;padding:10px;border:1px solid var(--line);border-radius:7px}#behavior-growth-details summary{font-size:12px;cursor:pointer}#behavior-growth-details p{margin:8px 0;line-height:1.7}#behavior-growth-details button{display:block;margin-top:8px;text-align:left}

/* Result badges stay anchored to their own board, including narrow layouts. */
.preview-stage,.preview-board-stage{position:relative}
.preview-board-result{position:absolute;z-index:4;left:6px;right:6px;top:40%;padding:12px 2px;border:2px solid #d5dce5;border-radius:8px;text-align:center;font-size:28px;font-weight:900;line-height:1.1;letter-spacing:.04em;color:#fff;background:#475569;box-shadow:0 5px 18px #0009;pointer-events:none}
.preview-board-result[hidden],.preview-outcome[hidden]{display:none}
.preview-board-result[data-outcome=WIN]{color:#052e16;background:#4ade80;border-color:#bbf7d0}
.preview-board-result[data-outcome=LOSE]{color:#fff;background:#b91c1c;border-color:#fca5a5}
.preview-board-stage:has([data-outcome=WIN]:not([hidden])) canvas{border-color:#4ade80;box-shadow:0 0 0 2px #4ade80}
.preview-board-stage:has([data-outcome=LOSE]:not([hidden])) canvas{border-color:#ef4444;box-shadow:0 0 0 2px #ef4444}
.preview-outcome{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;padding:10px 8px;text-align:center;color:#f4fff8;background:linear-gradient(transparent 58%,rgba(9,16,24,.96) 78%);border-radius:5px;pointer-events:none}
.preview-outcome>strong{font-size:18px;line-height:1.2}
.preview-outcome>p{font-size:11px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.preview-outcome>small{font-size:10px;line-height:1.5;color:#d4dde6}
