/* Rustland voyage theme. Shared palette and surfaces; gameplay views own layout. */
:root {
  color-scheme: dark;
  --bg: #101b1c; --panel: #192a2b; --panel2: #223536;
  --ink: #e9dfc8; --dim: #b1b9ae; --sand: #d4b478;
  --brass-hi: #dbc18c; --line: #425754; --good: #8fc6ad; --bad: #ed9a82;
  --water: #89c8d0; --rust: #c99467; --edge: #0c1718;
  --engrave: 0 1px 1px #071112; --emboss-dark: none;
  --ui-border: #7b7556; --ui-faint: #42575480;
  --ui-shadow: 0 18px 64px #030e12bd, inset 0 0 0 1px #b99a6033;
  --steel: url(../art/ui/v2/enamel.webp) center / 464px;
  --plate-bg: linear-gradient(180deg,#263a39f5,#132324f5);
}
* { scrollbar-color: #7a896f #132223; scrollbar-width: thin; }
::selection { background: #526956; color: #fff7e6; }
::-webkit-scrollbar-thumb { background: #6b7d70; border-color: #142324; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button {
  border: 1px solid #65736a; border-image: none; border-radius: 3px;
  background: linear-gradient(180deg,#304642,#213432); color: var(--ink);
  box-shadow: inset 0 1px #ffffff0c, 0 2px 3px #08141555;
  padding: 7px 13px; min-height: 36px; text-shadow: none; line-height: 1.45;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover:not(:disabled) { filter: none; background: #3b5149; border-color: #cab17b; box-shadow: inset 0 1px #ffffff14; }
button:active:not(:disabled) { border-image: none; filter: none; transform: translateY(1px); background: #172b29; }
button:disabled { opacity: .58; filter: none; cursor: default; }
button.primary, .naval-controls .naval-primary, .naval-controls [data-ndone] {
  background: linear-gradient(180deg,#d2b378,#ad8b50); border-color: #deca99;
  color: #182521; text-shadow: none; font-weight: 700; box-shadow: inset 0 1px #fff3;
}
button.primary:hover:not(:disabled), .naval-controls .naval-primary:hover:not(:disabled) { background: #e0c58e; }
button.active, button[aria-pressed=true], .tabs button.active {
  color: #f1dcac; background: #34463b; border-color: #bea371; text-shadow: none;
  box-shadow: inset 0 -2px #c9ab70;
}
button.danger { color: #ffd2be; background: #593a31; border-color: #ac7863; text-shadow: none; }
button.ghost { background: transparent; box-shadow: none; border-color: transparent; }
:is(button,input,select,summary,[tabindex]):focus-visible { outline: 2px solid #f0cc80; outline-offset: 3px; }
input[type=text], input[type=number], select {
  color: var(--ink); background: #112223; border: 1px solid #63776d; border-radius: 3px;
  padding: 8px 10px; font: inherit; box-shadow: inset 0 2px 4px #0002; max-width: 100%; min-width: 0;
}
select option { background: #172b2a; color: var(--ink); }
input[type=text]:focus, select:focus { border-color: #d4b478; box-shadow: 0 0 0 2px #d4b47833; }
input[type=checkbox], input[type=range], progress, meter { accent-color: #c4aa73; }
input[type=checkbox] { width: 17px; height: 17px; flex-shrink: 0; }
[hidden] { display: none !important; }

/* The generated border occupies only the perimeter. Content stays low contrast. */
.panel, .title-menu .menu {
  border: 12px solid #53645b;
  border-image: url(../art/ui/v2/panel-frame.webp) 48 / 12px stretch;
  background: linear-gradient(135deg,#213433f5,#152627fa), var(--steel);
  background-origin: border-box; border-radius: 5px; box-shadow: var(--ui-shadow);
}
.panel { padding: 22px 26px 26px; max-height: 91dvh; line-height: 1.7; }
#screen { background: #071417c9; }
.panel h2 {
  color: #eddbaf; background: none; border: 0; border-image: none;
  padding: 0; margin: 0 0 16px; min-height: 0; line-height: 1.45;
  font-size: 26px; letter-spacing: .12em; text-shadow: 0 2px 8px #07111280; filter: none;
}
.panel h2 .tag { vertical-align: middle; box-shadow: none; border-color: #647365; background: #142727d9; }
.panel h2 small, .panel h2 .dim { color: var(--dim); }
.panel h3 { font-size: 15px; letter-spacing: .08em; padding: 0 0 9px; border-bottom: 1px solid var(--ui-faint); box-shadow: none; text-shadow: none; }
.panel h3::before { display: none; }
.panel h4 { color: var(--brass-hi); }
.panel .dim { color: var(--dim); }
.panel p { overflow-wrap: anywhere; }
.tag { color: #bfc9b8; border: 1px solid #52675d; background: #182c29; border-radius: 3px; box-shadow: none; padding: 2px 7px; }
.panel p.greeting { background: #233c35; border-color: #b39b69; color: #d5d9bc; box-shadow: none; }
.ui-kicker { color: #c2ad7b; font-size: 11px; letter-spacing: .24em; margin-bottom: 9px; }
.ui-hero { padding: 24px; margin: -10px -14px 18px; min-height: 142px; border-bottom: 1px solid #9c885e; background: linear-gradient(90deg,#102525df,#10252555),url(../art/ui/v2/ledger-banner.webp) center / cover; }
.ui-hero h2 { margin-bottom: 8px; font-size: 30px; }
.ui-hero p { color: #d4d7c2; max-width: 75%; font-size: 12px; }
.party-panel { width: min(1080px,96vw); }
.party-panel > .close { position: absolute; top: 23px; right: 25px; }
.ui-summary, .ui-market-summary { display: flex; gap: 1px; margin: 0 0 18px; border: 1px solid #52675b; background: #52675b; border-radius: 3px; overflow: hidden; }
.ui-summary > span, .ui-market-summary > span { flex: 1; padding: 12px 16px; background: #1b302e; color: #b2bfae; font-size: 12px; }
.ui-summary b, .ui-market-summary b { display: block; font: 600 22px/1.4 var(--f-num); color: #e5d3a4; }
.ui-market-summary { max-width: 430px; margin-top: 18px; }
.ui-market-summary > span { padding: 8px 16px; }

/* Distinct levels of navigation: settlement rail, then compact section switches. */
.tabs, .comp-tabs, .ui-section-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 14px 0 20px;
  background: #0f2122; border: 1px solid #435c52; border-radius: 4px; box-shadow: none;
}
.tabs button, .ui-section-tabs button, .comp-tabs button { padding: 8px 14px; background: transparent; border-color: transparent; color: #bdc8b6; box-shadow: none; }
.tabs button.active, .ui-section-tabs button[aria-pressed=true], .comp-tabs button.active { background: #34453b; border-color: #8d805a; color: #f1dcac; box-shadow: inset 0 -2px #c8aa6f; }
.ui-section-tabs { background: transparent; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.ui-sections > section { min-width: 0; animation: section-in .18s ease-out; }
@keyframes section-in { from { opacity: .6; transform: translateY(3px); } }
.settlement-tabs [data-wait] { font-size: 12px; color: #b6bda8; }
.settlement-panel { width: min(1080px,96vw); }
.town-banner { height: 165px; margin: -10px -14px 16px; border: 1px solid #63715a; border-radius: 2px; box-shadow: none; }
.panel > .town-banner + .close + h2, .panel > .town-banner + h2 { margin: -57px 12px 20px; padding: 8px 13px; background: #102524ec; border-left: 3px solid #d2b779; max-width: calc(100% - 24px); }
.panel:has(> .town-banner) > .close { top: 23px; right: 26px; }

/* Tables scroll within their section; the surrounding panel never widens. */
.ui-table-scroll { max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid #3f584e; border-radius: 3px; }
.ui-table-scroll table { margin: 0; border: 0; width: 100%; }
table { border-collapse: collapse; box-shadow: none; }
th { color: #d9c290; background: #142725; text-shadow: none; font-size: 12px; letter-spacing: .04em; }
td, th { padding: 10px 12px; border-bottom: 1px solid #48605266; }
td { font-size: 13px; background: #1d322e55; }
tr:nth-child(even) td { background: #263e354d; }
tr:hover > td { background: #3b514040; }
td button { padding: 5px 9px; min-height: 32px; margin: 2px; font-size: 12px; white-space: nowrap; }
td button + button { margin-left: 2px; }
.ui-table-scroll td:last-child { min-width: 100px; }
.ui-table-scroll td:first-child { min-width: 90px; }
.ui-table-scroll select { max-width: 240px; }
.ui-upgrade-option { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 3px 8px 3px 0; }
.ui-upgrade-option small { padding-left: 3px; font-size: 11px; }
#party-crew td:last-child { width: 44%; }
.card, .gear-stock > *, .fish-dex-cell, .comp-candidates article, .comp-kit > div,
.village-plot, .village-aid article, .ship-job-card, .naval-fit-ship {
  background: linear-gradient(145deg,#2a3e34,#1c302c); border: 1px solid #5d715c;
  border-radius: 4px; box-shadow: inset 0 1px #d7c3940c;
}
.card { padding: 18px; }
.card.sel { border-color: #ccb17a; background: #354939; box-shadow: inset 0 0 0 1px #ccb17a44; }
.card.sel::after { color: #e6cc92; }
.gear-stock { gap: 10px; }
.gear-stock > * { padding: 12px; }
.naval-fit-ship { padding: 16px; }
.comp-summary { border-color: #65745b; background: #2a3d3066; border-radius: 4px; }
.comp-panel, .ship-jobs-panel, .troop-codex { color: var(--ink); }
.comp-header, .ship-jobs-header, .troop-title { border-bottom-color: #637254; }
.comp-roster > button, .ship-jobs-fleet button, .troop-card { background: #20372f; border: 1px solid #566c58; color: #e1ddc2; border-image: none; }
.comp-roster > button.active, .ship-jobs-fleet button.active, .troop-card.selected { background: #394d38; border-color: #d5b77e; }
.comp-duty, .comp-ship-duty, .comp-traits > *, .troop-detail { border-color: #526c57; }
.ship-job-heading { align-items: center; }
.ship-jobs-header { padding: 24px; margin: -10px -10px 0; min-height: 150px; background: linear-gradient(90deg,#152b29ee,#152b2955),url(../art/ui/v2/harbor-banner.webp) center / cover; border-bottom: 1px solid #9c885e; }
.ship-jobs-header p { max-width: 420px; color: #ccd4bd; }
.ship-jobs-header > div:last-child { flex-shrink: 0; }
.ship-job-heading > div { min-width: 0; }
.ship-job-card h3 { border-bottom: 0; padding: 0; }
.ship-job-icon { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.ship-job-card.filled { border-color: #b19b68; }
.ship-job-number { color: #cfb783; }
.ship-job-status { border-radius: 3px; }
.village-status { border-color: #5d7159; background: #20382e; }
.village-number { color: #c1ab78; }
.village-plot { color: var(--ink); }
.village-plot p { color: #c5ccb4; }
.village-plot .dim { color: #9fb09a; }
.village-plot .good { color: #9bd0a8; }
.village-plot.empty { background: #152c28; border: 1px dashed #688068; }
.village-plot.damaged { border-color: #be8064; }
.troop-preview, .comp-preview { background: radial-gradient(ellipse at 50% 85%,#69735c,#1d342d 70%); }

/* Existing illustrated skill medallions remain the visual focus. */
.character-panel { background: linear-gradient(135deg,#22382ff5,#152727fa),var(--steel); }
.skill-eyebrow { color: #c5b27d; }
.skill-nav button { border-image: none; border-color: #526a56; background: #1d342d; box-shadow: none; padding: 13px; }
.skill-nav button.active { background: #364b36; border-color: #c5aa70; box-shadow: inset 3px 0 #d5b77e; }
.skill-current { border-color: #8bb29a; background: #294637; border-radius: 0 4px 4px 0; }
.skill-perk { border-image: none; background: linear-gradient(135deg,#30432e,#23382d); border-color: #76805a; box-shadow: inset 0 1px #d0c29112; }
.skill-perk:disabled { opacity: .72; }
.skill-perk.selected:disabled { opacity: 1; filter: none; background: #3b4f33; border-color: #d5ba79; box-shadow: inset 0 0 0 1px #d5ba7933; }
.skill-perk strong { color: #ead1a0; }
.skill-perk small { color: #c0c8ad; }
.skill-heading h3 { border: 0; padding: 0; margin: 0; }
progress { border: 0; border-radius: 3px; overflow: hidden; background: #0d211f; }
progress::-webkit-progress-bar { background: #0d211f; }
progress::-webkit-progress-value { background: linear-gradient(90deg,#738d68,#c5b678); }
progress::-moz-progress-bar { background: #b6ae70; }

/* Map HUD: thin salvaged metal instruments with readable numbers. */
.plate, .frame-plate, #wind, #hud-side, #forage-row .bar, #side-buttons, #toast {
  border: 1px solid #837c59; border-image: none; border-radius: 4px;
  background: linear-gradient(180deg,#273d38f5,#132927f5);
  box-shadow: 0 4px 15px #06141666, inset 0 1px #d9cf9b14;
}
#hud-top { top: 12px; left: 14px; right: 14px; gap: 6px; }
#clock { padding: 10px 12px; gap: 9px; min-width: 178px; }
#clock .ico { width: 27px; height: 27px; padding: 5px; box-shadow: 0 0 0 1px #ae9561; background: #132925; }
#clock .day { font-size: 19px; }
#clock .time { color: #e1d5ac; font-size: 16px; text-shadow: none; background: #102621; padding: 4px 7px; box-shadow: none; }
#res { padding: 6px; justify-content: space-around; }
#res .chip { gap: 6px; padding: 4px 7px; border-radius: 3px; }
#res .chip .ico { width: 24px; height: 24px; padding: 1px; background: none; box-shadow: none; filter: none; }
#res .chip .v { gap: 3px; }
#res .chip b { font-size: 17px; color: #eee6cf; text-shadow: none; }
#res .chip small { color: #adbdac; font-size: 10px; letter-spacing: .04em; }
#res .chip + .chip::before { width: 1px; background: #7e8d6244; box-shadow: none; }
#res .chip.low b { color: #ffc0a4; }
#wind { padding: 8px 12px; font-size: 12px; color: #d6c28c; text-shadow: none; }
#speedbar { padding: 6px; gap: 4px; }
#speedbar button { padding: 6px 8px; min-height: 32px; }
#hud-side { top: 88px; width: 284px; right: 14px; padding: 12px 9px; max-height: calc(100dvh - 205px); }
#travel h3 { color: #e7d4a1; border: 0; border-image: none; background: none; padding: 0 36px 10px 0; margin: 0 8px 10px; min-height: 0; border-bottom: 1px solid #677c594d; font: 700 15px/1.6 var(--f-head); text-shadow: none; }
#travel-fold { color: #d7c395; top: 8px; right: 9px; min-height: 28px; }
#travel .row { padding: 4px 0; }
#travel .note { font-size: 12px; color: #b4c1ac; margin-bottom: 4px; }
#travel .warn { padding: 6px 8px; border-color: #d7946c; background: #623e293f; color: #ffc5a8; }
#forage-row .bar, #side-buttons { padding: 8px; gap: 7px; }
#side-buttons { right: 14px; bottom: 14px; }
#side-buttons button { min-width: 54px; width: auto; padding: 6px 10px; }
#side-buttons span { display: inline; }
#side-buttons .ico, button.act .ico { filter: none; width: 21px; height: 21px; }
button.act { min-width: 86px; padding: 8px 12px; }
button[data-key]::after { background: #c1ad7e; color: #23332a; text-shadow: none; box-shadow: 0 1px 3px #0006; border: 1px solid #e0cea0; top: -7px; right: -4px; }
#forage-row .note { background: #102b27eb; color: #d9dfc6; border: 1px solid #5c7358; border-radius: 3px; padding: 4px 12px; text-shadow: none; }
.map3d-label.town, .map3d-label.town.hover { background: #18332de8; border: 1px solid #8b9168; border-bottom: 2px solid var(--fc,#b99e6a); padding: 2px 10px; box-shadow: 0 2px 5px #0006; text-shadow: 0 1px 2px #000; }
.map3d-label.town.hover { background: #3a5140; filter: none; }
.map3d-tip { background: #102824e8; color: #e2ddbd; border: 1px solid #657856; padding: 5px 10px; }

/* Battle and work surfaces share the same metalwork without covering the world. */
.naval-battle, .boarding-screen { background: #152b29; border-color: #8b865c; color: var(--ink); }
.naval-top, .deck-top { background: #20392e; border-color: #718060; }
.naval-controls, .deck-panel { background: #19302b; border-color: #536b50; }
.naval-footer, .deck-footer { background: #112723; border-color: #425e49; color: #b6c3a6; }
.naval-battle button, .naval-battle select, .boarding-screen button, .boarding-screen select { border-image: none; border-color: #657d5f; background: #2a4434; color: #e8dfc4; border-radius: 3px; text-shadow: none; }
.naval-top h2, .deck-top h2 { color: #e7ce93; }
.sea-work-header, .fish-panel > h2 { border-bottom-color: #75815b; }
.sea-work-caption, .deck-objective { background: #122c26d9; border-color: #859169; }
.sea-work-steps > span { border-color: #5d7759; }
.harvest-result { background: linear-gradient(120deg,#334c33,#172e27); border-color: #b29a62; border-radius: 4px; }
.fish-chip { background: #1c372c; border-color: #5d7556; border-radius: 3px; padding: 5px 9px; }
.battle-result { border: 1px solid #ad9764; background: #294332; padding: 15px; border-radius: 3px; }
.battle-result[hidden] { display: none; }
.alert-box { border-image: none; border: 1px solid #b38365; background: #29352a; }
.alert-box h2 { color: #f0c396; }
.alert-item { border-color: #d99570; background: #713e2429; }
#toast { padding: 12px 20px; color: #eee0ba; text-shadow: none; }
#hint-card { transform: none; border: 1px solid #c1ad7b; background: #e3d4ae; color: #293c2e; box-shadow: 0 8px 30px #001a1955; }
#hint-card::before { display: none; }
#hint-card p, #hint-card .t { font-family: var(--f-body); }
.log-list { background: linear-gradient(90deg,transparent 24px,#ab77534d 24px,#ab77534d 25px,transparent 25px),#ddd2ac; color: #263f33; box-shadow: none; border: 1px solid #9f9d76; }
.log-list > div { border-color: #8c9e7955; padding-top: 8px; padding-bottom: 8px; }
.log-list .dim { color: #5b634c; }
.set-row { padding: 8px 0; border-bottom: 1px solid #4e68513b; }
.settings .keys .row { border-color: #4e68513b; }
.title-menu .logo { background: none; -webkit-text-stroke: 0; color: #e3ce99; text-shadow: 0 3px #304335,0 9px 28px #061b14; filter: none; letter-spacing: .16em; }
.title-menu .tagline { color: #d6d5b5; letter-spacing: .25em; }
.title-menu .menu { width: 350px; padding: 22px; gap: 10px; }
.title-menu .menu button { min-height: 45px; }
.title-menu .build { color: #bac8b2; }
body[data-screen=title] #screen { background: linear-gradient(90deg,#0b231caa,#0b231c44,#0b231c99); }
body[data-screen=title] #screen::after { opacity: .15; }

@media (max-width:1200px) {
  #clock { min-width: 0; padding: 8px; gap: 6px; }
  #res .chip { padding: 4px; gap: 4px; }
  #res .chip b { font-size: 15px; }
  #wind { padding: 6px; }
}
@media (max-width:1000px) {
  #hud-top { flex-wrap: wrap; }
  #res { order: 4; flex-basis: 100%; }
  #speedbar { margin-left: auto; }
  #wind { margin-left: auto; }
  #wind + #speedbar { margin-left: 0; }
  #hud-side { top: 136px; max-height: calc(100dvh - 248px); }
  #side-buttons { bottom: 12px; }
  #forage-row { left: 14px; transform: none; align-items: flex-start; bottom: 12px; }
}
@media (max-width:650px) {
  .panel { width: calc(100vw - 12px); max-height: 95dvh; border-width: 8px; border-image-width: 8px; padding: 16px 12px; }
  .panel h2 { font-size: 22px; letter-spacing: .06em; }
  .panel h3 { font-size: 14px; }
  .panel > .close { margin-left: 6px; }
  .ui-hero { margin: -8px -6px 14px; padding: 19px 16px; min-height: 128px; }
  .ui-hero p { max-width: 80%; }
  .party-panel > .close { top: 15px; right: 17px; }
  .ui-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .ui-summary > span { padding: 9px 13px; }
  .ui-summary b { font-size: 20px; }
  .ui-section-tabs { gap: 5px; }
  .ui-section-tabs button { flex: 1 1 40%; padding: 8px 5px; font-size: 12px; }
  .tabs button { padding: 8px 11px; flex-grow: 1; }
  .tabs [data-wait] { margin-left: 0; }
  .town-banner { height: 140px; margin: -8px -6px 16px; }
  .panel > .town-banner + .close + h2 { margin: -47px 4px 16px; font-size: 18px; max-width: calc(100% - 8px); }
  .panel:has(> .town-banner) > .close { top: 16px; right: 18px; }
  td, th { padding: 9px; }
  .ui-table-scroll table { min-width: 480px; }
  .ui-table-scroll::before { content: '↔ 表格可左右滑动'; display: block; position: sticky; left: 0; width: fit-content; padding: 5px 9px; color: #afbea9; font-size: 10px; }
  .site-table { min-width: 0 !important; }
  .name-row { display: flex; flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; }
  .card { width: auto; min-width: 0; }
  .character-panel .skill-nav button { padding: 9px; }
  .skill-perk { padding: 12px; }
  .ship-job-icon { width: 44px; height: 44px; }
  .ship-jobs-header { margin: -6px -4px 0; padding: 16px; }
  .ship-jobs-header > div:last-child { flex-direction: row; }
  #hud-top { top: 6px; left: 6px; right: 6px; gap: 4px; }
  #clock { gap: 5px; padding: 7px; }
  #clock .ico { width: 22px; height: 22px; padding: 4px; }
  #clock .day { font-size: 16px; }
  #clock .time { font-size: 14px; padding: 2px 4px; }
  #wind { font-size: 11px; }
  #speedbar { padding: 4px; gap: 2px; }
  #speedbar button { padding: 5px; min-width: 29px; min-height: 30px; }
  #res { flex-wrap: wrap; justify-content: flex-start; padding: 5px; gap: 4px 0; }
  #res .chip { flex: 0 0 25%; gap: 6px; padding: 3px 6px; }
  #res .chip small { display: block; font-size: 9px; }
  #res .chip b { font-size: 14px; }
  #res .chip .ico { width: 19px; height: 19px; }
  #res .chip + .chip::before { display: none; }
  #hud-side { top: 194px; right: 6px; width: 214px; max-height: calc(100dvh - 400px); padding: 10px 4px; }
  #hud-side:has(#travel .warn) { border-color: #ac9269; }
  #travel h3 { font-size: 13px; }
  #travel .row { font-size: 11px; padding: 2px 0; }
  #travel .row b { font-size: 13px; }
  #travel .note, #travel .warn { font-size: 11px; }
  #side-buttons { bottom: max(7px,env(safe-area-inset-bottom)); right: 6px; left: 6px; padding: 6px; justify-content: space-around; }
  #side-buttons button { flex: 1; min-width: 0; font-size: 11px; padding: 5px 8px; }
  #side-buttons .ico { width: 18px; height: 18px; }
  #forage-row { left: 6px; bottom: calc(82px + env(safe-area-inset-bottom)); right: 6px; align-items: center; }
  #forage-row .note { max-width: 90vw; font-size: 11px; }
  #forage-row .bar { padding: 5px; gap: 6px; }
  button.act { min-width: 78px; padding: 5px 9px; font-size: 11px; }
  button.act .ico { width: 19px; height: 19px; }
  #toast { max-width: calc(100vw - 24px); width: max-content; top: 155px; padding: 10px 14px; font-size: 12px; }
  #hint-card { left: 12px; bottom: 160px; width: calc(100vw - 24px); max-width: 350px; }
  .title-menu .logo { font-size: clamp(42px,11vw,68px); }
  .title-menu .tagline { font-size: 11px; letter-spacing: .08em; text-align: center; }
  .title-menu .tagline::before, .title-menu .tagline::after { display: none; }
  .title-menu .menu { width: min(330px,92vw); padding: 18px; }
  .keys .row > span:first-child { min-width: 94px; }
  .comp-header, .ship-jobs-header { flex-wrap: wrap; gap: 12px; }
  .comp-summary { padding: 12px; }
  .naval-battle, .boarding-screen { border-width: 0; }
}
@media (max-width:370px) {
  #clock { padding: 6px 4px; }
  #clock .day small { font-size: 10px; }
  #wind { padding: 4px; font-size: 10px; }
  #wind .arr { display: none; }
  #res .chip { padding: 3px; gap: 4px; }
  #res .chip b { font-size: 12px; }
  #speedbar { gap: 1px; }
  #speedbar button { min-width: 25px; padding: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-reduced-motion: reduce) { #title-bg .a { opacity: 1; transform: none; } }
