/* Hallmark · component: interactive port map · genre: editorial · theme: custom (site tokens)
 * art direction: the site theme (navy · pine · white · one sakura mark) · engine: MapLibre GL JS, flat 2D, drawn OSM map
 * states: pins default · hover · focus · active · selected
 */

/* the page never scrolls: every scroll gesture belongs to the map (or the panel's own list) */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--map-ground); }
/* Embedded: let a scroll that the map doesn't use pass through to the host page. */
.is-embed, .is-embed body { overscroll-behavior: auto; }
/* Embedded (Jason, 2026-10-07): the map is a navy rectangle set on the host page's own light
   ground, with the panel beside it as a flat column in the page's ordinary dark type: no card and
   no navy frame round the two. (Until then the whole section was navy, which ran into the
   navigation bar once the bar stuck to the top of the window.) This page is see-through, so the
   host's ground shows behind the panel. The stage is the map's own box, so every map measurement
   still reads the stage; the panel is pulled out of it. */
html.is-embed, .is-embed body { background: transparent; }
.is-embed .stage { background: var(--map-ground); }
.is-embed .panel {
  background: transparent; box-shadow: none; border-radius: 0;
  /* a scroll past the panel's end moves the page instead of trapping the wheel */
  overscroll-behavior: auto;
  /* The panel has no right padding, so the toggle's pull into that padding would stick out past
     the panel and make it scroll sideways. Keep it inside, and never scroll the panel sideways. */
  overflow-x: clip;
}
.is-embed .photo { margin: 0 0 var(--space-md); }
.is-embed .list button { padding-block: var(--space-xs); }
.is-embed .group__toggle { margin-right: 0; }
/* Embedded, the panel never scrolls inside the page at any width (Jason, 2026-10-07). This page is
   as tall as whichever is taller, the map or the panel; map.js tells the host that height and the
   host sizes the frame to it, so a long panel makes the section longer instead of scrolling.
   No viewport-height unit for the map: the frame's height follows this page's, so one would chase
   the other. The host sends the map's height instead (--embed-map-height, one screen less the
   navigation bar and the section title); 100vh stands in until it arrives, when the frame is
   still at that height. */
.is-embed, .is-embed body { height: auto; }
.is-embed .panel { position: static; width: auto; max-height: none; overflow-y: visible; }
@media (min-width: 60rem) {
  /* the map flush left, lined up with the section title above it; the panel the column on its right */
  .is-embed body { display: grid; grid-template-columns: minmax(0, 1fr) var(--map-frame-panel); align-items: start; }
  .is-embed .stage { height: var(--embed-map-height, 100vh); }
  .is-embed .panel { padding: 0 0 0 var(--space-xl); }
}
/* Phones and tablets (Jason, 2026-10-06): the map keeps a fixed height, set from its width, and
   the whole panel runs down the page under it. */
@media (max-width: 59.99rem) {
  .is-embed .stage { height: var(--map-stack-height); }
  .is-embed .panel { padding: var(--space-lg) 0 0; }
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--color-ink); -webkit-font-smoothing: antialiased; }

.stage { position: relative; height: 100dvh; overflow: clip; }
.globe { position: absolute; inset: 0; }

/* a quiet deep edge, so the chart settles into the page */
.grade {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(140% 120% at 45% 45%, transparent 60%, var(--map-vignette));
}

/* ── overlay pins ───────────────────────────────── */
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; left: 0; top: 0;
  pointer-events: auto;
  will-change: transform;
  transition: opacity var(--dur-med) var(--ease-out);
}
.pin[hidden] { display: none; }

/* sea names: quiet, letterspaced, never clickable */
.sea {
  pointer-events: none;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--map-sea-label);
  translate: -50% -50%;
  white-space: nowrap;
}

/* region names: the country view's way in */
.region {
  translate: -50% -50%;
  border: 0; background: none; cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: var(--text-md); line-height: 1.2;
  color: var(--map-region-label);
  text-shadow: 0 1px 6px var(--map-label-shadow), 0 0 2px var(--map-label-shadow);
  white-space: nowrap;
}
.region span { border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-out); }
.region:hover span, .region:focus-visible span, .region.is-hover span { border-bottom-color: var(--color-accent-on-deep); }
.region small {
  display: block; margin-top: var(--space-2xs);
  font-family: var(--font-body); font-size: var(--text-xs);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-on-deep-muted);
}

/* ports and landmarks share the dot. The button is a point at the place itself: the dot is centered
   on it and the name is placed around it by the layout pass (map.js), with a leader line when the
   name has to stand off. --half is half the dot's width. */
.port, .mark {
  --half: 7px;
  width: 0; height: 0;
  border: 0; background: none; cursor: pointer; padding: 0;
  font: inherit; color: var(--map-label);
}
.mark { --half: 11px; }
.dot {
  position: absolute; left: calc(-1 * var(--half)); top: calc(-1 * var(--half));
  width: calc(2 * var(--half)); height: calc(2 * var(--half)); border-radius: 50%;
  background: var(--map-pin);
  box-shadow: 0 0 0 3px var(--map-pin-ring), 0 2px 8px var(--map-label-shadow);
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.name {
  position: absolute; left: calc(var(--half) + 4px); top: 0; translate: 0 -50%;
  font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.2;
  text-shadow: 0 1px 3px var(--map-label-shadow), 0 0 1px var(--map-label-shadow);
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.port:hover .dot, .port:focus-visible .dot, .mark:hover .dot, .mark:focus-visible .dot,
.berth:hover .dot, .berth:focus-visible .dot, .pin.is-linked .dot { transform: scale(1.25); }
.port:active .dot, .mark:active .dot { transform: scale(0.95); }
.port:focus-visible .dot, .mark:focus-visible .dot { outline: 2px solid var(--color-accent-on-deep); outline-offset: 3px; }
.region:focus-visible, .panel button:focus-visible {
  outline: 2px solid var(--color-accent-on-deep); outline-offset: 3px; border-radius: var(--radius);
}
.is-selected .dot { background: var(--map-pin-active); box-shadow: 0 0 0 3px var(--map-pin), 0 2px 10px var(--map-label-shadow); }
/* Hovered, or its panel row hovered: the same pink as a selected dot, at every level (Jason, 2026-09-29). */
.port:hover .dot, .port:focus-visible .dot, .mark:hover .dot, .mark:focus-visible .dot,
.berth:hover .dot, .berth:focus-visible .dot, .pin.is-linked .dot { background: var(--map-pin-active); }
.mark:hover .dot, .mark:focus-visible .dot, .mark.is-linked .dot { color: var(--map-pin); }
.berth:hover .dot svg, .berth:focus-visible .dot svg, .berth.is-linked .dot svg { stroke: var(--map-pin-ring); }

/* landmark numbers sit inside a larger dot */
.mark .dot {
  display: grid; place-items: center;
  font-size: var(--text-xs); font-weight: var(--weight-strong); color: var(--map-pin-ring);
}
.mark.is-selected .dot { color: var(--map-pin); }

/* names: shown when the layout pass finds them a clear spot (.is-named), or on hover and focus */
.port .name, .mark .name, .berth .name { opacity: 0; pointer-events: none; }
.is-named .name { opacity: 1; pointer-events: auto; }
.port:hover .name, .port:focus-visible .name, .mark:hover .name, .mark:focus-visible .name,
.pin.is-linked .name { opacity: 1; }

/* the featured ports keep the full name size; every other port's name is a size down */
.port:not(.is-featured):not(.is-selected) .name { font-size: var(--text-map-minor); }

/* a name standing off from its dot is tied to it by a hairline */
.leader {
  position: absolute; left: 0; top: 0; height: 1px; width: 0;
  transform-origin: 0 50%;
  background: var(--map-label); box-shadow: 0 0 2px var(--map-label-shadow);
  opacity: 0; pointer-events: none;
}
.is-named .leader.is-on { opacity: 0.75; }

/* level rules. 0 country · 1 region · 2 port · 3 landmark */
.stage[data-level="0"] .port { --half: 3.5px; }
.stage[data-level="0"] .port.is-featured { --half: 5px; }
.stage[data-level="0"] .port .dot { box-shadow: 0 0 0 2px var(--map-pin-ring); }
.stage[data-level="1"] .port.is-away { opacity: 0.45; }
.stage[data-level="1"] .port.is-away:hover, .stage[data-level="1"] .port.is-away:focus-visible { opacity: 1; }

/* ── the trail, at the top of the panel ─────────── */
.panel__head { margin-bottom: var(--space-md); }
.panel__head:has(.panel__trail[hidden]) { display: none; }
.trail {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs);
  font-size: var(--text-sm);
}
.trail li { display: flex; align-items: center; gap: var(--space-xs); white-space: nowrap; }
.trail li + li::before { content: "›"; color: var(--color-muted); }
.trail button {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.trail button:hover { color: var(--color-accent-hover, var(--color-ink)); border-bottom-color: currentColor; }
.trail [aria-current] { color: var(--color-ink); font-weight: var(--weight-strong); }

/* ── panel ──────────────────────────────────────── */
.panel {
  position: absolute; top: var(--space-lg); right: var(--space-lg); bottom: var(--space-lg);
  width: 24rem; overflow-y: auto; overscroll-behavior: contain;
  background: var(--map-panel);
  box-shadow: var(--map-shadow);
  border-radius: var(--radius);
  padding: var(--space-lg);
}
.panel h2 {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: var(--text-lg); line-height: 1.15;
}
.panel .lede { margin: 0 0 var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }
.panel p { line-height: var(--leading-body); }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.list li { border-bottom: 1px solid var(--color-rule); }
.list button {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm);
  width: 100%; padding: var(--space-sm) 0;
  border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: var(--text-base); color: var(--color-ink);
  transition: color var(--dur-fast) var(--ease-out);
}
.list button:hover { color: var(--color-accent); }
.list .count { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.list .num {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 2px solid var(--map-pin-ring); font-size: var(--text-xs); font-weight: var(--weight-strong);
}
.list .label { flex: 1; }

.facts { margin: 0 0 var(--space-lg); display: grid; gap: var(--space-sm); font-size: var(--text-sm); }
.facts div { display: grid; gap: var(--space-2xs); }
.facts dt { font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.facts dd { margin: 0; color: var(--color-ink-2); }

.photo { margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-lg)) var(--space-md); }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.steps { display: flex; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-lg); }
.steps button {
  border: 1px solid var(--color-ink); background: none; cursor: pointer;
  padding: var(--space-xs) var(--space-md); border-radius: var(--radius);
  font: inherit; font-size: var(--text-sm); color: var(--color-ink); white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.steps button:hover { background: var(--color-ink); color: var(--color-paper); }
.steps button:disabled { opacity: 0.35; cursor: default; background: none; color: var(--color-ink); }
.panel button:focus-visible { outline-color: var(--color-focus); }


/* ── phones: the panel becomes a bottom sheet ───── */
@media (max-width: 47.99rem) {
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    max-height: 42dvh; border-radius: 0;
    padding: var(--space-md);
  }
  .photo { margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-sm); }
  .photo img { aspect-ratio: 16 / 9; }
  .region { font-size: var(--text-base); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: var(--dur-fast) !important; }
}

/* ── region groups: the name flies to the region, the toggle opens its ports ── */
.group__head { display: flex; align-items: stretch; }
.list .group__name { flex: 1; }
.group__toggle {
  flex: none; width: 2.75rem; margin-right: calc(-1 * var(--space-xs));
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; color: var(--color-muted);
  border-radius: var(--radius);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.group__toggle:hover { color: var(--color-ink); background: var(--color-rule); }
.group__toggle:active .chevron { translate: 0 1px; }
.chevron {
  width: 0.5rem; height: 0.5rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  rotate: 45deg; translate: 0 -2px;
  transition: rotate var(--dur-med) var(--ease-out);
}
.group__toggle[aria-expanded="true"] .chevron { rotate: 225deg; translate: 0 2px; }
.sublist { list-style: none; margin: 0 0 var(--space-sm); padding: 0 0 0 var(--space-md); border-left: 2px solid var(--color-rule); }
.sublist li { border: 0; }
.list .sublist button { padding: var(--space-2xs) 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.list .sublist button:hover { color: var(--color-accent); }

/* the panel heading takes focus by script after a pin click; it is not a control, so no ring */
.panel h2:focus { outline: none; }

/* ── back one level ── */
.back {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  margin: 0 0 var(--space-md); padding: var(--space-2xs) 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--text-sm); color: var(--color-accent);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.back:hover { color: var(--color-accent-hover, var(--color-ink)); }
.back__arrow { display: inline-block; transition: translate var(--dur-fast) var(--ease-out); }
.back:hover .back__arrow { translate: -3px 0; }
.back:active .back__arrow { translate: -1px 0; }
.back + .photo { margin-top: 0; }
/* the toggle must not pick up the full-width list button rule, or it crushes the region name */
.list .group__toggle { width: 2.75rem; padding: 0; justify-content: center; }
.list .group__toggle { align-items: center; align-self: stretch; }

/* ── panel foot: the imagery credits, one quiet line ── */
.panel { display: flex; flex-direction: column; }
.panel__body { flex: 1 0 auto; }
.panel__credits {
  margin: var(--space-lg) 0 0; padding-top: var(--space-sm);
  border-top: 1px solid var(--color-rule);
  font-size: 0.6875rem; line-height: 1.5; color: var(--color-muted);
}
.panel__credits a { color: inherit; }
.panel__credits a:hover { color: var(--color-ink); }

/* ── labels ── */
/* the hovered port sits above its neighbors, and its dot has a finger-sized hit area */
.port:hover, .port:focus-visible, .mark:hover, .mark:focus-visible, .pin.is-linked { z-index: 2; }
.dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
/* a region or sea name with no clear spot at this window size */
.pin.is-crowded { visibility: hidden; }
/* the country view is small: region names drop a size, sea names two */
.stage[data-level="0"] .region { font-size: var(--text-map-region); padding: 0; }
.stage[data-level="0"] .sea { font-size: var(--text-xs); letter-spacing: 0.25em; }
/* a phone's opening view has no port dots, so the region names are the only way in: each is drawn as
   a small button, the Zoom out chip's own outline and ground with an arrow, so it reads as something
   to tap and not as a place name printed on the map (Jason, 2026-11-11). Smaller, so all of them fit. */
@media (max-width: 47.99rem) {
  .stage[data-level="0"] .region {
    padding: var(--space-2xs) var(--space-xs);
    border: 1px solid var(--color-on-deep-muted); border-radius: var(--radius);
    background: var(--color-deep); box-shadow: 0 2px 10px var(--map-label-shadow);
    font-size: var(--text-xs); text-shadow: none;
  }
  .stage[data-level="0"] .region span { border-bottom: 0; }
  .stage[data-level="0"] .region span::after { content: ' ›'; color: var(--color-on-deep-muted); }
  .stage[data-level="0"] .region.is-long { width: auto; white-space: nowrap; }
  .stage[data-level="0"] .region:active { background: var(--color-deep-rule); }
}

/* ── the panel's top row: the trail, and "Zoom out" at the right ── */
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); }
.panel__head .panel__trail { flex: 1; min-width: 0; }
.zoom-out {
  /* a map control, in the map's top left corner, above the pins */
  position: absolute; top: var(--space-md); left: var(--space-md); z-index: 6;
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-deep-rule); border-radius: var(--radius);
  background: var(--color-deep); box-shadow: 0 2px 10px var(--map-label-shadow);
  cursor: pointer;
  font: inherit; font-size: var(--text-sm); color: var(--color-on-deep); white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.zoom-out[hidden] { display: none; }
/* the opening view's cue, in Zoom out's corner and the same chip, but not a button */
.map-hint {
  position: absolute; top: var(--space-md); left: var(--space-md); z-index: 6; margin: 0;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-deep-rule); border-radius: var(--radius);
  background: var(--color-deep); box-shadow: 0 2px 10px var(--map-label-shadow);
  font-size: var(--text-sm); color: var(--color-on-deep-muted); pointer-events: none;
}
.map-hint[hidden] { display: none; }
.zoom-out__icon { font-size: var(--text-base); line-height: 1; }
.zoom-out:hover { border-color: var(--color-on-deep); }
.zoom-out:active { background: var(--color-deep-rule); }
.zoom-out:focus-visible { outline: 2px solid var(--color-accent-on-deep); outline-offset: 2px; }

/* ── the cruise terminal: a place of interest like any landmark; only its icon differs ── */
.berth { --half: 11px; position: absolute; width: 0; height: 0; color: var(--map-label); }
.berth .dot {
  display: grid; place-items: center; border-radius: var(--radius);
  background: var(--map-pin-ring); box-shadow: 0 0 0 2px var(--map-pin), 0 2px 8px var(--map-label-shadow);
}
.berth .dot svg { width: 14px; height: 14px; fill: none; stroke: var(--map-pin); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mark .name, .berth .name { font-size: var(--text-sm); }

/* landmarks and the cruise terminal appear once the camera has landed, not while it is still flying */
.mark, .berth { transition: opacity 450ms var(--ease-out); }
.stage.is-flying .mark, .stage.is-flying .berth { opacity: 0; pointer-events: none; transition: none; }

/* the anchor in the panel: the list row and the terminal card */
.anchor { display: inline-grid; place-items: center; }
.anchor svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.terminal-mark {
  width: 3rem; height: 3rem; margin-bottom: var(--space-md);
  display: grid; place-items: center; border-radius: var(--radius);
  background: var(--color-deep); color: var(--color-on-deep);
}
.terminal-mark .anchor svg { width: 1.5rem; height: 1.5rem; }
.berth { cursor: pointer; border: 0; background: none; padding: 0; font: inherit; }
.berth:focus-visible .dot { outline: 2px solid var(--color-accent-on-deep); outline-offset: 3px; }
.berth:hover .name, .berth:focus-visible .name { opacity: 1; }
.berth.is-selected .dot { background: var(--map-pin-active); }
.berth.is-selected .dot svg { stroke: var(--map-pin-ring); }
/* the photo sits under the trail now, so it bleeds to the sides only, not up over the trail */
.panel__body .photo { margin-top: 0; }

/* a cruise terminal off the edge of the port view: held at the edge, softer, pointing the way */
.berth.is-offscreen .dot { opacity: 0.85; }

/* ── landmarks: small numbered dots; the photo pops up above on hover and while selected ── */
.preview {
  position: absolute; left: -32px; top: calc(-1 * var(--half) - 72px);
  width: 64px; height: 64px; border-radius: 50%;
  background-size: cover; background-position: center; background-color: var(--map-pin-ring);
  box-shadow: 0 0 0 3px var(--map-pin), 0 8px 20px var(--map-label-shadow);
  opacity: 0; scale: 0.7; transform-origin: 50% 100%;
  transition: opacity var(--dur-fast) var(--ease-out), scale var(--dur-med) var(--ease-out);
  pointer-events: none; z-index: 2;
}
/* The photo shows on hover only; a selected place keeps just its pink dot (Jason, 2026-09-29). */
/* a panel row hovered (.is-linked) shows its pin exactly as a pointer on the pin would */
.mark:hover .preview, .mark:focus-visible .preview, .mark.is-linked .preview,
.berth:hover .preview, .berth:focus-visible .preview, .berth.is-linked .preview { opacity: 1; scale: 1; }
.mark:hover, .mark:focus-visible, .mark.is-selected, .mark.is-linked,
.berth:hover, .berth:focus-visible, .berth.is-selected, .berth.is-linked { z-index: 3; }
.tether {
  position: absolute; left: 0; top: 0; height: 1px; width: 0;
  transform-origin: 0 50%;
  background: var(--map-label); opacity: 0; pointer-events: none;
  box-shadow: 0 0 2px var(--map-label-shadow);
}
.foot {
  position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--map-pin); box-shadow: 0 0 0 1.5px var(--map-pin-ring);
  opacity: 0; pointer-events: none;
}
/* spread pins move only a few pixels: no tether or foot, which read as broken extra pins */
/* the photo sits above its own tether */
.mark .dot { z-index: 1; }

/* the longest region names may break onto two lines, so they can sit close to their region */
.region.is-long { white-space: normal; width: 7em; text-align: center; line-height: 1.15; }

/* the native name (長崎, 부산, 香港) under a port or place heading, at the subtext's size */
.panel .native { margin: 0 0 var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0.04em; }
.panel .blurb { margin: var(--space-sm) 0 var(--space-sm); }
.panel .guide { margin: 0 0 var(--space-lg); }
.guide__link {
  color: var(--color-accent); font-size: var(--text-sm); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.guide__link:hover { color: var(--color-accent-hover, var(--color-ink)); }
.guide__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.panel h2 + .native { margin-top: calc(-1 * var(--space-2xs)); }

/* ── bare embed (?embed=bare, the /ports/ page): no panel column ──
   The page's own filter panel sits beside the map, so the map fills its frame, a hairline round it,
   and the panel becomes a floating card that only opens for a port or a place. The OpenStreetMap
   credit sits in the map's bottom-right corner; the card stops short of it. */
.is-bare, .is-bare body { overscroll-behavior: auto; }
.is-bare body { background: var(--map-frame); }
.is-bare .stage { height: 100vh; }
.is-bare { --map-bar-height: calc(var(--space-md) * 2 + 2.5rem); } /* Zoom out and the space round it */
.is-bare .stage::after {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  border: 1px solid var(--color-deep-rule);
}
.is-bare .panel[hidden] { display: none; }
@media (min-width: 48rem) {
  .is-bare .panel {
    top: var(--space-md); right: var(--space-md); bottom: auto;
    width: clamp(18rem, 36%, 23rem); max-height: calc(100% - 2 * var(--space-md) - var(--space-lg));
    overscroll-behavior: auto;
  }
}
/* On a phone the card takes the whole map, up to the bar that holds Zoom out, which is the way back
   to the map. It used to be a strip about 260px tall at the foot of the map, with the credit line
   printed across its text and the guide scrolling inside it (mobile audit, 2026-11-09). The bar keeps
   the map's navy, so no pin or name shows through beside the button; the credit line returns when the
   card closes. */
@media (max-width: 47.99rem) {
  .is-bare .panel:not([hidden]) { top: var(--map-bar-height); max-height: none; z-index: 5; }
  .is-bare .stage:has(.panel:not([hidden]))::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: var(--map-bar-height); z-index: 5;
    background: var(--map-ground);
  }
  .is-bare .stage:has(.panel:not([hidden])) .map-credits { display: none; }
}
.map-credits {
  position: absolute; right: var(--space-sm); bottom: var(--space-xs); z-index: 4; margin: 0;
  font-size: 0.5625rem; line-height: 1.5; color: var(--color-on-deep-muted); /* 9px, down from 11px (Jason, 2026-11-09) */
}
.map-credits a { color: inherit; }

/* ports the host page's filter left out: faint, still clickable */
.port.is-out, .region.is-out { opacity: 0.3; }
.port.is-out:hover, .port.is-out:focus-visible, .region.is-out:hover, .region.is-out:focus-visible { opacity: 1; }

/* One credit line at a time: on the map when embedded, in the panel otherwise. */
.is-bare .panel__credits { display: none; }
.is-embed .panel__credits { display: none; }

/* A port page (?port=): the map is that port alone. The page lists the places under the map, so no
   card, no Zoom out and no "select a region" cue (Jason, 2026-10-19). */
.is-port-page .panel, .is-port-page .zoom-out, .is-port-page .map-hint { display: none !important; }
/* so the phone card's Zoom out bar has nothing to hold here: without this an empty navy band lay
   across the top of the map and hid the pins under it */
.is-port-page .stage::before { content: none !important; }
.is-port-page .map-credits { display: block !important; }

