/* Wind strength replaces the dice face while the remaining budget keeps its number size. */
#captainStatus .die{display:flex!important;align-items:center;gap:3px!important;width:auto!important;min-width:0!important;height:auto!important;min-height:60px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;transform:none!important;padding:0!important}
#captainStatus .die svg{width:76px!important;height:60px!important;flex-shrink:0}
#captainStatus .die .wind-force{font:700 14px/20px Arial;white-space:nowrap;color:#254451}#captainStatus .wind-force small{display:block;font:400 11px/15px Arial;color:#607681}
#captainStatus .dicebox{gap:10px!important}
#captainStatus>#instruction{min-width:0}
#captainStatus{flex-wrap:wrap}
#captainStatus #remainingPoints{min-width:44px}
.wind-rules-scale{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}
.wind-rules-scale figure{margin:0;padding:12px;background:#edf8fc;border-radius:12px;text-align:center;min-width:0}
.wind-rules-scale svg{width:100%;max-width:140px;height:110px}
.wind-rules-scale figcaption strong,.wind-rules-scale figcaption span{display:block;font:700 15px/22px Arial}
.wind-rules-scale figcaption span{font-weight:400;font-size:14px}
#rules #appSailExamples{display:block;min-width:0}
#appSailExamples .webicons,#appSailExamples .spiicons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:20px 0}
#appSailExamples figure{margin:0;text-align:center;min-width:0}
#appSailExamples figure svg{height:70px;width:70px;max-width:100%}
#appSailExamples figcaption{font-size:14px;line-height:1.5;overflow-wrap:break-word}
/* Step-based setup: hidden steps do not reserve old grid rows. */
#setup.setup-wizard{max-width:740px;width:min(740px,calc(100vw - 24px))}
#setup.setup-wizard #setupForm{display:flex;flex-direction:column;gap:24px}
#setup.setup-wizard [hidden]{display:none!important}
#setupSteps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
#setupSteps button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;padding:10px 6px;font-size:15px!important;box-shadow:none}
#setupSteps button span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#edf3f6;flex-shrink:0}
#setupSteps button[aria-current=step]{background:#e7f6fd;border-color:#087ba6;color:#075675}
#setupOptions,#setup .course-picker,#setup .setup-boats,#setup .dialogactions{width:100%}
#setup.setup-wizard .course-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
#setup.setup-wizard .dialogactions{margin-top:4px}
#setup.setup-wizard .dialogactions #cancelSetup{flex:0 1 auto}
#setup .dialogactions [hidden]{display:none!important}
/* Details and computer controls share the dialog spacing rhythm. */
#boatDetailFacts{display:grid;grid-template-columns:minmax(110px,.65fr) minmax(0,1fr);gap:12px 20px;margin:24px 0}
#boatDetailFacts dt{font-weight:700}#boatDetailFacts dd{margin:0;line-height:1.55;overflow-wrap:break-word}
#hubComputers{border-top:1px solid #e2ebee;margin-top:24px;padding-top:4px}
#hubComputers[hidden]{display:none!important}
#hubComputers .computer-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:end}
#hubComputers label{margin:0;display:block!important;font-size:16px!important}
#hubComputers select{width:100%;margin:8px 0 0!important;min-height:48px!important}
#hubComputers #computerPause{font-size:16px!important;min-height:48px;padding:12px;white-space:normal}
.turnpanel #actionToolbar>button[aria-disabled=true],#compactActionChoices button[aria-disabled=true]{color:#74868e!important;opacity:.7!important}
#regattaHub #practiceButton{grid-column:1/-1;flex-direction:row;min-height:60px}
#practiceCoach{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin:8px;padding:14px 16px;background:#edf8fc;border:1px solid #acd7e7;border-radius:12px;flex-shrink:0}
#practiceCoach[hidden]{display:none!important}
#practiceCoach>div:first-child{flex:1;min-width:180px}
#practiceCoach strong{font-size:16px;line-height:1.4;color:#075675}
#practiceCoach p{font-size:14px;line-height:1.5;margin:8px 0 0}
.practice-actions{display:flex;flex-wrap:wrap;gap:8px}
.practice-actions button{min-height:44px;padding:10px 12px;font-size:14px}
#practiceError[hidden]{display:none}
@media(max-width:520px){
 #setup.setup-wizard .course-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 #setupSteps button{flex-direction:column;gap:5px;padding:8px 3px}
 #setupOptions{grid-template-columns:1fr}
 #setup.setup-wizard .dialogactions{flex-wrap:wrap}
 #setup.setup-wizard .dialogactions #cancelSetup{flex:1 0 100%;order:3}
 #boatDetailFacts{grid-template-columns:1fr;gap:6px}
 #boatDetailFacts dd{margin-bottom:14px}
 #hubComputers .computer-settings{grid-template-columns:1fr}
 .wind-rules-scale{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #appSailExamples .webicons,#appSailExamples .spiicons{grid-template-columns:repeat(2,minmax(0,1fr))}
 #captainStatus>#instruction{flex-basis:120px}
}
@media(max-width:350px){#captainStatus>#instruction{flex-basis:100%;}#captainStatus .dicebox{margin-left:auto!important}}
@media(max-height:500px) and (orientation:landscape){#practiceCoach{padding:8px 12px;margin:4px}#practiceCoach p{margin-top:4px}#practiceCoach strong{font-size:14px}.practice-actions button{min-height:40px;padding:8px;font-size:13px}}
#hubComputers #computerPause{display:block!important}
#computerPlayback{position:absolute;right:10px;bottom:10px;z-index:16;display:flex;gap:4px;padding:4px;border:1px solid #b8d7e3;border-radius:13px;background:#fffffff2;box-shadow:0 3px 14px #2544511a}
#computerPlayback[hidden]{display:none!important}
#computerPlayback button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;min-width:64px;padding:8px 10px;border:0;box-shadow:none;background:transparent;color:#075e80;font:700 13px/1.3 Arial}
#computerPlayback button:hover:enabled{background:#e8f6fc}
#computerPlayback button svg{width:20px;height:20px;flex-shrink:0}
@media print{#computerPlayback{display:none!important}}
/* One overview: preserve actual controls, validation and chosen values. */
#setup.setup-overview{width:min(960px,calc(100vw - 24px));max-width:960px;padding:22px}
#setup.setup-overview #setupForm{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:16px 24px;align-items:start}
#setup.setup-overview #setupForm>h2{grid-column:1/-1;margin:0;font-size:26px}
#setup.setup-overview #setupOptions{grid-column:1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
#setup #setupGameTitle{grid-column:1/-1;font:700 14px/1.4 Arial!important;margin:0!important}
#setup.setup-overview .course-picker{grid-column:2;grid-row:2/4}
#setup.setup-overview .course-picker legend,#setup.setup-overview .setup-boats h3{font:700 14px/1.4 Arial}
#setup.setup-overview .setup-boats{grid-column:1;grid-row:3}
#setup.setup-overview .course-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
#setup.setup-overview .course-card strong{font-size:11px;line-height:1.3}
#setup.setup-overview .setup-field>label,#setup.setup-overview #names label{font-size:12px;line-height:1.4}
#setup.setup-overview .setup-field input,#setup.setup-overview .setup-field select,#setup.setup-overview #names input{font-size:14px;height:40px}
#setup.setup-overview .dialogactions{grid-column:1/-1;grid-row:4;position:sticky;bottom:-1px;background:#fff;padding:10px 0 2px;z-index:12}
#setup.setup-overview .dialogactions button{min-height:44px;font-size:14px}
#captainStatus .die svg{height:42px!important;width:80px!important}
.wind-rules-scale svg{height:68px}
/* Score footer follows the final visual theme after the global theme rules. */
#scoreDialog.final-score .score-dialog-actions{background:#fff}
#scoreDialog.final-score #closeScorecard{background:#fff;border-color:#dce6e9;color:#365c68}
#scoreDialog.final-score #seriesPodium{display:none}
#scoreDialog.final-score>.eyebrow,#scoreDialog.final-score>.dialog-navigation{display:none}
#scoreDialog.final-score #scoreSummary{font-size:12px!important;line-height:1.5!important}
#scoreDialog.final-score .final-winner-copy h3{font:700 23px/1.2 Arial!important;margin:5px 0!important}
#scoreDialog.final-score .final-winner-copy>small{font-size:10px!important}
#scoreDialog.final-score .final-winning-score small,#scoreDialog.final-score #finalStandingsList strong small{font-size:11px!important}
#scoreDialog.final-score .score-dialog-actions{position:static;display:grid;grid-template-columns:1fr 1fr;gap:10px}
#scoreDialog.final-score .score-dialog-actions>button{min-height:44px;font-size:13px!important;padding:10px 12px}
#scoreDialog.final-score .score-dialog-actions>button:last-child{grid-column:1/-1;background:#fff;border:0;box-shadow:none;min-height:36px;padding:4px;color:#607681}
#scoreDialog.final-score #scoreTitle:focus{outline:none}
#setup.setup-overview{padding:20px!important}
#setup.setup-overview>.dialog-navigation{display:none}
#setup.setup-overview .setup-field>label{font-size:12px!important;line-height:1.4!important}
#setup.setup-overview .setup-field input,#setup.setup-overview .setup-field select,#setup.setup-overview #names input{height:40px!important;min-height:40px!important;padding:7px 8px!important;margin-top:4px!important;font-size:14px!important}
#setup.setup-overview .course-card,#setup.setup-overview .course-card:has(input:checked){padding:10px 6px;min-height:126px;gap:5px}
#setup.setup-overview .course-card svg{height:74px;width:70px}
#setup.setup-overview .course-card strong{font-size:12px!important;line-height:1.3!important}
#setup.setup-overview .course-picker legend,#setup.setup-overview .setup-boats h3{font:700 14px/1.4 Arial!important;margin:0 0 8px!important}
#setup.setup-overview #names{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
#setup.setup-overview #names label{font-size:12px!important;line-height:1.4!important}
#setup.setup-overview .enlarge-course{margin-top:10px;min-height:40px;padding:8px;font-size:13px!important}
#setup.setup-overview #setupForm>.dialogactions{padding-top:10px;margin-top:0}
@media(max-width:700px){
 #setup.setup-overview{padding:16px;max-width:520px;width:calc(100vw - 16px)}
 #setup.setup-overview #setupForm{grid-template-columns:minmax(0,1fr);gap:14px}
 #setup.setup-overview #setupOptions{grid-column:1;grid-row:2;gap:8px 10px}
 #setup.setup-overview .course-picker{grid-column:1;grid-row:3}
 #setup.setup-overview .setup-boats{grid-column:1;grid-row:4}
 #setup.setup-overview .dialogactions{grid-column:1;grid-row:5}
 #setup.setup-overview .setup-field input,#setup.setup-overview .setup-field select,#setup.setup-overview #names input{font-size:16px!important;height:40px}
 #setup.setup-overview .course-card{min-height:95px}
 #setup.setup-overview .course-card svg{height:60px;width:58px}
 #setup.setup-overview #names label{white-space:normal}
}
