:root {
  color-scheme: dark;
  --paper: #faf0d7; --gold: #e7c484; --soft: #a6b4ac;
  --line: rgba(236, 197, 130, .27); --deep: #0b1a20;
  --brass: #ad8857; --gilt: #f2d49a;
  --serif: Georgia, 'Times New Roman', serif;
  --ui: 'Segoe UI', Roboto, Arial, sans-serif;
  --left: max(22px, env(safe-area-inset-left));
  --right: max(22px, env(safe-area-inset-right));
  --top: max(17px, env(safe-area-inset-top));
  --bottom: max(19px, env(safe-area-inset-bottom));
  --radar-size: clamp(150px, 14.5vw, 210px);
  --radar-rim: clamp(18px, 1.4vw, 24px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; margin: 0; }
body { background: #102c35; color: var(--paper); font: 14px var(--ui); user-select: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid #f5d7a0; outline-offset: 3px; }
button:disabled { cursor: default; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.symbols { display: none; }
#world, .grain { position: fixed; inset: 0; width: 100%; height: 100%; }
#world { touch-action: none; }
#world:focus { outline: 0; }
.grain { pointer-events: none; background: radial-gradient(ellipse at 57% 41%, transparent 36%, #03111b25 66%, #020d16a0 120%); box-shadow: inset 0 0 80px #01101924; }
.masthead { position: fixed; inset: var(--top) var(--right) auto var(--left); display: flex; justify-content: space-between; align-items: center; z-index: 2; pointer-events: none; }
.brand { display: flex; gap: 11px; align-items: center; color: var(--paper); font: 700 13px var(--serif); letter-spacing: .21em; text-transform: uppercase; text-shadow: 0 2px 12px #01090d; }
body:not(.sailing) .masthead { visibility: hidden; }
.mark, .ship-emblem { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #b994598c; color: var(--gold); background: #09171ccc; }
.mark { transform: rotate(45deg) scale(.82); }
.mark svg { transform: rotate(-45deg); }
@media (any-pointer: fine) {
  html { cursor: url('/art/compass-cursor.png') 2 2, auto; }
  button:not(:disabled), a, input[type="range"]:not(:disabled), select:not(:disabled) {
    cursor: url('/art/compass-cursor-active.png') 2 2, pointer;
  }
  #world { cursor: url('/art/compass-cursor.png') 2 2, crosshair; }
}
#landing {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; display: flex; align-items: center;
  padding: 27px clamp(22px, 5.8vw, 138px); isolation: isolate;
}
.landing-shade {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg,#05131bed 0%,#071922a8 33%,transparent 66%),
    linear-gradient(0deg,#050d14a8,transparent 35%),url('/art/landing-frigate.webp') 58% 50% / cover, #0b1c26;
}
body.sailing .landing-shade {
  background: linear-gradient(90deg,#051319fa 0%,#071a23e8 24%,#0a263154 62%,#06151e26 100%),
    linear-gradient(0deg,#040e17c9,transparent 42%);
  backdrop-filter: blur(1.5px);
}
body:has(#landing:not([hidden])) .masthead { visibility: hidden; }
.landing-frame { position: absolute; z-index: -1; inset: clamp(9px, 1.6vw, 27px); border: 1px solid #eac28744; box-shadow: 0 0 0 4px #03131d5c; }
.landing-frame::before, .landing-frame::after { content: ''; position: absolute; width: clamp(19px, 4vw, 55px); height: clamp(19px, 4vw, 55px); border: solid #f0c985c9; }
.landing-frame::before { inset: -1px auto auto -1px; border-width: 2px 0 0 2px; }
.landing-frame::after { inset: auto -1px -1px auto; border-width: 0 2px 2px 0; }
.landing-content { min-width: 0; max-width: 100%; pointer-events: auto; }
.landing-crest { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 13px; width: clamp(160px, 21vw, 335px); color: #eac38a; }
.landing-crest svg {
  width: clamp(35px, 4vw, 55px); height: auto; aspect-ratio: 1; padding: clamp(6px, 1vw, 11px);
  border: 1px solid #dfbd7ea6; border-radius: 50%; background: #112731cc;
  box-shadow: inset 0 0 0 3px #09212b, inset 0 0 0 4px #bc92534d, 0 5px 17px #020e16aa;
}
.landing-crest span { position: relative; height: 1px; background: linear-gradient(90deg,transparent,#dcb273d9); }
.landing-crest span::after { content: ''; position: absolute; top: -2px; right: 7px; width: 4px; height: 4px; transform: rotate(45deg); background: #d6aa6a; }
.landing-crest span:last-child { transform: scaleX(-1); }
#charter { width: min(386px, 72vw); }
#main-menu { display: grid; gap: 9px; width: clamp(325px, 40vw, 530px); max-width: 100%; margin-top: clamp(18px, 4.5vh, 46px); }
.menu-button {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; width: 100%; min-height: 65px;
  padding: 9px 11px; text-align: left; color: #f8e7c1; border: 1px solid #c5a97966; border-radius: 5px;
  background: linear-gradient(109deg,#244347f0,#0e2530ec 75%); box-shadow: inset 0 0 0 2px #d8bd8113, 0 5px 17px #030b14a6;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.menu-sail {
  grid-template-columns: auto minmax(0,1fr) auto; min-height: 82px; gap: 15px; padding-inline: 14px;
  color: #241b13; border-color: #ffde9c; background: linear-gradient(115deg,#e8b569,#f6dba6 54%,#c48e52);
  box-shadow: inset 0 0 0 3px #77472245, inset 0 0 0 4px #fff3cf78, 0 9px 26px #040c13b5;
}
.menu-tools { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 8px; }
.menu-button strong { display: block; font: 700 clamp(16px,1.7vw,21px)/1.1 var(--serif); }
.menu-sail strong { font-size: clamp(24px,2.55vw,37px); }
.menu-button small { display: block; margin-top: 3px; color: #ded5bd; font-size: 11px; }
.menu-sail small { color: #4b331e; font-size: 12px; font-weight: 650; }
.menu-glyph { display: grid; place-items: center; width: 34px; height: 34px; color: #f1d49a; background: #0a202b; border: 1px solid #d6ba8a63; border-radius: 50%; }
.menu-sail .menu-glyph { width: 45px; height: 45px; color: #ffe6b1; background: #4b3523; border-color: #734721; box-shadow: inset 0 0 0 3px #a077415b; }
.menu-glyph svg { width: 18px; height: 18px; }
.menu-sail .menu-glyph svg { width: 24px; height: 24px; }
.menu-arrow { color: #5b3b21; font: 38px/1 var(--serif); padding-right: 4px; }
.menu-button:hover:not(:disabled) { border-color: #ffdf9d; box-shadow: inset 0 0 0 2px #efd39a46, 0 0 19px #dcb46c4c; }
.menu-sail:hover:not(:disabled) { background: linear-gradient(115deg,#f2c784,#ffe7b9 55%,#dca669); }
.menu-button:focus-visible, .menu-link:focus-visible { outline: 2px solid #f7d89c; outline-offset: 3px; }
.menu-button:disabled { opacity: .72; }
.menu-dock {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 9px 8px 11px;
  background: #0a1e28e8; border: 1px solid #c0a26c62; border-radius: 5px; box-shadow: 0 5px 17px #030b1480;
}
.menu-server { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; color: #f3d69e; }
.menu-server > svg { flex: none; width: 23px; height: 23px; }
.menu-server > div { min-width: 0; }
.menu-server strong, .menu-server small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-server small { margin-top: 2px; color: #bbc8be; font-size: 12px; }
#menu-server-status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: #ddbf87; }
#menu-server-status[data-status="online"]::before { background: #83d7a6; box-shadow: 0 0 8px #83d7a67a; }
#menu-server-status[data-status="offline"]::before { background: #f5a18f; }
.menu-link {
  display: inline-flex; justify-content: center; align-items: center; gap: 4px; flex: none; min-height: 32px;
  padding: 4px 8px; color: #f5d8a4; background: #142c34; border: 1px solid #c2a57059; border-radius: 3px; font-size: 11px; font-weight: 650;
}
.menu-link:hover { color: #fff0c8; border-color: #e2bb7d; }
.menu-exit { color: #e8d6b5; background: transparent; border-color: transparent; }
.menu-exit svg { width: 15px; height: 15px; }
.account-sign-out { justify-self: start; min-height: 24px; background: transparent; }
#account-deletion { width: min(460px, calc(100vw - 24px)); }
#account-deletion p { line-height: 1.55; }
#deletion-form { display: grid; gap: 9px; }
#deletion-word { width: min(12rem, 100%); padding: 8px; }
#privacy { width: min(760px, calc(100vw - 24px)); }
#privacy iframe { display: block; width: 100%; height: min(63dvh, 600px); border: 0; }
.account-help { display: grid; place-items: center; min-height: 100dvh; padding: 16px; overflow: auto; }
.account-help main { width: min(100%, 640px); padding: clamp(16px, 5vw, 35px); border: 1px solid #a28459; }
.account-help h1 { margin: 0; color: #ffe4b2; font: 2rem var(--serif); }
.account-help p { line-height: 1.55; }
.account-help-studio { color: #e6bc7b; }
.account-help a.primary { display: inline-block; text-decoration: none; }
#app-download {
  --download-inset: clamp(26px, 3.15vw, 62px);
  position: absolute; top: max(var(--download-inset), var(--top)); right: max(var(--download-inset), var(--right));
  display: grid; justify-items: center; gap: 6px; pointer-events: auto;
}
#landing:has(#main-menu[hidden]) #app-download { display: none; }
.app-download-seal {
  position: relative; isolation: isolate; padding: 4px; border: 3px solid #694720; border-radius: 3px;
  outline: 1px solid #d6ac6b; background: #f6e6c5; box-shadow: 0 5px 17px #030c13a6;
}
.app-download-seal::before, .app-download-seal::after {
  content: ''; position: absolute; width: 14px; height: 14px; border: solid #f7d68e; pointer-events: none;
}
.app-download-seal::before { inset: -4px auto auto -4px; border-width: 2px 0 0 2px; }
.app-download-seal::after { inset: auto -4px -4px auto; border-width: 0 2px 2px 0; }
#app-download img { display: block; width: 147px; height: auto; image-rendering: pixelated; mix-blend-mode: multiply; }
#app-download-link {
  display: grid; justify-items: center; gap: 2px; padding: 0 5px 3px; color: #ffe2a6; text-align: center;
  font: italic 700 15px/1.05 var(--serif); text-decoration: none; text-shadow: 0 2px 4px #041018, 0 0 10px #041018;
}
#app-download-link strong { display: block; font-size: 23px; line-height: 1.08; transform: rotate(-3deg); }
.app-download-arrow {
  width: 50px; height: 29px; margin-bottom: 3px; color: #ffd480;
  stroke-width: 2.5; filter: drop-shadow(0 2px 2px #041018);
}
#app-download-link[href]:hover strong { text-decoration: underline; }
#app-download-link:focus-visible { outline: 2px solid #f7d89c; outline-offset: 3px; }
#app-download-link:not([href]) { cursor: inherit; }
@media (max-width: 860px), (max-height: 640px) {
  #app-download { --download-inset: 18px; gap: 4px; }
  #app-download img { width: 98px; }
  #app-download-link { font-size: 13px; }
  #app-download-link strong { font-size: 18px; }
  .app-download-arrow { width: 40px; height: 23px; }
}
@media (max-width: 615px) {
  #landing:has(#app-download:not([hidden])):has(#main-menu:not([hidden])) {
    align-items: start; flex-flow: column nowrap; gap: 12px; overflow-y: auto;
    padding-top: max(18px, var(--top));
  }
  #app-download { position: static; align-self: end; order: -1; }
  #landing:has(#app-download:not([hidden])):has(#main-menu:not([hidden])) #pause-voyage {
    position: static; width: min(330px, 84vw);
  }
}
#menu-status { margin: 1px 0; color: #f2d9a4; font-size: 12px; }
.return-menu { background: none; border: 0; padding: 4px 0; color: #e1c49a; text-decoration: underline; }
.eyebrow { color: var(--gold); font: 700 10px var(--ui); letter-spacing: .29em; text-transform: uppercase; }
h1 { font: 400 clamp(49px, 9.6vw, 154px)/.83 var(--serif); margin: clamp(15px, 2.6vh, 27px) 0 0; letter-spacing: -.065em; color: #fff0d4; text-shadow: 0 4px 24px #020e19c2, 0 0 60px #061623c4; }
h1 em { display: block; padding-left: .04em; font-size: .83em; line-height: .99; font-weight: 400; color: var(--gilt); }
#pause-voyage {
  position: absolute; right: clamp(23px, 5.8vw, 138px); bottom: clamp(24px, 5.8vh, 84px); width: min(410px, 36vw);
  padding: 5px; background: #091b25ef; border: 1px solid #d2ac74; border-radius: 6px;
  box-shadow: 0 11px 43px #031016cc, inset 0 0 0 3px #e4b9711f; pointer-events: auto;
}
.pause-ship {
  display: flex; gap: 10px; align-items: center; padding: 12px 10px; min-height: 69px;
  border: 1px solid #bda47762; border-radius: 3px;
  background: linear-gradient(90deg,#143036f5,#122d35c5), url('/art/sea.webp') center / cover;
}
#pause-pennant { display: block; width: clamp(41px,5.5vw,66px); height: auto; flex: none; }
#pause-captain, #pause-location { display: block; }
#pause-captain { font: 700 clamp(17px,2.25vw,26px)/1.1 var(--serif); color: #ffe7b5; overflow-wrap: anywhere; }
#pause-location { margin-top: 4px; color: #ccd2bd; font-size: 11px; }
.pause-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding-top: 5px; }
.pause-links button { display: flex; justify-content: start; align-items: center; gap: 6px; min-height: 35px; padding: 4px 7px; color: #f2dcad; text-align: left; background: #142d36; border: 1px solid #be9d6566; border-radius: 3px; font-size: 11px; font-weight: 650; }
.pause-links button:last-child { grid-column: 1 / -1; }
.pause-links button:hover { border-color: var(--gilt); }
.pause-links svg { flex: none; width: 15px; height: 15px; }
#charter p, dialog p { max-width: 290px; color: #c2ccbf; line-height: 1.55; font-size: 13px; }
#charter p { margin: 6px 0 22px; }
#charter label { display: block; font-size: 10px; font-weight: 750; color: #cdb58a; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 7px; }
#charter input { width: 100%; height: 45px; background: #08191fdb; color: var(--paper); border: 1px solid #c7a56975; border-radius: 2px; padding: 0 13px; user-select: text; }
#charter input::placeholder { color: #a2a9a1; }
.primary { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 16px; color: #18190f; background: linear-gradient(#f4d496,#c28d4e); box-shadow: inset 0 0 0 1px #f6d7a0a0, 0 4px 17px #01060661; border: 1px solid #e8bc77; border-radius: 2px; font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .15em; }
.primary:hover { filter: brightness(1.09); }
.primary svg { width: 17px; height: 17px; }
#charter .primary { width: 100%; height: 44px; margin-top: 9px; position: relative; }
#charter .primary b { position: absolute; right: 14px; font-size: 22px; }
.charter-colors { display: flex; align-items: center; width: 100%; gap: 8px; min-height: 42px; padding: 3px 11px 3px 7px; margin-top: 8px; text-align: left; background: #102329e8; border: 1px solid var(--line); border-radius: 2px; }
.charter-colors canvas { width: 38px; height: 29px; }
.charter-colors strong, .charter-colors small { display: block; }
.charter-colors strong { font-size: 11px; color: #f6e8cd; }
.charter-colors small { font-size: 9px; margin-top: 2px; color: #c0ccb9; }
.color-chevron { margin-left: auto; font-size: 20px; color: var(--gold); }
#form-error { min-height: 15px; margin-top: 6px; font-size: 11px; color: #ffc398; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud[inert] { visibility: hidden; }
#hud button { pointer-events: auto; }
.glass { background: linear-gradient(145deg,#10252ae9,#071820f0); border: 1px solid var(--line); box-shadow: 0 6px 20px #0005, inset 0 0 0 2px #18292b7a; }
body.sailing .masthead { display: none; }
.captain-hud { position: absolute; left: var(--left); top: var(--top); width: clamp(225px, 25vw, 326px); display: grid; gap: 8px; }
.ship-card { display: grid; gap: 9px; padding: 12px 15px 10px; border: 1px solid #bb965e; border-radius: 6px 6px 15px 15px; background: linear-gradient(152deg,#152f32e8,#0a191ff2 58%,#1a2521e6), url('/art/captain-plate.webp') center / 100% 100%; box-shadow: 0 10px 23px #02080ca3, inset 0 0 0 3px #0a171b, inset 0 0 0 4px #b9965a52; }
.ship-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 1px; }
.ship-emblem { width: 50px; height: 48px; padding: 0; flex: none; border-color: #af8f57; border-radius: 3px 3px 13px 13px; background: radial-gradient(ellipse at 47% 32%,#38504b,#102328 75%); box-shadow: inset 0 0 0 2px #0b1419bd, 0 3px 8px #0008; }
.ship-emblem canvas { width: 42px; height: 31px; }
.ship-emblem:hover { border-color: #f5d195; }
.ship-details { flex: 1; min-width: 0; }
.ship-details strong { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font: 700 clamp(17px, 2.2vw, 24px)/1.05 var(--serif); color: #fff1d3; text-shadow: 0 2px 6px #020709; }
.ship-class { display: flex; align-items: center; gap: 5px; margin: 4px 0 0; color: #cfceae; font-size: 11px; }
.ship-class svg { width: 15px; height: 15px; color: #dcb479; }
.rank-insignia { flex: 0 0 43px; min-height: 46px; display: grid; align-content: center; justify-items: center; gap: 1px; padding-bottom: 4px; background: linear-gradient(150deg,#edcf8c,#79552e 52%,#d8ab62); clip-path: polygon(0 0,100% 0,100% 78%,50% 100%,0 78%); position: relative; isolation: isolate; }
.rank-insignia::before { content: ''; position: absolute; inset: 2px; z-index: -1; clip-path: inherit; background: linear-gradient(140deg,#68502b,#302b1f); }
.rank-insignia span { text-transform: uppercase; font-size: 8px; letter-spacing: .09em; font-weight: 750; color: #f4d69a; }
.rank-insignia b { font: 700 23px/.95 var(--serif); color: #ffe7a7; }
.rank-insignia b[data-wide="true"] { font-size: 13px; }
.captain-meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; color: #d0dccb; }
.captain-meter > span { font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.captain-meter strong { font-size: 10px; font-variant-numeric: tabular-nums; }
.experience { color: #f0d49b; }
.stat-track { position: relative; grid-column: 1 / -1; height: 8px; overflow: hidden; border: 1px solid #839b866c; border-radius: 2px; background: #061218; box-shadow: inset 0 2px 4px #0008; }
.stat-track::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px),#06171bb0 calc(20% - 1px) 20%); }
.stat-track i { display: block; height: 100%; width: 100%; border-radius: 1px; background: linear-gradient(0deg,#408b73,#8bd3a6); box-shadow: inset 0 1px 0 #edffd16e; transition: width .2s ease-out; }
.stat-track[data-damaged="true"] i { background: linear-gradient(0deg,#b7544b,#f59971); }
#xp-track { border-color: #b498637d; }
#xp-meter { width: 0; background: linear-gradient(0deg,#ae793d,#f1c87c); }
.cargo { display: flex; align-items: center; gap: 5px; padding-top: 5px; border-top: 1px solid #c9ac6750; color: #d3cbb0; font-size: 10px; }
.cargo svg { width: 14px; height: 14px; color: var(--gold); }
#cargo-weight { color: #d5dfcb; padding: 0 5px; border-left: 1px solid #b5925c6e; white-space: nowrap; }
#cargo-weight[data-heavy="true"] { color: #f5b687; font-weight: 750; }
#fleet-name { color: #a2d4be; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.treasury { position: absolute; right: calc(var(--right) + var(--radar-size) + 15px); top: calc(var(--top) + 10px); display: flex; align-items: center; gap: 10px; min-width: 124px; padding: 6px 15px 6px 7px; border: 1px solid #cea96d; border-radius: 32px 6px 6px 32px; background: linear-gradient(106deg,#45351f,#13252a 80%); color: #ffe4a2; box-shadow: 0 6px 18px #0009, inset 0 0 0 3px #181d1a, inset 0 0 0 4px #ae8b554c; }
.gold-medallion { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #ffde91; border-radius: 50%; color: #573414; background: conic-gradient(from -26deg,#fbd38a,#dca649,#a56d2c,#efd292,#bb7e3a,#fbd38a); box-shadow: inset 0 0 0 3px #9f69364f, 0 2px 6px #0009; flex: none; }
.gold-medallion svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 0 #ffe5a2); }
.gold-balance { display: grid; gap: 1px; }
.gold-balance strong { font: 700 clamp(19px,2.1vw,26px)/1 var(--serif); font-variant-numeric: tabular-nums; color: #fff0be; }
.gold-balance small { font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #e1bc7c; white-space: nowrap; }
.treasury.paid .gold-medallion { animation: coin-pulse .58s ease-out; }
@keyframes coin-pulse { 35% { filter: brightness(1.38); transform: rotate(-12deg) scale(1.1); } }
.tracked-mission { display: flex; align-items: center; gap: 8px; padding: 6px 8px; text-align: left; color: #f3deaf; border: 1px solid #9e824f8a; background: #12242ced; box-shadow: 0 4px 10px #061019aa; border-radius: 2px; }
.tracked-mission svg { width: 17px; height: 17px; flex: none; color: #d4aa65; }
.tracked-mission strong, .tracked-mission small { display: block; }
.tracked-mission strong { font: 13px var(--serif); }
.tracked-mission small { margin-top: 2px; font-size: 9px; color: #a9c1b5; }
.tracked-mission.ready { border-color: #edc67b; }
.zone-title { position: absolute; top: var(--top); left: 50%; transform: translateX(-50%); text-align: center; font: 24px var(--serif); white-space: nowrap; text-shadow: 0 3px 12px #030e15,0 1px 4px #030e15; }
.zone-title span { color: #e6c88b; font: 800 9px var(--ui); text-transform: uppercase; letter-spacing: .22em; }
.zone-title span.safe { color: #b9f1d5; }
.zone-title span.combat { color: #ffae85; }
.zone-title span.fog { color: #e0edf5; }
#starter-status { display: flex; align-items: center; gap: 4px; width: max-content; margin: 4px auto 0; padding: 3px 7px;
  color: #c5ede3; border: 1px solid #82bdae85; border-radius: 4px; background: #122f33eb; letter-spacing: .11em; }
#starter-status svg { width: 12px; height: 12px; }
#weather-status { display: block; width: max-content; margin: 4px auto 0; padding: 4px 7px; letter-spacing: .12em;
  border-radius: 3px; color: #d6ebec; border: 1px solid #b7d6d17a; background: #112e38e6; }
#weather-status[data-cover="true"] { color: #f0fbf1; border-color: #c7eadd; }
#wreck-report { position: absolute; left: 50%; top: calc(var(--top) + 64px); transform: translateX(-50%); min-width: 185px; max-width: 40vw; text-align: center; padding: 8px 12px; border-color: #e0a075; background: linear-gradient(140deg,#3b2923f4,#13232bea); color: #fce2b9; }
#wreck-report strong { display: block; font: 18px var(--serif); color: #ffbf9c; margin-bottom: 3px; }
.radar { position: absolute; right: var(--right); top: var(--top); width: var(--radar-size); height: var(--radar-size); padding: 0; border: 1px solid #edc17c; border-radius: 50%; color: #ffe5aa; background: conic-gradient(from -42deg,#e6c17f,#573a21 17%,#ac8251 30%,#64442b 48%,#dfb877 66%,#775737 81%,#b18b57 93%,#e6c17f); box-shadow: 0 9px 23px #010d13bb, inset 0 0 0 3px #50351f, inset 0 0 0 4px #eed29888; }
.radar::before { content: ''; position: absolute; inset: 5px; border-radius: inherit; border: 1px solid #1a2426; background: conic-gradient(from -50deg,#293a39,#15292c 28%,#283a35 47%,#10282e 92%,#293a39); box-shadow: inset 0 0 0 2px #eab66c5c; pointer-events: none; }
.radar:hover { border-color: #ffebaf; box-shadow: 0 6px 24px #010d13b8, 0 0 14px #eac17d72, inset 0 0 0 3px #50351f, inset 0 0 0 4px #eed298c4; }
.radar-bezel { position: absolute; inset: 7px; border-radius: inherit; background: repeating-conic-gradient(from -.4deg,#edcd8da3 0deg .8deg,transparent .8deg 7.5deg); mask-image: radial-gradient(circle closest-side,transparent 92%,#000 93% 98%,transparent 99%); pointer-events: none; }
.radar-face { position: absolute; inset: var(--radar-rim); overflow: hidden; border-radius: 50%; border: 1px solid #ebc57e; background: #102b32; box-shadow: 0 0 0 2px #111b1d, 0 0 0 3px #9a774a8b; }
.radar-face canvas { width: 100%; height: 100%; display: block; }
.radar-face::after { content: ''; pointer-events: none; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(139deg,#f4f7e51d,transparent 29% 79%,#06131647); box-shadow: inset 0 0 15px 2px #040d13a6; }
.radar-rose { position: absolute; inset: 0; pointer-events: none; font: 700 clamp(9px, .8vw, 12px)/1.25 var(--serif); text-shadow: 0 1px 3px #100d07; }
.radar-rose span { position: absolute; display: grid; place-items: center; min-width: 15px; min-height: 13px; border-radius: 3px; background: #1a2b2b; }
.radar-rose span:nth-child(1) { left: 50%; top: calc(var(--radar-rim) * .32); transform: translateX(-50%); color: #fff4c6; background: #60372a; }
.radar-rose span:nth-child(2) { right: calc(var(--radar-rim) * .13); top: 50%; transform: translateY(-50%); }
.radar-rose span:nth-child(3) { left: 50%; bottom: calc(var(--radar-rim) * .30); transform: translateX(-50%); }
.radar-rose span:nth-child(4) { left: calc(var(--radar-rim) * .13); top: 50%; transform: translateY(-50%); }
.target { position: absolute; right: var(--right); top: calc(var(--top) + var(--radar-size) + 12px); width: clamp(222px, 17.5vw, 292px); padding: 11px; display: grid; gap: 7px; border: 1px solid var(--target-rim, #b79964); border-radius: 7px; background: linear-gradient(145deg,var(--target-glint,#26433d),#0a1e27 85%); box-shadow: inset 0 0 0 3px #e8c47e19, 0 9px 25px #051219b8; --target-accent: #f4d291; }
.target[data-relation="hostile"] { --target-rim: #e48f73; --target-glint: #552e2b; --target-accent: #ffb198; }
.target[data-relation="fleet"] { --target-rim: #7bb99e; --target-glint: #224c40; --target-accent: #a5e4be; }
.target[data-relation="protected"] { --target-rim: #82bdae; --target-glint: #193e44; --target-accent: #c5ede3; }
.target-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; }
.target-crest { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--target-rim, #b79964); border-radius: 50%; color: var(--target-accent); background: radial-gradient(circle at 30% 0%,#b3965f5c,#09202a 75%); }
.target-crest svg { width: 23px; height: 23px; }
.target-summary { display: grid; gap: 3px; min-width: 0; }
#target-relation { width: fit-content; color: var(--target-accent); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
#target-name { overflow: hidden; color: #fff0ca; font: 700 clamp(17px,1.4vw,22px)/1.02 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
#target-kind { color: #cad4c9; font-size: 10px; }
#target-company { color: #c7dfb7; font-size: 10px; overflow-wrap: anywhere; }
.target-actions { display: flex; align-items: center; gap: 4px; }
.target .target-actions button { width: 24px; height: 25px; padding: 3px; border: 1px solid #c8a97460; border-radius: 3px; color: #f4dbad; background: #10232bc9; }
.target .target-actions button:hover { border-color: var(--target-accent); }
.target .target-actions svg { width: 16px; height: 16px; }
.target-readings { display: grid; grid-template-columns: .78fr 1.22fr; gap: 5px; }
.target-readings > div { display: grid; gap: 3px; align-content: center; min-height: 38px; padding: 4px 7px; border: 1px solid #be9e6452; border-radius: 4px; background: #071b225c; }
.target-readings span, .target-hull-label { color: #dbc89d; font-size: 10px; }
.target-readings strong { color: #f7e5b6; font-size: 12px; font-variant-numeric: tabular-nums; }
#target-aim[data-chance="true"] { color: #b7efcc; }
.target-hull-label { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.target-hull-track { height: 6px; margin-top: -4px; border: 1px solid #b3986659; border-radius: 4px; background: #04141b; overflow: hidden; }
#target-hull { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#a07645,var(--target-accent)); transition: width .15s; }
#target-bounty { display: flex; align-items: center; gap: 5px; padding-top: 5px; border-top: 1px solid var(--line); color: #efcd8d; font-size: 10px; }
#target-bounty svg { width: 14px; height: 14px; }
.target button, .dialog-top button { background: #142b2f; border: 1px solid var(--line); width: 32px; height: 32px; padding: 5px; }
.dialog-top button { border-radius: 4px; background: linear-gradient(140deg,#29433e,#0d1c26); border-color: #c9a87388; color: #ffe6b3; }
.dialog-top button:hover { border-color: #ffda9c; }
.target button svg, .dialog-top button svg { width: 18px; height: 18px; }
.navigation { position: absolute; left: var(--left); bottom: var(--bottom); display: grid; justify-items: start; gap: 8px; }
.ship-links { display: flex; gap: 5px; }
.deck-nav, .actions { padding: 6px; border-radius: 8px; background: linear-gradient(150deg,#133034f2,#081b22f5); border: 1px solid #a17d4ea6; box-shadow: inset 0 0 0 2px #e8bd771c, 0 6px 16px #0113199c; }
.nav-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; padding: 7px 11px; border-radius: 4px; color: #f4e0b5; font-size: 12px; font-weight: 700; line-height: 1.1; white-space: nowrap; border-color: #b493617d; background: linear-gradient(140deg,#29413cf7,#132a31); }
.nav-button svg { width: 20px; height: 20px; flex: none; color: #e5ba77; }
.navigation kbd, .fire kbd { color: #eac985; border: 1px solid #b5975e83; border-radius: 3px; padding: 2px 4px; min-width: 14px; text-align: center; background: #0d2024ac; font: 700 9px/1 var(--ui); }
#touch-menu { display: none; }
@media (pointer: coarse) { #touch-menu { display: flex; } }
@media (any-pointer: fine) { #touch-menu { display: none; } }
.dock-button { border-color: #d0ac71b0; color: #ffeac3; background: linear-gradient(140deg,#53462d,#1d3031); }
.actions { position: absolute; right: var(--right); bottom: var(--bottom); display: flex; gap: 6px; align-items: stretch; }
.action, .crew-hud { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 63px; min-width: 63px; padding: 5px 7px; background: linear-gradient(144deg,#42524a,#142c32 77%); border: 1px solid #b39a6e; border-radius: 5px; box-shadow: inset 0 0 0 2px #111c207a, inset 0 1px 0 2px #e1b97c24; color: #f9e1b5; font: 800 10px/1.2 var(--ui); touch-action: manipulation; }
.action svg, .crew-hud svg { width: 22px; height: 22px; color: #edc78c; }
.action:active, .crew-hud:active, .nav-button:active { transform: translateY(1px); }
.action:hover, .crew-hud:hover, .nav-button:hover { border-color: #f3d595; filter: brightness(1.14); }
.fire { min-width: 104px; padding-right: 18px; border-color: #e2ad76; background: linear-gradient(140deg,#8b4e35,#4a2a24 63%,#2d211c); }
.fire svg { width: 25px; height: 24px; color: #ffdeb0; }
.fire.cool { background: linear-gradient(140deg,#4a382e,#252a27 70%); border-color: #ae8d65; color: #d8c4a6; }
.fire kbd { position: absolute; top: 4px; right: 5px; }
.fire small { font-size: 9px; color: #f4d6aa; font-weight: 650; }
.fire small:empty { display: none; }
.magazine { min-width: 67px; gap: 1px; }
.magazine strong { color: #ffdc9c; font: 700 23px/1 var(--serif); }
.magazine span { font-size: 9px; }
.magazine.low { border-color: #e88c6b; }
.magazine.low strong { color: #ffac86; }
.gun-settings { display: flex; gap: 5px; }
.crew-hud { min-width: 53px; border-color: #97a891; color: #e3e9c4; white-space: nowrap; }
.crew-hud svg { width: 21px; height: 19px; color: #b8dbc1; }
.crew-hud.low { border-color: #de9774; color: #ffc19e; }
.salvage { background: linear-gradient(145deg,#65522e,#313826); border-color: #d9ad6c; }
.salvage.far { opacity: .74; }
#hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: var(--bottom); color: #f7eed3; background: #07191dc7; padding: 6px 12px; border-radius: 2px; font-size: 10px; pointer-events: none; white-space: nowrap; text-align: center; }
.notice {
  --seal: #e8bc75;
  display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px 12px;
  color: #e9e6d4; text-align: left; border: 1px solid color-mix(in srgb, var(--seal) 52%, transparent);
  border-radius: 6px; background: linear-gradient(110deg, color-mix(in srgb, var(--seal) 13%, #162b2d), #10242b 70%);
  box-shadow: 0 4px 14px #020a1152, inset 0 0 0 2px #0a20218a;
}
.notice[data-kind="success"] { --seal: #a6dba6; }
.notice[data-kind="warning"] { --seal: #f6ab85; }
.notice-seal {
  flex: 0 0 36px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  color: var(--seal); border: 1px solid currentColor; background: #102228;
  box-shadow: inset 0 0 0 2px #9e7d4f3d;
}
.notice-seal svg { width: 19px; height: 19px; }
.notice-copy { display: grid; gap: 2px; min-width: 0; font: 12px/1.35 var(--ui); }
.notice-copy strong { color: var(--seal); font: 700 16px/1.12 var(--serif); }
.notice-copy small { color: #ead5a6; font-size: 11px; font-weight: 650; }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom) + 36px); z-index: 5; transform: translateX(-50%);
  width: max-content; max-width: min(90dvw, 400px); padding: 10px 15px; pointer-events: none;
  box-shadow: 0 8px 28px #020b12b0, inset 0 0 0 2px #0a20218a;
}
dialog #toast { bottom: calc(var(--bottom) + 10px); }
#earned { position: absolute; top: 41%; left: 50%; z-index: 1; color: #fee1a4; font-weight: 800; text-shadow: 0 2px 7px #071418; animation: rise 1.25s both; }
@keyframes rise { from { transform: translate(-50%, 7px); opacity: 0; } 18%, 72% { opacity: 1; } to { transform: translate(-50%, -20px); opacity: 0; } }
#level-up { position: fixed; top: max(calc(var(--top) + 53px), 13dvh); left: 50%; z-index: 3; display: flex; align-items: center; gap: clamp(10px, 2vw, 18px); width: max-content; max-width: min(90dvw, 440px); padding: 13px clamp(15px, 3vw, 27px) 13px 15px; transform: translateX(-50%); pointer-events: none; color: #ffedc1; border: 1px solid #e4bd76; border-radius: 8px; background: radial-gradient(ellipse at 12% 12%, #5a4a2e 0%, #213935 51%, #10252c 90%); box-shadow: 0 8px 30px #021219c2, 0 0 19px #e6b65f42, inset 0 0 0 3px #142521, inset 0 0 0 4px #e4bb7252; animation: level-up-arrive var(--level-up-duration, 3900ms) ease both; }
.level-up-medal { flex: none; width: clamp(40px, 7vw, 56px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #ffda92; border-radius: 50%; color: #613b1d; background: conic-gradient(from -42deg,#ffe3a3,#d39c4a,#a56d31,#f3ca7d,#b08040,#ffe3a3); box-shadow: inset 0 0 0 3px #a37037ac, 0 0 13px #f6cb7a58; }
.level-up-medal svg { width: 63%; height: 63%; filter: drop-shadow(0 1px 0 #ffe5a2); }
.level-up-copy { display: grid; gap: 4px; }
.level-up-copy strong { font: 700 clamp(23px,4vw,37px)/1 var(--serif); color: #fff0c2; text-shadow: 0 2px 5px #2b1a10; }
#level-up-rank { color: #f3cf87; font-size: clamp(11px, 1.25vw, 14px); font-weight: 750; }
#level-up-unlock { color: #e0ded0; font-size: 12px; }
#level-up-combat { color: #ffdcab; font-size: 12px; }
@keyframes level-up-arrive {
  0% { opacity: 0; transform: translate(-50%, 9px) scale(.97); }
  8%, 87% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -5px); }
}
@media (prefers-reduced-motion: reduce) {
  #level-up, #earned { animation: none; }
}
dialog { color: var(--paper); padding: 20px; border: 1px solid var(--brass); border-radius: 8px; background: linear-gradient(145deg,#19373a,#091c26 65%); box-shadow: inset 0 0 0 3px #e9be7817, 0 20px 80px #010709d9; max-width: 90dvw; max-height: 90dvh; scrollbar-color: #a8885d #10252d; }
dialog::backdrop { background: radial-gradient(ellipse at 50% 40%,#04151f8f,#020b15db); }
dialog h2 { margin: 0; color: #ffe8ba; font: clamp(25px, 3.4vw, 37px)/1.06 var(--serif); letter-spacing: -.025em; }
dialog p { margin: 12px 0 0; }
.dialog-top, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-actions { justify-content: end; margin-top: 15px; }
.dialog-actions button:not(.primary) { padding: 8px 12px; border: 1px solid var(--line); background: #11282f; }
#account, #connect-pc, #complete-account {
  width: min(465px, 92dvw); background: radial-gradient(ellipse at 0 0,#27423c,transparent 49%),
    linear-gradient(143deg,#1b3539,#0b222c 79%);
}
.account-heading { justify-content: flex-start; }
.account-heading > form { margin-left: auto; align-self: start; }
#account .account-purpose { max-width: none; padding-bottom: 10px; border-bottom: 1px solid #d5b47d52; }
#google-sign-in { display: grid; place-items: center; width: max-content; max-width: 100%; padding: 0; margin: 13px 0; border: 0; background: transparent; border-radius: 4px; }
#google-sign-in img { width: 180px; max-width: 100%; height: auto; }
#google-sign-in:enabled:hover { filter: brightness(.94); }
#google-sign-in:disabled { opacity: .8; }
#account-credentials, #pc-approve, #complete-account-form { display: grid; gap: 6px; margin-top: 12px; }
#account-email-field { display: grid; gap: 6px; }
#account label, #pc-approve label, #complete-account-form label { color: #efd9ae; font-weight: 650; }
#account input, #pc-approve input, #complete-account-form input { width: 100%; min-height: 36px; padding: 6px 9px; color: #ffedcb; background: #091d28; border: 1px solid #aa946c89; border-radius: 4px; user-select: text; }
#account-credentials .primary, #pc-approve .primary, #complete-account-form .primary { margin-top: 6px; }
#account-toggle { margin-top: 7px; padding: 6px 0; color: #ebca94; background: none; border: 0; text-decoration: underline; }
#account-status, #pc-result, #complete-account-status { max-width: none; min-height: 1em; margin-top: 8px; color: #f6d8a8; }
#account-pair-code { display: block; margin: 11px 0; padding: 12px 6px; color: #ffe5ab; background: #091a24; border: 1px solid #aa946c89; border-radius: 4px; text-align: center; font-size: clamp(16px,4vw,23px); letter-spacing: .08em; user-select: text; }
#options { width: min(748px, 91dvw); }
#field-guide, #daily { width: min(1060px, 94dvw); }
.guide-banner, .daily-banner {
  min-height: 128px; align-items: end; padding: 16px 18px;
  border: 1px solid #b7925c88; border-radius: 5px; box-shadow: inset 0 0 30px #06121a80;
}
.guide-banner { background: linear-gradient(90deg,#0b202b 4%,#10262cec 37%,#0d202b42),url('/art/expedition-room.webp') center 47% / cover; }
.daily-banner { background: linear-gradient(90deg,#0b202b 4%,#10262cee 39%,#0d202b33),url('/art/harbor-trade.webp') center 53% / cover; }
.guide-banner form, .daily-banner form { align-self: start; }
.guide-banner p, .daily-banner p { max-width: none; margin-top: 5px; color: #e8ddbb; }
.guide-layout { display: grid; grid-template-columns: minmax(162px,.38fr) minmax(0,1fr); gap: 14px; margin-top: 14px; }
#guide-topics { display: grid; align-content: start; gap: 5px; }
#guide-topics button, #log-daily {
  display: flex; align-items: center; gap: 8px; width: 100%; height: auto; padding: 10px 11px;
  color: #ecd9b7; text-align: left; background: #102c34; border: 1px solid var(--line); border-radius: 4px; font-weight: 650;
}
#guide-topics button:hover, #log-daily:hover { border-color: #e2bc80; color: #ffe8ba; }
#guide-topics button[aria-pressed="true"] { color: #ffebc4; border-color: #d1a966; background: linear-gradient(110deg,#58462e,#1a3435); box-shadow: inset 3px 0 #e7c080; }
#guide-topics svg, #log-daily svg { flex: none; width: 17px; height: 17px; color: var(--gold); }
.guide-page { min-width: 0; }
.guide-search {
  display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 8px;
  padding: 6px 8px 6px 11px; color: #f0d9ad; background: #0e2832; border: 1px solid #8b9b8e66; border-radius: 4px;
}
.guide-search svg { width: 17px; height: 17px; }
.guide-search input { min-width: 0; padding: 8px 9px; color: #faf0d7; background: #081a23; border: 1px solid var(--line); border-radius: 3px; user-select: text; }
#guide-results { max-width: none; margin: 6px 0 7px; font-size: 11px; color: #c0d4cd; }
#guide-results.guide-no-results { margin-top: 13px; padding: 13px; border: 1px solid var(--line); color: #ead1a6; }
#guide-answers { display: grid; align-content: start; gap: 5px; max-height: min(540px, 54dvh); overflow: auto; padding: 3px 6px 4px 3px; }
#guide-answers details { min-width: 0; border: 1px solid #bda47755; border-radius: 4px; background: linear-gradient(118deg,#173338,#0e232c); }
#guide-answers details[open] { border-color: #c8a572a0; }
#guide-answers summary { padding: 11px 12px; color: #ffe5b6; font: 700 17px var(--serif); cursor: pointer; }
#guide-answers summary:focus-visible { outline: 2px solid #f5d7a0; outline-offset: -3px; }
#guide-answers summary::marker { color: #d8b577; }
#guide-answers p { max-width: none; margin: 0 12px 10px; color: #e0e6d8; }
#guide-answers .guide-example { padding: 8px 10px; background: #4939227a; color: #ffebc3; border-left: 2px solid #b99560; }
.guide-example strong { display: block; margin-bottom: 2px; color: #efd197; font-size: 11px; }
.mission-header-actions { display: flex; align-items: center; gap: 8px; }
#log-daily { min-height: 32px; white-space: nowrap; font-size: 12px; padding: 5px 8px; }
.daily-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; padding: 9px 12px; border-block: 1px solid #b5976266; }
.daily-summary > div { display: grid; gap: 2px; }
.daily-summary strong { color: #f5d397; font: 700 23px var(--serif); font-variant-numeric: tabular-nums; }
.daily-summary span { color: #e6d6b2; }
.daily-summary small { color: #c2d0c5; }
#daily-contracts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.daily-contract { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 11px; background: linear-gradient(145deg,#1d3b3a,#0b222b 57%); border: 1px solid #bda47770; border-radius: 5px; }
.daily-contract[data-lane="combat"] { background: linear-gradient(145deg,#49342d,#0b222b 57%); }
.daily-contract[data-lane="salvage"] { background: linear-gradient(145deg,#25464b,#0b222b 57%); }
.daily-contract header, .daily-contract footer { display: flex; align-items: center; gap: 8px; }
.daily-contract header > span { display: grid; place-items: center; flex: none; width: 33px; height: 33px; color: var(--gilt); border: 1px solid var(--line); border-radius: 50%; background: #091b2380; }
.daily-contract header svg { width: 18px; height: 18px; }
.daily-contract h3 { margin: 2px 0 0; color: #ffe3b0; font: 700 19px var(--serif); overflow-wrap: anywhere; }
.daily-contract small { color: #ced8c8; }
.daily-contract header small { color: #e7c98f; font-weight: 700; }
.daily-contract p { margin: 0 0 auto; color: #e0e6d9; }
.daily-contract progress { width: 100%; height: 7px; overflow: hidden; appearance: none; border: 1px solid #b5976266; border-radius: 3px; background: #0c1a21; accent-color: #ddb36e; }
.daily-contract progress::-webkit-progress-bar { background: #0c1a21; }
.daily-contract progress::-webkit-progress-value { background: linear-gradient(90deg,#a97a44,#efc77e); }
.daily-contract footer { flex-wrap: wrap; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--line); }
.daily-contract footer strong { color: var(--gilt); }
.daily-contract .primary { padding: 7px 9px; font-size: 10px; }
.daily-contract .primary:disabled { background: #112b32; color: #b6c8b9; border-color: #71877970; box-shadow: none; opacity: 1; }
.daily-contract .primary[data-claimed] { background: #21372e; color: #c5e4be; }
#daily-status { min-height: 1.55em; max-width: none; margin: 9px 0 0; }
#daily-status[data-kind="success"] { color: #c5e9be; }
#daily-status[data-kind="error"] { color: #ffcca9; }
body.photo-mode #hud, body.photo-mode .masthead { visibility: hidden; }
#photo-controls {
  position: fixed; z-index: 4; bottom: var(--bottom); right: var(--right); left: var(--left);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  width: max-content; max-width: calc(100% - var(--left) - var(--right)); margin-inline: auto;
  padding: 8px 10px; border: 1px solid #caa46d; border-radius: 5px; background: #0b202ceb; box-shadow: 0 5px 22px #06121c99;
}
#photo-controls strong, #photo-controls small { display: block; }
#photo-controls strong { font: 700 16px var(--serif); color: #ffebc5; }
#photo-controls small, #photo-status { color: #cad6ca; font-size: 11px; }
#photo-controls div:first-child { margin-right: 4px; }
#photo-controls button { padding: 6px 9px; }
#photo-controls button:not(.primary) { border: 1px solid var(--line); border-radius: 4px; background: #162f36; }
#photo-controls button[aria-pressed="true"] { color: #ffe6b7; border-color: #d7af72; background: #56432e; }
#photo-controls svg { vertical-align: middle; width: 14px; height: 14px; }
.photo-zoom { display: flex; gap: 3px; }
#photo-status:empty { display: none; }
.return-menu + .return-menu { margin-left: 10px; }

#world-picker {
  width: min(580px, 92vw);
  border: 1px solid #b28d57;
  border-radius: 9px;
  padding: clamp(18px, 4vw, 30px);
  background: radial-gradient(ellipse at top left, #23414a, #0d222d 66%);
  box-shadow: 0 23px 75px #000a, inset 0 0 0 4px #f5cf8d12;
}
#world-picker h2 { color: #ffebbf; font-size: clamp(24px, 5vw, 36px); }
.world-intro { margin: 10px 0 18px; color: #d6e0d9; }
#world-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
#world-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #b28d575c;
  border-radius: 5px;
  background: linear-gradient(120deg, #d2ad641a, #071a246c);
}
#world-list strong { display: block; font: 700 23px Georgia, serif; color: #ffebbf; }
#world-list small { display: block; margin-top: 4px; color: #d4e9db; }
#world-list small::before { content: "●"; font-size: .7em; color: #89d3aa; margin-right: 6px; }
#world-list [data-online="false"] small::before { color: #df9784; }
#world-list .world-join {
  min-width: 128px; min-height: 43px; padding: 8px 13px; border: 1px solid #d7ab69; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 800 11px/1.25 var(--ui); letter-spacing: .08em; text-transform: uppercase;
  color: #291b11; background: linear-gradient(140deg, #ffebbd, #d6a568 75%, #bd894f);
  box-shadow: inset 0 0 0 2px #f9dfa262, 0 4px 12px #061017a0;
  transition: filter .16s, border-color .16s, translate .16s;
}
#world-list .world-join span:last-child { font-size: 20px; line-height: .75; }
#world-list .world-join:enabled:hover { filter: brightness(1.16); translate: 0 -1px; border-color: #ffe5b0; }
#world-list [data-full="true"] .world-join:enabled { background: #243f45; color: #ffdc9e; }
#world-list .world-join:disabled { background: #15272c; color: #bfb3a0; border-color: #7b6c57; box-shadow: none; }
#world-list .world-join:disabled span:last-child { opacity: .4; }
#world-note { margin: 14px 0 7px; color: #f3d09a; min-height: 1.3em; }

#companies {
  width: min(780px, 94vw);
  padding: clamp(17px, 3vw, 26px);
  border: 1px solid #b4935d;
  border-radius: 9px;
  background: linear-gradient(110deg, #122a34ae, #081923ef 70%),
    url('/art/captain-chart.webp') center / cover;
  box-shadow: 0 25px 70px #0009, inset 0 0 0 4px #ecbb6622;
}
#company-title { margin-top: 4px; color: #ffe6b7; font-size: clamp(26px, 5vw, 38px); }
#companies h3 { color: #ffe6b7; font-size: 20px; margin: 0; }
#companies p { color: #deeadf; margin: 7px 0 13px; }
#companies small { color: #e3cfaa; }
#company-status { padding: 9px 13px; background: #102e37; border-left: 3px solid #dab477; }
#company-create > div, #company-challenge > div, .company-war-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#company-create input, #company-challenge select { flex: 1; min-width: 0; }
#companies label { margin-bottom: 5px; display: block; color: #f3d9ab; }
.company-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #d4a96966; margin: 12px 0; }
.company-tabs [aria-pressed="true"] { background: #635035; border-color: #e1b976; color: #fff4d5; }
.company-anchorage {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 15px;
  padding: 16px; border: 1px solid #d3ad7366; border-radius: 5px;
  background: linear-gradient(90deg, #0c292fe8, #16464cad), url('/art/captain-chart.webp') center / cover;
}
#companies .company-anchorage p { margin-bottom: 0; }
.company-roster-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 15px 0 0; }
.company-roster-heading span { color: #edd0a0; font-variant-numeric: tabular-nums; }
.company-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 7px; }
.company-list li, .company-card { border: 1px solid #ceb08251; border-radius: 4px; background: #0b252feb; padding: 11px; }
.company-list small, .company-card small { display: block; margin-top: 4px; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 9px; }
.company-card .eyebrow { display: block; margin-bottom: 7px; }
.company-card progress { width: 100%; accent-color: #d4aa68; }
.company-card button, #company-challenge, #company-leave-choice { margin-top: 10px; }
#company-leave-choice summary { display: list-item; color: #f2cfaa; cursor: pointer; }
#companies .company-score { color: #ffdf9e; font: 700 20px Georgia, serif; }
.company-banner {
  padding: 15px; border: 1px solid #bd9c677a; border-radius: 6px; margin-bottom: 14px;
  background: linear-gradient(105deg,#233a3cf5,#142a33d0), url('/art/captain-chart.webp') 40% 50% / cover;
}
.company-banner-name { display: flex; align-items: center; gap: 12px; }
.company-emblem {
  width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid #cdad73;
  border-radius: 50%; color: #f6d490; background: radial-gradient(circle,#58472f,#172b32 80%);
  box-shadow: inset 0 0 0 3px #dec18c20;
}
.company-emblem svg { width: 23px; height: 23px; }
.company-tabs { gap: 8px; padding-bottom: 9px; }
.company-tabs button, .shop-company-services button, #company-chart-workshop, #vault-company-workshop {
  min-height: 34px; padding: 7px 11px; border: 1px solid #aa8b57;
  border-radius: 4px; color: #eddab6; background: linear-gradient(145deg,#294349,#132630);
}
.company-tabs button[aria-pressed="true"] { background: linear-gradient(135deg,#a77842,#4e3d2a); color: #fff4d5; }
.company-fort-status {
  margin: 8px 0 12px; padding: 8px 12px; border: 1px solid #c6a06a80;
  border-radius: 4px; color: #f7dbac; background: #1b3036;
}
.company-workshop-location { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px 12px; margin: 9px 0; }
.company-workshop-location p { margin: 0; color: #d5e7e1; }
#company-works .company-card:first-child { border-color: #cc9f61; background: linear-gradient(145deg,#3d412f,#112a33 70%); }
.company-defense-card { background: linear-gradient(145deg,#283c39,#0c252e 72%); }
.company-defense-card h3 { padding-right: 30px; background: url('/art/company-battery.webp') right center / 30px auto no-repeat; }
.company-card .company-work-lock { display: block; margin-top: 4px; color: #e8c08c; }
#company-treasury button[data-funded]:disabled { color: #c0b7a5; background: #26383a; border-color: #7c7969; box-shadow: none; }
#vault-company-workshop { margin-top: 9px; }
#target-company-fort, #open-company-gate { border-color: #9cced7; background: linear-gradient(140deg,#274a55,#102933); }
.shop-company-services { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0; }
.shop-company-services button { display: inline-flex; align-items: center; gap: 7px; }
.shop-company-services svg { width: 15px; height: 15px; }
#company-search { margin-top: 15px; }
#company-search > div, #company-settings > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#company-search input { min-width: 120px; flex: 1; }
#company-create input, #company-search input, #company-capacity, #company-challenge select, #chat-input {
  color: #ffedcb; background: #0b232d; border: 1px solid #91764f; border-radius: 4px; padding: 9px;
}
#company-directory-list { grid-template-columns: 1fr; }
.company-directory-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.company-directory-row strong { font: 700 18px var(--serif); color: #ffe6b7; }
.company-pager { display: flex; justify-content: end; gap: 7px; }
#company-settings { padding: 10px; border: 1px solid #c6a77950; background: #102a33; }
#company-settings label { margin: 0; }
#company-capacity { width: 65px; }
#company-settings .company-recruit { display: flex; align-items: center; gap: 5px; margin-inline: 7px; }
#company-bans, #company-roster details { margin-top: 8px; }
#company-bans summary, #company-roster summary { cursor: pointer; color: #f2cfaa; }
#company-roster details button, #company-ban-list button { margin: 5px 4px 0 0; }
#companies .company-ledger-title { margin-top: 15px; }
#vault-store-meter { color: #edd1a7; margin: 5px 0 9px; }

#sea-chat {
  position: absolute; left: var(--left); bottom: calc(var(--bottom) + 122px); z-index: 3;
  width: min(390px, 51vw); max-height: min(380px, 59dvh); padding: 12px;
  display: flex; flex-direction: column; gap: 7px; pointer-events: auto;
  background: linear-gradient(145deg,#19363bf7,#0a202af9 70%); border: 1px solid #ba975e;
  border-radius: 7px; box-shadow: 0 12px 28px #03101aae, inset 0 0 0 2px #dfae6526;
}
#sea-chat header { display: flex; align-items: center; justify-content: space-between; }
#sea-chat h2 { margin: 0; color: #ffe4b2; font: 23px var(--serif); }
#chat-close { display: grid; place-items: center; padding: 5px; background: #122b33; border: 1px solid #a28459; border-radius: 4px; }
#chat-close svg { width: 14px; height: 14px; }
.chat-channels { display: flex; gap: 5px; }
.chat-channels button { padding: 6px 12px; border: 1px solid #9c81595c; border-radius: 4px; background: #112b34; }
.chat-channels [aria-pressed="true"] { color: #ffe2a7; background: #5b4932; border-color: #cfac70; }
.chat-channels button:disabled { opacity: .52; }
#chat-messages { min-height: 42px; overflow: auto; padding: 0 5px 0 0; margin: 0; list-style: none; scrollbar-color: #a8885d #10252d; }
#chat-messages li { padding: 5px 6px 6px; background: #081d255f; border-bottom: 1px solid #c4a16c21; overflow-wrap: anywhere; }
#chat-messages li > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }
#chat-messages strong { color: #ffe3ac; }
#chat-messages small { color: #abd4bd; }
#chat-messages time { margin-left: auto; color: #bdc9bf; font-size: 10px; white-space: nowrap; }
#chat-status { color: #f4ca8d; margin: 0; }
#chat-status:empty { display: none; }
#chat-form { display: flex; gap: 5px; }
#chat-input { flex: 1; min-width: 0; font-size: 12px; }
.chat-safety { min-width: 0; padding: 7px; border: 1px solid #9c81595c; border-radius: 4px; background: #112b34; }
.chat-safety p { margin: 4px 0 7px; line-height: 1.4; }
.chat-safety-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.chat-safety-actions strong { margin-right: auto; }
.chat-safety-actions + form { margin-top: 6px; }
.chat-safety button, .chat-safety select, .chat-message-actions { padding: 4px 7px; border: 1px solid #a28459; border-radius: 4px; background: #0c222c; color: #ffe3ac; font: inherit; }
.chat-message-actions { line-height: 1; }
.chat-safety summary { cursor: pointer; }
#chat-block-list { max-height: 6em; overflow: auto; padding: 0; margin: 5px 0 0; list-style: none; }
#chat-block-list li { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
@media (max-height: 490px) { #sea-chat { bottom: calc(var(--bottom) + 85px); max-height: 58dvh; padding: 7px; } }
@media (max-width: 1600px) { #hint { display: none; } }
@media (max-width: 725px) {
  .guide-layout { grid-template-columns: minmax(135px,.38fr) minmax(0,1fr); gap: 8px; }
  .guide-search { grid-template-columns: auto minmax(0,1fr); }
  .guide-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #daily-contracts { grid-template-columns: 1fr; }
}
@media (max-width: 510px) {
  .guide-layout { grid-template-columns: 1fr; }
  #guide-topics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-height: 530px) {
  .guide-banner, .daily-banner { min-height: 66px; padding: 8px 10px; }
  #guide-topics button { padding: 6px 8px; }
}
.option-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; }
.option-pane { min-width: 0; padding: 13px 16px; background: linear-gradient(131deg,#183634,#0d242c); border: 1px solid var(--line); border-radius: 5px; }
.option-pane h3 { margin: 0; font: 22px var(--serif); color: var(--gilt); }
.option-slider, .option-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 15px 0; color: #eee0c3; }
.option-slider input { width: 100%; accent-color: #edc785; margin: 0; }
.option-slider output { font-variant-numeric: tabular-nums; color: var(--gold); }
.option-line { padding-top: 12px; border-top: 1px solid var(--line); }
.option-line button { min-width: 126px; padding: 8px 10px; }
.music-credit { color: #dfc99f; border-top: 1px solid var(--line); padding-top: 11px; font-size: 11px; line-height: 1.65; }
.music-credit span { display: block; color: #b2c2bc; }
#keybindings { width: min(680px, 91dvw); }
#keybindings[open] { display: flex; flex-direction: column; }
dialog .binding-instructions { max-width: none; margin: 8px 0 10px; color: #ccdacc; }
.binding-capture { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; color: #ffe5b2; border: 1px solid #e4bc7a9c; border-radius: 4px; background: #513d29; }
.binding-capture > div { display: flex; gap: 6px; }
.binding-capture button { min-height: 26px; padding: 3px 7px; font-size: 11px; border-radius: 3px; }
.binding-capture button:disabled { opacity: .5; }
#binding-prompt { font-weight: 650; font-size: 12px; }
#binding-feedback { min-height: 19px; margin: 4px 0; color: #ffe1a4; line-height: 1.35; font-size: 12px; }
.binding-scroll { min-height: 0; max-height: min(52dvh, 494px); overflow: auto; border: 1px solid #af955d9c; border-radius: 5px; background: #10282e; scrollbar-color: #a88b5e #0a2028; }
#binding-table { width: 100%; border-spacing: 0; }
#binding-table th, #binding-table td { padding: 5px 10px; text-align: left; border-bottom: 1px solid #9abdac2b; }
#binding-table thead { position: sticky; z-index: 1; top: 0; color: #ebc98e; background: #10222b; font-size: 11px; }
#binding-table tbody th[scope="row"] { color: #e6e0c4; font-size: 13px; font-weight: 650; }
#binding-table .binding-group th { padding-block: 6px; border-bottom-color: #b398657d; background: linear-gradient(100deg,#3e3628,#1c3033); color: #ffe5b0; font: 700 14px var(--serif); }
.binding-key { display: block; min-width: 76px; width: 100%; min-height: 28px; padding: 4px 8px; color: #fff0cb; border: 1px solid #c5a87891; border-radius: 4px; background: linear-gradient(155deg,#2b443e,#12282e); font-weight: 750; font-size: 12px; }
.binding-key:hover { border-color: #f4d699; }
.binding-key[data-assigned="false"] { color: #bbc9bb; font-weight: 500; }
.binding-key[aria-pressed="true"] { border-color: #f0c482; background: linear-gradient(125deg,#725334,#3e342a); }
@media (max-width: 490px) {
  #binding-table th, #binding-table td { padding-inline: 5px; }
  .binding-key { min-width: 59px; padding-inline: 4px; }
}
#expeditions { width: min(998px, 94dvw); max-width: 94dvw; }
.expedition-banner { display: grid; align-content: end; min-height: clamp(99px,20vh,157px); padding: 17px 20px; border: 1px solid #b28f5a; border-radius: 5px; background: linear-gradient(90deg,#071721fa,#0717218c 43%,transparent 76%),url('/art/expedition-room.webp') 62% 55% / cover,#152d33; box-shadow: inset 0 0 0 3px #f6d69a17; }
.expedition-banner .dialog-top { align-items: start; }
#expedition-total { margin: 6px 0 0; color: #e6d2a7; }
.expedition-layout { display: grid; grid-template-columns: minmax(200px, .85fr) minmax(0, 1.35fr); gap: 13px; margin-top: 13px; }
#expedition-list { display: grid; align-content: start; gap: 6px; height: clamp(200px, 46dvh, 465px); overflow: auto; padding: 3px 6px 4px 3px; scrollbar-color: #a8885d #10252d; }
#expedition-list button { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; min-height: 49px; padding: 7px 10px; border: 1px solid #ab935a59; background: linear-gradient(110deg,#1b3837,#10252e); border-radius: 3px; text-align: left; }
#expedition-list button:hover { border-color: var(--gilt); }
#expedition-list button[aria-pressed="true"] { color: #fff0cd; border-color: #e6bf80; background: linear-gradient(100deg,#504030,#243438); box-shadow: inset 0 0 0 2px #d8ae791f; }
#expedition-list svg { width: 22px; height: 22px; color: #ebca91; }
#expedition-list strong, #expedition-list small { display: block; }
#expedition-list strong { font: 700 clamp(13px, 1.8vw, 17px)/1.14 var(--serif); }
#expedition-list small { margin-top: 4px; color: #c6d3c5; font-size: 11px; }
#expedition-list [data-condition="locked"] small { color: #e4bf99; }
#expedition-list [data-condition="recovered"] small { color: #9fe0ba; }
.expedition-page { position: relative; min-width: 0; padding: clamp(15px,2.6vw,28px); border: 1px solid #b19464aa; border-radius: 5px; background: radial-gradient(ellipse at top left,#423a29,#142a2d 68%); box-shadow: inset 0 0 0 3px #e8bd7818; }
.expedition-page-heading, .expedition-buttons, .expedition-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.expedition-page-heading { justify-content: space-between; color: #d3dfcb; font-size: 11px; }
#expedition-kind { color: var(--gilt); font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
#expedition-condition { padding: 4px 7px; background: #182c2e; border: 1px solid #b5a17163; border-radius: 3px; font-weight: 650; }
#expedition-name { margin: 10px 0 7px; font: clamp(24px, 3.2vw, 39px)/1.04 var(--serif); color: #ffebbd; }
#expedition-location { display: flex; gap: 6px; align-items: center; color: #b8dccc; font-weight: 650; }
#expedition-location svg { width: 17px; height: 17px; }
dialog #expedition-clue { max-width: 50ch; color: #e5dcc6; font-size: 14px; }
.expedition-reward { width: fit-content; margin-top: 17px; padding: 8px 11px; color: #f4d291; background: #0c1f25a6; border: 1px solid #b38b50a6; border-radius: 4px; }
.expedition-reward svg { width: 20px; height: 20px; }
#expedition-gold { font-weight: 800; }
#expedition-xp { padding-left: 9px; color: #bfe2cf; border-left: 1px solid var(--line); }
dialog #expedition-status { max-width: 56ch; color: #d7ddcc; }
.expedition-buttons { margin-top: 13px; }
.expedition-buttons button { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; }
.expedition-buttons svg { width: 16px; height: 16px; }
.expedition-buttons button:disabled { color: #b8b7a0; background: #243431; border-color: #7d735b; box-shadow: none; }
#tracked-expedition[data-ready="true"] { border-color: #e7c282; background: linear-gradient(110deg,#563b24d9,#102c32ed); }
#invitation h2 { margin-top: 7px; }
#chart { width: min(1170px, 94dvw); max-width: 94dvw; background: linear-gradient(135deg,#243a36,#0a202a 67%); }
#chart[data-view="world"] { width: min(1450px, 95dvw); max-width: 95dvw; }
.chart-heading { padding-bottom: 11px; border-bottom: 1px solid #cbae734f; }
.chart-heading > div { display: flex; align-items: center; gap: 12px; }
.chart-emblem { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #c5a16e; border-radius: 50%; color: #eecd94; background: radial-gradient(circle at top,#5b5136,#112b32 72%); }
.chart-emblem svg { width: 28px; height: 28px; }
.chart-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); align-items: start; gap: 14px; margin-top: 13px; }
.chart-view-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.chart-view-tools button, .world-chart-zoom button {
  min-height: 29px; padding: 5px 10px; border: 1px solid #a48e627c; border-radius: 4px;
  color: #eedaba; background: linear-gradient(145deg,#294044,#102934); font: 700 11px var(--ui);
}
.chart-view-tools button[aria-pressed="true"] { color: #fff0ce; border-color: #dfbe82; background: #625036; }
.chart-view-tools button:hover, .world-chart-zoom button:enabled:hover { border-color: #f1ca8b; }
.world-chart-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(185px, 224px); gap: 12px; align-items: start; margin-top: 11px; }
.world-chart-stage {
  position: relative; height: clamp(255px, 57dvh, 650px); overflow: hidden; border: 1px solid #c8a76e91;
  border-radius: 5px; background: #091e29; box-shadow: 0 5px 14px #020d1770;
}
#world-chart-map { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#world-chart-map[data-dragging="true"] { cursor: grabbing; }
#world-chart-map:focus-visible { outline: 2px solid #efcf94; outline-offset: -3px; }
.world-chart-zoom { position: absolute; right: 9px; bottom: 9px; display: flex; gap: 4px; }
.world-chart-zoom button { min-width: 31px; background: #122f3aee; box-shadow: 0 2px 9px #020f17ab; }
.world-chart-zoom button:disabled { color: #879a98; }
#world-chart-hover {
  position: absolute; left: 9px; bottom: 9px; max-width: calc(100% - 131px); pointer-events: none;
  border: 1px solid #8fa99b90; padding: 5px 8px; border-radius: 4px; background: #102a33ef; color: #ebdcba; font-size: 11px;
}
.world-chart-sidebar { min-width: 0; }
.world-chart-location {
  padding: 11px; border: 1px solid #b89a697d; border-radius: 5px;
  background: linear-gradient(125deg,#2d4037,#142c36 72%);
}
.world-chart-location h3 { color: #f9e4b9; font: 21px/1.15 var(--serif); margin: 4px 0 6px; }
.world-chart-location p { color: #d8ded0; margin: 0 0 7px; font-size: 11px; }
.world-chart-location .primary { width: 100%; justify-content: center; padding: 8px 5px; letter-spacing: .05em; }
.world-legend { gap: 7px 10px; }
.world-legend .legend-player { background: #c8f5d8; }
.world-legend .legend-world-gate { background: #92e3ed; transform: rotate(45deg) scale(.58); }
.world-legend .legend-world-island { height: 8px; border-radius: 55% 44% 58% 37%; border: 1px solid #bbc497; background: #76946d; }
#chart .world-chart-totals { color: #cabfa4; margin: 8px 2px 0; font-size: 11px; }
@media (max-width: 680px) {
  .world-chart-layout { grid-template-columns: 1fr; }
  .world-chart-stage { height: clamp(220px, 48dvh, 330px); }
}
.region-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.region-header h3 { margin: 0; color: #f7e3b7; font: 21px var(--serif); }
#chart-live { padding: 3px 7px; color: #eee0bb; background: #2c3530; border: 1px solid #be9b654d; border-radius: 3px; font-size: 10px; white-space: nowrap; }
#chart-live[data-live="true"] { color: #bcf1d6; background: #1e3d36; border-color: #9ac3a86f; }
.region-frame, #overview-frame { position: relative; border: 1px solid #c3a67485; border-radius: 4px; background: #102d39; box-shadow: 0 5px 14px #020d1770; }
.region-frame { height: clamp(255px, 49dvh, 498px); }
#overview-frame { height: clamp(145px, 23dvh, 243px); overflow: hidden; }
.chart-overview { min-width: 0; padding: 10px; background: #081c24a6; border: 1px solid #b5965f4d; border-radius: 5px; }
#atlas-sectors { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); grid-template-rows: repeat(6,1fr); gap: 2px; height: clamp(88px, 13dvh, 126px); padding: 4px; border: 1px solid #8cab9d56; border-radius: 3px; background: #0a202b; }
.atlas-sector { display: grid; place-items: center; padding: 0; min-height: 0; overflow: hidden; border: 1px solid #719f9457; background: #183843; color: #c4dad2; font: 650 clamp(8px,.8vw,11px) var(--ui); }
.atlas-sector.current { border-color: #7fc5a8; box-shadow: inset 0 -2px #7fc5a8; color: #b8efd5; }
.atlas-sector.selected { background: #5b4d36; border-color: #e7c58a; color: #ffeecc; }
.atlas-sector:hover { border-color: #f5d48e; }
.sector-header { margin: 10px 0 6px; }
.sector-header h3 { font-size: 16px; }
.region-frame canvas, #overview-frame canvas, #seas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
#chart-map[data-local="true"] { cursor: crosshair; }
#chart-dock, #chart-company-gate { position: absolute; z-index: 1; transform: translate(-12px,-50%); display: flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid #d4b27a; border-radius: 3px; background: #102831f5; color: #ffe0a0; box-shadow: 0 3px 10px #081722bb; font: 700 11px var(--ui); white-space: nowrap; }
#chart-dock.is-east, #chart-company-gate.is-east { transform: translate(calc(-100% + 11px),-50%); flex-direction: row-reverse; }
#chart-dock svg, #chart-company-gate svg { width: 14px; height: 14px; }
#chart-company-gate { z-index: 2; transform: translate(-11px,-100%); border-color: #a5d5da; color: #c9eef2; background: #193440; }
#chart-company-gate.is-east { transform: translate(calc(-100% + 11px),-100%); }
#chart-company-gate[data-exit="true"] { transform: translate(-11px,25%); flex-direction: row; border-color: #d6ad71; color: #ffe0a0; background: #30312b; }
#chart-dock[aria-pressed="true"], #chart-dock:hover { border-color: #ffdc8e; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 5px 13px; align-items: center; margin: 7px 0 0; padding: 7px 9px; list-style: none; color: #d4dccc; border: 1px solid #b99c6357; border-radius: 4px; background: #0a222a; font-size: 11px; }
.chart-legend li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-legend svg { width: 15px; height: 15px; color: #f5d59c; }
.chart-legend i { display: block; width: 11px; height: 11px; }
.legend-player { clip-path: polygon(50% 0,97% 100%,50% 66%,3% 100%); background: #ffe0a0; }
.legend-safe { border: 2px dashed #a1dfb5; border-radius: 50%; }
.legend-enemy { background: #ff7464; border-radius: 50%; transform: scale(.65); }
.legend-treasure { border: 1.5px solid #ffe09c; transform: rotate(45deg) scale(.7); }
.chart-legend .legend-course { height: 0; width: 14px; border-top: 2px dashed #ffdc94; }
.chart-passages { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 7px; color: #c5b790; font-size: 11px; }
.chart-exits { display: flex; flex-wrap: wrap; gap: 5px; }
.chart-exits button { display: flex; align-items: center; gap: 5px; padding: 3px 7px 3px 4px; border: 1px solid #92b6aa73; border-radius: 4px; background: #142e38; color: #d0e9df; font-size: 11px; }
.chart-exits button b { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #8fc6bb61; color: #b7e3d5; border-radius: 3px; font-size: 9px; }
.chart-exits button:hover { color: #f8dda8; border-color: #cbb27b; }
.sea-node { position: absolute; transform: translate(-50%,-50%); display: grid; grid-template-rows: 16px 10px; justify-items: center; align-items: center; gap: 2px; width: calc(100% / 5); min-height: 29px; padding: 0; border: 0; background: transparent; color: #cadecf; }
.sea-node i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #8ba69e; border: 1px solid #c3d8c1; box-shadow: 0 0 0 3px #18363e9c; }
.sea-node svg { width: 15px; height: 15px; color: #ffe2a4; filter: drop-shadow(0 1px 3px #091d2a); }
.sea-node small { max-width: 100%; color: #d0dfd5; font: 10px var(--ui); text-shadow: 0 1px 4px #020f16; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.sea-node.selected i, .sea-node.selected svg { outline: 1px solid #ebca8a; outline-offset: 3px; }
.sea-node.selected small, .sea-node.current small { color: #ffe3ac; font-weight: 800; }
.sea-node.current::before { content: ''; position: absolute; width: 17px; height: 17px; border: 1px solid #ffdea0; border-radius: 50%; top: 2px; pointer-events: none; }
.map-location { display: flex; width: 100%; align-items: center; gap: 8px; margin-top: 7px; padding: 6px 8px; font-size: 11px; text-align: left; color: #eed7a5; background: #123239; border: 1px solid #89ab948a; border-radius: 4px; }
.map-location:hover { border-color: #e6c689; }
.map-location svg, .harbor-picker svg { width: 20px; height: 20px; color: #eecd94; }
.map-location strong, .map-location small { display: block; }
.map-location small { margin-top: 2px; color: #c0dace; }
.harbor-picker { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; align-items: center; padding: 3px 6px; color: #ffe0a0; font-size: 11px; margin-top: 7px; border: 1px solid #a48f6780; border-radius: 4px; background: #102831; }
.harbor-picker select { min-width: 0; color: #f8e3b4; background: #102831; border: 0; padding: 5px 2px; font: inherit; }
.chart-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 12px; min-height: 46px; padding: 9px 11px; border: 1px solid #bc9c656e; border-radius: 5px; background: linear-gradient(105deg,#2e382e,#102831 64%); }
.chart-route-copy { display: flex; align-items: center; gap: 9px; }
.chart-route-copy svg { width: 20px; height: 20px; color: #e3be80; flex: none; }
.chart-footer strong, .chart-footer small { display: block; }
.chart-footer strong { font: 16px var(--serif); color: #f5e5c1; }
.chart-footer small { color: #cedacf; font-size: 11px; margin-top: 4px; }
#plot-course { white-space: nowrap; }
#shop, #magazine, #hold { background: radial-gradient(ellipse at top left,#213b3e,#0a222a 72%); border-color: #a58355; }
#shop { width: min(1280px, 94dvw); max-width: 94dvw; --shop-art: url('/art/shop-trade.webp'); --shop-accent: #efca88; background: linear-gradient(155deg,#183731,#0b242c 65%,#0b1b23); }
#shop[data-department="shipyard"] { --shop-art: url('/art/shop-shipyard.webp'); --shop-accent: #b2dac0; }
#shop[data-department="armory"] { --shop-art: url('/art/shop-armory.webp'); --shop-accent: #ebb681; }
#shop[data-department="provisions"] { --shop-accent: #bacc96; }
#magazine { width: min(960px, 93dvw); max-width: 93dvw; }
#hold { width: min(880px, 92dvw); }
.outfitting-tabs { display: flex; gap: 7px; border-bottom: 1px solid #c4a0685c; margin: 13px 0 12px; }
.outfitting-tabs button { padding: 8px 13px; color: #dfd2b5; background: #10282d; font-weight: 680; border: 1px solid #a689535f; }
.outfitting-tabs button { border-bottom: 0; }
.outfitting-tabs button[aria-selected="true"], .outfitting-tabs button[aria-pressed="true"] {
  color: #ffebbe; border-color: #d4ae71; background: linear-gradient(165deg,#655037,#302f24);
  box-shadow: inset 0 2px #f5d595a8, inset 0 0 0 2px #efc57c1f;
}
.deck-heading, .hold-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deck-heading { margin-bottom: 8px; }
.deck-heading h3 { margin: 0; font: 27px var(--serif); color: #ffe8b5; }
#hold-mount-count { color: #d9c296; font-size: 12px; }
.ship-cutaway { position: relative; background: #071516; border: 1px solid #aa845481; box-shadow: 0 4px 17px #020d1385; }
.ship-cutaway img { display: block; width: 100%; aspect-ratio: 1248 / 410; object-fit: contain; }
.ship-cutaway::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 20px #0009; }
.deck-mount { position: absolute; z-index: 1; top: 49%; transform: translate(-50%,-50%); display: grid; place-items: center; gap: 1px; min-width: 56px; min-height: 56px; padding: 4px 6px; color: #ffe4ac; background: #101d1cf5; border: 1px solid #c6a16f; border-radius: 8px; box-shadow: 0 0 0 3px #08151b8f, 0 5px 12px #000; }
.deck-mount svg { width: 24px; height: 24px; }
.deck-mount span { font: 650 10px var(--ui); }
.deck-mount[data-condition="empty"] { border-style: dashed; }
.deck-mount[data-condition="disabled"] { color: #ffab8b; border-color: #ea956f; }
.deck-mount[aria-pressed="true"] { background: #43341df5; border-color: #ffd991; box-shadow: 0 0 0 3px #dfaf646c, 0 5px 12px #000; }
.mount-detail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px 13px; padding: 12px; background: #0c2229; border: 1px solid var(--line); margin-top: 10px; }
.mount-detail h4 { color: #ffe4ad; margin: 4px 0; font: 21px var(--serif); }
.mount-detail small, .mount-detail p { color: #c4d6c8; font-size: 12px; margin: 0; }
.mount-condition { display: block; margin-top: 7px; width: min(100%, 150px); height: 5px; appearance: none; border: 0; background: #2d3834; }
.mount-condition::-webkit-progress-bar { background: #2d3834; }
.mount-condition::-webkit-progress-value { background: #cfa76a; }
.mount-condition[data-damaged="true"]::-webkit-progress-value { background: #e0826b; }
.deck-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-actions button { padding: 7px 10px; font-size: 10px; border: 1px solid var(--line); }
.deck-actions button:disabled { opacity: .75; }
.deck-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 12px 0 0; }
.deck-stats > div { display: grid; gap: 4px; padding: 7px 10px; border: 1px solid #bc92434a; }
.deck-stats dt { font-size: 11px; color: #d5d5bb; }
.deck-stats dd { margin: 0; color: #ffda96; font-weight: 700; font-size: 12px; }
.shop-banner { display: grid; align-content: space-between; gap: 20px; min-height: clamp(140px, 23vh, 215px); padding: 21px 23px 17px; background: linear-gradient(90deg,#071417f5,#0c1c1ad4 31%,#0b1a1b36 66%,#110d0e15),linear-gradient(0deg,#0b1a1bab,transparent 48%),var(--shop-art) center 52% / cover, #152d30; border: 1px solid #b6955cae; box-shadow: inset 0 0 0 4px #0b181a80, 0 6px 18px #05131aa0; }
.shop-banner .dialog-top { align-items: start; }
.shop-banner { border-radius: 5px; }
#shop-title { font: clamp(29px, 4.5vw, 47px) var(--serif); margin: 0 0 5px; text-shadow: 0 3px 12px #000; }
#shop-role { color: var(--shop-accent); font-size: 13px; font-weight: 650; }
.shop-balance { justify-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shop-balance > span { display: flex; align-items: center; gap: 6px; padding: 5px 9px; background: #0d1b1ded; border: 1px solid #c6a4658c; color: #f2d392; font-size: 12px; border-radius: 4px; min-height: 28px; }
.shop-balance > span:first-child { color: #fff0c2; font-weight: 800; }
.shop-balance svg { width: 15px; height: 15px; }
.shop-mount-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; margin: 4px 0 12px; padding: 8px 11px; background: #0d2227; border: 1px solid #b2945e77; border-radius: 4px; }
.shop-mount { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #efdaa9; font-size: 12px; font-weight: 700; }
.shop-mount select { max-width: 100%; font: inherit; padding: 6px 9px; color: #fff0c2; background: #142f36; border: 1px solid #a38452; }
#shop-mount-state { color: #c6d2c6; font-size: 12px; }
#shop-stock { display: grid; gap: 13px; }
#ship-register { margin-top: 12px; padding: 9px 10px; border: 1px solid #a58c5f80; border-radius: 4px; background: #0a242a; }
#ship-register summary { color: #ffe2a7; font: 700 17px var(--serif); cursor: pointer; }
#ship-register summary span { margin-left: 6px; color: #bdcfc0; font: 11px var(--ui); }
#ship-register-list { display: grid; gap: 5px; margin-top: 8px; }
.ship-register-entry { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; width: 100%; min-height: 49px; padding: 5px 7px; text-align: left; }
.ship-register-entry img { width: 35px; height: 43px; object-fit: contain; transform: rotate(25deg); }
.ship-register-copy { display: grid; gap: 3px; }
.ship-register-copy strong { font: 700 16px var(--serif); }
.ship-register-copy small { color: #ccdbca; font-size: 11px; }
.ship-register-price { color: #ffd98e; font-size: 11px; text-align: right; }
.ship-register-entry[data-locked="true"] .ship-register-price { color: #b8bab0; }
.ship-model .shop-item-art img { object-fit: contain; padding: 4px; transform: rotate(26deg); }
.shop-group-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px),1fr)); gap: 8px; }
.shop-group-title { display: flex; align-items: center; gap: 11px; margin: 0 0 6px; color: var(--shop-accent); font: 700 17px var(--serif); }
.shop-group-title::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg,#bd9c627e,transparent); }
#shop-tabs { gap: 8px; margin: 15px 0 12px; }
#shop-tabs button { display: flex; align-items: center; gap: 7px; min-height: 40px; padding-inline: 15px; }
#shop-tabs svg { width: 19px; height: 19px; color: var(--shop-accent); }
.shop-item { display: grid; grid-template-columns: clamp(62px,8vw,91px) minmax(0,1fr); grid-template-rows: 1fr auto; gap: 8px 11px; align-items: start; padding: 11px; border: 1px solid #a788578f; border-radius: 5px; background: linear-gradient(118deg,#29443c,#102730 68%,#102028); box-shadow: inset 0 0 0 2px #cba36613, 0 4px 9px #04141a73; }
.shop-item[data-status="locked"] { background: linear-gradient(118deg,#332e29,#18262b 74%); }
.shop-item:hover { border-color: #d7b473; }
.shop-item-art { display: grid; place-items: center; aspect-ratio: 1; min-height: 0; overflow: hidden; border: 1px solid #9b784c7d; border-radius: 4px; background: radial-gradient(ellipse,#4c4232b3,#081420 80%); }
.shop-item-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shop-item-art svg { width: 42%; height: 42%; color: var(--shop-accent); }
.shop-item h4 { margin: 0; font: 700 clamp(17px,2.2vw,22px)/1.08 var(--serif); color: #ffe7b5; }
.shop-item small { display: block; color: #c7d3c6; font-size: 11px; margin-top: 4px; line-height: 1.35; }
.shop-item-description .shop-compatibility { color: #f5d18b; font-weight: 750; }
.shop-item-description .shop-advisory { color: #f2b889; }
.shop-level-tag { display: inline-block; margin-top: 5px; color: #d8c6a3; font-size: 10px; }
.shop-ammo-line { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.shop-ammo-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px; border: 1px solid #c4a76a73; border-radius: 3px; color: #f7d597; background: #0e2329; font-size: 10px; line-height: 1.15; }
.shop-ammo-chip[data-ammo="chain"] { color: #a8e3ce; }
.shop-ammo-chip[data-ammo="scatter"] { color: #ffc086; }
.shop-ammo-chip svg { width: 13px; height: 13px; }
.shop-item-footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid #b896633d; }
.shop-offer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.shop-status { padding: 3px 6px; border: 1px solid #8eab90a6; border-radius: 4px; color: #c2f0cd; background: #223b32; font-size: 10px; font-weight: 750; }
.shop-item[data-status="locked"] .shop-status, .shop-item[data-status="gold"] .shop-status, .shop-item[data-status="capacity"] .shop-status { border-color: #d39066a0; color: #ffcfaa; background: #49352b; }
.shop-item-description .shop-mass { color: #d8d9a8; }
.shop-item[data-status="owned"] .shop-status, .shop-item[data-status="blocked"] .shop-status { border-color: #a5916a8c; color: #e6d5ae; background: #38352c; }
.shop-price { color: #ffdf9e; font-size: 12px; white-space: nowrap; }
.shop-item button { margin-inline-start: auto; min-height: 30px; padding: 4px 8px; font-size: 9px; letter-spacing: .09em; }
#shop-feedback { margin: 8px 0; }
#vault { width: min(990px, 94dvw); max-width: 94dvw; background: radial-gradient(ellipse at top left,#344238,#10262c 72%); border-color: #b49763; }
.vault-header { padding: 15px; border: 1px solid #bd9e669c; border-radius: 5px; background: linear-gradient(90deg,#232a25 15%,#18292be8 54%,#07172243),url('/art/expedition-room.webp') 68% 35% / cover; }
#vault-title { color: #fff0c8; font-size: 30px; }
#vault-port { margin-top: 4px; color: #eac78f; }
#vault-rules { max-width: none; margin-top: 10px; color: #f0dbb8; }
.harbor-transfer-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(235px,1fr); gap: 12px; align-items: start; }
.vault-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 12px 0; align-items: start; }
.cargo-drop { min-width: 0; padding: 10px; border: 1px solid #ab925c9c; border-radius: 5px; background: linear-gradient(150deg,#1c3b39,#10242c 70%); }
.cargo-drop[data-drop-state="ready"] { border-color: #a9deb3; box-shadow: 0 0 0 2px #78bd907b; }
.cargo-drop[data-drop-state="blocked"] { border-color: #e6987e; box-shadow: 0 0 0 2px #c975547e; }
.cargo-drop h3 { margin: 0 0 7px; color: #f4dcaa; font: 700 20px var(--serif); }
.cargo-drop-help { margin: 6px 0 8px; color: #d5d9bb; font-size: 11px; }
.cargo-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.cargo-slot { display: grid; align-content: center; min-width: 0; min-height: 64px; gap: 3px; padding: 5px 6px; text-align: start; border: 1px solid #b4976288; border-radius: 4px; color: #f2dbab; background: linear-gradient(145deg,#463d2d,#182b30 72%); }
.cargo-slot[data-empty="true"] { color: #90a39b; background: #10282c; border-color: #6482765c; }
.cargo-slot[aria-pressed="true"] { border-color: #fde09b; background: linear-gradient(145deg,#68512d,#24373b); }
.cargo-slot[draggable], .shop-item[draggable] { cursor: grab; }
.cargo-slot-top { display: flex; justify-content: space-between; align-items: center; color: #ebcb8d; }
.cargo-slot[data-empty="true"] .cargo-slot-top { color: #87a395; }
.cargo-slot-top svg { width: 16px; height: 16px; }
.cargo-slot strong { font-size: 11px; overflow-wrap: anywhere; }
.cargo-slot small { font-size: 9px; }
.cargo-weight { display: grid; gap: 6px; margin-bottom: 8px; }
.cargo-weight-line, .cargo-weight-limits { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 7px; color: #dac99f; font-size: 10px; }
.cargo-weight-line strong { font: 700 21px var(--serif); color: #ffe7b0; }
.cargo-weight[data-load="over"] .cargo-weight-line { color: #ffc589; }
.cargo-weight[data-load="blocked"] .cargo-weight-line { color: #ffae98; }
.cargo-weight-meter { position: relative; height: 8px; border: 1px solid #ba9e6c92; border-radius: 3px; background: linear-gradient(90deg,#0c1f25 var(--normal),#573a2c var(--normal)); }
.cargo-weight-meter::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill); background: #609f85; }
.cargo-weight[data-load="over"] .cargo-weight-meter::before { background: linear-gradient(90deg,#5c9d80,#ed935d); }
.cargo-weight[data-load="blocked"] .cargo-weight-meter::before { background: #d9705f; }
.cargo-weight-meter::after { content: ''; position: absolute; left: var(--normal); top: -2px; bottom: -2px; width: 1px; background: #f5d79c; }
.market-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.market-controls label { display: grid; gap: 4px; color: #e6c68b; font-size: 11px; }
.market-controls input { width: 95px; padding: 5px 7px; min-height: 31px; background: #0f262d; color: #ffebba; border: 1px solid #b89b65; }
.market-controls button { min-height: 31px; padding: 4px 8px; color: #f0d39b; font-size: 11px; }
.market-controls button:disabled { opacity: .55; }
.market-drop { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #eed19a; border-style: dashed; font-size: 12px; }
.market-drop svg { width: 18px; height: 18px; flex: none; }
.shop-hold { position: sticky; top: 0; }
@media (max-width: 680px) {
  .harbor-transfer-layout { grid-template-columns: minmax(0,1fr); }
  .shop-hold { position: static; grid-row: 1; }
  .cargo-slots { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.vault-transfer { display: grid; gap: 12px; padding: 12px; border: 1px solid #bd9e6674; background: #112930b0; }
.vault-transfer-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; justify-content: space-between; }
.vault-transfer-top label { flex: 1 0 125px; }
.vault-directions { display: flex; gap: 2px; padding: 3px; background: #091b20; border: 1px solid #a28652; border-radius: 4px; }
.vault-directions button { padding: 7px 12px; border: 1px solid transparent; color: #d2c8af; background: transparent; }
.vault-directions button[aria-pressed="true"] { background: #674c2d; border-color: #c8a16b; color: #fff1cd; }
.vault-quantity { display: grid; grid-template-columns: minmax(90px,1fr) minmax(66px,.30fr) auto; align-items: end; gap: 9px; }
.vault-transfer label { display: grid; gap: 6px; font-size: 12px; color: #eacb98; }
.vault-transfer input, .vault-transfer select { min-width: 0; min-height: 34px; width: 100%; border: 1px solid #ad996a; padding: 5px 8px; color: #ffefd0; background: #10252b; }
.vault-transfer input[type="range"] { margin: 0; padding: 0; border: 0; background: transparent; accent-color: #e5b973; }
.vault-actions { display: flex; justify-content: space-between; align-items: center; gap: 9px; color: #e2c99e; font-size: 12px; }
.vault-actions button, #vault-max { font-weight: 700; min-height: 34px; padding: 5px 10px; }
.vault-transfer button:disabled { opacity: .53; }
#vault-feedback { margin: 9px 0 0; }
.magazine-header { display: grid; align-content: space-between; gap: 15px; min-height: clamp(112px,15vh,158px); padding: 15px 18px; border: 1px solid #b68d57bc; border-radius: 5px; background: linear-gradient(90deg,#0b1c23,#102329e6 38%,#101b215d 83%), url('/art/shop-armory.webp') center 53% / cover; box-shadow: inset 0 0 0 3px #151d21a1; }
#magazine-title { color: #ffefc5; font: 700 clamp(22px,4vw,38px) var(--serif); text-shadow: 0 3px 10px #0a111b; }
.magazine-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.magazine-total, #magazine-armory { min-height: 29px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b596628f; border-radius: 4px; padding: 4px 8px; background: #0f2529eb; color: #e7d1a6; font-size: 11px; font-weight: 700; }
#magazine-armory svg { width: 14px; height: 14px; color: #e5be7d; }
.magazine-layout { display: grid; grid-template-columns: minmax(145px,.31fr) minmax(0,1fr); gap: 12px; margin-top: 12px; }
.magazine-mount-list h3, .magazine-loadout h4 { margin: 0 0 7px; color: #e7c58b; font: 700 15px var(--serif); }
#magazine-mounts { display: grid; gap: 6px; }
.magazine-mount { display: grid; gap: 4px; width: 100%; padding: 8px 9px; text-align: left; color: #e2d6b8; border: 1px solid #937b548f; border-radius: 4px; background: linear-gradient(130deg,#233b3a,#11252e); }
.magazine-mount[aria-pressed="true"] { color: #fceaaf; border-color: #e5bf79; background: linear-gradient(130deg,#554333,#203135); box-shadow: inset 3px 0 #dcb372; }
.magazine-mount-heading { display: flex; gap: 5px; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.magazine-mount > strong { color: #efdeb6; font: 700 16px var(--serif); }
.magazine-mount-load { color: #c9d3bf; font-size: 10px; }
.magazine-mount progress { width: 100%; height: 5px; border: 0; border-radius: 2px; overflow: hidden; appearance: none; background: #102026; accent-color: #87b494; }
.magazine-mount progress::-webkit-progress-bar { background: #102026; }
.magazine-mount progress::-webkit-progress-value { background: #87b494; }
.magazine-mount progress[data-damaged="true"] { accent-color: #d58c6b; }
.magazine-mount progress[data-damaged="true"]::-webkit-progress-value { background: #d58c6b; }
.magazine-loadout { min-width: 0; }
.magazine-station { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; padding: 8px 10px; background: linear-gradient(130deg,#243933,#102831); border: 1px solid #b094627a; border-radius: 5px; }
#magazine-cannon { margin: 0; color: #ffebba; font: 700 clamp(17px,2.4vw,24px) var(--serif); }
#magazine-mount-state { margin: 3px 0 0; color: #cfdbc7; font-size: 11px; }
.magazine-other-row button { min-height: 28px; padding: 4px 8px; border-radius: 3px; color: #e9d0a1; font-size: 10px; font-weight: 700; }
dialog .mount-help { margin: 3px 0 9px; color: #c2d5c7; font-size: 11px; }
#magazine-feedback { margin-bottom: 8px; }
#magazine-stock { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,205px),1fr)); gap: 7px; }
.ammo-card { min-width: 0; display: grid; grid-template-columns: clamp(53px,7vw,83px) minmax(0,1fr); grid-template-rows: 1fr auto auto; align-items: start; gap: 6px 8px; padding: 8px; border: 1px solid #9a81558e; border-radius: 4px; background: linear-gradient(125deg,#20383c,#102730); }
.ammo-card.loaded { border-color: #d5ad66; background: linear-gradient(125deg,#483a2d,#1a3033); }
.magazine-ammo-art { grid-row: 1 / 3; aspect-ratio: 1; border: 1px solid #b28d5699; border-radius: 3px; background: #172925 url('/art/ammo-atlas.webp') left center / 300% auto no-repeat; }
.ammo-card[data-ammo="chain"] .magazine-ammo-art { background-position: center; }
.ammo-card[data-ammo="scatter"] .magazine-ammo-art { background-position: right center; }
.magazine-ammo-detail h5 { margin: 0; font: 700 clamp(15px,2vw,21px)/1.15 var(--serif); color: #fff0ca; }
.magazine-ammo-detail p { margin: 3px 0; color: #cfdbce; font-size: 11px; line-height: 1.27; }
.magazine-ammo-detail small { color: #ddc59d; font-size: 10px; }
.magazine-ammo-stock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; color: #ecd19f; }
.magazine-ammo-stock strong { color: #ffe0a6; font: 700 22px/.9 var(--serif); font-variant-numeric: tabular-nums; }
.magazine-ammo-stock small { font-size: 10px; }
.magazine-ammo-footer { grid-column: 1 / -1; display: flex; min-height: 35px; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; padding-top: 5px; border-top: 1px solid #b3965f60; }
.magazine-status { display: inline-block; padding: 3px 5px; border: 1px solid #b394637a; border-radius: 3px; color: #eac394; background: #392c25; font-size: 10px; font-weight: 750; }
.magazine-status[data-ready="true"] { color: #c1e7c5; border-color: #8baf8e9c; background: #233a31; }
.ammo-card.loaded .magazine-status[data-ready="true"] { color: #ffe4a7; border-color: #d7aa658c; background: #54422d; }
.magazine-ammo-footer button { min-height: 28px; padding: 4px 8px; line-height: 1.15; font-size: 10px; }
#magazine-other-section { margin-top: 11px; }
#magazine-other { display: grid; gap: 4px; }
.magazine-other-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 5px 7px; border: 1px solid #a88b5560; border-radius: 4px; background: #10262c; }
.magazine-other-row svg { width: 18px; height: 18px; color: #d7b778; flex-shrink: 0; }
.magazine-other-row strong, .magazine-other-row small { display: block; }
.magazine-other-row strong { color: #efdcad; font-size: 11px; }
.magazine-other-row small { color: #ccd8c1; font-size: 10px; }
.magazine-other-count { margin-inline-start: auto; color: #decba4; font-size: 10px; }
.shop-item button:disabled { background: #24332f; border-color: #8f80598a; color: #bfb59a; box-shadow: none; filter: none; }
#hold:has(#inventory-tab[aria-selected="true"]) { width: min(1100px, 94dvw); max-width: 94dvw; }
.hold-dialog-heading > div { display: flex; align-items: center; gap: 10px; }
.hold-dialog-heading > div > span { display: grid; place-items: center; width: 38px; height: 38px; color: #efd199; border: 1px solid #b79865; border-radius: 50%; background: radial-gradient(circle at top,#634e31,#112930 76%); }
.hold-tabs button { display: flex; align-items: center; gap: 6px; }
.hold-tabs svg { width: 16px; height: 16px; color: #e4bd83; }
.hold-inventory { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; --hold-art: url('/art/cutaway-sloop.webp'); }
.hold-inventory h3 { margin: 0; color: #ffe8b9; font: 22px var(--serif); }
.hold-load, .hold-stock, .hold-discard { min-width: 0; border: 1px solid #b6976379; border-radius: 6px; }
.hold-load, #mission-cargo, .hold-discard { grid-column: 1 / -1; }
.hold-load { overflow: hidden; background: linear-gradient(135deg,#223e37,#0e2530 72%); border-color: #be9a64; }
.hold-load-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: clamp(80px,13vh,112px); padding: 12px 15px; border-bottom: 1px solid #b796615e; background: linear-gradient(90deg,#102a30fa 5%,#102a30c9 28%,#091d2509 61%,#071b24b8),var(--hold-art) 53% center / cover,#183438; }
#hold-inventory-vessel { color: #edc991; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hold-load-banner h3 { margin-top: 4px; font-size: clamp(24px,3.2vw,35px); }
.hold-purse { display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: #ffe1a0; border: 1px solid #e1b86b9c; border-radius: 5px; background: linear-gradient(135deg,#57442bee,#201f1cef); white-space: nowrap; }
.hold-purse svg { width: 30px; height: 30px; }
.hold-purse small, .hold-purse strong { display: block; }
.hold-purse small { color: #e5c79b; font-size: 10px; }
#hold-gold { margin-top: 2px; font: 700 clamp(17px,2.6vw,24px)/1 var(--serif); }
.hold-load-body { padding: 11px 14px 9px; }
.hold-load-reading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 7px; }
#hold-load-weight { color: #ffe8b1; font: 700 clamp(22px,3.25vw,30px)/1 var(--serif); white-space: nowrap; }
#hold-load-state { padding: 4px 7px; border: 1px solid #7eab8e7d; border-radius: 3px; background: #233d31; color: #caeccc; font-size: 11px; font-weight: 750; }
#hold-load-state[data-load="heavy"], #hold-load-state[data-load="over"] { border-color: #e2ae7984; background: #4b392a; color: #ffc897; }
#hold-load-state[data-load="limit"] { border-color: #db977c; background: #5a3430; color: #ffcfbb; }
.hold-load-meter { position: relative; height: 15px; border: 1px solid #b59965a1; border-radius: 3px; background: linear-gradient(90deg,#0a1b22 var(--normal),transparent var(--normal)),repeating-linear-gradient(-45deg,#4b3629 0 4px,#352c25 4px 8px); }
#hold-load-segments { display: flex; height: 100%; overflow: hidden; border-radius: 2px; }
#hold-load-segments span { flex: none; background: linear-gradient(180deg,#fff3 0%,#fff0 70%),var(--weight-color); box-shadow: inset -1px 0 #122a326a; }
.hold-load-meter::after { content: ''; position: absolute; left: var(--normal); top: -3px; bottom: -3px; width: 2px; background: #ffe0a0; box-shadow: 0 0 4px #0a161b; }
.hold-inventory [data-weight-group="cargo"] { --weight-color: #78c399; }
.hold-inventory [data-weight-group="ammo"] { --weight-color: #e2b573; }
.hold-inventory [data-weight-group="supplies"] { --weight-color: #72bac6; }
.hold-inventory [data-weight-group="guns"] { --weight-color: #d68e77; }
.hold-inventory [data-weight-group="mission"] { --weight-color: #bca6dc; }
.hold-load-labels { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-top: 5px; color: #c7d5c5; font-size: 10px; }
#hold-load-normal { margin-inline-start: auto; color: #f0d396; }
#hold-load-limit { color: #edb994; }
.hold-load-stats, #hold-load-breakdown { display: grid; gap: 6px; margin: 0; }
.hold-load-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 9px; }
.hold-load-stats div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 7px; padding: 6px 8px; border: 1px solid #a68c5f4f; border-radius: 4px; background: #09232a96; }
.hold-load-stats dt { color: #c4d3c2; font-size: 11px; }
.hold-load-stats dd { margin: 0; color: #ffe5ad; font: 700 15px var(--serif); }
#hold-load-penalty[data-slow="true"] { color: #ffc49a; }
#hold-load-breakdown { grid-template-columns: repeat(5,minmax(0,1fr)); padding: 0 14px 12px; }
#hold-load-breakdown div { min-width: 0; padding: 6px 7px; border: 1px solid #ad956251; border-left: 2px solid var(--weight-color); border-radius: 4px; background: #0b222a; }
#hold-load-breakdown dt { display: flex; align-items: center; gap: 4px; color: #dddac2; font-size: 10px; }
#hold-load-breakdown svg { flex: none; width: 14px; height: 14px; color: var(--weight-color); }
#hold-load-breakdown dd { margin: 3px 0 0; color: #ffe5b3; font-weight: 750; font-size: 12px; }
.hold-stock { display: flex; flex-direction: column; gap: 7px; padding: 9px; background: linear-gradient(135deg,#213932,#0c252e 68%); }
.hold-stock header { display: flex; align-items: center; gap: 7px; padding-bottom: 6px; border-bottom: 1px solid #ab906147; }
.hold-stock header > svg { width: 21px; height: 21px; color: #deb67d; flex: none; }
.hold-stock h3 { font-size: clamp(17px,2.2vw,22px); }
.hold-item-list { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hold-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; width: 100%; min-width: 0; min-height: 44px; padding: 4px 6px; text-align: left; color: #fae4bc; background: #0c222bc7; border: 1px solid #ad925c6a; border-radius: 4px; }
button.hold-item:hover, .hold-item[data-selected="true"] { border-color: #dcb87a; background: linear-gradient(120deg,#51402c,#142930); }
.hold-item[data-empty="true"] { color: #c7cbb9; border-color: #ad925c3d; }
.hold-item-art { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border: 1px solid #a88a6068; border-radius: 4px; background: radial-gradient(circle,#3c5144,#14282c); }
.hold-item-art svg { width: 18px; height: 18px; color: #f1c482; }
.hold-item-art[data-ammo] { background: #172925 url('/art/ammo-atlas.webp') left center / 300% auto no-repeat; }
.hold-item-art[data-ammo="chain"] { background-position: center; }
.hold-item-art[data-ammo="scatter"] { background-position: right center; }
.hold-item-copy, .hold-item-total { display: grid; gap: 2px; }
.hold-item-copy strong { font: 700 14px var(--serif); }
.hold-item-total { text-align: right; font-size: 11px; }
.hold-item-total strong { white-space: nowrap; }
.hold-item small, .hold-contract small { color: #bdcec1; font-size: 10px; }
dialog .hold-stock-empty { margin: 3px 0; padding: 9px; color: #c3d4cc; border: 1px dashed #b0956268; border-radius: 4px; }
.hold-stock-link { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; padding: 5px 8px; color: #f6dfb0; border-radius: 4px; font-size: 11px; font-weight: 700; }
.hold-stock-link span { font-size: 17px; line-height: .8; }
.hold-contract { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #bba57054; border-radius: 4px; background: #112733; color: #f2deb5; }
.hold-contract svg { width: 19px; height: 19px; color: #c0acd9; }
.hold-contract span { display: grid; gap: 2px; }
.hold-contract b { font-size: 12px; white-space: nowrap; }
.hold-discard { padding: 8px 10px; background: linear-gradient(110deg,#3b3228,#122731 68%); }
.hold-discard summary { display: flex; align-items: center; gap: 7px; cursor: pointer; color: #f7dbab; font-size: 13px; }
.hold-discard summary::-webkit-details-marker { display: none; }
.hold-discard summary svg { width: 17px; height: 17px; color: #e1b27b; }
.hold-discard summary span { margin-left: auto; width: 8px; height: 8px; border: solid #e4c091; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.hold-discard [open] summary span { transform: rotate(225deg); }
#discard-form { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,.83fr) minmax(0,1fr) minmax(112px,.7fr); align-items: center; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #c7a46c52; }
#discard-form label { color: #eedbb6; font-size: 11px; font-weight: 650; }
.discard-item-field, .discard-quantity, .discard-preview, .discard-submit { display: grid; align-content: center; gap: 4px; min-width: 0; }
.discard-quantity > div { display: flex; gap: 5px; }
#discard-item, #discard-amount { width: 100%; min-width: 0; min-height: 30px; padding: 3px 6px; border: 1px solid #ad9366; border-radius: 3px; color: #f3e7c6; background: #102a31; }
#discard-slider { width: 100%; min-width: 0; margin: 0; accent-color: #d6aa6e; }
#discard-max { padding: 3px 7px; font-size: 10px; border-radius: 3px; }
.discard-preview { padding: 6px 7px; border: 1px solid #ba96665f; border-radius: 4px; color: #f6dbab; background: #132731; }
.discard-preview small, .discard-submit small { color: #dac6a4; font-size: 10px; }
#discard-confirm { min-height: 32px; padding: 4px 7px; border-color: #e7a675; color: #2c1b0f; background: linear-gradient(#f0c28e,#bc8458); }
#discard-confirm:disabled { opacity: .6; }
#discard-feedback { margin-top: 7px; }
@media (max-width: 700px) {
  .hold-inventory { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #discard-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #hold-load-breakdown { grid-template-columns: repeat(auto-fit,minmax(94px,1fr)); }
}
@media (max-width: 500px) {
  .hold-inventory { grid-template-columns: minmax(0,1fr); }
}
.crew-header { --crew-cutaway: url('/art/cutaway-sloop.webp'); display: grid; gap: 10px; margin-bottom: 10px; padding: 13px; border: 1px solid #b7955b9c; border-radius: 5px; background: linear-gradient(90deg,#102b31f2,#172c2de8 37%,#0b1c2477 75%),var(--crew-cutaway) 75% center / cover, #10272c; box-shadow: inset 0 0 0 3px #071b2290; }
#crew-panel[data-vessel="brig"] .crew-header { --crew-cutaway: url('/art/cutaway-brig.webp'); }
#crew-panel[data-vessel="frigate"] .crew-header { --crew-cutaway: url('/art/cutaway-frigate.webp'); }
#crew-panel[data-deck="warship"] .crew-header { --crew-cutaway: url('/art/cutaway-warship.webp'); }
.crew-header-content { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.crew-header h3 { font: 700 clamp(20px,3vw,29px) var(--serif); color: #ffe8b5; margin: 0 0 2px; }
#crew-vessel-name { color: #d9c399; font-size: 11px; text-shadow: 0 2px 4px #08161e; }
.crew-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 0; }
.crew-summary > div { display: grid; gap: 3px; padding: 7px 9px; border: 1px solid #ac935d99; border-radius: 3px; background: #0b2025ed; }
.crew-summary dt { font-size: 10px; font-weight: 750; color: #d8c9a7; }
.crew-summary dd { margin: 0; font: 700 clamp(13px,2vw,19px) var(--serif); color: #fff0bd; }
.crew-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.crew-store { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px; background: linear-gradient(110deg,#293b31,#11292e); border: 1px solid #b5925c8c; border-radius: 4px; color: #f3e3bb; }
.crew-store svg { flex: 0 0 24px; width: 24px; height: 24px; color: #dfbb7d; }
.crew-store:nth-child(2) svg { color: #8ed3cd; }
.crew-store-label { display: grid; gap: 2px; font-size: 12px; }
.crew-store-label small { color: #cdd2ba; font-size: 10px; }
.crew-store strong { margin-left: auto; font: 700 24px var(--serif); }
.crew-store[data-empty="true"] { border-color: #ca815d; color: #ffc3a2; }
.crew-store[data-empty="true"] small { color: #ffba93; }
#crew-instructions { max-width: none; color: #cdd4bf; font-size: 11px; margin: 8px 0; }
#crew-last-meal { margin: 0 0 7px; padding: 5px 7px; border-left: 2px solid #9cbe92; color: #d9ead2; background: #172f28; font-size: 11px; }
.crew-roster { padding: 0; margin: 0; display: grid; gap: 7px; list-style: none; }
.crew-sailor { display: grid; grid-template-columns: clamp(45px,7vw,69px) minmax(90px,1.22fr) repeat(3,minmax(66px,1fr)); gap: 7px 12px; align-items: center; padding: 7px 10px; border: 1px solid #c0a36d8a; border-radius: 5px; background: linear-gradient(125deg,#263b31,#0c242c 72%); }
.crew-portrait { aspect-ratio: 1; border: 1px solid #bf9b65; border-radius: 5px; background: #273832 url('/art/crew-portraits.webp') left 43% / 300% auto no-repeat; box-shadow: 0 2px 6px #07151bb0; }
.crew-portrait[data-portrait="1"] { background-position: center 43%; }
.crew-portrait[data-portrait="2"] { background-position: right 43%; }
.crew-post { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.crew-post strong { font: 700 17px var(--serif); color: #ffe5ae; }
.crew-post small { flex-basis: 100%; color: #cbd4bc; font-size: 11px; }
.crew-duty { padding: 2px 5px; color: #cdf2c7; background: #1e422e; border: 1px solid #89a4758c; border-radius: 3px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.crew-sailor[data-unfit="true"] { border-color: #bc7d61a8; background: linear-gradient(125deg,#45332b,#182a2e 72%); }
.crew-sailor[data-unfit="true"] .crew-duty { color: #ffd0a9; background: #4b3227; border-color: #d19a66; }
.crew-sailor[data-unfit="true"] .crew-post small { color: #ffc09a; }
.crew-meter { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 5px; color: #dbceaa; font-size: 11px; --need-color: #dbb475; }
.crew-meter-label { display: flex; align-items: center; gap: 3px; }
.crew-meter-label svg { width: 14px; height: 14px; color: var(--need-color); }
.crew-meter[data-need="water"] { --need-color: #72bcbd; }
.crew-meter[data-need="health"] { --need-color: #9cca93; }
.crew-meter[data-low="true"] { --need-color: #df8a6e; }
#crew-empty { max-width: none; padding: 8px; border: 1px solid #aa755d8f; color: #efcbb3; background: #3e2b279c; }
.crew-meter progress { flex-basis: 100%; width: 100%; height: 8px; appearance: none; border: 1px solid #94a48669; border-radius: 2px; background: #071a20; }
.crew-meter progress::-webkit-progress-bar { background: #071a20; }
.crew-meter progress::-webkit-progress-value { background: var(--need-color); }
.crew-meter progress::-moz-progress-bar { background: var(--need-color); }
.crew-training { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.crew-skill { display: grid; gap: 4px; min-width: 0; padding: 6px 8px; border: 1px solid #a18c5f76; border-radius: 4px; background: #091f27bb; --skill-color: #e0b36d; }
.crew-skill[data-skill="drills"] { --skill-color: #7cc4bd; }
.crew-skill-heading { display: flex; align-items: center; gap: 5px; color: #ead6aa; font-size: 11px; }
.crew-skill-heading svg { width: 15px; height: 15px; color: var(--skill-color); flex: none; }
.crew-skill-heading span { margin-left: auto; color: var(--skill-color); font-weight: 750; white-space: nowrap; }
.crew-skill progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 4px; overflow: hidden; background: #03141c; }
.crew-skill progress::-webkit-progress-bar { background: #03141c; }
.crew-skill progress::-webkit-progress-value { background: var(--skill-color); }
.crew-skill progress::-moz-progress-bar { background: var(--skill-color); }
.crew-skill small { color: #bfd2c4; font-size: 10px; }
@media (max-width: 530px) {
  .crew-sailor { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .crew-portrait { width: 45px; }
  .crew-post { grid-column: span 2; }
  .crew-training { grid-column: 1 / -1; }
}
#missions { width: min(1110px, 93dvw); background: linear-gradient(116deg,#31251c,#191e1d 64%,#091e24); border-color: #ad8d59; box-shadow: 0 12px 70px #000a, inset 0 0 0 4px #59412a78; }
.mission-header { padding-bottom: 10px; border-bottom: 1px solid #c7a16b55; }
.mission-overall { display: grid; gap: 6px; margin-top: 10px; padding: 11px 13px; color: #e9d0a1; background: linear-gradient(105deg,#292e25,#10272b); border: 1px solid #a6875784; border-radius: 5px; }
.mission-overall > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 9px; }
.mission-overall label { color: #fff0cb; font: 700 clamp(15px,2vw,19px) var(--serif); }
#mission-overall-count { color: #f4d397; font-size: 12px; }
.mission-overall small { color: #c7ccbb; font-size: 10px; }
#mission-overall-percent { color: #f1d096; font-weight: 750; }
#mission-overall-meter { display: block; width: 100%; height: 9px; appearance: none; border: 1px solid #b8966185; border-radius: 4px; overflow: hidden; background: #091b22; }
#mission-overall-meter::-webkit-progress-bar { background: #091b22; }
#mission-overall-meter::-webkit-progress-value { background: linear-gradient(90deg,#a97848,#f3d394); }
#mission-overall-meter::-moz-progress-bar { background: linear-gradient(90deg,#a97848,#f3d394); }
.mission-tabs { display: flex; gap: 6px; align-items: stretch; margin: 11px 0 8px; padding-bottom: 7px; border-bottom: 1px solid #b2915862; }
.mission-tabs button { display: flex; align-items: center; justify-content: center; flex: 1; gap: 6px; min-height: 39px; padding: 4px 7px; color: #eddbb0; background: linear-gradient(120deg,#38352a,#242820); border: 1px solid #a48a5b70; border-radius: 4px; font-weight: 700; }
.mission-tabs button:hover { border-color: #dfb776; }
.mission-tabs button[aria-selected="true"] { border-color: #e7bd7c; color: #fff3ce; background: linear-gradient(125deg,#65492c,#302f25); box-shadow: inset 0 0 0 2px #d2ad7130; }
.mission-tabs button svg { width: 16px; height: 16px; flex: none; color: #e5bd82; }
.mission-tabs button b, #mission-ready-badge { min-width: 1.55em; padding: 2px 4px; font: 750 10px/1.15 var(--ui); color: #f2d8a8; text-align: center; border: 1px solid #ad8c596c; border-radius: 4px; background: #20231d; }
#mission-tab-ready b, #mission-ready-badge { color: #271c10; border-color: #e8c17e; background: linear-gradient(#ffe0a1,#c99a5b); }
.mission-book { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(240px, 1.2fr); gap: 12px; margin-top: 10px; }
.mission-list { display: grid; align-content: start; gap: 5px; height: min(460px, 45dvh); overflow: auto; padding: 1px 4px 1px 1px; scrollbar-color: #a88b5e #2f241d; }
.mission-entry { display: flex; align-items: center; gap: 9px; min-height: 48px; text-align: left; padding: 5px 10px; background: linear-gradient(100deg,#3c2f23,#222722); border: 1px solid #a89b6b57; border-radius: 3px; color: #f5e3bb; }
.mission-entry:hover { border-color: #d9b784; }
.mission-entry[aria-pressed="true"] { border-color: #e3bd7a; background: linear-gradient(100deg,#65482c,#3a3226); }
.mission-entry svg { width: 18px; height: 18px; color: #d3ad70; flex: none; }
.mission-entry strong, .mission-entry small { display: block; }
.mission-entry strong { font: 16px var(--serif); }
.mission-entry small { font-size: 10px; margin-top: 3px; color: #d4cab0; }
.mission-entry.ready { border-left: 3px solid #eac67f; }
.mission-entry.ready small { color: #ffda88; }
.mission-entry.completed small { color: #b4ddbf; }
.mission-entry.locked small { color: #c5a985; }
.mission-level { flex: none; margin-left: auto; padding: 3px 5px; border: 1px solid #b2885270; border-radius: 3px;
  color: #edcc92; background: #181b19; font-size: 10px; white-space: nowrap; }
.mission-entry.locked .mission-level { color: #b3a68a; border-color: #7f715764; }
#mission-empty { margin: 0; padding: 15px; color: #d5c9ab; border: 1px dashed #a8946872; }
.mission-page { min-width: 0; min-height: 235px; padding: clamp(15px,3vw,32px); color: #312114; border: 1px solid #9b793f; border-radius: 3px 9px 9px 3px; background: linear-gradient(90deg,#62401a42,transparent 23px), linear-gradient(115deg,#fff1c1b5,#fae9b949 72%), url('/art/captain-chart.webp') center bottom / cover, #e8cb91; box-shadow: inset 0 0 28px #55361e5c, inset 0 0 0 4px #9f6e393d, 0 4px 15px #040e145c; }
.mission-page-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mission-page-meta span { padding: 3px 6px; border: 1px solid #8d6d3c87; border-radius: 3px; color: #533b1e; background: #f3ddae92; font-size: 11px; font-weight: 750; }
.mission-page .eyebrow { color: #634318; }
.mission-page[data-status="ready"] #mission-status, .mission-page[data-status="completed"] #mission-status { width: fit-content; padding: 5px 8px; border-radius: 3px; background: #594023; color: #ffe4a5; }
.mission-page[data-status="completed"] #mission-status { background: #314d3e; color: #f0eac7; }
.mission-page h3 { margin: 8px 0 0; font: clamp(26px,3vw,36px) var(--serif); color: #352113; }
.mission-page p { color: #372b17; max-width: 380px; line-height: 1.5; font-size: 15px; margin: 10px 0 17px; }
#mission-unlock-rule { margin: -7px 0 12px; font-size: 12px; font-weight: 650; color: #644221; }
.mission-page progress { width: 100%; height: 8px; display: block; appearance: none; border: 1px solid #886838; background: #ad8e56; }
.mission-page progress::-webkit-progress-bar { background: #ad8e56; }
.mission-page progress::-webkit-progress-value { background: linear-gradient(90deg,#594023,#966922); }
#mission-count { color: #543b1b; font-size: 12px; margin: 7px 0 11px; }
.mission-rewards, .mission-rewards span { display: flex; align-items: center; gap: 6px; }
.mission-rewards { flex-wrap: wrap; gap: 5px 12px; color: #48311a; margin-top: 4px; font-size: 13px; }
.mission-rewards svg { width: 16px; height: 16px; }
.mission-reward-box { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 11px; padding: 9px 11px; border: 1px solid #a17a437f; border-radius: 4px; background: #ffe8b18f; }
.mission-reward-copy > strong { color: #573918; font: 700 15px var(--serif); }
.mission-page[data-status="ready"] .mission-reward-box { border-color: #845d2c; background: #ffdf97c9; box-shadow: inset 0 0 0 2px #fff1c580; }
#mission-claim { min-height: 40px; border-color: #ce9651; background: linear-gradient(#ffdda0,#d2a365); box-shadow: inset 0 0 0 1px #fff0c6ad, 0 3px 8px #66442360; }
#mission-claim:disabled { opacity: .65; }
.mission-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mission-actions button { padding: 7px 10px; font-size: 10px; }
.mission-actions .glass { color: #fff0cd; }
#mission-feedback { margin: 6px 0 8px; }
.mission-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #d9c8a0; font-size: 12px; }
.mission-controls label { display: flex; align-items: center; gap: 7px; }
#mission-category-filter { padding: 5px 8px; border: 1px solid #b18c567a; border-radius: 3px; background: #201d18; color: #f3e0b6; font: inherit; }
#mission-route { list-style: none; margin: 12px 0; padding: 0 0 0 22px; }
#mission-route li { position: relative; border-left: 1px solid #88622b78; padding: 6px 9px 6px 15px; color: #55412a; }
#mission-route li::before { content: ''; position: absolute; left: -6px; top: 10px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #805c2f; background: #e8ca8f; }
#mission-route li.done::before { background: #8d6a34; }
#mission-route li.next { background: #bc995064; color: #39261a; }
#mission-route li.next::before { background: #506650; border-color: #3b513d; }
#mission-route li strong, #mission-route li span { display: block; }
#mission-route li strong { font: 700 15px var(--serif); }
#mission-route li span { margin-top: 2px; font-size: 11px; }
.mission-page #mission-packet { margin: 7px 0 14px; font-size: 12px; font-weight: 650; }
#mission-route-action:disabled { opacity: .57; }
#colors {
  width: min(1080px, 94dvw);
  background: radial-gradient(ellipse at 12% 0%, #254442 0, transparent 43%), linear-gradient(145deg, #162e32, #0a1e28 75%);
}
.design-heading { justify-content: flex-start; padding: 0 0 16px; border-bottom: 1px solid #b5955866; }
.design-heading form { align-self: start; margin-left: auto; }
.design-heading p { max-width: none; margin: 5px 0 0; color: #cad6ca; font-size: 13px; }
.design-crest { display: grid; place-items: center; flex: none; width: 50px; height: 50px; background: #1a302e; color: #e9bf7e; border: 1px solid #be965f; border-radius: 50%; box-shadow: inset 0 0 0 3px #0d2529, inset 0 0 0 4px #9c7b485c; }
.design-crest svg { width: 25px; height: 25px; }
.color-editor { display: grid; grid-template-columns: minmax(190px, .88fr) minmax(0, 1.32fr); gap: 16px; margin-top: 16px; }
.vessel-preview { display: flex; flex-direction: column; min-width: 0; align-self: start; padding: 6px; background: #0b222a; border: 1px solid #b5955880; border-radius: 5px; }
.vessel-stage {
  position: relative; display: grid; align-items: center; overflow: hidden; aspect-ratio: 1 / 1; isolation: isolate;
  border: 1px solid #ac8d524d;
  background: radial-gradient(ellipse at 50% 45%, #24676045, #081a22df 81%), url('/art/sea.webp') center / cover, #14333a;
}
.vessel-stage::before, .vessel-stage::after { position: absolute; content: ''; border-radius: 50%; z-index: -1; pointer-events: none; }
.vessel-stage::before { inset: 12%; border: 1px solid #edc88b67; box-shadow: 0 0 0 5px #0a222b68, 0 0 0 6px #edc88b3d; }
.vessel-stage::after { inset: 22%; border: 1px dashed #efd09a56; }
.vessel-stage canvas { display: block; width: 100%; height: auto; margin-top: -2%; }
.vessel-stage-north { position: absolute; top: 7%; left: 50%; transform: translateX(-50%); color: #f1d098; font: 700 12px var(--serif); text-shadow: 0 2px 6px #020c11; }
.vessel-preview-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 7px 6px; }
.vessel-preview-controls strong, .vessel-preview-controls small { display: block; }
.vessel-preview-controls strong { color: #ffe7b6; font: 700 22px var(--serif); }
.vessel-preview-controls small { margin-top: 3px; color: #b9c9bf; }
.design-rotation { display: flex; gap: 5px; }
.design-rotation button, #revert-colors { padding: 6px 10px; color: #f2d29a; background: #142d32; border: 1px solid #b5955866; border-radius: 3px; }
.design-rotation button { min-width: 34px; font: 19px var(--serif); }
.design-rotation button:hover, #revert-colors:enabled:hover { border-color: #ebc07d; }
.color-options { display: grid; gap: 8px; }
.design-group { min-width: 0; padding: 9px 10px; border: 1px solid #a98b554d; background: #081e277a; border-radius: 4px; }
.design-section { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.design-section h3 { margin: 0; color: #ffe7b6; font: 700 18px var(--serif); }
.design-section span { color: #edc785; font-size: 11px; text-align: right; }
.design-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.cloth-options { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.design-choice {
  display: grid; place-items: center; align-content: center; gap: 3px; min-height: 55px; padding: 4px 2px;
  color: #e2e4d5; line-height: 1.1; font-size: 10px; overflow-wrap: anywhere;
  background: linear-gradient(145deg, #1d383b, #0e242e); border: 1px solid #657d716e; border-radius: 3px;
}
.design-choice:enabled:hover { border-color: #caaf7c; background: #2b403b; }
.design-choice[aria-pressed="true"] { border-color: #efc880; color: #ffe8bb; background: linear-gradient(145deg,#55442d,#272d2c); box-shadow: inset 0 0 0 1px #ddb87553; }
.paint-swatch { width: 21px; height: 21px; border-radius: 50%; border: 1px solid #f4d290ab; box-shadow: inset 0 0 0 2px #07182030; }
.cloth-options .paint-swatch { height: 15px; border-radius: 2px 5px 4px 2px; }
.design-choice canvas { width: min(100%, 37px); height: auto; }
.color-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #b5955866; }
.color-actions > div { display: flex; gap: 7px; }
#design-status { margin: 0; font-size: 12px; color: #d5d7c6; }
#design-status[data-kind="success"] { color: #b3e1b7; }
#design-status[data-kind="error"] { color: #ffc49e; }
.connection { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; gap: 16px; align-items: center; width: max-content; max-width: 87vw; padding: 17px 23px; z-index: 4; border: 1px solid #c8a46d; background: linear-gradient(135deg,#142a2eef,#0b1e26f5); box-shadow: inset 0 0 0 3px #8a6b4140,0 8px 45px #041018c7; }
.connection-emblem { position: relative; display: grid; place-items: center; width: 45px; height: 45px; flex: none; border: 1px solid #b99a64; border-radius: 50%; color: #f4d397; }
.connection-emblem::before { content: ''; position: absolute; inset: -4px; border: 2px solid transparent; border-radius: 50%; border-top-color: #e9bb76; }
.connection[data-status="busy"] .connection-emblem::before { animation: connection-spin 1.1s linear infinite; }
@keyframes connection-spin { to { transform: rotate(360deg); } }
.connection[data-status="notice"] .connection-emblem::before { display: none; }
.connection strong, .connection small { display: block; }
.connection strong { color: #ffedc3; font: 21px var(--serif); }
.connection small { color: #c8d4c5; margin-top: 5px; }
@media (prefers-reduced-motion: reduce) { .connection[data-status="busy"] .connection-emblem::before { animation: none; } }
#portrait { display: none; }
@media (max-height: 530px) {
  :root { --left: max(14px, env(safe-area-inset-left)); --right: max(14px, env(safe-area-inset-right)); --top: max(10px, env(safe-area-inset-top)); --bottom: max(10px, env(safe-area-inset-bottom)); --radar-size: 124px; --radar-rim: 16px; }
  #landing { padding-block: 14px; }
  .landing-crest svg { width: 33px; padding: 6px; }
  #main-menu { gap: 6px; margin-top: 14px; }
  .menu-button { min-height: 42px; padding-block: 4px; }
  .menu-sail { min-height: 55px; }
  .menu-button .menu-glyph { width: 28px; height: 28px; }
  .menu-sail .menu-glyph svg { width: 18px; height: 18px; }
  .menu-button small { margin-top: 2px; }
  .menu-dock { padding-block: 5px; }
  .pause-ship { min-height: 49px; padding-block: 6px; }
  .pause-links button { min-height: 29px; }
  h1 { font-size: clamp(46px, 8vw, 84px); margin-top: 10px; }
  #charter p { margin: 5px 0 11px; font-size: 12px; line-height: 1.37; }
  #charter input, #charter .primary { height: 37px; }
  .masthead .mark { width: 29px; height: 29px; }
  .masthead .mark svg { width: 20px; height: 20px; }
  .radar-rose { font-size: 8px; }
  .captain-hud { width: clamp(170px, 30vw, 250px); gap: 5px; }
  .ship-card { padding: 7px 9px; gap: 5px; }
  .ship-heading { gap: 7px; }
  .ship-emblem { width: 40px; height: 36px; }
  .ship-emblem canvas { width: 35px; height: 27px; }
  .ship-details strong { font-size: 17px; }
  .ship-class { margin: 2px 0; font-size: 9px; }
  .rank-insignia { flex-basis: 34px; min-height: 38px; }
  .rank-insignia b { font-size: 18px; }
  .stat-track { height: 6px; }
  .gold-medallion { width: 30px; height: 30px; }
  .gold-medallion svg { width: 22px; height: 22px; }
  .nav-button { min-height: 39px; padding: 5px 8px; font-size: 11px; gap: 5px; }
  .action, .crew-hud { min-height: 48px; min-width: 46px; padding: 3px 5px; }
  .fire { min-width: 72px; }
  .action svg, .crew-hud svg { width: 18px; height: 18px; }
  .fire kbd { right: 3px; }
  #missions { padding: 12px; }
  .mission-overall { padding: 6px 9px; gap: 4px; }
  .mission-tabs { margin-top: 7px; }
  .mission-tabs button { min-height: 32px; font-size: 11px; }
  .mission-book { gap: 8px; margin-top: 8px; }
  .mission-entry { min-height: 33px; padding: 4px 6px; }
  .mission-page { min-height: 0; padding: 10px; }
  .zone-title { font-size: 21px; }
  .target { gap: 5px; padding: 7px; }
  .target-crest { width: 31px; height: 31px; }
  .target-readings > div { min-height: 32px; }
  #chart, #shop, #colors { padding: 13px; }
  .chart-layout { gap: 9px; margin-top: 8px; }
  .region-frame { height: clamp(115px, 47dvh, 215px); }
  #overview-frame { height: clamp(90px, 26dvh, 132px); }
  #atlas-sectors { height: 82px; }
  .chart-emblem { width: 32px; height: 32px; }
  .chart-legend { gap: 3px 7px; font-size: 9px; }
  .chart-passages, .chart-exits button { font-size: 9px; }
  .sector-header, .harbor-picker { margin-top: 4px; }
  #expeditions { padding: 12px; }
  .expedition-banner { min-height: 77px; padding: 11px 13px; }
  .expedition-layout { gap: 8px; margin-top: 8px; }
  .expedition-page { padding: 10px; }
  .expedition-reward { margin-top: 9px; }
}
@media (max-height: 355px) and (orientation: landscape) {
  #landing { padding-left: clamp(16px, 3.5vw, 35px); }
  .landing-crest { display: none; }
  h1 { font-size: clamp(45px, 8vw, 60px); }
  #charter input, #charter .primary { height: 33px; }
  #charter p { margin-bottom: 8px; }
  #charter .primary, .charter-colors { margin-top: 6px; }
  .charter-colors { min-height: 34px; }
  .chart-footer { margin-top: 8px; }
}
@media (max-width: 615px) {
  h1 { font-size: clamp(40px, 11vw, 73px); }
  #main-menu { width: min(330px, 84vw); }
  #landing:has(#pause-voyage:not([hidden])) { flex-wrap: wrap; align-content: center; gap: 12px; }
  #pause-voyage { position: relative; inset: auto; width: min(330px, 84vw); }
  .pause-ship { min-height: 0; padding: 4px 7px; }
  .pause-links { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pause-links button:last-child { grid-column: auto; }
}
@media (max-width: 615px) and (max-height: 445px) {
  #landing:has(#pause-voyage:not([hidden])) { align-content: start; }
  #pause-voyage { position: absolute; left: calc(58vw + 5px); right: 11px; width: auto; bottom: 14px; }
  #landing:has(#pause-voyage:not([hidden])) #main-menu { width: min(325px, 52vw); }
  .pause-links { grid-template-columns: 1fr; }
  .pause-links button { min-height: 26px; }
}
@media (max-height: 390px) and (orientation: landscape) {
  h1 { font-size: clamp(39px,7.6vw,55px); }
  #main-menu { margin-top: 10px; }
  .menu-tools .menu-button small { display: none; }
}
@media (max-width: 1020px) {
  #hint { display: none; }
}
@media (max-width: 830px) {
  .zone-title { font-size: 19px; }
  .treasury { min-width: 0; right: var(--right); top: calc(var(--top) + var(--radar-size) + 7px); padding: 5px 9px 5px 5px; }
  .target { top: calc(var(--top) + var(--radar-size) + 60px); }
  .navigation kbd { display: none; }
}
@media (pointer: coarse) {
  .navigation kbd, .fire kbd, #hint { display: none; }
}
@media (max-width: 720px) {
  .sea-node small { display: none; }
  .sea-node { grid-template-rows: 16px; min-height: 20px; }
  .chart-layout { grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); }
  .deck-nav, .actions { padding: 4px; gap: 4px; }
  .gun-settings { gap: 4px; }
  .nav-button { padding-inline: 5px; }
  .nav-button svg { width: 16px; height: 16px; }
  #open-expeditions > span { display: none; }
}
@media (max-width: 530px) {
  .option-layout, .expedition-layout { grid-template-columns: minmax(0,1fr); }
  #expedition-list { height: min(142px, 29dvh); }
  .shop-banner { padding: 13px; min-height: 111px; }
  #shop-tabs { gap: 4px; }
  #shop-tabs button { padding-inline: 6px; font-size: 11px; }
  #shop-tabs svg { width: 14px; height: 14px; }
  .deck-mount { min-width: 44px; min-height: 44px; padding: 3px; }
  .deck-mount svg { width: 16px; height: 16px; }
  .ship-cutaway[data-mounts="5"] .deck-mount span { font-size: 8px; }
  .mission-book { grid-template-columns: 1fr; }
  .mission-list { height: min(145px, 31dvh); }
  .mission-tabs button svg { display: none; }
}
@media (max-width: 620px) {
  .color-editor { grid-template-columns: 1fr; }
  .vessel-stage { aspect-ratio: 1.55; }
  .vessel-stage::before { inset: 9% 26%; }
  .vessel-stage::after { inset: 19% 32%; }
  .vessel-stage canvas { width: min(100%, 350px); margin-inline: auto; }
  .cloth-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .color-actions { flex-wrap: wrap; }
  #magazine { padding: 11px; }
  .magazine-header { min-height: 86px; padding: 10px; gap: 7px; }
  .magazine-layout { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #magazine-mounts { grid-template-columns: repeat(auto-fit,minmax(min(100%,105px),1fr)); }
}
@media (orientation: portrait) and (max-width: 700px) {
  #portrait { display: grid; position: fixed; inset: 0; z-index: 8; place-items: center; padding: 28px; text-align: center; color: var(--gold); background: #10212cf0; font: 24px var(--serif); }
}
