/* Departure board */
.hero-art{background-image:url('./art/coastal-sky.webp');background-position:57% 49%}
.hero-shade{background:linear-gradient(90deg,#12273664 0%,#15293323 32%,transparent 54%),linear-gradient(0deg,#11273573,transparent 27%)}
.hero-top{gap:12px;flex-wrap:wrap}
#homeMileage{color:#fff0d0;font-size:13px;font-weight:750;letter-spacing:.055em;text-shadow:0 1px 5px #162431}
.departure-actions,.depot-entry,.line-caption,.way-call button,.dispatch-head,.dispatch-signal,.signal-cells,.dispatch-foot,.worked-example,.ticket-seals,.ticket-seals span,.depot-issue,.depot-angles{display:flex;align-items:center}
.departure-actions{gap:13px;flex-wrap:wrap}
.depot-entry{min-height:50px;padding:8px 15px;border:1px solid #f2d7aa;background:#162a37e8;color:#fff1d0;gap:8px;border-radius:4px;font-weight:800;font-size:16px}
.depot-entry:hover{background:#344653}.home-line b{color:#6d8687}.home-line{white-space:nowrap}
.home-foot #garageButton{display:none}
.hero-station .home-map-pin{display:none}
.hero-station{border-left-width:4px;padding:9px 14px}
/* A full length preview uses exactly the same leading car as the game. */
dialog:has(.depot-paper){width:min(740px,95vw)}
.depot-paper{background:#f6edda}
.depot-view{background:radial-gradient(ellipse at 48% 73%,#e7e4cd 3%,#a5b9b3 54%,#72918e 100%);position:relative;isolation:isolate;border:2px solid #415859;border-radius:5px;overflow:hidden}
.depot-view:before{content:'';position:absolute;inset:54% 0 0;z-index:-1;background:repeating-linear-gradient(0deg,#485f6224 0 1px,transparent 1px 20px),linear-gradient(160deg,#8c9c9359,#d7d6c1 78%)}
.depot-view canvas{width:100%;height:clamp(180px,28vh,260px);display:block;touch-action:none;cursor:grab}.depot-view canvas:active{cursor:grabbing}
.depot-plaque{pointer-events:none;position:absolute;top:11px;left:13px;color:#213d45}.depot-plaque small,.depot-plaque b{display:block}.depot-plaque small{font-size:10px;letter-spacing:.18em}.depot-plaque b{font:900 20px/1.2 var(--mono)}
.depot-angles{position:absolute;bottom:7px;right:9px;gap:4px}.depot-angles button{background:#17323edb;color:#f6ead2;border:1px solid #c6c6b4;border-radius:3px;padding:4px 9px;min-height:34px;font-size:12px;font-weight:700}.depot-angles button[aria-pressed=true]{background:#f9dfb4;color:#273e44}
.depot-stock{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}
.depot-stock button{min-width:0;overflow:hidden;text-align:left;padding:0 0 8px;border:2px solid #aab1a3;border-radius:4px;background:#eee6d0;color:#19323c}
.depot-stock button[aria-pressed=true]{border-color:#b85b35;background:#ffe2b5;box-shadow:0 2px 0 #a25c3d}
.depot-stock img{display:block;width:100%;height:clamp(45px,9vh,79px);object-fit:cover;object-position:78% 53%;margin-bottom:5px}
.depot-stock span{display:flex;flex-wrap:wrap;gap:2px 6px;align-items:baseline;padding:0 7px}.depot-stock small{color:#536661;font-size:11px}
.depot-issue{justify-content:space-between;gap:12px;border-top:1px dashed #8e9d95;padding-top:10px}.depot-issue strong,.depot-issue small{display:block}.depot-issue small{font-size:13px;color:#53625e}.depot-issue .solid-paper{white-space:nowrap;min-height:44px}
/* Mileage strip, optional trackside calls and cab feedback. */
.line-strip{--zone:#81c6b4;position:absolute;left:clamp(12px,2.2vw,35px);top:73px;width:clamp(177px,17vw,245px);pointer-events:none;z-index:2;color:#eff2dc;background:#132c38ed;border-left:3px solid var(--zone);padding:6px 9px 7px;border-radius:0 3px 3px 0}
.line-caption{justify-content:space-between;gap:9px}.line-caption span{color:var(--zone);font-size:12px;font-weight:800}.line-caption b{font:600 10px/1 var(--mono);white-space:nowrap}
.strip-track{display:flex;gap:3px;margin-top:5px}.strip-track i{flex:1;height:3px;background:#5d7174}.strip-track i.past,.strip-track b{background:var(--zone)}.strip-track b{display:block;height:100%;width:0}
#driveEffect{display:block;color:#ffd197;font-size:12px;font-weight:750;margin:4px 0 0}
.way-call{position:absolute;right:clamp(12px,2.2vw,35px);bottom:clamp(103px,15.5vh,160px);z-index:2;width:min(335px,calc(100% - 24px));display:flex;gap:12px;align-items:flex-start;padding:13px 16px 14px 12px;border:1px solid #dbcfb0;border-top:4px solid #ff9c66;background:#172f3af5;color:#f6efd7;box-shadow:0 5px 20px #18292e57;border-radius:5px}
#wayIcon{flex:none;display:grid;place-items:center;color:#ffc18a;width:38px;height:38px;border:1px solid #a99678;border-radius:50%}
#wayKicker{font-size:10px;font-weight:800;letter-spacing:.10em;color:#f0af80}
.way-call h2{font-size:clamp(19px,1.7vw,25px);line-height:1.35}.way-call p{font-size:14px;line-height:1.48;margin:4px 0 8px;color:#e2e7d9}
.way-call button{min-height:46px;border:1px solid #ffd6a7;padding:6px 18px;background:#ffae74;color:#172e39;font-weight:900;font-size:17px;border-radius:3px;box-shadow:inset 0 -3px #be744d}.way-call button:hover{background:#ffbe8b}
.way-call[data-state=done]{border-top-color:#8fd6af}.way-call[data-state=done] #wayIcon{color:#acddb7}
.on-call .radio-card,.at-task .line-strip,.at-task .way-call{display:none}
#shutter{position:absolute;inset:0;background:#ffffe099;pointer-events:none;z-index:1}
.headlamps.cab-view .cab-frame:after{content:'';position:absolute;inset:45% 8% 0;background:linear-gradient(0deg,#ffdb8740,transparent 90%);clip-path:polygon(0 100%,44% 18%,54% 18%,100% 100%)}
/* Station theatre and dispatch desk. */
.mission-layer{padding:65px 14px clamp(10px,2.4vh,27px);background:linear-gradient(#102b3910,#152d3940 38%,#162b3bdd)}
.dispatch{padding:0;width:min(865px,100%);max-height:100%;border:2px solid #243c46;border-top:0;border-radius:7px;overflow:auto;background:#f9eed7;scrollbar-width:thin}
.dispatch-head{min-height:45px;gap:12px;justify-content:space-between;background:#1a3440;color:#fae6bf;padding:6px 15px;border-top:4px solid #eb8e58}
.dispatch .station-kicker{color:#ffca89;gap:6px}.dispatch .station-kicker b{font-size:15px}.dispatch .station-kicker span{color:#c5d0c8;letter-spacing:.06em}
.dispatch .speaker{margin-left:0;background:#29434b;border-color:#718989;color:#fff0cd;width:39px;height:33px;flex:none}
.dispatch-signal{gap:8px;margin-left:auto}.dispatch-signal>span{font-size:12px;color:#e8dfc4;white-space:nowrap}
.signal-cells{gap:5px}.signal-cells i{width:15px;height:15px;display:block;border-radius:50%;border:1.5px solid #ae9c84;background:#675451}.signal-cells i.live{background:#8bd3a6;border-color:#b6e9c7;box-shadow:inset 0 -3px #3e8568}
.director{min-width:0;background:#223b46}.stage-host .station-stage{margin:0;border:0;border-bottom:1px solid #56666b;border-radius:0;height:clamp(82px,17.5vh,165px);box-shadow:none;background:#203744}
.script-status{display:flex;align-items:baseline;gap:7px;color:#ffedc6;background:#29424a;padding:5px 16px;font-size:13px;line-height:1.5;font-weight:650}
.script-status i{height:8px;width:8px;flex:none;border-radius:50%;background:#efb971}
[data-dispatch=ready] .script-status i,[data-dispatch=success] .script-status i{background:#91d5b1}
[data-dispatch=wrong] .script-status i,[data-dispatch=recover] .script-status i{background:#f09981}
.student-panel{padding:12px clamp(12px,2.5vw,26px) 7px;min-width:0}
.dispatch h2{font-size:clamp(20px,2.1vw,28px);margin:0 0 9px;line-height:1.32}
.dispatch .mission-work[aria-disabled=true]{cursor:default}
.dispatch .pick-grid,.dispatch .bin-grid{max-width:705px;margin:auto}
.dispatch .choice,.dispatch .bin-button{touch-action:manipulation;transition:background .15s,border-color .15s,box-shadow .15s}
.dispatch .choice[aria-pressed=true],.dispatch .bin-button[aria-pressed=true]{background:#fbd4a4;border:3px solid #b65d36;box-shadow:inset 0 0 0 2px #fff1cc}
.dispatch .choice[aria-pressed=true]:after,.dispatch .bin-button[aria-pressed=true]:after{content:'✓';position:absolute;right:2px;top:2px;border-radius:50%;background:#a75430;border:1px solid #ffe7bd;color:white;width:18px;height:18px;font:bold 13px/17px sans-serif}
.dispatch-foot{padding:8px clamp(12px,2.5vw,26px) 10px;gap:8px;border-top:1px dashed #a4aa97;margin-top:5px}.dispatch-foot .feedback{flex:1;line-height:1.4}.dispatch-foot .hint-button,.dispatch .dispatch-submit,.worked-example{gap:6px}
.dispatch .dispatch-submit{min-height:46px;background:#ee9b60;color:#213640;border:1px solid #996848;box-shadow:inset 0 -3px #cb7d4a;font-size:16px;white-space:nowrap}
.dispatch-submit:disabled{opacity:.53}.dispatch-foot .hint-button{display:flex;align-items:center;min-height:42px}
.dispatch-repair{padding:8px 0;display:flex;align-items:center;gap:15px;justify-content:center;flex-wrap:wrap}.worked-example{padding:8px 18px;border:1px solid #abac97;background:#f7e3ba;border-radius:4px}.worked-example small,.worked-example strong{display:block}.worked-example small{color:#715b48;font-size:12px}.worked-example strong{font-size:20px}.worked-example svg{height:53px;width:53px}.demo-swatch{width:45px;height:38px;border:2px solid #48585a;border-radius:4px}.demo-number{font:800 39px var(--mono);color:#264957}.demo-pips{width:65px;display:grid;grid-template-columns:repeat(5,1fr);gap:3px}.demo-pips i{background:#678677;border-radius:50%;height:9px;width:9px}
.ticket-seals,.trip-photos{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:14px}
.ticket-seals span{border:1px dashed #ad7453;background:#f6dfb5;border-radius:16px;gap:3px;padding:4px 10px;color:#815236;font-size:13px;font-weight:800}
.trip-photos figure{margin:0 0 3px;padding:5px;background:#fff9e9;border:1px solid #c3bdab;box-shadow:0 2px 4px #384a4422}.trip-photos img{width:124px;max-height:74px;object-fit:cover;display:block}.trip-photos figcaption{font-size:10px;color:#65716b;margin-top:3px}.record-mileage{font-size:13px;color:#53685f;padding:5px 7px}
@media(min-width:900px) and (max-height:850px){.dispatch{width:min(1020px,98%)}.dispatch-grid{display:grid;grid-template-columns:minmax(0,.87fr) minmax(0,1.13fr)}.director{display:flex;flex-direction:column;justify-content:center}.stage-host .station-stage{height:auto;aspect-ratio:600/161}.script-status{min-height:41px}.student-panel{align-self:center;padding:16px}.dispatch .choice{min-height:87px}.dispatch .draw-pad{width:min(20vh,167px);height:auto;aspect-ratio:1}}
@media(max-width:720px){.way-call{bottom:81px}.line-strip{top:65px}.dispatch-head{padding-inline:10px}.dispatch-foot{gap:5px}.depot-entry{padding:7px 10px;font-size:14px}.home-foot .foot-clock{font-size:9px}}
@media(max-width:590px) and (orientation:portrait){
 .hero{padding-bottom:25px}.hero-art{background-position:69% 46%}.hero-shade{background:linear-gradient(0deg,#102b3bed 0%,#15283a56 49%,transparent 76%)}
 .hero-station{top:54px;bottom:auto;right:12px;padding:5px 8px}.hero-top{gap:5px}.departure-actions{gap:6px}.depot-entry{min-height:45px}.depot-entry svg{width:17px}
 .line-strip{top:55px;left:8px;width:172px}.way-call{left:10px;right:auto;bottom:81px;width:min(325px,calc(100% - 20px));padding:9px 11px;gap:9px}.way-call p{margin:2px 0 5px}.way-call h2{font-size:19px}
 .mission-layer{padding:55px 5px 7px}.dispatch-head{gap:5px;min-height:38px}.dispatch .station-kicker{gap:3px}.dispatch .station-kicker span{font-size:10px;margin-left:2px}.dispatch .station-kicker b{font-size:13px}.dispatch-signal{gap:4px}.signal-cells{gap:3px}.signal-cells i{width:12px;height:12px}.dispatch-signal>span{font-size:10px}
 .stage-host .station-stage{height:auto;aspect-ratio:4.65}.script-status{font-size:12px;padding:4px 9px}.student-panel{padding:9px 8px 5px}.dispatch h2{font-size:20px}.dispatch .choice{min-height:68px}
 .dispatch-foot{flex-wrap:wrap;padding:5px 8px 8px}.dispatch-foot .feedback{width:100%;flex:auto;font-size:12px}.dispatch-foot .hint-button{margin-left:auto}.depot-stock{gap:4px}.depot-stock span{padding:0 4px;font-size:13px}#homeMileage{font-size:11px}
}
@media(max-height:560px) and (orientation:landscape){
 .depot-entry{min-height:36px;font-size:12px;padding:4px 9px}.depot-entry svg{width:17px}.home-foot #garageButton{display:none}#homeMileage{font-size:11px}.hero-top{gap:5px}
 .line-strip{top:44px;padding:3px 6px 4px}.way-call{bottom:63px;padding:6px 9px;gap:7px;width:276px}.way-call p{font-size:12px;margin:2px 0 4px}.way-call h2{font-size:16px}.way-call button{min-height:35px;font-size:14px}.way-call #wayIcon{width:29px;height:29px}.way-call #wayIcon svg{width:19px}
 .mission-layer{padding:40px 5px 4px}.dispatch-head{min-height:30px;padding:2px 8px;border-top-width:2px}.dispatch .speaker{height:25px;width:33px}.dispatch-grid{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr)}.director{display:flex;flex-direction:column;justify-content:center}.stage-host .station-stage{height:auto;aspect-ratio:4.5}.script-status{font-size:11px;padding:3px 7px}.student-panel{padding:6px 8px;align-self:center}.dispatch h2{font-size:17px;margin-bottom:4px}.dispatch .choice{min-height:54px}.dispatch .draw-pad{width:min(24vh,120px);height:auto;aspect-ratio:1}.dispatch-foot{padding:3px 8px;margin:0}.dispatch .dispatch-submit,.dispatch-foot .hint-button{min-height:34px}.dispatch-foot .feedback{font-size:12px}
 .depot-view canvas{height:142px}.depot-stock img{height:39px}.depot-stock{margin:5px 0}.depot-issue{padding-top:4px}
}

.service-paused .station-stage *{animation-play-state:paused!important}
