#mobileAction,#mobileTasks{display:none}
.playfield{position:absolute;inset:0}.helm-hud{display:contents}
#playerForm #beginGame{background:#143f38;color:#fff;border:2px solid #143f38;min-height:48px;font-weight:700;opacity:1}
#playerForm #beginGame:disabled{background:#526b61;border-color:#526b61;color:#fff;opacity:1}
#mobileTaskPanel{max-height:90dvh;overflow:auto;padding:14px;max-width:650px}#mobileTaskPanel aside{display:block!important;overflow:visible;padding:12px;border:0}.close-mobile-tasks{position:sticky;top:0;z-index:2;width:100%;min-height:44px}
.sign-meaning-card{display:grid;grid-template-columns:64px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid #d5dfd0;align-items:start}.sign-meaning-card img{width:64px;max-height:76px;object-fit:contain;background:white}.sign-meaning-card h4{margin:0 0 5px;font-size:14px}.sign-meaning-card p{margin:0;font-size:12px}.sign-meaning-card a{font-size:11px;color:#275c46}.sign-unresolved{padding:10px;background:#fff1ce;border-radius:7px}
@media(max-width:900px){
 body.mobile-helm{height:var(--mobile-viewport-height,100dvh);display:flex;flex-direction:column;overflow:hidden}
 .mobile-helm header{height:auto;min-height:0;flex-shrink:0;padding:6px 10px;gap:6px;display:flex;flex-wrap:wrap}.mobile-helm .brand{margin-right:auto}.mobile-helm .brand>span{display:none}.mobile-helm .stormjib-header-logo{width:110px}.mobile-helm header button{min-height:36px;padding:6px 8px;font-size:10px}.mobile-helm #mobileTasks{display:block}
 .mobile-helm #playerBar{position:static;flex-shrink:0;margin:0;padding:4px 10px;min-height:0;border-radius:0;font-size:9px;display:flex;align-items:center;gap:5px}.mobile-helm #playerBar[hidden]{display:none}.mobile-helm #playerBar button{font-size:9px;padding:3px 6px;min-height:28px}.mobile-helm #playerLabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
 .mobile-helm main{display:block;flex:1;min-height:0;height:auto;overflow:hidden}.mobile-helm main>aside{display:none}.mobile-helm .sea{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0;overflow:hidden}
 .mobile-helm .helm-hud{grid-row:1;display:grid;grid-template-columns:1fr auto;gap:5px;padding:6px 8px;background:#eff4e9;position:relative;z-index:2}.mobile-helm .maptools,.mobile-helm .zoomtools,.mobile-helm .telemetry,.mobile-helm #toast{position:static;inset:auto;transform:none;width:auto;max-width:none;margin:0;box-shadow:none}
 .mobile-helm .maptools{display:flex;gap:4px;grid-column:1;flex-wrap:wrap;align-items:center}.mobile-helm .maptools button{min-height:34px;padding:5px 7px;font-size:10px}.mobile-helm .zoomtools{grid-column:2;display:flex;align-items:center;padding:2px 4px;gap:0;border:1px solid #d4dfcf;border-radius:8px}.mobile-helm .zoomtools button{min-height:34px;padding:4px 9px}.mobile-helm #zoomReset{display:none}.mobile-helm #zoomValue{font-size:10px;min-width:32px;text-align:center}
 .mobile-helm .telemetry{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px;border:0;background:white;border-radius:7px;pointer-events:none}.mobile-helm .telemetry small{font-size:7px;letter-spacing:.5px;margin-bottom:2px}.mobile-helm .telemetry b{font-size:12px}.mobile-helm .waterSpeed{font-size:8px}
 .mobile-helm #toast{grid-column:1/-1;font-size:10px;line-height:1.35;padding:5px 8px;border-radius:6px;text-align:left;max-height:3.8em;overflow:auto;background:#143f38;color:white}
 .mobile-helm .playfield{position:relative;inset:auto;grid-row:2;min-width:0;min-height:0;overflow:hidden}.mobile-helm #game{width:100%;height:100%;touch-action:none}.mobile-helm .maphead,.mobile-helm .compass{display:none}.mobile-helm .map-brand{top:8px;bottom:auto;right:8px;width:100px;padding:5px 7px}.mobile-helm .map-brand small{font-size:5px}
 .mobile-helm .controls{position:static;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px 10px max(8px,env(safe-area-inset-bottom));background:#e4ecdf;z-index:2}.mobile-helm .controls button{min-height:46px;padding:8px 4px;font-size:12px;touch-action:none}.mobile-helm .controls #neutral{grid-column:1}.mobile-helm .controls #mobileAction{display:block;grid-column:2/5;background:#e5ae39;color:#173f38;font-weight:700}.mobile-helm #mobileAction:disabled{opacity:1;background:#cbd4c5;color:#435643}
 .mobile-helm .speed-alert{top:8px;left:8px;right:8px;padding:8px;pointer-events:none}.mobile-helm .speed-alert strong{font-size:15px}.mobile-helm .speed-alert span{font-size:10px}.mobile-helm .speed-alert b{font-size:19px}.mobile-helm .level-complete-banner{top:8px;left:8px;right:8px;padding:10px}
 .mobile-helm dialog{max-height:calc(var(--mobile-viewport-height,100dvh) - 20px);overflow:auto}.mobile-helm #welcome{max-height:calc(var(--mobile-viewport-height,100dvh) - 20px)}
}
@media(max-width:900px) and (max-height:500px){
 .mobile-helm header{padding:3px 8px}.mobile-helm header button{min-height:30px}.mobile-helm .stormjib-header-logo{width:90px}.mobile-helm #playerBar{display:none}.mobile-helm .helm-hud{grid-template-columns:auto auto 1fr;gap:4px;padding:4px 6px}.mobile-helm .maptools{flex-wrap:nowrap}.mobile-helm .maptools button{min-height:30px;font-size:9px;padding:4px 6px}.mobile-helm .zoomtools button{min-height:30px}
 .mobile-helm .telemetry{grid-column:3;grid-row:1;padding:3px 6px}.mobile-helm .telemetry small{font-size:6px}.mobile-helm .telemetry b{font-size:10px}.mobile-helm .waterSpeed{font-size:7px}.mobile-helm #toast{grid-column:1/-1;max-height:2.8em;font-size:9px;padding:3px 6px}
 .mobile-helm .controls{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(70px,1fr) minmax(170px,2fr);padding:5px 8px max(5px,env(safe-area-inset-bottom));gap:4px}.mobile-helm .controls button{min-height:42px;font-size:11px}.mobile-helm .controls #neutral,.mobile-helm .controls #mobileAction{grid-column:auto}.mobile-helm .map-brand{width:80px}.mobile-helm .speed-alert span{display:none}
}
#playerForm label.remember-player{display:flex;gap:10px;align-items:flex-start;margin:15px 0;padding:10px;background:#edf2e7;border-radius:8px;font-size:12px}#playerForm .remember-player input{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:2px 0 0;padding:0}#playerForm .remember-player small{display:block;line-height:1.5;font-size:10px;margin-top:4px}#forgetPlayer[hidden]{display:none}.mobile-helm #playerBar{flex-wrap:wrap}.mobile-helm #playerLabel{flex-basis:100%}.mobile-helm #playerBar button{flex:1}.mobile-helm #playerBar #forgetPlayer{color:#7b2929}
#playerForm label.marketing-choice{display:flex;align-items:flex-start;gap:10px;padding:12px;margin:16px 0;background:#eaf1e5;border:1px solid #cbdac3;border-radius:8px}#playerForm .marketing-choice input{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:2px 0;padding:0}#playerForm .marketing-choice small{display:block;font-size:10px;line-height:1.6;margin-top:6px;color:#52634d}

/* Desktop uses the same unobstructed map and permanent helm as mobile. */
@media(min-width:901px){main{min-height:450px}.sea{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.helm-hud{display:grid;grid-template-columns:1fr auto;gap:6px;padding:8px 12px;background:#eff4e9;z-index:3}.helm-hud .maptools,.helm-hud .zoomtools,.helm-hud .telemetry,.helm-hud #toast{position:static;inset:auto;transform:none;max-width:none;width:auto;margin:0}.helm-hud .maptools{justify-content:flex-start}.helm-hud .telemetry{grid-column:1/-1;padding:8px;pointer-events:none}.helm-hud #toast{grid-column:1/-1;padding:6px;font-size:11px}.playfield{position:relative;min-height:0;overflow:hidden}.controls{position:static;display:flex;padding:10px;background:#e4ecdf;margin:0}.controls #mobileAction{display:block;min-width:200px;background:#e5ae39;color:#173f38;font-weight:bold}.maphead{display:none}.map-brand{bottom:auto;top:10px;width:130px}.compass{top:15px}.speed-alert,.level-complete-banner{top:12px}}
#pause{display:block!important;visibility:visible!important;opacity:1;min-width:90px}.telemetry #speed,.telemetry #power{font-weight:800}.controls #mobileAction:disabled{opacity:1;background:#cbd4c5;color:#435643}

/* Reserve a separate row for the player bar, including when its links wrap. */
@media(min-width:901px){
 body{display:grid;grid-template-rows:86px minmax(0,1fr) auto;height:100dvh;overflow:hidden}
 main{height:auto;min-height:0;overflow:hidden}
 #playerBar{position:static;inset:auto;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0;padding:6px 12px;border-radius:0;box-shadow:none;border-top:1px solid #ccd8c9;background:#f5f8ee;font-size:10px;min-width:0}
 #playerBar[hidden]{display:none}
 #playerLabel{overflow-wrap:anywhere}
 #playerBar button{min-height:28px;font-size:10px;padding:4px 6px}
 .controls{flex-wrap:wrap;gap:6px;min-width:0}
 .controls button{min-height:42px}
 .controls #mobileAction{flex:1 1 180px;min-width:0;max-width:100%;overflow-wrap:anywhere}
}

header .courses-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:10px 14px;border-radius:8px;background:#064d68;color:#fff;text-decoration:none;font-size:12px;font-weight:700;text-align:center;line-height:1.4}
header .courses-link:hover{background:#08617e}
@media(min-width:901px){body{grid-template-rows:auto minmax(0,1fr) auto}header{height:auto;min-height:86px;flex-wrap:wrap;gap:8px 12px;padding-top:10px;padding-bottom:10px}}
@media(min-width:901px) and (max-width:1150px){header .place{display:none}}
@media(max-width:900px){.mobile-helm header .courses-link{font-size:10px;min-height:36px;padding:6px 8px}}
