.harbor-shell{color-scheme:light;background:radial-gradient(ellipse at 86% 19%,#dfefe3,transparent 49%),radial-gradient(ellipse at 10% 95%,#f6eed6 0%,transparent 62%),#edf3ec;color:#18383a;min-height:100vh}
.harbor-width{width:min(984px,calc(100% - 44px));margin-inline:auto}
.harbor-shell :focus-visible{outline:3px solid #157e74;outline-offset:4px}
.harbor-top{background:#f7fbf2eb;border-bottom:1px solid #d8e4d8;box-shadow:0 2px 14px #233f3410}
.harbor-top .harbor-width{min-height:62px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px}
.station-back,.station-index{display:inline-flex;align-items:center;gap:7px;color:#325f60;font-size:.9rem;font-weight:750}
.station-back{justify-self:start}
.station-back .station-icon{font-size:1.7rem;line-height:.7}
.station-index{justify-self:end}
.station-back:hover,.station-index:hover,.station-reference:hover{color:#16776a;text-decoration:underline;text-underline-offset:3px}
.station-brand{display:flex;align-items:center;gap:9px;color:#204443;line-height:1.2;font-size:1.04rem;font-weight:870;white-space:nowrap}
.station-brand small{display:block;font:750 .66rem/1.4 ui-monospace,monospace;letter-spacing:.14em;color:#4c7770}
.station-logo{display:grid;align-content:center;justify-content:center;gap:3px;width:31px;height:31px;border-radius:9px;background:#21675e;box-shadow:inset 0 -2px 0 #133d38}
.station-logo i{display:block;width:14px;height:2px;border-radius:5px;background:#e8fba8}
.station-logo i:nth-child(2){transform:translateX(2px)}
.harbor-page{padding:25px 0 22px}
.station-layout{--station-width:clamp(380px,calc((100svh - 226px)*.8525),524px);display:grid;grid-template-columns:minmax(210px,306px) var(--station-width);grid-template-areas:"title board" "guide board";grid-template-rows:auto 1fr;align-items:start;justify-content:center;gap:23px 38px}
.station-heading{grid-area:title;padding:25px 0 0}
.station-category{display:inline-flex;align-items:center;gap:8px;border:1px solid #b4d3c1;border-radius:99px;background:#eaffee;padding:4px 11px;font-size:.86rem;font-weight:800;color:#296a5e}
.station-category span{background:#438b77;width:8px;height:8px;border-radius:50%;box-shadow:0 0 0 3px #bddec8}
.station-heading h1{font-size:clamp(2.2rem,4.7vw,4.3rem);letter-spacing:-.065em;line-height:1.06;margin:15px 0 11px;color:#23484b}
.station-heading>p:last-of-type{font-size:1rem;color:#456564;font-weight:550}
.station-levels{display:flex;flex-wrap:wrap;gap:7px;margin-top:19px}
.station-levels a{position:relative;display:grid;place-items:center;width:40px;min-height:41px;background:#f8fbf3;color:#355d60;border:1px solid #c0d4ca;border-radius:11px;box-shadow:0 2px 0 #c5d7ce;font-weight:850;transition:background-color .15s,transform .15s}
.station-levels a:hover{background:#e4f2e7;transform:translateY(-2px)}
.station-levels a[aria-current]{background:#226b60;border-color:#226b60;color:#fbffe9;box-shadow:0 2px 0 #1b4b44}
.station-levels a.level-done::after{content:'✓';color:#1f6451;background:#cdecae;font-size:9px;display:grid;place-items:center;width:13px;height:13px;border-radius:10px;position:absolute;top:1px;right:1px}
.station-guide{grid-area:guide;background:#fbfbf1bd;border:1px solid #d7e5d6;border-radius:18px;padding:17px 16px;box-shadow:0 8px 23px #405f3d09}
.station-guide h2{font-size:1.12rem;margin-bottom:12px;color:#254c4b}
.station-step{display:grid;grid-template-columns:33px minmax(0,1fr);gap:8px;align-items:start}
.station-step+.station-step{margin-top:12px}
.station-step>.station-icon{width:31px;height:31px;border-radius:9px;box-shadow:inset 0 -2px 0 #315c5319;font-size:1.06rem;font-weight:900}
.station-step .move-icon{background:#d4eee5;color:#28645e}
.station-step .queue-icon{background:#ffe5b8;color:#854925}
.station-step .bay-icon{background:#e0edc9;color:#4b6e2a}
.station-step strong{font-size:.94rem;color:#244849}
.station-step p{font-size:.9rem;color:#45615d;line-height:1.52;margin-top:2px}
.station-reference{display:inline-block;font-size:.87rem;font-weight:800;color:#2e6b63;margin-top:14px}
.station-game{grid-area:board;border-radius:22px;overflow:hidden;background:#f6f9ee;border:1px solid #c5dfd1;box-shadow:0 5px 0 #accabf,0 20px 40px #2b645739}
.station-hud,.station-bottom{display:flex;justify-content:space-between;gap:7px;align-items:center;padding:9px 12px}
.station-hud{padding-block:8px 7px;background:#f8fbef}
.station-numbers,.station-action-group{display:flex;gap:6px;align-items:center;flex-shrink:0}
.hud-cell{display:grid;min-width:67px;padding-inline:7px;font-variant-numeric:tabular-nums}
.hud-cell+.hud-cell{border-left:1px solid #cbdcd2;padding-left:11px}
.hud-cell span{color:#47716a;font-weight:700;font-size:.79rem;line-height:1.25}
.hud-cell strong{font-size:1.12rem;line-height:1.35;color:#265651;white-space:nowrap;font-weight:880}
.station-icon{display:inline-grid;place-items:center;flex:none;line-height:1}
.station-small,.station-secondary,.station-primary{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:38px;padding:5px 9px;border-radius:9px;border:1px solid #bbd4ca;background:#f8fbf3;color:#2f605a;white-space:nowrap;font-weight:780;font-size:.88rem;line-height:1.25;box-shadow:0 2px 0 #c6d9ce;touch-action:manipulation;transition:filter .16s,transform .16s}
.station-small .station-icon,.station-secondary .station-icon{font-size:1.1rem;font-weight:950}
.station-small:hover,.station-secondary:hover,.station-primary:hover{filter:brightness(.96)}
.station-small:active,.station-secondary:active,.station-primary:active{transform:translateY(2px);box-shadow:none}
.station-small[aria-pressed=true]{background:#e6eee7}
.station-secondary:disabled{opacity:.52;box-shadow:none}
.station-hint{background:#ffe9b8;color:#714617;border-color:#e1bd7a;box-shadow:0 2px 0 #d6b87e}
.station-game progress{display:block;width:100%;height:5px;border:0;border-radius:0;appearance:none;background:#d3e5d8}
.station-game progress::-webkit-progress-bar{background:#d3e5d8}
.station-game progress::-webkit-progress-value{background:#33a487;transition:width .25s}
.station-game progress::-moz-progress-bar{background:#33a487}
.station-board{position:relative;isolation:isolate;aspect-ratio:520/610;overflow:hidden;background:#a7cebe url('./quay.jpg') center/cover}
.station-board canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.station-queue,.station-board-label{position:absolute;z-index:1;pointer-events:none}
.station-queue{top:13.4%;left:24.8%;display:inline-flex;align-items:center;gap:5px;padding:2px 6px 2px 7px;border-radius:7px;background:#f7f8e8e8;color:#315a57;border:1px solid #fbfff0;box-shadow:0 2px 5px #274a4329;font-size:clamp(.71rem,2.6vw,.83rem);font-weight:750;white-space:nowrap}
.station-queue strong{display:inline-flex;align-items:center;gap:3px;font-weight:880}
.station-queue strong span:first-child{display:grid;place-items:center;width:15px;height:15px;border-radius:50%;font-size:10px;background:var(--passenger-color,#c9eac5);color:#233f44}
.station-board-label{padding:1px 5px;border-radius:4px;background:#305e61;color:#f0f9e7;font-weight:750;font-size:clamp(.65rem,2.2vw,.76rem);box-shadow:0 1px 0 #27494c55}
.dock-label{top:29.6%;right:11.3%}
.lot-label{top:47.8%;left:11.5%}
#vehicle-buttons{position:absolute;inset:0;z-index:2;pointer-events:none}
.vehicle-target{position:absolute;top:var(--y);left:var(--x);width:var(--w);height:var(--h);transform:translate(-50%,-50%);pointer-events:auto;touch-action:manipulation;appearance:none;border:0;color:transparent;background:transparent;border-radius:9px;padding:0;font-size:0}
.vehicle-target:focus-visible{outline:2px solid #fff8d2;outline-offset:0;box-shadow:0 0 0 3px #215350}
.station-bottom{min-height:60px;background:#f7f9ee}
.station-bottom p{color:#446962;font-size:.84rem;line-height:1.4;font-weight:710}
.station-bottom p[data-tone=warning]{color:#9d4930}
.station-bottom p[data-tone=good]{color:#1e6954}
.station-bottom .station-action-group{gap:7px}
.station-overlay{position:absolute;display:grid;place-items:center;inset:0;z-index:3;padding:18px;background:#20484874;backdrop-filter:blur(3px)}
.station-result-card{width:min(330px,100%);padding:23px 18px 19px;text-align:center;background:#fcfcee;border:1px solid #effbe0;border-radius:19px;box-shadow:0 5px 0 #bfd6bc,0 15px 40px #23433a73}
.result-symbol{display:grid;place-items:center;width:49px;height:49px;margin:0 auto 9px;border-radius:30px;background:#c7eaba;color:#286e45;font-size:1.6rem;font-weight:950;box-shadow:inset 0 -3px 0 #78a65e55}
.station-overlay[data-state=lose] .result-symbol{background:#fbdab7;color:#9a4a28}
.station-result-card h2{font-size:1.55rem;line-height:1.18;color:#244b48}
.station-result-card p{font-size:.93rem;color:#41655e;margin-top:9px}
.station-result-actions{display:flex;justify-content:center;gap:8px;margin-top:17px}
.station-primary{background:#246e60;color:#f5fee9;border-color:#246e60;box-shadow:0 2px 0 #22584d}
.station-noscript{position:absolute;top:50%;width:100%;text-align:center;background:#fcfcee;padding:10px}
@media(max-width:770px){
  .harbor-width{width:min(520px,calc(100% - 24px))}
  .harbor-top .harbor-width{min-height:51px}
  .harbor-page{padding-top:12px}
  .station-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "board" "guide";gap:13px}
  .station-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:5px 8px;padding:0 1px 0}
  .station-heading .station-category,.station-heading>p:last-of-type{display:none}
  .station-heading h1{font-size:clamp(1.55rem,5.4vw,2.1rem);margin:0}
  .station-levels{margin-top:0;gap:5px}
  .station-levels a{width:33px;min-height:35px}
  .station-guide{margin-top:4px}
}
@media(max-width:395px){
  .harbor-width{width:calc(100% - 14px)}
  .harbor-top .harbor-width{width:calc(100% - 22px)}
  .station-numbers,.station-action-group{gap:4px}
  .station-hud,.station-bottom{padding-inline:7px}
  .hud-cell{min-width:55px;padding-inline:4px}
  .hud-cell+.hud-cell{padding-left:7px}
  .station-small,.station-secondary{padding-inline:6px;font-size:.82rem}
  .station-brand small{font-size:.61rem}
  .station-levels a{width:30px;min-height:33px}
}

.station-view[aria-pressed=true]{background:#267260;color:#f4ffe8;border-color:#267260;box-shadow:0 2px 0 #1d564b;opacity:1}
.station-board[data-view="3d"]{background:#75c9c6}
.station-board[data-view="3d"] #station-3d{pointer-events:auto;cursor:grab;touch-action:pan-y pinch-zoom}
#station-3d[data-cursor=bus]{cursor:pointer}
#station-3d[data-cursor=drag]{cursor:grabbing}
.station-board[data-view="3d"] .vehicle-target{pointer-events:none}
.station-board[data-view="3d"] .station-queue{top:3%;left:4%}
.station-board[data-view="3d"] .station-board-label{display:none}
.station-camera{position:absolute;z-index:3;right:3%;bottom:2.2%;display:flex;gap:6px;align-items:center;padding:3px 5px 3px 7px;border-radius:6px;background:#f1f9e8e8;color:#325f5b;font-size:.75rem;font-weight:800;box-shadow:0 1px 4px #234b4455}
.station-camera button{color:#23564f;border:1px solid #9ac6b5;background:#fff9ec;border-radius:5px;font-weight:800;padding:2px 5px}
@media(max-width:370px){
  .station-hud .station-small{padding-inline:4px}
  .station-hud .station-small .station-icon{display:none}
  .station-hud .hud-cell{min-width:47px}
}

/* The 3D camera fits the board into the available space without stretching models. */
@media(min-width:771px){
  .harbor-width{width:min(1390px,calc(100% - 44px))}
  .harbor-top .harbor-width{min-height:58px}
  .harbor-page{padding-top:16px}
  .station-layout{grid-template-columns:clamp(215px,20vw,285px) minmax(0,1fr);gap:14px 23px}
  .station-heading{padding-top:7px}
  .station-heading h1{font-size:clamp(2.8rem,4.4vw,4rem)}
  .station-board:is([data-view="3d"],[data-view="loading"]){aspect-ratio:auto;height:clamp(320px,calc(100svh - 205px),850px)}
  .station-game:has(.station-board[data-view="2d"]){width:min(100%,clamp(320px,calc((100svh - 205px)*.8525),650px));justify-self:center}
}
.station-camera{padding:0;background:none;box-shadow:none;gap:4px}
.station-camera button{min-height:34px;min-width:38px;box-shadow:0 1px 4px #234b4455}
@media(max-width:560px){
  .harbor-width{width:calc(100% - 14px)}
  .harbor-page{padding-top:8px}
  .station-layout{gap:9px}
  .station-levels a{min-height:44px}
  .station-hud,.station-bottom{padding-block:5px}
  .station-hud .station-small,.station-bottom .station-secondary,.station-camera button{min-height:44px}
  .station-hud .station-view{padding-inline:5px}
  .station-camera{bottom:1.6%;right:2.7%}
  .station-camera button{padding-inline:6px}
}
@media(max-width:350px){
  .harbor-top .harbor-width{gap:6px}
  .station-brand small{display:none}
  .station-numbers,.station-hud .station-action-group{gap:2px}
  .hud-cell,.hud-cell+.hud-cell{min-width:44px;padding-inline:3px}
  .station-hud .station-small{padding-inline:4px;font-size:.76rem}
  .station-heading{gap:4px}
  .station-levels{gap:3px}
  .station-levels a{width:27px}
}

@media (orientation:landscape) and (max-height:520px){
  .harbor-width{width:calc(100% - 22px)}
  .harbor-top .harbor-width{min-height:42px}
  .harbor-page{padding-top:7px}
  .station-layout{grid-template-columns:clamp(142px,22vw,212px) minmax(0,1fr);grid-template-areas:"title board" "guide board";grid-template-rows:auto 1fr;gap:9px 12px}
  .station-heading{display:grid;padding-top:4px}
  .station-heading h1{font-size:clamp(1.5rem,4vw,2.3rem)}
  .station-heading>p:last-of-type{display:none}
  .station-levels{margin-top:5px;gap:3px}
  .station-levels a{width:28px;min-height:33px}
  .station-board:is([data-view="3d"],[data-view="loading"]){height:clamp(208px,calc(100svh - 153px),365px);aspect-ratio:auto}
  .station-game:has(.station-board[data-view="2d"]){width:min(100%,380px)}
  .station-board[data-view="2d"]{width:min(100%,clamp(151px,calc((100svh - 153px)*.8525),330px));margin-inline:auto}
  .station-hud,.station-bottom{padding:4px 6px;min-height:46px}
  .station-hud .station-small,.station-bottom .station-secondary,.station-camera button{min-height:37px}
  .station-guide{padding:8px}
}

@media (orientation:portrait) and (max-width:560px) and (max-height:600px){
  .station-bottom{min-height:53px}
}
