:root{
 color-scheme:dark;
 --ink:#102b31;--panel:#102c32;--inset:#0b2026;--rim:#8e825f;--brass:#c4a570;
 --pale:#f2e8c8;--quiet:#becbc0;--ember:#ffbd78;--signal:#f0af74;--green:#ace0c2;
 --sans:"Inter","Segoe UI",Arial,sans-serif;--serif:"Iowan Old Style","Palatino Linotype",Georgia,serif;
 --mono:"IBM Plex Mono",Consolas,"Liberation Mono",monospace
}
*,*::before,*::after{box-sizing:border-box}
html,body{width:100%;height:100%;overflow:hidden;margin:0;overscroll-behavior:none;background:#102e46}
body{color:var(--pale);font:1rem/1.34 var(--sans);-webkit-tap-highlight-color:transparent}
button,a{color:inherit;font:inherit}button{cursor:pointer;touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid #ffd183;outline-offset:3px}
h1,h2,h3,p,figure,dl,dd{margin:0}
[hidden]{display:none!important}
.sr-only,.icon-library{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.icon{display:block;flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pilot-house{
 position:relative;isolation:isolate;display:grid;grid-template-rows:auto minmax(0,1fr) auto;
 width:100%;height:100vh;height:100dvh;overflow:hidden;
 --safe-x:max(10px,env(safe-area-inset-left),env(safe-area-inset-right))
}
#chart{position:absolute;inset:0;z-index:-2;display:block;width:100%;height:100%;touch-action:none;cursor:crosshair;background:#194767}
.bridge-header{
 grid-row:1;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
 padding:max(clamp(10px,2vh,20px),env(safe-area-inset-top)) max(clamp(12px,2vw,34px),var(--safe-x)) 5px;
 pointer-events:none;user-select:none
}
.identity,.nav-cluster{
 display:flex;align-items:center;pointer-events:auto;
 background:linear-gradient(145deg,#244246f5,#112b31f8);border:1px solid #80795f;
 box-shadow:0 3px 12px #09233266,inset 0 1px 0 #65776b55;border-radius:5px
}
.identity{gap:11px;padding:7px 15px 7px 8px}
.fleet-mark{
 display:grid;place-items:center;width:43px;height:43px;flex:none;border:1px solid #c1a471;border-radius:50%;
 color:#edcb87;background:radial-gradient(circle at 40% 32%,#3b5350,#142e34 75%);box-shadow:0 0 0 2px #203b3a,inset 0 0 0 3px #263c3b
}
.fleet-mark svg{display:block;width:35px;height:35px}
.identity-text{min-width:0}.identity h1{font:700 clamp(1.35rem,2vw,1.88rem)/1.05 var(--serif);letter-spacing:-.035em}
.voyage-name{color:#c5d0c0;font:500 .72rem/1.25 var(--mono);margin-top:3px}
.name-divider{color:var(--brass)}
.nav-cluster{gap:2px;padding:3px}.nav-button,.aux-key{
 display:flex;align-items:center;justify-content:center;gap:6px;padding:0 10px;
 color:var(--pale);background:transparent;border:1px solid transparent;border-radius:3px;font-weight:600
}
.nav-button{min-height:40px;min-width:40px;font-size:.84rem}.nav-button:has(span){padding:0 12px}
.nav-button:hover,.aux-key:hover{background:#34504e;border-color:#65756a}
.speaker-off,.sound-button[aria-pressed=false] .speaker-on{display:none}
.sound-button[aria-pressed=false] .speaker-off{display:block}
#mapWindow{grid-row:2;min-height:0;margin:0 max(8px,var(--safe-x));pointer-events:none}
.console{
 grid-row:3;position:relative;padding:0 max(clamp(12px,2.4vw,38px),var(--safe-x)) max(8px,env(safe-area-inset-bottom));
 background:linear-gradient(180deg,#234247 0%,#1b373d 40%,#132d33 100%);
 border-top:3px solid #aa9063;box-shadow:0 -1px 0 #253b3c,0 -5px 15px #10232b42,inset 0 1px 0 #e5c18575;
 user-select:none
}
.console::before,.console::after{
 content:"";position:absolute;top:5px;width:5px;height:5px;border:1px solid #716a50;border-radius:50%;
 background:linear-gradient(135deg,#bdb291 40%,#484d43 43% 55%,#b5a783 58%);box-shadow:0 1px 0 #0b1f24
}
.console::before{left:5px}.console::after{right:5px}
.orders{display:flex;align-items:center;gap:clamp(12px,2.5vw,38px);padding:8px 0;border-bottom:1px solid #6d7d6b70}
.target{display:flex;align-items:center;gap:10px;flex:none}
.target-mark{color:var(--ember);width:23px;height:23px}
.target-text{display:grid;gap:1px}
#objective,.plate-label,.dialog-kicker,.offer-kind{
 color:var(--brass);font:600 .69rem/1.15 var(--mono);letter-spacing:.085em;text-transform:uppercase
}
#destination{color:#fff0ca;font:700 clamp(1.06rem,1.52vw,1.36rem)/1.1 var(--serif);letter-spacing:-.025em}
#distance{font:600 .82rem/1.2 var(--mono);color:#e5c795;white-space:nowrap}
#status{flex:1;min-width:0;color:#d3dcd0;font-size:clamp(.84rem,1.06vw,.97rem);line-height:1.32}
.shift-stats{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px 11px;max-width:260px;color:var(--quiet);font-size:.74rem}
.shift-stats b{color:var(--pale);font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
#shiftDeadline{color:var(--ember)}
.engine-room{display:grid;grid-template-columns:auto minmax(230px,1fr) auto auto;align-items:center;gap:clamp(10px,2.44vw,38px);padding-top:8px}
.station{display:flex;flex-direction:column;gap:3px}
.plate-label{font-size:.64rem;letter-spacing:.14em;line-height:1.2}
.steering-keys,.engine-keys,.aux{display:flex;align-items:center;gap:5px}
.iron-key{
 display:flex;align-items:center;justify-content:center;gap:5px;min-width:51px;min-height:44px;padding:0 12px;
 border:1px solid #908365;border-bottom-color:#54605a;border-radius:5px;color:#ebdbb4;
 background:linear-gradient(#405658,#2d4548 45%,#2a4144);box-shadow:inset 0 1px #6c7970,0 2px 0 #102a30;
 font:650 .78rem/1 var(--sans);touch-action:none;-webkit-touch-callout:none
}
.iron-key .icon{width:21px;height:21px;stroke-width:2}
.iron-key .left{transform:rotate(-90deg)}.iron-key .right{transform:rotate(90deg)}.iron-key .down{transform:rotate(180deg)}
.iron-key:hover{border-color:var(--brass);background:linear-gradient(#50635a,#34504e)}
.iron-key.is-held,.iron-key:active,.aux-key:active,.nav-button:active{
 color:#ffde9a;background:#24423d;border-color:#cab77f;box-shadow:inset 0 2px 4px #0a221f
}
.wheel{color:#bba77b;filter:drop-shadow(0 1px 1px #061d20);width:46px;height:46px;transition:transform .2s ease}
.steering-keys:has([data-control=left].is-held) .wheel{transform:rotate(-25deg)}
.steering-keys:has([data-control=right].is-held) .wheel{transform:rotate(25deg)}
.throttle{background:linear-gradient(#3c6258,#2d4847);color:#d6edc4}
.telemetry{display:flex;align-items:center;justify-content:center;gap:clamp(9px,1.5vw,24px);min-width:0}
.speed-dial{
 display:grid;place-content:center;position:relative;isolation:isolate;width:69px;height:69px;flex:none;
 border:3px solid #ab9568;border-radius:50%;box-shadow:0 0 0 1px #132329,inset 0 0 0 2px #414a3b,0 2px 5px #0e2429;
 background:radial-gradient(circle at 45% 38%,#2a3936,#102929 85%)
}
.speed-dial::before{
 content:"";position:absolute;z-index:-1;inset:4px;border-radius:50%;
 background:repeating-conic-gradient(from -114deg,#ccba888f 0deg 1.8deg,transparent 2deg 15deg);
 mask:radial-gradient(transparent 57%,#000 58%);clip-path:polygon(0 0,100% 0,100% 75%,50% 59%,0 75%)
}
.dial-readout{display:flex;align-items:baseline;gap:3px;color:#f6dc9a;font:700 1.47rem/1 var(--mono);letter-spacing:-.075em}
.knots{font:italic .78rem var(--serif);letter-spacing:0}
#speedIndicator{display:block;appearance:none;width:30px;height:3px;margin:4px auto 0;background:#50625b;border:0}
#speedIndicator::-webkit-meter-inner-element,#speedIndicator::-webkit-meter-bar,#speedIndicator::-webkit-meter-optimum-value{height:3px;border:0;border-radius:0;background:none}
#speedIndicator::-webkit-meter-optimum-value{background:#efc680}
#speedIndicator::-moz-meter-bar{background:#efc680}
.panel-readings{display:flex;gap:clamp(8px,1.75vw,29px);align-items:baseline}
.panel-readings>div{min-width:0}
.panel-readings dt{display:flex;align-items:center;gap:4px;font-size:.73rem;color:var(--quiet)}
.panel-readings dt .icon{width:14px;height:14px}
.panel-readings dd{margin-top:2px;font:650 .92rem/1.17 var(--mono);color:#f4e3ba;font-variant-numeric:tabular-nums}
.aux{gap:6px}.aux-key{position:relative;min-height:44px;min-width:44px;border-color:#64736a;font-size:.78rem;background:#1c343a;overflow:hidden;touch-action:none}
.aux-key .icon{width:18px;height:18px}
.moor{color:#e2d3a7}.moor.ready{color:#183d32;background:#d3d6a6;border-color:#dce5b8}
.moor[aria-disabled=true]{color:#a5b1a4}
#dockProgress{appearance:none;position:absolute;bottom:0;left:0;margin:0;width:100%;height:3px;border:0;background:transparent}
#dockProgress::-webkit-progress-bar{background:transparent}#dockProgress::-webkit-progress-value{background:#ecb976}#dockProgress::-moz-progress-bar{background:#ecb976}
.overlay{
 position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:max(14px,env(safe-area-inset-top)) max(14px,var(--safe-x)) max(14px,env(safe-area-inset-bottom));
 background:radial-gradient(ellipse at 50% 45%,#10272c86,#081a24cc);overscroll-behavior:contain
}
.dialog-sheet{
 width:min(490px,100%);max-height:100%;overflow:auto;overscroll-behavior:contain;padding:clamp(19px,3vw,36px);min-height:0;
 border:1px solid #ab946c;border-top:3px solid #c2a377;border-radius:4px;
 color:var(--pale);background:linear-gradient(130deg,#294447,#112b31 85%);
 box-shadow:0 12px 50px #061a23a3,inset 0 0 0 3px #5a6d5b35;
 scrollbar-width:thin;scrollbar-color:#877f61 #223b3d
}
.dialog-sheet h2{font:700 clamp(1.85rem,3.6vw,3rem)/1.04 var(--serif);letter-spacing:-.045em;margin:6px 0 13px}
.dialog-kicker{color:#e6bd7d}
.dialog-copy,.dialog-sheet p:not(.dialog-kicker){color:#ced8c9}
.dialog-actions,.start-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:18px}
.dialog-sheet button{
 min-height:44px;padding:8px 13px;border:1px solid #738579;border-radius:3px;
 color:var(--pale);background:#294548;font:600 .89rem/1.3 var(--sans)
}
.dialog-sheet button:hover{background:#3b5653;border-color:#d9bd82}
.dialog-sheet button.primary{background:#e5c68b;border-color:#f6dba0;color:#183637}
.dialog-sheet button.primary:hover{background:#ffe0a2}
.route-choice{display:flex;align-items:center;gap:13px;width:100%;margin-top:7px;text-align:left}
.route-index,.offer-price{color:var(--ember);font:650 1.18rem var(--mono)}
.route-detail{flex:1;min-width:0}.route-detail strong,.offer-choice strong{display:block;font:700 1.26rem/1.14 var(--serif)}
.route-detail span,.route-detail small{display:block;margin-top:3px;font:400 .84rem/1.3 var(--sans);color:var(--quiet)}
.route-detail small{color:#d8be8c;font:600 .73rem/1.35 var(--mono)}
.result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0;padding:12px 0;border-block:1px solid #72857870}
.result-grid dt{color:var(--quiet);font-size:.78rem}.result-grid dd{color:#f5d693;font:700 1.35rem/1.4 var(--mono)}
.dialog-sheet:has(.shift-choices-layout){width:min(935px,100%)}
.shift-choices-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:18px;margin-top:13px}
.port-overview{min-width:0}.port-overview canvas{display:block;width:100%;height:auto;aspect-ratio:1000/620;border:1px solid #8a8970;background:#174569}
.port-overview figcaption,.shift-footnote,.shift-receipt,.shift-summary,.shift-record{font:.85rem/1.4 var(--sans)}
.port-overview figcaption,.shift-footnote,.shift-record{margin-top:8px}
.shift-summary{border-block:1px solid #77867880;padding:7px 0}
.shift-receipt{margin-top:6px;color:var(--green)!important}
.offer-list{display:grid;gap:7px}
.dialog-sheet .offer-choice{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:3px 7px;width:100%;text-align:left;padding:9px 11px}
.offer-choice strong{grid-area:2 / 1 / 3 / -1}
.offer-price{grid-area:1 / 2;white-space:nowrap;font-size:1rem}
.offer-kind{grid-area:1 / 1;font-size:.66rem}
.offer-desc,.offer-meta,.offer-terms{grid-column:1 / -1;color:var(--quiet);font:400 .83rem/1.32 var(--sans)}
.offer-meta{color:#d8c49e;font-family:var(--mono);font-size:.75rem}
.shift-ledger ol{list-style:none;padding:0;margin:0;counter-reset:receipt}
.shift-ledger li{display:flex;align-items:baseline;gap:9px;padding:7px 0;counter-increment:receipt;border-bottom:1px dashed #85917876;font-size:.86rem}
.shift-ledger li::before{content:counter(receipt,decimal-leading-zero);color:var(--brass);font:600 .77rem var(--mono)}
.shift-ledger li span{flex:1;min-width:0}.shift-ledger small{display:block;color:var(--quiet)}.shift-ledger strong{white-space:nowrap;font-family:var(--mono)}
.help-controls{margin:12px 0;display:grid;gap:8px}
.help-controls>div,.help-controls>li{padding:5px 0;border-bottom:1px solid #70827565}
.help-controls dt{color:var(--ember);font-weight:650}
.help-controls dd{color:var(--quiet)}
kbd{display:inline-block;padding:2px 5px;border:1px solid #809084;border-radius:3px;background:#243f42;font:600 .79rem var(--mono)}
.pilot-house:has(#overlay[data-view=start]:not([hidden])) :is(.bridge-header,.console){visibility:hidden}
#overlay[data-view=start]{
 place-items:center start;padding-left:max(6vw,var(--safe-x));
 background:linear-gradient(90deg,#0a2229f5 0%,#102a30e6 18%,#0f2831b0 40%,#122d3830 71%),linear-gradient(0deg,#0c253663,transparent 38%)
}
#overlay[data-view=start] .dialog-sheet{
 width:min(620px,75vw);padding:22px 6px;background:none;border:none;box-shadow:none;border-radius:0
}
#overlay[data-view=start] .dialog-kicker{display:flex;align-items:center;gap:9px;font-size:.78rem}
#overlay[data-view=start] .dialog-kicker::before{content:"";width:23px;height:3px;background:#dfac72}
#overlay[data-view=start] #dialogTitle,.start-title{
 max-width:10.5em;margin:11px 0 15px;font:700 clamp(3.2rem,7vw,7.1rem)/.96 var(--serif);letter-spacing:-.065em;
 color:#fff0cb;text-shadow:0 3px 13px #0a252e88
}
.start-copy{max-width:34em;font-size:clamp(.98rem,1.35vw,1.2rem);line-height:1.5}
.start-actions{margin-top:23px}.start-actions .primary{min-width:150px}
.start-log{color:#dfc494!important;font:500 .82rem/1.4 var(--mono);margin-top:13px}
@media(min-width:1600px){
 .console{padding-inline:max(42px,calc((100% - 1600px) / 2))}
}
@media(max-width:1050px){
 .engine-room{gap:15px;grid-template-columns:auto minmax(190px,1fr) auto auto}
 .wheel{width:37px;height:37px}.iron-key{min-width:45px;padding:0 8px}
 .aux-key span{display:none}.panel-readings{gap:11px}.panel-readings dd{font-size:.8rem}
 .speed-dial{width:59px;height:59px}
}
@media(max-width:750px){
 .nav-button{padding:0;min-width:39px;min-height:40px}.nav-button:has(span){padding:0}
 .nav-button span{display:none}.nav-cluster{gap:1px}
 .bridge-header{gap:6px}.identity{padding:5px 8px;gap:7px}.fleet-mark{width:34px;height:34px}.fleet-mark svg{width:28px;height:28px}
 .panel-readings dt{font-size:0}.panel-readings dt .icon{width:14px;height:14px}
}
@media(orientation:portrait) and (max-width:850px){
 .bridge-header{padding:max(7px,env(safe-area-inset-top)) max(7px,var(--safe-x)) 4px;align-items:center}
 .identity{min-width:0;max-width:58%;padding:5px 8px;gap:7px}
 .identity h1{font-size:clamp(1rem,3.55vw,1.55rem);white-space:nowrap}
 .voyage-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.62rem}
 .nav-button{min-width:38px;min-height:40px}
 .console{padding:0 max(8px,var(--safe-x)) max(7px,env(safe-area-inset-bottom))}
 .orders{display:grid;grid-template-columns:1fr;gap:3px;padding:6px 0}
 .target{gap:6px}.target-mark{width:18px;height:18px}.target-text{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 7px}
 #objective{font-size:.61rem}#destination{font-size:clamp(1rem,3.45vw,1.35rem)}#distance{margin-left:auto;font-size:.76rem}
 #status{font-size:.75rem;line-height:1.22}.shift-stats{max-width:none;gap:4px 10px;justify-content:flex-start;font-size:.72rem}
 .engine-room{grid-template-columns:1fr auto 1fr;grid-template-areas:"readings readings readings" "steer aux power";gap:4px 6px;padding-top:4px}
 .telemetry{grid-area:readings;justify-content:flex-start;gap:8px}
 .speed-dial{width:66px;height:31px;border-width:1px;border-radius:20px;display:flex;align-items:center;justify-content:center}
 .speed-dial::before{display:none}.dial-readout{font-size:1.14rem}#speedIndicator{position:absolute;bottom:2px;height:2px;margin:0;width:20px}
 .knots{font-size:.7rem}.panel-readings{flex:1;min-width:0;justify-content:space-around;gap:5px}
 .panel-readings>div{display:flex;align-items:center;gap:3px}.panel-readings dt{font-size:0;gap:0}
 .panel-readings dd{margin:0;font-size:.72rem}.panel-readings>div:last-child{max-width:41%}.panel-readings>div:last-child dd{line-height:1.05}
 .steering{grid-area:steer;justify-self:start}.propulsion{grid-area:power;justify-self:end}.aux{grid-area:aux;align-self:end}
 .plate-label{font-size:.59rem}.wheel{display:none}
 .iron-key{min-width:50px;min-height:48px;padding:0 8px}.engine-keys,.steering-keys,.aux{gap:4px}.engine-keys .iron-key span{display:none}
 .aux-key{min-height:46px;min-width:44px;padding:0 7px}.aux-key span{display:none}
 .shift-choices-layout{grid-template-columns:1fr;gap:9px}.port-overview{display:flex;align-items:center;gap:9px}
 .port-overview canvas{width:min(65%,220px)}.port-overview figcaption{margin:0;font-size:.76rem}
 #overlay[data-view=start]{place-items:end start;padding:5vw max(6vw,var(--safe-x)) max(7vh,env(safe-area-inset-bottom));background:linear-gradient(0deg,#0a232afc 0%,#132f34eb 22%,#112a3380 55%,#12353a14 88%)}
 #overlay[data-view=start] .dialog-sheet{width:100%;padding:10px 0}
 #overlay[data-view=start] #dialogTitle{font-size:clamp(3.08rem,11.4vw,5.8rem);max-width:9em}
}
@media(orientation:portrait) and (max-width:460px){
 .fleet-mark{width:27px;height:27px}.fleet-mark svg{width:23px;height:23px}
 .identity{gap:5px;padding:4px 6px}
 .nav-button{min-width:32px;min-height:37px}.nav-cluster{padding:2px}.nav-button .icon{width:17px;height:17px}
 .identity h1{font-size:clamp(.91rem,3.65vw,1.15rem)}
 .engine-room{gap:4px}.iron-key{min-width:clamp(44px,12.8vw,55px)}
 .dialog-sheet{padding:17px}
}
@media(orientation:portrait) and (max-width:360px){
 .bridge-header{padding-inline:5px;gap:3px}.identity{padding:3px 4px;gap:3px}
 .nav-button{min-width:31px}.nav-button .icon{width:16px;height:16px}
 .shift-stats{font-size:.68rem}.aux-key{min-width:40px;padding:0 4px}
 .plate-label{letter-spacing:.04em}
}
@media(orientation:landscape) and (max-height:580px){
 .bridge-header{padding:max(4px,env(safe-area-inset-top)) var(--safe-x) 1px}
 .identity{gap:6px;padding:3px 7px}.identity h1{font-size:1.06rem}.fleet-mark{width:28px;height:28px}.fleet-mark svg{width:24px;height:24px}
 .voyage-name{font-size:.57rem;margin-top:1px}
 .nav-cluster{padding:1px;gap:1px}.nav-button{min-height:34px;min-width:36px;padding:0}.nav-button span{display:none}.nav-button:has(span){padding:0}
 .nav-button .icon{width:17px;height:17px}
 .console{padding:0 var(--safe-x) max(3px,env(safe-area-inset-bottom));border-top-width:2px}
 .orders{padding:4px 0;gap:8px}.target{gap:4px}.target-mark{width:17px;height:17px}
 #objective{font-size:.57rem}#destination{font-size:.97rem}#distance{font-size:.69rem}#status{font-size:.7rem;line-height:1.13}
 .shift-stats{max-width:160px;gap:1px 7px;font-size:.64rem}
 .engine-room{grid-template-columns:auto minmax(135px,1fr) auto auto;gap:7px;padding-top:3px}
 .station{gap:0}.plate-label,.wheel{display:none}.engine-keys,.steering-keys,.aux{gap:3px}
 .iron-key,.aux-key{min-width:42px;min-height:40px;padding:0 5px}
 .engine-keys .iron-key span,.aux-key span{display:none}
 .speed-dial{width:48px;height:44px;border-width:2px}.dial-readout{font-size:1.06rem}.knots{font-size:.68rem}
 #speedIndicator{width:18px;height:2px;margin-top:1px}.telemetry{gap:6px}
 .panel-readings{gap:8px}.panel-readings dt{font-size:0}.panel-readings dd{font-size:.67rem;margin-top:0}
 .panel-readings dt .icon{width:12px;height:12px}
 .dialog-sheet{padding:14px 18px}.overlay{padding:7px var(--safe-x)}
 #overlay[data-view=start]{padding-left:6vw;place-items:center start}
 #overlay[data-view=start] .dialog-sheet{width:min(490px,75vw);padding:8px 3px}
 #overlay[data-view=start] #dialogTitle{font-size:clamp(2.25rem,6vw,3.8rem);margin:6px 0}
 .start-actions,.dialog-actions{margin-top:10px}.start-log{margin-top:6px}.start-copy{font-size:.88rem}
 .shift-choices-layout{gap:10px}.dialog-sheet .offer-choice{padding:7px 9px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.pilot-house{grid-template-columns:minmax(0,1fr)}
.bridge-header,.console,#mapWindow,.orders,.target,.target-text,.engine-room{min-width:0}
.start-log b,.start-log span{display:block}.start-log span{margin-top:3px;color:var(--quiet)}
.return-to-issue{display:inline-flex;align-items:center;min-height:40px;margin-top:8px;color:#d0d9c8;font:600 .84rem var(--sans);text-underline-offset:4px}
.start-links{display:flex;align-items:center;gap:6px 20px;flex-wrap:wrap;margin-top:8px}
.start-links .return-to-issue{margin-top:0;min-height:44px}
.dialog-sheet .start-links button{min-height:44px;padding:0;border:0;background:transparent;color:#d0d9c8;font:600 .84rem var(--sans);text-decoration:underline;text-underline-offset:4px}
@media(orientation:portrait) and (max-width:850px){
  .orders{grid-template-columns:minmax(0,1fr)}.target-text{flex:1}
  .engine-room{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  .propulsion{text-align:right}.nav-cluster{flex:none}.identity{flex:0 1 auto}
}
@media(orientation:portrait) and (max-width:460px){
  .identity h1{white-space:normal}.identity-text{flex:1}
  .target strong{overflow-wrap:anywhere}
}
@media(orientation:portrait) and (max-width:600px){
  .nav-cluster .nav-button{min-width:44px;min-height:44px}
  .nav-cluster [data-action=help]{display:none}
  .aux-key{min-width:44px;min-height:46px}
}

/* The expedition journal shares the surround of the bridge instruments. */
.nav-cluster .expedition-button{color:#ffdaa0;border-color:#9a8962;background:#344a44}
.nav-cluster .expedition-button:hover{background:#425b4b}
.dialog-sheet:has(.expedition-board){width:min(1010px,100%);background:linear-gradient(130deg,#263e4a,#102637 72%);border-color:#a48e6c}
.expedition-board{display:grid;grid-template-columns:minmax(0,1.68fr) minmax(170px,.82fr);gap:12px;align-items:stretch}
.expedition-chart{margin:0;align-self:center;min-width:0}
#expeditionMap{display:block;width:100%;height:auto;aspect-ratio:760/420;background:#18334b;border:1px solid #9d9475;touch-action:manipulation}
.chapter-list{display:flex;flex-direction:column;gap:6px;min-width:0}
.dialog-sheet .chapter-choice{
 flex:1;display:grid;grid-template-columns:minmax(0,1fr);align-content:center;gap:1px;
 min-width:0;text-align:left;padding:8px 12px;background:#253f48;border-color:#6f827c
}
.chapter-choice small,.chapter-state{font:600 .72rem/1.25 var(--mono)}
.chapter-choice small{color:#c2b48c;letter-spacing:.07em;text-transform:uppercase}
.chapter-choice strong{font:700 1.21rem/1.16 var(--serif);letter-spacing:-.02em}
.chapter-state{margin-top:2px;color:#c5d9c6}
.dialog-sheet .chapter-choice[aria-pressed=true]{border-color:#e0bc79;background:#384d47;box-shadow:inset 3px 0 #d9af6d}
.chapter-choice[aria-pressed=true] .chapter-state{color:#ffdc99}
.dialog-sheet .chapter-choice:disabled{cursor:default;color:#acbbbd;background:#1c3342;border-color:#425966}
.chapter-choice:disabled small,.chapter-choice:disabled .chapter-state{color:#aab7b6}
.expedition-summary{margin-top:12px;padding-top:10px;border-top:1px solid #71847b70;color:var(--quiet);font-size:.92rem;line-height:1.42}
.path-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:9px}
.dialog-sheet .path-choice{
 display:grid;grid-template-columns:13px minmax(0,1fr);gap:3px 7px;align-content:center;align-items:center;
 text-align:left;min-width:0;padding:8px 10px;background:#203944;border-color:#647a78
}
.path-choice::before{content:"";display:block;width:12px;height:12px;border:1px solid #a8b5aa;border-radius:50%}
.path-choice[aria-pressed=true]::before{border-color:#ddc182;background:radial-gradient(circle,#eacb91 0 42%,transparent 48%)}
.dialog-sheet .path-choice[aria-pressed=true]{border-color:#d5b579;background:#324943}
.path-choice strong{font-size:.92rem}.path-choice small{grid-column:2;color:var(--quiet);font:400 .78rem/1.33 var(--sans)}
.chapter-result{position:relative}
.chapter-result .dialog-kicker{padding-right:34px}
.chapter-result::before{
 content:"";position:absolute;right:0;top:2px;width:33px;height:7px;opacity:.9;
 background:repeating-linear-gradient(120deg,#cc9867 0 4px,transparent 4px 8px)
}
@media(orientation:portrait) and (max-width:600px){
 .nav-cluster [data-action=shift]{display:none}
 .expedition-board{grid-template-columns:minmax(0,1fr);gap:8px}
 .dialog-sheet:has(.expedition-board){padding:14px}
 .chapter-list{gap:4px}
 .dialog-sheet .chapter-choice{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:5px;min-height:44px;padding:6px 8px}
 .chapter-choice small,.chapter-state{font-size:.65rem;letter-spacing:0}
 .chapter-choice strong{font-size:1.03rem}.chapter-state{max-width:70px;margin:0;text-align:right}
 .expedition-summary{margin-top:8px;padding-top:7px;font-size:.84rem}
 .path-options{gap:5px}.dialog-sheet .path-choice{gap:2px 4px;padding:7px}
 .path-choice strong{font-size:.79rem}.path-choice small{grid-column:1/-1;font-size:.75rem}
}
@media(orientation:portrait) and (max-width:360px){
 .dialog-sheet .chapter-choice{grid-template-columns:44px minmax(0,1fr) auto;padding:5px 6px}
 .chapter-choice strong{font-size:.97rem}.chapter-state{max-width:64px}
}
@media(orientation:landscape) and (max-height:580px){
 .expedition-board{grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);gap:9px}
 .dialog-sheet .chapter-choice{padding:5px 9px;gap:0}
 .chapter-choice small,.chapter-state{font-size:.66rem}.chapter-choice strong{font-size:1.03rem}.chapter-state{margin-top:1px}
 .expedition-summary{margin-top:7px;padding-top:6px;font-size:.81rem}
}


#overlay[data-view=start] {
  align-content: end; background: linear-gradient(90deg,#091d25de 0%,#13232b84 34%,transparent 74%),
    linear-gradient(0deg,#071e28ea,transparent 57%),url("../../launcher-art/ferry-night.webp") center 44%/cover;
}
#overlay[data-view=start] .dialog-sheet { width: min(640px,100%); }
#overlay[data-view=start] #dialogTitle { color: #fff0d3; }
#overlay[data-view=start] .start-actions { margin: 19px 0 6px; }
#overlay[data-view=start] .start-actions .primary { background: #ffc68b; color: #172329; border-radius: 0; border: 0; }
.route-switcher { display: flex; flex-wrap: wrap; gap: 4px 17px; border-block: 1px solid #f7dacb5e; margin-top: 14px; }
.dialog-sheet .route-switcher button { min-height: 43px; padding: 6px 0; border: 0; background: transparent; box-shadow: none; color: #fff0d7; }
.dialog-sheet .route-switcher button:hover { color: #ffb476; background: transparent; }
@media(max-width:650px) and (orientation:portrait) {
  #overlay[data-view=start] { background: linear-gradient(0deg,#081c26fc,#081c26d9 36%,transparent 74%),url("../../launcher-art/ferry-night.webp") 65% center/cover; }
}

#overlay:is([data-view=pause],[data-view=routes]) .dialog-sheet { border: 0; border-top: 3px solid #d79a59; background: linear-gradient(135deg,#13333a,#0d232c 84%); }
.dialog-sheet .route-choice { background: transparent; box-shadow: none; border: 0; border-bottom: 1px solid #c7c1a05c; border-radius: 0; }
