:root{--green:#124953;--deep:#123641;--cream:#f1e6cc;--paper:#f5ecd8;--ink:#244752;--brass:#c1a071;--line:#c5b998;--sans:'YouYuan','幼圆',sans-serif;--hand:'YouYuan','幼圆',sans-serif}
*{box-sizing:border-box}html{color-scheme:light;scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--paper);font:16px/1.65 var(--sans)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.4}a{color:inherit}button:focus-visible,a:focus-visible,.viewport:focus-visible{outline:3px solid #cf9d35;outline-offset:5px}button{color:inherit}button,dialog{border:0}img{display:block;max-width:100%}[hidden]{display:none!important}.skip-link{position:fixed;top:-80px;left:20px;z-index:100;padding:10px;background:var(--cream)}.skip-link:focus{top:10px}.site-header{max-width:1500px;margin:auto;padding:22px 5%;display:flex;justify-content:space-between;align-items:center;gap:16px}.identity{display:grid;text-align:left;padding:0;background:none;letter-spacing:.07em}.identity span{font-size:18px;font-weight:700}.identity small{font-size:12px;letter-spacing:.1em;font-weight:400}.header-controls{display:flex;gap:8px}.quiet-button{background:transparent;border:1px solid var(--line);padding:7px 15px;border-radius:3px;font-size:14px;transition:background .2s,transform .2s}.quiet-button:hover{background:var(--cream);transform:translateY(-2px)}main{max-width:1500px;margin:auto}.home-view{padding:5px 5% 0;position:relative}.home-heading{position:absolute;z-index:3;top:4%;left:8%;pointer-events:none;max-width:420px}.eyebrow{font-size:12px;letter-spacing:.15em;margin:0 0 8px;text-transform:uppercase}.home-heading h1{font:normal clamp(32px,4vw,62px)/1.35 var(--hand);letter-spacing:.03em;margin:0 0 12px}.home-heading>p:last-child{font-size:15px;margin:0;color:#4a6255}.home-stage{position:relative;aspect-ratio:16/9;overflow:hidden;background:#e9efe5;border:1px solid var(--line)}.train-motion{position:absolute;inset:0}.train-motion>img{width:100%;height:100%;object-fit:cover}.entry-hotspot{position:absolute;left:52.4%;top:20%;width:11.6%;height:58%;border-radius:6px;background:transparent;color:var(--cream);border:1px solid transparent}.entry-hotspot>span{position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);white-space:nowrap;padding:8px 14px;background:var(--deep);border:1px solid #d5c398;box-shadow:0 3px 12px #10291d35;font-size:14px;border-radius:3px;transition:transform .2s,background .2s}.entry-hotspot:hover,.entry-hotspot:focus-visible{background:#eee6d212;border-color:#e4d3a588}.entry-hotspot:hover>span{transform:translate(-50%,-50%) scale(1.06)}.home-foot{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:20px 0;font-size:14px}.ticket-button{color:var(--cream);background:var(--green);padding:12px 24px;border:1px solid var(--green);border-radius:3px;transition:transform .2s,box-shadow .2s}.ticket-button:hover{transform:translateY(-3px);box-shadow:0 3px 0 var(--brass)}.moving-landscape,.moving-track{display:none;position:absolute;inset:0;background-repeat:repeat-x;background-size:auto 100%;animation:landscape-run 60s linear infinite}.home-stage.layered{background:#dce8dd}.layered .moving-landscape{display:block;background-image:url('assets/derived/distant-landscape.png')}.layered .moving-track{display:block;background-image:url('assets/derived/track-foreground.png');animation-duration:7s}.layered .train-motion{inset:auto 0 0;aspect-ratio:1024/572;animation:train-rattle 2.4s ease-in-out infinite,train-lift 15s ease-in-out infinite}.layered .train-motion>img{object-fit:contain}.layered:has(.entry-hotspot:hover) .train-motion,.layered:has(.entry-hotspot:focus-visible) .train-motion{animation-play-state:paused}.layered.entering .train-motion{animation-play-state:paused}.entering{opacity:.2;transition:opacity .45s}.home-stage.layered .entry-hotspot{left:52.4%;top:20%;height:58%}.explorer{padding:0 5%}.explorer-heading{display:flex;align-items:end;justify-content:space-between;gap:26px;margin:10px 0 18px}.explorer-heading h1{font:normal 32px/1.3 var(--hand);margin:0}.explorer-heading>p{font-size:14px;margin:0;max-width:470px;color:#627063}.viewport{aspect-ratio:16/9;position:relative;overflow:hidden;background:var(--green);border:1px solid #a69c80;touch-action:pan-y;isolation:isolate}.scene{position:absolute;top:0;left:0;height:100%;will-change:transform;transition:transform .55s cubic-bezier(.2,.7,.2,1);--scene-scale:1}.scene.dragging{transition:none}.scene>img{width:100%;height:100%;max-width:none;user-select:none}.scene-overlays{position:absolute;inset:0}.hotspot{position:absolute;background:transparent;padding:0;z-index:4;border:1px solid transparent;border-radius:5px;color:var(--cream);font-size:14px}.hotspot:hover,.hotspot:focus-visible{background:#f4e9c31a;border-color:#f3dfaa99}.hotspot-label{position:absolute;bottom:0;left:50%;transform:translate(-50%,60%);white-space:nowrap;background:var(--deep);border:1px solid #ad9b72;padding:5px 11px;border-radius:3px;box-shadow:0 3px 10px #0002;font-size:14px}.door-hotspot .hotspot-label{bottom:23%;max-width:90%;white-space:normal;line-height:1.4;text-align:center;font-size:calc(11px * var(--scene-scale))}.route-paper{color:var(--ink);font:calc(15px * var(--scene-scale))/1.6 var(--hand);transform:rotate(.6deg);text-align:left;padding:calc(12px * var(--scene-scale));display:flex;flex-direction:column;justify-content:center}.route-paper strong{font-size:calc(19px * var(--scene-scale));font-weight:400;letter-spacing:.15em}.route-paper span{font-size:calc(11px * var(--scene-scale));display:block;white-space:nowrap}.route-paper .paper-invitation{margin-top:calc(7px * var(--scene-scale));font-size:calc(10px * var(--scene-scale));opacity:.68}.object-hotspot{z-index:5}.object-hotspot:hover{outline:2px solid #f4dea267;outline-offset:0}.object-tooltip{position:absolute;z-index:12;bottom:22px;left:50%;transform:translateX(-50%);max-width:min(430px,calc(100% - 32px));width:max-content;background:var(--paper);color:var(--ink);border:1px solid #a79a78;border-radius:3px;padding:12px 17px;font-size:14px;box-shadow:0 6px 18px #0b291c35;pointer-events:none}.view-edge{position:absolute;inset:0 auto 0 0;width:20px;background:linear-gradient(90deg,#0e281c24,transparent);pointer-events:none;z-index:10}.edge-right{left:auto;right:0;transform:scaleX(-1)}.explore-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:15px 0 20px}.pan-button{background:var(--cream);border:1px solid #c5b797;border-radius:3px;padding:10px 20px;min-width:100px;font-size:14px;transition:transform .2s}.pan-button:hover:enabled{transform:translateY(-2px)}.pan-description{text-align:center;font-size:13px;line-height:1.5}.pan-description small{font-size:12px;display:block;color:#657266}.pan-track{width:150px;height:3px;background:#d5ccb6;margin:7px auto;position:relative}.pan-track i{display:block;position:absolute;width:18px;height:5px;top:-1px;background:var(--green);transition:left .3s}.carriage-nav{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.carriage-nav button{background:transparent;border:1px solid transparent;border-radius:3px;padding:7px 14px;font-size:14px}.carriage-nav button[aria-current]{background:var(--green);color:var(--cream)}.carriage-nav button:hover{border-color:var(--line)}.site-footer{max-width:1500px;margin:25px auto 0;padding:15px 5% 24px;display:flex;justify-content:space-between;gap:15px;color:#6c7467;font-size:12px}.media-window{position:absolute;padding:0;overflow:hidden;z-index:3;isolation:isolate;border-radius:calc(10px * var(--scene-scale));background:#112c24;border:0;color:#fff}.media-window>img{width:100%;height:100%;object-fit:cover;opacity:.84;transition:opacity .2s,transform .35s}.media-window:hover>img{opacity:1;transform:scale(1.025)}.window-caption{position:absolute;inset:auto 0 0;padding:calc(8px * var(--scene-scale)) calc(11px * var(--scene-scale));text-align:left;background:linear-gradient(transparent,#10231fe6);display:flex;align-items:end;justify-content:space-between;gap:8px}.window-caption strong{font:normal calc(18px * var(--scene-scale))/1.3 var(--hand)}.window-caption small{font-size:calc(10px * var(--scene-scale));white-space:nowrap}.play-mark{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:calc(33px * var(--scene-scale));height:calc(33px * var(--scene-scale));background:#f6efdded;color:var(--green);border-radius:50%;display:grid;place-items:center;font-size:calc(14px * var(--scene-scale));padding-left:2px;box-shadow:0 3px 14px #0002}.wall-note{position:absolute;color:#263e30;font:calc(12px * var(--scene-scale))/1.5 var(--hand);margin:0;white-space:pre-line;z-index:2;transform:rotate(-.5deg)}.concept-note{font-size:calc(14px * var(--scene-scale));line-height:1.65}.concept-note strong{font-size:calc(18px * var(--scene-scale));font-weight:400;display:block;margin-bottom:calc(5px * var(--scene-scale))}.machine-hotspot{display:flex;justify-content:center;align-items:center}.machine-screen-title{width:72%;margin-top:-13%;color:#254039;text-align:center;font:calc(11px * var(--scene-scale))/1.3 var(--hand);pointer-events:none}.collection-board{font:calc(17px * var(--scene-scale))/1.5 var(--hand);color:#486047;display:flex;align-items:center;justify-content:center;letter-spacing:.2em}.collection-icon{position:absolute;display:grid;place-items:center;background:none;width:7%;height:18%;z-index:4}.collection-icon img{height:100%;object-fit:contain}dialog{width:min(850px,calc(100% - 32px));max-height:calc(100svh - 44px);padding:0;background:var(--paper);color:var(--ink);border:1px solid #b5a886;border-radius:5px;box-shadow:0 20px 70px #0b25194d}dialog::backdrop{background:#132a2299;backdrop-filter:blur(3px)}.modal-shell{padding:30px;position:relative}.close-button{position:absolute;right:13px;top:10px;padding:5px 9px;background:transparent;font-size:13px;z-index:4}.close-button span{font-size:24px;line-height:1;vertical-align:middle;margin-left:5px}.modal-body h2,#modal-body h2{font:normal 30px/1.5 var(--hand);margin:0 45px 16px 0}.modal-body p,#modal-body p{font-size:16px}.route-modal{background:#e9ddb5;padding:26px;font-family:var(--hand)}.route-modal>p{color:#69715a}.route-list{list-style:none;margin:22px 0 0;padding:0;border-top:1px dashed #a3956f}.route-list button{display:flex;gap:15px;width:100%;align-items:center;text-align:left;padding:16px 4px;background:transparent;border-bottom:1px dashed #a3956f}.route-list button:hover{background:#fff3}.route-number{width:30px;height:30px;border:1px solid #718268;border-radius:50%;display:grid;place-items:center;font:16px var(--sans);flex:none}.route-list strong{font-size:22px;font-weight:400;display:block}.route-list small{font:14px var(--sans);color:#65705a}.dialogue-view{display:grid;grid-template-columns:32% 1fr;gap:25px;align-items:end;min-height:300px}.dialogue-portrait{max-height:440px;object-fit:contain;align-self:end}.dialogue-text{padding:30px 0 5px}.dialogue-text>p{min-height:105px}.dialogue-actions{display:flex;flex-wrap:wrap;gap:10px}.dialogue-actions button{padding:9px 14px;background:var(--green);color:var(--cream);border-radius:3px;font-size:14px}.dialogue-actions button.secondary{background:var(--cream);color:var(--ink);border:1px solid var(--line)}.portrait-placeholder{display:none}.dialogue-view:has(.portrait-placeholder){grid-template-columns:1fr;min-height:240px}.video-player{width:100%;max-height:54svh;background:#111;display:block;border-radius:3px}.media-meta{font-size:13px!important;color:#657165;margin:5px 0 18px}.project-description{margin-top:18px}.game-launch{padding-top:10px}.game-launch a{display:inline-block;margin-top:15px;background:var(--green);color:var(--cream);padding:12px 20px;text-decoration:none;border-radius:3px}.history-screen{padding:28px;color:var(--cream);background:#26453c;border:7px solid #bdad8b;min-height:270px;border-radius:8px}.history-screen h2{color:var(--cream)}.history-screen p{color:#e3dec9}.empty-collection{padding:20px 0}.postcard{aspect-ratio:1;width:min(100%,580px);margin:auto;background:#eee2bf;padding:34px;position:relative;border:1px solid #c5b58e;font-family:var(--hand)}.postcard h2{padding-right:90px;letter-spacing:.1em}.postcard img{position:absolute;top:24px;right:24px;width:80px;height:80px;object-fit:contain}.postcard p{margin-top:55px;white-space:pre-line}.loading-screen{position:fixed;inset:0;z-index:80;background:var(--green);color:var(--cream);display:grid;place-content:center;text-align:center;transition:opacity .35s}.loading-screen.ready{opacity:0;pointer-events:none}.loading-train{width:110px;height:60px;object-fit:cover;margin:auto;animation:train-rattle .5s ease-in-out infinite}.loading-screen p{font-size:14px;margin-top:20px}.loading-train.transparent{object-fit:contain}
@keyframes train-rattle{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-1px) rotate(-.05deg)}65%{transform:translateY(1.4px) rotate(.05deg)}}@keyframes train-lift{0%,85%,100%{translate:0 0}90%{translate:0 -3px}94%{translate:0 0}}@keyframes landscape-run{from{background-position-x:0}to{background-position-x:var(--tile-width,1600px)}}
@media(min-width:1600px){.home-heading{top:8%}.site-header{padding-top:32px}}
@media(max-width:700px){.site-header{padding:16px 5%}.identity span{font-size:15px}.identity small{font-size:11px}.quiet-button{padding:7px 10px;font-size:13px}.header-controls{gap:5px}.home-heading{position:relative;top:auto;left:auto;margin:12px 0 22px;max-width:none}.home-heading h1{font-size:40px}.home-heading h1 br{display:none}.home-heading>p:last-child br{display:none}.home-heading>p:last-child{font-size:14px}.home-stage{aspect-ratio:1.12}.train-motion{inset:auto -40% 0;aspect-ratio:1024/572}.layered .train-motion{inset:auto -40% 0}.home-stage.layered .entry-hotspot,.entry-hotspot{left:52.4%;top:20%;height:58%}.entry-hotspot>span{font-size:14px;top:42%}.home-foot{flex-direction:column;align-items:start;gap:13px;font-size:12px}.ticket-button{width:100%;padding:11px}.explorer-heading{display:block;margin:12px 0}.explorer-heading h1{font-size:30px}.explorer-heading>p{margin-top:8px;font-size:13px}.viewport{aspect-ratio:auto;height:clamp(340px,51svh,490px)}.explore-controls{gap:7px;margin:14px 0}.pan-button{min-width:72px;padding:10px 9px;font-size:13px}.pan-description{font-size:12px}.pan-description small{max-width:165px;font-size:11px}.pan-track{width:115px}.carriage-nav{gap:0;justify-content:space-between}.carriage-nav button{font-size:12px;padding:8px 6px}.site-footer{display:block;margin-top:18px;font-size:11px}.site-footer span{display:block}.modal-shell{padding:28px 18px 20px}#modal-body h2{font-size:26px}.route-modal{padding:12px}.route-list small{font-size:12px}.route-list strong{font-size:20px}.dialogue-view{grid-template-columns:28% 1fr;gap:12px;min-height:300px}.dialogue-text{padding-top:20px}.dialogue-text>p{font-size:15px!important;min-height:140px}.dialogue-actions button{font-size:13px;padding:8px 10px}.history-screen{padding:18px}.postcard{padding:22px}.postcard img{width:58px;height:58px}.postcard p{margin-top:40px;font-size:15px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}.moving-landscape,.moving-track{background-position-x:0!important}}

/* Alternate mirrored tiles meet at identical image edges, so every cycle is continuous. */
.layered .moving-landscape,.layered .moving-track{background:none;animation:none;overflow:hidden}
.tile-strip{display:flex;position:absolute;top:0;left:0;height:100%;width:max-content;will-change:transform;animation:tile-run 90s linear infinite}
.tile-strip>img{height:100%;width:var(--tile-width);max-width:none;flex:none;object-fit:fill}
.tile-strip>img:nth-child(even){transform:scaleX(-1)}
.moving-track .tile-strip{animation-duration:12s}
.layered .train-motion{inset:auto 2% 1% 5%;aspect-ratio:1672/941}
.home-stage.layered .entry-hotspot{left:51%;top:30%;width:8%;height:41.5%}
.home-stage.layered .entry-hotspot>span{top:68%}
.carriage-nav button{min-height:44px}
@keyframes tile-run{from{transform:translateX(calc(var(--tile-width) * -2))}to{transform:translateX(0)}}
@media(max-width:700px){.layered .train-motion{inset:auto -35% 2% -25%}.home-stage.layered .entry-hotspot>span{top:60%}}
@media(prefers-reduced-motion:reduce){.tile-strip{transform:translateX(calc(var(--tile-width) * -2));will-change:auto}}

/* Revision 01: the browser view itself is the scene, with edge controls. */
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none;background:var(--green)}
main{position:fixed;inset:0;max-width:none;width:100%;height:100%;margin:0}
.home-view,.explorer{position:absolute;inset:0;width:100%;height:100%;padding:0;overflow:hidden}
.home-stage,.viewport{position:absolute;inset:0;width:100%;height:100%;height:100dvh;aspect-ratio:auto;border:0;border-radius:0}
.viewport{touch-action:none;outline-offset:-4px}
.scene{max-width:none}
.site-header{position:fixed;z-index:40;top:max(12px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));left:auto;width:auto;max-width:none;padding:0;margin:0;gap:6px;pointer-events:none}
.site-header button{pointer-events:auto;min-height:38px;padding:6px 11px;border:1px solid #cec29b;background:#173d33ed;color:var(--cream);border-radius:3px;font-size:13px;line-height:1.6;letter-spacing:0;box-shadow:0 2px 5px #14281d26}
.site-header button:hover{background:#244d40;transform:none}
.header-controls{gap:6px}
.identity{display:block}
.site-footer,.home-foot,.carriage-nav{display:none}
.explorer-heading,.pan-description{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important;border:0!important}
.home-heading{position:absolute;top:76px;left:6%;margin:0;z-index:3}
.explore-controls{position:absolute;inset:0;z-index:25;display:block;margin:0;pointer-events:none}
.pan-button{position:absolute;top:50%;transform:translateY(-50%);width:62px;height:94px;min-width:0;padding:15px;display:grid;place-items:center;background:transparent;border:0;border-radius:0;pointer-events:auto;touch-action:manipulation;opacity:.9}
.pan-button svg{display:block;width:32px;height:52px;overflow:visible;fill:var(--cream);stroke:#244438;stroke-width:2.5;stroke-linejoin:round;filter:drop-shadow(0 2px 2px #12281e70);transition:transform .18s,filter .18s}
#pan-left{left:max(6px,env(safe-area-inset-left))}
#pan-right{right:max(6px,env(safe-area-inset-right))}
.pan-button:hover:enabled{transform:translateY(-50%);opacity:1}
.pan-button:hover:enabled svg,.pan-button:focus-visible svg{transform:scale(1.12);filter:drop-shadow(0 2px 4px #12281e90)}
.pan-button:disabled{visibility:hidden;pointer-events:none}
@media(max-width:700px){
  .site-header{top:max(9px,env(safe-area-inset-top));right:max(9px,env(safe-area-inset-right));gap:4px}
  .header-controls{gap:4px}
  .site-header button{font-size:12px;min-height:36px;padding:6px 9px}
  .home-heading{top:68px;left:6%}
  .pan-button{width:48px;height:84px;padding:11px}
  .pan-button svg{width:26px;height:44px}
  #pan-left{left:max(2px,env(safe-area-inset-left))}
  #pan-right{right:max(2px,env(safe-area-inset-right))}
}

/* Revision 02: actual contours govern both pointer hit-testing and outlines. */
.contour-layer{position:absolute;inset:0;width:100%;height:100%;max-width:none;overflow:visible;z-index:8;pointer-events:none}
.contour-outline{fill:transparent;stroke:#f3dfac;stroke-width:3.2px;stroke-linejoin:round;stroke-linecap:round;pointer-events:none;opacity:0;transition:opacity .12s,fill .12s}
.contour-outline.is-active{opacity:1;fill:#f4e6bd12}
.contour-hotspot,.contour-hotspot:hover,.contour-hotspot:focus-visible{background:transparent!important;border:0!important;border-radius:0!important;outline:none!important;box-shadow:none!important}
.contour-hotspot.route-paper{transform:none}
.contour-label{bottom:auto;z-index:10;pointer-events:none;transform:translate(-50%,10%)}

/* Revision 03: the original scene stays clean until an object is approached. */
.hotspot-label,.entry-hotspot>span{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}
.hotspot-label{color:var(--cream)}
.hotspot-label.is-active,.entry-hotspot:focus-visible>span{opacity:1;visibility:visible}
@media(hover:hover){.entry-hotspot:hover>span{opacity:1;visibility:visible}}

/* Revision 04: compact paper notes, positioned beside their own objects. */
.object-tooltip{
  top:0;bottom:auto;left:0;transform:none;max-width:calc(100% - 28px);
  padding:11px 14px 11px 13px;border:1px solid #6e7056;border-left:3px solid #526449;
  border-radius:3px 2px 5px 2px;color:#344735;
  background-color:#f0e7cd;
  background-image:radial-gradient(ellipse at 20% 10%,#fff7df90,transparent 75%),repeating-linear-gradient(6deg,#9d885309 0 1px,transparent 1px 4px);
  font:13px/1.65 var(--sans);letter-spacing:.015em;text-wrap:pretty;
  box-shadow:1px 2px 0 #d0c29b,0 4px 8px #152a252b;
  pointer-events:none;
}
.object-tooltip::before{content:'';position:absolute;inset:4px;border:1px solid #8d8c6529;border-radius:2px 4px 2px 5px;pointer-events:none}
.object-tooltip::after{content:'';position:absolute;right:-1px;top:-1px;width:11px;height:11px;background:linear-gradient(45deg,#d5c49a 0 46%,#a8966d 47% 52%,#ece2c7 53%);clip-path:polygon(0 0,100% 100%,0 100%);pointer-events:none}

/* Revision 05: YouYuan throughout; one illustrated sheet at both scales. */
body{font-synthesis:none}
.route-paper{padding:0;display:block}
.distribution-art{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
#modal.paper-zoom{width:min(640px,calc(100vw - 32px),calc(122dvh - 104px));max-height:none;overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none}
#modal.paper-zoom::backdrop{background:#142a216e;backdrop-filter:none}
#modal.paper-zoom .modal-shell{padding:38px 0 0}
#modal.paper-zoom .close-button{top:0;right:4px;padding:3px 10px;border:1px solid #d5c398;background:#173d33;color:var(--cream);border-radius:3px;font-size:14px}
#modal.paper-zoom .paper-modal-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.distribution-sheet{position:relative;width:100%;aspect-ratio:207/169;transform-origin:top left;filter:drop-shadow(0 10px 18px #12221855)}
.distribution-actions{position:absolute;inset:0;pointer-events:none}
.distribution-actions button{position:absolute;left:8%;width:84%;padding:0;pointer-events:auto;background:transparent;border:1px solid transparent;border-radius:4px}
.distribution-actions button:hover{background:#51644412;border-color:#6b765e55}
.distribution-actions button:focus-visible{outline:2px solid #536645;outline-offset:-2px;background:#51644412}

/* Revision 06: trackpad wheel deltas move the scene directly, without easing lag. */
.scene.trackpad-panning{transition:none}
.scene.trackpad-panning .contour-outline,.scene.trackpad-panning .hotspot-label{opacity:0}

/* Revision 07: a scene-bottom story panel, with a persistent character portrait. */
#modal.dialogue-mode{position:fixed;inset:auto 0 max(18px,env(safe-area-inset-bottom));margin:0 auto;width:min(1180px,calc(100vw - 48px));max-height:calc(100dvh - 32px);overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#modal.dialogue-mode::backdrop{background:linear-gradient(180deg,#10251b06,#10251b20);backdrop-filter:none}
#modal.dialogue-mode .modal-shell{padding:0}
#modal.dialogue-mode .dialogue-view{--dialogue-inset:clamp(190px,26vw,320px);position:relative;display:block;min-height:0;isolation:isolate}
#modal.dialogue-mode .dialogue-view.no-portrait{--dialogue-inset:30px}
#modal.dialogue-mode .dialogue-panel{position:relative;min-height:174px;padding:38px 43px 24px var(--dialogue-inset)}
.dialogue-frame{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;overflow:visible;filter:drop-shadow(0 5px 7px #17291f30)}
#modal.dialogue-mode .dialogue-portrait-wrap{position:absolute;z-index:2;left:6px;bottom:3px;width:clamp(170px,25vw,310px);height:clamp(238px,53vh,410px);overflow:hidden;pointer-events:none}
#modal.dialogue-mode .dialogue-portrait{position:absolute;top:0;left:-20%;width:140%;max-width:none;height:auto;max-height:none;object-fit:contain;filter:drop-shadow(1px 2px 1px #22352244)}
#modal.dialogue-mode #modal-title{position:absolute;z-index:3;left:var(--dialogue-inset);top:-17px;display:flex;align-items:center;gap:16px;margin:0;padding:5px 17px 6px;color:#f1e5c8;background:#35503c;border:2px solid #263e2d;border-radius:5px 3px 4px 3px;box-shadow:inset 0 0 0 1px #c2bc924d,1px 2px 0 #b9ae8b;transform:rotate(-.5deg);font:normal 21px/1.3 var(--sans);letter-spacing:.08em}
#modal.dialogue-mode #modal-title small{font:12px/1.3 var(--sans);color:#d3d6b9;letter-spacing:.12em}
.dialogue-copy{position:relative;z-index:3}
#modal.dialogue-mode #dialogue-line{font:clamp(17px,1.7vw,21px)/1.7 var(--sans);color:#334735;margin:0;min-height:3.4em;text-wrap:pretty;overflow-wrap:anywhere;letter-spacing:.035em}
.dialogue-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}
.dialogue-progress{display:flex;gap:7px;flex-shrink:0}
.dialogue-progress i{width:5px;height:5px;border:1px solid #8c9277;border-radius:50%;display:block}
.dialogue-progress i.current{background:#556e4d;border-color:#556e4d}
#modal.dialogue-mode .dialogue-actions{gap:9px;justify-content:flex-end}
#modal.dialogue-mode .dialogue-actions button{min-height:34px;padding:5px 12px;border:1px solid #758368;border-radius:3px 5px 3px 4px;background:#e4dec2;color:#30482f;font:15px/1.45 var(--sans);box-shadow:0 1px 0 #bdb491}
#modal.dialogue-mode .dialogue-actions button:hover{background:#d8dfc5;border-color:#536e4b}
#modal.dialogue-mode .dialogue-actions button.secondary{background:transparent;color:#52684c}
#modal.dialogue-mode .dialogue-actions button:focus-visible{outline:2px solid #56754d;outline-offset:3px}
#modal.dialogue-mode #next-line{border-color:transparent;box-shadow:none;background:transparent;padding-right:3px;font-size:16px}
.dialogue-next-mark{display:inline-block;margin-left:10px;color:#536c47;font-size:22px;vertical-align:middle;line-height:1}
#modal.dialogue-mode .close-button{z-index:5;top:12px;right:15px;width:28px;height:28px;padding:0;background:transparent;color:#667257;font-size:0;line-height:1}
#modal.dialogue-mode .close-button span{font:24px/1 var(--sans);margin:0}
@media(max-width:700px){
  #modal.dialogue-mode{width:calc(100vw - 24px);bottom:max(12px,env(safe-area-inset-bottom))}
  #modal.dialogue-mode .dialogue-view{--dialogue-inset:22px}
  #modal.dialogue-mode .dialogue-panel{padding:33px 23px 19px;min-height:174px}
  #modal.dialogue-mode .dialogue-portrait-wrap{left:7px;bottom:calc(100% - 12px);width:142px;height:176px}
  #modal.dialogue-mode #modal-title{font-size:18px;top:-16px;gap:12px;padding:5px 14px}
  #modal.dialogue-mode #dialogue-line{font-size:16px;line-height:1.65;min-height:3.3em}
  #modal.dialogue-mode .dialogue-footer{gap:7px;margin-top:12px}
  #modal.dialogue-mode .dialogue-actions{gap:7px}
  #modal.dialogue-mode .dialogue-actions button{font-size:14px;padding:5px 8px}
  #modal.dialogue-mode .dialogue-progress{gap:4px}
  #modal.dialogue-mode .dialogue-progress i{width:4px;height:4px}
}
@media(max-height:480px){
  #modal.dialogue-mode{bottom:max(10px,env(safe-area-inset-bottom))}
  #modal.dialogue-mode .dialogue-panel{min-height:140px;padding-top:29px;padding-bottom:15px}
  #modal.dialogue-mode #dialogue-line{font-size:16px;line-height:1.55;min-height:3.1em}
  #modal.dialogue-mode .dialogue-footer{margin-top:9px}
}
@media(max-height:480px) and (min-width:701px){
  #modal.dialogue-mode .dialogue-view{--dialogue-inset:220px}
  #modal.dialogue-mode .dialogue-portrait-wrap{width:210px;height:230px}
}
@media(max-height:480px) and (max-width:700px){
  #modal.dialogue-mode .dialogue-portrait-wrap{width:110px;height:124px;bottom:calc(100% - 8px)}
}

/* Revision 08: closer framing and one rail plane aligned with the locomotive. */
.home-stage.layered .train-motion{inset:auto;right:auto;bottom:auto;aspect-ratio:auto;animation:none;translate:none;transform:none}
.home-stage.layered .train-motion>img{width:100%;height:100%;object-fit:contain}
.track-perspective{position:absolute;left:0;top:0;width:100%;transform-origin:0 0}
.track-perspective .tile-strip{height:100%;animation-duration:12s}
.entry-contour-layer{position:absolute;inset:0;width:100%;height:100%;max-width:none;overflow:visible;pointer-events:none}
.entry-contour-outline{fill:#f4e6bd12;stroke:#f3dfac;stroke-width:3.2px;stroke-linejoin:round;opacity:0;pointer-events:none;transition:opacity .12s}
.entry-contour-outline.is-active{opacity:1}
.home-stage.layered .entry-hotspot,.home-stage.layered .entry-hotspot:hover,.home-stage.layered .entry-hotspot:focus-visible{background:transparent;border:0;border-radius:0;outline:0;box-shadow:none}
.entry-floating-label{position:absolute;z-index:5;transform:translate(-50%,-50%);white-space:nowrap;padding:7px 13px;background:var(--deep);color:var(--cream);border:1px solid #d5c398;border-radius:3px;font:15px/1.5 var(--sans);box-shadow:0 2px 7px #10291d35;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s,visibility .12s}
.entry-floating-label.is-active{opacity:1;visibility:visible}

/* Revision 08B: level camera, restrained ground motion, emphasis on the cab. */
.home-stage.layered .moving-landscape{top:-15%;bottom:auto;height:115%}
.moving-landscape .tile-strip{animation-duration:var(--landscape-duration,360s)}
.track-perspective .tile-strip{animation-duration:var(--track-duration,100s)}
.track-steel{position:absolute;inset:0;background-size:var(--tile-width) 100%;background-repeat:repeat-x;clip-path:polygon(0 82.68%,100% 82.68%,100% 86.29%,0 86.29%);pointer-events:none}
.home-stage.layered::after{content:"";position:absolute;inset:82% 0 0;pointer-events:none;background:linear-gradient(180deg,transparent,#23392c0a 25%,#20322845);z-index:2}

/* Revision 08C: open sky, shared visual/audio speed, and staged boarding. */
.home-stage.layered .tile-strip{animation:none!important}
.boarding-door{position:absolute;perspective:650px;pointer-events:none;visibility:hidden;z-index:3}
.boarding .boarding-door{visibility:visible}
.doorway,.door-leaf{position:absolute;inset:0;width:100%;height:100%;max-width:none}
.door-leaf{transform-origin:95% 50%;transition:transform .85s cubic-bezier(.25,.65,.25,1),filter .85s;backface-visibility:hidden}
.door-leaf img{position:absolute;max-width:none;object-fit:fill}
.door-open .door-leaf{transform:rotateY(-78deg);filter:brightness(.65)}
.boarding .entry-floating-label,.boarding .entry-contour-outline{opacity:0!important;visibility:hidden!important}
.boarding .entry-hotspot{pointer-events:none}
.brake-puff{position:absolute;z-index:4;pointer-events:none;opacity:0}
.brake-puff i{position:absolute;left:0;top:18%;width:44%;height:32%;border-radius:50%;background:#e2dfca;filter:blur(4px);opacity:0}
.brake-air .brake-puff{opacity:1}
.brake-air .brake-puff i{animation:air-release .75s ease-out both}
.brake-air .brake-puff i:nth-child(2){animation-delay:.08s;top:35%;width:60%}
.brake-air .brake-puff i:nth-child(3){animation-delay:.16s;top:10%;width:35%}
@keyframes air-release{0%{transform:translate(0,0) scale(.25);opacity:0}20%{opacity:.18}100%{transform:translate(55%,18%) scale(1.8);opacity:0}}
.loading-screen.boarding-loading{background:#193b30;transition:opacity .3s;pointer-events:auto;z-index:80}
.loading-screen.boarding-loading.ready{pointer-events:none}
.boarding-loading .loading-train{width:150px;height:75px;animation:none}
.boarding-loading p{color:#e8dec0;letter-spacing:.12em}
@media(prefers-reduced-motion:reduce){.door-leaf{transition:none}.brake-puff{display:none}}

/* Revisions 09–10: shared travel phase, precise glass apertures and material light. */
#scene-overlays{position:absolute;inset:0;z-index:2}
.cabin-atmosphere{position:absolute;inset:0;width:100%;height:100%;max-width:none;z-index:1;pointer-events:none;overflow:hidden}
.cabin-atmosphere *{pointer-events:none}
.scene>img{image-rendering:auto}

/* Revision 12: videos play inside the existing glass, with quiet local controls. */
.handwritten-note{transform:rotate(-.6deg);transform-origin:center;white-space:normal;pointer-events:none}
.handwritten-floating{transform:rotate(.45deg)}
.handwritten-concept-0{transform:rotate(-.35deg)}
.handwritten-concept-1{transform:rotate(.35deg)}
.handwritten-art{display:block;width:100%;height:100%;overflow:visible}
.report-booklet{position:absolute;z-index:4;transform:rotate(-1deg);transform-origin:50% 4%;filter:drop-shadow(2px 3px 2px #283e2726)}
.report-book-art{display:block;width:100%;height:100%;pointer-events:none}
.report-book-hit{position:absolute;inset:0;width:100%;height:100%;padding:0;background:transparent;clip-path:polygon(6% 18%,91% 16%,94% 94%,6% 97%)}
.report-book-outline{opacity:0;transition:opacity .15s}
.report-booklet:has(.report-book-hit:hover) .report-book-outline,.report-booklet:has(.report-book-hit:focus-visible) .report-book-outline{opacity:1}
#modal.report-mode{width:min(1200px,calc(100vw - 24px));height:min(900px,calc(100svh - 24px));max-height:calc(100svh - 24px);padding:0;border:2px solid #657058;border-radius:9px 5px 7px 10px;background:#e8dec6;box-shadow:0 20px 70px #10241c70;overflow:hidden;animation:report-unfold .22s ease-out}
#modal.report-mode::backdrop{background:#122b24b0;backdrop-filter:blur(3px)}
#modal.report-mode .modal-shell{height:100%;padding:16px 22px 10px 31px;background:linear-gradient(90deg,#9c946954,#f2e9d500 25px)}
#modal.report-mode .modal-shell::before{content:"";position:absolute;top:15px;bottom:15px;left:14px;width:1px;border-left:1px dashed #7f8762;pointer-events:none}
#modal.report-mode #modal-body{height:100%}
#modal.report-mode .close-button{right:16px;top:13px;color:#40533f;font-size:13px}
.report-reader{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;min-width:0;outline:none}
.report-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-right:78px;min-width:0}
#modal.report-mode #modal-title{font:25px/1.2 'FZShuTi','方正舒体',var(--hand);margin:0;color:#304c3a}
#modal.report-mode #report-chapter{font:13px/1.3 var(--sans);color:#73795a;margin:5px 0 0}
#report-zoom{flex:none;border:1px solid #87916e;padding:6px 12px;border-radius:3px 5px 3px 4px;background:#f5ecd5;font-size:13px;color:#40533f}
.report-canvas{display:flex;align-items:center;justify-content:center;position:relative;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;padding:4px;background:#c9c5ac66;border-radius:3px}
.report-canvas .report-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;flex:none;object-fit:contain;background:white;box-shadow:0 2px 8px #32433330}
.report-canvas.is-zoomed{display:block;touch-action:pan-x pan-y pinch-zoom}
.report-canvas.is-zoomed .report-image{width:1800px;height:auto;max-width:none;max-height:none}
#modal.report-mode #report-error{position:absolute;left:10%;right:10%;top:40%;padding:15px;background:#f3e9cf;font-size:14px;text-align:center}
.report-navigation{display:flex;align-items:center;justify-content:center;gap:22px;min-height:38px;color:#40533f}
.report-navigation button{display:grid;place-items:center;width:42px;height:34px;background:#f5ecd5;border:1px solid #9aa382;border-radius:3px 6px 4px 3px}
.report-navigation button svg{width:19px;height:19px}
#report-page-info{font:13px/1.3 var(--sans);min-width:190px;text-align:center}
@keyframes report-unfold{from{opacity:.5;transform:scale(.975) rotate(-.25deg)}to{opacity:1;transform:none}}
@media(max-width:600px){#modal.report-mode .modal-shell{padding:13px 10px 8px 18px}#modal.report-mode .modal-shell::before{left:8px}.report-heading{padding-right:51px;gap:7px}#modal.report-mode #modal-title{font-size:20px}#modal.report-mode .close-button{right:7px;top:9px;padding:3px}#report-zoom{font-size:12px;padding:5px 6px}#modal.report-mode #report-chapter{font-size:12px}.report-navigation{gap:10px}#report-page-info{min-width:150px;font-size:12px}}
@media(prefers-reduced-motion:reduce){#modal.report-mode{animation:none}.report-book-outline{transition:none}}
@media(max-width:600px){#modal.report-mode{height:clamp(300px,calc((100vw - 52px) * .70667 + 140px),calc(100svh - 24px))}#modal.report-mode:has(.report-canvas.is-zoomed){height:calc(100svh - 24px)}}
.media-window{background:#14251f;border-radius:0}
.media-clip-defs{position:absolute;pointer-events:none}
.window-video,.media-poster,.media-surface{position:absolute;inset:0;width:100%;height:100%;margin:0;border:0;padding:0;border-radius:inherit}
.window-video{display:block;object-fit:cover;object-position:center;background:#14251f;pointer-events:none}
.media-poster{z-index:4;background:#14251f;color:var(--cream);overflow:hidden}
.media-poster>img{width:100%;height:100%;object-fit:cover;object-position:center;opacity:.88;transition:opacity .2s}
.media-poster:hover>img,.media-poster:focus-visible>img{opacity:1}
.media-surface{z-index:2;background:transparent;color:var(--cream)}
.window-play-state{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding-bottom:24px;opacity:1;transition:opacity .18s}
.window-play-state .play-mark{position:static;transform:none;flex:none}
.window-play-state small{font-size:clamp(11px,calc(8px * var(--scene-scale)),14px);padding:2px 7px;border-radius:3px;background:#14291bd1;color:#f5ecd8}
.is-playing .window-play-state{opacity:0}
.window-media-controls{position:absolute;z-index:3;inset:auto 0 0;display:flex;align-items:center;gap:5px;padding:14px 10px 7px;background:linear-gradient(transparent,#10261ee8 40%);color:var(--cream);opacity:1;transition:opacity .18s}
.window-media-controls button{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;padding:5px;border:1px solid transparent;border-radius:4px;background:transparent;color:inherit;line-height:1;touch-action:manipulation}
.window-media-controls button:hover{background:#eee6d219;border-color:#ceba8270}
.window-media-controls svg{display:block;width:20px;height:20px;overflow:visible}
.media-window button:focus-visible{outline:2px solid #e3c681;outline-offset:-3px}
.window-media-controls .media-seek{appearance:none;-webkit-appearance:none;flex:1;min-width:28px;width:0;height:22px;margin:0;padding:0;background:transparent;cursor:pointer;touch-action:none}
.media-seek::-webkit-slider-runnable-track{height:3px;border-radius:2px;background:linear-gradient(to right,#ead6a6 var(--played,0%),#e5ddc64d var(--played,0%))}
.media-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:9px;height:9px;margin-top:-3px;border-radius:50%;background:#f1e3bf;border:1px solid #806e45}
.media-seek::-moz-range-track{height:3px;border-radius:2px;background:#e5ddc64d}
.media-seek::-moz-range-progress{height:3px;background:#ead6a6}
.media-seek::-moz-range-thumb{width:8px;height:8px;border-radius:50%;background:#f1e3bf;border:1px solid #806e45}
.media-seek:focus-visible{outline:1px solid #e3c681;outline-offset:2px}
.media-time{flex:none;font:11px/1 var(--sans);font-variant-numeric:tabular-nums;white-space:nowrap;min-width:62px;text-align:center}
.media-window.is-playing:not(.controls-visible):not(:has(:focus-visible)) .window-media-controls{opacity:0;pointer-events:none}
.media-status{position:absolute;left:6%;right:6%;top:9%;z-index:5;padding:4px 7px;text-align:center;font-size:12px;color:var(--cream);background:#14291be6;border-radius:3px;pointer-events:none}
.media-status:empty{display:none}
@media(prefers-reduced-motion:reduce){.window-media-controls,.window-play-state,.media-poster>img{transition:none}}

/* Revision 13: a tiny GPT-chan lives on the laptop, with an actual hair-shaped hit area. */
.gpt-companion{position:absolute;inset:0;width:100%;height:100%;max-width:none;overflow:visible;z-index:6;pointer-events:none}
.gpt-companion *{pointer-events:none}
.gpt-companion .gpt-head-hit{pointer-events:all;cursor:var(--pet-cursor,pointer);outline:none}
.gpt-head-hit:focus-visible{stroke:#9c895b;stroke-width:.8;stroke-dasharray:2 2;fill:#fff;fill-opacity:.03}
.gpt-expression{opacity:0;transition:opacity .12s ease}
.gpt-companion[data-state="idle"] .expression-idle,.gpt-companion[data-state="waiting"] .expression-waiting,.gpt-companion[data-state="petting"] .expression-happy,.gpt-companion[data-state="happy"] .expression-happy{opacity:1}
.gpt-character{transform-box:view-box;transform-origin:60px 60px}
.gpt-companion[data-state="waiting"] .gpt-character{transform:translateY(-.6px)}
.gpt-petting-hand,.gpt-delight{opacity:0}
.gpt-companion[data-state="petting"] .gpt-head-hit{cursor:none}
.gpt-companion[data-state="petting"] .gpt-petting-hand{opacity:1;animation:gpt-hand-stroke .72s ease-in-out infinite}
.gpt-companion[data-state="petting"] .gpt-character{animation:gpt-head-nuzzle .72s ease-in-out infinite}
.gpt-companion[data-state="petting"] .gpt-delight{animation:gpt-soft-delight .72s ease-in-out infinite}
@keyframes gpt-hand-stroke{0%,100%{transform:translate(-5px,-4px) rotate(-3deg);opacity:0}16%{opacity:1}30%{transform:translate(-3px,5px) rotate(-1deg)}67%{transform:translate(10px,4px) rotate(3deg);opacity:1}86%{transform:translate(11px,-2px) rotate(2deg);opacity:0}}
@keyframes gpt-head-nuzzle{0%,100%{transform:translate(0,0) rotate(0)}32%{transform:translate(-.4px,.8px) rotate(-1deg)}68%{transform:translate(.6px,1.2px) rotate(1.2deg)}}
@keyframes gpt-soft-delight{0%,100%{opacity:0}35%,68%{opacity:.65}}
@media(prefers-reduced-motion:reduce){.gpt-expression{transition:none}.gpt-companion .gpt-character,.gpt-companion .gpt-petting-hand,.gpt-companion .gpt-delight{animation:none!important;transform:none!important}}

/* Revision 14: the ground shade follows the train, while ballast moves underneath. */
.home-stage.layered .moving-landscape{z-index:0}
.home-stage.layered .moving-track{z-index:1}
.train-grounding{position:absolute;max-width:none;overflow:visible;z-index:2;pointer-events:none}
.home-stage.layered .train-motion{z-index:3}
.home-stage.layered::after{z-index:4}

/* Revision 20: quiet charcoal screens, three tactile cabinets, and real pixel type. */
@font-face{font-family:'Train Pixel';src:url('assets/fonts/fusion-pixel/fusion-pixel-12px.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
:root{--pixel:'Train Pixel','YouYuan','幼圆',monospace}
h1,h2,h3,h4,h5,h6{font-family:var(--sans)}
.note-title,#modal.report-mode #modal-title{font-family:var(--sans)}
.machine-info-label{transform:translate(-50%,-100%);font:14px/1.5 var(--sans);padding:6px 10px;background:#e9dfc3;color:#304b3b;border:1px solid #9a9371;box-shadow:1px 3px 5px #15332738}
#modal.arcade-mode{--cabinet:#875c53;--cabinet-light:#b68570;--cabinet-dark:#62453f;--arcade-accent:#cfb57e;width:min(960px,calc(100vw - 32px));height:min(736px,calc(100svh - 28px));max-height:calc(100svh - 28px);padding:0;border:0;border-radius:9px;background:transparent;overflow:hidden;color:#ddd7c0;box-shadow:0 15px 55px #15282080;font-family:var(--pixel);font-synthesis:none}
#modal.arcade-mode[data-arcade-tone="yellow"]{--cabinet:#a18b58;--cabinet-light:#c5b27e;--cabinet-dark:#70603e;--arcade-accent:#d0b983}
#modal.arcade-mode[data-arcade-tone="blue"]{--cabinet:#587b7b;--cabinet-light:#87a59b;--cabinet-dark:#405c60;--arcade-accent:#b2c3a0}
#modal.arcade-mode::backdrop{background:#243831b8;backdrop-filter:blur(3px)}
#modal.arcade-mode .modal-shell{height:100%;padding:0;background:transparent}
#modal.arcade-mode #modal-body{height:100%}
#modal.arcade-mode .close-button{right:22px;top:16px;z-index:3;min-height:32px;padding:2px 8px;color:#e0d9c1;background:#303a35;border:1px solid #7c8978;border-radius:2px;font:12px/1.5 var(--pixel)}
#modal.arcade-mode .close-button span{font:20px/1 var(--pixel);margin-left:7px}
.arcade-cabinet{position:relative;display:grid;grid-template-rows:43px minmax(0,1fr) 58px;gap:12px;height:100%;padding:12px 22px 10px;background:var(--cabinet);border:3px solid var(--cabinet-dark);border-radius:9px;box-shadow:inset 3px 3px 0 var(--cabinet-light),inset -4px -4px 0 var(--cabinet-dark)}
.arcade-marquee{display:flex;align-items:center;gap:12px;padding:0 91px 0 15px;margin:0 1px;color:#ddd1ae;background:#303a35;border:2px solid var(--cabinet-dark);box-shadow:0 2px 0 var(--cabinet-light);font:16px/1 var(--pixel);letter-spacing:1px;min-width:0;white-space:nowrap}
.arcade-marquee>span:not(.arcade-stripes){overflow:hidden;text-overflow:ellipsis}
.arcade-power{flex:none;width:6px;height:6px;background:#b5c3a0;box-shadow:0 0 0 2px #667866}
.arcade-stripes{height:15px;flex:1;min-width:9px;max-width:92px;margin-left:auto;background:repeating-linear-gradient(90deg,var(--cabinet-light) 0 3px,transparent 3px 8px);opacity:.45}
.arcade-bezel{min-height:0;min-width:0;padding:9px;background:#39433e;border:3px solid var(--cabinet-dark);border-top-color:#5c6658;box-shadow:1px 2px 0 var(--cabinet-light),inset 2px 2px 0 #26302d;border-radius:7px}
.arcade-screen{position:relative;height:100%;min-height:0;min-width:0;overflow:hidden;background:#282f2e;border:1px solid #526055;border-radius:6px;box-shadow:inset 0 0 18px #202b292e;color:#ddd7c0}
.arcade-screen::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,#aeb6a804 3px 4px);border-radius:inherit}
.arcade-console{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 34px;border-top:2px solid var(--cabinet-light);background:#242d2515}
.arcade-stick{position:relative;width:60px;height:45px}
.arcade-stick::before{content:"";position:absolute;bottom:0;left:6px;width:49px;height:12px;background:#39423a;border:3px solid var(--cabinet-dark);border-radius:50%}
.arcade-stick::after{content:"";position:absolute;left:30px;top:15px;width:6px;height:23px;background:#c5bc9d;box-shadow:3px 0 0 #657263;transform:rotate(-12deg);transform-origin:bottom}
.arcade-stick i{position:absolute;left:17px;top:0;width:25px;height:25px;border-radius:50%;background:#ae7868;border:3px solid #4e4c3c;box-shadow:inset 4px 3px 0 #c09578;z-index:1}
.arcade-speaker{width:90px;height:20px;background:repeating-linear-gradient(0deg,#414838 0 2px,transparent 2px 5px);opacity:.45}
.arcade-buttons{display:flex;gap:13px;transform:rotate(-8deg)}
.arcade-buttons i{display:block;width:29px;height:29px;border-radius:50%;background:#cab57e;border:3px solid #52513d;box-shadow:inset 3px 2px 0 #dfc996,1px 3px 0 var(--cabinet-dark)}
.arcade-buttons i+ i{background:#af7967;box-shadow:inset 3px 2px 0 #c7987d,1px 3px 0 var(--cabinet-dark)}
.arcade-screw{position:absolute;width:6px;height:6px;border:1px solid #62604b;background:linear-gradient(135deg,#c3b18b 42%,#63614e 43% 57%,#c3b18b 58%);border-radius:50%;pointer-events:none}
.screw-tl{left:9px;top:15px}.screw-bl{left:9px;bottom:15px}.screw-br{right:9px;bottom:15px}
#modal.arcade-mode :is(h2,h3,h4,p,small,button,a,span){font-family:var(--pixel);font-weight:400}
#modal.arcade-mode #modal-title{font:24px/1.5 var(--pixel);margin:0;color:#e0d9c0;letter-spacing:0;overflow-wrap:anywhere}
#modal.arcade-mode button:focus-visible,#modal.arcade-mode a:focus-visible,#history-results:focus-visible{outline:2px solid #d9c698;outline-offset:3px}
#modal.arcade-mode .history-screen{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;height:100%;min-height:0;padding:18px 22px 9px;border:0;border-radius:0;background:none;color:inherit}
.history-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 14px;min-width:0}
#modal.arcade-mode .history-heading p{margin:0;color:#b0b9a3;font:12px/1.5 var(--pixel);white-space:nowrap}
.history-filters{display:flex;gap:7px;flex-wrap:wrap;padding-bottom:15px;border-bottom:1px solid #65736366}
.history-filters button{flex:none;padding:7px 10px;min-height:34px;background:#313a34;color:#c2c7b0;border:1px solid #748069;border-radius:0;font:12px/1.5 var(--pixel);touch-action:manipulation}
.history-filters button:hover{background:#3d473d;color:#e0d9c0}
.history-filters button[aria-pressed="true"]{color:#293831;background:#c7b583;border-color:#d4c292;box-shadow:inset 0 -2px 0 #a68c59}
.history-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;align-content:start;align-items:start;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;padding:18px 8px 8px 0;scrollbar-width:thin;scrollbar-color:#85947a #303934}
.history-results.is-filtered{grid-template-columns:minmax(0,1fr)}
.history-group{min-width:0;padding:0;border:0;background:none;box-shadow:none}
.history-group h3{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:7px 10px;color:#d1bc89;background:#343e36;border-left:3px solid #bca675;font:16px/1.5 var(--pixel)}
.history-group h3 small{font:12px/1 var(--pixel);color:#a9b49b}
.history-group ul{list-style:none;margin:0;padding:0 3px}
.history-entry{padding:11px 0;border-bottom:1px dashed #63745c66}
.history-entry:last-child{border:0}
.history-entry-main{display:flex;align-items:baseline;justify-content:space-between;gap:10px;min-width:0}
.history-entry h4{min-width:0;margin:0;color:#d7d9c2;font:16px/1.5 var(--pixel);overflow-wrap:anywhere}
.history-hours{flex:none;color:#c7b58a;font:12px/1.5 var(--pixel);white-space:nowrap}
.history-entry-meta{display:flex;align-items:baseline;gap:6px 10px;flex-wrap:wrap;margin-top:4px;font:12px/1.5 var(--pixel)}
.history-platform{color:#a7b69f}
.history-achievement{color:#c8b58c;border-left:1px solid #6d795f;padding-left:10px}
#modal.arcade-mode .history-status{margin:7px 0 0;text-align:right;color:#a7b69f;font:12px/1.25 var(--pixel)}
#modal.arcade-mode .game-launch{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px;height:100%;padding:20px 32px;min-height:0}
.demo-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:14px;border-bottom:1px solid #65736380}
.demo-heading>div{min-width:0}
#modal.arcade-mode .game-launch .eyebrow{margin:0 0 12px;font:12px/1.5 var(--pixel);color:#b9bf9f;letter-spacing:.08em;text-transform:none}
.demo-emblem{width:112px;height:76px;flex:none;image-rendering:pixelated}
#modal.arcade-mode .game-responsibilities{list-style:none;padding:0;margin:0;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#85947a #303934}
.game-responsibilities li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:13px;align-items:baseline;margin:0;padding:12px 0;border-bottom:1px dashed #65736366}
.game-responsibilities li:last-child{border:0}
.game-responsibilities li>span{font:12px/1.5 var(--pixel);color:#bca675}
#modal.arcade-mode .game-responsibilities p{margin:0;color:#c5cbbb;font:16px/1.75 var(--pixel)}
.demo-start-area{display:flex;justify-content:center;padding:2px 0 4px}
#modal.arcade-mode .arcade-start{display:flex;align-items:center;justify-content:center;gap:23px;width:min(280px,100%);min-height:62px;margin:0;padding:9px 24px;color:#303c31;background:var(--arcade-accent);border:2px solid #e0cfa1;border-right-color:#a68e5c;border-bottom-color:#a68e5c;border-radius:0;box-shadow:0 5px 0 #73623f,0 7px 0 #475143;text-decoration:none;transition:transform .1s,box-shadow .1s}
.arcade-start>svg{width:12px;height:16px;flex:none}
.arcade-start>span{font:20px/1.4 var(--pixel);text-align:center}
.arcade-start small{display:block;font:12px/1.5 var(--pixel);letter-spacing:2px;color:#4c5a42}
#modal.arcade-mode .arcade-start:hover{background:#ddcba0;transform:translateY(-1px);box-shadow:0 6px 0 #73623f,0 8px 0 #475143}
#modal.arcade-mode .arcade-start:active{transform:translateY(4px);box-shadow:0 1px 0 #73623f,0 3px 0 #475143}
@media(min-width:681px){.history-results.is-filtered .history-group ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}.history-results.is-filtered .history-entry{border-bottom:1px dashed #63745c66}}
@media(max-width:680px){
  #modal.arcade-mode{width:calc(100vw - 16px);height:calc(100svh - 16px);max-height:calc(100svh - 16px)}
  .arcade-cabinet{grid-template-rows:37px minmax(0,1fr) 43px;gap:9px;padding:9px 10px 7px}
  .arcade-marquee{padding-left:10px;padding-right:66px;gap:9px;font-size:12px;letter-spacing:0}
  .arcade-stripes{display:none}
  #modal.arcade-mode .close-button{top:14px;right:16px;font-size:12px;min-height:30px;padding:1px 5px}
  #modal.arcade-mode .close-button span{font-size:16px;margin-left:5px}
  .arcade-bezel{padding:5px;border-width:2px}
  .arcade-console{padding:0 18px}
  .arcade-stick{transform:scale(.78);transform-origin:left center}
  .arcade-speaker{width:54px;height:17px}
  .arcade-buttons{gap:9px}.arcade-buttons i{width:24px;height:24px}
  .arcade-screw{display:none}
  #modal.arcade-mode .history-screen{padding:12px 12px 8px}
  .history-heading{display:block;margin-bottom:11px}
  #modal.arcade-mode .history-heading p{margin-top:4px}
  .history-filters{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior:contain;padding:3px 2px 10px;scrollbar-width:thin;scrollbar-color:#85947a #303934}
  .history-filters button{padding:6px 9px;min-height:34px}
  .history-results{grid-template-columns:minmax(0,1fr);padding-top:12px;gap:16px}
  .history-entry-main{gap:7px}
  #modal.arcade-mode #modal-title{font-size:24px;line-height:1.3}
  #modal.arcade-mode .game-launch{padding:18px 15px 15px;gap:12px}
  .demo-heading{gap:10px;padding-bottom:13px}
  .demo-emblem{width:62px;height:58px;align-self:flex-start}
  #modal.arcade-mode .game-launch .eyebrow{margin-bottom:9px;letter-spacing:0}
  .game-responsibilities li{grid-template-columns:20px minmax(0,1fr);gap:7px;padding:13px 0}
  .arcade-start>span{font-size:18px}.arcade-start small{letter-spacing:1px}
  #modal.arcade-mode .arcade-start{min-height:58px;padding:7px 15px;gap:20px}
}
@media(max-height:440px){
  .arcade-cabinet{grid-template-rows:32px minmax(0,1fr) 12px;gap:7px;padding-top:8px;padding-bottom:5px}
  .arcade-console{padding:0;min-height:0}.arcade-console>*{display:none}
  #modal.arcade-mode .close-button{top:11px;min-height:27px}
  #modal.arcade-mode .history-screen{padding-top:9px;padding-bottom:5px}
  .history-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px;margin-bottom:5px}
  #modal.arcade-mode #modal-title{font-size:20px}
  .history-filters{padding-bottom:8px;gap:5px}
  .history-filters button{padding:4px 8px;min-height:29px}
  .history-results{padding-top:9px}
  #modal.arcade-mode .game-launch{gap:7px;padding:10px 16px}
  .demo-heading{padding-bottom:7px;gap:10px}
  #modal.arcade-mode .game-launch .eyebrow{margin-bottom:4px}
  .demo-emblem{width:56px;height:42px}
  .game-responsibilities li{padding:7px 0}
  #modal.arcade-mode .arcade-start{min-height:40px;padding:3px 15px}
  .arcade-start small{display:none}
  .demo-start-area{padding:0 0 4px}
}
@media(prefers-reduced-motion:reduce){#modal.arcade-mode .arcade-start{transition:none}}

/* V21: small paper covers on the wall, with a readable notebook inside. */
.game-note-cover{position:absolute;z-index:3;transform-origin:50% 6%;pointer-events:none}
.game-note-art{display:block;width:100%;height:100%;overflow:visible}
.game-note-hit{position:absolute;inset:0;padding:0;border:0;background:transparent;pointer-events:auto;clip-path:polygon(1.875% 6.098%,97.5% 4.878%,98.125% 90.244%,92.5% 96.341%,2.5% 95.122%)}
.game-note-hit:hover,.game-note-hit:focus-visible{background:transparent;outline:none}
.game-note-outline{opacity:0;transition:opacity .15s}
.game-note-cover.is-active .game-note-outline{opacity:1}
#modal.game-note-mode{width:min(800px,calc(100vw - 32px));height:min(850px,calc(100svh - 32px));max-height:calc(100svh - 32px);padding:0;border:1px solid #9a9575;border-radius:5px 9px 7px 4px;overflow:hidden;background:#f2ead5;color:#364936;box-shadow:0 18px 65px #12271e66}
#modal.game-note-mode::backdrop{background:#233a2fa3;backdrop-filter:blur(2px)}
#modal.game-note-mode .modal-shell{height:100%;padding:0 18px 0 30px;background:linear-gradient(90deg,#c7bd9b77,transparent 24px);position:relative}
#modal.game-note-mode .modal-shell::before{content:"";position:absolute;left:14px;top:17px;bottom:17px;border-left:1px dashed #a6ab8c;pointer-events:none}
#modal.game-note-mode #modal-body{height:100%}
#modal.game-note-mode .close-button{right:19px;top:13px;z-index:2;padding:5px 8px;min-height:32px;background:transparent;color:#58694b;font:13px/1.5 var(--sans);border-radius:3px}
#modal.game-note-mode .close-button:hover{background:#e2dfc5}
#modal.game-note-mode .close-button span{font-size:20px;margin-left:8px;vertical-align:-1px}
.game-note-reader{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0}
.game-note-masthead{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 17px;padding:18px 78px 16px 20px;border-bottom:1px solid #bfc2a0;color:#586e50}
.game-note-masthead>span{font-size:14px;letter-spacing:.15em}
.game-note-masthead small{font-size:12px;color:#70795e}
.game-note-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a0ab88 transparent;scroll-padding-top:24px}
#game-note-article{max-width:640px;margin:auto;padding:28px 22px 30px;outline:none}
.game-note-heading{padding:0 0 22px;border-bottom:1px solid #c4c9ad}
#modal.game-note-mode .game-note-game{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 14px;margin:0 0 12px;font:16px/1.6 var(--sans);color:#5d7453}
.game-note-game>span{font:12px/1.6 var(--sans);color:#70775e}
#modal.game-note-mode #modal-title{margin:0 0 14px;font:normal 28px/1.5 var(--sans);letter-spacing:.015em;color:#304b39;text-wrap:pretty}
#modal.game-note-mode .game-note-lead{font:16px/1.9 var(--sans);margin:0;color:#646e52}
.game-note-sections{display:grid;gap:25px;padding-top:27px}
#modal.game-note-mode .game-note-sections h3{display:flex;align-items:baseline;gap:12px;margin:0 0 10px;font:normal 18px/1.5 var(--sans);color:#36553d}
.game-note-sections h3>span{font-size:12px;color:#8e936f;letter-spacing:.1em}
#modal.game-note-mode .game-note-sections p{font:16px/1.95 var(--sans);margin:0;color:#3f503c;overflow-wrap:break-word}
#modal.game-note-mode .game-note-takeaway{margin:29px 0 25px;padding:13px 17px;border-left:3px solid #93a077;background:#e6e5cc;font:16px/1.85 var(--sans);color:#48613f}
.game-note-sources{border-top:1px dashed #b7bd9a;padding:14px 0 0;color:#6e7659;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.game-note-sources summary{cursor:pointer;width:fit-content;padding:3px 6px 3px 0}
.game-note-sources a{display:inline-block;margin-top:9px;text-underline-offset:3px}
#modal.game-note-mode .game-note-sources p{margin:7px 0 0;font:12px/1.8 var(--sans);color:#70765e}
.game-note-navigation{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:12px 20px;border-top:1px solid #bfc2a0}
.game-note-navigation button{padding:7px 12px;min-height:36px;width:fit-content;background:#e5e4cb;border:1px solid #b0b995;border-radius:4px;color:#46613f;font:14px/1.5 var(--sans)}
.game-note-navigation button:last-child{justify-self:end}
.game-note-navigation button:hover:enabled{background:#d8dfc1;border-color:#87976f}
.game-note-navigation>span{font:12px/1.5 var(--sans);letter-spacing:.12em;color:#737a5c;white-space:nowrap}
#modal.game-note-mode :is(button,a,summary,.game-note-scroll):focus-visible{outline:2px solid #69874e;outline-offset:2px}
@media(max-width:600px){
  #modal.game-note-mode{width:calc(100vw - 16px);height:calc(100svh - 16px);max-height:calc(100svh - 16px)}
  #modal.game-note-mode .modal-shell{padding:0 8px 0 15px;background:linear-gradient(90deg,#c7bd9b66,transparent 14px)}
  #modal.game-note-mode .modal-shell::before{left:7px}
  #modal.game-note-mode .close-button{right:12px;top:10px}
  .game-note-masthead{display:block;padding:16px 70px 12px 11px}
  .game-note-masthead small{display:block;font-size:11px;margin-top:3px}
  #game-note-article{padding:21px 13px 24px}
  #modal.game-note-mode #modal-title{font-size:24px;line-height:1.45}
  #modal.game-note-mode .game-note-game{font-size:15px;gap:3px 10px}
  .game-note-game>span{font-size:11px}
  #modal.game-note-mode .game-note-lead{font-size:15px}
  .game-note-heading{padding-bottom:18px}
  .game-note-sections{padding-top:22px;gap:23px}
  #modal.game-note-mode .game-note-sections h3{font-size:17px;gap:9px}
  #modal.game-note-mode .game-note-takeaway{font-size:15px;padding:11px 12px}
  .game-note-navigation{padding:10px 6px;gap:5px}
  .game-note-navigation button{padding:7px 8px;font-size:13px}
  .game-note-navigation>span{font-size:11px;letter-spacing:.03em}
}
@media(max-height:440px){
  .game-note-masthead{padding-top:10px;padding-bottom:9px}
  #modal.game-note-mode .close-button{top:5px}
  .game-note-navigation{padding-top:7px;padding-bottom:7px}
}
@media(prefers-reduced-motion:reduce){.game-note-outline{transition:none}}

/* V22: one train drawing for loading and the engineering distribution sheet. */
.train-diagram{display:block;width:100%;height:100%;overflow:hidden;color:#d2d2b5}
.train-diagram path,.train-diagram circle{stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.train-body{fill:#486957}.train-stripe{fill:#d0c5a0;stroke:none!important}
.train-detail{fill:none;stroke:#d4d7bd!important;stroke-width:1.2!important}
.train-chassis{fill:#284e41}.diagram-wheel circle{fill:#26483d}.diagram-wheel path{opacity:.65}
.diagram-couplings,.diagram-rail,.diagram-sleepers{fill:none}
.diagram-rail{opacity:.55}.diagram-sleepers{opacity:.3}
.engineering-guides{display:none;fill:none}
.diagram-number{fill:currentColor;font:13px 'YouYuan','幼圆',sans-serif;text-anchor:middle;letter-spacing:2px;opacity:.65}
.diagram-car.is-current .train-body{fill:#6f8b69;stroke:#eee0b7;stroke-width:2.2}
.diagram-car.is-current .diagram-number{fill:#e3d2a0;opacity:1}
.train-diagram.is-sketch{color:#56634c}
.is-sketch .train-body{fill:#7c896210;stroke-width:1.9}
.is-sketch .train-stripe{fill:#7c896216}
.is-sketch .train-detail{stroke:#667358!important;stroke-width:1.15!important}
.is-sketch .train-chassis{fill:#63705215}
.is-sketch .diagram-wheel circle{fill:none}
.is-sketch .engineering-guides{display:block;opacity:.45}
.is-sketch .engineering-guides path{stroke-width:.65;stroke-dasharray:3 2}
.is-sketch .diagram-number{font-size:15px;fill:#59694b;opacity:1}
.is-sketch .diagram-car.is-current .train-body,.is-sketch .diagram-car.is-active .train-body{fill:#7b8e6338;stroke:#4c6548}
.is-sketch .diagram-car.is-current .diagram-number{fill:#405b3c}
.distribution-row.is-active{fill:#274b34}
.distribution-actions button:hover{background:#778b5012;border-color:#6d805244}
.distribution-actions button[aria-current]{border-bottom:1px solid #76885b55}
.distribution-sheet .train-diagram{overflow:visible}
.distribution-art .train-diagram{width:185px;height:35.5px;overflow:visible}
.distribution-art .is-sketch .train-body{stroke-width:1.4;fill:#7183750a}
.train-diagram .engineering-fine path,.train-diagram .engineering-fine circle,.train-diagram .engineering-fine rect,.train-diagram .engineering-fine ellipse{stroke:currentColor;stroke-width:.72;fill:none}
.distribution-art .is-sketch .train-detail{stroke-width:.85!important}
.distribution-art .is-sketch .engineering-guides path{stroke-width:.55;stroke-dasharray:2 2}
.engineering-roof,.engineering-insets{color:#566950;overflow:visible;stroke-linecap:round;stroke-linejoin:round}
.engineering-roof .roof-body{fill:#6a80540b;stroke-width:1.25}
.engineering-roof-car.is-current .roof-body,.engineering-roof-car.is-active .roof-body{fill:#7b8e6328;stroke:#405b42}
.distribution-art .diagram-bonework path{stroke-width:1.15}
.distribution-art .diagram-car.is-active .train-body{fill:#7b8e6338}
#modal.paper-zoom{width:min(820px,calc(100vw - 24px),calc(122dvh - 96px))}
.loading-screen.journey-loading{display:grid;place-content:center;justify-items:center;gap:12px;background:radial-gradient(ellipse at 50% 47%,#345548,#213f34 70%);color:#e4ddc2;transition:none;outline:none;padding:24px;animation:journey-reveal .18s ease-out;z-index:80}
.loading-illustration{width:min(740px,86vw);aspect-ratio:660/156}
.loading-copy{width:min(320px,75vw);text-align:center}
.loading-kicker{display:block;font:12px/1.6 var(--sans);letter-spacing:.2em;color:#afbea3}
.journey-loading p{margin:8px 0 22px;color:#e4ddc2;font:20px/1.6 var(--sans);letter-spacing:.07em}
.loading-progress{height:2px;width:min(160px,100%);margin:auto;background:#c4c9aa25;overflow:hidden;border-radius:2px}
.loading-progress i{display:block;width:100%;height:100%;background:#c9c49b;transform:scaleX(var(--load-progress,0));transform-origin:left}
.journey-loading .diagram-sleepers{animation:loading-ties .55s linear infinite}
.journey-loading .diagram-wheel{transform-box:fill-box;transform-origin:center;animation:loading-wheels 1.8s linear infinite}
.journey-loading .diagram-car.is-current .train-detail{stroke:#f1e4bf!important}
.brake-air .brake-puff i{animation:subtle-air-release .58s ease-out both;background:#bcb9a0;filter:blur(5px)}
@keyframes subtle-air-release{0%{transform:translate(0,0) scale(.5);opacity:0}25%{opacity:.065}100%{transform:translate(22%,9%) scale(1.05);opacity:0}}
@keyframes loading-ties{to{transform:translateX(23px)}}
@keyframes loading-wheels{to{transform:rotate(-360deg)}}
@keyframes journey-reveal{from{opacity:.3}to{opacity:1}}
@media(max-width:600px){.loading-illustration{width:92vw}.journey-loading p{font-size:17px;margin-bottom:19px}.loading-kicker{font-size:11px}.loading-screen.journey-loading{gap:24px}}
@media(max-height:400px){.loading-illustration{width:min(500px,72vw)}.loading-screen.journey-loading{gap:0}.journey-loading p{margin-bottom:12px;font-size:16px}}
@media(prefers-reduced-motion:reduce){.loading-screen.journey-loading,.journey-loading .diagram-sleepers,.journey-loading .diagram-wheel{animation:none}.loading-progress i{transform:none;opacity:.55}}

/* V23: native paper artwork and small hanging contact objects. */
.hanging-contact{position:absolute;z-index:5;overflow:visible;pointer-events:none}
.hanging-contact .decor-hit{fill:transparent;stroke:none;pointer-events:all;cursor:pointer;outline:none}
.decor-outline{fill:none;stroke:#d4c290;stroke-width:2;opacity:0;pointer-events:none}
.decor-hover-word{fill:#ecdfbd;font-family:var(--sans);opacity:0;paint-order:stroke;stroke:#314c3d;stroke-width:2.5px;stroke-linejoin:round}
.hanging-contact.is-active .decor-outline,.hanging-contact.is-active .decor-hover-word{opacity:1}
.real-sketches,.poster-gallery{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
.exhibition-booklets{position:absolute;z-index:3;pointer-events:none;overflow:visible}
#modal.contact-mode{width:min(510px,calc(100vw - 28px));height:auto;max-height:calc(100svh - 24px);overflow:auto;background:radial-gradient(ellipse at 12% 0,#fff6dd85,transparent 67%),radial-gradient(#8b775418 .65px,transparent .8px) 0 0/7px 9px,#eee5cb;border:1px solid #7e896b;border-radius:3px 6px 4px 2px;box-shadow:0 18px 65px #132a2066,0 2px 0 #8c8055}
#modal.contact-mode .modal-shell{padding:38px 36px 23px}
#modal.contact-mode .modal-shell::before{content:"";position:absolute;inset:10px;border:1px solid #929a7b70;pointer-events:none}
#modal.contact-mode .close-button{top:15px;right:16px}
.contact-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;padding-right:22px;margin-bottom:25px}
.contact-card .eyebrow{font:12px/1.4 var(--sans);color:#727c5e;letter-spacing:.23em;margin:0 0 9px}
#modal.contact-mode #modal-title{font:600 31px/1.3 var(--sans);letter-spacing:.07em;margin:0 0 8px;color:#40513a}
.contact-owner{font:13px/1.5 var(--sans);color:#647151;margin:0;letter-spacing:.07em}
.contact-owner span{display:inline-block;margin-left:12px;padding-left:12px;border-left:1px solid #9aa184;letter-spacing:.12em}
.contact-stamp{display:block;flex:none;width:70px;height:83px;transform:rotate(5deg);opacity:.9}
.contact-address{min-width:0;padding:15px 17px 16px;border:1px solid #989c785c;border-left:3px solid #a89667;background:linear-gradient(100deg,#ded2ad38,#fff4d729);box-shadow:inset 0 1px 2px #8e805414}
.contact-address label{display:block;font:11px/1.4 var(--sans);letter-spacing:.14em;color:#7a8066;margin-bottom:8px}
.contact-card .contact-value{display:block;width:100%;min-width:0;border:0;background:none;border-radius:0;padding:0;font:500 24px/1.45 var(--sans);letter-spacing:.015em;color:#40513a;user-select:text;outline-offset:4px}
.contact-email .contact-value{font-size:22px}
.contact-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px;font:14px/1.4 var(--sans)}
.contact-actions button,.contact-actions a{display:flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:10px 12px;border:1px solid #607055;border-radius:2px;text-decoration:none;transition:background .15s,box-shadow .15s}
.contact-actions button{background:#53674a;color:#f5ecd2;box-shadow:inset 0 1px 0 #ced1ac35,0 2px 0 #40513a2e}
.contact-actions a{background:#e9dfc133;color:#40513a;border-color:#929b7b}
.contact-actions a svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.contact-actions button:hover{background:#40573b}
.contact-actions a:hover{background:#d8ddc177}
.contact-footer{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-top:23px;padding-top:11px;border-top:1px solid #98a07d66;color:#7a8268}
.contact-footer>span{flex:none;font:11px/1.65 Georgia,serif;letter-spacing:.045em}
#contact-copy-status{font:11px/1.65 var(--sans)!important;color:#526446;min-height:18px;margin:0;text-align:right}
@media(max-width:500px){#modal.contact-mode .modal-shell{padding:37px 24px 21px}.contact-heading{gap:14px;margin-bottom:21px;padding-right:14px}#modal.contact-mode #modal-title{font-size:28px}.contact-stamp{width:59px;height:70px}.contact-address{padding:13px 12px}.contact-card .contact-value{font-size:clamp(18px,5.2vw,24px)}.contact-email .contact-value{font-size:clamp(16px,4.8vw,22px)}.contact-actions{gap:9px}.contact-footer{gap:10px}}
#modal.sketch-mode{width:min(780px,calc(100vw - 24px));max-height:calc(100svh - 24px)}
#modal.sketch-mode .modal-shell{padding:25px 22px 14px}
#modal.sketch-mode #modal-title{font:normal 23px/1.4 var(--sans);margin:0 45px 17px 0}
#sketch-original{width:100%;height:min(66svh,760px);object-fit:contain;background:#dedaca}
.sketch-tabs{display:flex;justify-content:center;gap:18px;margin-top:12px}
.sketch-tabs button{min-width:40px;min-height:34px;background:transparent;color:#596c49;border:1px solid #a0ab8b;border-radius:3px;font-size:13px}
.sketch-tabs button[aria-pressed="true"]{background:#647855;color:#efe6cd;border-color:#647855}
@media(max-width:500px){#modal.sketch-mode .modal-shell{padding:26px 13px 12px}}
/* V24: a single flock writes the title in the strip of open sky. */
.portfolio-sky{--sky-width:min(84vw,920px,96vh);position:absolute;z-index:3;left:max(33.333333%,calc(var(--sky-width)/2 + 4vw));top:1%;width:var(--sky-width);height:auto;overflow:visible;transform:translateX(-50%);pointer-events:none;isolation:isolate}
.cloud-ink,.bird-droppings{fill:#fffdf3;filter:drop-shadow(0 1px 1px #42665c26)}
.black-flock{fill:#24352e}
.portfolio-letter,.name-cloud{animation:cloud-letter-float var(--float-time) ease-in-out var(--float-delay) infinite}
.portfolio-sky:not(.flock-finished) .portfolio-letter{animation-play-state:paused}
.flock-finished .black-flock,.flock-finished .bird-droppings{display:none}
#home[hidden] .portfolio-letter,#home[hidden] .name-cloud{animation-play-state:paused}
@keyframes cloud-letter-float{0%,100%{transform:translateY(calc(var(--float-y) * -.65))}50%{transform:translateY(var(--float-y))}}
.bird-has-landed .perch-head{animation:perch-look-and-preen 18s ease-in-out infinite;transform-origin:0 0}
.bird-has-landed .perch-wing{animation:perch-feather-tidy 18s ease-in-out infinite;transform-origin:-2px -12px}
.bird-has-landed .perch-tail{animation:perch-tail-rest 18s ease-in-out infinite;transform-origin:-7px -12px}
@keyframes perch-look-and-preen{0%,8%,100%{transform:rotate(-4deg)}12%,22%{transform:translate(-1px,-.5px) rotate(-13deg)}27%,34%{transform:translate(.6px,0) rotate(8deg)}39%,47%,55%{transform:translate(1px,2px) rotate(24deg)}43%,51%,59%{transform:translate(1px,3px) rotate(34deg)}66%,86%{transform:rotate(-3deg)}91%,95%{transform:translate(-.7px,0) rotate(-11deg)}}
@keyframes perch-feather-tidy{0%,34%,66%,100%{transform:rotate(0)}39%,47%,55%{transform:rotate(-9deg)}43%,51%,59%{transform:rotate(5deg)}}
@keyframes perch-tail-rest{0%,28%,62%,100%{transform:rotate(0)}35%,52%{transform:rotate(-9deg)}43%,57%{transform:rotate(4deg)}}
#home[hidden] .perch-head,#home[hidden] .perch-wing,#home[hidden] .perch-tail{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.portfolio-letter,.name-cloud,.bird-has-landed .perch-head,.bird-has-landed .perch-wing,.bird-has-landed .perch-tail{animation:none}.black-flock,.bird-droppings{display:none}}

/* V32: a small return window stays attached to the viewport in every carriage. */
.jump-window{position:fixed;z-index:35;left:max(12px,env(safe-area-inset-left));top:max(12px,env(safe-area-inset-top));width:clamp(58px,5.1vw,76px);padding:0;background:none;border:0;border-radius:15px;line-height:1;touch-action:manipulation}
.jump-window>svg{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 2px 2px #112e3930)}
.jump-window .return-key{transition:transform .18s ease;transform-origin:38px 33px}
.jump-window-label{position:absolute;left:calc(100% + 7px);top:50%;transform:translate(-3px,-50%);padding:7px 11px;white-space:nowrap;border:1.4px solid #5b6c63;border-radius:8px 10px 9px 7px;background:#f1e6cdee;color:#244752;box-shadow:0 2px 4px #132f3520;font:14px/1.25 var(--sans);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s,transform .16s,visibility .16s}
.jump-window:focus-visible .jump-window-label{opacity:1;visibility:visible;transform:translate(0,-50%)}
.jump-window:focus-visible .return-key{transform:translateX(-1.2px)}
@media(hover:hover){.jump-window:hover .jump-window-label{opacity:1;visibility:visible;transform:translate(0,-50%)}.jump-window:hover .return-key{transform:translateX(-1.2px)}}
@media(prefers-reduced-motion:reduce){.jump-window .return-key,.jump-window-label{transition:none}}
/* V25: one painted cat with grounded poses and scene-aware behaviour. */
.train-cat{position:absolute;inset:0;width:100%;height:100%;z-index:7;pointer-events:none;overflow:hidden}
.cat-head-hit{pointer-events:all;cursor:var(--pet-cursor);outline:none}
.cat-head-hit:focus-visible{stroke:#cfbd88;stroke-width:1.25;stroke-dasharray:2 3}
.cat-body{transform-origin:0 0}
.train-cat[data-state="rest"] .cat-body,.train-cat[data-state="sleep"] .cat-body{animation:cat-breathe 3.9s ease-in-out infinite}
.cat-pet-hand,.cat-pet-lines{opacity:0;pointer-events:none}
.train-cat[data-state="pet"] .cat-pet-hand,.train-cat[data-state="pet"] .cat-pet-lines{opacity:1}
.train-cat[data-state="pet"] .cat-pet-hand path{animation:cat-head-stroke .7s ease-in-out infinite;transform-origin:15px 15px}
.train-cat[data-state="yawn"] .cat-body{animation:cat-yawn 1.9s ease-in-out both}
.train-cat.is-suspended *{animation-play-state:paused!important}
@keyframes cat-breathe{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.014)}}
@keyframes cat-head-stroke{0%,100%{transform:translate(0,-1px) rotate(-3deg)}50%{transform:translate(3px,1px) rotate(4deg)}}
@keyframes cat-yawn{0%,100%{transform:scaleY(1)}35%,65%{transform:scaleY(1.026)}}
@media(prefers-reduced-motion:reduce){.train-cat .cat-body,.train-cat .cat-pet-hand path{animation:none!important}}

/* V28: a quiet translation note below the original report page. */
.report-page{display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0;min-width:0;gap:8px}
#modal.report-mode .report-summary{margin:0;padding:7px 3px 0;border-top:1px solid #9a9b7d66;font:12px/1.55 var(--sans);color:#626e54;overflow:auto;max-height:30vh}
@media(max-width:600px){#modal.report-mode:has(#report-summary:not([hidden])){height:clamp(400px,calc((100vw - 52px) * .70667 + 245px),calc(100svh - 24px))}#modal.report-mode:has(.report-canvas.is-zoomed){height:calc(100svh - 24px)}}

/* V29: small character sketch below the event note. */
.junshen-doodle{position:absolute;z-index:2;pointer-events:none;transform:rotate(-2deg)}
.junshen-doodle svg{width:100%;height:100%;display:block}

/* V31: cool reflected light, warm paper and bone, shared ram profile. */
.home-stage.layered{background:#1382bd}
.loading-screen.journey-loading{background:radial-gradient(ellipse at 50% 47%,#24546b,#172f48 72%);color:#f0e4c5}
.loading-kicker{color:#b4c9ca}
.loading-progress{background:#cbdad526}.loading-progress i{background:#e1c08b}
.train-body{fill:#245969}.train-chassis{fill:#193d50}
.diagram-wheel circle{fill:#1b3b4b}
.train-diagram .diagram-bonework path,.train-diagram .diagram-bonework circle{fill:#e9d9b5;stroke:#344b53;stroke-width:1.2}
.train-diagram .diagram-bonework .diagram-headlamp{fill:#ffe8a1;stroke:#b09a64}
.is-sketch .diagram-bonework path,.is-sketch .diagram-bonework circle{fill:#e9dfc4;stroke:#56634c;stroke-width:1.1}
.pan-button svg{stroke:#244e60}
.home-stage.layered::after{background:linear-gradient(180deg,transparent,#16364b0a 25%,#132e4945)}


/* V35: readable miniature illustration, with stronger outline and layered materials. */
.loading-illustration .train-diagram{color:#ded5b7}
.loading-illustration .train-body{fill:#38666b;stroke-width:2.3}
.loading-illustration .diagram-car.is-current .train-body{fill:#658378;stroke:#fff0c5;stroke-width:2.7}
.loading-illustration .train-detail{stroke-width:1.5!important;stroke:#dfdac0!important}
.loading-illustration .train-chassis{fill:#172f3a;stroke:#9aaea5;stroke-width:1.5}
.loading-illustration .loading-roof{fill:#a0a594;stroke:#ddd3b7;stroke-width:1.1}
.loading-illustration .loading-shadow{fill:#173f49;stroke:none}
.loading-illustration .loading-glass{fill:#244856;stroke:#e3dbc2;stroke-width:1.3}
.loading-illustration .loading-glint{fill:none;stroke:#9cc3c5;stroke-width:2.6;opacity:.35}
.loading-illustration .loading-wear{fill:none;stroke:#e7d6ad;stroke-width:1;opacity:.55}
.loading-illustration .engineering-fine{color:#b7c1aa}
.loading-illustration .engineering-fine path,.loading-illustration .engineering-fine circle,.loading-illustration .engineering-fine rect{stroke-width:.9}
.loading-illustration .engineering-bogie{color:#c6c7ad}
.loading-illustration .engineering-bogie path,.loading-illustration .engineering-bogie circle{stroke-width:3.2}
.loading-illustration .diagram-bonework path{fill:#e1d3ae;stroke:#213e45;stroke-width:1.7}
.loading-illustration .diagram-wheel circle{fill:#173540;stroke-width:1.8}
.loading-illustration .diagram-rail{opacity:.7}

/* V36: preserve paragraph rhythm and inline citations in the supplied long article. */
#modal.game-note-mode .full-article .game-note-intro{padding-top:22px}
#modal.game-note-mode .full-article .game-note-intro p{font:16px/1.95 var(--sans);color:#3f503c;margin:0;overflow-wrap:break-word}
#modal.game-note-mode .full-article .game-note-intro p+p,#modal.game-note-mode .full-article .game-note-sections p+p{margin-top:1em}
#modal.game-note-mode .full-article a{color:#476a59;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
#modal.game-note-mode .full-article .game-note-sections{gap:32px}
#modal.game-note-mode .full-article .game-note-sections h3{font-weight:bold}

/* V37: destination remains obvious after adding mechanical detail. */
.loading-illustration .diagram-car{opacity:.36}
.loading-illustration .diagram-car.is-current{opacity:1;color:#ffe1a0}
.loading-illustration .diagram-car.is-current .train-body{fill:#a8803e;stroke:#ffe6af;stroke-width:3}
.loading-illustration .diagram-car.is-current .loading-roof{fill:#d6ba7d;stroke:#fff0bf}
.loading-illustration .diagram-car.is-current .train-stripe{fill:#ffe9b5}
.loading-illustration .diagram-car.is-current .loading-shadow{fill:#73552e}
.loading-illustration .diagram-car.is-current .loading-glass{fill:#3d666b;stroke:#ffedc1;stroke-width:1.8}
.loading-illustration .diagram-car.is-current .engineering-fine,.loading-illustration .diagram-car.is-current .engineering-bogie{color:#f0dab0}
.loading-illustration .diagram-car.is-current .diagram-number{fill:#ffe4a6;font-size:17px;font-weight:bold;opacity:1;paint-order:stroke;stroke:#173b50;stroke-width:2px}
.loading-illustration .diagram-car.is-current .diagram-bonework path{fill:#f7e3b7;stroke:#604f35;stroke-width:1.7}
.loading-illustration .diagram-car.is-current .diagram-wheel circle{stroke:#f1d49a;fill:#284853;stroke-width:2}

/* V38: destination names, inset carriage-window exit and portrait sketch viewer. */
.loading-illustration .diagram-number{font-size:13px;letter-spacing:.4px}
.loading-illustration .diagram-car.is-current .diagram-number{font-size:14px}
.jump-window:focus-visible .return-key{transform:none}
@media(hover:hover){.jump-window:hover .return-key{transform:none}.jump-window:hover>svg{filter:drop-shadow(0 2px 2px #112e3945) brightness(1.08)}}
#modal.sketch-mode{width:fit-content;max-width:calc(100vw - 24px);--sketch-ratio:.8}
#modal.sketch-mode .modal-shell{padding:20px 16px 12px}
#modal.sketch-mode #modal-title{font-size:20px;margin-bottom:12px}
#modal.sketch-mode #sketch-original{display:block;width:min(calc((100svh - 154px) * var(--sketch-ratio)),calc(100vw - 60px));height:auto;max-height:calc(100svh - 154px);object-fit:contain;background:none;margin:auto}
#modal.sketch-mode .sketch-tabs{margin-top:10px;gap:14px}

/* V39: a consistent reading hierarchy for the three supplied essays. */
#modal.game-note-mode #modal-title{font:700 clamp(23px,2.6vw,29px)/1.48 var(--sans);letter-spacing:.015em;color:#294835;margin-bottom:12px}
#modal.game-note-mode .full-article .game-note-sections h3{display:block;font:700 21px/1.6 var(--sans);margin:0 0 16px;color:#35523c}
#modal.game-note-mode .full-article .article-part{border-top:2px solid #afb599;padding-top:30px;margin-top:12px}
#modal.game-note-mode .full-article .article-part h3{font-size:25px;line-height:1.5;margin-bottom:22px;color:#294835}
#modal.game-note-mode .full-article strong{font-weight:700;color:#294535}
#modal.game-note-mode .full-article .article-reference{font:13px/1.8 var(--sans);color:#65745b;text-decoration-thickness:1px;margin-left:3px}
.article-table-scroll{width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin:22px 0;border:1px solid #acb296;border-radius:3px}
.article-table-scroll table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;font:14px/1.8 var(--sans);color:#3f503c}
.article-table-scroll th{background:#d9ddc4;color:#304b37;font-weight:700;text-align:left}
.article-table-scroll th,.article-table-scroll td{padding:10px 8px;vertical-align:top;border-right:1px solid #bfc5ac;border-bottom:1px solid #bfc5ac;overflow-wrap:anywhere}
.article-table-scroll th:last-child,.article-table-scroll td:last-child{border-right:0}
.article-table-scroll tr:last-child td{border-bottom:0}
.article-table-scroll tbody tr:nth-child(even){background:#e7e5cf88}
.article-table-scroll:focus-visible{outline:2px solid #69874e;outline-offset:3px}
.game-note-sections>section{min-width:0}
@media(max-width:600px){#modal.game-note-mode .full-article .game-note-sections h3{font-size:19px}#modal.game-note-mode .full-article .article-part h3{font-size:22px}#game-note-article{padding-left:16px;padding-right:16px}.article-table-scroll table{font-size:13px}}

/* V40: narrow screens keep every cell readable without sideways scrolling. */
@media(max-width:520px){
 .article-table-scroll table,.article-table-scroll tbody{display:block;width:100%}
 .article-table-scroll colgroup{display:none}
 .article-table-scroll thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .article-table-scroll tr{display:block;border-bottom:1px solid #aeb79a;padding:5px 0}
 .article-table-scroll tr:last-child{border-bottom:0}
 .article-table-scroll td{display:grid;grid-template-columns:5.5em minmax(0,1fr);gap:10px;border:0;padding:7px 10px}
 .article-table-scroll td::before{content:attr(data-label);font-weight:700;color:#52654c}
 .article-table-scroll td:first-child{background:#d9ddc466;font-weight:700;color:#304b37}
}

/* V42: a single enlarged poster opens directly, without a paging interface. */
.poster-gallery{overflow:visible}
.poster-hit{pointer-events:all;cursor:pointer;outline:none}
.poster-focus{fill:none;stroke:#e4bf7f;stroke-width:1.6;opacity:0;pointer-events:none;transition:opacity .15s}
.poster-frame.is-active .poster-focus{opacity:1}
#modal.poster-mode{--poster-ratio:.75;width:fit-content;max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);overflow:hidden;background:#ece4ce;border:1px solid #939c80;border-radius:5px}
#modal.poster-mode .modal-shell{padding:44px 10px 10px}
#modal.poster-mode .poster-reader-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
.poster-reader-canvas{overflow:hidden}
#modal.poster-mode #poster-original{display:block;width:min(calc((100svh - 90px) * var(--poster-ratio)),calc(100vw - 48px));height:auto;max-height:calc(100svh - 90px);object-fit:contain;margin:0 auto}
#poster-error{font:13px/1.7 var(--sans);color:#685842}

/* V44: one simple ink-green close mark, with no visible close label or plate. */
#modal button#close-modal{display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:6px;background:transparent;border:0;border-radius:0;color:#40513a;font-size:0;line-height:1;box-shadow:none}
#modal button#close-modal svg{display:block;width:20px;height:20px;fill:none;stroke:#40513a;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
#modal button#close-modal:hover{background:transparent}
#modal button#close-modal:focus-visible{outline:2px solid #40513a;outline-offset:1px}

/* The six source report pages are 2400 × 1696; the reader follows that ratio. */
#modal.report-mode{width:min(1040px,calc(100vw - 24px),calc((100svh - 220px) * 1.41509434 + 36px));height:auto;max-height:calc(100svh - 24px);overflow:auto}
#modal.report-mode .modal-shell{height:auto;padding:16px 16px 12px 20px}
#modal.report-mode .modal-shell::before{left:9px;top:14px;bottom:14px}
#modal.report-mode #modal-body{height:auto}
#modal.report-mode .report-reader{height:auto;grid-template-rows:auto auto auto;gap:10px}
#modal.report-mode .report-heading{padding-right:42px}
#modal.report-mode #modal-title{font-size:23px}
#modal.report-mode .report-page{display:block}
#modal.report-mode .report-canvas{display:block;padding:0;background:none;border-radius:0;overflow:hidden}
#modal.report-mode .report-canvas .report-image{width:100%;height:auto;max-width:100%;max-height:none;object-fit:contain;box-shadow:0 1px 4px #32433320}
#modal.report-mode .report-summary{margin:8px 0 0;padding-top:7px;max-height:22svh}
#modal.report-mode:has(.report-canvas.is-zoomed){width:min(1200px,calc(100vw - 24px));height:auto}
#modal.report-mode .report-canvas.is-zoomed{height:min(62svh,660px);overflow:auto}
#modal.report-mode .report-canvas.is-zoomed .report-image{width:1800px;height:auto;max-width:none;max-height:none}
@media(max-width:600px){
 #modal.report-mode{width:calc(100vw - 24px);height:auto}
 #modal.report-mode .modal-shell{padding:12px 12px 10px 16px}
 #modal.report-mode .modal-shell::before{left:7px}
 #modal.report-mode .report-heading{gap:7px;padding-right:36px}
 #modal.report-mode #modal-title{font-size:20px}
 #modal.report-mode:has(#report-summary:not([hidden])),#modal.report-mode:has(.report-canvas.is-zoomed){height:auto}
}




/* V47: shared paper, ticket and aged-metal UI. Adaptive dialogs must be fit-content,
   not auto: auto stretches between the browser top-layer inset edges. */
:root{--ui-ink:#40513a;--ui-edge:#8a9472;--ui-paper:#eee4cc;--ui-ticket:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22240%22%20height%3D%2250%22%20viewBox%3D%220%200%20240%2050%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M11%202%20228%203%20237%2010v8q-10%207%200%2014v9l-10%206-216%201-8-8V32q10-7%200-14V10Z%22%20fill%3D%22%23e9dfc1%22%20stroke%3D%22%238a9472%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M17%206h204M17%2044h204%22%20stroke%3D%22%238a9472%22%20stroke-width%3D%22.6%22%20opacity%3D%22.4%22%2F%3E%3Cpath%20d%3D%22M20%2011v28m201-28v28%22%20stroke%3D%22%238a9472%22%20stroke-width%3D%22.7%22%20opacity%3D%22.3%22%20stroke-dasharray%3D%221.5%202.5%22%2F%3E%3C%2Fsvg%3E");--ui-ticket-dark:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22240%22%20height%3D%2250%22%20viewBox%3D%220%200%20240%2050%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M11%202%20228%203%20237%2010v8q-10%207%200%2014v9l-10%206-216%201-8-8V32q10-7%200-14V10Z%22%20fill%3D%22%23536749%22%20stroke%3D%22%23344b34%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M17%206h204M17%2044h204%22%20stroke%3D%22%23344b34%22%20stroke-width%3D%22.6%22%20opacity%3D%22.4%22%2F%3E%3Cpath%20d%3D%22M20%2011v28m201-28v28%22%20stroke%3D%22%23344b34%22%20stroke-width%3D%22.7%22%20opacity%3D%22.3%22%20stroke-dasharray%3D%221.5%202.5%22%2F%3E%3C%2Fsvg%3E");--ui-folio:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22800%22%20height%3D%22600%22%20viewBox%3D%220%200%20800%20600%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cpattern%20id%3D%22paper%22%20width%3D%2211%22%20height%3D%2213%22%20patternUnits%3D%22userSpaceOnUse%22%3E%3Cpath%20d%3D%22m2%203%202-.3m4%206%201%20.4M2%2011h.7%22%20stroke%3D%22%237f7354%22%20stroke-width%3D%22.45%22%20opacity%3D%22.14%22%2F%3E%3C%2Fpattern%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M11%202%20778%203%20798%2023%20797%20585%20785%20598%2013%20597%202%20584%203%2015Z%22%20fill%3D%22%23eee4cc%22%20stroke%3D%22%23859175%22%20stroke-width%3D%221.4%22%2F%3E%3Cpath%20d%3D%22M11%202%20778%203%20798%2023%20797%20585%20785%20598%2013%20597%202%20584%203%2015Z%22%20fill%3D%22url(%23paper)%22%2F%3E%3Cpath%20d%3D%22m777%204%201%2018%2019%201%22%20fill%3D%22%23d4ccb0%22%20stroke%3D%22%239b9d7d%22%20stroke-width%3D%22.8%22%2F%3E%3Cpath%20d%3D%22M9%2026v543m6-535v525M28%20590h746%22%20stroke%3D%22%23b8b196%22%20stroke-width%3D%22.8%22%20opacity%3D%22.65%22%2F%3E%3C%2Fsvg%3E");--ui-contact:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22480%22%20height%3D%22280%22%20viewBox%3D%220%200%20480%20280%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cpattern%20id%3D%22paper%22%20width%3D%2211%22%20height%3D%2213%22%20patternUnits%3D%22userSpaceOnUse%22%3E%3Cpath%20d%3D%22m2%203%202-.3m4%206%201%20.4M2%2011h.7%22%20stroke%3D%22%237f7354%22%20stroke-width%3D%22.45%22%20opacity%3D%22.14%22%2F%3E%3C%2Fpattern%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M14%202%20463%203%20478%2016%20477%20128Q461%20140%20477%20152L478%20266%20464%20278%2014%20277%202%20264%203%20152Q19%20140%203%20128L2%2015Z%22%20fill%3D%22%23eee4c9%22%20stroke%3D%22%237e896b%22%20stroke-width%3D%221.4%22%2F%3E%3Cpath%20d%3D%22M14%202%20463%203%20478%2016%20477%20128Q461%20140%20477%20152L478%20266%20464%20278%2014%20277%202%20264%203%20152Q19%20140%203%20128L2%2015Z%22%20fill%3D%22url(%23paper)%22%2F%3E%3Cpath%20d%3D%22M24%2013h418M24%20266h428%22%20stroke%3D%22%23b3a078%22%20stroke-width%3D%22.8%22%2F%3E%3Cpath%20d%3D%22M22%2030v220%22%20stroke%3D%22%23ac9870%22%20stroke-width%3D%22.7%22%20stroke-dasharray%3D%222%204%22%2F%3E%3Cpath%20d%3D%22m457%2012%207%207m-10-7%208%207M10%20260l6%206m-3-10%206%206%22%20stroke%3D%22%23a3a484%22%20stroke-width%3D%22.8%22%20opacity%3D%22.6%22%2F%3E%3C%2Fsvg%3E")}
#modal:is(.contact-mode,.report-mode,.sketch-mode,.poster-mode){height:fit-content;min-height:0;margin:auto}
#modal:is(.contact-mode,.report-mode,.sketch-mode,.poster-mode) .modal-shell,#modal:is(.contact-mode,.report-mode,.sketch-mode,.poster-mode) #modal-body{height:auto;min-height:0}
#modal:where(:not(.arcade-mode):not(.dialogue-mode):not(.paper-zoom)){border:0;border-radius:0;background:transparent;box-shadow:none;filter:drop-shadow(0 12px 20px #132a204a)}
#modal:where(:not(.arcade-mode):not(.dialogue-mode):not(.paper-zoom)) .modal-shell{background:var(--ui-folio) 0 0/100% 100% no-repeat}
#modal::backdrop{background:#18372f9c;backdrop-filter:blur(2px)}
:is(#modal :is(.contact-actions button,.contact-actions a,.game-note-navigation button,.sketch-tabs button,#report-zoom,.dialogue-actions button),.ticket-button,.quiet-button){border:0;border-radius:0;background-color:transparent;background-image:var(--ui-ticket);background-size:100% 100%;background-repeat:no-repeat;color:var(--ui-ink);box-shadow:none;padding:10px 21px;text-decoration:none;transition:filter .15s,transform .15s}
:is(#modal :is(.contact-actions button,.contact-actions a,.game-note-navigation button,.sketch-tabs button,#report-zoom,.dialogue-actions button),.ticket-button,.quiet-button):hover{background-color:transparent;filter:brightness(1.04);box-shadow:none}
:is(#modal :is(.contact-actions button,.contact-actions a,.game-note-navigation button,.sketch-tabs button,#report-zoom,.dialogue-actions button),.ticket-button,.quiet-button):active{transform:translateY(1px)}
:is(#modal :is(.contact-actions button,.contact-actions a,.game-note-navigation button,.sketch-tabs button,#report-zoom,.dialogue-actions button),.ticket-button,.quiet-button):focus-visible{outline:2px solid #657953;outline-offset:2px}
#modal .contact-actions button,.ticket-button{background-image:var(--ui-ticket-dark);color:#f4ead0}
#modal .sketch-tabs button[aria-pressed="true"]{background:var(--ui-ticket-dark) 0 0/100% 100% no-repeat;color:#f4ead0;border:0}
#modal :is(.report-navigation button){width:38px;height:38px;border-radius:50%;background:radial-gradient(circle at 30% 24%,#faf0d1,#d8c9a0);border:1px solid #8a9472;box-shadow:inset 0 0 0 3px #eadfc2,inset 0 0 0 4px #a6ac89,0 2px 0 #67755a30}
#modal .game-note-masthead{border-bottom:1px dashed #9b9f7b;background:linear-gradient(95deg,#a7b19120,transparent 65%)}
#modal .game-note-navigation{border-top:1px dashed #9b9f7b}
#modal.game-note-mode .modal-shell::before,#modal.report-mode .modal-shell::before{border-left:2px dotted #929775}
#modal .sketch-tabs{gap:12px}
#modal .sketch-tabs button{min-width:48px;padding:8px 15px}
#modal.poster-mode .modal-shell{padding:40px 12px 12px}
#modal.poster-mode #poster-original{width:min(calc((100svh - 88px) * var(--poster-ratio)),calc(100vw - 52px));max-height:calc(100svh - 88px)}
#modal .poster-reader-canvas{box-shadow:0 1px 0 #f7f0dd,inset 0 0 0 1px #77856555}
#modal.sketch-mode .modal-shell{padding:22px 18px 14px}
#modal.sketch-mode #sketch-original{width:min(calc((100svh - 158px) * var(--sketch-ratio)),calc(100vw - 64px));max-height:calc(100svh - 158px)}
#modal.contact-mode{width:min(480px,calc(100vw - 24px));max-height:calc(100svh - 24px);overflow:auto}
#modal.contact-mode .modal-shell{padding:26px 30px 16px 37px;background:var(--ui-contact) 0 0/100% 100% no-repeat}
#modal.contact-mode .modal-shell::before{display:none}
#modal.contact-mode .contact-heading{gap:18px;margin:0 0 14px;padding-right:15px}
#modal.contact-mode .eyebrow{font:10px/1.4 var(--sans);letter-spacing:.21em;margin:0 0 6px;color:#7c8369}
#modal.contact-mode #modal-title{font:600 26px/1.3 var(--sans);letter-spacing:.04em;margin:0 0 5px;color:#40513a}
#modal.contact-mode .contact-owner{font:12px/1.45 var(--sans);margin:0;color:#6b775b}
#modal.contact-mode .contact-owner span{margin-left:9px;padding-left:9px}
#modal.contact-mode .contact-stamp{width:57px;height:68px}
#modal.contact-mode .contact-address{padding:9px 0 10px;border:0;border-top:1px dashed #a5aa87;border-bottom:1px solid #aca78375;background:none;box-shadow:none}
#modal.contact-mode .contact-address label{font-size:10px;margin-bottom:4px}
#modal.contact-mode .contact-value{font:500 23px/1.45 var(--sans);letter-spacing:.015em;padding:0}
#modal.contact-mode .contact-email .contact-value{font-size:21px}
#modal.contact-mode .contact-actions{margin-top:14px;gap:12px}
#modal.contact-mode .contact-actions :is(button,a){min-height:42px;padding:9px 18px;font:13px/1.4 var(--sans)}
#modal.contact-mode .contact-footer{margin-top:9px;padding-top:0;border:0;min-height:16px;justify-content:flex-end}
#modal.contact-mode .contact-footer>span{display:none}
#modal.contact-mode #contact-copy-status{font:11px/1.45 var(--sans)!important;min-height:16px;margin:0;color:#526446}
#modal.contact-mode .close-button{top:12px;right:12px}
/* The machine keeps its physical cabinet, while chips and controls share the metal finish. */
#modal.arcade-mode{border-radius:24px 18px 16px 22px}
.arcade-cabinet{border-radius:24px 18px 16px 22px;background:linear-gradient(135deg,#e5d4a125,transparent 35%,#172e2320),var(--cabinet)}
.arcade-marquee{border-radius:10px 16px 8px 13px}
.arcade-bezel{border-radius:18px 22px 16px 19px}
.arcade-screen{border-radius:12px 16px 11px 14px}
#modal.arcade-mode .history-filters button{border-radius:8px 14px 7px 12px;background:linear-gradient(#4c5a48,#344235);border-color:#819272;box-shadow:inset 0 1px 0 #c9d1b725}
#modal.arcade-mode .history-filters button[aria-pressed="true"]{background:linear-gradient(#c9b885,#a29163);color:#2f432f;border-color:#dfcfaa}
#modal.arcade-mode .arcade-start{border-radius:12px 22px 11px 19px;background:linear-gradient(145deg,#e1d0a6,var(--arcade-accent));box-shadow:0 3px 0 #73623f,0 5px 0 #475143}
#modal.dialogue-mode #next-line{padding:8px 21px;background:var(--ui-ticket) 0 0/100% 100% no-repeat;border:0;box-shadow:none}
#modal.dialogue-mode #modal-title{border-radius:8px 15px 7px 11px}
.object-tooltip,.contour-label,.entry-floating-label,.machine-info-label,.jump-window-label{border-radius:9px 16px 8px 13px;border-color:#8a9472;background-color:#eee4cc;color:#40513a;box-shadow:1px 3px 5px #16392e30}
.window-media-controls button{border-radius:8px 12px 7px 11px;background:linear-gradient(145deg,#5c776455,#18372d55);border-color:#a9b09255;box-shadow:inset 0 1px 0 #dde5c415}
.window-media-controls button:hover{background:linear-gradient(145deg,#8d9c7655,#294c3855);border-color:#c8c29a88}
.media-status{border-radius:7px 12px 8px 10px;background:#284536e8}
.postcard{aspect-ratio:auto;border:0;background:transparent;padding:24px 18px 20px;min-height:0}
.postcard p{margin-top:24px}
@media(max-width:500px){
 #modal.contact-mode .modal-shell{padding:25px 23px 15px 30px}
 #modal.contact-mode .contact-heading{gap:10px;padding-right:9px;margin-bottom:12px}
 #modal.contact-mode #modal-title{font-size:24px}
 #modal.contact-mode .contact-stamp{width:47px;height:56px}
 #modal.contact-mode .contact-value{font-size:clamp(17px,5.2vw,23px)}
 #modal.contact-mode .contact-email .contact-value{font-size:clamp(16px,4.8vw,21px)}
 #modal.contact-mode .contact-actions{gap:8px}
 #modal.contact-mode .contact-actions :is(button,a){padding:9px 13px;gap:6px}
 #modal .game-note-navigation button{padding:8px 14px}
 #modal.sketch-mode .modal-shell{padding:22px 16px 12px}
}
@media(prefers-reduced-motion:reduce){:is(#modal :is(.contact-actions button,.contact-actions a,.game-note-navigation button,.sketch-tabs button,#report-zoom,.dialogue-actions button),.ticket-button,.quiet-button){transition:none}}

/* V49: original research pages in a compact, proportion-aware folio. */
#modal.journal-mode{--journal-ratio:1.414;width:min(1100px,calc(100vw - 24px),max(280px,calc((100svh - 200px) * var(--journal-ratio) + 42px)));height:fit-content;min-height:0;max-height:calc(100svh - 24px);overflow:auto;margin:auto}
#modal.journal-mode .modal-shell{height:auto;min-height:0;padding:16px 18px 12px 24px}
#modal.journal-mode #modal-body{height:auto;min-height:0}
#modal.journal-mode .modal-shell::before{content:"";position:absolute;left:11px;top:19px;bottom:16px;border-left:2px dotted #929775;pointer-events:none}
.journal-tabs{display:flex;gap:8px;padding-right:36px;margin-bottom:12px}
#modal.journal-mode .journal-tabs button,#modal.journal-mode #journal-zoom{min-height:34px;padding:8px 20px;border:0;border-radius:0;background:var(--ui-ticket) 0 0/100% 100% no-repeat;color:#40513a;font:12px/1.4 var(--sans)}
#modal.journal-mode .journal-tabs button[aria-pressed="true"]{background-image:var(--ui-ticket-dark);color:#f4ead0}
.journal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#modal.journal-mode .journal-caption{margin:0 0 3px;font:11px/1.3 var(--sans);color:#7d8568;letter-spacing:.12em}
#modal.journal-mode #modal-title{display:none}
#modal.journal-mode #journal-zoom{flex:none;padding:7px 16px;min-height:32px;font-size:11px}
.journal-canvas{position:relative;width:100%;padding:0;background:none;overflow:hidden;outline-offset:2px}
#journal-image{display:block;width:100%;height:auto;max-width:100%;margin:0}
#modal.journal-mode #journal-error{position:absolute;top:40%;left:10%;right:10%;margin:0;padding:12px;background:#eee4cc;color:#40513a;font:13px/1.5 var(--sans);text-align:center}
.journal-navigation{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:9px}
#modal.journal-mode .journal-navigation button{display:grid;place-items:center;min-height:32px;width:34px;height:34px;padding:0;border:1px solid #8a9472;border-radius:50%;background:radial-gradient(circle at 30% 24%,#faf0d1,#d8c9a0);box-shadow:inset 0 0 0 3px #eadfc2,inset 0 0 0 4px #a6ac89;color:#40513a;font:18px/1 var(--sans)}
#journal-page-info{font:12px/1.4 var(--sans);letter-spacing:.12em;color:#737d60;font-variant-numeric:tabular-nums}
#modal.journal-mode :is(button,.journal-canvas):focus-visible{outline:2px solid #657953;outline-offset:2px}
#modal.journal-mode.journal-zoomed{width:min(1100px,calc(100vw - 24px))}
.journal-canvas.is-zoomed{height:min(65svh,720px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9da785 #ddd8c3}
.journal-canvas.is-zoomed #journal-image{width:var(--journal-image-width);max-width:none;height:auto}
@media(max-width:500px){#modal.journal-mode .modal-shell{padding:15px 12px 11px 18px}.journal-tabs{gap:5px;margin-bottom:10px}#modal.journal-mode .journal-tabs button{padding:8px 15px;font-size:11px}.journal-heading{gap:8px}#modal.journal-mode #modal-title{font-size:21px}#modal.journal-mode #journal-zoom{padding:7px 13px}.journal-navigation{margin-top:8px;gap:19px}}
