@import url('fonts.css');
:root{--ink:#173e49;--cream:#faf1db;--orange:#e77b50;--gold:#f2bd54;--muted:#a5bab5}body{font-family:'DM Sans',Arial,sans-serif}.game-layout{grid-template-columns:1fr minmax(340px,460px) 1fr;margin:24px auto;gap:4vw}.masthead{height:90px}.studio-logo{height:80px;width:130px}.side h1{font-size:44px}.side p{font-size:16px}.instructions{margin-top:28px;gap:20px 11px}.level-ticket{padding:24px}.level-ticket h3{font-size:26px}.level-ticket li{padding:9px 0}.level-ticket li strong{font-size:12px}.best-ticket{margin-top:22px}.machine{border:4px solid #334d50!important;border-radius:26px;background:#183e49!important;box-shadow:8px 9px 0 #080b0c!important}#game-container{height:min(850px,calc(100dvh - 155px));min-height:500px;background:#183e49}#stage{width:480px;height:850px;position:absolute;left:50%;top:50%;transform-origin:50% 50%;overflow:hidden;background:#faf1db;color:var(--ink);font-family:'DM Sans',Arial,sans-serif}#phaser,#ui,#modal-root{position:absolute;inset:0}#ui{pointer-events:none}#ui button,#ui a{pointer-events:auto}#phaser canvas{display:block}button{font:800 14px 'DM Sans',Arial,sans-serif;border:0;border-radius:12px;min-height:48px;padding:12px 18px;color:var(--cream);background:var(--ink);box-shadow:0 3px 0 #0b2933;transition:filter .15s,transform .15s;touch-action:manipulation}button:hover{filter:brightness(1.09)}button:active{transform:translateY(2px);box-shadow:none}button:focus-visible{outline:3px solid #e5774f;outline-offset:3px}button:disabled{opacity:.35}.primary{background:var(--orange);color:#fff9e9;box-shadow:0 4px 0 #b65232}.gold{background:var(--gold);color:var(--ink);box-shadow:0 3px 0 #c48f34}.light{background:#ebe5d3;color:var(--ink);box-shadow:0 3px 0 #c8c7b4}.danger{background:#b44941;box-shadow:0 3px 0 #84322c}.icon{padding:0;width:45px;min-height:44px;border-radius:12px;font-size:22px;display:grid;place-items:center}.eyebrow{font:800 12px 'DM Sans',Arial,sans-serif;letter-spacing:3px;text-transform:uppercase}.home-brand{position:absolute;top:70px;left:24px;right:24px;text-align:center}.home-brand .eyebrow{color:#697d78;font-size:11px}.home-brand h1{font:900 77px/.85 'Barlow Condensed','Arial Narrow',Arial,sans-serif;letter-spacing:-2px;margin:25px 0 17px;transform:rotate(-3deg)}.home-brand h1 span{display:block;color:#d76b42;font-size:113px;text-shadow:3px 4px 0 #edd8af}.home-brand p{font-size:15px;color:#697d78;margin:0}.home-brand .tag{display:inline-block;border:1px solid #a5b5a6;border-radius:30px;padding:8px 15px;margin-top:20px;font:700 11px 'DM Sans';letter-spacing:1px}.home-controls{position:absolute;bottom:48px;left:37px;right:37px;display:grid;grid-template-columns:1fr 1fr 49px;gap:12px}.home-controls .primary{grid-column:1/-1;font-size:19px;min-height:62px;letter-spacing:.2px}.home-foot{position:absolute;bottom:17px;width:100%;text-align:center;color:#aabbb3;font:700 10px 'DM Sans';letter-spacing:1.5px}.home-top{position:absolute;top:20px;right:22px;background:#fff8e8bd;padding:9px 14px;border-radius:20px;font-size:12px;font-weight:800}.hud{position:absolute;top:19px;left:21px;right:21px;display:flex;align-items:center;justify-content:space-between}.hud .title{text-align:center}.hud .eyebrow{font-size:10px;letter-spacing:2px;color:#74847b}.hud h2{font:800 30px 'Barlow Condensed',Arial,sans-serif;margin:2px 0 0;text-transform:uppercase}.progress-line{position:absolute;top:91px;left:24px;right:24px;display:flex;justify-content:space-between;font-size:11px;font-weight:800;color:#697c76}.progress-track{position:absolute;top:116px;left:24px;width:432px;height:4px;background:#dedfcb;border-radius:4px;overflow:hidden}.progress-track i{display:block;height:100%;background:#e5774f;transition:width .25s}.queue-caption{position:absolute;left:25px;top:135px;font-size:10px;letter-spacing:1.5px;font-weight:900;color:#718079}.next-label{position:absolute;left:28px;top:263px;display:flex;align-items:center;gap:8px;font-size:10px;font-weight:800;letter-spacing:.8px}.next-label b{font-size:12px;padding:4px 10px;border-radius:20px;background:#173e49;color:#fff5de}.bays-label{position:absolute;right:25px;top:266px;font:800 10px 'DM Sans';letter-spacing:1px;color:#687d78}.yard-title{position:absolute;top:385px;left:25px;color:#e5e4c8;font-size:10px;letter-spacing:2px;font-weight:800}.yard-title span{color:#91aca4;letter-spacing:.5px}.route-key{position:absolute;top:calc(710px + var(--extra,0px));left:24px;right:24px;display:flex;flex-wrap:wrap;gap:7px;justify-content:center}.route-key span{font:700 9px 'DM Sans';letter-spacing:.6px;background:#12303ad9;color:#fff1d7;padding:5px 8px;border-radius:5px;border-left:3px solid var(--c)}.game-actions{position:absolute;bottom:31px;left:24px;right:24px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.game-actions button{background:#ecdab1;color:#173e49;box-shadow:0 3px 0 #b9a580;font-size:12px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:51px}.game-actions button span{font-size:20px}.game-foot{position:absolute;bottom:9px;left:0;width:100%;text-align:center;font-size:9px;letter-spacing:1.5px;color:#8fa9a0}.bus-target{position:absolute;background:transparent!important;box-shadow:none!important;border:0;padding:0;border-radius:8px;min-height:0;color:transparent;outline-offset:1px!important}.bus-target:hover{background:#ffffff10!important}.bus-target:focus-visible{outline:3px solid #ffe3a1!important}.bus-target:disabled{opacity:1}.map-header{position:absolute;top:30px;left:25px;right:25px;display:flex;align-items:center;justify-content:space-between}.map-header h2{font:800 36px 'Barlow Condensed';margin:0}.map-intro{position:absolute;top:91px;left:25px;right:25px;color:#687f78;font-size:14px;line-height:1.5}.level-grid{position:absolute;top:163px;left:25px;right:25px;display:grid;grid-template-columns:1fr 1fr;gap:13px}.level-card{min-height:100px;background:#fff7e5;color:var(--ink);box-shadow:0 3px 0 #bcbfac;border:1px solid #d4d5bf;text-align:left;padding:12px 15px}.level-card .number{font:800 30px 'Barlow Condensed';display:block;color:#d56d45;line-height:1}.level-card strong{display:block;font-size:12px;margin-top:6px}.level-card small{font-size:9px;letter-spacing:.8px;color:#7a8b7e}.level-card.done{background:#dcebd8}.level-card.current{background:#f5bd64;border-color:#bd8e49}.level-card:disabled{background:#e6e6d5;opacity:.65}.map-note{position:absolute;bottom:46px;left:35px;right:35px;font-size:12px;color:#d9e4ca;text-align:center;line-height:1.6}#toast{position:absolute;z-index:20;left:30px;right:30px;bottom:99px;background:#fff5def0;color:#183e49;text-align:center;border-radius:12px;padding:13px 17px;font-size:13px;font-weight:700;box-shadow:0 5px 15px #0003;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translateY(0)}#modal-root{pointer-events:none;z-index:30}#modal-root:not(:empty){pointer-events:auto;background:#102d39b8;backdrop-filter:blur(5px);display:grid;place-items:center}.modal{background:#faf1db;color:#183e49;border-radius:24px;padding:28px;width:416px;max-height:790px;box-shadow:0 12px 0 #10283233;text-align:center;border:1px solid #fff6df}.modal .stamp{width:70px;height:70px;border-radius:50%;background:#e7b95d;margin:0 auto 16px;display:grid;place-items:center;font-size:38px;color:#173e49}.modal h2{font:900 38px/1 'Barlow Condensed';margin:0 0 12px}.modal p{font-size:14px;line-height:1.65;color:#647870;margin:12px 0 22px}.modal .buttons{display:grid;gap:11px}.modal button{width:100%;min-height:49px}.modal .close{float:right;width:38px;min-height:38px;padding:0;background:#e2dfca;color:#173e49;box-shadow:none;font-size:20px}.modal .stat{display:flex;justify-content:space-around;background:#e5e8d4;border-radius:12px;padding:17px 10px;margin:20px 0;font-size:11px;font-weight:600}.modal .stat strong{display:block;font-size:24px}.toggle-row{display:flex;align-items:center;justify-content:space-between;text-align:left;border-bottom:1px solid #d8ddc9;padding:17px 0;font-size:14px;font-weight:700}.toggle-row input{accent-color:#df754b;width:22px;height:22px}.modal .instructions{margin:23px 0;text-align:left;gap:20px 9px}.modal .instructions p{font-size:13px;margin:5px 0 0}.modal .instructions strong{font-size:14px}.modal .instructions>span{color:#d06a42;font-weight:800}.small-note{font-size:11px!important;margin-bottom:15px!important}.boot{position:absolute;inset:0;display:grid;place-items:center;background:#faf1db;font-size:18px;font-weight:800}
@media(min-width:701px) and (max-height:740px){.masthead{height:65px}.game-layout{margin:15px auto}.studio-logo{height:60px}.side h1{font-size:34px}.instructions{gap:15px 8px}#game-container{height:calc(100dvh - 110px);min-height:420px}.arcade>footer{display:none}}
@media(max-width:700px){.machine{border:0!important;border-radius:0!important;box-shadow:none!important}#game-container{height:100dvh;min-height:0}.game-layout{margin:0}.arcade{padding:0}.machine{height:100dvh!important}}
@media(min-width:701px){.game-layout{align-items:start}.machine{width:min(100%,calc((100dvh - 155px)*.564706 + 8px));justify-self:center}.level-ticket li{padding:6px 0}.level-ticket h3{font-size:23px}.level-ticket p{font-size:13px;line-height:1.4;margin-bottom:14px}.best-ticket{margin-top:14px}.best-ticket strong{font-size:28px}.side h1{font-size:38px}.instructions strong{font-size:15px}.instructions p{font-size:13px}.side>p{font-size:15px}.keyboard-hint{margin-top:22px}}
@media(min-width:701px) and (max-height:740px){.machine{width:min(100%,calc((100dvh - 110px)*.564706 + 8px))}.best-ticket{display:none}.level-ticket{padding:20px}.side h1{font-size:34px}.side>p{font-size:14px}}
.modal p{font-size:16px;line-height:1.5}.modal .instructions{gap:13px 9px;margin:17px 0}.modal .instructions p{font-size:16px;line-height:1.4}.modal .instructions strong{font-size:17px}.modal button{min-height:55px;font-size:16px}.modal .small-note{font-size:13px!important}.game-actions button{min-height:55px}.hud .icon{width:54px;min-height:52px}

.yard-title{color:#334b69}.yard-title span{color:#536984}.route-key span{background:#334b69}.bays-label{color:#526882}

/* A continuous depot scene: compact labels leave the vehicles centre stage. */
.yard-title{top:381px;left:40px;color:#f0f5f8;font-size:9px;letter-spacing:1.3px}.yard-title span{color:#d0dce7}.queue-caption{color:#4d6678}.route-key{gap:5px}.route-key span{background:#243e58;border-radius:12px;padding:5px 8px}.hud h2{font-size:32px}.game-actions button{border:2px solid #f7e6bb;border-radius:18px;background:linear-gradient(#fff0cc,#dec58c);box-shadow:0 4px 0 #a58a5c,0 6px 8px #10283b33}.bus-target:hover{background:transparent!important}
/* Gameplay is one continuous scene. Header and tools stay out of the puzzle. */
#ui[data-screen="game"] .hud{top:10px;left:18px;right:18px;z-index:5}
#ui[data-screen="game"] .hud .icon{width:44px;min-height:44px;border-radius:14px;background:linear-gradient(#fff,#e6edf4);color:#36546a;box-shadow:0 3px 0 #9bafbf,0 4px 8px #58738626;font-size:22px}
#ui[data-screen="game"] .hud .eyebrow{font-size:9px;color:#5a768b;letter-spacing:2px}
#ui[data-screen="game"] .hud h2{font-size:25px;line-height:1.1;color:#28475c;text-shadow:0 1px #ffffff}
#ui[data-screen="game"] .progress-line{top:61px;left:24px;right:24px;font-size:10px;color:#4d6c81;text-transform:none}
#ui[data-screen="game"] .progress-track{top:78px;height:3px;background:#aabfcc66}
#ui[data-screen="game"] .progress-track i{background:#5eaa7c}
#ui[data-screen="game"] .next-label{top:234px;left:37px;font-size:8px;gap:5px;color:#314c63}
#ui[data-screen="game"] .next-label b{font-size:9px;padding:3px 9px;border:1px solid #ffffff8f;text-shadow:0 1px 2px #0005}
#ui[data-screen="game"] .bays-label{top:239px;right:34px;font-size:9px;color:#405e76}
#ui[data-screen="game"] .game-actions{bottom:17px;left:77px;right:77px;gap:31px}
#ui[data-screen="game"] .game-actions button{height:65px;min-height:65px;padding:4px 0;display:flex;flex-direction:column;gap:0;border-radius:22px;background:linear-gradient(#ffffff,#e5edf4);border:2px solid #f9fcff;box-shadow:0 4px 0 #92a8bb,0 7px 10px #56698030;color:#2f5873}
#ui[data-screen="game"] .game-actions button:nth-child(2){background:linear-gradient(#ffdf79,#f2b749);border-color:#fff0aa;box-shadow:0 4px 0 #be8d35,0 7px 10px #56698030;color:#684c1c}
#ui[data-screen="game"] .game-actions button span{font-size:28px;line-height:31px}
#ui[data-screen="game"] .game-actions button small{font-size:8px;letter-spacing:.6px}
#ui[data-screen="game"] .bus-target{border-radius:18px}
#stage:has(#ui[data-screen="game"]){background:#d2dfe8}
/* Status is on a protected header strip, clear of both passengers and vehicles. */
#ui[data-screen="game"]::before{content:"";position:absolute;top:0;left:0;right:0;height:81px;background:linear-gradient(#eae5d9,#dedbcd);box-shadow:0 2px 4px #293c4620}
#ui[data-screen="game"] .hud{top:7px}
#ui[data-screen="game"] .hud h2{font-size:23px}
#ui[data-screen="game"] .next-label{top:47px;left:91px;z-index:6;font-size:8px;line-height:14px}
#ui[data-screen="game"] .next-label b{font-size:9px;padding:1px 7px}
#ui[data-screen="game"] .bays-label{top:50px;right:81px;z-index:6;font-size:8px}
#ui[data-screen="game"] .progress-line{top:66px;z-index:6;font-size:9px}
#ui[data-screen="game"] .progress-track{top:79px;z-index:6}

/* A brief conductor call replaces the permanent destination/bay labels. */
.conductor-recall{position:absolute;top:6px;left:73px;width:54px;height:58px;padding:0!important;background:none!important;box-shadow:none!important;z-index:7;overflow:hidden}
.conductor-recall img{width:100%;height:100%;object-fit:contain}
#ui[data-screen="game"] .hud .title{margin-left:48px}
#ui[data-screen="game"] .hud h2{font-size:23px}
.conductor-announcement{position:absolute;z-index:9;top:3px;left:72px;right:70px;height:62px;border-radius:12px;background:#fff7e8;display:flex;align-items:center;gap:8px;padding:0 10px;border-bottom:3px solid var(--destination,#147de0);opacity:0;transform:translateY(-12px);transition:opacity .25s,transform .25s;pointer-events:none}
.conductor-announcement.speaking{opacity:1;transform:translateY(0)}
.conductor-announcement img{height:64px;width:58px;object-fit:contain;align-self:flex-end}
.conductor-announcement small{display:block;font-size:8px;letter-spacing:1px;color:#61727b}
.conductor-announcement strong{display:block;font-size:16px;color:#183e49;line-height:1.2;margin-top:3px}
@media(prefers-reduced-motion:reduce){.conductor-announcement{transition:none}}

/* Independent cutout pieces: head, jacket, waving arm and clipboard arm. */
.conductor-rig{position:relative;display:block;width:64px;height:64px;flex:0 0 64px;isolation:isolate}
.conductor-rig i{position:absolute;display:block;background-size:200% 200%;background-repeat:no-repeat}
.conductor-head{width:49px;height:49px;left:10px;top:-3px;background-position:0 0;z-index:4;transform-origin:50% 85%}
.conductor-recall .conductor-rig{transform:scale(.84);transform-origin:top left}
.speaking .conductor-head{animation:conductor-nod 1.2s ease-in-out 3}
@keyframes conductor-nod{0%,100%{transform:rotate(0)}50%{transform:rotate(-6deg) translateY(1px)}}
@keyframes conductor-wave{0%,100%{transform:rotate(-9deg)}50%{transform:rotate(15deg)}}
@media(prefers-reduced-motion:reduce){.conductor-rig i{animation:none!important}}
.conductor-head{background-size:185.2% 181.8%;background-position:0 0}

/* All layers share the intact artwork's coordinates, keeping the joints registered. */
.conductor-rig i{width:64px;height:64px;left:0;top:0;background-size:100% 100%;background-position:0 0}
.conductor-head{clip-path:polygon(0 0,100% 0,100% 61%,74% 65%,28% 65%,0 59%);transform-origin:50% 62%;z-index:4}
@keyframes conductor-wave{0%,100%{transform:rotate(0)}50%{transform:rotate(8deg)}}
@keyframes conductor-nod{0%,100%{transform:rotate(0)}50%{transform:rotate(-2deg)}}

/* Compact top controls; the conductor owns the lower announcement area. */
#ui[data-screen="game"] .hud{top:8px}
#ui[data-screen="game"] .hud .title{margin:0;align-self:flex-start}
#ui[data-screen="game"] .hud .eyebrow{font-size:8px;letter-spacing:1.5px}
#ui[data-screen="game"] .hud h2{font-size:19px;margin:0}
#ui[data-screen="game"] .game-actions{top:36px;bottom:auto;left:84px;right:84px;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
#ui[data-screen="game"] .game-actions button{height:28px;min-height:28px;padding:3px 6px;border-radius:8px;flex-direction:row;gap:4px}
#ui[data-screen="game"] .game-actions button span{font-size:17px;line-height:1}
#ui[data-screen="game"] .game-actions button small{font-size:7px;letter-spacing:0}
#ui[data-screen="game"] .conductor-recall{top:auto;bottom:0;left:8px;width:116px;height:116px;overflow:visible}
#ui[data-screen="game"] .conductor-recall .conductor-rig{transform:scale(1.8);transform-origin:top left}
#ui[data-screen="game"] .conductor-announcement{top:auto;bottom:14px;left:126px;right:16px;height:64px;padding:8px 14px}
#ui[data-screen="game"] .conductor-announcement>.conductor-rig{display:none}
#ui[data-screen="game"] .conductor-announcement strong{font-size:19px}
#ui[data-screen="game"] .conductor-announcement small{font-size:9px}
#ui[data-screen="game"]:has(.conductor-announcement.speaking) .conductor-recall .conductor-head{animation:conductor-nod 1.2s ease-in-out 3}
#ui[data-screen="game"]:has(.conductor-announcement.speaking) .conductor-recall .conductor-wave{animation:conductor-wave .65s ease-in-out 5}
#ui[data-screen="game"]:has(.conductor-announcement.speaking) .conductor-recall .conductor-clipboard{animation:conductor-clipboard 1.8s ease-in-out 2}
#ui[data-screen="game"] .conductor-recall .conductor-rig{position:absolute;left:0;top:0}

/* Character idle motion is independent of button hover and announcements. */
#ui[data-screen="game"] .conductor-recall:hover,#ui[data-screen="game"] .conductor-recall:active{filter:none;transform:none;box-shadow:none}
#ui[data-screen="game"] .conductor-recall .conductor-rig{animation:conductor-breathe 3.6s ease-in-out infinite}
.conductor-head::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 4.5% 3.5% at 39% 44%,var(--conductor-skin,#edb98d) 92%,transparent 100%),radial-gradient(ellipse 4.5% 3.5% at 61% 44%,var(--conductor-skin,#edb98d) 92%,transparent 100%);opacity:0;animation:conductor-blink 5.7s linear infinite}
@keyframes conductor-breathe{0%,100%{translate:0 0;scale:1 1}50%{translate:0 -1px;scale:1.012 1.018}}
@keyframes conductor-blink{0%,39%,43%,73%,77%,100%{opacity:0}40%,42%,74%,76%{opacity:1}}
@keyframes conductor-wave{0%,100%{transform:rotate(-32deg)}25%,65%{transform:rotate(0)}45%,80%{transform:rotate(8deg)}}
#ui[data-screen="game"]:has(.conductor-announcement.speaking) .conductor-recall .conductor-wave{animation:conductor-wave 2.2s ease-in-out 1}
@media(prefers-reduced-motion:reduce){#ui[data-screen="game"] .conductor-recall .conductor-rig,.conductor-head::after{animation:none!important}}

/* Resting artwork has exactly two arms; never overlay copies of its limbs. */
.conductor-rig .conductor-body,.conductor-rig .conductor-wave,.conductor-rig .conductor-clipboard{display:none!important}
.conductor-rig .conductor-head{display:block;clip-path:none;transform:none!important;animation:none!important}

/* Increase the conductor by 20%, preserving her bottom-left anchor. */
#ui[data-screen="game"] .conductor-recall{width:139px;height:139px}
#ui[data-screen="game"] .conductor-recall .conductor-rig{transform:scale(2.16)}
#ui[data-screen="game"] .conductor-announcement{left:150px}

/* Speech bubble points back towards the conductor. */
#ui[data-screen="game"] .conductor-announcement{border:0;border-radius:18px;background:#fff7e8;box-shadow:0 3px 0 #233c4933}
#ui[data-screen="game"] .conductor-announcement::before{content:"";position:absolute;left:-16px;top:18px;width:19px;height:19px;background:#fff7e8;clip-path:polygon(0 0,100% 22%,100% 100%)}
/* Full-body conductor, retaining the same width and bottom-left anchor. */
#ui[data-screen="game"] .conductor-recall{height:207px}
#ui[data-screen="game"] .conductor-recall .conductor-rig{height:96px}
.conductor-rig .conductor-head{height:96px;background-image:url('assets/conductor-skirt.webp')}
.conductor-head::after{background:radial-gradient(ellipse 3.6% 2.3% at 37.7% 32%,var(--conductor-skin,#edb98d) 92%,transparent 100%),radial-gradient(ellipse 3.6% 2.3% at 60.8% 32.9%,var(--conductor-skin,#edb98d) 92%,transparent 100%)}
#ui[data-screen="game"] .conductor-recall{left:-14px}
/* Anchor speech beside her face rather than down by her feet. */
#ui[data-screen="game"] .conductor-announcement{left:118px;right:16px;bottom:105px;min-height:64px;height:auto;background:#fff7e8;border-radius:20px;box-shadow:0 3px 7px #162f4933;transform:translateY(5px)}
#ui[data-screen="game"] .conductor-announcement.speaking{opacity:1;transform:translateY(0)}
#ui[data-screen="game"] .conductor-announcement::before{left:-24px;top:20px;width:27px;height:23px;background:#fff7e8;clip-path:polygon(0 0,100% 12%,100% 100%)}
/* Mouth is at x54, 131px above the bottom in the full-body portrait. */
#ui[data-screen="game"] .conductor-announcement{bottom:103px}
#ui[data-screen="game"] .conductor-announcement::before{left:-59px;top:auto;bottom:20px;width:62px;height:20px;clip-path:polygon(0 60%,100% 0,100% 100%)}
/* Leave breathing room between the speech tail and her face. */
#ui[data-screen="game"] .conductor-announcement::before{left:-24px;width:27px;height:15px;bottom:23px;clip-path:polygon(0 60%,100% 0,100% 100%)}
/* Bottom actions leave the conductor and her speech unobstructed. */
#ui[data-screen="game"] .game-actions{top:auto;bottom:18px;left:118px;right:16px;gap:8px}
#ui[data-screen="game"] .game-actions button{height:56px;min-height:56px;padding:7px 5px;border-radius:13px;flex-direction:column;gap:4px}
#ui[data-screen="game"] .game-actions button span{font-size:23px}
#ui[data-screen="game"] .game-actions button small{font-size:9px}
#ui[data-screen="game"] .hud{top:14px}
#ui[data-screen="game"] .hud h2{font-size:26px;margin-top:2px}
#ui[data-screen="game"] .hud .eyebrow{font-size:9px}
/* Size speech to its message while keeping long destinations within the screen. */
#ui[data-screen="game"] .conductor-announcement{right:auto;width:max-content;max-width:calc(100% - 134px);min-height:0;box-sizing:border-box;padding:12px 14px}

/* Station signage replaces the separate level header. */
#ui[data-screen="game"]::before{display:none}
#ui[data-screen="game"] .hud{top:12px;left:auto;right:16px;z-index:10}
#ui[data-screen="game"] .progress-track{left:0;width:100%;top:80px;height:2px}

/* Non-mutating route inspection, enabled only by ?routes=1. */
#route-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:45;pointer-events:none;overflow:hidden}
.route-review-mode .hud,.route-review-mode .game-actions,.route-review-mode .conductor-recall{pointer-events:none}
.route-review-mode .left-side h1{font-size:30px}.route-review-mode .left-side p{font-size:13px}
#route-list{display:grid;gap:6px;margin:16px 0;max-height:370px;overflow:auto}
#route-list button{padding:9px 10px;text-align:left;background:#253239;color:white;border:1px solid #58656a;border-radius:5px;font-size:12px;cursor:pointer}
#route-list button[aria-pressed=true]{background:#43545d}
#route-stand{padding:6px;margin-left:8px;background:#253239;color:white;border:1px solid #748589}
.route-review-mode .left-side a{color:#ffe09a}
@media(max-width:900px){.route-review-mode .left-side{display:block!important;max-width:480px;margin:0 auto;padding:15px}.route-review-mode .game-layout{display:flex;flex-direction:column}.route-review-mode #route-list{max-height:150px}}

/* Station portraits share one size, anchor and idle animation. */
.conductor-rig .conductor-head{background-image:var(--conductor-image,url("assets/conductor-skirt.webp"))}

/* A selected coach waits visibly for the shared approach road. */
.bus-target.queued{outline:2px solid #fff2ae;outline-offset:3px;border-radius:9px;background:#ffdc4518}
.queued-badge{position:absolute;left:50%;top:-14px;transform:translateX(-50%);padding:3px 5px;border-radius:4px;background:#ffdc70;color:#263a45;font-size:8px;font-weight:800;letter-spacing:.5px;pointer-events:none}

/* Ground contact stays still while the conductor breathes above it. */
#ui[data-screen="game"] .conductor-recall::before{content:"";position:absolute;left:40px;bottom:3px;width:62px;height:14px;border-radius:50%;background:radial-gradient(ellipse,rgba(9,22,29,.48) 0%,rgba(9,22,29,.25) 42%,rgba(9,22,29,0) 74%);pointer-events:none;z-index:0}
#ui[data-screen="game"] .conductor-recall .conductor-rig{z-index:1}


#ui[data-screen="game"] .conductor-announcement.instruction strong{font-size:15px;line-height:1.35;white-space:normal}
#ui[data-screen="game"] .conductor-announcement.instruction{max-width:calc(100% - 134px);width:310px}

/* Station-specific conductor emerges above the completion card. */
.modal.departure-celebration{position:relative;overflow:visible;padding-top:86px;margin-top:65px}
.completion-conductor{position:absolute;top:-116px;left:50%;width:180px;height:180px;transform:translateX(-50%);pointer-events:none}
.completion-circle{position:absolute;left:10px;top:20px;width:160px;height:160px;border-radius:50%;background:#e7b95d;box-shadow:0 4px 0 #ae883c33}
.completion-cutout{position:absolute;inset:0;overflow:hidden;border-radius:0 0 90px 90px}
.completion-cutout canvas{display:block;width:180px!important;height:190px!important}

/* Gold backdrop starts at the completion card's top edge. */
.completion-circle{clip-path:inset(96px 0 0 0)}


.departure-celebration .buttons button{position:relative;padding-left:57px;padding-right:57px}
.button-bus{position:absolute;width:45px;height:28px;top:50%;pointer-events:none}
.bus-right{right:10px;transform:translateY(-50%)}
.bus-left{left:10px;transform:translateY(-50%) scaleX(-1)}

#ui[data-screen="home"] .home-settings{position:absolute;right:18px;top:18px;width:52px;height:52px;min-height:52px;background:#f6fbff;color:#294b5a}
#ui[data-screen="home"] .home-top{left:20px;right:auto;top:25px}
#ui[data-screen="home"] .home-controls{grid-template-columns:1fr;bottom:48px}
#ui[data-screen="home"] .home-controls button:not(.primary){min-height:44px;background:#e3ddc9;color:#173e49}
#ui[data-screen="home"] .home-foot{color:#fff}

/* Start scene: reserve room for a full-height illustrated queue. */
#ui[data-screen="home"] .home-brand{top:30px}
#ui[data-screen="home"] .home-brand .tag{margin-top:14px}
#ui[data-screen="home"] .home-controls{bottom:43px;gap:9px}

#ui[data-screen="home"] .home-brand p{color:#fff;text-shadow:none}

#ui[data-screen='home'] .home-brand .tag{background:#e9f7f2e8;color:#244b57;border-color:#a7c8cb}




#ui[data-screen='home'] .home-brand .tag{position:relative;top:-14px}


#fps-counter{position:absolute;right:8px;bottom:6px;z-index:10000;pointer-events:none;padding:3px 6px;border-radius:4px;background:rgba(15,32,39,.8);color:#fff;font:600 12px/1.2 monospace;font-variant-numeric:tabular-nums;min-width:6ch;text-align:right;}

/* The masthead uses the same condensed title lettering as the home screen. */
.wordmark .title-wordmark{display:block;margin:0;width:185px;text-align:center;font:900 28px/.85 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:-.6px;font-style:normal;color:#faf1db;transform:rotate(-3deg)}
.title-wordmark strong{display:block;font-size:42px;color:#d76b42;text-shadow:1px 1.5px 0 #edd8af}

.wordmark{gap:0}.wordmark .title-wordmark{width:124px}.wordmark .title-suitcase{display:block;width:34px;height:62px;margin-left:-4px;object-fit:contain;transform:rotate(4deg)}
