#story{padding:28px 0}.story-letter{border:1px solid #d4c5a9;background:linear-gradient(115deg,#efe5d3,#faf5e9);padding:28px 30px;position:relative}.story-heading{display:flex;gap:18px;align-items:center}.portrait{flex-shrink:0;display:grid;place-items:center;width:62px;height:74px;border-radius:50% 50% 40% 40%;background:#344e41;color:#ead4a5;border:4px double #c6a578;font:22px Georgia;box-shadow:0 4px 0 #d3c4a6}.story-heading h2{font-size:32px;margin:7px 0}.story-heading span:not(.portrait){font-size:11px;color:#81705a}.story-letter blockquote{margin:20px 0 12px;max-width:900px;font:17px/1.8 Georgia;color:#5f4f3a}.story-letter>p{font-size:12px;margin:8px 0 20px}.chapter-checks{display:flex;gap:18px;flex-wrap:wrap;padding:15px 0;margin:0;border-block:1px solid #d9ccb5;list-style:none;font-size:11px}.chapter-checks li::before{content:'○';color:#ad7b48;margin-right:7px}.chapter-checks li.done{color:var(--green)}.chapter-checks li.done::before{content:'✓'}.story-next{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-top:16px}.story-next p{margin:5px 0 0;font-size:12px}.story-next button{flex-shrink:0}.atlas-title h3{font-size:29px}.atlas-title p{font-size:12px;max-width:600px}.world-map{position:relative;margin-top:20px;border:6px double #b7a780;background:#ded9be;isolation:isolate}.world-map svg{display:block;width:100%;height:auto}.ocean-label{font:italic 12px Georgia;fill:#8b8e74;letter-spacing:3px}.map-port{position:absolute;display:flex;align-items:center;gap:8px;padding:0;background:transparent;color:#3d412e;transform:translate(-7px,-7px);border:0;text-align:left;z-index:2;min-height:28px;border-radius:20px}.map-port:hover{filter:none;z-index:3}.map-port:focus-visible{z-index:4}.port-dot{display:block;flex-shrink:0;width:14px;height:14px;border:3px solid #f9f0da;border-radius:50%;background:#8a5e39;box-shadow:0 0 0 1px #846342}.port-label{background:#f8f0deed;padding:6px 9px;border:1px solid #bdae8c;font:14px Georgia;white-space:nowrap;box-shadow:0 2px 6px #59452c15}.port-label small{display:block;font:7px 'DM Sans',sans-serif;letter-spacing:1px;margin-top:4px}.map-port.current .port-dot{background:var(--green);box-shadow:0 0 0 4px #344e4130}.map-port.objective .port-label{border-color:#a45532}.map-port.objective .port-label::before{content:'◇ ';color:var(--copper)}.map-port.selected .port-label{background:var(--green);color:#fff}.map-port.selected .port-label small{color:#ead4a5}.map-port.west{flex-direction:row-reverse;transform:translate(calc(-100% + 7px),-7px)}.map-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:9px;color:#7e735e;padding:13px 0;border-bottom:1px solid var(--line)}.map-legend span:last-child{margin-left:auto;font-style:italic}.port-booking{display:grid;grid-template-columns:1fr 185px;gap:22px;background:#ebe3d4;border:1px solid var(--line);padding:24px;margin-top:20px}.port-booking p{font-size:12px;margin-bottom:0}.port-booking .destination-note{color:var(--copper);font-weight:500}.passage{border-left:1px solid #d0c3ab;padding-left:20px;display:flex;flex-direction:column;gap:10px;justify-content:center}.passage strong{font:28px Georgia}.passage span{font-size:10px;color:#81725b}.passage button{font-size:11px}.chapter-entry{border-left:2px solid #c9bda5;margin:25px 0;padding:0 0 8px 20px}.chapter-entry.active{border-color:var(--copper)}.chapter-entry h4{margin-top:8px}.chapter-entry p{font-size:13px}.chapter-entry>span{font-size:10px;color:#7d715f}.story-journal{margin-bottom:35px}.chapter-scene{max-width:570px;border:7px double #b9a079}.chapter-scene h2{font-size:34px}.chapter-scene p{font:18px/1.9 Georgia}.chapter-reward{border-block:1px solid var(--line);padding:16px 0;color:var(--copper);font-size:12px;margin:25px 0}.chapter-scene button{min-height:44px}
@media(max-width:800px){.story-letter{padding:22px}.story-heading h2{font-size:28px}.story-next{align-items:flex-start;flex-direction:column;gap:12px}.chapter-checks{gap:12px}.game-layout{margin-top:22px}.world-map{border-width:3px}.port-label{font-size:12px;padding:4px 6px}.port-label small{font-size:6px}.map-port{gap:4px}.map-legend span:last-child{margin-left:0}}
@media(max-width:500px){.story-letter{padding:18px}.story-heading{gap:12px}.portrait{width:45px;height:58px;font-size:17px}.story-heading h2{font-size:25px}.story-letter blockquote{font-size:15px}.chapter-checks{flex-direction:column}.story-next button{width:100%;font-size:11px}.port-booking{grid-template-columns:1fr;padding:18px}.passage{border-left:0;border-top:1px solid #d0c3ab;padding:16px 0 0}.port-label{font-size:10px}.port-label small{display:none}.port-dot{width:11px;height:11px;border-width:2px}.map-port.west{transform:translate(calc(-100% + 5px),-7px)}.map-port{min-height:36px}.map-legend{font-size:8px;gap:10px}.atlas-title h3{font-size:25px}}
.map-port.locked .port-label{background:#e7e1d1;color:#8c8676;border-style:dashed}.map-port.locked .port-dot{background:#b0a995}.port-picker{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.port-picker button{font-size:10px;padding:9px 12px;min-height:36px}.port-picker .chosen{background:var(--green);color:white}.factory-network{margin-top:30px}.factory-network>p{font-size:12px}.factory-card{border:1px solid var(--line);background:#eae3d6;margin:14px 0;padding:22px;display:grid;grid-template-columns:1fr 180px;gap:18px}.factory-card h4{margin-top:10px}.factory-card p{font-size:12px;margin-bottom:0}.factory-card>div:last-child{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:15px}.factory-card strong{font:26px Georgia}.factory-card .stamp{white-space:nowrap}@media(max-width:600px){.map-port .port-label{font-size:9px;padding:3px 4px}.map-port.locked .port-label{display:none}.factory-card{grid-template-columns:1fr}.factory-card>div:last-child{flex-direction:row;align-items:center;flex-wrap:wrap}.row{flex-wrap:wrap}.row .description{min-width:100px}.row button{margin-left:auto}}

@media(max-width:600px){.map-port:not(.selected) .port-label{display:none}.port-picker button{flex:1 1 42%;min-height:44px}.map-port.selected .port-label{display:block}}
.production-line{grid-column:1/-1;border-top:1px solid var(--line);padding-top:18px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.production-line label{font-size:12px}.production-line select{display:block;width:100%;padding:12px;margin-top:9px;background:#fffaf1;border:1px solid var(--line);color:var(--ink);font:14px Georgia;min-height:44px}.production-line strong{font:16px Georgia;color:var(--green)}.production-line button{min-height:44px;margin-top:10px}.production-report{margin-top:24px;padding:20px;border:1px solid #b4bea9;background:#e5e9dc}.production-report[hidden]{display:none}.production-report h3{font-size:23px}.production-report p{font-size:12px;margin:7px 0}@media(max-width:600px){.production-line{grid-template-columns:1fr}.production-line button{width:100%}}

.factory-card>div.production-line:last-child{display:grid;align-items:stretch;justify-content:normal;grid-template-columns:1fr 1fr;gap:20px}@media(max-width:600px){.factory-card>div.production-line:last-child{grid-template-columns:1fr}}

.freight-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:22px;background:#eae3d6;border:1px solid var(--line);margin:22px 0 30px}.freight-form label,.warehouse-office>label{font-size:12px;display:block}.freight-form select,.freight-form input,.warehouse-office>label select{display:block;width:100%;min-width:0;margin-top:8px;min-height:44px;padding:10px;background:#fffaf1;border:1px solid var(--line);color:var(--ink);font-size:14px}.freight-quote{grid-column:1/-1;font-size:12px;line-height:1.8;color:var(--green)}.freight-form button{grid-column:1/-1;min-height:44px}.shipping-office>p,.warehouse-office>p{font-size:12px}.shipment{border-left:2px solid var(--copper);padding:10px 18px;margin:15px 0}.shipment h4{margin:8px 0}.shipment p{font-size:12px}.warehouse-office{border-top:1px solid var(--line);margin-top:30px;padding-top:24px}.warehouse-office>h4{margin-top:22px}.warehouse-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid var(--line)}.warehouse-row strong{font:17px Georgia}.warehouse-row p{margin:5px 0 0;font-size:11px}.warehouse-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.warehouse-actions button{font-size:10px;min-height:36px;padding:8px 10px}@media(max-width:650px){nav[aria-label="Game views"]{flex-wrap:wrap}nav[aria-label="Game views"] button{flex:1 1 30%;min-height:44px}.freight-form{grid-template-columns:1fr;padding:16px}.warehouse-row{flex-direction:column;align-items:stretch}.warehouse-actions{justify-content:flex-start}.warehouse-actions button{min-height:44px;flex:1 1 auto}}

/* The journal and cargo notebook stay within reach of each gameplay screen. */
main > nav{position:sticky;top:0;z-index:5;background:var(--paper)}
#screen-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;padding:16px 22px;background:#ebe1cd;border:1px solid var(--line)}
#screen-banner h2{font-size:clamp(24px,4vw,42px);margin:4px 0}
#screen-banner p{margin:0}
.scene-art{display:block;width:min(240px,100%);height:auto;margin:0 auto 8px}
#screen-banner .scene-art{width:clamp(80px,22vw,190px);margin:0}
.story-notebook,.travel-notebook{border:1px solid var(--line);padding:12px;margin-bottom:12px}
.story-notebook{margin-top:12px}
.story-notebook summary,.travel-notebook summary{cursor:pointer;font-weight:700;color:var(--green)}
.travel-notebook[open] summary{margin-bottom:16px}
.action-scene{max-height:85vh;overflow:auto}
.scene-receipt{text-align:left;padding-left:22px}
.scene-receipt li{margin:8px 0}
#temper-art .scene-art{width:150px;margin-bottom:0}
.action-scene .scene-ship{animation:sail-in 1.2s ease-out both}
.action-scene .scene-pop,.chapter-scene .scene-pop,#temper-art .art-chocolate .scene-pop{transform-origin:center;animation:scene-pop .45s ease-out both}
#temper-art .scene-stir{transform-origin:116px 55px;animation:stir .7s ease-in-out 3 alternate}
@keyframes sail-in{from{transform:translate(-100px,4px)}60%{transform:translate(12px,-4px)}to{transform:translate(0,0)}}
@keyframes scene-pop{from{transform:translateY(8px) scale(.82);opacity:.4}to{transform:none;opacity:1}}
@keyframes stir{from{transform:rotate(-16deg)}to{transform:rotate(16deg)}}
@media(prefers-reduced-motion:reduce){.scene-art *{animation:none!important}}

.screen-picker{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.screen-picker button[aria-pressed=false]{background:#e8dfce;color:var(--green)}
.screen-picker button,#screen-banner button{min-height:44px}
#screen-banner button{margin-top:8px}
#screen-banner,#story-notebook{scroll-margin-top:110px}
