:root{--bg:#08121e;--panel:#112337;--panel2:#172e43;--line:#2b4054;--muted:#8ba1b2;--white:#f4f8ff;--gold:#ffc975;--cyan:#54d5f1;--green:#62e3a6;--r:15px}*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;background:#08131f;color:var(--white);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}body{background:radial-gradient(ellipse at 50% -20%,#23445e 0%,#0b1928 44%,#07101b 100%);overscroll-behavior:none}button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.app{width:min(100%,510px);min-height:100dvh;margin:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 13px env(safe-area-inset-bottom);background:linear-gradient(155deg,rgba(19,39,58,.92),rgba(8,21,34,.97) 40%,rgba(10,22,35,.98));border-inline:1px solid #27415b;box-shadow:0 0 120px #0009}.topbar{display:flex;justify-content:space-between;align-items:center;height:60px;min-height:60px;border-bottom:1px solid #30445a}.brand{display:flex;align-items:center;gap:9px}.brand-icon{width:37px;height:37px;border-radius:9px;filter:drop-shadow(0 2px 7px #0008)}.brand b{font-size:14px;letter-spacing:.15em;font-weight:840}.brand small{font-size:8px;color:#7eacbd;letter-spacing:.21em;display:block;margin-top:2px}.header-actions{display:flex;gap:7px}.icon-button{width:32px;height:32px;border:1px solid #44627a;background:linear-gradient(#1e3851,#152c41);color:#e9f5ff;border-radius:9px;font-size:19px;font-weight:700}.heading-strip{display:flex;gap:7px;align-items:stretch;min-height:62px;padding:10px 0}.level-title{flex:1;display:flex;flex-direction:column;justify-content:center}.eyebrow{font-size:9px;color:var(--cyan);letter-spacing:.14em;font-weight:800}.level-title strong{font-size:20px;letter-spacing:.04em;line-height:1.25}.stat-pill{background:linear-gradient(#203c54,#172a40);border:1px solid #314c62;box-shadow:inset 0 1px #42617c66;border-radius:10px;padding:5px 8px;min-width:66px;text-align:center}.stat-pill>span{color:var(--gold);font-size:11px}.stat-pill b{font-size:14px;margin-left:5px}.stat-pill small{font-size:8px;color:#9aafc4;display:block;line-height:1.25}main{display:flex;flex-direction:column;gap:8px;flex:1}.queue-section,.boarding-section,.parking-section{background:linear-gradient(155deg,#12283e,#102137);border:1px solid #27435a;border-radius:13px;overflow:hidden;box-shadow:0 8px 20px #0003,inset 0 1px #ffffff0a}.section-header{height:28px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 11px;font-size:10px;font-weight:780;color:#e5eef6;letter-spacing:.07em}.section-header small,.subtext{font-size:9px;color:#9bb4c5;letter-spacing:0}.section-header b{font-size:12px;color:#e8f3ff}.tiny-dot{display:inline-block;width:6px;height:6px;background:var(--cyan);border-radius:50%;box-shadow:0 0 7px #54d5f1;vertical-align:1px;margin-right:4px}.tiny-dot.gold{background:#f6c66e;box-shadow:0 0 7px #eac06d}.tiny-dot.green{background:var(--green);box-shadow:0 0 7px var(--green)}.passenger-queue{height:66px;margin:0 9px 8px;display:flex;gap:1px;align-items:center;padding:5px 7px;overflow:hidden;position:relative;border-radius:9px;background:repeating-linear-gradient(90deg,transparent 0,transparent 36px,#e4eff905 36px,#e4eff905 37px),linear-gradient(180deg,#1b3549,#203748);box-shadow:inset 0 3px 10px #0008}.passenger-queue:after{content:'';position:absolute;pointer-events:none;right:0;top:0;bottom:0;width:27px;background:linear-gradient(90deg,transparent,#1b3549)}.passenger{width:23px;min-width:23px;height:44px;position:relative;filter:drop-shadow(0 2px 2px #0008);transition:transform .15s}.person-head{position:absolute;top:2px;left:6px;width:12px;height:12px;border:1px solid #ffffff77;border-radius:50%;background:radial-gradient(circle at 37% 25%,#fff9,var(--person) 46%,#172233 110%)}.person-body{position:absolute;top:14px;left:4px;width:16px;height:21px;border-radius:7px 7px 4px 4px;background:linear-gradient(90deg,#0006,var(--person) 32%,#ffffff55 56%,var(--person) 78%,#0007);border:1px solid #ffffff50}.person-legs{position:absolute;top:31px;left:6px;width:5px;height:12px;background:var(--person);border-radius:3px;box-shadow:8px 0 var(--person),1px 1px 2px #000b}.boarding-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:3px 9px 7px;min-height:72px}.boarding-slot{position:relative;background:linear-gradient(160deg,#162f45,#19354c);border:1px dashed #507084;border-radius:11px;min-height:65px;display:flex;align-items:center;gap:3px;padding:5px;overflow:hidden}.boarding-slot.occupied{border:1px solid #6fa3b88c;background:linear-gradient(160deg,#28465b,#163046)}.boarding-slot>.slot-index{position:absolute;left:5px;top:3px;font-size:8px;color:#87acbc}.boarding-slot .empty{width:100%;text-align:center;font-size:9px;letter-spacing:.07em;color:#6d8c9b}.boarding-slot .empty:before{content:'+';font-size:19px;display:block;font-weight:200}.slot-car{width:43px;height:48px;object-fit:contain;transform:rotate(90deg);filter:drop-shadow(1px 3px 3px #000b);flex:none}.slot-data{display:flex;flex-direction:column;gap:5px;align-items:flex-start}.slot-data b{font-size:9px;color:#e8f6ff}.seat-meter{display:flex;gap:3px}.seat{width:7px;height:7px;border:1px solid #7b96a8;border-radius:2px;background:#253b4c}.seat.used{background:var(--seat-color);border-color:#ffffff9c;box-shadow:0 0 5px var(--seat-color)}.road-line{height:19px;background:linear-gradient(#2c3d4e,#203240);display:flex;align-items:center;gap:7px;font-size:8px;color:#8da5b8;letter-spacing:.1em;padding:0 9px;border-top:1px solid #ffffff0d}.lane-dashes{flex:1;height:2px;background:repeating-linear-gradient(90deg,#d4dcea80 0 16px,transparent 16px 31px)}.parking-section{flex:1;display:flex;flex-direction:column}.parking-head{flex:none;height:30px}.canvas-wrap{position:relative;overflow:hidden;margin:0 7px 7px;background:#1b2f40;border-radius:11px;box-shadow:inset 0 2px 10px #0008}canvas{width:100%;display:block;aspect-ratio:1/1;touch-action:none;cursor:pointer}.board-toast{position:absolute;top:9px;left:50%;transform:translate(-50%,-12px);opacity:0;pointer-events:none;white-space:nowrap;max-width:95%;overflow:hidden;text-overflow:ellipsis;background:#06121edb;border:1px solid #7e9ab0;padding:8px 12px;color:#eef8ff;border-radius:18px;font-size:11px;transition:.22s;z-index:3}.board-toast.visible{opacity:1;transform:translate(-50%,0)}.toolbar{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:9px}.tool{height:54px;background:linear-gradient(180deg,#223c52,#152c41);border:1px solid #34536a;border-bottom-color:#1b364d;border-radius:10px;color:#d9e8f5;display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;font-size:9px;font-weight:700;box-shadow:inset 0 1px #7796ad25,0 3px 6px #0004}.tool:active{transform:translateY(1px)}.tool-ico{font-size:21px;line-height:22px;color:#ccefff}.highlight-tool{background:linear-gradient(#345069,#203a51);border-color:#54738a}.highlight-tool .tool-ico{color:#ffd78d}.tool:disabled{opacity:.35;cursor:not-allowed}.footnote{height:25px;display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:8px;font-weight:750;letter-spacing:.06em;color:#688a9b;white-space:nowrap}.footnote span:last-child{color:#b7a27c}.modal-backdrop{position:fixed;inset:0;z-index:50;background:#02070dbe;backdrop-filter:blur(11px);display:flex;align-items:center;justify-content:center;padding:18px}.modal-backdrop.hidden{display:none}.modal-panel{width:min(100%,460px);max-height:90dvh;overflow:auto;background:linear-gradient(145deg,#1a354b,#102236 88%);border:1px solid #4c738a;border-radius:20px;padding:23px;box-shadow:0 16px 70px #000b,inset 0 1px #ffffff23;position:relative}.modal-close{position:absolute;right:12px;top:12px;width:33px;height:33px;border:1px solid #497088;border-radius:9px;color:#dceefb;background:#182f43;font-size:24px}.modal-kicker{color:#7be4ef;font-weight:850;letter-spacing:.17em;font-size:10px;margin-bottom:6px}h2{font-size:23px;line-height:1.18;margin:4px 22px 16px 0}.modal-body{font-size:13px;color:#b9d0dc;line-height:1.62}.modal-body p{margin:8px 0}.modal-body b{color:#f0f8ff}.modal-body ul{padding-left:18px}.modal-body li{margin-bottom:7px}.modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.primary-button,.secondary-button{font-size:12px;font-weight:850;border:1px solid #fbd2974f;padding:12px 16px;border-radius:11px;background:linear-gradient(#ffdda2,#ffc476);color:#263146;flex:1;min-width:120px}.secondary-button{background:#27465e;color:#e3f2fb;border-color:#58768c}.mode-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.mode-button{padding:14px 11px;border:1px solid #48687c;background:#1b384d;color:#e5f6ff;border-radius:10px;text-align:left;line-height:1.55}.mode-button.selected{border-color:#ffd38d;background:#2e4857}.mode-button small{font-size:10px;color:#91b5c7}.switch-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #46607550}.switch-row button{color:#eaf6ff;background:#285069;border:1px solid #5b8299;border-radius:8px;padding:7px 14px}.message-success{color:#fbd899;font-size:15px}.score-stars{font-size:34px;color:#ffcf82;letter-spacing:.1em;text-align:center;margin:15px 0;filter:drop-shadow(0 2px 7px #fba75d66)}@media(min-width:700px){.app{min-height:100vh}.topbar{min-height:61px}}@media(max-height:780px){.topbar{height:49px;min-height:49px}.heading-strip{min-height:54px;padding:6px 0}.queue-section .passenger-queue{height:53px;margin-bottom:6px}.person-head{top:0}.person-body{top:12px}.person-legs{top:28px}.boarding-slots{min-height:60px}.boarding-slot{min-height:55px}.slot-car{height:40px}.toolbar{margin-top:5px}.tool{height:47px}.footnote{height:19px}.section-header{height:25px}.parking-head{height:25px}}@media(max-width:375px){.stat-pill{min-width:57px;padding-inline:5px}.stat-pill b{font-size:12px}.section-header{padding-inline:7px;font-size:9px}.passenger{width:21px;min-width:21px}.slot-car{width:35px}.slot-data b{font-size:8px}.seat{width:6px;height:6px}.tool{font-size:8px}.footnote{font-size:7px}}

/* Cargo terminal */
.cargo-box{--box:#44aaff;flex:none;width:34px;height:30px;border-radius:3px;border:1px solid #ffffff90;background:linear-gradient(135deg,#ffffff55,transparent 50%),var(--box);box-shadow:inset 4px 0 #15273840,inset -4px 0 #15273840,0 4px 0 #0005,0 6px 8px #0006;color:#091c2a;font-size:11px;font-weight:900;display:grid;place-items:center;position:relative}.cargo-box.weight-2{height:35px;width:37px}.cargo-box.weight-3{height:40px;width:40px}.passenger-queue{gap:7px;padding-left:10px;align-items:center}.cargo-box:first-child{outline:2px solid #edfaff;outline-offset:2px}.boarding-slot{flex-direction:column;justify-content:flex-end;min-height:84px;padding:10px 5px 7px;overflow:hidden}.dock-truck{position:relative;width:calc(55px + var(--length)*10px);max-width:100%;height:35px;display:flex;align-items:center;filter:drop-shadow(0 3px 3px #0008);transition:transform .58s ease-in}.truck-bed{height:24px;flex:1;background:#182d3e;border:3px solid var(--truck);border-top-width:2px;display:flex;align-items:center;justify-content:center;gap:1px;position:relative}.truck-bed i{display:grid;place-items:center;font-style:normal;font-size:7px;color:#10202b;font-weight:900;width:9px;height:15px;background:var(--box);border:1px solid #fff6}.truck-cab{width:23px;height:30px;background:linear-gradient(120deg,#ffffff66,transparent 65%),var(--truck);border-radius:3px 9px 3px 2px;position:relative}.truck-cab:before{content:'';position:absolute;top:4px;right:3px;width:12px;height:10px;background:#122f44;border-radius:2px 6px 1px 1px;border:1px solid #d5f2ff99}.truck-bed:after,.truck-cab:after{content:'';position:absolute;bottom:-6px;left:6px;width:9px;height:9px;background:#9badbd;border:3px solid #080e16;border-radius:50%}.load-label{font-size:10px;font-weight:800;margin-top:5px}.load-meter{width:80%;height:3px;margin-top:4px;background:#0b1e2d;border-radius:2px;overflow:hidden}.load-meter i{display:block;height:100%}.leaving .dock-truck{transform:translateX(160%)}#craneOverlay{position:fixed;inset:0;width:100vw;height:100dvh;z-index:40;pointer-events:none;display:none;filter:drop-shadow(0 3px 2px #0006)}.brand b{font-size:13px}.brand small{letter-spacing:.1em}.footnote{font-size:7px}.section-header{letter-spacing:.03em}.parking-section{flex:none}.app{min-height:100dvh}main{flex:0}.toolbar{margin-bottom:0}@media(max-height:780px){.boarding-slot{min-height:76px}.passenger-queue{height:53px}.heading-strip{min-height:48px}.topbar{min-height:44px;height:44px}.tool{height:43px}main{gap:5px}}

/* Dedicated exit lane: loaded trucks remain visible while driving away. */
.road-line{height:49px;position:relative;overflow:hidden;border-top:1px solid #71899755;border-bottom:1px solid #71899755}.road-line>span:not(.lane-dashes){align-self:flex-end;margin-bottom:3px;font-size:7px}.lane-dashes{position:absolute;left:5px;right:5px;bottom:5px;opacity:.45}.departing-truck{filter:drop-shadow(0 5px 3px #0009)}body{overflow-x:hidden}

/* V3: fit all game controls inside the actual browser viewport. */
html,body{height:100%;overflow:hidden}
.app{height:var(--app-height,100dvh);min-height:0;padding-inline:9px;overflow:hidden}
.topbar{height:39px;min-height:39px;flex:none}.brand-icon{width:29px;height:29px}.brand b{font-size:12px}.brand small{font-size:7px}.icon-button{width:29px;height:29px}
.heading-strip{height:43px;min-height:43px;padding:4px 0;flex:none}.level-title strong{font-size:17px}.eyebrow{font-size:8px}.stat-pill{padding:3px 7px;min-width:58px}.stat-pill b{font-size:12px}
main{flex:1;min-height:0;gap:5px}.queue-section,.boarding-section{flex:none}.section-header,.parking-head{height:21px;min-height:21px;padding-inline:8px;font-size:9px}
.queue-section .passenger-queue{height:40px;margin:0 6px 5px;padding:3px 5px;gap:6px}.cargo-box{height:25px;width:28px;font-size:10px}.cargo-box.weight-2{height:28px;width:30px}.cargo-box.weight-3{height:32px;width:32px}
.boarding-slots{min-height:0;padding:0 6px 4px;gap:5px}.boarding-slot{min-height:48px;height:48px;padding:2px 4px 3px;gap:0;border-radius:7px}.boarding-slot .empty{font-size:8px}.boarding-slot .empty:before{font-size:14px}.boarding-slot>.slot-index{font-size:7px;left:3px;top:2px}.dock-truck{height:28px}.truck-cab{height:25px;width:21px}.truck-bed{height:19px}.truck-bed i{height:12px}.load-label{font-size:9px;margin-top:1px}.load-meter{height:2px;margin-top:2px}.road-line{height:37px;flex:none}
.parking-section{flex:1;min-height:0}.canvas-wrap{flex:1;min-height:0;margin:0 4px 4px;display:flex;align-items:center;justify-content:center}canvas{flex:none;width:auto;height:auto;max-width:100%;max-height:100%;aspect-ratio:1}
.toolbar{height:40px;min-height:40px;flex:none;margin:5px 0 4px;gap:4px}.tool{height:40px;font-size:8px}.tool-ico{font-size:18px;line-height:18px}.footnote{display:none}
@media(max-height:560px){.topbar{height:33px;min-height:33px}.heading-strip{height:36px;min-height:36px}.brand small,.eyebrow{display:none}.queue-section .passenger-queue{height:35px}.boarding-slot{height:43px;min-height:43px}.road-line{height:30px}.toolbar,.tool{height:35px;min-height:35px}}
