@font-face{font-family:TitleMincho;src:url('./art/title-type.woff') format('woff');font-display:swap;font-style:normal;font-weight:700}
:root{--navy:#10232e;--dark:#0e1c26;--ink:#192e3a;--cream:#fff0cf;--paper:#fff1d8;--muted:#b7c4c4;--orange:#ff8951;--red:#df573d;--line:#48606a;--latin:"Barlow Condensed","Arial Narrow","Arial",sans-serif;--mono:"IBM Plex Mono","Menlo",Consolas,monospace;--zh:"Noto Sans HK","PingFang HK","Microsoft JhengHei","Noto Sans CJK TC",system-ui,sans-serif;font-family:var(--zh);color:#f8edd4;background:var(--dark);font-size:16px;color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%}
body{overscroll-behavior:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
button,input,select{font:inherit}
button{cursor:pointer;color:inherit;touch-action:manipulation;-webkit-user-select:none;user-select:none}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #ffbd65;outline-offset:3px}
button:disabled{cursor:default;opacity:.46}
button{transition:background .16s,color .16s,transform .16s,border-color .16s}
button:active:not(:disabled){transform:translateY(1px)}
button svg{display:block;flex-shrink:0}
[hidden]{display:none!important}
#app{height:100vh;height:100dvh;min-height:310px;display:flex;flex-direction:column;overflow:hidden}
.topbar,.home-foot,.route-deck{position:relative;z-index:2}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;height:clamp(54px,7.6vh,72px);flex:none;padding:0 clamp(16px,4vw,72px);background:#10232e;border-bottom:1px solid #57636a}
.rail-brand,.header-controls,.tool,.hero-top,.service-plate,.hero-station,.roman-title,.launch,.route-heading>div,.home-foot,.home-foot>span,.home-foot button,.trip-hud,.trip-board,.trip-tools,.game-tool,.drive-deck,.motion-controls,.drive-button{display:flex;align-items:center}
.rail-brand{gap:10px;line-height:1;color:var(--cream)}
.brand-mark{width:43px;height:37px;display:grid;place-items:center;background:var(--orange);color:var(--navy);clip-path:polygon(0 0,100% 0,100% 70%,77% 100%,0 100%)}
.rail-brand b{display:block;font-size:19px;font-weight:900;letter-spacing:.10em;font-style:italic}
.rail-brand small{font:700 9px/1.3 var(--latin);letter-spacing:.21em;color:#b5c3c5}
.header-controls{gap:9px}
.tool,.game-tool{background:transparent;color:#e7e9df;gap:7px;border:1px solid transparent;border-radius:5px;justify-content:center;padding:8px 11px;min-height:40px;font-weight:650;font-size:14px}
.tool:hover,.game-tool:hover{background:#344550}
.tool.teacher{border-color:#65747b;padding:8px 14px;margin-left:4px}
.tool>span:first-child,.hero-station>span:first-child,.launch-play{display:grid;place-items:center}
#home{flex:1;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto}
.hero{isolation:isolate;overflow:hidden;position:relative;min-height:0;display:flex;align-items:center;--gutter:clamp(26px,6.1vw,115px)}
.hero-art,.hero-shade{position:absolute;inset:0;z-index:-1}
.hero-art{background:#346674 url('./art/coastal-sky.webp') 52% 53%/cover no-repeat}
.hero-shade{background:linear-gradient(90deg,rgba(6,23,38,.70),rgba(12,30,43,.44) 25%,rgba(14,37,48,.05) 48%,transparent 65%),linear-gradient(0deg,rgba(10,29,40,.39),transparent 29%)}
.hero-top{position:absolute;left:var(--gutter);top:clamp(17px,3.2vh,42px)}
.service-plate{gap:8px;padding:5px 10px 5px 8px;border:1px solid #e8e6ca80;background:#142e3bbd;color:#ffedc5;letter-spacing:.18em;font-weight:850;font-size:13px;line-height:1.2}
.service-plate b{border-left:1px solid #dfdfbd80;padding-left:9px;font:700 10px/1.3 var(--mono);letter-spacing:.12em}
.service-plate i{width:15px;height:9px;background:repeating-linear-gradient(-55deg,transparent 0 2px,var(--orange) 2px 5px)}
.hero-copy{margin:clamp(12px,3vh,32px) 0 0 var(--gutter);width:fit-content}
h1,h2,h3,p{margin:0}
h1{font:700 clamp(68px,min(8.7vw,14vh),152px)/.98 TitleMincho,"Noto Serif CJK TC","PMingLiU",serif;letter-spacing:-.06em;color:#fff3d7;transform:skewX(-7deg);transform-origin:bottom left;text-shadow:2px 3px 0 #243645,4px 5px 0 #cf583f,6px 7px 0 #193947}
h1>span{display:block;white-space:nowrap}
h1>span:first-child{margin-left:.055em}
h1 .bang{color:#ff9c68;margin-left:-.13em}
.roman-title{gap:10px;margin:clamp(12px,2.2vh,24px) 0 clamp(18px,4.1vh,49px);color:#ffebc5;font:800 clamp(11px,1.05vw,17px)/1 var(--latin);letter-spacing:.2em;text-shadow:0 1px 5px #172a3b}
.roman-title>span{display:block;width:27px;height:8px;background:repeating-linear-gradient(-56deg,transparent 0 3px,#fa8d58 3px 7px)}
.launch{min-height:56px;border:none;padding:0 0 0 17px;color:#152a36;background:#ff925a;box-shadow:0 4px 0 #142b39,0 7px 15px #14253555;gap:13px;clip-path:polygon(0 0,100% 0,100% 86%,96% 100%,0 100%);border-radius:3px 3px 0 3px}
.launch:hover{background:#ffac78}
.launch-play{width:31px;height:31px;border:2px solid #273c45;border-radius:50%}
.launch-play svg{margin-left:2px;width:18px}
.launch strong{font-size:clamp(19px,1.7vw,25px);letter-spacing:.09em;white-space:nowrap;font-weight:900}
.launch-stub{align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;margin-left:3px;padding:0 17px;border-left:2px dashed #8f533a;color:#433c36}
.launch-stub span{font-weight:800;font-size:12px;letter-spacing:.13em}.launch-stub small{font:700 10px/1 var(--mono);letter-spacing:.12em}
.hero-station{position:absolute;bottom:clamp(16px,2.7vh,35px);right:clamp(20px,4vw,72px);gap:9px;padding:6px 11px 6px 9px;color:#fff4d9;background:#142e3abf;border-left:3px solid #ff9561}
.hero-station b{display:block;font-size:14px;line-height:1.35;letter-spacing:.09em}
.hero-station small{display:block;font:600 8px/1.3 var(--mono);letter-spacing:.14em;color:#dfdfcd}
.route-deck{display:flex;align-items:center;gap:clamp(14px,3.2vw,58px);padding:clamp(14px,2.4vh,28px) clamp(18px,4.4vw,80px);background:#172c38;border-top:3px solid #ebbc86}
.route-heading{flex:none}.route-heading>div{gap:7px;margin-bottom:5px}.orange-rule{width:16px;height:3px;background:var(--orange)}.latin{color:#f4b285;font:700 11px/1 var(--mono);letter-spacing:.13em}.route-heading h2{font-size:clamp(20px,1.7vw,29px);font-weight:850;letter-spacing:.12em}
.routes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(6px,.8vw,13px);flex:1;min-width:0}
.route-option{position:relative;min-width:0;display:flex;align-items:center;gap:clamp(6px,.75vw,11px);border:1px solid #526571;border-radius:4px;padding:clamp(10px,1.65vh,18px) clamp(7px,1vw,18px);background:#1c3340;text-align:left;line-height:1.22}
.route-option .route-symbol{display:grid;place-items:center;width:clamp(30px,2.9vw,46px);height:clamp(30px,2.9vw,46px);flex:none;border:1px solid currentColor;border-radius:50%;color:var(--route);background:#1b2e3a}
.route-option .route-symbol svg{width:62%;height:62%}
.route-option strong{display:block;white-space:nowrap;font-size:clamp(14px,1.25vw,21px);letter-spacing:.025em}
.route-option small{display:block;color:#b8c8c9;font:650 clamp(8px,.66vw,11px)/1.6 var(--mono);letter-spacing:.07em;white-space:nowrap}
.route-option:hover{background:#293e48;border-color:var(--route)}
.route-option[aria-pressed=true]{background:#f6e8ca;border-color:#f6e8ca;color:#1e3441;box-shadow:inset 0 -3px #ed9865}
.route-option[aria-pressed=true] small{color:#536166}.route-option[aria-pressed=true] .route-symbol{background:#223944;color:#ffd39a}
.route-option[aria-pressed=true]::after{content:'';position:absolute;right:5px;top:5px;width:5px;height:5px;border-radius:50%;background:#ac5438}
.home-foot{min-height:32px;font-size:12px;color:#c0ccca;gap:20px;padding:0 clamp(18px,4.4vw,80px);background:#10232e;border-top:1px solid #415762}
.home-foot>span,.home-foot button{gap:7px}.home-foot i{width:7px;height:7px;border-radius:50%;background:#81c7a5}
.home-foot button{color:#d9dfd3;border:none;background:transparent;border-left:1px solid #50636b;padding:2px 0 2px 19px;font-size:12px;min-height:29px}
.home-foot button:hover{color:var(--orange)}.switch-note{color:#9eafb1;font-size:11px}
.foot-clock{margin-left:auto;font:500 11px/1 var(--mono);letter-spacing:.12em}
#game{flex:1;min-height:0;position:relative;isolation:isolate;background:#8bb4c4;overflow:hidden}
.scenery,.scenery canvas,.cab-frame,#speedFx{position:absolute;inset:0;width:100%;height:100%;display:block}
.scenery{bottom:70px;height:auto}
.cab-frame{pointer-events:none;display:none;border-top:9px solid #293c44;box-shadow:inset 0 4px 0 #6c7471}
.cab-view .cab-frame{display:block}
.cab-frame>i{position:absolute;top:-2%;bottom:-8%;width:3.2%;background:linear-gradient(90deg,#22313d,#536168 60%,#8a918a 63%,#384851 74%);box-shadow:1px 0 1px #dbcbac}
.cab-frame>i:first-child{left:-.5%;transform:skewX(-9deg)}.cab-frame>i:last-child{right:-.5%;transform:skewX(9deg) scaleX(-1)}
#speedFx{opacity:0;pointer-events:none;transition:opacity .25s;background:repeating-conic-gradient(from 40deg at 55% 47%,transparent 0deg 11deg,#fff4ca6b 11.1deg 11.6deg,transparent 11.7deg 19deg);mask-image:radial-gradient(ellipse,transparent 34%,#000 90%)}
.boosting:not(.calm) #speedFx{opacity:.78}
.trip-hud{position:absolute;top:13px;left:clamp(12px,2.2vw,35px);right:clamp(12px,2.2vw,35px);z-index:2;justify-content:space-between;pointer-events:none;gap:8px}
.trip-board,.trip-tools{pointer-events:auto}.trip-board{gap:9px;background:#152d3bed;color:#fff0cd;border:1px solid #e5d8b4a0;padding:7px 13px 7px 7px;max-width:75%;border-radius:4px}
.route-code{display:grid;place-items:center;min-width:38px;height:36px;padding:0 3px;border-radius:3px;background:#ff9b64;color:#1c3241;font:900 18px/1 var(--latin);font-style:italic}
.trip-board small,.trip-board b{display:block}.trip-board small{font-size:11px;line-height:1.1;color:#b3c7c4}.trip-board b{font-size:17px;line-height:1.4}
#tripDots{display:flex;gap:4px;margin-left:5px}
#tripDots i{height:8px;width:8px;border:1px solid #aac2c1;border-radius:50%}#tripDots .done{background:#a9d6a2;border-color:#a9d6a2}#tripDots .here{background:var(--orange);border-color:var(--orange)}
.trip-tools{gap:5px}.game-tool{background:#1a3040ec;border:1px solid #b3b9aa88;min-height:44px}
.radio-card{position:absolute;bottom:clamp(98px,16vh,153px);left:clamp(12px,3vw,52px);display:flex;align-items:center;gap:12px;max-width:min(570px,83%);padding:8px 17px 8px 8px;background:#f8edd4f5;color:var(--ink);border:2px solid var(--ink);border-radius:5px;box-shadow:3px 3px 0 #20313c7a;pointer-events:none}
.radio-card:empty{display:none}.radio-portrait{width:44px;height:44px;flex:none}.radio-portrait svg{width:100%;height:100%;display:block}.radio-card small{display:block;color:#a74b33;letter-spacing:.1em;font-size:11px;font-weight:850}.radio-card b{font-size:clamp(15px,1.6vw,22px)}
.drive-deck{position:absolute;bottom:0;width:100%;min-height:86px;padding:8px clamp(10px,2.1vw,36px) max(8px,env(safe-area-inset-bottom));gap:clamp(10px,2.4vw,42px);background:linear-gradient(#53616a 0px,#d1c9b0 2px,#3d515b 3px,#1d333f 9px,#172c38 100%);border-top:3px solid #23404b;color:#f4e7c8;z-index:2}
.cab-view .drive-deck:before{content:'';position:absolute;left:0;right:0;bottom:100%;height:15px;clip-path:polygon(0 100%,5% 5%,26% 5%,33% 88%,77% 88%,82% 20%,98% 20%,100% 100%);background:#354b56;pointer-events:none}
.speed-cluster{flex:none;min-width:102px;padding:4px 11px 5px;background:#10252c;border:1px solid #556762;border-radius:4px;text-align:center}
.speed-read b{font:800 clamp(24px,3vw,38px)/1.05 var(--mono);letter-spacing:-.06em;color:#ffc483;font-variant-numeric:tabular-nums}.speed-read span{font:600 11px/1 var(--mono);color:#e0ccab;margin-left:5px}
.speed-bars{display:flex;gap:2px;justify-content:center;margin-top:2px}.speed-bars i{width:7px;height:4px;background:#345254}.speed-bars i.on{background:#86c5a3}
.distance-cluster{min-width:68px;flex:1;max-width:160px}.distance-cluster small,.distance-cluster b{display:block}.distance-cluster small{font-size:12px;color:#bccbc8}.distance-cluster b{font:700 16px/1.5 var(--mono)}.distance-cluster>div{height:3px;background:#425c63}.distance-cluster i{display:block;height:100%;background:var(--orange)}
.motion-controls{gap:7px;margin-left:auto}.drive-button{justify-content:center;gap:7px;min-height:48px;padding:8px clamp(10px,1.6vw,25px);background:#304855;border:1px solid #687b7e;border-bottom:3px solid #132731;border-radius:5px}.drive-button b{font-size:clamp(14px,1.35vw,20px)}
.drive-button:hover{background:#425c65}.drive-button.active-pull{background:var(--orange);border-color:#ffb078;border-bottom-color:#ad5639;color:#162c37}.drive-button.active-pull:hover{background:#ffa366}
.mission-layer{position:absolute;inset:0;z-index:3;display:grid;align-items:end;justify-items:center;pointer-events:none;padding:64px 12px clamp(12px,3vh,35px);background:linear-gradient(transparent 20%,#1734443b 70%,#1f344acc)}
.mission-paper,.paper{color:var(--ink);background:var(--paper)}
.mission-paper{max-height:100%;overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;width:min(780px,100%);padding:clamp(12px,2.3vh,23px) clamp(16px,2vw,32px) 10px;border:2px solid #203644;border-top:6px solid #ef8055;border-radius:6px;box-shadow:0 7px 0 #162d3dc9,0 17px 50px #12232d66}
.mission-heading,.station-kicker,.count-actions,.sort-top,.draw-tools,.mission-feedback,.dialog-header,.paper-actions,.tabstrip,.quota,.result-actions{display:flex;align-items:center}
.mission-heading{justify-content:space-between}.station-kicker{gap:7px;color:#a84e35}.station-kicker b{font-size:13px;letter-spacing:.06em}.station-kicker span{font:700 12px/1 var(--mono);margin-left:6px;color:#6e7978}
.speaker,.icon-paper,.hint-button,.paper-button,.solid-paper,.tabstrip button,.small-chip,.pill,.back-paper{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.speaker,.icon-paper{width:38px;height:36px;border:1px solid #87938c;background:#f7ebd0;color:var(--ink);border-radius:4px}
.mission-paper h2{font-size:clamp(20px,2.3vw,33px);letter-spacing:.03em;margin:2px 0 clamp(8px,1.6vh,18px);line-height:1.35}
.pick-grid,.bin-grid{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:clamp(5px,1vw,13px)}
.choice,.bin-button{color:#243b46;position:relative;border:2px solid #80908b;border-radius:6px;background:#f5e6c7;display:flex;align-items:center;justify-content:center;min-width:0;min-height:clamp(70px,13.5vh,124px);padding:8px}
.choice:hover,.bin-button:hover,.paper-button:hover,.speaker:hover,.icon-paper:hover,.small-chip:hover,.pill:hover{background:#ffe4b3}
.choice.hinted,.bin-button.hinted{outline:4px solid #d7733a;outline-offset:-3px}
.tunnel-choice{background:#e3e2ca;flex-direction:column;overflow:hidden;padding:3px 2px 0;gap:0}
.tunnel-mouth{border:clamp(5px,.7vw,9px) solid #758b8a;border-bottom:3px solid #425a62;border-radius:48% 48% 0 0;display:grid;place-items:center;color:#f8c784;background:#253e4b;width:77%;max-width:100px;height:clamp(50px,8.7vh,85px)}
.tunnel-mouth svg{height:90%;width:78%}.rail-ties{width:80%;max-width:114px;height:15px;clip-path:polygon(15% 0,85% 0,100% 100%,0 100%);background:repeating-linear-gradient(0deg,#847e68 0 3px,transparent 3px 7px),linear-gradient(90deg,transparent 0 20%,#40545d 20% 24%,transparent 24% 76%,#40545d 76% 80%,transparent 80%)}
.paint-can,.energy-cell{display:block;position:relative;--paint:#499;box-shadow:inset 6px 0 #ffffff3d,inset -7px 0 #182b3322}
.paint-can{width:clamp(38px,6.2vw,81px);height:clamp(35px,7.6vh,71px);margin-top:9px;background:var(--paint);border:2px solid #3d4c50;border-radius:22% 22% 14% 14%/9% 9% 7% 7%}
.paint-can:before{content:'';position:absolute;inset:-25% 9% 55%;border:3px solid #67777b;border-bottom:0;border-radius:40px 40px 0 0;z-index:0}
.paint-can i,.paint-can b{position:absolute;left:-4%;right:-4%;height:17%;border:2px solid #52666d;border-radius:50%;background:#b4c5bb}
.paint-can i{top:-5%;background:#d4d8c6}.paint-can b{bottom:-4%;height:13%;background:linear-gradient(0deg,#9dada7 50%,var(--paint) 55%)}
.energy-cell{width:clamp(32px,5vw,55px);height:clamp(52px,9.5vh,90px);background:var(--paint);border:3px solid #42545d;border-radius:9px 9px 6px 6px}
.energy-cell:before,.energy-cell:after{content:'';position:absolute;left:5%;right:5%;height:6px;background:#77888a;border:1px solid #455d65}.energy-cell:before{top:-7px}.energy-cell:after{bottom:-4px}.energy-cell i{position:absolute;left:17%;top:15%;height:45%;width:6%;background:#ffffff88}
.platform-sign{display:flex;align-items:center;justify-content:center;flex-direction:column;min-width:min(100%,67px);border:3px solid #2b4b57;background:#f8edd5;border-radius:5px;box-shadow:0 3px 0 #78877f}
.platform-sign small{font-size:11px;font-weight:750;align-self:stretch;background:#345968;color:#fff4cd}.platform-sign b{font:900 clamp(26px,4vh,45px)/1.15 var(--mono);padding:4px 2px}
.mission-feedback{justify-content:space-between;gap:8px;margin-top:8px;border-top:1px dashed #bdc0a9;padding-top:5px;min-height:36px}
.feedback{color:#546563;font-size:14px;font-weight:650}.feedback.good{color:#226a50}.feedback.wrong{color:#92523b}
.hint-button{border:0;background:transparent;color:#465857;font-size:14px;font-weight:750;padding:7px;min-height:34px;white-space:nowrap}
.free-running .mission-layer,.at-task .drive-deck,.at-task .radio-card{display:none}.at-task .scenery{bottom:0}
.sort-top{justify-content:center;gap:12px;margin:5px 0 10px}.sort-top b,.sort-top small,.count-actions small{display:block}.sort-top small,.count-actions small,.draw-reference small{color:#566a6a;font-size:13px;line-height:1.4}
.cargo{touch-action:none;position:relative;z-index:1;display:grid;place-items:center;width:62px;height:62px;background:#eeb772;border:2px solid #865f40;border-radius:5px;cursor:grab}.cargo svg{width:90%;height:90%;color:#8c542f}.cargo.dragging{z-index:10;opacity:.84}
.bin-button{min-height:clamp(51px,9vh,77px);border:0;background:transparent;padding:0 2px 9px}.bin{position:relative;display:grid;place-items:center;background:#587985;border:3px solid #314d59;border-radius:4px;color:#304d59;width:100%;height:100%;min-height:48px}.bin:after{content:'';position:absolute;bottom:-10px;left:0;right:0;height:10px;background:radial-gradient(circle at 20% 1px,#253844 0 6px,transparent 6.5px),radial-gradient(circle at 80% 1px,#253844 0 6px,transparent 6.5px)}.bin svg{height:39px;width:50px}
.paint-sample{width:55%;height:25px;background:var(--paint);border:2px solid #233c47;border-radius:3px}
.color-person{width:38px;height:42px;border:2px solid #2d434c;position:relative;border-radius:18px 18px 7px 7px;background:var(--paint)}.color-person:before{position:absolute;content:'';left:8px;top:11px;width:4px;height:4px;border-radius:9px;background:#182d39;box-shadow:13px 0 #182d39,0 0 0 1px #e6dacf,13px 0 0 1px #e6dacf}.color-person:after{content:'';position:absolute;bottom:-6px;left:3px;width:10px;height:6px;background:#213b48;box-shadow:17px 0 #213b48}
.count-board{display:flex;gap:clamp(10px,3vw,35px);align-items:center;justify-content:center}
.quota{min-width:77px;align-self:stretch;justify-content:center;flex-direction:column;padding:6px 12px;border:1px dashed #c69e71;background:#f7dfb4;line-height:1.3}.quota span{font-size:12px;font-weight:750}.quota>b,.quota>strong{font:850 27px/1.1 var(--mono)}.quota strong{color:#247360}.quota i{height:1px;width:65%;background:#bdad89;margin:5px 0}
.passengers{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:4px;max-width:82%;flex:1}
.passenger{position:relative;border:1.5px solid #a7ac98;background:#f5e8c9;border-radius:5px;display:grid;place-items:center;padding:2px;height:clamp(36px,7vh,67px)}.passenger svg{width:100%;height:100%;max-width:54px}.passenger[aria-pressed=true]{border-color:#398467;background:#b7dec6}.boarded-tick{display:none;position:absolute;right:2px;bottom:2px;background:#286c53;color:#fff2cf;border-radius:50%;padding:1px}.passenger[aria-pressed=true] .boarded-tick{display:grid}
.count-actions{margin-top:7px;justify-content:space-between;gap:8px}
.paper-button,.solid-paper,.back-paper{padding:8px 14px;min-height:41px;border:1px solid #778a87;border-radius:4px;background:#f2e6ca;color:var(--ink);font-size:15px;font-weight:750}
.solid-paper{border-color:#223c49;background:#284a57;color:#fff1d0}.solid-paper:hover{background:#386171}
.draw-layout{display:flex;align-items:center;justify-content:center;gap:clamp(12px,2.4vw,35px)}.draw-pad{touch-action:none;background:#faf6df;border:2px dashed #879888;border-radius:7px;width:clamp(115px,26vh,235px);height:clamp(115px,26vh,235px);cursor:crosshair}
.draw-reference{display:grid;justify-items:center;text-align:center;max-width:120px}.draw-reference svg{color:#754f3f;width:64px;height:64px}.draw-reference b{font-size:18px}.draw-tools{flex-direction:column;gap:8px}
dialog{color-scheme:light;width:min(650px,calc(100% - 26px));max-height:calc(100dvh - 28px);padding:0;border:2px solid #1c3442;border-radius:8px;background:var(--paper);color:var(--ink);box-shadow:0 14px 55px #101e2a77;overflow:auto;overscroll-behavior:contain}
dialog::backdrop{background:#102532ba;backdrop-filter:blur(3px)}
.paper{padding:clamp(15px,2.7vw,30px)}.dialog-header{justify-content:space-between;gap:15px;margin-bottom:16px;border-bottom:2px solid #3d5155;padding-bottom:12px}
.dialog-header small,.ticket-eyebrow{display:block;font:700 11px/1.3 var(--mono);letter-spacing:.14em;color:#a14c37}.dialog-header h2{font-size:clamp(23px,3vw,34px);line-height:1.4;font-weight:900}.dialog-header .icon-paper{flex:none}
.tabstrip{gap:7px;margin:0 0 15px}.tabstrip button,.small-chip,.pill{color:var(--ink);border:1px solid #8f9c91;padding:7px 10px;background:#f4e9cf;font-size:14px;font-weight:700;border-radius:4px;min-height:38px}.tabstrip button[aria-selected=true],.small-chip[aria-pressed=true],.pill[aria-pressed=true]{background:#284956;border-color:#284956;color:#fff1d2}
.setting-row{padding:9px 0;border-bottom:1px solid #cbbfa7;display:flex;align-items:center;justify-content:space-between;gap:12px}.setting-row>strong,.prefs-group summary{font-size:15px;font-weight:800}.setting-row label{display:flex;align-items:center;gap:8px}
.chips{display:flex;gap:5px;flex-wrap:wrap}.prefs-group{border-bottom:1px solid #cbbfa7;padding:10px 0}.prefs-group summary{cursor:pointer}.prefs-group .chips{margin-top:9px}.prefs-group p{font-size:13px;color:#5e6b68;margin-top:8px}
.setting-compact{display:flex;align-items:center;gap:9px;font-size:14px}.setting-compact input{width:21px;height:21px;accent-color:#37695f}
.paper-actions,.result-actions{gap:8px;justify-content:flex-end;margin-top:17px}.form-status{font-size:13px;color:#a34935;min-height:15px}.muted-copy{color:#526562;font-size:15px;line-height:1.6}.garage-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.garage-option{color:var(--ink);padding:10px 5px;background:#f8e8c9;border:2px solid #b0ac93;border-radius:5px}.garage-option[aria-pressed=true]{border-color:#376b66;background:#dce8cf}.garage-option svg{display:block;width:100%;max-height:60px}.garage-option b{display:block;margin-top:6px}
.short-dialog{max-width:500px;margin:auto}.dialog-note{color:#586665;font-size:14px;line-height:1.6}
.result-head{text-align:center}.stamp-medal{display:grid;place-items:center;width:96px;height:96px;color:#ab5139;border:5px double currentColor;border-radius:50%;margin:0 auto 10px;transform:rotate(-9deg);background:repeating-linear-gradient(-45deg,transparent 0 7px,#d6996e18 7px 9px)}.stamp-medal svg{width:45px;height:45px}.stamp-medal small{font-size:11px;letter-spacing:.2em;font-weight:850}.result-head h3{font-size:clamp(22px,3vw,32px)}.result-stats{display:flex;gap:7px;margin-top:18px}.result-stats div{flex:1;text-align:center;padding:6px;background:#f1dfbd;border:1px solid #c3b396}.result-stats strong{display:block;font:800 24px/1.4 var(--mono)}.result-stats small{font-size:12px}.record{border-bottom:1px dashed #b7ae96;padding:10px 0}.record summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;cursor:pointer;font-weight:750;font-size:15px}.record summary small,.record-detail small{font-weight:500;color:#60706d}.record-detail{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:6px 0 0 5px;font-size:14px}.record-detail em{display:inline-block;width:7px;height:7px;background:#428b6c;border-radius:50%}.record-detail em.assist{background:#db8a47}
.toast{position:fixed;z-index:30;bottom:clamp(14px,6vh,67px);left:50%;transform:translateX(-50%);border:1px solid #e2cc9c;border-radius:5px;background:#1c3543;color:#fff0d2;padding:9px 14px;max-width:90%;text-align:center;font-size:14px;pointer-events:none}
@media(max-width:930px){.route-deck{gap:14px;padding-inline:18px}.route-option{padding-inline:6px;gap:6px}.route-heading h2{font-size:19px}.latin{font-size:9px}.route-heading>div{gap:4px}.route-heading .orange-rule{width:11px}.drive-deck{gap:14px}.radio-card{bottom:102px}}
@media(max-width:720px){.topbar{padding-inline:12px}.tool{padding:6px;min-width:35px}.tool.teacher{padding:6px 9px}.tool .toollabel{display:none}.header-controls{gap:4px}.route-deck{display:block;padding:9px 12px}.route-heading{display:flex;gap:9px;align-items:center;margin-bottom:6px}.route-heading>div{margin:0}.route-heading h2{font-size:14px;order:-1}.route-option{justify-content:center}.route-option .route-symbol{width:25px;height:25px}.route-option strong{font-size:12px}.route-option small{font-size:7px}.home-foot{padding-inline:13px;gap:10px}.distance-cluster{display:none}.scenery{bottom:65px}.drive-deck{min-height:70px;gap:8px}.drive-button{padding:6px 9px;gap:4px;min-height:44px}.motion-controls{gap:4px}.speed-cluster{min-width:78px;padding:4px}.speed-bars i{width:4px}.trip-board{gap:7px}.radio-card{bottom:85px}.trip-board b{font-size:15px}.trip-board small{font-size:10px}}
@media(max-width:590px) and (orientation:portrait){.hero{--gutter:21px;align-items:flex-end;padding-bottom:26px}.hero-art{background-position:59% 38%}.hero-shade{background:linear-gradient(0deg,#102936f5,rgba(15,37,52,.41) 45%,transparent 74%)}.hero-copy{margin-top:0}.hero-top{top:16px}.hero-station{bottom:18px;right:12px}.hero-station b{font-size:11px}.hero-station small{font-size:7px}.hero-station .home-map-pin{display:none}h1{font-size:clamp(59px,15vw,84px)}.roman-title{font-size:10px;margin:11px 0 18px}.launch{min-height:49px;gap:9px;padding-left:12px}.launch strong{font-size:18px}.launch-stub{padding:0 11px}.routes{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.route-option{justify-content:flex-start;padding:7px 10px}.route-option strong{font-size:14px}.route-option .route-symbol{width:27px;height:27px}.drive-button{flex-direction:column;min-height:51px;gap:2px}.drive-button b{font-size:12px}.drive-button svg{height:17px;width:17px}.speed-cluster{min-width:61px}.speed-read span{font-size:8px}.trip-hud{left:7px;right:7px;top:8px}.trip-board{padding:4px 7px 4px 4px}.route-code{min-width:28px;font-size:14px;height:32px}#tripDots{gap:2px;margin-left:0}#tripDots i{width:5px;height:5px}.game-tool{padding:6px;gap:4px;min-height:39px;font-size:12px}.pick-grid,.bin-grid{grid-template-columns:repeat(min(var(--n),3),minmax(0,1fr))}.draw-layout{gap:8px;flex-wrap:wrap}.draw-reference svg{height:40px}.draw-reference{max-width:80px}.draw-tools{flex-direction:row}.mission-layer{padding-inline:6px}.mission-paper h2{font-size:21px}.draw-pad{width:clamp(122px,40vw,190px);height:clamp(122px,40vw,190px)}.setting-row{align-items:flex-start;flex-direction:column;gap:5px}.switch-note{display:none}.sort-top{gap:6px}.garage-grid{gap:4px}.passengers{gap:2px}}
@media(max-height:550px) and (orientation:landscape){.topbar{height:43px}.rail-brand b{font-size:15px}.rail-brand small{font-size:7px}.brand-mark{height:29px;width:34px}.brand-mark svg{height:27px}.tool{min-height:31px;padding:3px 8px}.tool.teacher{padding:3px 8px}.hero-top{top:9px}.service-plate{font-size:10px;padding:3px 6px}.service-plate b{font-size:8px}.hero-copy{margin-top:10px}h1{font-size:clamp(39px,10.7vh,60px)}.roman-title{margin:5px 0 10px;font-size:9px}.launch{min-height:36px;gap:8px;padding-left:9px}.launch-play{width:23px;height:23px}.launch-play svg{width:13px}.launch strong{font-size:16px}.launch-stub{padding:0 9px;gap:0}.launch-stub span{font-size:9px}.launch-stub small{font-size:7px}.route-deck{display:flex;padding:7px 15px;gap:10px}.route-heading{display:block;margin:0}.route-heading h2{font-size:15px}.route-heading>div{margin:0 0 2px}.route-option{padding:5px}.route-option .route-symbol{width:24px;height:24px}.home-foot{min-height:23px;font-size:10px}.home-foot button{min-height:22px}.hero-station{bottom:10px}.trip-hud{top:5px}.trip-board{padding:3px 6px 3px 3px}.trip-board b{font-size:14px}.trip-board small{font-size:10px}.route-code{height:29px;min-width:29px;font-size:14px}.game-tool{min-height:35px;padding:4px 8px}.drive-deck{min-height:58px;padding-block:5px}.scenery{bottom:48px}.drive-button{min-height:39px;padding:4px 13px}.radio-card{bottom:66px;padding:4px 9px 4px 4px}.radio-portrait{width:32px;height:32px}.mission-layer{padding:43px 7px 4px}.mission-paper{padding:4px 12px 3px;max-width:690px;border-top-width:4px}.mission-paper h2{font-size:17px;margin:0 0 4px}.speaker{width:32px;height:27px}.mission-feedback{min-height:24px;margin-top:3px;padding:0}.hint-button{min-height:26px;padding:3px}.choice{min-height:59px}.sort-top{margin:1px 0 2px}.cargo{height:39px;width:39px}.draw-pad{width:clamp(82px,27vh,130px);height:clamp(82px,27vh,130px)}.passenger{height:clamp(27px,7.8vh,38px)}.count-actions{margin:2px 0 0}.solid-paper,.paper-button{min-height:32px;padding:3px 9px}.quota{padding:2px 6px}.quota>b,.quota>strong{font-size:19px}.quota i{margin:2px 0}.paper{padding:10px 17px}.dialog-header{margin-bottom:7px;padding-bottom:5px}.dialog-header h2{font-size:22px}.result-stats{margin-top:8px}.stamp-medal{width:60px;height:60px;margin-bottom:4px}.stamp-medal svg{height:25px;width:25px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:0s!important}}
.cab-instrument,.master-lever{display:none}
.cab-view .cab-instrument{display:block;width:70px;flex:none;background:#182b31;border:1px solid #57696a;border-radius:40px 40px 5px 5px;padding:2px}.cab-instrument svg{width:100%;display:block}
.cab-view .master-lever{position:relative;display:block;width:clamp(130px,15vw,215px);flex:none;padding:4px 12px;border:1px solid #687979;background:#243841;border-radius:5px;box-shadow:inset 0 0 12px #101e26aa;touch-action:none;cursor:grab;--pull:0}
.master-lever:active{cursor:grabbing}.lever-label,.lever-key{display:flex;align-items:center;justify-content:space-between;gap:3px}
.lever-label b{font-size:12px;line-height:1;color:#eee2c3}.lever-label span{font:600 8px/1 var(--mono);letter-spacing:.07em;color:#94acaa}.lever-track{height:22px;position:relative;margin-top:3px}
.lever-track i{position:absolute;left:5%;right:5%;height:6px;top:9px;border-radius:3px;background:#0d2027;box-shadow:0 1px #70807c}
.lever-track strong{position:absolute;left:calc(50% + var(--pull)*35%);top:1px;transform:translateX(-50%);width:33px;height:18px;border:1px solid #b57b55;border-radius:5px;box-shadow:0 3px 0 #15232c;background:repeating-linear-gradient(90deg,transparent 0 5px,#bb754c 5px 6px),linear-gradient(#ffc085,#e4844d)}
.lever-key span{font-size:10px;color:#c2d0c7;line-height:1.15}.voice-note{padding:8px 0 0}
@media(max-width:1040px){.cab-view .cab-instrument{display:none}.cab-view .master-lever{width:115px}.lever-label span{display:none}}
@media(max-width:720px){.cab-view .master-lever{display:none}}
.missed-items{width:100%;padding-left:12px}
