:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: rgba(10, 18, 18, 0.84);
  --panel-strong: rgba(13, 24, 24, 0.96);
  --line: rgba(218, 230, 221, 0.16);
  --text: #f4f0e8;
  --muted: #a9b7af;
  --soft: #6f8079;
  --accent: #f2b84a;
  --accent-2: #37d3a3;
  --danger: #ff6f61;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 25%, rgba(242, 184, 74, 0.11), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(55, 211, 163, 0.1), transparent 30%),
    #07100f;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 12, 12, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 268px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(244, 240, 232, 0.28);
  border-radius: 50%;
  position: relative;
  background:
    linear-gradient(140deg, transparent 42%, rgba(242, 184, 74, 0.9) 43% 52%, transparent 53%),
    radial-gradient(circle at 60% 38%, #37d3a3 0 5px, transparent 6px);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(244, 240, 232, 0.45);
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.region-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.region-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.82rem;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.tab:hover {
  background: rgba(242, 184, 74, 0.14);
  border-color: rgba(242, 184, 74, 0.42);
  color: var(--text);
}

.tab.is-active {
  background: rgba(242, 184, 74, 0.22);
  border-color: rgba(242, 184, 74, 0.7);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 74, 0.22);
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 184, 74, 0.46);
  background: rgba(242, 184, 74, 0.12);
}

.icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#toggleRoutes {
  margin-left: auto;
  display: none;
}

.route-rail {
  position: fixed;
  z-index: 12;
  top: 92px;
  left: 22px;
  bottom: 24px;
  width: 322px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.rail-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.78rem;
}

.route-search,
.season-filter {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.season-filter {
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
}

.route-search span,
.season-filter span {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.route-search input,
.season-filter select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background: rgba(2, 10, 9, 0.62);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.86rem;
  outline: none;
}

.season-filter select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(244, 240, 232, 0.72) 50%) calc(100% - 16px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(244, 240, 232, 0.72) 50%, transparent 50%) calc(100% - 11px) 50% / 6px 6px no-repeat,
    rgba(2, 10, 9, 0.62);
  padding-right: 30px;
}

.route-search input::placeholder {
  color: rgba(216, 226, 220, 0.44);
}

.route-search input:focus,
.season-filter select:focus {
  border-color: rgba(242, 184, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(242, 184, 74, 0.12);
}

.route-list {
  overflow: auto;
  padding: 10px;
}

.route-empty {
  margin: 4px;
  padding: 18px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.route-card {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.route-card:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.14);
}

.route-card.is-active {
  transform: translateX(2px);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--route-color, var(--accent)) 18%, transparent),
      rgba(255, 255, 255, 0.06) 36%
    );
  border-color: color-mix(in srgb, var(--route-color, var(--accent)) 55%, transparent);
  box-shadow:
    inset 3px 0 0 var(--route-color, var(--accent)),
    0 6px 22px -12px color-mix(in srgb, var(--route-color, var(--accent)) 70%, transparent);
}

.route-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.booking-link:focus-visible,
.view-gallery:focus-visible,
.expand-mini-map:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.route-color {
  width: 8px;
  height: 52px;
  border-radius: 999px;
  background: var(--route-color, var(--accent));
  box-shadow: 0 0 24px var(--route-color, var(--accent));
}

.route-card-copy {
  min-width: 0;
}

.route-card strong,
.route-card small {
  display: block;
}

.route-card strong {
  line-height: 1.25;
}

.route-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.route-card-meta {
  color: var(--soft);
  font-size: 0.72rem;
  white-space: nowrap;
}

.map-stage {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.map-viewport.is-panning {
  cursor: grabbing;
}

.main-tile-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #07100f;
  pointer-events: auto;
}

.main-tile-map .leaflet-tile {
  filter: saturate(0.82) brightness(0.82) contrast(1.08);
}

.main-tile-map .leaflet-control-container {
  display: none;
}

.map-atmosphere {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 16, 15, 0.88) 0 18%, transparent 40%),
    linear-gradient(0deg, rgba(7, 16, 15, 0.82), transparent 45%, rgba(7, 16, 15, 0.4)),
    radial-gradient(circle at center, transparent 0 36%, rgba(0, 0, 0, 0.32) 78%);
  pointer-events: none;
  z-index: 1;
}

.world-map {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.98;
}

.main-map-is-leaflet .world-map {
  opacity: 0;
  pointer-events: none;
}

.ocean {
  fill: rgba(7, 22, 21, 0.12);
}

.grid path,
.grid {
  stroke: rgba(214, 232, 223, 0.055);
  stroke-width: 1;
  fill: transparent;
}

.bathymetry path {
  fill: none;
  stroke: rgba(71, 122, 135, 0.04);
  stroke-width: 1.2;
  stroke-linejoin: round;
  pointer-events: none;
}

.bathymetry path:nth-child(2n) {
  stroke: rgba(71, 122, 135, 0.08);
  stroke-width: 0.8;
}

.graticule path {
  fill: none;
  stroke: rgba(214, 232, 223, 0.035);
  stroke-width: 0.8;
  pointer-events: none;
}

.landmasses path {
  fill: rgba(24, 42, 37, 0.06);
  stroke: rgba(238, 232, 214, 0.08);
  stroke-width: 0.55;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.landmasses .coast-shelf {
  fill: rgba(55, 211, 163, 0.025);
  stroke: rgba(85, 160, 152, 0.06);
  stroke-width: 4;
  filter: none;
}

.landmasses .country-outline {
  fill: rgba(25, 43, 38, 0.04);
  stroke: rgba(238, 232, 214, 0.1);
}

.landmasses .country-outline:nth-child(3n) {
  fill: rgba(23, 40, 35, 0.04);
}

.landmasses .country-outline:nth-child(5n) {
  fill: rgba(29, 48, 41, 0.04);
}

.landmasses .terrain {
  fill: none;
  stroke: rgba(242, 184, 74, 0.13);
  stroke-width: 1.2;
  stroke-linecap: round;
  filter: none;
}

.landmasses .ice {
  fill: #203431;
  stroke: rgba(220, 246, 239, 0.28);
}

.topography .climate-zone {
  stroke: none;
  opacity: 0.28;
  mix-blend-mode: screen;
}

.topography .arid {
  fill: #8b6f38;
}

.topography .forest {
  fill: #2e6a4f;
}

.topography .tundra {
  fill: #6b837e;
}

.topography .elevation-wash {
  fill: rgba(137, 107, 56, 0.34);
  stroke: rgba(242, 184, 74, 0.1);
  stroke-width: 1;
  filter: blur(0.2px);
}

.topography .contour {
  fill: none;
  stroke: rgba(231, 214, 171, 0.18);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topography .ridge {
  fill: none;
  stroke: rgba(244, 222, 174, 0.34);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(242, 184, 74, 0.16));
}

.hydrography path {
  fill: none;
  stroke: rgba(91, 183, 205, 0.27);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.borders path {
  fill: none;
  stroke: rgba(238, 232, 214, 0.2);
  stroke-width: 0.9;
  stroke-dasharray: 2.5 4;
  stroke-linecap: round;
  pointer-events: none;
}

.borders .major-border {
  stroke: rgba(244, 240, 232, 0.33);
  stroke-width: 1.1;
  stroke-dasharray: 4 4;
}

.map-labels text {
  fill: rgba(231, 239, 234, 0.46);
  font-size: calc(9px * var(--map-label-scale, 1));
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(7, 16, 15, 0.8);
  stroke-width: 3px;
  pointer-events: none;
}

.map-labels .city-label {
  fill: rgba(244, 240, 232, 0.58);
  font-size: calc(7px * var(--map-label-scale, 1));
  letter-spacing: 0.08em;
}

.map-labels .city-dot {
  fill: rgba(244, 240, 232, 0.72);
  stroke: rgba(7, 16, 15, 0.9);
  stroke-width: 1.4;
  pointer-events: none;
}

.detail-map-labels {
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.is-map-zoomed .detail-map-labels {
  opacity: 1;
}

.detail-map-labels text {
  paint-order: stroke;
  stroke: rgba(7, 16, 15, 0.86);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.detail-map-labels .country-detail {
  fill: rgba(244, 240, 232, 0.56);
  font-size: calc(5.8px * var(--detail-label-scale, 1));
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-map-labels .city-detail {
  fill: rgba(244, 240, 232, 0.74);
  font-size: calc(4.8px * var(--detail-label-scale, 1));
  font-weight: 850;
  letter-spacing: 0;
}

.detail-map-labels .airport-detail {
  fill: rgba(242, 184, 74, 0.82);
  font-size: calc(4.4px * var(--detail-label-scale, 1));
  font-weight: 900;
  letter-spacing: 0.06em;
}

.detail-map-labels .city-dot-detail {
  fill: rgba(242, 184, 74, 0.82);
  stroke: rgba(7, 16, 15, 0.9);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.route-path {
  fill: none;
  stroke: var(--route-color);
  stroke-width: calc(3 * var(--route-scale, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--route-color));
  opacity: 0.84;
  stroke-dasharray: var(--path-length);
  stroke-dashoffset: var(--path-length);
  animation: routeLoop 5200ms ease-in-out infinite;
  transition:
    stroke-width 180ms ease,
    opacity 180ms ease;
}

.route-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  outline: none;
}

.route-hit:focus,
.marker:focus {
  outline: none;
}

.route-hit:focus-visible + .route-path,
.marker:focus-visible {
  filter: drop-shadow(0 0 10px var(--route-color));
}

.route-group.is-dimmed .route-path {
  opacity: 0.12;
}

.route-group.is-dimmed {
  pointer-events: none;
}

.route-group.is-active .route-path {
  stroke-width: calc(5 * var(--route-scale, 1));
  opacity: 1;
}

.route-group.is-marker-focus .route-path,
.route-group.is-marker-focus .route-hit {
  opacity: 0;
  pointer-events: none;
}

.route-group.is-active .marker {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--route-color) 62%, white 38%)) brightness(1.32) saturate(1.42);
  animation: selectedMarkerPulse 1900ms ease-in-out infinite;
}

.route-group.is-muted .route-path {
  opacity: 0.12;
  animation-duration: 5200ms;
}

.route-group.is-muted .marker {
  opacity: 0.8;
}

.marker {
  fill: var(--route-color);
  stroke: #07100f;
  stroke-width: 2;
  cursor: pointer;
  filter: drop-shadow(0 0 14px var(--route-color));
}

.main-tile-map .route-path {
  stroke-dasharray: var(--path-length);
  stroke-dashoffset: var(--path-length);
  animation: routeLoop 5200ms ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--route-color));
}

.main-tile-map .route-path.is-active {
  stroke-width: 5;
  opacity: 1;
}

.main-tile-map .route-path.is-dimmed {
  opacity: 0.12;
}

.main-tile-map .marker {
  filter: drop-shadow(0 0 14px var(--route-color));
}

.main-tile-map .marker.is-active {
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--route-color) 62%, white 38%)) brightness(1.32) saturate(1.42);
  animation: selectedMarkerPulse 1900ms ease-in-out infinite;
}

@keyframes selectedMarkerPulse {
  0%,
  100% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 18px color-mix(in srgb, var(--route-color) 68%, white 32%)) brightness(1.24) saturate(1.32);
  }
  50% {
    transform: scale(1.26);
    filter: drop-shadow(0 0 34px color-mix(in srgb, var(--route-color) 45%, white 55%)) brightness(1.58) saturate(1.65);
  }
}

@keyframes routeLoop {
  0% {
    stroke-dashoffset: var(--path-length);
    opacity: 0.2;
  }
  42%,
  58% {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }
  100% {
    stroke-dashoffset: var(--path-length);
    opacity: 0.2;
  }
}

.map-copy {
  position: fixed;
  z-index: 3;
  left: 380px;
  right: 440px;
  bottom: 118px;
  max-width: 760px;
  pointer-events: none;
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    visibility 240ms ease;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.1rem, 6vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.map-copy p:last-child {
  max-width: 560px;
  margin: 18px 0 0;
  color: #d2dbd5;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.status-strip {
  position: fixed;
  z-index: 4;
  left: 380px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  max-width: calc(100vw - 820px);
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    visibility 240ms ease;
}

.is-map-zoomed .map-copy {
  opacity: 0.14;
  transform: translateY(12px);
}

.is-map-zoomed .status-strip {
  opacity: 0.22;
  transform: translateY(10px);
}

.is-map-deep-zoom .map-copy,
.is-map-deep-zoom .status-strip {
  opacity: 0;
  visibility: hidden;
}

.status-strip article {
  min-width: 138px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 12, 12, 0.62);
  backdrop-filter: blur(14px);
}

.status-strip span,
.status-strip small {
  display: block;
}

.status-strip span {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.1rem;
}

.status-strip small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.detail-drawer {
  position: fixed;
  z-index: 18;
  top: 92px;
  right: 22px;
  bottom: 24px;
  width: min(410px, calc(100vw - 44px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 40px));
  transition: transform 260ms ease;
  overflow: hidden;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.34);
}

#detailContent {
  height: 100%;
  overflow: auto;
  padding-bottom: 18px;
}

.route-hero {
  min-height: 240px;
  padding: 118px 20px 18px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(7, 16, 15, 0.94)),
    var(--hero-image),
    radial-gradient(circle at 30% 30%, rgba(242, 184, 74, 0.22), transparent 36%),
    #182523;
  background-size: cover;
  background-position: center;
}

.route-hero p {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-hero h2 {
  margin: 0;
  padding-right: 44px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.detail-section {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #dce4df;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.overview-grid small,
.overview-grid strong {
  display: block;
}

.overview-grid small {
  color: var(--soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-grid strong {
  margin-top: 6px;
  line-height: 1.3;
}

.airport-list {
  display: grid;
  gap: 10px;
}

.airport-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.airport-code {
  display: inline-grid;
  place-items: center;
  height: 34px;
  border-radius: 6px;
  background: rgba(242, 184, 74, 0.14);
  color: var(--accent);
  font-weight: 950;
  letter-spacing: 0.06em;
}

.airport-item strong,
.airport-item small {
  display: block;
}

.airport-item small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.airport-distance {
  color: #dce4df;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.mini-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b1718;
}

.leaflet-route-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1718;
}

.leaflet-route-map .leaflet-control-attribution {
  background: rgba(7, 16, 15, 0.72);
  color: rgba(244, 240, 232, 0.7);
  font-size: 10px;
}

.leaflet-route-map .leaflet-control-attribution a {
  color: rgba(242, 184, 74, 0.86);
}

.leaflet-stop-marker {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #07100f;
  background: var(--route-color, #f2b84a);
  color: #07100f;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 0 0 5px rgba(242, 184, 74, 0.22);
}

.leaflet-stop-label {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(7, 16, 15, 0.84);
  border: 1px solid rgba(244, 240, 232, 0.2);
  color: #f4f0e8;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.mini-map-wrap {
  position: relative;
}

.expand-mini-map {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(244, 240, 232, 0.24);
  border-radius: var(--radius);
  background: rgba(4, 10, 10, 0.72);
  color: var(--text);
  display: inline-grid;
  place-items: center;
}

.expand-mini-map svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-map .mini-route {
  fill: none;
  stroke: var(--route-color);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px var(--route-color));
}

.mini-map .mini-route-halo {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-map .mini-grid {
  stroke: rgba(220, 235, 232, 0.08);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.mini-map .mini-country {
  fill: #1b2d27;
  stroke: rgba(238, 232, 214, 0.32);
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.mini-map .mini-country:nth-of-type(3n) {
  fill: #172821;
}

.mini-map .mini-country:nth-of-type(5n) {
  fill: #20342c;
}

.mini-map .mini-relief {
  fill: none;
  stroke: rgba(242, 184, 74, 0.16);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mini-map .mini-water-label {
  fill: rgba(91, 183, 205, 0.42);
  font-size: 8px;
  font-weight: 900;
}

.mini-map .mini-scale,
.mini-map .mini-compass {
  fill: rgba(244, 240, 232, 0.78);
  stroke: rgba(7, 16, 15, 0.9);
  stroke-width: 2px;
}

.mini-map .mini-scale-line {
  stroke: rgba(244, 240, 232, 0.76);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.mini-map .mini-stop {
  fill: #dff9eb;
  stroke: #07100f;
  stroke-width: 2;
}

.mini-map .mini-stop.is-terminal {
  fill: var(--route-color);
  r: 5.2;
}

.mini-map .mini-stop-number {
  fill: #07100f;
  stroke: none;
  font-size: 5.2px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: normal;
}

.expanded-map-shell .mini-map .mini-stop-number {
  font-size: 5.8px;
}

.mini-map circle {
  vector-effect: non-scaling-stroke;
}

.mini-map text {
  fill: rgba(244, 240, 232, 0.86);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(7, 16, 15, 0.9);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mini-map .mini-coordinate {
  fill: rgba(169, 183, 175, 0.58);
  font-size: 7px;
  font-weight: 700;
  stroke-width: 2px;
}

.mini-map .mini-detour {
  fill: rgba(242, 184, 74, 0.82);
  font-size: 7px;
}

.mini-map-modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: none;
  padding: 28px;
  background: rgba(3, 8, 8, 0.72);
  backdrop-filter: blur(16px);
}

.mini-map-modal.is-open {
  display: grid;
  place-items: center;
}

.mini-map-dialog {
  width: min(1080px, 100%);
  height: min(760px, calc(100dvh - 56px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.mini-map-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.mini-map-dialog-header p,
.mini-map-dialog-header h2 {
  margin: 0;
}

.mini-map-dialog-header p {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-map-dialog-header h2 {
  margin-top: 4px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.mini-map-actions {
  display: flex;
  gap: 8px;
}

.expanded-map-shell {
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.expanded-map-shell.is-panning {
  cursor: grabbing;
}

.expanded-map-shell .mini-map {
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  display: block;
}

.expanded-map-shell .leaflet-route-map {
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.expanded-map-shell .mini-map text {
  font-size: 10px;
}

.expanded-map-shell .mini-map .mini-coordinate,
.expanded-map-shell .mini-map .mini-detour {
  font-size: 9px;
}

.signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.signal small,
.signal strong {
  display: block;
}

.signal small {
  color: var(--soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal strong {
  margin-top: 6px;
  line-height: 1.3;
}

.weather-band,
.season-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
}

.season-band span {
  min-height: 30px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.expected-weather {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.expected-weather svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expected-weather span {
  color: #dce4df;
  font-size: 0.78rem;
  font-weight: 800;
}

.weather-band span:nth-child(1) {
  background: rgba(66, 214, 245, 0.38);
}

.weather-band span:nth-child(2) {
  background: rgba(55, 211, 163, 0.42);
}

.weather-band span:nth-child(3) {
  background: rgba(242, 184, 74, 0.44);
}

.weather-band span:nth-child(4) {
  background: rgba(255, 111, 97, 0.32);
}

.season-band span.is-prime {
  background: var(--route-color);
  box-shadow: 0 0 18px var(--route-color);
}

.elevation-profile {
  width: 100%;
  height: 46px;
  margin-top: 13px;
}

.elevation-profile polyline {
  fill: none;
  stroke: var(--route-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fuel-meter {
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fuel-meter span {
  display: block;
  width: var(--fuel-width);
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--danger));
}

.stop-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stop-list span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: #d6dfd9;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.045);
}

.editorial {
  color: #d0dad4;
  line-height: 1.7;
  margin: 0;
}

.why {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--route-color);
  color: #f2eadc;
  line-height: 1.55;
}

.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.gallery-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-header-row h3 {
  margin: 0;
}

.view-gallery {
  border: 1px solid rgba(242, 184, 74, 0.34);
  border-radius: var(--radius);
  background: rgba(242, 184, 74, 0.1);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.gallery-asset {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.66)),
    var(--image),
    linear-gradient(135deg, rgba(55, 211, 163, 0.2), rgba(242, 184, 74, 0.2));
  background-size: cover;
  background-position: center;
}

.gallery-asset:first-child {
  min-height: 264px;
  grid-row: span 2;
}

.gallery-asset span {
  display: none;
}

.gallery-asset.is-loading,
.gallery-modal-item.is-loading {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    #14211f;
  background-size: 220% 100%;
  animation: galleryLoading 1400ms ease-in-out infinite;
}

.gallery-asset.is-loading span,
.gallery-modal-item.is-loading span {
  color: rgba(236, 242, 237, 0.72);
}

@keyframes galleryLoading {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.gallery-modal {
  position: fixed;
  z-index: 42;
  inset: 0;
  display: none;
  padding: 28px;
  background: rgba(3, 8, 8, 0.76);
  backdrop-filter: blur(16px);
}

.gallery-modal.is-open {
  display: grid;
  place-items: center;
}

.gallery-dialog {
  width: min(1180px, 100%);
  height: min(820px, calc(100dvh - 56px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.gallery-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.gallery-dialog-header p,
.gallery-dialog-header h2 {
  margin: 0;
}

.gallery-dialog-header p {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-dialog-header h2 {
  margin-top: 4px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.gallery-modal-grid {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery-modal-item {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72)),
    var(--image),
    #14211f;
  background-size: cover;
  background-position: center;
}

.gallery-modal-item:nth-child(1),
.gallery-modal-item:nth-child(8) {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 392px;
}

.gallery-modal-item:nth-child(5) {
  grid-column: span 2;
}

.gallery-modal-item span {
  display: none;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booking-link {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.booking-link:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 184, 74, 0.42);
  background: rgba(242, 184, 74, 0.1);
}

.booking-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-link strong {
  font-size: 0.9rem;
}

.booking-link small {
  color: var(--muted);
  line-height: 1.35;
}

.itinerary {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.itinerary li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.itinerary span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f0e8;
  border: 1px solid rgba(244, 240, 232, 0.22);
  font-weight: 900;
  font-size: 0.78rem;
}

.itinerary p {
  margin: 0;
  color: #d4ded8;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .map-copy {
    right: 40px;
    left: 370px;
  }

  .status-strip {
    max-width: none;
    right: 40px;
  }

  .detail-drawer {
    width: min(460px, calc(100vw - 44px));
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100dvh;
  }

  .topbar {
    height: auto;
    min-height: 66px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 0.86rem;
  }

  .brand small {
    display: none;
  }

  .region-tabs {
    order: 3;
    width: 100%;
    padding-top: 8px;
  }

  #toggleRoutes {
    display: inline-grid;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .route-rail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: min(72dvh, 680px);
    border-radius: var(--radius) var(--radius) 0 0;
    padding-top: 12px;
    transform: translateY(calc(100% + 24px));
    transition: transform 240ms ease;
  }

  .route-rail::before,
  .detail-drawer::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(244, 240, 232, 0.28);
    transform: translateX(-50%);
  }

  .route-rail .rail-heading {
    padding-top: 18px;
  }

  .route-rail.is-open {
    transform: translateY(0);
  }

  .map-stage {
    min-height: 100dvh;
  }

  .map-copy {
    left: 18px;
    right: 18px;
    bottom: 126px;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 13vw, 4.4rem);
  }

  .map-copy p:last-child {
    max-width: 34rem;
  }

  .status-strip {
    left: 12px;
    right: 12px;
    bottom: 14px;
    overflow-x: auto;
  }

  .status-strip article {
    min-width: 126px;
  }

  .detail-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(86dvh, 780px);
    border-radius: var(--radius) var(--radius) 0 0;
    padding-top: 12px;
    transform: translateY(calc(100% + 24px));
  }

  .detail-drawer.is-open {
    transform: translateY(0);
  }

  .gallery-modal,
  .mini-map-modal {
    padding: 12px;
  }

  .route-hero {
    min-height: 210px;
    padding-top: 96px;
  }

  .gallery-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-modal-item:nth-child(1),
  .gallery-modal-item:nth-child(8),
  .gallery-modal-item:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .overview-grid,
  .booking-grid,
  .signals {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-modal-grid {
    grid-template-columns: 1fr;
  }

  .gallery-modal-item,
  .gallery-modal-item:nth-child(1),
  .gallery-modal-item:nth-child(5),
  .gallery-modal-item:nth-child(8) {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }

  .gallery-asset:first-child {
    min-height: 210px;
  }

  .route-hero h2 {
    font-size: 1.75rem;
  }
}

@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;
  }

  .route-path {
    stroke-dashoffset: 0;
    opacity: 0.84;
  }

  .route-group.is-active .marker {
    transform: none;
  }
}
