@font-face {
  font-family: Pixelify;
  src: url(/fonts/pixelify.ttf) format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Space Grotesk;
  src: url(/fonts/space-grotesk.ttf) format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Space Grotesk", system-ui, sans-serif;
  --display: Pixelify, "Space Grotesk", system-ui, sans-serif;
  --paper: #eee8d9;
  --light: #fbf4e3;
  --ink: #293e3d;
  --muted: #596753;
  --line: #c5bfa8;
  --panel-edge: #616852;
  --green: #33544c;
  --ship: #edc57e;
  --ferry: #aed8ca;
  --tram: #edaa98;
  --bus: #c4d5a2;
  --train: #c3c9e8;
  --scene-height: clamp(32rem, 69vh, 55rem);
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 18rem; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 0.17em; }
button:focus-visible, a:focus-visible, input:focus-visible, #map:focus-visible {
  outline: 3px solid #a3412d;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shell { width: min(100% - 56px, 105rem); margin-inline: auto; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 110px;
  gap: 1.25rem;
}
.identity, .conditions, .weather { display: flex; align-items: center; gap: 0.9rem; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  flex: 0 0 auto;
  background: #3f645b;
  box-shadow: 3px 3px 0 #acaa87;
}
.pixel-icon { display: block; image-rendering: pixelated; width: 16px; height: 16px; }
.brand-icon .pixel-icon { width: 36px; height: 36px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-family: var(--display); font-size: clamp(1.8rem, 3.3vw, 3.1rem); line-height: .95; letter-spacing: -.035em; }
.identity p { color: var(--muted); margin-top: 0.37rem; font-size: 1rem; font-weight: 500; }
.conditions { gap: 1rem; flex: 0 0 auto; }
.weather { padding-right: 1rem; border-right: 1px solid var(--line); gap: .55rem; }
.weather .pixel-icon { width: 24px; height: 24px; }
.weather div, .clock { display: grid; }
.weather strong { line-height: 1.2; }
.weather span:last-child, .clock :last-child { color: var(--muted); font-size: .75rem; }
.clock { min-width: 57px; font-variant-numeric: tabular-nums; }
.clock time { font-weight: 700; font-size: 1.1rem; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(283px, 300px); gap: 17px; align-items: stretch; }
.map-panel, .traffic { background: var(--light); border: 1px solid var(--panel-edge); box-shadow: 3px 3px 0 #c9c1a7; min-width: 0; }
.map-panel { container-type: inline-size; }
.map-toolbar { min-height: 57px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: 8px 12px; }
.layers { min-width: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.layer, .labels-button, .selection-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #8b9383;
  border-radius: 2px;
  min-height: 34px;
  padding: 4px 8px;
  background: transparent;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 650;
}
.layer[data-kind="ship"][aria-pressed="true"], .vehicle-icon[data-kind="ship"] { background: var(--ship); }
.layer[data-kind="ferry"][aria-pressed="true"], .vehicle-icon[data-kind="ferry"] { background: var(--ferry); }
.layer[data-kind="tram"][aria-pressed="true"], .vehicle-icon[data-kind="tram"] { background: var(--tram); }
.layer[data-kind="bus"][aria-pressed="true"], .vehicle-icon[data-kind="bus"] { background: var(--bus); }
.layer[data-kind="train"][aria-pressed="true"], .vehicle-icon[data-kind="train"] { background: var(--train); }
.layer[aria-pressed="false"] { color: var(--muted); }
.layer[aria-pressed="false"] .pixel-icon { opacity: .52; }
.layer-count { font-size: .75rem; padding-left: 2px; font-variant-numeric: tabular-nums; }
.map-options { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.map-toolbar:has(.focus-button:not([hidden])) { row-gap: 4px; }
.map-toolbar:has(.focus-button:not([hidden])) .map-options { margin-left: auto; }
.labels-button { border-color: transparent; color: var(--muted); min-width: 44px; }
.focus-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 36px;
  border: 1px solid #6c6670;
  border-radius: 2px;
  background: #f2ecd9;
  padding: 4px 8px;
  font-size: .875rem;
  font-weight: 700;
}
.focus-button[aria-pressed="true"] { background: #423342; color: #fff2cc; border-color: #423342; }
.focus-button:hover { outline: 1px solid #423342; outline-offset: 1px; }
.focus-icon { width: 14px; height: 7px; border-block: 2px solid currentColor; }
.focus-button:focus-visible { outline: 3px solid #a3412d; outline-offset: 3px; }
.map-view[data-transport-focus="true"] #terrain { filter: none; }
.map-view[data-map-scale="city"] #terrain { filter: none; }
.labels-button[aria-pressed="true"] { background: #e8e5d0; color: var(--ink); }
.layer:hover, .labels-button:hover, .selection-actions button:hover { border-color: var(--green); }

.map-slot { display: contents; }
.map-view {
  position: relative;
  height: var(--scene-height);
  overflow: hidden;
  background: #408d96;
  border-block: 1px solid var(--panel-edge);
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.map-view.dragging { cursor: grabbing; }
.map-view.over-vehicle { cursor: pointer; }
.map-view[data-region-frame="harbour"] {
  width: 100%;
  height: auto;
  aspect-ratio: var(--harbour-aspect, 4 / 3);
  max-height: max(var(--harbour-min-height, 53cqi), clamp(12rem, calc(100svh - 14.5rem), 60rem));
}
@media (max-width: 640px) {
  .map-view[data-region-frame="kotara"] { height: clamp(13rem, 72vw, 24rem); }
  .map-view[data-region-frame="cardiff"] { height: clamp(11rem, 60vw, 22rem); }
  .map-view[data-region-frame="north-harbour"] { height: clamp(13rem, 66vw, 27rem); }
}
#terrain { filter: saturate(1.13) contrast(1.025) sepia(.035); }
.map-view > canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.place-labels { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.landing-help { padding: 7px 12px; color: #314d45; background: #e3ebe0; font-size: .86rem; font-weight: 700; }
.landing-list { padding: .55rem .75rem; color: #314d45; background: #e3ebe0; font-size: .86rem; }
.landing-list summary { cursor: pointer; font-weight: 700; padding-block: .28rem; }
.landing-list div { display: flex; flex-wrap: wrap; gap: .45rem; padding-block: .5rem; }
.landing-list button { min-height: 44px; }
body[data-place-picker] .workspace { grid-template-columns: minmax(0, 1fr); }
body[data-place-picker] :is(.map-toolbar, .traffic) { display: none; }
body[data-place-picker] .map-presets { border-top: 0; }
body[data-place-picker] .place-picker-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 52px;
  padding-inline-end: 8px;
  background: #e3ebe0;
}
#go-to-destination { min-height: 44px; padding-inline: 14px; color: #fff9e8; background: #355752; border-color: #355752; white-space: nowrap; }
#go-to-destination:hover { background: #263e38; }
#go-to-destination:disabled { opacity: .65; cursor: wait; }
body[data-place-picker] .landing-list { border-top: 1px solid #c8d6c9; }
body[data-place-picker] .landing-list button { white-space: normal; text-align: left; }
.map-view[data-coordinate-picker="true"] { cursor: crosshair; }
.map-view[data-coordinate-picker="true"].dragging { cursor: grabbing; }
.map-current-point, .map-picked-point {
  position: absolute;
  z-index: 4;
  width: 13px;
  height: 13px;
  translate: -50% -50%;
  border: 2px solid #fff9e8;
  box-shadow: 0 0 0 2px #213b37;
  background: #376970;
  pointer-events: none;
}
.map-current-point { border-radius: 50%; }
.map-current-point span {
  position: absolute;
  left: 50%;
  bottom: 15px;
  translate: -50% 0;
  padding: 2px 6px;
  border: 1px solid #264842;
  background: #f9efd5;
  color: #213b37;
  font: 700 .85rem var(--display);
}
.map-picked-point { rotate: 45deg; background: #d4a752; }
.map-picked-point[data-state="blocked"] { background: #a94b38; }
.map-picked-point[data-state="checking"] { background: #909d91; }
.map-room-points { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.map-room-point {
  position: absolute;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-items: end;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  translate: -50% -100%;
  border: 0;
  background: transparent;
  color: #193939;
  font: 750 .74rem/1.1 var(--body);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.map-room-point > span {
  display: block;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: .17rem .33rem;
  border: 2px solid #294c4b;
  background: #b6e7de;
  box-shadow: 1px 1px 0 #183b3e95;
}
.map-room-anchor {
  position: absolute;
  width: 8px;
  height: 8px;
  translate: -50% -50%;
  border: 1px solid #294c4b;
  background: #6bccbd;
}
.map-room-leader {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  background: #244b49;
}
.map-room-point:focus-visible { z-index: 2; outline: 2px solid #176e75; outline-offset: 2px; }
.map-room-point:disabled { pointer-events: none; }
.map-room-point:disabled > span { background: #cbdcd1; }

.map-register-point { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.map-register-point::before {
  content: '';
  position: absolute;
  left: var(--point-x);
  top: var(--point-y);
  translate: -50% -50%;
  width: 12px;
  height: 12px;
  border: 2px solid #203b38;
  box-shadow: 0 0 0 2px #fff4d1;
  background: #f0bc69;
}
.map-register-point span {
  position: absolute;
  top: calc(var(--point-y) - 12px);
  translate: -50% -100%;
  width: max-content;
  max-width: min(15rem, 90%);
  padding: 4px 8px;
  border: 2px solid #203b38;
  box-shadow: 2px 2px #203b3860;
  background: #faf0d5;
  color: #203b38;
  text-align: center;
  font: 700 .91rem var(--display);
}
.map-register-point[data-label-below="true"] span { top: calc(var(--point-y) + 12px); translate: -50% 0; }
.map-crosshair { display: none; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 25px; height: 25px; color: #fff9e8; pointer-events: none; }
.map-crosshair::before, .map-crosshair::after { content: ''; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 100%; height: 2px; background: currentColor; box-shadow: 0 0 0 1px #243c38; }
.map-crosshair::after { rotate: 90deg; }
.map-view[data-coordinate-picker="true"]:focus-visible .map-crosshair { display: block; }
.map-view[data-jumping] .map-crosshair { display: none; }
.map-view > #map-jump-shadow {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 23px;
  height: 8px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #263e3880;
  pointer-events: none;
}
.map-view > #map-jump-avatar {
  inset: auto;
  /* Percentage anchors keep the sprite inside the map during orientation changes. */
  left: clamp(25.5px, var(--jump-x, 50%), calc(100% - 25.5px));
  top: clamp(51px, var(--jump-y, 50%), calc(100% - 3px));
  z-index: 5;
  width: 51px;
  height: 54px;
  translate: -50% -94.444%;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px 0 #243c3880);
}
.place.gregson-detail, .place.foreshore-work, .place.civic-detail, .place.wickham-oval, .place.hamilton-detail, .place.mayfield-detail { font-size: .83rem; }
body[data-embed="world"] .shell { width: min(100% - 12px, 105rem); padding-block: 6px; }
body[data-embed="world"] .masthead, body[data-embed="world"] .footer { display: none; }
body[data-embed="world"] .map-view[data-region-frame="harbour"] {
  max-height: max(var(--harbour-min-height, 53cqi), clamp(12rem, calc(100svh - 9rem), 60rem));
}
body[data-embed="world"][data-place-picker] .map-view {
  --picker-map-height: max(12rem, calc(100dvh - 10rem));
  aspect-ratio: auto;
  height: var(--picker-map-height);
  max-height: none;
}
body[data-embed="world"][data-place-picker] .landing-list summary { padding-block: .75rem; }
body[data-embed="world"][data-place-picker] .landing-list div { max-height: 14rem; overflow-y: auto; }
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  body[data-embed="world"] { --scene-height: max(10rem, calc(100svh - 8rem)); }
  body[data-embed="world"] .map-view[data-region-frame="harbour"] {
    min-height: 10rem;
    max-height: var(--scene-height);
  }
  body[data-embed="world"][data-place-picker] .map-view {
    --picker-map-height: max(10rem, calc(100dvh - 8rem));
  }
  body[data-place-picker] .map-view[data-harbour-compact="true"] .map-controls {
    top: auto;
    bottom: 8px;
  }
}
body[data-embed="world"][data-place-picker] .map-view[data-harbour-fit="true"][data-coordinate-picker="true"] {
  width: min(100%, calc(var(--picker-map-height) * var(--harbour-ratio)));
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--harbour-aspect);
  margin-inline: auto;
}
@media (any-pointer: coarse), (max-width: 740px), (max-height: 720px) {
  body[data-embed="world"][data-place-picker] .map-panel {
    display: grid;
    height: calc(100dvh - 12px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: 'presets' 'picker' 'map' 'places' 'key';
  }
  body[data-embed="world"][data-place-picker] .map-presets { grid-area: presets; }
  body[data-embed="world"][data-place-picker] .place-picker-bar { grid-area: picker; position: static; }
  body[data-embed="world"][data-place-picker] .landing-list { grid-area: places; }
  body[data-embed="world"][data-place-picker] .map-foot { grid-area: key; }
  body[data-embed="world"][data-place-picker] .map-slot {
    grid-area: map;
    display: grid;
    place-items: center;
    container-type: size;
    min-height: 0;
  }
  body[data-embed="world"][data-place-picker] .map-slot > .map-view {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  body[data-embed="world"][data-place-picker] .map-slot > .map-view[data-harbour-fit="true"] {
    width: min(100cqw, calc(100cqh * var(--harbour-ratio)));
    height: auto;
    aspect-ratio: var(--harbour-aspect);
  }
  body[data-embed="world"][data-place-picker] .landing-list div {
    max-height: min(18dvh, 10rem);
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  body[data-embed="world"][data-place-picker] .map-panel {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 28%);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: 'map presets' 'map picker' 'map places' 'key key';
  }
  body[data-embed="world"][data-place-picker] .map-presets > .detail-area-picker { width: 100%; max-width: none; }
  body[data-embed="world"][data-place-picker] .map-presets { padding-inline: 6px; gap: 4px; }
  body[data-embed="world"][data-place-picker] .map-scales button { font-size: .76rem; padding-inline: 7px; }
  body[data-embed="world"][data-place-picker] .place-picker-bar { flex-wrap: wrap; gap: 2px; padding: 4px 6px; align-content: center; }
  body[data-embed="world"][data-place-picker] .landing-help { padding: 2px 3px; }
  body[data-embed="world"][data-place-picker] .landing-list {
    padding-block: .14rem;
    overflow-y: auto;
  }
  body[data-embed="world"][data-place-picker] .landing-list summary { padding-block: .45rem; }
}
.place {
  position: absolute;
  top: 0;
  left: 0;
  translate: -50% -50%;
  font-family: var(--display);
  font-size: clamp(.9rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: #fff3cc;
  white-space: nowrap;
  text-shadow: 0 2px #1d4248, 2px 0 #1d4248, 0 -2px #1d4248, -2px 0 #1d4248, 2px 2px #1d4248;
}
.place.water { color: #f2efcf; font-size: clamp(.95rem, 1.8vw, 1.4rem); }
.place.waterway { color: #f2efcf; font-size: clamp(.76rem, 1.38vw, 1.14rem); }
.place.coastal, .place.coastal-detail { font-size: clamp(.8rem, 1.35vw, 1.15rem); }
.place.lighthouse { font-size: clamp(.83rem, 1.45vw, 1.22rem); color: #fff7de; }
.place.harbour-headland { color: #fff7de; font-size: clamp(.78rem, 1.23vw, .98rem); }
.map-view[data-harbour-fit="true"][data-harbour-compact="true"] .place { font-size: .78rem; }
.place.headland-detail, .place.port-district { font-size: clamp(.76rem, 1.3vw, 1rem); }
.place.north-landmark { font-size: clamp(.79rem, 1.4vw, 1.05rem); }
.place.mayfield-landmark, .place.waratah-landmark, .place.adamstown-landmark, .place.kotara-landmark, .place.cardiff-landmark { font-size: clamp(.76rem, 1.3vw, .92rem); }
.place.mayfield-path, .place.mayfield-road, .place.adamstown-path, .place.cardiff-road {
  padding: 2px 5px;
  border: 1px solid #b7cec0;
  color: #edf5df;
  background: #31564d;
  font: 700 .73rem "Space Grotesk", sans-serif;
  text-shadow: none;
}
.place.mayfield-road, .place.cardiff-road { color: #334947; background: #eee4cc; border-color: #536964; }
.place.waratah-point, .place.adamstown-point, .place.cardiff-tunnel {
  padding: 2px 5px;
  border: 1px solid #587276;
  color: #eef3e5;
  background: #395760;
  font: 700 .73rem "Space Grotesk", sans-serif;
  text-shadow: none;
}
.place.berth {
  padding: 3px 6px;
  font: 700 .73rem "Space Grotesk", sans-serif;
  color: #eef3e2;
  background: #244746;
  border: 1px solid #b4c9a4;
  box-shadow: 2px 2px #223a3c66;
  text-shadow: none;
}
.place.neighbourhood-detail { font-size: clamp(.76rem, 1.24vw, 1.03rem); }
.map-view[data-map-scale="street"] .place.coastal,
.map-view[data-map-scale="street"] .place.coastal-detail { color: #fff7dd; }
.place.stop, .place.station, .place.ferry-stop {
  font: 680 .75rem "Space Grotesk", sans-serif;
  padding: 3px 5px;
  color: var(--ink);
  text-shadow: none;
  background: var(--light);
  box-shadow: 2px 2px #394940;
}
.map-view[data-detail="true"] .place.stop {
  font-size: .83rem;
  font-weight: 700;
  color: #2b2930;
  padding: 3px 6px;
  background: #fff5d8;
  border: 1px solid #493846;
  box-shadow: 2px 2px #493846;
}
.place.station {
  font-size: .83rem;
  color: #233746;
  background: #e8f2ed;
  border: 1px solid #263d4b;
  box-shadow: 2px 2px #263d4b;
}
.place.ferry-stop {
  color: #214644;
  background: #e5f2df;
  border: 1px solid #234b4c;
  box-shadow: 2px 2px #234b4c;
}
.place.crossing {
  font: 700 .74rem "Space Grotesk", sans-serif;
  padding: 3px 5px;
  color: #273e40;
  text-shadow: none;
  background: #f4ebdb;
  border: 1px solid #48575a;
  box-shadow: 2px 2px #344a46;
}
.place.district-street {
  font: 700 .77rem "Space Grotesk", sans-serif;
  padding: 3px 6px;
  color: #463b32;
  text-shadow: none;
  background: #f6e9d2;
  border: 1px solid #655343;
  box-shadow: 2px 2px #4a433b;
}
.place.landmark {
  font: 700 .75rem "Space Grotesk", sans-serif;
  padding: 3px 6px;
  color: #fff5db;
  text-shadow: none;
  background: #55483d;
  border: 1px solid #332e29;
  box-shadow: 2px 2px #2a312e62;
}
.place.landmark::after {
  position: absolute;
  left: calc(50% - 3px);
  bottom: -4px;
  width: 5px;
  height: 3px;
  background: #55483d;
  content: '';
}
.place.landmark-below::after { bottom: auto; top: -4px; }
.place[hidden] { display: none; }
.map-message, .vehicle-bubble {
  position: absolute;
  background: var(--light);
  color: var(--ink);
  border: 1px solid var(--panel-edge);
  box-shadow: 2px 2px 0 #26404a;
  font-weight: 700;
  font-size: .875rem;
  padding: 6px 10px;
  pointer-events: none;
}
.map-message { top: 50%; left: 50%; translate: -50% -50%; }
.vehicle-bubble { font: 700 1.05rem var(--display); top: 0; left: 0; translate: -50% calc(-100% - 16px); max-width: min(52%, 260px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compass, .map-controls, .map-scale { position: absolute; user-select: none; }
.compass {
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--light);
  border: 1px solid var(--panel-edge);
  box-shadow: 2px 2px 0 #263c3b85;
  padding: 4px 7px 4px 4px;
  font: 700 1rem var(--display);
  pointer-events: none;
}
.map-controls { right: 12px; bottom: 12px; display: flex; gap: 4px; }
.map-view[data-harbour-compact="true"] .map-controls { top: 8px; right: 8px; bottom: auto; }
.map-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--panel-edge);
  background: var(--light);
  box-shadow: 2px 2px 0 #263c3b85;
  font-size: 1.25rem;
  font-weight: 700;
}
.map-controls button:hover { background: #ffebaf; }
.map-controls button:disabled { opacity: .65; cursor: default; }
.map-scale {
  bottom: 11px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--light);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 650;
  pointer-events: none;
}
#scale-bar { display: block; height: 6px; border: solid currentColor; border-width: 0 1px 2px; }
.map-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: 8px 12px;
  color: var(--muted);
  font-size: .75rem;
  min-height: 36px;
}
.map-foot { flex-wrap: wrap; }
.rail-note {
  padding: 8px 12px;
  margin: 0;
  border-top: 1px solid var(--panel-edge);
  font-size: .81rem;
  color: var(--muted);
}
.rail-note a { color: inherit; text-underline-offset: 2px; }
.map-legend, .map-credits { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.map-legend > span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.rail-tunnel-key { position: relative; display: inline-block; width: 20px; height: 10px; background: #52605a; }
.rail-tunnel-key::after { position: absolute; inset: 4px 2px auto; border-top: 2px dashed #d5d9c3; content: ''; }
.road-key, .track-key, .rail-key, .water-key, .stop-key, .cycleway-key { display: inline-block; position: relative; height: 10px; }
.road-key { width: 20px; background: #354750; }
.road-key::after { content: ''; position: absolute; inset: 4px 2px auto; border-top: 2px dashed #f1ebc8; }
.track-key { width: 20px; background: #453144; }
.track-key::after { content: ''; position: absolute; inset: 2px 1px; border-block: 2px solid #f8db9c; }
.rail-key {
  width: 21px;
  background: repeating-linear-gradient(90deg, #b9d2dc 0 2px, #2b3c4c 2px 5px);
  border-block: 2px solid #2b3c4c;
}
.rail-key::after { content: ''; position: absolute; inset: 2px 1px auto; border-top: 2px solid #deebea; }
.water-key { width: 20px; background: #285860; }
.water-key::after { content: ''; position: absolute; inset: 4px 2px auto; border-top: 2px dashed #d8f6dc; }
.cycleway-key { width: 20px; background: #426f60; }
.cycleway-key::after { content: ''; position: absolute; inset: 4px 2px auto; border-top: 2px solid #cce4cb; }
.stop-key { width: 10px; background: #fff5d8; border: 2px solid #493846; }

.traffic { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: calc(var(--scene-height) + 150px); }
.traffic-heading { padding: 15px 13px 11px; }
.traffic-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; gap: 8px; }
h2 { font-family: var(--display); font-size: 1.64rem; line-height: 1.15; }
.vehicle-count, .empty { color: var(--muted); font-size: .875rem; }
.search { display: flex; align-items: center; gap: 7px; border: 1px solid #a9ac99; background: #f3eedb; padding: 0 8px; }
.search input { width: 100%; min-height: 36px; min-width: 0; border: 0; background: transparent; font-size: .9rem; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 2px solid #a3412d; outline-offset: 2px; }
.search input::placeholder { color: #53645e; }
.traffic-scroll { grid-row: 3; overflow: auto; min-height: 0; padding: 5px 10px 8px; scrollbar-color: #a7ab96 transparent; scrollbar-width: thin; }
.vehicle-list { list-style: none; margin: 0; padding: 0; }
.vehicle-list li + li { border-top: 1px solid #e2decc; }
.vehicle-row {
  width: 100%;
  padding: 5px 4px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  text-align: left;
  min-height: 44px;
}
.vehicle-row:focus-visible { outline-offset: -3px; }
.vehicle-row:hover, .vehicle-row[aria-pressed="true"] { background: #efe9d1; }
.vehicle-icon { display: grid; place-items: center; width: 31px; height: 28px; outline: 1px solid #354c4090; outline-offset: -1px; }
.vehicle-icon .pixel-icon { width: 21px; height: 21px; }
.vehicle-row-copy { display: grid; gap: 1px; min-width: 0; }
.vehicle-row strong, .vehicle-row .subtitle { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vehicle-row strong { font-size: .875rem; }
.vehicle-row .subtitle { color: var(--muted); font-size: .75rem; }
.badge { color: var(--muted); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.badge[data-state="live"] { color: #246047; }
.badge[data-state="schedule"] { color: #7c502d; }
.badge[data-state="demo"] { color: #70476c; }
.badge[data-state="stale"], .badge[data-state="unavailable"] { color: #934938; }
.empty { padding: 0.75rem 4px; }

.selection { grid-row: 2; background: #ece8d3; border-block: 1px solid #ccc9ab; padding: 10px 13px; }
.selection-heading { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; }
.selection h3 { font-size: .95rem; line-height: 1.1; overflow-wrap: anywhere; }
#close-selection { border: 0; background: transparent; padding: 2px 5px; font-size: 1.25rem; }
.selection p { font-size: .82rem; margin-block: 6px; color: var(--muted); overflow-wrap: anywhere; }
.selection .selected-ship-berth { color: var(--ink); font-weight: 700; }
.selection-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.selection-actions button { font-size: .75rem; min-height: 28px; padding: 2px 6px; }
.selection-actions button[aria-pressed="true"] { background: var(--green); color: var(--light); }
.selection-actions button[aria-pressed="true"] .pixel-icon { filter: brightness(0) invert(.9); }
.feed-panel { grid-row: 4; border-top: 1px solid var(--line); padding: 9px 13px 11px; background: #f1ecd9; }
.feed-panel header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.feed-panel h3 { font: 700 1.13rem var(--display); }
#demo { background: transparent; border: 1px solid #929686; font-size: .75rem; font-weight: 650; padding: 3px 6px; }
#demo:hover, #demo[aria-pressed="true"] { background: #e4dec6; }
.feed-list > div { display: flex; justify-content: space-between; gap: 6px; font-size: .8rem; line-height: 1.55; }
.ferry-service {
  margin-top: 7px;
  border-top: 1px solid #c8c0a8;
  padding-top: 6px;
  color: #34483d;
  font-size: .76rem;
}
.feed-list dt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; padding-block: 15px; }
.footer span span { padding-inline: 3px; }
@media (max-width: 1020px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(252px, 275px); gap: 11px; }
  .shell { width: calc(100% - 32px); }
  .layers { gap: 4px; }
  .layer { padding-inline: 5px; gap: 4px; }
}
@media (max-width: 800px) {
  :root { --scene-height: clamp(27rem, 65vh, 41rem); }
  .shell { width: calc(100% - 22px); }
  .masthead { min-height: 82px; }
  .workspace { grid-template-columns: 1fr; gap: 12px; }
  .traffic { height: auto; grid-template-rows: auto auto auto auto; }
  .traffic-scroll { max-height: 24rem; }
}
@media (max-width: 475px) {
  .brand-icon { width: 37px; height: 37px; }
  .brand-icon .pixel-icon { width: 27px; height: 27px; }
  .identity { gap: .58rem; }
  .identity p { font-size: .79rem; }
  .conditions { gap: .5rem; }
  .weather { display: none; }
  .clock { min-width: 46px; }
  .clock time { font-size: .96rem; }
  .map-toolbar { padding-inline: 6px; min-height: 50px; }
  .labels-button { padding-inline: 4px; }
  .map-foot { padding-inline: 6px; }
}
@media (max-width: 355px) {
  h1 { font-size: 1.55rem; }
  .identity p { font-size: .71rem; }
  .labels-button span:last-child { display: none; }
}

.map-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  border-top: 1px solid #d8d0bc;
  background: #eeebdd;
  padding: 5px 12px;
}
.map-scales { display: inline-flex; }
.map-scales button, .close-up-link, .detail-area-picker {
  font: 700 .83rem "Space Grotesk", sans-serif;
  color: var(--ink);
  border: 1px solid #78877a;
  background: #faf7ec;
  min-height: 44px;
  padding: 5px 10px;
}
.map-scales > * + * { margin-inline-start: -1px; }
.close-up-link { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
.map-scales button[aria-pressed="true"] { z-index: 1; background: #355752; color: #fff9e8; border-color: #355752; }
.map-scales button[aria-pressed="false"]:hover, .close-up-link:hover, .detail-area-picker:hover { background: #e5eee3; }
.map-scales :focus-visible { z-index: 2; }
.detail-area-picker { width: min(100%, 13.5rem); cursor: pointer; }
.detail-area-picker:focus-visible { outline: 3px solid #a3412d; outline-offset: 3px; }
@media (max-width: 475px) {
  .map-presets { padding-inline: 6px; gap: 5px 6px; }
  .map-scales button, .close-up-link, .detail-area-picker { font-size: .76rem; padding-inline: 6px; }
  .detail-area-picker { flex: 1 1 7.1rem; width: auto; min-width: 0; max-width: 13.5rem; }
}
.feed-name { cursor: help; }
.badge[data-state="loading"] { color: var(--muted); }
.vehicle-bubble.below { translate: -50% 18px; }
.vehicle-row .subtitle:empty { display: none; }
@media (max-width: 480px) {
  .layer-count { display: none; }
  .layer { font-size: .8rem; }
}
@media (max-width: 385px) {
  .labels-button span:last-child { display: none; }
}
@media (max-width: 345px) {
  .layer > span:first-child { display: none; }
}

@media (max-width: 580px) {
  .map-toolbar:has(.focus-button:not([hidden])) .map-options { width: 100%; justify-content: space-between; }
  .map-toolbar:has(.focus-button:not([hidden])) .map-options .labels-button span:last-child { display: initial; }
  .map-options > button, .layer { min-height: 44px; }
  .map-credits { margin-top: 2px; }
}
