:root{--bg:#172625;--panel:rgba(21,31,28,.96);--cream:#efe2bf;--muted:#a7af9f;--brass:#9c8151;--line:#5f6048;--accent:#d7ba78}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--cream);font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif}header{height:54px;display:flex;align-items:center;gap:24px;padding:0 22px;background:#192420;border-bottom:1px solid var(--brass);position:relative;z-index:5;box-shadow:0 2px 12px #0007}.brand{font:24px Georgia,serif;letter-spacing:6px;color:var(--cream);text-decoration:none;white-space:nowrap}.compass{font:40px Georgia,serif;color:var(--accent);vertical-align:middle;margin-right:14px}.edition{margin:auto;font:16px Georgia,serif}.edition span{margin:0 12px;color:var(--brass)}button,input{font:13px/1.35 system-ui,sans-serif}button{background:#26302a;color:var(--cream);border:1px solid var(--brass);padding:9px 15px;cursor:pointer;border-radius:2px;transition:background .15s}button:hover{background:#3d4938}button:disabled{opacity:.5;cursor:wait}button[aria-pressed=true]{border-color:var(--accent);background:#3b4430}button:focus-visible,input:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:2px}#sea{position:relative;height:calc(100% - 54px)}#map{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}.panel{background:var(--panel);border:1px solid var(--brass);box-shadow:0 3px 16px #0006; border-radius:3px}.minimap{position:absolute;right:18px;top:18px;width:224px;padding:6px}.panel-title{font:17px Georgia,serif;display:flex;justify-content:space-between;width:100%;padding:7px 6px 9px;border:0;border-bottom:1px solid var(--line);background:none}.panel-title span{font:12px system-ui;color:var(--accent)}#mini{display:block;width:210px;height:166px;background:#102e3c}.zoom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:6px}.zoom button{padding:3px 14px;font-size:19px}.zoom output{font-size:11px;color:var(--muted)}.ship{position:absolute;bottom:24px;left:18px;width:350px;padding:15px}h1,h2{font-family:Georgia,serif;font-weight:400;margin:0}h1{font-size:26px}h2{font-size:23px}.muted{color:var(--muted);font-size:12px;margin:3px 0 8px}.ship-body{border-top:1px solid var(--line);display:flex;align-items:center;gap:15px;padding-top:12px}.ship-body canvas{width:104px;height:100px;object-fit:contain}.ship-body>div{flex:1}.ship-body button{display:block;width:100%;margin-top:5px;padding:7px}#shipStatus{font-size:13px;color:var(--accent)}#islandInfo{border-top:1px solid var(--line);padding-top:10px;margin:12px 0 0;font-size:12px}.hint{font-size:10px;color:var(--muted);margin:8px 0 0}.chat{position:absolute;bottom:24px;right:18px;width:350px;padding:8px 12px 12px}.chat ol{list-style:none;padding:0;margin:10px 0;height:104px;overflow-y:auto;font-size:12px;scrollbar-color:var(--line) transparent}.chat li{padding:3px 0;word-break:break-word}.chat strong{color:var(--accent);font-weight:500}.chat time{color:var(--muted);font-size:10px;margin-right:5px}.chat form{display:flex;gap:6px}input{width:100%;min-width:0;background:#182520;color:var(--cream);border:1px solid var(--line);padding:10px;border-radius:2px}input::placeholder{color:#979d8e}.chat.collapsed ol,.chat.collapsed form{display:none}.coordinates{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);padding:9px 16px;font:12px Georgia,serif;white-space:nowrap}#notice{position:absolute;top:20px;left:50%;transform:translateX(-50%);background:#182723e8;border:1px solid var(--line);padding:10px 18px;max-width:calc(100% - 520px);text-align:center;pointer-events:none;font-size:13px;opacity:0;transition:opacity .3s}#notice.show{opacity:1}.connection{position:absolute;top:12px;left:18px;color:#ccdbc5;background:#192621c9;padding:4px 8px;font-size:11px;border-radius:2px}.connection.offline{color:#f0b8a7}#loading{position:absolute;inset:0;background:#102e3cea;display:flex;align-items:center;justify-content:center;z-index:10}#loading[hidden]{display:none}.loading-box{padding:36px;text-align:center;max-width:520px;margin:20px}.loading-box .compass{display:block;margin:0 0 16px}.loading-box p{color:var(--muted)}dialog{max-width:440px;width:calc(100% - 32px);background:var(--panel);color:var(--cream);border:1px solid var(--brass);border-radius:3px;padding:25px}dialog::backdrop{background:#071515b8}dialog h2{margin-bottom:20px}dialog label{display:block;margin:12px 0}.check{display:flex;gap:10px;align-items:center}.check input{width:auto;accent-color:var(--brass)}.actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}#worldInfo{margin-top:16px;font-size:11px}@media(max-width:1100px){.edition{display:none}header #settings{margin-left:auto}.coordinates{bottom:6px}.ship,.chat{bottom:40px;width:290px}.ship-body canvas{width:72px}.brand{font-size:20px}.minimap{width:182px}#mini{width:168px;height:132px}#notice{max-width:calc(100% - 240px);left:20px;transform:none;top:44px}}@media(max-width:680px){header{height:48px;padding:0 12px;gap:8px}.brand{font-size:15px;letter-spacing:3px}.compass{font-size:28px;margin-right:4px}header button{font-size:11px;padding:7px}#sea{height:calc(100% - 48px)}.minimap{right:10px;top:10px;width:134px;padding:4px}.minimap .panel-title{font-size:12px;padding:4px}#mini{width:124px;height:98px}.zoom button{padding:1px 10px;font-size:16px}.ship{bottom:38px;left:10px;width:205px;padding:10px}.ship h1{font-size:21px}.ship-body{gap:8px;padding-top:6px}.ship-body canvas{width:48px;height:64px}.ship-body button{font-size:11px;padding:6px}.ship-body .muted{font-size:10px}#islandInfo{font-size:10px}.hint{display:none}.chat{bottom:38px;right:10px;width:calc(100% - 235px);min-width:124px;padding:6px}.chat .panel-title{font-size:13px}.chat ol{height:84px;font-size:10px}.chat form{flex-wrap:wrap}.chat button[type=submit]{width:100%;font-size:11px;padding:6px}.chat input{font-size:11px;padding:7px}.coordinates{font-size:10px;padding:6px;bottom:7px}.connection{left:10px;max-width:calc(100% - 155px);font-size:9px}#notice{font-size:11px;top:38px;left:10px;max-width:calc(100% - 155px);padding:6px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

dialog{max-height:90vh;overflow:auto}

.account-link{color:var(--cream);font-size:12px;text-decoration:none;margin-right:12px}.account-link:hover{color:var(--accent)}@media(max-width:680px){header .edition{display:none}.account-link{font-size:10px;margin-right:6px}}

@media(max-width:680px){header{gap:4px}.brand{font-size:13px;letter-spacing:1px}.account-link{font-size:9px;margin-right:2px}header button{padding:6px 5px;font-size:10px}header #settings{margin-left:auto}}

#shipToggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;border:0;background:none;font:inherit;text-align:left;color:inherit}#shipToggle span{font:17px system-ui;color:var(--accent)}.ship.collapsed{padding-top:12px;padding-bottom:12px}.ship.collapsed #shipContent{display:none}.ship.collapsed h1{font-size:20px}#shipContent[hidden]{display:none}

/* ALPHA 1.3.7: compact nautical chart */
.minimap.panel{width:280px;height:280px;padding:0;background:#041722;border:1px solid #c4a064;border-radius:0;overflow:hidden;box-shadow:0 3px 14px #0008}
#mini{width:100%;height:100%;background:#041722;touch-action:none;cursor:grab}#mini:active{cursor:grabbing}
#miniCoordinates{position:absolute;left:10px;top:9px;color:#7ef59c;font:14px Georgia,serif;background:#041722b8;padding:3px 5px;pointer-events:none}
.mini-controls{position:absolute;right:7px;bottom:7px;display:flex;gap:6px;background:#041722c9;padding:4px}
.mini-controls button{width:34px;height:34px;padding:0;border:1px solid #d1ac68;background:#071c27;color:#edc67f;font:28px Georgia,serif;display:grid;place-items:center}
.mini-controls button:hover,.mini-controls button[aria-pressed=true]{background:#243c3c}.mini-controls svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.4}
@media(max-width:1100px){.minimap.panel{width:220px;height:220px}}
@media(max-width:680px){.minimap.panel{width:164px;height:164px}#miniCoordinates{font-size:11px;left:4px;top:4px}.mini-controls{gap:4px;right:3px;bottom:3px;padding:2px}.mini-controls button{width:29px;height:29px;font-size:24px}.mini-controls svg{width:21px;height:21px}}

/* Compact helm, following the accepted six-slot reference. */
#helm{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);width:430px;max-width:calc(100% - 20px);padding:8px 10px 7px;background:linear-gradient(#132724f5,#0d1b1ef5);border:1px solid #9c8151;border-radius:7px 7px 2px 2px;box-shadow:0 3px 14px #0006;z-index:3}
.helm-health{height:4px;background:#7f3031;border-radius:3px;margin:0 42px;overflow:hidden}#helmHpFill{height:100%;width:0;background:#48c785}#helmHp{display:block;text-align:center;font:10px/15px system-ui;color:#eee}
.action-slots{display:flex;justify-content:center;gap:8px;margin:3px 0 6px}.action-slots span{width:34px;height:34px;flex:0 0 34px;border:1px solid #676347;background:linear-gradient(135deg,#26352f80,#14222180);box-shadow:inset 0 0 8px #0004}
.helm-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.helm-buttons button{height:32px;padding:1px 4px;font:10px Georgia,serif;background:#192a26;border-color:#9c8151}.helm-buttons button span{display:block;color:#dfbf78;font:17px/17px Georgia,serif}.helm-buttons button[aria-pressed=true]{background:#365344;box-shadow:inset 0 0 0 1px #bfa36d}.helm-buttons button:disabled{cursor:default;opacity:.55}
#cargoDialog{width:540px;max-width:calc(100% - 24px);max-height:75vh;padding:16px;background:#142322;border:1px solid #b89b64;box-shadow:0 12px 45px #0009}#cargoDialog::backdrop{background:#04101445}.cargo-title{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #615b40;padding-bottom:10px}.cargo-title h2{font-size:21px;margin:0}.cargo-title button{padding:0 9px;font-size:24px;background:transparent}.cargo-stats{display:flex;justify-content:space-between;gap:14px;font-size:11px;color:#b8baa8;margin:15px 0 9px}.cargo-stats strong{display:block;color:#eee4c9;font-size:14px;margin-top:3px}.cargo-meter{height:5px;background:#303c33;border-radius:3px;overflow:hidden}#cargoFill{height:100%;width:0;background:#bfa364}#cargoEmpty{text-align:center;color:#b8baa8;padding:24px 0;font-size:13px}.cargo-table-wrap{overflow:auto;max-height:40vh}#cargoTable{width:100%;border-collapse:collapse;font-size:12px;margin-top:12px}#cargoTable th{color:#c9b789;font-size:10px;font-weight:500;text-align:left}#cargoTable td,#cargoTable th{padding:8px 5px;border-bottom:1px solid #455046}#cargoTable small{display:block;color:#abb1a0;font-size:10px}#cargoTable td:not(:first-child){white-space:nowrap}
@media(max-width:1100px){#helm{width:300px}.action-slots{gap:7px}.action-slots span{width:32px;height:32px;flex-basis:32px}.helm-buttons{gap:5px}}
@media(max-width:680px){#helm{width:300px;bottom:8px}.chat{bottom:140px}.cargo-title h2{font-size:18px}.cargo-stats{gap:6px;font-size:10px}.cargo-stats strong{font-size:12px}}

.helm-buttons svg{width:20px;height:17px;fill:none;stroke:currentColor;stroke-width:1.2}
/* ALPHA 1.4.1: contextual boat orders and visual shared inventory */
.boat-menu{position:absolute;z-index:7;bottom:140px;left:50%;transform:translateX(-50%);width:310px;padding:12px}.boat-menu[hidden]{display:none}.boat-menu-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.boat-menu-head button{padding:2px 8px}.boat-menu #boatLaunchChoices,.boat-menu #boatCommands{display:grid;gap:6px}.boat-menu [hidden]{display:none!important}.boat-menu button{font-size:12px}.boat-menu button:disabled{opacity:.45;cursor:default}
#cargoDialog{width:min(980px,calc(100vw - 28px));max-height:90vh;padding:18px;background:#101e1e}#cargoType{color:#aa9a75;font-size:12px}.hold-visual{position:relative;margin:14px 0 8px;border:1px solid #806e4b;border-radius:3px;overflow:hidden;background:#051516}.hold-visual>img{display:block;width:100%;aspect-ratio:3/1;object-fit:cover}.hold-zones{position:absolute;left:9%;right:9%;bottom:11%;height:35%;display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.hold-zones button{align-self:stretch;border:1px solid transparent;background:transparent;color:#f5e4b4;text-shadow:0 2px 5px #000;font:13px Georgia;padding-top:55px}.hold-zones button:hover,.hold-zones button[aria-pressed=true]{border-color:#bfa571;background:#dac07b26;box-shadow:inset 0 0 24px #c7a26433}.hold-visual.boat-hold img{object-fit:contain;background:radial-gradient(ellipse,#27403d,#081818);aspect-ratio:4/1;height:170px}.hold-visual.boat-hold .hold-zones{display:none}.cargo-filter{display:flex;align-items:center;gap:12px;margin:10px 0}.cargo-filter span{flex:1;color:#bcac8a;font-size:12px}.cargo-filter button{padding:5px 10px;font-size:12px}#cargoDialog .cargo-table-wrap{max-height:25vh}.cargo-table-wrap button{font-size:11px;padding:3px 6px}.cargo-table-wrap td small{display:block}#itemDescription{font-size:12px;min-height:16px}.item-icon{margin-right:6px;color:#cfb276}
#transferDialog{width:min(960px,calc(100vw - 28px));max-height:85vh;padding:18px}.transfer-layout{display:grid;grid-template-columns:1fr 230px 1fr;gap:18px}.transfer-layout section{background:#0e191c;border:1px solid #77613e;padding:12px;min-width:0}.transfer-layout h3{color:#dac18b;font:18px Georgia;margin:0 0 10px}.transfer-layout section p{font-size:12px}.transfer-layout section div{max-height:45vh;overflow:auto}.transfer-layout .transfer-item{padding:8px 0;border-top:1px solid #78694655;font-size:12px;display:flex;justify-content:space-between;gap:6px}.transfer-layout label{display:grid;gap:5px;margin-bottom:12px;font-size:12px}.transfer-layout select,.transfer-layout input{width:100%;background:#132321;color:#eee;border:1px solid #8b7650;padding:8px}.transfer-layout form{padding-top:20px}#transferError{color:#e3ac84;font-size:12px}#transferSubmit{width:100%}.cargo-title h2{margin:0}
@media(max-width:680px){#cargoDialog{padding:12px}.hold-visual>img{aspect-ratio:2/1;object-fit:cover}.hold-zones{left:4%;right:4%;bottom:8%;height:43%;gap:0}.hold-zones button{font:10px system-ui;padding:45px 1px 1px}.cargo-filter{gap:6px;flex-wrap:wrap}.transfer-layout{grid-template-columns:1fr 1fr}.transfer-layout form{grid-column:1/-1;grid-row:2}.transfer-layout section div{max-height:18vh}#cargoDialog table{font-size:10px}#cargoDialog th,#cargoDialog td{padding:7px 3px}.boat-menu{bottom:132px;max-width:calc(100vw - 24px)}}

.wallet-bar{display:flex;gap:12px;font-size:12px;color:#d4be7c;white-space:nowrap}.wallet-bar output{color:#efe2bf;font-weight:700}@media(max-width:680px){.wallet-bar{gap:5px;font-size:10px}header{gap:6px}.brand{letter-spacing:2px}}
@media(max-width:680px){body>header{height:76px;flex-wrap:wrap;gap:4px 8px;padding:6px 10px;align-content:center}body>header .brand{font-size:13px;letter-spacing:1px}body>header .wallet-bar{flex-direction:column;gap:0;flex-shrink:0;line-height:14px;margin-left:auto}#sea{height:calc(100% - 76px)}}

/* Account header wraps independently of the sailing canvas. */
body{display:grid;grid-template-rows:auto minmax(0,1fr)}body>header{height:auto;min-height:56px;flex-wrap:wrap}#sea{height:auto;min-height:0}@media(max-width:680px){body>header{height:auto;min-height:76px}#sea{height:auto}.account-link{font-size:11px}}

/* Up to five transparent notices, each expiring independently after 3 seconds. */
#notice{top:16px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:6px;width:min(560px,calc(100% - 24px));max-width:calc(100% - 24px);padding:0;background:transparent;border:0;box-shadow:none;opacity:1;transition:none;pointer-events:none;z-index:25;color:#fff;font-size:13px}#notice:empty{display:none}.game-notice{max-width:100%;padding:3px 8px;background:transparent;border:0;box-shadow:none;color:#fff;text-align:center;overflow-wrap:anywhere;text-shadow:0 1px 3px #000,0 0 4px #000;font-weight:500;line-height:1.4}@media(max-width:680px){#notice{top:12px;font-size:12px;gap:4px}}

.game-notice{white-space:pre-line}.game-notice.notice-panel{background:rgba(12,28,34,.92);border:1px solid #b99a63;border-radius:6px;padding:10px 16px}.game-notice.notice-center,.game-notice.notice-bottom{position:fixed;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px)}.game-notice.notice-center{top:calc(50vh - 16px)}.game-notice.notice-bottom{top:calc(100vh - 180px)}

.game-notice{opacity:1;transition:opacity var(--notice-fade,1s) ease;will-change:opacity}.game-notice.notice-fading{opacity:0}.game-notice.notice-center{margin-top:var(--notice-offset,0px)}.game-notice.notice-bottom{margin-top:calc(-1 * var(--notice-offset,0px))}

.settings-tabs{display:flex;gap:8px;margin:16px 0}.settings-tabs button{flex:1}#settingsDialog section[hidden]{display:none}#settingsDialog input[type=range]{padding:0;accent-color:var(--accent)}#settingsDialog output{float:right;color:var(--accent)}

#settingsDialog select{width:100%;background:#182520;color:var(--cream);border:1px solid var(--line);padding:10px;margin-top:5px}
