/* Malta trip map. Mobile first, map first, warm limestone and deep sea teal. */

:root {
  --cream: #f3ead9;
  --cream-soft: #faf5ea;
  --cream-deep: #e8dcc6;
  --sand: #dccdb2;
  --ink: #22302d;
  --ink-soft: #586661;
  --ink-faint: #7d8a85;
  --teal: #0f4744;
  --teal-deep: #0a3331;
  --teal-soft: #d9e6e1;
  --orange: #c25a34;
  --orange-soft: #f6e2d8;
  --line: rgba(34, 48, 45, 0.14);
  --line-strong: rgba(34, 48, 45, 0.26);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-panel: 0 -10px 30px rgba(30, 44, 41, 0.14);
  --shadow-card: 0 8px 24px rgba(30, 44, 41, 0.11);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: auto;
  --sheet-max: 34dvh;
  --focus-ring: 0 0 0 3px var(--cream-soft), 0 0 0 6px var(--teal);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: max-content max-content minmax(0, 1fr);
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--teal);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: var(--cream-soft);
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 12px;
}

/* Header */

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 10px 16px 8px;
  background: linear-gradient(180deg, var(--cream-soft), var(--cream));
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
}

.brand__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.brand__title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4.8vw, 1.5rem);
  line-height: 1.15;
  color: var(--teal-deep);
}

.brand__dates {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.brand__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.route-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.route-link:hover {
  background: var(--teal-soft);
}

/* Controls */

.controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 16px 10px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 71, 68, 0.16);
}

.search__icon {
  width: 20px;
  height: 20px;
  margin-left: 14px;
  flex: none;
  color: var(--ink-faint);
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 10px 4px;
  font-size: 0.95rem;
}

.search__input::placeholder {
  color: var(--ink-faint);
}

/* The app ships its own clear button, so the native one would duplicate it. */
.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search__input:focus {
  outline: none;
}

.search__clear {
  flex: none;
  min-height: 44px;
  margin-right: 4px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.sensor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.control-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
}

.control-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.control-button:hover {
  background: var(--teal-soft);
}

.control-button[data-state="on"] {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream-soft);
}

.sensor-status {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-soft);
  min-height: 1.1em;
}

.sensor-status[data-tone="error"] {
  color: #97381d;
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  /* Room for the focus ring inside the scroll box. */
  padding: 5px 3px 9px;
  max-width: 100%;
}

.chips__hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--cream-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.chip__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--dot, var(--ink-faint));
}

.chip__count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Layout */

/* Mobile: the map fills the whole content area and the sheet floats over its
   lower part, so the map stays the main surface. Desktop switches to columns. */
.layout {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
}

.map-wrap {
  position: absolute;
  inset: 0;
  background: var(--teal-soft);
}

.map {
  position: absolute;
  inset: 0;
  background: #dbe7e2;
  font-family: var(--sans);
}

.map-fallback {
  padding: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Once Leaflet takes over the container its own panes cover the fallback. */
.leaflet-container .map-fallback {
  display: none;
}

.map-note {
  position: absolute;
  left: 12px;
  right: 76px;
  bottom: calc(var(--sheet-h, 0px) + 12px);
  z-index: 500;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--cream-soft);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  font-size: 0.78rem;
  color: var(--ink);
}

/* Compass card */

.compass-card {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(250, 245, 234, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(4px);
}

.compass-card__dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--cream);
}

.compass-card__north {
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.compass-card__needle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 15px solid var(--orange);
  transform-origin: 50% 85%;
  transition: transform 120ms linear;
  margin-top: -3px;
}

.compass-card__text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}

/* Leaflet surface */

.leaflet-container {
  font-family: var(--sans);
  font-size: 0.8rem;
  background: #dbe7e2;
}

.leaflet-container a {
  color: var(--teal);
}

.leaflet-control-attribution {
  padding: 3px 6px;
  background: rgba(250, 245, 234, 0.9);
  color: var(--ink-soft);
  font-size: 0.68rem;
  border-top-left-radius: 8px;
}

.leaflet-control-attribution a {
  color: var(--teal);
  text-decoration: underline;
}

.leaflet-touch .leaflet-bar a,
.leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
  background: var(--cream-soft);
  color: var(--teal-deep);
  font-size: 1.2rem;
}

.leaflet-bar {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.leaflet-bar a:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: 0;
}

.leaflet-control-zoom {
  margin-right: 12px;
  margin-bottom: 12px;
}

/* Keep the tile credit and the zoom buttons clear of the bottom sheet. */
.leaflet-bottom.leaflet-right,
.leaflet-bottom.leaflet-left {
  bottom: calc(var(--sheet-h, 0px) + 8px);
}

.pin {
  cursor: pointer;
  transition: stroke-width 120ms ease, r 120ms ease;
}

.pin:focus {
  outline: none;
}

.pin--featured {
  stroke: var(--cream-soft);
}

.pin--selected {
  stroke: var(--teal-deep);
}

.pin--home,
.pin--airport {
  stroke: var(--cream-soft);
}

.you-marker {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.you-marker__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--cream-soft);
  box-shadow: 0 1px 6px rgba(15, 71, 68, 0.5);
}

.you-marker__arrow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 30px solid transparent;
  transform-origin: 50% 50%;
  transition: transform 140ms linear;
  opacity: 0;
}

.you-marker[data-heading="on"] .you-marker__arrow {
  border-bottom-color: rgba(194, 90, 52, 0.85);
  opacity: 1;
}

.leaflet-tooltip.pin-label {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.leaflet-tooltip.pin-label::before {
  display: none;
}

/* Panel and sheet */

.panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(var(--sheet-max), calc(100% - 160px));
  background: var(--cream-soft);
  border-top: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-panel);
  z-index: 600;
  overflow: hidden;
}

.panel[data-expanded="true"] {
  --sheet-max: 74dvh;
}

body[data-view="detail"] .panel {
  --sheet-max: 66dvh;
}

.panel__grip {
  width: 44px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: var(--sand);
  flex: none;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px;
  flex: none;
  border-bottom: 1px solid var(--line);
}

.panel__title {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--teal-deep);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel__meta {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sheet-toggle {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 600;
}

/* In the detail view the Back button is the way out; a collapse toggle there
   would pretend to do something. */
body[data-view="detail"] .sheet-toggle {
  display: none;
}

.sheet-toggle__text {
  display: inline-block;
  min-width: 4.4em;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.places {
  padding: 4px 12px 8px;
}

.place {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
}

.place:hover {
  background: var(--cream);
}

.place[aria-current="true"] {
  background: var(--teal-soft);
}

.place__dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--dot, var(--ink-faint));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.place__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.place__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  overflow-wrap: break-word;
}

.place__meta {
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.place__summary {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.place__flags {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.flag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.flag--deal {
  background: var(--orange);
  color: #fff8f2;
}

.flag--tip {
  background: var(--sand);
  color: #4a3b1c;
}

.flag--winter {
  background: #dce8ec;
  color: #234b56;
}

.empty-state {
  padding: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.panel__footer {
  padding: 8px 16px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-block h3 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 4px;
}

.footer-block p {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.footer-meta {
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
}

/* Detail view */

.detail-view {
  padding: 4px 16px 24px;
}

.detail-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--teal-deep);
  overflow-wrap: break-word;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.pill--accent {
  border-color: var(--orange);
  color: #8f3a1c;
  background: var(--orange-soft);
}

.photo {
  margin: 0 0 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream-deep);
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-deep);
}

.photo figcaption {
  padding: 8px 10px;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.detail-summary {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.detail-tags li {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.detail-block {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--cream);
}

.detail-block h3 {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.detail-block p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink);
}

.detail-block--tip {
  background: #f4ecd9;
  border-color: var(--sand);
}

.detail-block--tip h3 {
  color: #6a5320;
}

.detail-block--winter {
  background: #e4eef0;
  border-color: #c2d6da;
}

.detail-block--winter h3 {
  color: #234b56;
}

.detail-block--seasonal {
  background: #f6ecd7;
  border-color: #e0cda4;
}

.detail-block--seasonal h3 {
  color: #7a5a17;
}

.detail-block--price {
  background: var(--cream-soft);
}

.offer {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.offer:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.offer p {
  margin-bottom: 4px;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.offer-note {
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-style: italic;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.action-link,
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--cream-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.action-link:hover,
.action-button:hover {
  background: var(--teal-deep);
}

.action-link--quiet,
.action-button--quiet {
  background: transparent;
  color: var(--teal);
  border-color: var(--line-strong);
}

.action-link--quiet:hover,
.action-button--quiet:hover {
  background: var(--teal-soft);
}

.noscript {
  padding: 16px;
  font-size: 0.85rem;
}

/* Desktop */

@media (min-width: 900px) {
  body {
    grid-template-rows: max-content max-content minmax(0, 1fr);
  }

  .app-header {
    padding: 16px 24px 12px;
  }

  .controls {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    grid-template-areas:
      "search sensors"
      "search status"
      "chips chips";
    align-items: center;
    gap: 6px 16px;
    padding: 12px 24px 14px;
  }

  .search {
    grid-area: search;
  }

  .sensor-bar {
    grid-area: sensors;
  }

  .sensor-status {
    grid-area: status;
  }

  .chips {
    grid-area: chips;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .map-wrap {
    position: relative;
    inset: auto;
    border-right: 1px solid var(--line);
  }

  .panel {
    position: relative;
    inset: auto;
    max-height: none;
    height: 100%;
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(180deg, var(--cream-soft), var(--cream));
  }

  .map-note {
    bottom: 16px;
    left: 16px;
  }

  .leaflet-bottom.leaflet-right,
  .leaflet-bottom.leaflet-left {
    bottom: 0;
  }

  .panel__grip,
  .sheet-toggle {
    display: none;
  }

  .panel__head {
    padding: 16px 20px 12px;
  }

  .places {
    padding: 0 8px 8px;
  }

  .place {
    padding: 12px 12px;
  }

  .detail-view {
    padding: 4px 20px 28px;
  }

  .panel__footer {
    padding: 12px 20px 28px;
  }

  .compass-card {
    left: 16px;
    top: 16px;
  }
}

@media (min-width: 1280px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 440px;
  }

  body {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 420px) {
  .app-header {
    padding-inline: 12px;
  }

  .controls {
    padding-inline: 12px;
  }

  .route-link {
    padding: 0 12px;
    font-size: 0.76rem;
  }
}

/* Short landscape screens: let the page scroll instead of crushing the map. */
@media (max-height: 560px) and (max-width: 899px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .layout {
    display: grid;
    grid-template-rows: auto auto;
    min-height: 520px;
  }

  .map-wrap {
    position: relative;
    inset: auto;
    min-height: 320px;
  }

  .panel {
    position: relative;
    inset: auto;
    max-height: none;
  }

  .leaflet-bottom.leaflet-right,
  .leaflet-bottom.leaflet-left {
    bottom: 0;
  }

  .map-note {
    bottom: 12px;
  }
}
