/* Contextual help is shared by the planner, result cards and order sheets. */
.help-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;padding:0;border:1px solid #c8d5c6;border-radius:50%;background:transparent;color:#59715f;font-family:inherit;font-size:13px;font-weight:600;line-height:1;vertical-align:middle;cursor:help;touch-action:manipulation}
.help-button>span{font-size:13px!important;line-height:1!important;color:inherit!important;margin:0!important}
.help-button:hover,.help-button:focus-visible{background:#eaf1e2;border-color:#73966a;color:#234d38}
.help-popover{position:fixed;z-index:10000;width:max-content;max-width:390px;padding:14px 16px;background:#183e34;color:#fff;border:1px solid #486c59;border-radius:10px;box-shadow:0 8px 26px #183e3428;font-size:14px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere;overflow:auto;text-align:left;font-weight:400;letter-spacing:normal}
.title-with-help,.label-with-help{display:flex;align-items:center;gap:8px;min-width:0}
.title-with-help{flex-wrap:wrap}
.field .label-with-help{margin-bottom:8px}
.field .label-with-help label,.probability-label .label-with-help label{margin:0;font-size:14px;font-weight:600;line-height:1.6}
legend .help-button{margin-left:7px}
.help-copy{display:none!important}
.league-order-heading{justify-content:center}
.league-order-heading>b{display:block;font-size:17px;font-weight:700;line-height:1.5}
@media screen{
 :root{--line:#dfe6dc;--muted:#6d7e6f;--record-surface:#f8faf5;--dropdown-height:44px;--frame-padding-block:13px;--frame-gap:16px;--setup-frame-gap:var(--frame-gap)}
 main,footer{max-width:1280px;width:calc(100% - 64px);margin-left:auto;margin-right:auto}
 .topbar{max-width:1280px;width:calc(100% - 64px);padding:24px 0 20px;gap:16px 28px}
 .topbar .header-tagline{margin:0}
 .panel,.overview{border:1px solid var(--line);border-radius:14px;background:#fff}
 .setup,.conditions,.overview,.names-panel,.operations{padding:24px}
 h2,.conditions h2,.operations-heading h2{font-size:20px;line-height:1.5}
 .section-heading{gap:12px;flex-wrap:wrap}
 .setup{margin-bottom:24px}
 .setup-heading-copy{display:flex;align-items:center;flex:1;flex-wrap:wrap;gap:8px 16px;min-width:0}
 .setup-heading-copy h2{flex:0 0 auto}
 .setup-heading-copy #record-status{font-size:12px;line-height:1.6;color:#5f7557;margin:0;text-align:center;overflow-wrap:anywhere;max-width:100%}
 .setup-heading #reset{flex-shrink:0}
 .record-manager{padding:18px;margin:18px 0 24px;gap:12px 16px;grid-template-columns:minmax(0,1fr) 310px;background:#f8faf5}
 .record-manager label{font-size:14px}
 .record-manager input,.record-manager select{height:44px}
 #record-status:empty,.form-status:empty,.csv-status:empty{display:none}
 .secondary-button{font-size:13px;line-height:1.5;min-height:38px;padding:8px 13px;border-radius:7px}
 .text-button{font-size:13px;min-height:38px}
 .setup-grid{gap:24px;margin-top:0}
 legend{font-size:15px;margin-bottom:10px}
 .step{width:24px;height:24px;font-size:12px;margin-right:7px;vertical-align:0}
 .choice>span{min-height:54px;padding:14px}
 .choice b{font-size:15px;line-height:1.6}
 #team-settings .team-config{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--setup-frame-gap);width:100%;min-width:0;margin-top:var(--setup-frame-gap);padding:0;border:0;border-radius:0;background:transparent;text-align:center}
 #team-settings .team-config>.field{display:flex;flex-direction:column;align-self:stretch;min-width:0;grid-column:auto}
 #team-settings .team-config .team-setting-title{display:flex;align-items:center;justify-content:flex-start;align-self:stretch;width:100%;min-height:24px;margin:0 0 8px;padding:0;text-align:left}
 #team-settings .team-config .team-setting-title label{margin:0;padding:0;font-size:14px;line-height:1.6;word-break:keep-all;text-align:left}
 #team-settings .team-setting-frame{display:flex;flex:1;flex-direction:column;margin:0}
 .team-setting-frame{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--record-surface)}
 .team-setting-frame select{margin-top:auto;text-align:center;text-align-last:center}
 @media(max-width:900px){#team-settings .team-config{grid-template-columns:minmax(0,1fr)}}
 .field label{font-size:14px;line-height:1.6}
 .field input,.field select{height:44px}
 .slot-heading{margin-top:20px;margin-bottom:12px;justify-content:flex-start;gap:12px 24px}
 #team-set-finish-host{margin-left:0;max-width:100%}
 #team-set-finish-host .set-finish-control{justify-content:flex-start}
 .slot-heading h3{font-size:15px}
 .slot-card{padding:14px;background:#f7f9f3}
 .slot-card .slot-title{font-size:14px;margin-bottom:10px}
 .slot-grid{gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
 #team-common-settings #common-game-settings{padding:12px 16px;margin-top:14px}
 .calculator-grid{grid-template-columns:320px minmax(0,1fr);gap:24px;align-items:stretch}
 .conditions>.field-grid{margin-top:18px;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
 .conditions>.field-grid .full{grid-column:1/-1}
 #distribution-hint{padding:10px 12px;background:#f5f8ef;border-radius:8px;font-size:12px;line-height:1.7;margin:16px 0 0;color:#5c7152}
 .conditions .advanced{margin-top:16px}
 .advanced summary{font-size:14px;line-height:1.6;padding:12px 0}
 .detail-fields .field label{font-size:13px}
 .primary-button{font-size:14px;min-height:48px;padding:12px 16px}
 .form-status{font-size:12px;line-height:1.6;margin-top:10px}
 .conditions .hint:has(a){font-size:12px;margin:12px 0}
 .subtle,.status{font-size:12px}
 .overview .section-heading h2{font-size:22px}
 .overview .eyebrow,.operations-heading .eyebrow{font-size:10px;letter-spacing:1.1px;margin-bottom:6px}
 .comparison-heading{display:flex;align-items:center;gap:8px;margin:20px 0 12px;justify-content:flex-start}
 .comparison-heading h3{font-size:14px}
 .comparison{gap:16px}
 .result-card{padding:20px;border-radius:12px;background:#fbfcf9;border-color:#e2e8dc}
 .result-card.featured{background:#f1f6e8;border-color:#cbdabc;color:var(--ink)}
 .result-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:18px}
 .result-top h3{font-size:18px;margin:0}
 .result-top-meta{display:flex;align-items:center;gap:6px}
 .badge,.featured .badge{font-size:11px;line-height:1.5;padding:3px 6px;color:#516d41;background:#fff9;border-color:#d3dfc6}
 .metric-label,.featured .metric-label{font-size:12px;color:#64765d;margin-bottom:8px;line-height:1.5}
 .duration,.featured .duration{font-size:32px;color:#234d36;line-height:1.3}
 .duration.long{font-size:24px}
 .duration small{font-size:14px}
 .end-metric,.featured .end-metric{display:flex;align-items:end;justify-content:space-between;border-color:#dce5d2;margin-top:18px;padding-top:16px}
 .end-time{font-size:27px}
 .day,.featured .day{font-size:11px;color:#687d5c;margin:0}
 .stats{gap:12px;margin-top:18px}
 .stats>div,.featured .stats>div{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#6a7a60;line-height:1.65}
 .stats strong,.featured .stats strong{font-size:12px;color:#345b3d;font-weight:600;text-align:right;margin:0}
 .method{margin-top:18px;border-top:1px solid var(--line)}
 .method summary{font-size:16px;padding:14px 0 0;min-height:42px;color:#426343}
 .method[open] summary{padding-bottom:12px}
 .method-copy{font-size:13px;line-height:1.85;color:#5e7055}
 /* Results span both planning columns while every group's full ranking stays available. */
 .competition-results{grid-column:1/-1;min-width:0;padding:0;margin:0;border:1px solid #b7cbb5;border-top:3px solid #bed878;border-radius:14px;background:#f3f6ed;overflow:hidden}
 .results-heading{padding:20px 24px;background:#1b4437;color:white;gap:16px}
 .results-heading-main{display:flex;align-items:center;gap:14px;min-width:0}
 .results-mark{width:42px;height:42px;display:grid;place-items:center;flex:none;border:1px solid #d9e89850;border-radius:12px;background:#d9e89812;color:#ddeaac;font-size:24px;line-height:1}
 .competition-results .eyebrow{font-size:10px;color:#bacda4;letter-spacing:1.3px;margin-bottom:4px}
 .results-heading h3{font-size:24px;line-height:1.4;color:white;letter-spacing:-.5px}
 .results-heading .help-button{color:#d7e6c0;border-color:#afc49770}
 .results-heading .help-button:hover,.results-heading .help-button:focus-visible{background:#ffffff18;color:#fff}
 .results-progress{font-size:13px;line-height:1.5;color:#edf5e3;background:#ffffff0d;border:1px solid #ffffff30;border-radius:8px;padding:8px 12px}
 .results-content{grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:18px;padding:20px;max-height:640px;align-items:start;scrollbar-gutter:stable}
 .results-content:has(>.result-group:only-child){grid-template-columns:minmax(0,820px);justify-content:center}
 .result-group{border:1px solid #d6e1cf;border-radius:11px;box-shadow:0 2px 6px #193e3505;background:white}
 .result-group-heading{padding:14px 16px;background:#fff;border-bottom:1px solid #e3e9dc;min-height:57px}
 .result-group-heading h4{font-size:16px;line-height:1.5}
 .result-group-heading h4 small{font-size:12px;color:#819174;margin-left:8px}
 .result-state{font-size:12px;color:#788773}
 .result-state.complete{background:#edf5df;border-radius:5px;padding:3px 6px;font-size:12px;color:#3c6a3a}
 .ranking-table th,.ranking-table td{padding:10px 8px;font-size:14px;line-height:1.6}
 .ranking-table thead th{background:#f6f8f1;font-size:12px;font-weight:600;color:#65775c;word-break:keep-all}
 .ranking-table th:first-child{width:76px}.ranking-table th:nth-child(3){width:66px}.ranking-table th:nth-child(4){width:72px}
 .ranking-table tbody th{font-size:14px;color:#254b38;font-weight:500}
 .rank-number{display:inline-flex;align-items:center;justify-content:center;min-width:40px;padding:3px 6px;font-size:12px;line-height:1.5;border-radius:6px;background:#f0f4e9;color:#587247;white-space:normal}
 .ranking-table .leading{background:#f1f7e3}
 .ranking-table .leading .rank-number{background:#ddebab;color:#274d31;font-weight:750}
 .ranking-table .leading th{font-weight:700}
 .result-seed{font-size:11px;color:#7f9074;margin-right:5px}
 .result-group-progress{padding:9px 16px;font-size:12px;color:#819273;background:#fbfcf7}
 .placing{grid-template-columns:80px minmax(0,1fr);padding:15px 17px;gap:14px;min-height:59px}
 .placing dt{font-size:14px;line-height:1.6;color:#607650}
 .placed-entry{font-size:15px;line-height:1.6;color:#31563c}
 .placing-champion{background:#edf5dc;border-left:4px solid #b6cd68;padding-left:13px;min-height:83px}
 .placing-champion dt{font-size:15px;font-weight:750;color:#456328}
 .placing-champion .placed-entry{font-size:21px;line-height:1.45;font-weight:750;color:#244b32}
 .placing-empty{font-size:13px;color:#819373}
 .names-panel,.operations{margin-top:24px}
 .names-title-row{gap:10px}
 .names-toggle{font-size:13px}
 .csv-actions{gap:10px;margin-top:16px;margin-bottom:18px;align-items:center}
 .group-names-editor{gap:16px}
 .name-group{border-radius:10px}
 .name-group summary{font-size:15px}
 .entry-name-row input{font-size:15px;min-height:42px}
 .operations-heading{gap:16px;flex-wrap:wrap}
 .tabs{gap:6px;margin-top:20px;padding:0 0 8px}
 .tabs>button{font-size:14px;min-height:42px;padding:9px 13px;border-radius:7px;border:0;color:#6b7e5c}
 .tabs>button.active{background:#eaf2dd;color:#315d3b;border:0}
 .toolbar{padding:16px 0;gap:18px;align-items:end}
 .toolbar label{font-size:12px;color:#627957}
 .toolbar select{height:40px;font-size:13px;padding:7px 26px 7px 10px}
 .toolbar p{font-size:12px;margin-bottom:8px;color:#718665}
 .error,.csv-status,.notice{font-size:12px}
 .order-heading h2{font-size:21px}
 .order-game-title .title-with-help{gap:7px}
 footer{font-size:12px;padding:20px 0}
 footer small{font-size:11px}
 @media(max-width:1060px){.calculator-grid{grid-template-columns:290px minmax(0,1fr);gap:20px}.overview,.conditions{padding:20px}.result-card{padding:16px}.result-top h3{font-size:17px}.duration,.featured .duration{font-size:29px}.duration.long{font-size:21px}.stats>div,.featured .stats>div{display:block}.stats strong,.featured .stats strong{display:block;text-align:left}.team-config{grid-template-columns:minmax(130px,.7fr) minmax(180px,1fr)}.team-config>.field:last-child{grid-column:1/-1}.results-content{grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(max-width:820px){main,footer,.topbar{width:calc(100% - 40px)}.calculator-grid{grid-template-columns:1fr}.conditions>.field-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.conditions>.field-grid .full{grid-column:1/-1}.setup-grid{grid-template-columns:1fr 1fr;gap:18px}.record-manager{grid-template-columns:minmax(0,1fr)}.result-top{flex-wrap:nowrap}.stats>div,.featured .stats>div{display:flex}.stats strong,.featured .stats strong{text-align:right}.results-content{gap:14px;padding:16px}.ranking-table th,.ranking-table td{padding-left:5px;padding-right:5px}}
 @media(max-width:600px){main,footer,.topbar{width:calc(100% - 28px)}.topbar{padding:20px 0 18px;gap:16px}.setup,.conditions,.overview,.names-panel,.operations{padding:18px}.setup-grid{grid-template-columns:1fr;gap:18px}.record-manager{padding:14px;margin:16px 0 22px}.record-actions,.record-library-actions{gap:8px}.section-heading h2,.conditions h2{font-size:19px}.team-config{gap:14px;grid-template-columns:1fr 1fr}.team-config>.field:last-child{grid-column:1/-1}.team-config .field label{font-size:13px}.conditions>.field-grid{grid-template-columns:1fr 1fr}.slot-heading{gap:8px}.slot-heading h3{font-size:14px}.slot-card{padding:12px}.slot-grid{gap:10px}#slot-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.comparison{gap:10px}.result-card{padding:14px 12px}.result-top{align-items:start;flex-direction:column;gap:7px}.result-top h3{font-size:17px}.result-top-meta{width:100%;justify-content:space-between}.badge{font-size:10px}.duration,.featured .duration{font-size:26px}.duration.long{font-size:18px}.duration small{font-size:12px}.end-metric,.featured .end-metric{display:block}.day,.featured .day{display:block;margin-top:8px}.stats>div,.featured .stats>div{display:block;font-size:12px}.stats strong,.featured .stats strong{text-align:left;margin-top:2px}.results-heading{padding:18px 16px;gap:12px}.results-heading h3{font-size:22px}.results-heading-main{gap:10px}.results-mark{width:36px;height:36px;font-size:21px}.results-progress{font-size:12px;padding:7px 9px}.results-content{grid-template-columns:1fr;padding:14px;max-height:650px}.result-group-heading{padding:12px 14px}.ranking-table th:first-child{width:70px}.ranking-table th:nth-child(3){width:61px}.ranking-table th:nth-child(4){width:67px}.result-group-progress{font-size:11px}.placing{padding:14px;grid-template-columns:72px minmax(0,1fr)}.placing-champion{padding-left:10px}.names-title-row{gap:8px}.names-toggle{font-size:12px}.tabs{gap:4px}.tabs>button{font-size:13px;padding:9px 11px}.toolbar{display:block}.toolbar-filters{gap:10px}.toolbar select{width:100%;min-width:0;font-size:12px}.toolbar p{margin:10px 0 0}.help-button{flex-basis:26px;width:26px;height:26px}.csv-actions{flex-wrap:wrap}.method summary{font-size:15px}.primary-button{font-size:14px}}
}
/* Compact league results: keep type and column widths, use one-third vertical spacing. */
@media screen{
 .results-content:has(>.result-group>.ranking-table){padding-block:calc(20px / 3);row-gap:6px}
 .result-group:has(>.ranking-table) .result-group-heading{padding-block:calc(14px / 3);min-height:0}
 .ranking-table th,.ranking-table td{padding-block:calc(10px / 3)}
 .ranking-table .rank-number{padding-block:1px}
 .result-group:has(>.ranking-table) .result-state.complete{padding-block:1px}
 .result-group:has(>.ranking-table) .result-group-progress{padding-block:3px}
 @media(max-width:820px){.results-content:has(>.result-group>.ranking-table){padding-block:calc(16px / 3);row-gap:calc(14px / 3)}}
 @media(max-width:600px){.results-content:has(>.result-group>.ranking-table){padding-block:calc(14px / 3)}.result-group:has(>.ranking-table) .result-group-heading{padding-block:4px}}
}
/* Compact timing controls and a complete, scroll-free overview of up to ten league groups. */
@media screen{
 .timing-inline-fields{display:grid;grid-template-columns:1fr 1.18fr;gap:10px;align-items:start}
 .timing-inline-fields .timing-compact{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:0 6px;min-width:0}
 .timing-compact>label,.timing-compact .label-with-help label{font-size:13px!important;white-space:nowrap;margin:0}
 .timing-compact .label-with-help{margin:0;gap:3px}
 .timing-compact .help-button{width:20px;height:20px;flex-basis:20px}
 .timing-compact input{height:30px;font-size:14px;padding:3px 19px 3px 6px;border-radius:5px}
 .timing-compact .unit-input>span{right:6px;top:7px;font-size:11px}
 .timing-compact .error{grid-column:1/-1}
 #timing-assumptions .detail-fields{padding-top:4px;padding-bottom:12px}
 .results-content.league-results-grid{grid-template-columns:repeat(var(--league-columns,3),minmax(0,1fr));column-gap:10px;row-gap:8px;padding:10px}
 .results-content.league-fits-ten{max-height:none;overflow:visible;scrollbar-gutter:auto}
 .league-results-grid .result-group-heading{padding:5px 8px;gap:4px;min-height:0;flex-wrap:wrap}
 .league-results-grid .result-group-heading h4{font-size:14px;line-height:1.35}
 .league-results-grid .result-group-heading h4 small{display:none}
 .result-group-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
 .league-results-grid .result-state{font-size:12px;line-height:1.4}
 .league-results-grid .ranking-table{width:100%}
 .league-results-grid .ranking-table th,.league-results-grid .ranking-table td{padding:0 2px;font-size:13px;line-height:1.25}
 .league-results-grid .ranking-table thead th{font-size:12px;padding:3px 2px}
 .league-results-grid .ranking-table th:first-child{width:43px}
 .league-results-grid .ranking-table th:nth-child(3){width:35px}
 .league-results-grid .ranking-table th:nth-child(4){width:49px}
 .league-results-grid .rank-number{min-width:0;padding:0;font-size:12px;line-height:1.25;white-space:nowrap}
 .result-entry-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}
 .league-results-grid .result-seed{font-size:11px;margin-right:3px}
 .league-results-grid .result-group-progress{padding:3px 8px;font-size:12px;line-height:1.4}
 .rank-edit-button{border:1px solid #9dbb88;background:#edf5df;color:#315c35;border-radius:5px;padding:3px 6px;min-height:26px;font-size:12px;line-height:1.4;white-space:nowrap}
 .rank-edit-button:hover{background:#deedbd}
 .manual-rank{box-shadow:inset 0 -2px #85a953}
 .rank-dialog{width:min(520px,calc(100% - 28px));padding:24px;border:1px solid var(--line);border-radius:14px}
 .rank-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
 .rank-dialog-heading h2{font-size:20px}
 #rank-dialog-guide{font-size:14px;color:#64765d;line-height:1.7;margin:14px 0 18px}
 .rank-tie-fields{padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:16px}
 .rank-tie-fields legend{font-size:14px;margin:0;padding:0 5px}
 .rank-choice{display:grid;grid-template-columns:minmax(0,1fr) 145px;align-items:center;gap:12px;margin:8px 0;font-size:15px}
 .rank-choice>span{overflow-wrap:anywhere}
 .rank-choice small{font-size:12px;color:#73876b}
 .rank-choice select{height:38px;padding:6px 8px;font-size:14px}
 .rank-dialog-actions{display:flex;gap:10px;margin-top:20px;align-items:center}
 .rank-dialog-actions .primary-button{width:auto;flex:1;margin:0;justify-content:center}
 #rank-dialog-error{font-size:14px}
 @media(max-width:1343px){.league-results-grid[data-result-columns="5"]{grid-template-columns:repeat(4,minmax(0,1fr))}}
 @media(max-width:1100px){.league-results-grid[data-result-columns="4"],.league-results-grid[data-result-columns="5"]{grid-template-columns:repeat(3,minmax(0,1fr))}}
 @media(max-width:900px){.league-results-grid[data-result-columns="3"],.league-results-grid[data-result-columns="4"],.league-results-grid[data-result-columns="5"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(max-width:600px){.results-content.league-results-grid{grid-template-columns:1fr}.rank-dialog{padding:18px}.rank-dialog-heading h2{font-size:18px}.rank-choice{grid-template-columns:minmax(0,1fr) 130px;gap:8px}.rank-tie-fields{padding:8px}}
}
/* One centered bar owns the tournament name and its record actions. */
@media screen{
 .setup .record-manager{position:relative;display:block;width:100%;margin:18px 0 var(--setup-frame-gap);padding:0;border:0;background:transparent;text-align:center}
 .record-bar{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:8px 12px;background:var(--record-surface);border:1px solid var(--line);border-radius:10px}
 .record-bar>label{flex:0 0 auto;margin:0;padding:0 4px;text-align:center;white-space:nowrap}
 .record-manager .record-bar>input{flex:1 1 220px;width:auto;min-width:160px;height:42px;text-align:center}
 .record-bar-actions{display:flex;align-items:center;justify-content:center;flex:0 0 auto;gap:6px}
 .record-manager .record-bar-actions .secondary-button{height:38px;min-height:38px;padding:7px 10px;font-size:13px;text-align:center}
 #record-picker-toggle{display:inline-block;margin-left:3px;font-size:10px}
 .record-picker{position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:30;width:min(620px,100%);padding:14px;background:#fff;border:1px solid #b9cbb0;border-radius:12px;box-shadow:0 10px 30px #193e3524;text-align:center}
 .record-picker[hidden]{display:none}
 .record-picker-heading{position:relative;display:flex;align-items:center;justify-content:center;min-height:38px;padding:0 48px;font-size:15px}
 .record-picker-heading .text-button{position:absolute;right:0;top:0;font-size:13px}
 #record-picker-status{margin:6px 0 12px;font-size:13px;line-height:1.6;color:var(--muted)}
 .record-picker-list{display:grid;gap:7px;max-height:320px;overflow-y:auto;overscroll-behavior:contain}
 .record-picker-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;padding:10px 14px;border:1px solid var(--line);border-radius:7px;background:#fbfcf9;color:var(--ink);text-align:center;overflow-wrap:anywhere}
 .record-picker-item>span{font-size:15px;font-weight:600;line-height:1.5}
 .record-picker-item>small{font-size:12px;line-height:1.5;color:var(--muted)}
 .record-picker-item:hover,.record-picker-item[aria-current=true]{border-color:#88a76c;background:#eff5e6}
 .record-picker-empty{margin:0;padding:18px 12px;font-size:14px;line-height:1.7;text-align:center}
 @media(max-width:1000px){.record-bar-actions{flex-basis:100%;flex-wrap:wrap}.record-manager .record-bar>input{flex-basis:180px}}
 @media(max-width:600px){.record-bar{gap:8px;padding:10px}.record-manager .record-bar>input{min-width:0;flex-basis:150px}.record-bar-actions{gap:6px}.record-manager .record-bar-actions .secondary-button{padding:7px 9px}.record-picker{padding:10px}.record-picker-item{padding:9px 10px}}
}
/* Square check marks retain native, mutually exclusive radio selection. */
@media screen{
 .setup-grid.setup-options-bar{display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;gap:var(--setup-frame-gap) 24px;width:100%;margin:0;padding:0;max-width:100%}
 .setup-option-group{display:flex;align-items:center;justify-content:center;flex:1 1 400px;flex-wrap:wrap;gap:10px 24px;min-width:0;max-width:none;padding:14px 20px;background:var(--record-surface);border:1px solid var(--line);border-radius:10px;text-align:center}
 .setup-option-heading{display:flex;align-items:center;gap:6px;font-size:15px;font-weight:600;line-height:1.5}
 .setup-option-heading .step{margin-right:5px}
 .setup-options{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 28px;min-width:0}
 .setup-choice{display:inline-flex;align-items:center;gap:8px;min-height:36px;font-size:14px;font-weight:500;line-height:1.5;cursor:pointer}
 .setup-choice input[type=radio]{appearance:none;-webkit-appearance:none;display:grid;place-content:center;flex:0 0 18px;width:18px;height:18px;margin:0;padding:0;border:1px solid #9caf9c;border-radius:3px;background:#fff;color:#fff;cursor:pointer}
 .setup-choice input[type=radio]::before{content:'✓';font-size:14px;font-weight:800;line-height:1;visibility:hidden}
 .setup-choice input[type=radio]:checked{border-color:var(--green);background:var(--green)}
 .setup-choice input[type=radio]:checked::before{visibility:visible}
 .setup-choice input:checked+span{color:var(--green);font-weight:600}
 .setup-choice:hover input{border-color:var(--green)}
 @media(max-width:600px){.setup-option-group{padding:12px 16px}}
 @media(forced-colors:active){.setup-choice input[type=radio]:checked{background:Highlight;color:HighlightText;forced-color-adjust:none}}
}
/* Equal perceptual lightness and chroma, with a different hue for each format. */
@media screen{
 .comparison .result-card[data-format="3"]{--format-hue:150}
 .comparison .result-card[data-format="5"]{--format-hue:285}
 .comparison .result-card,.comparison .result-card.featured{background:oklch(94% .025 var(--format-hue));border-color:oklch(83% .035 var(--format-hue));color:var(--ink);text-align:center}
 .comparison .metric-label,.comparison .day,.comparison .stats>div{color:#53664d}
 .comparison .result-top,.comparison .result-top-meta,.comparison .end-metric{justify-content:center}
 .comparison .result-top{align-items:center}
 .comparison .end-metric{gap:12px;border-color:oklch(83% .035 var(--format-hue))}
 .comparison .stats>div{justify-content:center;text-align:center}
 .comparison .stats strong{text-align:center}
}
/* One shared probability control for fixtures and their individual games. */
@media screen{
 #individual-settings{width:100%;min-width:0;margin-top:var(--setup-frame-gap)}
 .individual-game-heading{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 32px;width:100%;margin:0;padding:12px 16px;background:var(--record-surface);border:1px solid var(--line);border-radius:10px;text-align:center}
 .individual-format-field{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px 14px;min-width:0;max-width:100%}
 .individual-format-field>label{margin:0;font-size:15px;font-weight:600;line-height:1.6;word-break:keep-all}
 #individual-set-finish-host{min-width:0;max-width:100%}
 #individual-set-finish-host .set-finish-control{justify-content:center;margin:0}
 #individual-set-finish-host .set-finish-label{word-break:keep-all;overflow-wrap:anywhere}
 #individual-format{width:170px;max-width:100%;min-width:0;height:42px;margin:0;padding:8px 30px 8px 12px;font-size:14px;text-align:center;text-align-last:center}
 .individual-game-heading .error:empty{display:none}
 #individual-common-settings,#team-common-settings{width:100%;min-width:0}
 #individual-common-settings #common-game-settings,#team-common-settings #common-game-settings{margin:var(--setup-frame-gap) 0 0;width:100%;max-width:none;padding:7px 12px;background:#f6f8f2;border:1px solid var(--line);border-radius:8px}
 #common-game-settings .common-settings-fields{display:grid;grid-template-columns:minmax(0,1fr);width:100%;margin:0}
 #common-game-settings .probability-field{display:flex;flex-direction:column;min-width:0;margin:0}
 #common-game-settings .probability-label{flex:1;min-height:24px;gap:10px;align-items:center}
 #common-game-settings .label-with-help{gap:5px 8px;flex-wrap:wrap}
 #common-game-settings .probability-scope{font-size:12px;font-weight:400;color:var(--muted)}
 #common-game-settings .label-with-help label{font-size:14px;line-height:1.5;word-break:keep-all}
 #common-game-settings .help-button{width:20px;height:20px;flex-basis:20px;font-size:12px}
 #common-game-settings .percent-input{flex-shrink:0;font-size:11px;gap:3px}
 #common-game-settings .percent-input input{width:48px;height:24px;padding:1px 0;font-size:16px;line-height:1.25;background:transparent}
 #common-game-settings .probability-range{display:flex;align-items:center;gap:7px;min-height:20px;color:var(--muted);font-size:10px;line-height:1}
 #common-game-settings .probability-range>span{flex-shrink:0}
 #common-game-settings .probability-range input[type=range]{display:block;flex:1;min-width:0;width:100%;height:20px;margin:0;padding:0}
 #common-game-settings .probability-field.inactive input{cursor:not-allowed}
 #common-game-settings .error:empty{display:none}

}
/* Shared sizing for current and future dropdowns and framed controls. */
@media screen{
 select,.field select,.slot-card select,.toolbar select,.record-manager select,.rank-choice select,.lineup-selects select,#individual-format{box-sizing:border-box;height:var(--dropdown-height);min-height:var(--dropdown-height);padding-block:8px}
 .setup .record-bar,.setup .setup-option-group,.team-setting-frame,.setup .slot-card,.individual-game-heading,#individual-common-settings #common-game-settings,#team-common-settings #common-game-settings{padding-block:var(--frame-padding-block)}
 .setup,.conditions,.overview,.names-panel,.operations,.comparison .result-card{padding-block:var(--frame-padding-block)}
 .setup-grid.setup-options-bar,.setup .slot-grid,.calculator-grid,.comparison,.group-names-editor{gap:var(--frame-gap)}
 .results-content,.results-content.league-results-grid{gap:var(--frame-gap)}
 .setup{margin-bottom:var(--frame-gap)}
 .setup .record-manager{margin-block:var(--frame-gap)}
 .names-panel,.operations{margin-top:var(--frame-gap)}
 #team-settings .slot-heading{margin-top:var(--frame-gap);margin-bottom:8px}
}
@media print{.help-button,.help-popover,.help-copy{display:none!important}
.league-order-heading{display:block;text-align:center}
.league-order-heading>b{font-size:16px;line-height:1.4}}
