.voyageDialog{box-sizing:border-box;width:min(1080px,96vw);max-width:96vw;max-height:94dvh;padding:20px;color:#d9eaf2;background:#102b3d;border:1px solid #6ca5bd;border-radius:20px;box-shadow:0 25px 80px #001421aa}.voyageDialog::backdrop{background:#03101bcc;backdrop-filter:blur(5px)}.voyageHead{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.voyageHead h2{font-size:clamp(18px,2.4vw,28px);margin:3px 0;line-height:1.15}.voyageHead small{font-size:11px;letter-spacing:1.5px;color:#91c4d9}.voyageDialog button{background:#b9ddf7;color:#102c3b;font-weight:800;min-height:42px;border:0;border-radius:9px;padding:8px 13px;cursor:pointer}.voyageDialog button:disabled{opacity:.45;cursor:default}.voyageDialog button.save{background:#96d9b6}.voyageDialog button.danger{background:#e4a39e}.voyageMuted,.voyageDialog small{color:#adcad8}.voyageDialog p{line-height:1.45}.harborBody{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:18px}.harborView{position:relative;align-self:start;border:1px solid #4f7a8e;border-radius:12px;overflow:hidden}.harborView canvas{display:block;width:100%;height:auto;aspect-ratio:900/560;touch-action:none}.harborReadings{position:absolute;left:9px;right:9px;top:9px;display:flex;flex-wrap:wrap;gap:5px;pointer-events:none}.harborReadings span{font-size:12px;font-weight:800;background:#102b3de6;border:1px solid #558196;border-radius:7px;padding:5px 7px;color:#e0f0f8}.harborSide p{margin:0 0 10px;font-size:13px}.harborSide>button{margin-bottom:8px}.harborSide>small{display:block;font-size:11px}.harborPad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0}.harborPad button{touch-action:none;user-select:none;font-size:24px;min-height:58px;padding:4px}.harborPad small{display:block;color:#123446;font-size:9px}.harborPad [data-harbor=up]{grid-column:2}.harborPad [data-harbor=left]{grid-row:2;grid-column:1}.harborPad [data-harbor=down]{grid-row:2;grid-column:2}.harborPad [data-harbor=right]{grid-row:2;grid-column:3}.voyageModels{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.voyageModel{border:1px solid #446e85;background:#17394e;border-radius:12px;padding:12px;display:flex;flex-direction:column}.voyageModel h3{font-size:16px;margin:0}.voyageModel p{font-size:13px;flex:1}.voyageModel button{font-size:12px}.voyageTableWrap{overflow-x:auto}.voyageDialog table{border-collapse:collapse;min-width:650px;width:100%;font-size:12px;text-align:left}.voyageDialog td,.voyageDialog th{padding:10px 8px;border-bottom:1px solid #3f6579;vertical-align:top}.voyageDialog th{color:#acd7eb}.voyageDialog details{margin-top:15px}.voyageDialog summary{cursor:pointer}.voyageReadings{display:flex;flex-direction:column;justify-content:center;padding:5px 8px;border-left:1px solid #7faaa955;gap:4px;font-size:11px;font-weight:800;color:#123446;min-width:85px}.voyageReadings small{font-size:9px;letter-spacing:.5px}.voyageReadings button{background:#b9ddf7;color:#102c3b;font:800 11px system-ui;padding:5px;min-height:27px;border-radius:5px;border:0}.voyageReadings .fuelLow{color:#a42f31}.voyageReadings[hidden]{display:none}#harborHint{min-height:58px}#voyageFeedback{color:#a4e3c2;font-weight:700}
@media(max-width:700px){.voyageDialog{padding:12px;border-radius:12px}.harborBody{grid-template-columns:1fr}.harborSide{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}.harborSide>p:first-child{grid-column:1/-1}.harborPad{grid-row:2/5;margin:0}.harborSide>.voyageMuted{grid-column:1/-1;grid-row:5}.harborSide>small{grid-column:1/-1}.voyageModels{grid-template-columns:repeat(2,1fr)}.harborReadings span{font-size:10px;padding:3px 4px}.voyageReadings{font-size:10px;min-width:74px}}
@media(orientation:landscape) and (max-height:540px){.harborDialog{width:98vw;max-width:98vw;max-height:98dvh;padding:9px}.harborBody{grid-template-columns:minmax(0,1fr) 205px;gap:10px}.harborSide{display:block}.harborSide>.voyageMuted{display:none}.harborSide p{font-size:11px;margin-bottom:4px}.harborSide>small{font-size:10px}.harborPad{margin:5px 0}.harborPad button{min-height:39px;font-size:20px}.harborView canvas{max-height:calc(98dvh - 70px);object-fit:contain;background:#102b3d}.voyageHead{margin-bottom:6px}.voyageHead h2{font-size:18px}.harborSide>button{min-height:30px;padding:5px 7px;font-size:11px;margin-bottom:4px}#harborHint{min-height:0}}

/* Compact voyage information: no extra row in the navigation instruments. */
#voyageInfoButton{width:40px;min-width:40px;min-height:40px;padding:0;border-radius:50%;background:#b9ddf7;color:#102c3b;font:bold 24px Georgia,serif;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#voyageInfoDialog{width:min(380px,94vw);background:#102b3d}
#voyageInfoDialog .voyageReadings{border:0;padding:8px 0;gap:14px;color:#e0f0f8;font-size:18px}
#voyageInfoDialog .voyageReadings small{font-size:11px}
#voyageInfoDialog .voyageReadings button{min-height:44px;font-size:15px;padding:10px}
#voyageInfoDialog .fuelLow{color:#ffb4ae}
.topInstruments{background:#cce3ef!important;backdrop-filter:none!important}
@media(max-width:600px){header nav{gap:5px}#voyageInfoButton{width:34px;min-width:34px;min-height:38px}}

.directSailPanel{background:#102d40!important;max-height:calc(100dvh - 100px);overflow:auto}.directSailPanel label{display:block;margin-top:14px;font-size:13px}.directSailPanel input[type=range]{display:block;width:100%;min-height:36px}.directSailPanel .directEfficiency{display:block;background:#b9ddf7;color:#102c3b;font-weight:800;padding:12px;border-radius:9px;margin:12px 0}.directSailPanel .trimEnds{font-size:11px;margin:3px 0 12px}.directSailPanel button{touch-action:manipulation;-webkit-user-select:none;user-select:none}.cockpit #proaToggle,.cockpit #sailsToggle,button[hidden][data-panel=sailsPanel],button[hidden][data-panel=proaPanel]{display:none!important}

#coastMap{pointer-events:auto!important;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#coastMap:focus-visible{outline:3px solid #b9ddf7;outline-offset:3px}

/* Floating instruments: preserve the sky, with no backing panel. */
.topInstruments,body.panelOpen .topInstruments{background:transparent!important;border:0!important;border-radius:0;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;padding:0!important;color:#eef8ff;text-shadow:0 1px 2px #071e30,1px 0 2px #071e30,-1px 0 2px #071e30;display:flex;flex-wrap:nowrap;align-items:center;gap:12px;width:auto;max-width:calc(var(--scene-width,100vw) - 24px)}
.topInstruments .windInstrument,.topInstruments .headingInstrument,.topInstruments .destinationInstrument{border:0!important;padding-left:0}
.topInstruments #headingDial{color:#eef8ff;filter:drop-shadow(0 1px 1px #071e30)}
.topInstruments #windArrow{stroke:#b7f3ed;fill:#b7f3ed;filter:drop-shadow(0 1px 1px #071e30)}
.topInstruments #destinationNeedle{stroke:#ffc29a;fill:#ffc29a;filter:drop-shadow(0 1px 1px #071e30)}
#effHud,body.panelOpen #effHud{flex:0 0 auto;grid-column:auto;min-width:0;padding:0;margin:0;border:0!important;background:transparent!important;color:#eef8ff;flex-direction:column;gap:3px;text-shadow:inherit;min-height:44px}
#effHud .effReadings,body.panelOpen #effHud .effReadings{flex-direction:column;gap:5px;flex-wrap:nowrap}
#effHud .effReadings>span,body.panelOpen #effHud .effReadings>span{background:transparent!important;padding:0;min-width:0;gap:4px;font-size:12px;color:#eef8ff}
#effHud .effReadings>.good{color:#b6f5ce}#effHud .effReadings>.mid{color:#c0e5ff}#effHud .effReadings>.bad{color:#ffc0c0}
#effHud i{background:transparent;border-radius:0;width:auto;height:auto;color:inherit}
@media(max-width:600px){
 .topInstruments,body.panelOpen .topInstruments{display:grid;grid-template-columns:1.05fr 1fr 1.15fr .9fr 1fr;width:calc(var(--scene-width,100vw) - 24px);max-width:none;gap:5px;align-items:center}
 .motionReadings,body.panelOpen .motionReadings{min-width:0;gap:5px}
 .motionReadings strong,body.panelOpen .motionReadings strong{font-size:21px}
 .motionReadings span{font-size:9px}
 .windInstrument,body.panelOpen .windInstrument,.headingInstrument,body.panelOpen .headingInstrument,.destinationInstrument{width:auto;min-width:0}
 #windDial{width:42px;height:42px}
 #headingDial{width:46px;height:46px}
 .headingInstrument>span,.windInstrument>span{font-size:8px}
 .destinationInstrument svg{width:36px;height:34px}
 #effHud,body.panelOpen #effHud{grid-column:5;grid-row:1;align-self:center}
 #effHud>small{font-size:7px;letter-spacing:0}
 #effHud .effReadings>span,body.panelOpen #effHud .effReadings>span{font-size:11px}
}

.topInstruments #headingDial #heading,body.panelOpen .topInstruments #headingDial #heading{color:#eef8ff;text-shadow:0 1px 2px #071e30,1px 0 2px #071e30,-1px 0 2px #071e30}
@media(max-width:600px){.topInstruments #headingDial,body.panelOpen .topInstruments #headingDial{width:46px;height:46px}.topInstruments #headingDial #heading,body.panelOpen .topInstruments #headingDial #heading{font-size:17px}}

#challengeDialog{width:min(640px,96vw)}#challengeDialog label{display:block;margin:12px 0}#challengeDialog select,#challengeDialog input{display:block;width:100%;margin:5px 0;padding:9px;background:#17394e;color:#e0f0f8;border:1px solid #608398;border-radius:6px}#challengeDialog>button{margin:6px 8px 6px 0}

#destinationETA{display:block;font-size:9px;font-weight:800;line-height:1.2;margin-top:3px;white-space:normal}.destinationInstrument{min-width:0}

#timeHold{background:#b9ddf7;color:#102c3b;font-weight:800;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-height:44px}#timeHold[aria-pressed=true]{background:#96d9b6}.portJobs canvas{display:block;width:100%;height:auto;aspect-ratio:8/5}.portJobs canvas[hidden]{display:none}.portJobs [data-controls]{display:flex;gap:8px;flex-wrap:wrap}.portJobs [data-controls] button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-height:48px;flex:1 0 90px}.portJobs [data-offers] button{display:block;width:100%;margin:12px 0}.portJobs{width:min(1000px,96vw)}

.cockpit #timeHold{width:48px!important;min-width:48px!important;max-width:48px!important;flex:0 0 48px!important;padding:0!important;display:grid;place-items:center;font-size:0;overflow:hidden}.cockpit #timeHold svg{display:block;width:27px;height:24px;pointer-events:none}

/* Stable instrument slots: changing digits never drives layout. */
.topInstruments,body.panelOpen .topInstruments{display:grid;grid-template-columns:88px 84px 76px 82px 64px;align-items:center;min-height:100px;gap:10px}
.topInstruments>div,.topInstruments #effHud{box-sizing:border-box;min-width:0!important;width:100%!important;max-width:100%;height:96px;justify-content:center}
.topInstruments{font-variant-numeric:tabular-nums}.topInstruments strong,.topInstruments span,.topInstruments small,.topInstruments b{font-variant-numeric:tabular-nums}
.topInstruments .windInstrument>span,.topInstruments .headingInstrument>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
#destinationETA{height:24px;max-height:24px;overflow:hidden;line-height:12px}#destinationDistance{white-space:nowrap}
#effHud .effReadings{width:100%}#effHud .effReadings>span{width:100%;justify-content:space-between}#effHud .effReadings>[hidden]{display:none!important}
header #timeRealQuick{box-sizing:border-box;width:46px;min-width:46px;padding:4px;font-size:11px;justify-content:center}header #timeRealQuick[hidden]{display:inline-flex!important;visibility:hidden;pointer-events:none}
@media(max-width:600px){.topInstruments,body.panelOpen .topInstruments{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.topInstruments .motionReadings{justify-content:center}.topInstruments .headingInstrument>span,.topInstruments .windInstrument>span{font-size:8px}header .brand{min-width:0;overflow:hidden}header .brand>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
/* The original games own their controls inside a full stage viewport. */
.portJobs.playing-stage{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:8px;border:0;border-radius:0;box-sizing:border-box;display:flex;flex-direction:column;gap:5px;overflow:hidden}.portJobs.playing-stage .voyageHead{flex:0 0 auto}.portJobs.playing-stage h2{font-size:16px;margin:0}.portJobs.playing-stage [data-intro],.portJobs.playing-stage [data-status]{font-size:12px;margin:0}.portJobs.playing-stage [data-status]:empty,.portJobs.playing-stage [data-offers]:empty{display:none}.portJobs.playing-stage [data-stage]{flex:1;min-height:0}.portJobs iframe{width:100%;height:100%;border:0;display:block;background:#102c3b}.portJobs.playing-stage [data-controls] button{min-height:34px;font-size:12px}

#motorDock{position:absolute;bottom:calc(100% + 8px);right:0;display:flex;flex-direction:column;align-items:flex-end;gap:6px;pointer-events:auto}#motorGearControls{display:flex;gap:5px}#motorGearControls[hidden],#rescueQuick[hidden]{display:none}#motorDock button{min-height:44px;min-width:40px;padding:8px 9px;font-size:12px;font-weight:800;color:#102c3b;background:#b9ddf7;white-space:nowrap}#motorDock [aria-pressed=true]{background:#95d9b5;outline:2px solid #2b8b64}#motorDock #rescueQuick{background:#f0a0ac}.motorHint{font-size:12px;line-height:1.45}body.panelOpen #motorDock{display:none}

.motorPanelGears{display:flex;gap:6px;margin-top:10px}.motorPanelGears[hidden]{display:none}.motorPanelGears button{flex:1;min-height:44px;font-weight:800;padding:8px;font-size:12px;background:#b9ddf7;color:#102c3b}.motorPanelGears [aria-pressed=true]{background:#95d9b5;outline:2px solid #2b8b64}

body.motorDockVisible:not(.panelOpen) .cameraZoom{transform:translateY(calc(-1 * var(--motor-extra,0px)))}body.motorDockVisible:not(.panelOpen) #message{bottom:calc(90px + var(--motor-extra,0px))}body.motorDockVisible:not(.panelOpen) #sailingAlert{bottom:calc(126px + var(--motor-extra,0px))}

#castawayQuick{position:fixed;left:20px;top:calc(var(--hud-bottom) + 176px);z-index:3;min-height:44px;padding:8px 12px;background:#f0a0ac;color:#102c3b;font-size:12px;font-weight:800;box-shadow:0 3px 10px #06253644}#castawayQuick[hidden]{display:none}body.boatEditing #castawayQuick,body.panelOpen #castawayQuick,body.coachVisible #castawayQuick{display:none!important}.castawayDialog{width:min(630px,94vw)}.castawayDialog>p{font-size:13px;line-height:1.5}.castawayCard,.castawayCargo{border:1px solid #66879c;border-radius:12px;padding:12px;margin:12px 0}.castawayCard h3,.castawayCargo h3{margin:0 0 8px;font-size:17px}.castawayCard p,.castawayCargo p{font-size:13px;line-height:1.45}.castawayCard button,.castawayCargo button{display:block;width:100%;min-height:44px;margin-top:8px;background:#b9ddf7;color:#102c3b;font-weight:800}.castawayCargo{border-color:#95d9b5}.castawayDialog [data-feedback]:empty{display:none}.castawayDialog [data-feedback]{padding:10px;border:1px solid #95d9b5;border-radius:8px}.castawayCard button:disabled{opacity:.6}
@media(max-width:650px){#castawayQuick{left:12px;top:calc(var(--hud-bottom) + 122px);font-size:11px;padding:8px 10px}}
@media(orientation:landscape) and (max-height:550px){#castawayQuick{left:auto;right:calc(var(--dock-space) + 64px);top:136px;min-height:36px}}

/* Icons occupy the centre of their own hit targets at every viewport size. */
.cockpit #timeHold,.cockpit #playPause{display:flex!important;justify-content:center!important;align-items:center!important;gap:0!important;text-align:center;line-height:1}
.directSailPanel .mainBandChoices{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.directSailPanel .mainBandChoices button{font-size:12px;padding:10px 5px;min-height:44px;white-space:normal}.directSailPanel .mainBandChoices [aria-pressed=true]{background:#95d9b5;color:#102c3b;outline:2px solid #367f65}

#motorDock #nearbyPortButton{background:#95d9b5;color:#102c3b;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-weight:800}#motorDock #nearbyPortButton[hidden]{display:none}@media(max-width:650px){#motorDock #nearbyPortButton{max-width:205px;font-size:11px}}
#nearbyActivityButton{max-width:240px;background:#b9d9ee;color:#123543;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){#nearbyActivityButton{max-width:205px}}

/* The scrolling shortcut rail stops above the zoom, even when motor actions lift it. */
.screenShortcuts,body.panelOpen .screenShortcuts{bottom:var(--shortcut-bottom,198px)!important;max-height:max(0px,calc(100dvh - var(--hud-bottom,200px) - var(--shortcut-bottom,198px)))!important}

/* Character encounter: paused, full viewport, readable on phones and desktop. */
.rescueEncounter{box-sizing:border-box;position:fixed;inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;padding:0;color:#fff;background:radial-gradient(ellipse at 30% 20%,#436f7b,#092b40 65%);overflow:auto;grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr);align-items:center;gap:clamp(16px,4vw,64px)}
.rescueEncounter[open]{display:grid}.rescueEncounter::backdrop{background:#031a29}.rescuePortrait{position:relative;align-self:stretch;min-height:220px;overflow:hidden;display:flex;align-items:end;justify-content:center;background:linear-gradient(170deg,#6b98a633,#103f54aa 70%)}
.rescuePortrait img{width:100%;height:100%;position:absolute;inset:0;object-fit:contain;object-position:center bottom;filter:saturate(.75) contrast(1.08);mask-image:linear-gradient(#000 75%,transparent)}
.rescueSpray{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 20% 83%,#c3e9ef99 0,transparent 32%),radial-gradient(ellipse at 85% 100%,#75bfceaa,transparent 50%),repeating-linear-gradient(108deg,transparent 0 80px,#e3faff22 81px,transparent 83px 180px)}
.rescueSpeech{padding:clamp(20px,4vw,56px);padding-left:0;max-width:720px}.rescueSpeech small{color:#a6d8e4;font-size:12px;letter-spacing:.18em;font-weight:800}.rescueSpeech h2{font-size:clamp(30px,5vw,64px);margin:12px 0 20px;color:#ffd38c}.rescueSpeech blockquote{margin:0 0 20px;padding:0;border:0;font-size:clamp(20px,2.6vw,32px);line-height:1.4}.rescueSpeech p{color:#b9d6dd;font-size:14px;line-height:1.5}.rescueActions{display:grid;gap:12px;margin-top:24px}.rescueActions button{min-height:50px;padding:14px 20px;background:#b7e6d3;color:#102e3a;font-size:16px;font-weight:800;border-radius:14px;white-space:normal}.rescueActions button+button{background:#244c61;color:#fff}.rescueActions button:disabled{background:#758d97;color:#fff}
@media(max-width:650px) and (orientation:portrait){.rescueEncounter{grid-template-columns:1fr;grid-template-rows:minmax(190px,38dvh) auto;gap:0;align-items:start}.rescueSpeech{padding:20px 24px max(24px,env(safe-area-inset-bottom))}.rescueSpeech h2{font-size:30px;margin:6px 0 12px}.rescueSpeech blockquote{font-size:20px}.rescueActions{margin-top:16px}.rescuePortrait{height:100%}}

/* Only the three direction needles are red; readings retain their original colours. */
.topInstruments #windArrow,.topInstruments #destinationNeedle,.topInstruments #headingNeedle{stroke:#ff2424!important;fill:#ff2424!important;filter:drop-shadow(0 1px 1px #190606)!important}

.introAccess{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.introAccess button{min-height:50px;background:#b9ddf7!important;color:#102c3b!important;font-size:16px;font-weight:800;padding:12px;border:1px solid #81abc2;border-radius:12px}.introAccess #introLoad{grid-column:1/-1;margin:0;color:#102c3b!important;background:#b9ddf7!important}.introSaveHint{font-size:13px!important;line-height:1.5;color:#c5e2ef}.cloudProgress{display:grid;gap:12px;margin:16px 0}.cloudProgress button,.cloudSavesEntry{background:#b9ddf7!important;color:#102c3b!important;font-weight:800;min-height:48px;font-size:16px;padding:12px;border-radius:10px}.cloudProgress button:first-of-type{background:#a2d5bf!important}.cloudProgress p{font-size:14px;line-height:1.5}
/* The chart is one full-screen map; destination details are a separate readable screen. */
#chartModal.modal,body.chartExpanded #chartModal.modal{inset:0!important;width:100vw!important;height:100dvh!important;padding:0!important;z-index:30!important;background:#102d40}
#chartModal>.chartPanel,body.chartExpanded #chartModal>.chartPanel{position:relative!important;box-sizing:border-box;width:100%!important;height:100dvh!important;max-height:none!important;max-width:none!important;margin:0!important;padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:0!important;border-radius:0!important}
#chartModal .panelHead{position:static!important;display:flex;align-items:center;gap:8px;flex:0 0 auto;margin:0 0 8px!important;padding:0!important;min-height:48px}#chartModal .panelHead>div{flex:1;min-width:0}#chartModal .panelHead h2{font-size:20px!important;margin:0}#chartModal .eyebrow{display:none}#chartExpand{display:none!important}
#chartModal .panelHead button{font-size:15px!important;min-height:44px;padding:10px 14px!important;flex-shrink:0}#chartActions{background:#b9ddf7;color:#102c3b;font-weight:800}
#chartModal .chartLayout,body.chartExpanded #chartModal .chartLayout{display:block!important;flex:1!important;min-height:0!important;height:auto!important;overflow:hidden}
#chartModal .chartWrap,body.chartExpanded #chartModal .chartWrap{position:relative;width:100%!important;height:100%!important;min-height:0!important;box-sizing:border-box}
#chartModal #chart{touch-action:none;cursor:grab}#chartModal #chart:active{cursor:grabbing}
#chartModal .chartZoom{top:10px;left:10px;right:auto;display:flex;align-items:center;gap:6px;max-width:calc(100% - 20px);z-index:2}#chartModal .chartZoom button{min-width:44px;min-height:44px;padding:8px 12px;font-size:22px;background:#b9ddf7;color:#102c3b;font-weight:800;border-radius:10px}#chartModal #chartCenter{font-size:15px}#chartModal #chartZoomLevel{font-size:13px;padding:6px;background:#102d40cc;border-radius:6px}
#chartModal .chartSide,body.chartExpanded #chartModal .chartSide{display:none!important}
#chartModal .detailsOpen .chartSide,body.chartExpanded #chartModal .detailsOpen .chartSide{display:block!important;position:absolute;inset:0;z-index:4;background:#102d40;box-sizing:border-box;width:100%;max-height:none!important;height:100%;overflow:auto!important;padding:16px max(20px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));touch-action:pan-y;font-size:18px}
#chartModal .chartDetailsHead{position:sticky;top:-16px;background:#102d40;padding:12px 0;z-index:2}#chartModal .chartDetailsHead h2{font-size:26px;margin:14px 0 6px}#chartModal .chartSide .routeDetails{display:none!important}
#chartModal .chartSide p,#chartModal #portInfo{font-size:18px!important;line-height:1.55!important;margin:16px 0;color:#d0e4ee}#chartModal .chartSide label{display:block!important;font-size:15px;margin:18px 0 8px}#chartModal .chartSide select{display:block;width:100%!important;min-height:56px!important;height:auto!important;font-size:18px!important;padding:12px!important;color:#102c3b;background:#b9ddf7;box-sizing:border-box;border-radius:10px}
#chartModal .chartSide button{display:block;box-sizing:border-box;width:100%;font-size:18px!important;line-height:1.35;white-space:normal;min-height:52px;padding:14px!important;margin:12px 0;font-weight:800}#chartModal #chartDetailsBack{background:#b9ddf7;color:#102c3b;width:auto;margin:0;min-height:46px}#chartModal #setRoute{background:#a2d5bf!important;color:#102c3b!important}#chartModal #clearRoute{background:#d88989;color:#102c3b}
#chartModal .chartActivity{border:1px solid #66879c;border-radius:14px;padding:18px;margin:18px 0;background:#16384c}#chartModal .chartActivity h3{font-size:21px;margin:0 0 12px}#chartModal .chartActivity strong{font-size:20px;color:#b6f5ce}#chartModal .chartLegendText{font-size:14px!important;line-height:1.6;color:#abc8d8;margin:24px 0}#chartModal .chartLegendText a{color:#b9ddf7;text-decoration:underline}
#miniMapZoom{position:fixed;z-index:7;min-width:44px;min-height:44px;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;pointer-events:auto;padding:5px 7px;background:#b9ddf7;color:#102c3b;font-weight:800;font-size:13px;border:1px solid #5485a0;border-radius:8px}#miniMapZoom[hidden],body.panelOpen #miniMapZoom,body.boatEditing #miniMapZoom,body.coachVisible #miniMapZoom{display:none!important}
#chartModal [data-chart-mode=destination] #portSelect,#chartModal [data-chart-mode=destination] label[for=portSelect],#chartModal [data-chart-mode=destination] #clearRoute,#chartModal [data-chart-mode=destination] #saveButton,#chartModal [data-chart-mode=destination] #resetButton,#chartModal [data-chart-mode=destination] #tripDistance,#chartModal [data-chart-mode=destination] #chartOverview,#chartModal [data-chart-mode=destination] .chartSide>p:not(#chartSelectionStats):not(#missionChartHint){display:none!important}
#chartShowDestination,#chartOverview{background:#b9ddf7!important;color:#102c3b!important}
/* Harbour conversations: familiar faces and readable choices. */
.portConversation{box-sizing:border-box;width:min(960px,96vw);max-width:none;max-height:94dvh;padding:0;border:2px solid #8fb8ca;border-radius:22px;background:#102f40;color:#e5f1f5;overflow:auto}.portConversation[open]{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr)}.portConversation::backdrop{background:#001b2cce}.portConversation>img{width:100%;height:100%;max-height:80dvh;object-fit:contain;background:#234d60;align-self:stretch}.portConversation>section{padding:clamp(22px,4vw,42px)}.portConversation small{font-size:14px;font-weight:800;letter-spacing:.06em;color:#a9d4e8}.portConversation h2{font-size:34px;margin:14px 0}.portConversation blockquote{font-size:clamp(20px,2.4vw,28px);line-height:1.5;margin:0 0 24px;border:0;padding:0}.portConversationActions{display:grid;gap:12px}.portConversationActions button{min-height:52px;padding:14px;border-radius:13px;background:#b7dff5;color:#102b38;font-size:18px;font-weight:800;white-space:normal}.portConversationActions button.danger{background:#d56b72;color:#142e3b}.portConversationActions button:first-child:not(.danger){background:#a9d9bd}
@media(max-width:650px){.portConversation[open]{grid-template-columns:1fr}.portConversation>img{height:26dvh;min-height:150px;object-position:center}.portConversation>section{padding:20px}.portConversation h2{font-size:28px;margin:10px 0}.portConversation blockquote{font-size:21px}}

/* 0.52: navigation beside the mini chart, open sky above the instruments. */
header{right:auto!important;bottom:auto;gap:0;z-index:6;max-width:86px}
header nav{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
header nav button{box-sizing:border-box;min-height:44px;padding:8px 10px;background:#b9ddf7;color:#102c3b;font-weight:800;font-size:13px}
header #voyageInfoButton{width:44px;min-width:44px;height:44px;min-height:44px;font-size:26px}
#timeRealQuick{display:none!important}
.topInstruments,body.panelOpen .topInstruments{top:max(12px,env(safe-area-inset-top))!important}
@media(orientation:landscape) and (max-height:550px){#coastMap,body.panelOpen #coastMap{left:12px!important;right:auto!important;top:var(--hud-bottom)!important;width:150px;height:105px}}

/* Compact mast reading below the navigation buttons, never attached to the rig. */
header{flex-direction:column!important;align-items:flex-start!important}
#mastLoad{display:flex;flex-direction:column;align-items:center;justify-content:center;width:78px;min-height:48px;max-width:100%;margin-top:7px;padding:5px;border:1px solid #537c91;border-radius:9px;color:#10202a;font-weight:900;font-variant-numeric:tabular-nums;line-height:1.1;transition:background-color .2s}
#mastLoad[hidden]{display:none!important}#mastLoad small{font-size:10px;letter-spacing:.07em;color:inherit}#mastLoad strong{font-size:19px;color:inherit}#mastLoad[data-over=true]{border:2px solid #9b1223}
.stormPresets{margin:16px 0;padding:12px;border:1px solid #568398;border-radius:12px}.stormPresets article{padding:12px;margin:12px 0;background:#173b50;border-radius:10px}.stormPresets h4{margin:0 0 8px;font-size:19px;color:#cfebf6}.stormPresets p{line-height:1.5}.stormPresets button,#challengeCreate,#previewSeaSounds{background:#b9ddf7;color:#102c3b;font-weight:800;min-height:44px;white-space:normal}#challengeDetails{margin:14px 0;line-height:1.5;font-weight:700}#challengeStart{background:#a2d5bf;color:#102c3b;font-weight:800}

/* Same row as Information, filling the gap beside the mini chart. */
header #mastLoad{position:absolute;top:51px;left:51px;margin:0;width:72px;min-height:44px;height:44px;padding:3px}
header #mastLoad strong{font-size:18px}header #mastLoad small{font-size:9px}

/* Compact game wallet and prominent purchasing balance. */
header #balanceHud{position:absolute;top:0;left:calc(100% + 8px);height:44px;display:flex;align-items:center;margin:0;padding:0;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:#85bb65;text-shadow:0 1px 3px #001b12;white-space:nowrap;pointer-events:none}
#balanceHud[hidden],.introAccess [hidden]{display:none!important}
.shopBalance,.fleetSummary{font-size:20px;font-weight:800;color:#d7ecc4;padding:12px;background:#143748;border-radius:9px}
#mastIncidentDialog{max-width:min(420px,90vw);background:#132e3e;color:#e2edf2;border:1px solid #537c91;border-radius:16px;padding:22px}
#mastIncidentDialog button{margin:6px}

/* The embedded game already provides its title and return button. */
.portJobs.playing-stage .voyageHead,.portJobs.playing-stage [data-intro]{display:none}.portJobs.playing-stage{padding:0;gap:0}.portJobs.playing-stage [data-controls]{padding:3px 8px}
