:root{--paper:#f6ebcc;--paper-light:#fff5d9;--ink:#382720;--muted:#766244;--wood:#573526;--rust:#9d4e37;--green:#295e58;--water:#164751;--line:#d6b986}
*,*::before,*::after{box-sizing:border-box}
body{font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;background:#f4e8c9;background-image:repeating-linear-gradient(0deg,rgba(98,57,27,.024) 0,rgba(98,57,27,.024) 1px,transparent 1px,transparent 5px);min-width:280px}
button,select{font:inherit;color:inherit}
button{cursor:pointer}
button[disabled],select[disabled]{cursor:default;opacity:.58}
button:focus,select:focus,canvas:focus{outline:2px solid #ca773e;outline-offset:2px}
button:active:not(:disabled){transform:translateY(1px)}
p,h1,h2{margin:0}
.container{width:calc(100% - 56px);max-width:1390px;margin:0 auto}
.masthead{background:#ead5a8;border-bottom:3px solid #9b6947;box-shadow:0 2px 0 #ded0a9;padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}
.mast-inner,.intro,.frame-head,.map-foot,.panel-title,.action-row,.utility-row,.footer{display:flex;align-items:center;justify-content:space-between}
.mast-inner{height:69px}
.brand{display:flex;align-items:center}
.brand-icon{width:40px;height:40px;background:#32645b;border:2px solid #57382a;box-shadow:inset 0 0 0 2px #5b8271,0 2px 0 #a3754f;margin-right:12px;display:flex;align-items:center;justify-content:center}
.brand-icon img{width:24px;height:30px;object-fit:contain;image-rendering:pixelated}
.brand-name{font-weight:900;font-size:22px;letter-spacing:.08em;line-height:1.12}
.brand-sub{font:700 10px ui-monospace,monospace;letter-spacing:.19em;color:#796141;margin-top:4px}
.paper-button,.primary{border:2px solid #835a3b;background:#f1dca9;padding:8px 12px;box-shadow:inset 0 0 0 1px #faeac6,0 2px 0 #a27853;font-size:14px;font-weight:700;white-space:nowrap}
.paper-button:hover:enabled{background:#ffe9b5}
.paper-button.small{font-size:12px;padding:6px 9px}
.primary{background:#2a665c;border-color:#274339;color:#fff4d5;box-shadow:inset 0 0 0 1px #6b9480,0 3px 0 #243f35;min-height:44px}
.primary:hover:enabled{background:#38766a}
.primary span{margin-left:7px}
.intro{min-height:111px;padding:18px 0}
.intro h1{font-family:"Songti SC","Noto Serif CJK SC","STSong",serif;font-size:40px;font-weight:900;line-height:1.24;letter-spacing:.055em}
.intro p{color:#785f42;font-size:14px;margin-top:8px}
.live-tag{background:#eadcb5;border:1px solid #c3a16c;color:#6b5334;padding:6px 10px;white-space:nowrap;font-size:12px}
.live-tag i{display:inline-block;width:7px;height:7px;background:#66907a;margin:0 4px 1px 0}
.workspace{display:flex;align-items:flex-start}
.frame{border:3px solid var(--wood);background:var(--paper-light);box-shadow:0 4px 0 #c19a68;position:relative}
.map-frame{flex:1;min-width:0;margin-right:18px}
.sidebar{width:330px;flex:none}
.frame-head{background:#4a3328;color:#ffe9b6;height:48px;padding:0 12px;border-bottom:2px solid #a67c4d}
.frame-title{font-size:15px;font-weight:800;letter-spacing:.06em;white-space:nowrap}
.glyph{color:#d6a651;font-size:15px;margin-right:5px}
.tabs{display:flex;align-items:center}
.tabs button{padding:6px 11px;font-size:12px;background:#584033;color:#efdcb3;border:1px solid #876446;white-space:nowrap}
.tabs button+button{margin-left:3px}
.tabs button[aria-pressed=true]{background:#ecd4a0;color:#4a3023;border-color:#f5e6bd;font-weight:750}
.stage{position:relative;background:#214950;min-height:410px;height:calc(100vh - 281px);max-height:710px}
.chart-view,.scene{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden}
canvas{height:100%;width:100%;display:block;touch-action:none;cursor:crosshair}
.north{position:absolute;left:16px;top:14px;color:#f1d698;text-align:center;font:700 13px Georgia,serif;line-height:1;pointer-events:none;text-shadow:0 1px 1px #143740}
.north b{display:block;font-size:34px}
.zoom{display:flex;flex-direction:column;position:absolute;right:12px;bottom:14px;box-shadow:0 2px 0 #142e32}
.zoom button{font:700 23px ui-monospace,monospace;width:39px;height:37px;background:#ebd8aa;border:2px solid #624631;padding:0;line-height:1}
.zoom button+button{border-top:0}
.zoom button:hover{background:#ffefc4}
.scale{position:absolute;left:15px;bottom:15px;color:#efdcb3;font:700 10px ui-monospace,monospace;pointer-events:none;text-shadow:0 1px 1px #153a42}
.scale b{display:block;border:1px solid;border-top:0;height:5px;width:50px;margin-bottom:4px}
.recenter{position:absolute;right:62px;bottom:14px}
.status{position:absolute;left:50%;bottom:13px;transform:translateX(-50%);background:#213d3e;color:#fff1c8;box-shadow:0 2px 0 #133639;padding:8px 10px;font-size:12px;border:1px solid #84a094;max-width:calc(100% - 151px);text-align:center;pointer-events:none}
.map-foot{background:#e8d2a4;border-top:2px solid #a67c4d;padding:10px 12px;min-height:42px;font-size:11px;color:#6d5034}
.legend{display:flex;flex-wrap:wrap}
.legend span{margin-right:13px;white-space:nowrap}
.legend i{display:inline-block;width:10px;height:5px;margin-right:3px;vertical-align:1px}
.legend-river{background:#277981}.legend-track{background:#b46f34}.legend-lit{background:#e4a546}
#coords{white-space:nowrap;font-family:ui-monospace,monospace;font-size:10px}
.scene{background:#294f54 url('./art/sea.webp') center center / cover no-repeat;image-rendering:pixelated}
.scene.river{background-image:url('./art/river.webp')}
.scene-effect{position:absolute;inset:0;background:linear-gradient(180deg,rgba(18,49,49,.18),transparent 36%,rgba(12,36,41,.30))}
.scene-caption,.scene-readout{position:absolute;color:#fff0c6;text-shadow:0 2px 0 #2d453b;background:#2b403d;border-left:3px solid #dca967;padding:8px 12px}
.scene-caption{top:19px;left:19px;min-width:130px}
.scene-caption span{display:block;font-size:11px;letter-spacing:.08em;color:#d2d0aa}
.scene-caption strong{display:block;margin-top:3px;font-size:19px}
.scene-readout{left:19px;bottom:19px;font-size:12px}
.floating-bottle{position:absolute;left:50%;bottom:20%;width:71px;height:87px;object-fit:contain;image-rendering:pixelated;transform-origin:50% 75%;animation:bob 3.6s infinite ease-in-out}
@keyframes bob{0%,100%{transform:translate(-50%,0) rotate(-16deg)}50%{transform:translate(-40%,-11px) rotate(-8deg)}}
.scene.still .floating-bottle{animation-play-state:paused}
.panel{margin-bottom:14px}
.panel-title{min-height:45px;background:#e8d2a4;border-bottom:2px solid #bc9666;padding:0 11px;justify-content:flex-start}
.panel-title h2{font-size:16px;letter-spacing:.04em}
.panel-body{padding:14px}
.muted{font-size:13px;color:#786548;line-height:1.55;margin-bottom:13px}
.field-label{display:block;font-size:12px;font-weight:700;margin:0 0 6px;color:#624832}
select{display:block;border:1px solid #b99766;background:#f9edcd;width:100%;min-height:39px;padding:6px 8px;border-radius:0;font-size:13px}
.selection{margin:12px 0;background:#f1e1b7;border-left:3px solid #b89460;padding:9px 10px}
.selection strong,.selection span{display:block}
.selection strong{font-size:13px}
.selection span{font-size:11px;margin-top:4px;color:#765e40;line-height:1.5}
#month{margin-bottom:10px}
.action-row>*:first-child{flex:1;min-width:0}
.action-row>*+*{margin-left:7px}
.metrics{display:flex;border-bottom:1px solid var(--line);padding:0 0 10px}
.metrics>div{flex:1;min-width:0}
.metrics>div+div{border-left:1px solid var(--line);padding-left:12px}
.metrics span,.current-place span{display:block;color:#7a6546;font-size:11px;margin-bottom:4px}
.metrics strong{font:800 19px ui-monospace,monospace;color:#31554b}
.current-place{margin:11px 0}
.current-place strong{display:block;font-size:14px}
.current-place small{display:block;margin-top:4px;color:#7a6546;font-size:11px}
.utility-row{justify-content:flex-start;flex-wrap:wrap;margin-top:10px}
.utility-row>*+*{margin-left:12px}
.text-button{border:0;background:transparent;padding:4px 0;color:#774b31;text-decoration:underline;font-size:12px}
.tab-count{font:700 12px ui-monospace,monospace;margin-left:auto;background:#f4e3ba;border:1px solid #b38a55;min-width:25px;text-align:center;padding:4px}
.journal-empty{padding:17px 12px;display:flex;align-items:center;font-size:13px;font-weight:700}
.journal-empty small{font-weight:400;font-size:11px;color:#7a6546;display:block;margin-top:5px}
.stamp{border:1px dashed #b58a58;color:#9b7349;font-size:24px;width:40px;height:38px;flex:none;line-height:34px;text-align:center;margin-right:10px}
.welcome{background:#eee0b4;margin:10px 10px 0;padding:8px 9px;font-size:12px;color:#654a2d}
.visits{list-style:none;margin:0;max-height:260px;overflow:auto;padding:0 10px}
.visits li{border-bottom:1px dashed #d9c492}
.visits li:last-child{border-bottom:0}
.visits button{width:100%;display:flex;justify-content:space-between;padding:8px 2px;background:transparent;border:0;font-weight:700;text-align:left;font-size:12px}
.visits button span{font-size:10px;color:#776047;margin-left:8px;font-weight:400}
.visits .fresh{color:#a45832}
.footer{padding:14px 0 22px;color:#776042;font-size:11px;padding-bottom:calc(22px + env(safe-area-inset-bottom))}
.overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(35,33,25,.62);z-index:8;display:flex;align-items:center;justify-content:center;padding:16px}
.dialog{width:100%;max-width:460px}
.dialog .panel-title button{margin-left:auto}
.dialog p{line-height:1.7;font-size:14px}
.dialog p+p{margin-top:9px}
.dialog-actions{padding:0 14px 14px}
@media(max-width:900px){.container{width:calc(100% - 32px)}.sidebar{width:276px}.map-frame{margin-right:12px}.intro h1{font-size:35px}}
@media(max-width:700px){.container{width:calc(100% - 20px)}.mast-inner{height:55px}.brand-icon{width:34px;height:34px;margin-right:8px}.brand-icon img{width:21px;height:26px}.brand-name{font-size:18px}.brand-sub{font-size:9px}.intro{min-height:84px;padding:11px 0}.intro h1{font-size:29px}.intro p{font-size:12px;margin-top:4px}.live-tag{padding:4px;font-size:10px;margin-left:4px}.workspace{display:block}.map-frame{margin:0 0 13px}.sidebar{width:100%}.stage{height:43vh;min-height:235px;max-height:440px}.frame-head{height:40px;padding:0 7px}.frame-title{font-size:13px}.tabs button{padding:5px 7px}.map-foot{min-height:35px;padding:6px}.legend span{margin-right:6px}.legend{font-size:10px}.north{left:10px;top:10px}.zoom{right:7px;bottom:9px}.zoom button{width:32px;height:32px}.recenter{right:45px;bottom:9px}.scale{left:8px;bottom:9px}.panel-title{min-height:38px}.sidebar .panel-body{padding:10px}.footer{align-items:flex-start;font-size:10px}.floating-bottle{width:47px;height:64px}.scene-caption{left:10px;top:10px}.scene-readout{left:10px;bottom:10px}}
@media(max-width:370px){#coords{display:none}.intro h1{font-size:25px}.intro p{font-size:11px}}
@media(prefers-reduced-motion:reduce){.floating-bottle{animation:none}}

.launch-art{height:79px;background:#294f54 url('./art/river.webp') center 55% / cover no-repeat;border-bottom:2px solid #b48b5e;image-rendering:pixelated}
@media(max-width:700px){.launch-art{height:52px}}
