/* Shared page rhythm; artwork and the meadow remain unchanged. */
.rail-workspace main{padding-top:28px}
.rail-workspace main>.garage-page,.rail-workspace main>.daily-shop,.rail-workspace main>.market-page,.rail-workspace main>.social-page,.rail-workspace main>.forum-page,.rail-workspace main>.route-builder,.rail-workspace main>.train-studio,.rail-workspace main>.journey-follow{max-width:1040px;margin-left:auto;margin-right:auto}
.rail-workspace .module-heading,.rail-workspace .studio-heading,.rail-workspace .page-heading{margin:0 0 24px;padding:0;text-align:left}
.rail-workspace .module-heading h1,.rail-workspace .studio-heading h1,.rail-workspace .page-heading h1{font:500 30px/1.2 var(--serif);margin:0 0 10px;color:var(--ink)}
.rail-workspace .studio-heading .train-nickname{display:block;margin:0 auto 8px}
.rail-workspace .studio-heading h1{margin-bottom:12px}
.rail-workspace .module-heading p{margin:0;line-height:1.5}
.departure-scroll{-webkit-mask-image:none;mask-image:none}
.departure-preview{overflow:hidden}.departure-scroll>div{padding-inline:3px}
.cargo-load-button{background:linear-gradient(90deg,#dce9cd var(--loading-progress,0%),#faf8f0 var(--loading-progress,0%));min-width:85px}
/* Larger side-view lever and a stable instruction area. */
.cab-dashboard{grid-template-columns:36px minmax(360px,480px) minmax(175px,235px);gap:16px;align-items:center}
.driving-controls{grid-template-columns:minmax(145px,1fr) 210px;grid-template-rows:94px auto 40px;gap:5px 4px;min-height:198px;padding:12px 14px}
.cab-instruments{grid-column:1;grid-row:1;padding:0;min-width:0}
.lever-instrument{grid-column:2;grid-row:1/4;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}
.cab-lever{width:210px;height:auto;aspect-ratio:180/128;margin:10px 0 0;max-width:100%}
.lever-target{position:static;display:flex;gap:5px;margin:3px 0 0;line-height:1.2}
.lever-target output{font-size:13px}.lever-target small{font-size:10px}
.driving-controls p{grid-column:1;grid-row:2;min-height:0;margin:0;font-size:10px;line-height:1.45}
.drive-warning{grid-column:1;grid-row:3;position:static;display:flex;align-items:center;min-height:38px;padding:5px 7px;border:1px dashed #a9b6a1;border-radius:7px;background:transparent;color:#788773;font-size:10px;line-height:1.3}
.drive-warning.has-warning{border-style:solid;border-color:#d1b572;background:#f7e9c2;color:#6c542e;font-weight:650}
.cab-dashboard .ride-tools{gap:7px;align-items:center}
.cab-dashboard .ride-tool{box-sizing:border-box;display:grid;place-items:center;width:34px;height:34px;min-width:34px;max-width:34px;min-height:34px;max-height:34px;flex:0 0 34px;padding:0;border-radius:50%;aspect-ratio:1;line-height:1}
.announcement-space{height:auto;min-height:48px;margin:4px 0 14px;display:flex;align-items:center;justify-content:center}
.announcement-card{max-width:740px;min-height:34px;padding:6px 10px;gap:10px}.announcement-card p{line-height:1.45;font-size:11px}.announcement-card>.button{flex-shrink:0}
.travel-readouts{grid-template-columns:1fr;gap:12px}.travel-readouts>div:first-child{grid-column:auto}.travel-readouts>div:first-child strong{font-size:20px}
.arrival-time{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}.arrival-delay{font-size:11px;font-weight:650;white-space:nowrap}.arrival-delay.late{color:#aa4942}.arrival-delay.early{color:#46744f}.arrival-delay.on-time{color:#80907b;font-weight:400}
.travel-readouts .current-clock{margin-top:5px;color:#899581;font-size:10px;font-weight:400}
.stop-target{position:absolute;height:70px;z-index:6;border:2px dashed #487e58;border-radius:5px;background:#bad7a726;pointer-events:none;box-sizing:border-box;transition:background .2s}
.stop-target[hidden]{display:none}.stop-target>span{position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);white-space:nowrap;background:#fcfcf1;border:1px solid #8ba384;color:#42614a;border-radius:6px;padding:4px 7px;font-size:10px;font-weight:650;box-shadow:0 2px 6px #314d3815}
.stop-target i{position:absolute;left:50%;top:-5px;bottom:-8px;border-left:1px dashed #3c6d4a}.stop-target.in-target{background:#a9d39f55;border-style:solid}.stop-target.stopped{opacity:.7}
/* Opaque paper exists beneath the cover before the opening starts. */
.illustrated-book{width:min(900px,calc(100vw - 28px));max-height:94dvh;background:transparent;border:0;box-shadow:none;overflow-x:hidden}
.illustrated-book .modal-body{padding:16px 36px 35px;overflow:visible;background:transparent}
.book-stage{position:relative;width:100%;perspective:1400px;transform-style:preserve-3d;transition:transform .85s cubic-bezier(.3,.05,.2,1);isolation:isolate}
.book-stage.is-closed{transform:translateX(-25%)}
.book-stage .journal-spread{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0;aspect-ratio:1.48;min-height:0;background:none;border-radius:6px;perspective:1400px;box-shadow:0 12px 35px #291d2433}
.book-stage .journal-leaf{position:relative;box-sizing:border-box;margin:0;padding:9% 9% 10%;min-height:0;border:1px solid #c5b68f;border-radius:5px 1px 1px 5px;background-color:#f3e5c6;background-image:linear-gradient(90deg,#fff8e529,#f0dfbb08 80%,#70563120),url('assets/travel-book-open-v2.webp');background-position:center,12% center;background-size:100% 100%,235% 122%;background-repeat:no-repeat;backface-visibility:hidden;opacity:1;overflow:hidden}
.book-stage .journal-leaf:nth-child(2){border-radius:1px 5px 5px 1px;background-position:center,88% center;background-image:linear-gradient(90deg,#70563120,#f0dfbb08 20%,#fff8e529),url('assets/travel-book-open-v2.webp')}
.book-stage .journal-leaf:first-child{transform-origin:right center;transition:transform .85s cubic-bezier(.3,.05,.2,1)}
.book-stage.is-closed .journal-leaf:first-child{transform:rotateY(180deg);pointer-events:none}
.book-stage.is-closed .journal-tabs,.book-stage.opening .journal-tabs{visibility:hidden}
.book-stage .book-cover{position:absolute;left:50%;top:0;width:50%;height:100%;margin:0;padding:0;border:0;background:none;box-shadow:none;transform-origin:left center;transform-style:preserve-3d;z-index:5;border-radius:4px 10px 10px 4px;cursor:pointer;animation:none;opacity:1}
.book-cover-front,.book-cover-back{position:absolute;inset:0;display:block;backface-visibility:hidden;border-radius:4px 10px 10px 4px;overflow:hidden}
.book-cover-front{background:#765536;box-shadow:4px 8px 15px #34261e26}.book-cover-front img{position:absolute;inset:-3%;width:106%;height:106%;object-fit:fill;max-width:none}
.book-cover-front strong{position:absolute;top:38%;left:5%;width:90%;font:500 34px/1.2 var(--serif);letter-spacing:.01em;color:#ead7ac;text-shadow:0 1px 2px #2f1d12}
.book-cover-front small{position:absolute;bottom:23%;left:5%;width:90%;font-size:11px;color:#e6d3ad}
.book-cover-back{transform:rotateY(180deg);background:#e8d5ad;box-shadow:inset 8px 0 14px #6b4e3630;border:8px solid #795438}
.book-stage.is-closed .book-cover{animation:book-idle 4s ease-in-out infinite}
@keyframes book-idle{0%,70%,100%{transform:rotateY(0deg)}80%{transform:rotateY(-5deg)}90%{transform:rotateY(-1deg)}}
.book-stage .journal-leaf h3{font-size:23px;margin-bottom:14px}.book-stage .book-title-page{padding-top:5px}.book-stage .book-title-page h3{font-size:28px}
.book-stage .journal-leaf .page-number{bottom:12px}.book-stage .book-totals{margin:16px 0;gap:13px}.book-stage .station-stamps{gap:15px 12px;padding:10px 3px}.book-stage .station-stamp{background:transparent;box-shadow:none;border-color:currentColor;color:#98663c}.book-stage .station-stamp.stamp-silver{color:#6d7b83}.book-stage .station-stamp.stamp-gold{color:#9f7c20}
.book-stage .station-stamp h4,.book-stage .station-stamp small,.book-stage .station-stamp time{color:inherit}
.book-tab.previous{left:-25px}.book-tab.next{right:-25px}.book-stage .turning-leaf{z-index:6;margin:0;padding:4.5% 4.5% 5%;pointer-events:none;box-shadow:0 4px 12px #39261933;transition:none}
.chat-panel{top:auto;bottom:18px;right:18px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}
.chat-panel header{cursor:move;touch-action:none;user-select:none}.chat-panel header:focus-visible{outline:2px solid #698867;outline-offset:-3px}
/* Local community prototype. */
.forum-page{max-width:1040px}.forum-toolbar{display:flex;gap:20px;justify-content:space-between;align-items:end;margin:22px 0}.forum-toolbar label{display:grid;gap:6px;font-size:11px}.forum-toolbar select{margin:0;min-width:200px}
.forum-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.forum-card,.forum-topic,.forum-reply{background:#fcfaf3;border:1px solid #dce2d3;border-radius:14px;padding:22px}.forum-card>small{font-size:10px;color:#74856b}.forum-card h2{margin:10px 0;font:500 23px/1.3 var(--serif)}.forum-card h2 button{text-align:left;font:inherit;color:var(--ink);padding:0}.forum-card>p{font-size:12px;line-height:1.6;color:#7a8570;overflow-wrap:anywhere}
.forum-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:#8b9680;font-size:10px}.forum-meta>span,.forum-author{display:inline-flex;align-items:center;gap:5px}.forum-author{font-size:11px}.forum-topic h2{font:500 30px/1.25 var(--serif);margin:0 0 12px;overflow-wrap:anywhere}.forum-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:14px}.forum-actions{display:flex;gap:14px;justify-content:end}.forum-actions button{font-size:11px}.forum-replies{display:grid;gap:12px}.forum-replies-title{font:500 22px var(--serif);margin:25px 0 12px}#forum-reply-form{margin-top:22px}#forum-form label{display:grid;gap:7px;margin-bottom:15px;font-size:12px}#forum-form textarea,#forum-reply-form textarea{width:100%;resize:vertical;min-height:85px;padding:12px;background:#fffcf5;border:1px solid #cfd8c4;border-radius:9px;font:inherit}#forum-reply-form button{margin-top:10px}
@media(max-width:1000px){.cab-dashboard{grid-template-columns:34px minmax(310px,430px) minmax(145px,190px);gap:11px}.driving-controls{grid-template-columns:minmax(130px,1fr) 175px}.cab-lever{width:175px}.book-stage .journal-leaf h3{font-size:21px}}
@media(max-width:650px){.rail-workspace main,.in-journey .rail-workspace main{padding-top:65px}.rail-workspace .module-heading h1,.rail-workspace .studio-heading h1,.rail-workspace .page-heading h1{font-size:26px}.cab-dashboard{grid-template-columns:34px minmax(0,1fr);gap:9px}.driving-controls{grid-column:2;grid-template-columns:minmax(100px,1fr) 140px;min-height:190px;padding:10px;gap:5px}.cab-lever{width:140px}.cab-dashboard .ride-tools{grid-column:1;grid-row:1}.drive-modes button{padding:5px;font-size:10px}.travel-readouts{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.travel-readouts>div:first-child{grid-column:1/-1}.travel-readouts .arrival-readout{grid-column:2;grid-row:2}.announcement-space{min-height:50px;margin-bottom:12px}.announcement-card{flex-wrap:wrap}.forum-list{grid-template-columns:1fr}.forum-toolbar{gap:10px;align-items:center}.forum-toolbar select{min-width:0;width:100%}.forum-toolbar .button{font-size:11px}.forum-card,.forum-topic,.forum-reply{padding:17px}.chat-panel{top:auto;bottom:10px;right:8px;height:320px;max-height:65dvh}
.illustrated-book .modal-body{padding:12px 25px 30px}.book-stage{max-width:380px;margin:auto}.book-stage.is-closed{transform:none}.book-stage .journal-spread{display:block;aspect-ratio:auto;min-height:400px}.book-stage .journal-leaf{min-height:400px;padding:35px 30px;border-radius:5px;background-size:100% 100%,235% 122%}.book-stage.is-closed .journal-leaf:first-child{display:none}.book-stage.opening .journal-leaf:first-child{display:none}.book-stage .book-cover{left:0;width:100%;height:400px}.book-stage .journal-leaf+.journal-leaf{margin-top:0;padding-top:35px}.book-stage .station-stamps{max-width:300px;margin:auto}.book-stage .turning-leaf{padding:35px 30px}.book-stage .journal-leaf:first-child{transition:none}.book-cover-front strong{font-size:30px}}
@media(prefers-reduced-motion:reduce){.book-stage,.book-stage .journal-leaf:first-child{transition:none}.book-stage.is-closed .book-cover{animation:none}}
.reduce-motion .book-stage,.reduce-motion .book-stage .journal-leaf:first-child{transition:none}.reduce-motion .book-stage.is-closed .book-cover{animation:none}

.book-cover-front{background:transparent;box-shadow:none}.book-cover-front strong{top:26%}.book-stage.is-closed .journal-spread{visibility:hidden;box-shadow:none}
.rail-app .rail-workspace main{max-width:1040px;margin-inline:auto;padding-top:28px}
.rail-app.in-journey .rail-workspace main{padding-top:28px}
.journey-follow>.module-heading{margin-left:-40px;margin-right:-40px}
@media(min-width:1001px){.driving-controls{grid-template-columns:minmax(145px,1fr) 230px}.cab-lever{width:230px}}
@media(max-width:1000px){.journey-follow>.module-heading{margin-left:-20px;margin-right:-20px}}
@media(max-width:650px){.rail-app .rail-workspace main,.rail-app.in-journey .rail-workspace main{padding-top:65px}.journey-follow>.module-heading{margin-left:0;margin-right:0}}
.illustrated-book .modal-body{padding:12px 32px 25px!important}
.book-stage .station-stamp{outline-color:currentColor;outline-width:1px;outline-offset:-5px}
@media(max-width:650px){.illustrated-book .modal-body{padding:10px 24px 22px!important}}
@media(min-width:651px) and (max-height:800px){
 .journey-follow>.module-heading{margin-bottom:8px}.journey-follow .journey-reference{margin:4px 0;font-size:10px}.journey-follow .travel-status{margin:0;min-height:16px;line-height:16px}
 .journey-follow .announcement-space{min-height:40px;margin:0 0 10px}.journey-follow .driving-controls{grid-template-rows:84px auto 36px;min-height:184px;padding-top:9px;padding-bottom:9px}.journey-follow .cab-lever{margin-top:0}
 .journey-follow .travel-route{margin-top:10px}.journey-follow .arrival-actions{margin-top:8px}
}
@media(min-width:651px) and (max-height:800px){.in-journey .rail-footer{display:none}.rail-app.in-journey .rail-workspace main{min-height:100dvh;padding-bottom:6px}}
