/* Shared board tokens and the existing theme palettes dress the whole map. */
:root {
  --map-water: #e3f0f7;
  --map-land: #ffffff;
  --map-land-stroke: #bfd8e4;
  --map-street: #cfe0eb;
  --map-street-casing: #eef5f9;
  --map-bridge: #004e72;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #001d41;
  --map-seamark-buoy-green: #0fa958;
  --map-seamark-buoy-red: #e03131;
  --map-seamark-light: #f59f00;
  --map-seamark-channel: rgba(0, 78, 114, 0.22);
}

:root[data-theme="night"] {
  --map-water: #0b1522;
  --map-land: #152232;
  --map-land-stroke: #25394f;
  --map-street: #283e57;
  --map-street-casing: #101c2b;
  --map-bridge: #4da3ff;
  --map-bridge-casing: #101c2b;
  --map-bridge-label: #8ec3ff;
  --map-seamark-buoy-green: #00e676;
  --map-seamark-buoy-red: #ff3366;
  --map-seamark-light: #ffd54f;
  --map-seamark-channel: rgba(77, 163, 255, 0.25);
}
:root[data-theme="night"] .tiles {
  filter: invert(1) hue-rotate(195deg) brightness(.72) contrast(1.18) saturate(.8);
  opacity: .75;
}

:root[data-theme="hacker"] {
  --map-water: #010a04;
  --map-land: #041a09;
  --map-land-stroke: #00ff66;
  --map-street: #0a3d16;
  --map-street-casing: #020b04;
  --map-bridge: #00ff66;
  --map-bridge-casing: #000000;
  --map-bridge-label: #00ff66;
  --map-seamark-buoy-green: #00ff66;
  --map-seamark-buoy-red: #ff1144;
  --map-seamark-light: #00ff66;
  --map-seamark-channel: rgba(0, 255, 102, 0.3);
}
:root[data-theme="hacker"] .tiles {
  filter: invert(1) hue-rotate(85deg) brightness(.65) contrast(1.4) saturate(3);
  opacity: .55;
}

:root[data-theme="kuromi"] {
  --map-water: #130f1c;
  --map-land: #201a2d;
  --map-land-stroke: #45375e;
  --map-street: #2f2543;
  --map-street-casing: #161122;
  --map-bridge: #d946ef;
  --map-bridge-casing: #161122;
  --map-bridge-label: #f0abfc;
  --map-seamark-buoy-green: #2dd4bf;
  --map-seamark-buoy-red: #f43f5e;
  --map-seamark-light: #ec4899;
  --map-seamark-channel: rgba(217, 70, 239, 0.25);
}
:root[data-theme="kuromi"] .tiles {
  filter: invert(1) hue-rotate(240deg) brightness(.68) contrast(1.25) saturate(1.2);
  opacity: .7;
}

:root[data-theme="windows-xp"] {
  --map-water: #bfe1f8;
  --map-land: #f4f7ea;
  --map-land-stroke: #8fb678;
  --map-street: #d6e2cb;
  --map-street-casing: #f8faf2;
  --map-bridge: #275294;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #275294;
  --map-seamark-buoy-green: #2e7d32;
  --map-seamark-buoy-red: #c62828;
  --map-seamark-light: #ffb300;
  --map-seamark-channel: rgba(39, 82, 148, 0.25);
}
:root[data-theme="windows-xp"] .tiles {
  filter: saturate(1.15) contrast(1.08);
  opacity: .9;
}

:root[data-theme="hello-kitty"] {
  --map-water: #eef3ff;
  --map-land: #fff3f6;
  --map-land-stroke: #ffccd8;
  --map-street: #fddde5;
  --map-street-casing: #ffffff;
  --map-bridge: #d6336c;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #a61e4d;
  --map-seamark-buoy-green: #20c997;
  --map-seamark-buoy-red: #ff6b8b;
  --map-seamark-light: #ffd43b;
  --map-seamark-channel: rgba(214, 51, 108, 0.22);
}
:root[data-theme="hello-kitty"] .tiles {
  filter: hue-rotate(-15deg) saturate(.95) brightness(1.02);
  opacity: .88;
}

:root[data-theme="cinnamoroll"] {
  --map-water: #e3f5fc;
  --map-land: #ffffff;
  --map-land-stroke: #bde4f7;
  --map-street: #e0f2fb;
  --map-street-casing: #ffffff;
  --map-bridge: #339af0;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #1c7ed6;
  --map-seamark-buoy-green: #38d9a9;
  --map-seamark-buoy-red: #ff8787;
  --map-seamark-light: #ffe066;
  --map-seamark-channel: rgba(51, 154, 240, 0.25);
}
:root[data-theme="cinnamoroll"] .tiles {
  filter: hue-rotate(10deg) saturate(1.05) brightness(1.02);
  opacity: .88;
}

:root[data-theme="pompompurin"] {
  --map-water: #e2f6f8;
  --map-land: #fffbee;
  --map-land-stroke: #fae498;
  --map-street: #fcf1cb;
  --map-street-casing: #ffffff;
  --map-bridge: #b45309;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #78350f;
  --map-seamark-buoy-green: #10b981;
  --map-seamark-buoy-red: #ef4444;
  --map-seamark-light: #f59e0b;
  --map-seamark-channel: rgba(180, 83, 9, 0.25);
}
:root[data-theme="pompompurin"] .tiles {
  filter: sepia(.2) saturate(.95);
  opacity: .88;
}

:root[data-theme="burger-king"] {
  --map-water: #f3ede2;
  --map-land: #fff8ee;
  --map-land-stroke: #e5d4be;
  --map-street: #ecd7bf;
  --map-street-casing: #ffffff;
  --map-bridge: #502314;
  --map-bridge-casing: #ffffff;
  --map-bridge-label: #502314;
  --map-seamark-buoy-green: #2b6e3f;
  --map-seamark-buoy-red: #d62300;
  --map-seamark-light: #fca311;
  --map-seamark-channel: rgba(80, 35, 20, 0.25);
}
:root[data-theme="burger-king"] .tiles {
  filter: sepia(.15) saturate(1.1);
  opacity: .88;
}


html, body { height: 100%; margin: 0; overflow: hidden; }
.map-body {
  height: 100dvh; display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  background: var(--canvas); color: var(--ink);
}
.map-heading {
  grid-column: 1 / -1; margin: 0; padding: calc(16px + env(safe-area-inset-top)) 24px 16px;
  gap: 16px; border-bottom: 1px solid var(--line); background: var(--card);
}
.map-heading-copy { margin-right: auto; min-width: 0; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.map-heading h1 { margin: 5px 0 0; font-size: 28px; line-height: 1.1; text-transform: none; letter-spacing: -.025em; }
.back-icon { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-heading .board-state { gap: 8px; }
.map-heading { flex-wrap: nowrap; }
.map-heading .board-state { flex: 0 0 auto; flex-wrap: nowrap; }
.map-heading .status, .map-heading .route-count { padding: 8px 10px; font-size: 12px; border-radius: 999px; }
.status[data-state="loading"] i, .status[data-state="offline"] i { background: var(--muted); box-shadow: none; }
.status[data-state="stale"] i { background: var(--warning); box-shadow: none; }
.route-filter-bar {
  grid-column: 1 / -1; display: flex; gap: 7px; padding: 12px 24px;
  background: var(--card); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin; min-width: 0;
}
.route-filter-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer;
}
.route-filter-pill:hover { background: var(--sunken); }
.route-filter-pill.is-active { background: var(--navy); color: var(--canvas); border-color: var(--navy); }
.pill-code { font-weight: 900; }
.pill-name { font-size: 11px; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
.map-frame {
  position: relative; grid-column: 2; grid-row: 3; min-width: 0; min-height: 0;
  overflow: hidden; background: var(--map-water);
}
#chart { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#chart.is-dragging { cursor: grabbing; }
#chart:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.map-context {
  position: absolute; top: 22px; left: 24px; z-index: 2; pointer-events: none;
  padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  box-shadow: 0 3px 15px color-mix(in srgb, var(--ink) 5%, transparent);
}
.map-context strong { display: block; margin: 5px 0; font-size: 18px; color: var(--navy); }
.map-context > span:last-child { font-size: 11px; color: var(--muted); }
.map-tools { position: absolute; right: 20px; top: 22px; display: flex; flex-direction: column; gap: 5px; }
.map-tools button {
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--navy); font: inherit; font-size: 16px; font-weight: 900; cursor: pointer;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 7%, transparent);
}
.map-tools button:hover { background: var(--sunken); }
.north-arrow { display: grid; justify-items: center; margin-bottom: 8px; color: var(--navy); font-size: 26px; line-height: 1; }
.north-arrow small { font-size: 10px; font-weight: 900; margin-top: 4px; }
.map-key {
  position: absolute; left: 20px; bottom: 30px; display: flex; gap: 14px; flex-wrap: wrap;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px;
  background: color-mix(in srgb, var(--card) 94%, transparent); font-size: 10px; color: var(--muted);
}
.map-key span { display: flex; align-items: center; gap: 6px; }
.map-key i { display: inline-block; }
.key-route { width: 17px; height: 3px; background: var(--blue); border-radius: 2px; }
.key-dock { width: 8px; height: 8px; border: 1.5px solid var(--ink); background: var(--card); border-radius: 50%; }
.key-vessel { width: 9px; height: 9px; background: var(--blue); border: 1px solid var(--navy); border-radius: 50%; }
.key-channel { width: 16px; border-top: 1px dashed var(--muted); }
.key-light { width: 7px; height: 7px; background: var(--map-seamark-light); box-shadow: 0 0 0 3px color-mix(in srgb, var(--map-seamark-light) 20%, transparent); border-radius: 50%; }
.map-credit { position: absolute; bottom: 0; right: 0; margin: 0; padding: 4px 8px; background: var(--map-water); color: var(--muted); font-size: 9px; }
.tiles { opacity: .75; filter: saturate(.6); }
.map-credit a { color: inherit; }
.map-water { fill: var(--map-water); }
.map-landmass { fill: var(--map-land); stroke: var(--map-land-stroke); stroke-width: 1.2; stroke-linejoin: round; }
.map-street-casing, .map-street { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map-street-casing { stroke: var(--map-street-casing); stroke-width: 3; }
.map-street { stroke: var(--map-street); stroke-width: 1.3; }
.map-street.is-priority { stroke: color-mix(in srgb, var(--muted) 45%, var(--map-land)); stroke-width: 1.5; }
.map-park { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linejoin: round; pointer-events: none; }
.street-label-anchor { pointer-events: none; }
.street-label { fill: var(--muted); font: 700 9px Lato, Arial, sans-serif; paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; stroke-linejoin: round; opacity: 0; }
.street-label.is-priority { fill: var(--ink); font-size: 10px; stroke-width: 3.5px; }
.street-interstate.map-street { stroke-width: 2; }
.map-channel { fill: none; stroke: var(--map-seamark-channel); stroke-width: 1.2; stroke-dasharray: 5 4; }
.place-labels { pointer-events: none; }
.place-label text { fill: var(--muted); font: 900 12px Lato, Arial, sans-serif; letter-spacing: .13em; paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; stroke-linejoin: round; }
.place-water text { fill: color-mix(in srgb, var(--muted) 75%, var(--map-water)); font-size: 12px; font-weight: 400; font-style: italic; letter-spacing: .06em; stroke: var(--map-water); }
.place-island text { font-size: 9px; letter-spacing: .02em; }
.place-park text { fill: var(--muted); font-size: 11px; font-style: italic; letter-spacing: .04em; }
.bridge-group, .seamark { cursor: pointer; }
.dock, .boat, .bridge-group, .seamark { -webkit-tap-highlight-color: transparent; }
.marker-hit { fill: transparent; }
.bridge-hit { stroke: transparent; stroke-width: 16; }
.bridge-casing { stroke: var(--map-bridge-casing); stroke-width: 4; }
.bridge-deck { stroke: var(--map-bridge); stroke-width: 2; opacity: .65; }
.bridge-clearance-badge, .seamark-label { fill: var(--map-bridge-label); font: 700 9px Lato, Arial, sans-serif; paint-order: stroke; stroke: var(--map-water); stroke-width: 3px; pointer-events: none; opacity: 0; }
.bridge-clearance-badge { text-anchor: middle; }
.chart-backdrop.is-close .bridge-clearance-badge, .chart-backdrop.is-close .seamark-label { opacity: 1; }
.seamark-halo { fill: var(--map-seamark-light); opacity: .18; }
.seamark-light-core { fill: var(--map-seamark-light); stroke: var(--map-land); stroke-width: 1; }
.seamark-buoy-icon { stroke: var(--map-land); stroke-width: .8; }
.seamark-buoy-green { fill: var(--map-seamark-buoy-green); }
.seamark-buoy-red { fill: var(--map-seamark-buoy-red); }
.seamark-buoy-red-white { fill: var(--map-land); stroke: var(--map-seamark-buoy-red); }
.chart-seamarks .seamark-buoy { visibility: hidden; pointer-events: none; }
.chart-backdrop.is-close .seamark-buoy { visibility: visible; pointer-events: auto; }
.casings, .lines { display: none; }
.route-casing { fill: none; stroke: var(--map-water); stroke-width: 6; stroke-opacity: .8; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s; }
.route-line.is-dimmed { opacity: .12; }
.dock { cursor: pointer; }
.dock-mark { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
.dock:hover .dock-mark, .dock:focus-visible .dock-mark { fill: var(--blue); }
.dock-label { fill: var(--ink); font: 700 10px Lato, Arial, sans-serif; paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; opacity: 0; }
.dock.is-target .dock-mark { fill: var(--warning); stroke-width: 2; }
.boat { cursor: pointer; }
.boat.is-dimmed { opacity: .18; }
.boat-hull { stroke: var(--card); stroke-width: 2; filter: drop-shadow(0 1px 2px #0005); }
.boat-hull:not([fill]) { fill: var(--muted); }
.boat-heading { fill: var(--navy); }
.boat-halo { fill: none; stroke: var(--navy); stroke-width: 1.5; }
.boat-number { font: 900 9px Lato, Arial, sans-serif; pointer-events: none; }
.boat-label { fill: var(--navy); font: 900 11px Lato, Arial, sans-serif; paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.boat.is-stale .boat-hull { fill-opacity: .4; stroke-dasharray: 2 2; }
.boat-wake { opacity: .16; }
:root[data-theme="night"] .route-casing, :root[data-theme="kuromi"] .route-casing, :root[data-theme="hacker"] .route-casing { stroke: color-mix(in srgb, var(--map-water) 60%, var(--muted)); }
:root[data-theme="night"] .boat-hull, :root[data-theme="kuromi"] .boat-hull, :root[data-theme="hacker"] .boat-hull { stroke: var(--ink); }
.map-message { position: absolute; top: 130px; left: 20px; right: 76px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--card); font-size: 12px; line-height: 1.4; z-index: 3; }
.vessel-card, .dock-card, .bridge-card, .seamark-card {
  position: absolute; bottom: 84px; left: 20px; width: min(360px, calc(100% - 40px)); max-height: calc(100% - 110px);
  overflow-y: auto; z-index: 4; padding: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: 0 8px 30px color-mix(in srgb, var(--ink) 15%, transparent);
}
.card-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--sunken); color: var(--ink); font-size: 20px; cursor: pointer; }
.card-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-right: 28px; }
.card-route-chip { padding: 5px 7px; border-radius: 5px; font-size: 11px; font-weight: 900; }
.card-vessel-name { color: var(--navy); font-size: 16px; font-weight: 900; }
.card-hull-number { color: var(--muted); font-size: 12px; }
.card-status-line { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.card-meta-row { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.card-speed-badge { font-weight: 900; color: var(--navy); }
.card-action-btn { display: inline-flex; margin-top: 14px; padding: 12px; border-radius: 7px; background: var(--navy); color: var(--canvas); font-size: 12px; font-weight: 900; text-decoration: none; }
.card-clearance-box { display: grid; gap: 8px; padding: 12px; background: var(--sunken); border-radius: 8px; }
.card-clearance-label { font-size: 10px; font-weight: 900; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.card-clearance-val { font-size: 22px; color: var(--navy); font-weight: 900; }
.card-clearance-note, .card-seamark-desc { color: var(--muted); font-size: 12px; line-height: 1.5; }
.bottom-sheet { grid-column: 1; grid-row: 3; min-height: 0; background: var(--card); border-right: 1px solid var(--line); }
.fleet-content { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.sheet-handle-zone { display: none; }
.sheet-header { padding: 24px 18px 16px; }
.fleet-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fleet-heading h2 { margin: 0; font-size: 20px; color: var(--navy); letter-spacing: -.02em; }
.fleet-heading > span { color: var(--muted); font-size: 10px; }
.fleet-description { margin: 7px 0 18px; color: var(--muted); font-size: 12px; }
.search-box { position: relative; }
.search-icon { position: absolute; left: 12px; top: 14px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-input { width: 100%; height: 44px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--ink); font: inherit; font-size: 13px; }
.sheet-scrollable { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.boats { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.boat-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto;
  gap: 8px; align-items: center; width: 100%; padding: 14px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.boat-row:hover { background: var(--canvas); }
.boat-row[aria-pressed="true"] { border-color: var(--blue); background: var(--sunken); box-shadow: inset 3px 0 var(--blue); }
.route-chip { grid-column: 1; grid-row: 1; min-width: 34px; padding: 5px; border-radius: 5px; text-align: center; font-size: 11px; font-weight: 900; background: var(--muted); color: var(--card); }
.boats .boat-name { grid-column: 2; grid-row: 1; min-width: 0; color: var(--navy); font-size: 13px; font-weight: 900; white-space: normal; line-height: 1.4; }
.boats .boat-number { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.boat-doing { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 11px; line-height: 1.5; }
.boat-figures { grid-column: 3; grid-row: 1; text-align: right; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.boat-figures b { display: block; color: var(--navy); font-size: 12px; line-height: 1.6; }
.fleet-footer { margin: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }
.boats .empty { display: block; margin: 0; padding: 24px 16px; border: 1px dashed var(--line); border-radius: 10px; background: var(--canvas); color: var(--muted); font-size: 13px; line-height: 1.6; text-align: left; }
.map-body button:focus-visible, .map-body a:focus-visible, .search-input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.landing-confirm { position: fixed; z-index: 28; left: 362px; bottom: 30px; width: min(360px, calc(100% - 390px)); margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); animation: card-appear .2s cubic-bezier(.16, 1, .3, 1); }
.landing-confirm::backdrop { background: transparent; }
.landing-confirm h2 { margin: 0 0 7px; color: var(--navy); font-size: 18px; }
.landing-confirm p { margin: 0; font-size: 13px; line-height: 1.4; }
.landing-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.landing-confirm-actions button { flex: 1; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--navy); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.landing-confirm-actions .confirm-departures { background: var(--navy); color: var(--canvas); border-color: var(--navy); }
@media (max-width: 1100px) {
  .pill-name { display: none; }
  .map-body { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .map-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .map-heading { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap: 10px; }
  .map-heading h1 { font-size: 22px; }
  .map-heading .eyebrow { font-size: 8px; letter-spacing: .08em; }
  .map-heading .route-count { display: none; }
  .map-heading .status { font-size: 10px; padding: 7px 9px; }
  .route-filter-bar { padding: 8px 12px; gap: 5px; scrollbar-width: none; }
  .route-filter-pill { min-height: 36px; padding: 8px 10px; font-size: 11px; }
  .map-frame { grid-column: 1; grid-row: 3; }
  .map-context { top: 10px; left: 10px; padding: 9px 11px; }
  .map-context .eyebrow, .map-context > span:last-child { display: none; }
  .map-context strong { font-size: 13px; margin: 0; }
  .map-tools { top: 10px; right: 10px; gap: 4px; }
  .map-tools button { width: 36px; height: 36px; font-size: 14px; }
  .north-arrow { font-size: 20px; margin-bottom: 3px; }
  .map-key { left: 10px; bottom: 24px; padding: 7px 9px; gap: 10px; font-size: 9px; }
  .map-credit { font-size: 8px; }
  .map-message { top: 52px; left: 10px; right: 56px; font-size: 11px; }
  .bottom-sheet { grid-column: 1; grid-row: 4; border-right: 0; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .sheet-handle-zone { display: flex; align-items: center; gap: 9px; width: 100%; height: 42px; padding: 0 16px; border: 0; background: var(--card); color: var(--navy); font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
  .sheet-handle-bar { width: 22px; height: 3px; background: var(--line); border-radius: 3px; }
  #sheetToggleText { margin-left: auto; font-size: 10px; color: var(--muted); font-weight: 700; }
  .fleet-content { height: min(29dvh, 250px); }
  .bottom-sheet[data-state="peek"] .fleet-content { display: none; }
  .sheet-header { padding: 0 12px 10px; }
  .fleet-heading, .fleet-description, .fleet-footer { display: none; }
  .search-input { height: 38px; font-size: 16px; }
  .search-icon { top: 11px; }
  .boats { gap: 6px; }
  .boat-row { padding: 10px; gap: 5px 8px; }
  .vessel-card, .dock-card, .bridge-card, .seamark-card { left: 10px; bottom: 24px; width: calc(100% - 62px); max-height: calc(100% - 74px); padding: 14px; }
  .landing-confirm { left: 10px; right: 10px; bottom: calc(42px + min(29dvh, 250px) + 12px); width: auto; padding: 14px; }
  .bottom-sheet[data-state="peek"] ~ .landing-confirm { bottom: 54px; }
}
@media (max-height: 520px) and (max-width: 700px) {
  .fleet-content { height: 22dvh; }
  .map-key, .map-context { display: none; }
}
@media (prefers-reduced-motion: reduce) { .map-body *, .map-body *::before, .map-body *::after { animation: none !important; transition: none !important; } }
