:root {
  --paper: #efe3c2;
  --paper-deep: #ddc99d;
  --ink: #2e261d;
  --ink-soft: #5a4a39;
  --line: #8d7655;
  --panel: rgba(244, 234, 207, 0.96);
  --shadow: rgba(46, 38, 29, 0.18);
  --real: #2d633f;
  --estimated: #9a6b22;
  --unavailable: #7b7063;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.45), transparent 30%),
    linear-gradient(135deg, var(--paper), var(--paper-deep));
}

body {
  min-height: 100vh;
}

.masthead {
  min-height: 108px;
  padding: 18px 26px;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(239, 227, 194, .96);
  box-shadow: 0 3px 14px var(--shadow);
  position: relative;
  z-index: 1001;
}

.eyebrow {
  margin: 0 0 3px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  color: var(--ink-soft);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: .04em;
  line-height: .9;
}

.subtitle {
  margin: 7px 0 0;
  color: var(--ink-soft);
}

.status-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .86rem;
}

.status-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.real { background: var(--real); }
.dot.estimated { background: var(--estimated); }
.dot.ready {
  background: transparent;
  border: 2px solid var(--ready, var(--estimated));
}
.dot.unavailable { background: var(--unavailable); }

.layout {
  height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
}

.panel {
  overflow: auto;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(141, 118, 85, .5);
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

input, select, button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 9px;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
}

button {
  grid-column: 1 / -1;
  cursor: pointer;
  font-weight: 700;
  background: var(--ink);
  color: #f7edcf;
  border-color: var(--ink);
}

button:hover {
  filter: brightness(1.12);
}

.explorer {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(141, 118, 85, .55);
  border-radius: 5px;
  background: rgba(255, 250, 240, .48);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.explorer h2 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-size: 1rem;
}

.explorer-train-field {
  grid-column: 1 / -1;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.summary div {
  border: 1px solid rgba(141, 118, 85, .55);
  border-radius: 5px;
  padding: 9px 6px;
  text-align: center;
  background: rgba(255, 250, 240, .56);
}

.summary strong,
.summary span {
  display: block;
}

.summary strong {
  font-size: 1.35rem;
}

.summary span {
  margin-top: 2px;
  font-size: .7rem;
  color: var(--ink-soft);
}

.notice {
  margin: 10px 0;
  font-size: .86rem;
  color: var(--ink-soft);
}

.results {
  display: grid;
  gap: 10px;
}

.card {
  border: 1px solid rgba(141, 118, 85, .65);
  border-radius: 5px;
  padding: 11px;
  background: rgba(255, 250, 240, .72);
  box-shadow: 0 2px 8px rgba(46, 38, 29, .08);
}

.card h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.card p {
  margin: 3px 0;
  font-size: .84rem;
  line-height: 1.35;
}

.card .meta {
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  margin-right: 5px;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .7rem;
}

.badge.real { color: var(--real); }
.badge.estimated { color: var(--estimated); }
.badge.ready {
  color: var(--ready, var(--estimated));
  border-style: dashed;
}
.badge.unavailable { color: var(--unavailable); }
.badge.traction { color: var(--ink-soft); }

.card a {
  color: var(--ink);
  font-weight: 700;
}

.map-wrap,
#map,
#preview-map {
  min-width: 0;
  width: 100%;
  height: 100%;
}

.leaflet-tile {
  filter: sepia(.55) saturate(.65) brightness(1.04) contrast(.92);
}

.leaflet-control-attribution {
  font-size: 10px;
}

.steam-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #f6edcf;
  box-shadow: 0 2px 7px rgba(0,0,0,.32);
  display: grid;
  place-items: center;
  color: #fff8e8;
  line-height: 1;
}

.steam-locomotive-icon {
  width: 27px;
  height: 27px;
  display: block;
  fill: currentColor;
}

.steam-marker.real { background: var(--real); }
.steam-marker.estimated { background: var(--estimated); }

@media (max-width: 860px) {
  .masthead {
    min-height: 128px;
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    height: auto;
    min-height: calc(100vh - 128px);
    grid-template-columns: 1fr;
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }

  #map,
  #preview-map {
    height: 62vh;
  }
}


.entity-link {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.entity-link:hover {
  text-decoration-style: double;
}

.entity-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8efd8;
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(46, 38, 29, .32);
}

.entity-dialog::backdrop {
  background: rgba(46, 38, 29, .46);
}

.entity-dialog-shell {
  position: relative;
  box-sizing: border-box;
  padding: 24px 26px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  max-height: inherit;
}

.entity-dialog-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  min-height: 38px;
  margin: -8px -8px 8px 12px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #f7edcf;
  font-size: 1.45rem;
  line-height: 1;
  z-index: 2;
}

.entity-dialog h2 {
  margin: 2px 48px 12px 0;
  font-size: 1.65rem;
}

.entity-dialog h3 {
  margin: 20px 0 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(141, 118, 85, .4);
  font-size: 1rem;
}

.entity-dialog p,
.entity-dialog li,
.entity-dialog dd,
.entity-dialog dt {
  line-height: 1.45;
}

.entity-kicker {
  margin: 0;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
}

.entity-facts {
  display: grid;
  grid-template-columns: minmax(120px, .6fr) 1fr;
  gap: 5px 14px;
}

.entity-facts dt {
  color: var(--ink-soft);
}

.entity-facts dd {
  margin: 0;
}

.entity-columns {
  columns: 2 220px;
  column-gap: 28px;
}

@media (max-width: 640px) {
  .entity-dialog-shell {
    padding: 18px;
  }

  .entity-facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .entity-facts dd {
    margin-bottom: 8px;
  }
}


.infrastructure-swatch {
  position: relative;
  width: 24px;
  height: 8px;
  display: inline-block;
  vertical-align: middle;
}

.infrastructure-swatch::before,
.infrastructure-swatch::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 999px;
}

.infrastructure-swatch::before {
  top: 2.5px;
  border-top: 2px solid rgba(89, 74, 58, .55);
}

.infrastructure-swatch::after {
  top: 3px;
  border-top: 1px solid rgba(240, 227, 189, .9);
}

.railway-infrastructure {
  fill: none;
  pointer-events: none;
}

.railway-infrastructure-rail {
  stroke: #594a3a !important;
}

.railway-infrastructure-core {
  stroke: #f0e3bd !important;
}

.route-swatch {
  position: relative;
  width: 24px;
  height: 8px;
  display: inline-block;
  vertical-align: middle;
}

.route-swatch::before,
.route-swatch::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 999px;
}

.route-swatch::before {
  top: 2px;
  border-top: 4px solid #4c3828;
  box-shadow: 0 0 0 2px rgba(155, 118, 60, .16);
}

.route-swatch::after {
  top: 3.5px;
  border-top: 1px solid #f2e4bd;
}

.badge.route {
  color: #6b4e2e;
}

.planned-route {
  fill: none;
}

.planned-route-halo {
  stroke: #9b763c !important;
}

.planned-route-rail {
  stroke: #4c3828 !important;
}

.planned-route-core {
  stroke: #f2e4bd !important;
  pointer-events: none;
}


.preview-warning {
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: #5a3b25;
  color: #fff4d6;
  text-align: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .09em;
}

.preview-layout {
  height: calc(100vh - 145px);
}

.preview-masthead {
  min-height: 108px;
}

.preview-back {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.preview-form .preview-at-field {
  grid-column: 1 / -1;
}

.preview-explorer {
  grid-template-columns: 1fr;
}

.preview-explorer .field {
  grid-column: 1 / -1;
}

.preview-mode .card .badge.estimated {
  border-style: dashed;
}

@media (max-width: 860px) {
  .preview-layout {
    height: auto;
  }
}


.position-popup {
  min-width: 240px;
  max-width: 320px;
  line-height: 1.35;
  color: var(--ink);
}

.position-popup-title {
  display: block;
  margin-bottom: 6px;
  font-size: .98rem;
}

.position-popup > div {
  margin: 3px 0;
}

.position-popup-sources {
  margin-top: 7px !important;
  padding-top: 6px;
  border-top: 1px solid rgba(141, 118, 85, .35);
}

.position-popup-sources ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.position-popup-sources li {
  margin: 2px 0;
}

.position-popup-actions {
  margin-top: 8px !important;
  padding-top: 6px;
  border-top: 1px solid rgba(141, 118, 85, .35);
  font-weight: 700;
}

.position-popup a {
  color: var(--ink);
  text-underline-offset: 2px;
}


.station-popup {
  min-width: 220px;
  max-width: 340px;
  color: var(--ink);
}

.station-popup > strong {
  display: block;
  margin-bottom: 5px;
}

.station-popup ul {
  margin: 0;
  padding-left: 18px;
}

.station-popup li {
  margin: 3px 0;
  line-height: 1.3;
}

.station-popup-title {
  font-size: 1rem;
}

.station-photo-slot {
  min-height: 42px;
  margin: 7px 0 9px;
}

.station-photo {
  margin: 0;
}

.station-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  box-sizing: border-box;
  border: 1px solid rgba(141, 118, 85, .45);
  border-radius: 5px;
  background: rgba(255, 250, 240, .68);
}

.station-photo figcaption {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: .68rem;
  line-height: 1.3;
}

.station-photo figcaption a,
.station-popup a {
  color: var(--ink);
  text-underline-offset: 2px;
}

.station-photo-loading,
.station-photo-empty {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: .75rem;
  font-style: italic;
}

.station-services {
  padding-top: 6px;
  border-top: 1px solid rgba(141, 118, 85, .35);
}

.station-services > strong {
  display: block;
  margin-bottom: 4px;
  font-size: .82rem;
}

.station-service-date {
  font-weight: 700;
}

.station-service-detail {
  color: var(--ink-soft);
  font-size: .78rem;
}

.circulation-timeline {
  margin: 8px 0 0;
  padding-left: 24px;
}

.circulation-stop {
  margin: 0 0 10px;
  padding-left: 4px;
}

.circulation-stop strong,
.circulation-stop span {
  display: block;
}

.circulation-stop span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: .9rem;
}


.locomotive-search {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding-top: 8px;
  border-top: 1px solid rgba(141, 118, 85, .35);
}

.locomotive-search .field {
  min-width: 0;
}

.locomotive-search button {
  grid-column: auto;
  width: auto;
  min-width: 110px;
}

.locomotive-search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.locomotive-search-result {
  padding: 7px 8px;
  border: 1px solid rgba(141, 118, 85, .45);
  border-radius: 4px;
  background: rgba(255, 250, 240, .58);
  font-size: .82rem;
  line-height: 1.35;
}

.locomotive-search-result a {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 520px) {
  .locomotive-search {
    grid-template-columns: 1fr;
  }

  .locomotive-search button {
    width: 100%;
  }
}


.locomotive-map-filter {
  grid-column: 1 / -1;
  padding: 8px 9px;
  border: 1px dashed var(--estimated);
  border-radius: 5px;
  background: rgba(255, 250, 240, .72);
  font-size: .82rem;
  line-height: 1.35;
}

.locomotive-map-filter[hidden] {
  display: none;
}

.locomotive-map-filter button {
  display: inline;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .72rem;
}

.locomotive-map-action {
  margin-top: 12px;
  font-weight: 700;
}


.entity-photo {
  margin: 14px 0 18px;
}

.entity-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(141, 118, 85, .45);
  border-radius: 6px;
  background: rgba(255, 250, 240, .68);
}

.entity-photo figcaption {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: .74rem;
  line-height: 1.35;
}

.entity-photo figcaption a {
  color: var(--ink-soft);
  text-underline-offset: 2px;
}

.entity-photo-note {
  margin: 6px 0 0;
  font-size: .74rem;
  line-height: 1.35;
  font-style: italic;
}


.locomotive-hero-photo {
  margin: 0 0 10px;
}

.locomotive-hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 7px;
}

.locomotive-hero-photo figcaption {
  margin-top: 4px;
  font-size: .62rem;
  line-height: 1.25;
  opacity: .78;
}

.locomotive-reference {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: -6px 0 11px;
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.35;
}

.locomotive-reference-separator {
  opacity: .56;
}

.entity-sources {
  margin-top: 14px;
  padding-top: 7px;
  border-top: 1px solid rgba(141, 118, 85, .25);
  color: var(--ink-soft);
}

.entity-sources-title {
  margin: 0 0 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.entity-sources ul {
  margin: 0;
  padding-left: 17px;
}

.entity-sources li {
  margin: 1px 0;
  font-size: .68rem;
  line-height: 1.3;
}

/* ==========================================================================
   Prévisualisation Steam Radar — maquette de référence V1
   Cette couche est strictement limitée à .preview-reference-layout.
   ========================================================================== */

.preview-reference-layout {
  --preview-bg: #090b0a;
  --preview-panel: #101310;
  --preview-panel-2: #151914;
  --preview-panel-soft: #1c211b;
  --preview-gold: #c8963e;
  --preview-gold-bright: #e2b45d;
  --preview-gold-soft: #9d7535;
  --preview-cream: #f0d7a2;
  --preview-text: #e9dfc9;
  --preview-muted: #a89b82;
  --preview-border: rgba(200, 150, 62, .52);
  --preview-border-soft: rgba(200, 150, 62, .22);
  --preview-green: #79b84a;
  --preview-blue: #4c9acf;
  --preview-orange: #e6a72e;
  --real: var(--preview-green);
  --estimated: var(--preview-orange);
  --ready: var(--preview-blue);
  --unavailable: #8a877f;
  margin: 0;
  min-height: 100vh;
  color: var(--preview-text);
  background:
    radial-gradient(circle at 50% 0, rgba(200, 150, 62, .08), transparent 34%),
    linear-gradient(180deg, #080a08, #0c0f0d 44%, #080a08);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.preview-reference-layout * {
  box-sizing: border-box;
}

/* Scrollbars — charte Steam Radar.
   Le sélecteur est limité à la prévisualisation pour ne pas modifier
   l'ancienne interface publique avant sa bascule. */
.preview-reference-layout * {
  scrollbar-width: thin;
  scrollbar-color: var(--preview-gold-soft) #0b0e0c;
}

.preview-reference-layout *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.preview-reference-layout *::-webkit-scrollbar-track {
  background: #0b0e0c;
  border-left: 1px solid rgba(200, 150, 62, .12);
}

.preview-reference-layout *::-webkit-scrollbar-thumb {
  min-height: 34px;
  border: 2px solid #0b0e0c;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      var(--preview-gold-bright),
      var(--preview-gold-soft)
    );
  background-clip: padding-box;
}

.preview-reference-layout *::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      #f0c878,
      var(--preview-gold)
    );
  background-clip: padding-box;
}

.preview-reference-layout *::-webkit-scrollbar-corner {
  background: #0b0e0c;
}

.preview-reference-layout .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.preview-reference-header {
  min-height: 94px;
  padding: 10px 18px 9px;
  display: grid;
  grid-template-columns: minmax(330px, 1fr) auto minmax(150px, .42fr);
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--preview-border);
  background:
    linear-gradient(90deg, rgba(255,255,255,.015), transparent 38%),
    linear-gradient(180deg, #0d0f0e, #080a09);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, .52),
    inset 0 -1px 0 rgba(226, 180, 93, .14);
  position: relative;
  z-index: 1002;
}

.preview-reference-header::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--preview-gold-soft) 9%,
    var(--preview-gold-bright) 50%,
    var(--preview-gold-soft) 91%,
    transparent
  );
  opacity: .62;
}

.preview-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-brand-seal {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border: 2px solid var(--preview-gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--preview-gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .08em;
  background:
    radial-gradient(circle at 38% 32%, rgba(226, 180, 93, .24), transparent 26%),
    radial-gradient(circle, #272418 0 40%, #0a0c0a 72%);
  box-shadow:
    inset 0 0 0 4px rgba(200, 150, 62, .14),
    0 0 16px rgba(200, 150, 62, .14);
}

.preview-brand-seal span {
  width: 48px;
  height: 48px;
  border: 1px dashed rgba(226, 180, 93, .56);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.preview-brand-copy {
  min-width: 0;
}

.preview-brand-title {
  margin: 0;
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: .92;
  letter-spacing: .065em;
  text-shadow: 0 2px 14px rgba(200, 150, 62, .18);
}

.preview-brand-subtitle {
  margin: 6px 0 0;
  color: var(--preview-gold-bright);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preview-reference-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.preview-nav-item {
  min-height: 48px;
  min-width: 108px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--preview-gold-bright);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-size: .77rem;
  font-weight: 700;
  background: rgba(255,255,255,.012);
}

.preview-nav-item.is-active {
  border-color: var(--preview-gold);
  color: #17130d;
  background:
    linear-gradient(180deg, #e3bb73, #bb8431);
  box-shadow:
    0 2px 9px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.preview-nav-item.is-disabled {
  opacity: .62;
  cursor: default;
}

.preview-reference-clock {
  justify-self: end;
  min-width: 132px;
  padding: 8px 14px;
  border: 1px solid rgba(200, 150, 62, .25);
  border-radius: 6px;
  text-align: center;
  background: rgba(0,0,0,.24);
}

.preview-reference-clock strong,
.preview-reference-clock span {
  display: block;
}

.preview-reference-clock strong {
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  letter-spacing: .06em;
}

.preview-reference-clock span {
  margin-top: 1px;
  color: var(--preview-muted);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.preview-public-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--preview-gold-soft);
  font-size: .58rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.preview-public-link:hover {
  color: var(--preview-gold-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.preview-reference-layout .preview-warning {
  min-height: 28px;
  padding: 6px 16px;
  border: 0;
  border-bottom: 1px solid rgba(200, 150, 62, .32);
  color: #d7bd86;
  background: #16120c;
  font-size: .66rem;
  letter-spacing: .11em;
}

.preview-reference-grid {
  height: calc(100vh - 122px);
  min-height: 620px;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: minmax(248px, 286px) minmax(0, 1fr);
  grid-template-areas: "controls map";
  gap: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(29, 61, 70, .12), transparent 40%),
    #080a09;
}

.preview-control-panel,
.preview-detail-panel,
.preview-search-nav-button {
  appearance: none;
  cursor: pointer;
}

.preview-search-nav-button.is-open,
.preview-explorer-nav-button.is-open,
.preview-about-nav-button.is-open {
  border-color: var(--preview-gold);
  color: #17130d;
  background:
    linear-gradient(180deg, #e3bb73, #bb8431);
  box-shadow:
    0 2px 9px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.preview-map-search-overlay {
  position: absolute;
  z-index: 760;
  top: 14px;
  left: 64px;
  right: 180px;
  width: min(500px, calc(100% - 244px));
  max-width: 500px;
  padding: 8px;
  border: 1px solid rgba(200, 150, 62, .58);
  border-radius: 7px;
  color: var(--preview-text);
  background: rgba(10, 14, 12, .78);
  box-shadow: 0 8px 24px rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
}

.preview-map-search-overlay[hidden] {
  display: none !important;
}

.preview-map-search-overlay-heading {
  min-height: 28px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preview-map-search-overlay-heading strong {
  color: var(--preview-gold-bright);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.preview-reference-layout .preview-map-search-overlay-close {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--preview-gold-bright);
  background: rgba(0,0,0,.20);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.preview-reference-layout .preview-map-search-overlay-close:hover {
  border-color: var(--preview-border-soft);
  background: rgba(200,150,62,.08);
}


.preview-map-info-overlay {
  position: absolute;
  z-index: 770;
  top: 14px;
  left: 64px;
  width: min(760px, calc(100% - 250px));
  max-height: calc(100% - 84px);
  overflow: auto;
  padding: 12px 14px 14px;
  border: 1px solid rgba(200, 150, 62, .62);
  border-radius: 8px;
  color: var(--preview-text);
  background:
    linear-gradient(180deg, rgba(200,150,62,.045), transparent 120px),
    rgba(9, 13, 11, .94);
  box-shadow: 0 14px 38px rgba(0,0,0,.52);
  backdrop-filter: blur(10px);
}

.preview-map-info-overlay[hidden] {
  display: none !important;
}

.preview-map-info-overlay-heading {
  min-height: 36px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.preview-map-info-overlay-heading > div {
  display: grid;
  gap: 2px;
}

.preview-map-info-kicker {
  color: #8e7c5c;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.preview-map-info-overlay-heading strong {
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.05;
}

.preview-reference-layout .preview-map-info-overlay-close {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(200,150,62,.25);
  border-radius: 50%;
  color: var(--preview-gold-bright);
  background: rgba(0,0,0,.24);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.preview-reference-layout .preview-map-info-overlay-close:hover {
  border-color: rgba(200,150,62,.62);
  background: rgba(200,150,62,.09);
}

.public-explorer-intro,
.public-about-lead {
  margin: 0 0 11px;
  max-width: 680px;
  color: #b6ad9c;
  font-size: .72rem;
  line-height: 1.42;
}

.public-explorer-mode-tabs {
  margin: 0 0 10px;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(200,150,62,.34);
  border-radius: 5px;
  background: rgba(0,0,0,.22);
}

.preview-reference-layout .public-explorer-mode-tabs button {
  min-height: 32px;
  padding: 5px 12px;
  border: 0;
  border-right: 1px solid rgba(200,150,62,.22);
  color: #9f9278;
  background: transparent;
  font-size: .64rem;
  font-weight: 700;
  cursor: pointer;
}

.preview-reference-layout .public-explorer-mode-tabs button:last-child {
  border-right: 0;
}

.preview-reference-layout .public-explorer-mode-tabs button.is-active {
  color: #15120c;
  background: linear-gradient(180deg, #e8c477, #c89334);
}

.public-overlay-loading,
.public-explorer-empty {
  margin: 12px 0;
  color: #9d927d;
  font-size: .7rem;
}

.public-explorer-content {
  display: grid;
  gap: 12px;
}

.public-explorer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.public-explorer-summary span {
  padding: 5px 8px;
  border: 1px solid rgba(200,150,62,.20);
  border-radius: 999px;
  color: #9c907a;
  background: rgba(200,150,62,.035);
  font-size: .61rem;
}

.public-explorer-summary strong {
  color: var(--preview-gold-bright);
}

.public-explorer-section {
  padding-top: 9px;
  border-top: 1px solid rgba(200,150,62,.16);
}

.public-explorer-section > h2,
.public-about-content section > h2 {
  margin: 0 0 7px;
  color: var(--preview-gold-bright);
  font-size: .69rem;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.public-explorer-country-grid,
.public-explorer-line-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.public-explorer-country-card,
.public-explorer-line-card {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(130,145,154,.18);
  border-radius: 5px;
  background: rgba(18, 23, 25, .58);
}

.public-explorer-country-card h3,
.public-explorer-line-card h3 {
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  line-height: 1.14;
  text-transform: none;
  letter-spacing: 0;
}

.public-explorer-country-card a,
.public-explorer-line-card a,
.public-explorer-operator-grid a {
  color: #dcc078;
}

.public-explorer-card-count,
.public-explorer-card-links,
.public-explorer-line-place,
.public-explorer-line-operator {
  margin: 2px 0 0;
  color: #8f8a81;
  font-size: .58rem;
  line-height: 1.3;
}

.public-explorer-card-links a,
.public-explorer-line-operator a {
  color: #aa9c7e;
}

.public-explorer-operator-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.public-explorer-operator-grid span {
  padding: 4px 7px;
  border: 1px solid rgba(130,145,154,.17);
  border-radius: 4px;
  background: rgba(18,23,25,.48);
  font-size: .59rem;
}

.public-about-overlay {
  width: min(720px, calc(100% - 250px));
}

.public-about-content {
  display: grid;
  gap: 11px;
}

.public-about-content section {
  padding-top: 9px;
  border-top: 1px solid rgba(200,150,62,.15);
}

.public-about-content section p {
  margin: 4px 0 0;
  color: #a9a397;
  font-size: .68rem;
  line-height: 1.46;
}

.public-about-statuses {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.public-about-statuses > div {
  padding: 7px 8px;
  border: 1px solid rgba(130,145,154,.17);
  border-radius: 5px;
  background: rgba(18,23,25,.48);
}

.public-about-statuses dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d8c18e;
  font-size: .64rem;
  font-weight: 700;
}

.public-about-statuses dd {
  margin: 3px 0 0 15px;
  color: #918d84;
  font-size: .59rem;
  line-height: 1.35;
}

.preview-map-mode.preview-map-mode-overlay {
  position: absolute;
  z-index: 740;
  top: 14px;
  right: 14px;
  width: 118px !important;
  max-width: calc(100% - 28px);
  height: 32px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  border-color: rgba(200, 150, 62, .52);
  background: rgba(10, 14, 12, .70);
  box-shadow: 0 5px 14px rgba(0,0,0,.28);
  backdrop-filter: blur(6px);
}

.preview-map-mode.preview-map-mode-overlay button {
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0;
  min-height: 32px !important;
  height: 32px;
  padding: 5px 6px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .56rem;
  line-height: 1;
  background: rgba(10, 14, 12, .34);
}

.preview-map-mode.preview-map-mode-overlay .is-active {
  background: rgba(200, 150, 62, .20);
}

.preview-map-stage {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 18%),
    var(--preview-panel);
  box-shadow:
    0 4px 18px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.018);
}

.preview-control-panel {
  grid-area: controls;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 12px 14px;
}

.preview-panel-heading,
.preview-detail-panel-heading {
  min-height: 48px;
  margin: 0 -12px 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--preview-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0,0,0,.18);
}

.preview-panel-heading h1,
.preview-panel-heading h2 {
  margin: 0;
  color: var(--preview-gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.preview-reference-layout .preview-reset-button {
  width: auto;
  min-height: 30px;
  padding: 4px 7px;
  border: 0;
  color: var(--preview-gold-bright);
  background: transparent;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.preview-reference-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.preview-reference-layout .field {
  display: grid;
  gap: 5px;
}

.preview-reference-layout .field label,
.preview-reference-layout .preview-transport-fieldset legend {
  color: var(--preview-gold-bright);
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.preview-reference-layout input,
.preview-reference-layout select,
.preview-reference-layout button {
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.preview-reference-layout input:not([type="hidden"]),
.preview-reference-layout select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(200, 150, 62, .30);
  border-radius: 4px;
  color: var(--preview-text);
  background: linear-gradient(180deg, #171b17, #10130f);
  outline: none;
}

.preview-reference-layout input:not([type="hidden"]):focus,
.preview-reference-layout select:focus {
  border-color: var(--preview-gold-bright);
  box-shadow: 0 0 0 2px rgba(200, 150, 62, .12);
}

.preview-reference-layout select option {
  color: #e9dfc9;
  background: #111510;
}

.preview-datetime-fieldset,
.preview-status-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.preview-datetime-fieldset > legend,
.preview-status-fieldset > legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--preview-gold-bright);
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.preview-datetime-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(106px, .9fr);
  gap: 7px;
}

.preview-date-control,
.preview-time-control {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.preview-date-control > span,
.preview-time-control > span {
  color: var(--preview-muted);
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.preview-reference-layout input[type="date"],
.preview-reference-layout input[type="time"] {
  min-width: 0;
  color-scheme: dark;
  cursor: pointer;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}

.preview-reference-layout .preview-date-control input[type="date"] {
  padding-left: 8px;
  padding-right: 5px;
}

.preview-reference-layout .preview-time-control input[type="time"] {
  min-width: 106px;
  padding-left: 8px;
  padding-right: 4px;
}

.preview-reference-layout input[type="date"]::-webkit-calendar-picker-indicator,
.preview-reference-layout input[type="time"]::-webkit-calendar-picker-indicator {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  padding: 0;
}

.preview-status-fieldset {
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--preview-border-soft);
  display: grid;
  gap: 7px;
}

.preview-status-fieldset label {
  min-width: 0;
  min-height: 20px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  color: var(--preview-text);
  font-size: .69rem;
  line-height: 1.1;
  cursor: pointer;
}

.preview-status-fieldset label > span:last-child {
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.preview-reference-layout .preview-status-fieldset input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--preview-gold-bright);
  cursor: pointer;
}

.preview-train-dependent-filters {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--preview-border-soft);
}

.preview-train-dependent-filters[hidden] {
  display: none;
}

.transport-choice-fieldset {
  min-width: 0;
  margin: 2px 0 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--preview-border-soft);
}

.transport-choice-fieldset > legend {
  margin: 0 0 8px;
  padding: 0;
  color: var(--preview-gold-bright);
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.transport-choice-row {
  width: 100%;
  min-width: 0;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 8px;
}

.preview-reference-layout .transport-choice-card {
  flex: 1 1 0 !important;
  width: calc(50% - 4px) !important;
  max-width: calc(50% - 4px) !important;
  min-width: 0 !important;
  height: 82px;
  min-height: 82px;
  margin: 0;
  padding: 8px 7px;
  border: 1px solid var(--preview-border-soft);
  border-radius: 5px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  overflow: hidden;
  color: var(--preview-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 72%),
    #10140f;
  text-align: left;
  box-sizing: border-box;
}

.preview-reference-layout .transport-choice-card.is-active {
  border-color: var(--preview-gold);
  background:
    linear-gradient(180deg, rgba(200,150,62,.16), rgba(200,150,62,.035)),
    #131610;
  box-shadow: inset 0 0 0 1px rgba(200,150,62,.10);
}

.preview-reference-layout .transport-choice-card:focus {
  outline: 2px solid var(--preview-gold-bright);
  outline-offset: 2px;
}

.preview-reference-layout .transport-choice-card:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.transport-choice-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--preview-gold-bright);
}

.transport-choice-svg {
  width: 42px;
  height: 46px;
  display: block;
  overflow: visible;
}

.transport-choice-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-choice-svg-train .transport-choice-stroke,
.transport-choice-svg-tram .transport-choice-stroke {
  stroke-width: 2.15;
}

.transport-choice-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.transport-choice-title,
.transport-choice-subtitle {
  display: block;
  min-width: 0;
  text-transform: uppercase;
}

.transport-choice-title {
  color: var(--preview-text);
  font-size: .67rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .022em;
  white-space: nowrap;
}

.transport-choice-subtitle {
  color: var(--preview-muted);
  font-size: clamp(.43rem, .62vw, .51rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .018em;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

@media (max-width: 480px) {
  .transport-choice-row {
    gap: 6px;
  }

  .preview-reference-layout .transport-choice-card {
    width: calc(50% - 3px) !important;
    max-width: calc(50% - 3px) !important;
    height: 80px;
    min-height: 80px;
    padding: 7px 5px;
    gap: 5px;
  }

  .transport-choice-icon {
    width: 34px;
    height: 39px;
    flex-basis: 34px;
  }

  .transport-choice-svg {
    width: 34px;
    height: 39px;
  }

  .transport-choice-copy {
    gap: 3px;
  }

  .transport-choice-title {
    font-size: .60rem;
  }

  .transport-choice-subtitle {
    font-size: .42rem;
    line-height: 1.13;
    letter-spacing: .008em;
  }
}

@media (max-width: 360px) {
  .transport-choice-row {
    gap: 4px;
  }

  .preview-reference-layout .transport-choice-card {
    width: calc(50% - 2px) !important;
    max-width: calc(50% - 2px) !important;
    height: 82px;
    min-height: 82px;
    padding: 6px 4px;
    gap: 4px;
  }

  .transport-choice-icon {
    width: 30px;
    height: 35px;
    flex-basis: 30px;
  }

  .transport-choice-svg {
    width: 30px;
    height: 35px;
  }

  .transport-choice-title {
    font-size: .56rem;
  }

  .transport-choice-subtitle {
    font-size: .39rem;
    line-height: 1.12;
  }
}

.preview-reference-layout .preview-primary-action {
  width: 100%;
  min-height: 40px;
  margin-top: 1px;
  border: 1px solid var(--preview-gold);
  border-radius: 4px;
  color: #16110a;
  background: linear-gradient(180deg, #dfb45f, #ad792e);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
  cursor: pointer;
}

.preview-circulation-picker {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--preview-border-soft);
}

.preview-reference-summary {
  margin: 12px 0 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.preview-reference-summary div {
  min-width: 0;
  padding: 7px 4px;
  border: 1px solid var(--preview-border-soft);
  border-radius: 4px;
  background: #111510;
}

.preview-reference-summary strong {
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.preview-reference-summary span {
  color: var(--preview-muted);
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.preview-reference-notice {
  color: var(--preview-muted);
  font-size: .72rem;
  line-height: 1.4;
}

.preview-reference-results {
  gap: 7px;
}

.preview-reference-layout .card {
  padding: 8px;
  border: 1px solid var(--preview-border-soft);
  border-radius: 5px;
  color: var(--preview-text);
  background: #111510;
  box-shadow: none;
}

.preview-reference-layout .card h2 {
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .86rem;
}

.preview-reference-layout .card p {
  font-size: .7rem;
}

.preview-reference-layout .card .meta,
.preview-reference-layout .notice {
  color: var(--preview-muted);
}

.preview-reference-layout .card a,
.preview-reference-layout .entity-link {
  color: var(--preview-gold-bright);
}

.preview-map-stage {
  grid-area: map;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: #0d1210;
}

.preview-map-search {
  min-width: 0;
  position: relative;
  display: block;
}

.preview-reference-layout .preview-map-search input {
  width: 100%;
  min-height: 38px;
  padding-right: 46px;
  border-radius: 5px;
}

.preview-reference-layout .preview-map-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.preview-reference-layout .preview-map-search button {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(200, 150, 62, .42);
  border-radius: 0 5px 5px 0;
  display: grid;
  place-items: center;
  color: var(--preview-gold-bright);
  background: #171a16;
  cursor: pointer;
}

.preview-search-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.preview-map-mode {
  flex: 0 0 auto;
  display: flex;
  border: 1px solid var(--preview-border-soft);
  border-radius: 5px;
  overflow: hidden;
}

.preview-map-mode button {
  min-height: 34px;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid var(--preview-border-soft);
  border-radius: 0;
  color: var(--preview-muted);
  background: transparent;
  font-size: .67rem;
  text-transform: uppercase;
  cursor: pointer;
}

.preview-map-mode button:last-child {
  border-right: 0;
}

.preview-map-mode button:hover {
  color: var(--preview-cream);
  background: rgba(200, 150, 62, .07);
}

.preview-map-mode .is-active {
  color: var(--preview-cream);
  background: rgba(200, 150, 62, .13);
}

.preview-map-search-results {
  position: relative;
  z-index: 1;
  max-height: 190px;
  overflow-y: auto;
  padding: 0 9px 8px;
  gap: 4px;
  background: transparent;
}

.preview-map-search-results:empty {
  display: none;
}

.preview-map-search-results .locomotive-search-result {
  margin: 5px 0;
  border-color: var(--preview-border-soft);
  color: var(--preview-text);
  background: #151914;
}

.preview-map-search-results .locomotive-search-result a {
  color: var(--preview-gold-bright);
}

.preview-map-frame {
  grid-row: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.public-map-loading {
  position: absolute;
  z-index: 735;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(8, 10, 9, .16);
  backdrop-filter: blur(1px);
}

.public-map-loading[hidden] {
  display: none !important;
}

.public-map-loading-card {
  min-width: 190px;
  padding: 10px 14px;
  border: 1px solid rgba(200, 150, 62, .58);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--preview-cream);
  background: rgba(9, 13, 11, .90);
  box-shadow: 0 8px 22px rgba(0,0,0,.38);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .035em;
}

.public-map-loading-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(226, 180, 93, .25);
  border-top-color: var(--preview-gold-bright);
  border-radius: 50%;
  animation: steam-radar-loading-spin .72s linear infinite;
}

@keyframes steam-radar-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .public-map-loading-spinner {
    animation: none;
    border-color: var(--preview-gold-bright);
  }
}

.preview-reference-layout #preview-map,
.public-reference-layout #map {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #18231f;
}

.preview-reference-layout #preview-map[hidden],
.preview-central-list[hidden] {
  display: none;
}

.preview-central-list {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  background:
    radial-gradient(circle at 50% 0, rgba(200,150,62,.045), transparent 38%),
    #0d1210;
}

.preview-central-list .card {
  margin: 0;
}

.preview-central-list-empty {
  grid-column: 1 / -1;
  margin: 28px auto;
  color: var(--preview-muted);
  text-align: center;
}

.preview-reference-layout .leaflet-tile {
  filter:
    sepia(.62)
    saturate(.64)
    hue-rotate(72deg)
    brightness(.58)
    contrast(1.12);
}

.preview-reference-layout .leaflet-control-zoom a {
  color: var(--preview-cream);
  border-color: var(--preview-border-soft);
  background: #101510;
}

.preview-reference-layout .leaflet-control-attribution {
  color: #a6987d;
  background: rgba(8, 10, 8, .72);
}

.preview-reference-layout .leaflet-control-attribution a {
  color: #d3ae67;
}

.preview-map-legend {
  position: absolute;
  z-index: 500;
  left: 12px;
  right: 12px;
  bottom: 28px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(200, 150, 62, .28);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #d7ccb7;
  background: rgba(7, 9, 8, .88);
  box-shadow: 0 2px 12px rgba(0,0,0,.38);
  pointer-events: none;
  font-size: .66rem;
}

.preview-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.preview-legend-dot.real {
  background: var(--preview-green);
}

.preview-legend-dot.estimated {
  background: var(--preview-orange);
}

.preview-legend-dot.ready {
  border: 2px solid var(--preview-blue);
}

.preview-legend-dot.unavailable {
  background: #8a877f;
}

.preview-detail-panel {
  position: absolute;
  z-index: 720;
  top: 50%;
  right: 12px;
  bottom: auto;
  transform: translateY(-50%);
  width: min(372px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  height: min(540px, calc(100% - 64px));
  max-height: calc(100% - 64px);
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  color: var(--preview-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 18%),
    rgba(13, 17, 14, .985);
  box-shadow:
    0 8px 28px rgba(0,0,0,.58),
    inset 0 0 0 1px rgba(255,255,255,.018);
}

.preview-detail-panel[hidden] {
  display: none !important;
}

.preview-detail-panel-heading {
  margin: 0;
  padding: 9px 11px;
}

.preview-detail-panel-heading > div:first-child {
  min-width: 0;
}

.preview-detail-panel-heading strong {
  display: block;
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.preview-detail-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--preview-gold);
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.preview-reference-layout .preview-detail-close {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--preview-gold-bright);
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.preview-reference-layout .preview-detail-close:hover {
  border-color: var(--preview-border-soft);
  background: rgba(200,150,62,.07);
}

.preview-reference-layout .public-detail-closebar {
  position: absolute;
  z-index: 40;
  top: 6px;
  right: 6px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.preview-reference-layout .public-detail-closebar .entity-dialog-close {
  position: static;
  pointer-events: auto;
  color: #f0d7a2;
  background: rgba(8, 11, 9, .78);
  border-color: rgba(226, 180, 93, .22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .36);
}

.preview-detail-content {
  min-height: 0;
  padding: 13px 14px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  color: var(--preview-text);
}

.preview-detail-empty {
  min-height: 100%;
  padding: 28px 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--preview-muted);
}

.preview-detail-empty-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 14px;
  border: 1px solid var(--preview-border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--preview-gold-bright);
  font-size: 1.8rem;
  background: rgba(200,150,62,.07);
}

.preview-detail-empty h2 {
  margin: 0 0 9px;
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.preview-detail-empty p {
  max-width: 290px;
  margin: 5px 0;
  font-size: .76rem;
  line-height: 1.5;
}

.preview-detail-empty-note {
  color: #817761;
}

.preview-detail-loading {
  margin: 18px 0;
  color: var(--preview-gold-bright);
}

.preview-detail-content .entity-kicker {
  color: var(--preview-gold);
}

.preview-detail-content h2 {
  margin: 3px 0 12px;
  color: var(--preview-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
  line-height: 1.08;
}

.preview-detail-content h3 {
  margin: 17px 0 8px;
  padding-top: 10px;
  border-top: 1px solid var(--preview-border-soft);
  color: var(--preview-gold-bright);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.preview-detail-content p,
.preview-detail-content li,
.preview-detail-content dt,
.preview-detail-content dd {
  font-size: .76rem;
  line-height: 1.42;
}

.preview-detail-content a {
  color: var(--preview-gold-bright);
  text-underline-offset: 2px;
}

.preview-detail-content .entity-facts {
  grid-template-columns: minmax(92px, .55fr) 1fr;
  gap: 5px 10px;
}

.preview-detail-content .entity-facts dt {
  color: var(--preview-muted);
}

.preview-detail-content .entity-photo {
  margin: 10px 0 14px;
}

.preview-detail-content .entity-photo img {
  border-color: var(--preview-border-soft);
  background: #090b09;
}

.preview-detail-content .entity-photo figcaption,
.preview-detail-content .entity-photo figcaption a {
  color: var(--preview-muted);
}

.preview-reference-layout .position-popup,
.preview-reference-layout .station-popup {
  color: #2d271e;
}


.circulation-locomotive-hero {
  margin: 0 0 12px;
}

.circulation-locomotive-identity {
  margin-top: 6px;
}

.circulation-locomotive-identity > span {
  display: block;
  color: var(--ink-soft);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.circulation-locomotive-identity > strong {
  display: block;
  margin-top: 1px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.circulation-locomotive-identity .locomotive-reference {
  margin: 2px 0 0;
}

.preview-detail-content .circulation-locomotive-hero.journey-photo-header {
  position: relative;
  margin: -13px -14px 8px;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--preview-border-soft);
  background: #090b09;
}

.preview-detail-content .journey-photo-header .locomotive-hero-photo {
  position: relative;
  margin: 0;
}

.preview-detail-content .journey-photo-header .locomotive-hero-photo img {
  width: 100%;
  height: 132px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: #090b09;
}

.preview-detail-content .journey-photo-header .locomotive-hero-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 4px 8px;
  color: #b9ad97;
  font-size: .52rem;
  line-height: 1.2;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 6, .88));
}

.preview-detail-content .journey-photo-header .locomotive-hero-photo figcaption a {
  color: #d9c79e;
}


.preview-detail-content .locomotive-reference {
  margin: -7px 0 9px;
  color: var(--preview-muted);
  font-size: .68rem;
  line-height: 1.3;
}

.preview-detail-content .entity-sources {
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--preview-border-soft);
  color: #817968;
  opacity: .88;
}

.preview-detail-content .entity-sources-title {
  margin: 0 0 3px;
  color: var(--preview-muted);
  font-size: .6rem;
  letter-spacing: .055em;
}

.preview-detail-content .entity-sources ul {
  margin: 0;
  padding-left: 15px;
}

.preview-detail-content .entity-sources li,
.preview-detail-content .entity-sources a {
  color: #8f8675;
  font-size: .61rem;
  line-height: 1.25;
}

/* Panneau trajet — frise verticale inspirée des panneaux de circulation :
   heures à gauche, axe central, gare et état à droite. */
.public-reference-layout .public-detail-panel {
  width: min(424px, calc(100% - 24px));
  height: min(610px, calc(100% - 48px));
  max-height: calc(100% - 48px);
}

.preview-detail-content .journey-detail {
  display: grid;
  gap: 7px;
}

.preview-detail-content .journey-detail-header {
  display: grid;
  gap: 2px;
}

.preview-detail-content .journey-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 28px;
}

.preview-detail-content .journey-title-copy {
  min-width: 0;
}

.preview-detail-content .journey-title-copy h2 {
  margin: 0;
  color: var(--preview-cream);
  font-size: 1.10rem;
  line-height: 1.02;
}

.preview-detail-content .journey-vehicle-ref {
  flex: 0 0 auto;
  padding: 2px 0 0 8px;
  color: #c8c3b9;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.preview-detail-content .journey-route-summary {
  color: #d3d0c8;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
}

.preview-detail-content .journey-compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  color: #817e77;
  font-size: .56rem;
  line-height: 1.18;
}

.preview-detail-content .journey-compact-meta a {
  color: #a99b7b;
}

.preview-detail-content .journey-service-summary {
  margin-top: -2px;
  color: #958a75;
  font-size: .58rem;
  line-height: 1.2;
}

.preview-detail-content .journey-timeline-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(130, 145, 154, .28);
  border-radius: 3px;
  background: #151b20;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.preview-detail-content .journey-timeline-list {
  margin: 0;
  padding: 3px 0 5px;
  list-style: none;
}

.preview-detail-content .journey-stop-gap {
  min-height: 20px;
  display: grid;
  grid-template-columns: 50px 22px minmax(0, 1fr);
  align-items: center;
  color: #666b6f;
}

.preview-detail-content .journey-stop-gap .journey-axis {
  min-height: 20px;
}

.preview-detail-content .journey-stop-gap .journey-axis::before {
  top: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      #596168 0 3px,
      transparent 3px 6px
    );
}

.preview-detail-content .journey-stop-gap.is-passed .journey-axis::after {
  top: 0;
  bottom: 0;
  background: var(--preview-gold-bright);
}

.preview-detail-content .journey-stop-gap.is-passed .journey-gap-dots {
  color: var(--preview-gold-soft);
}

.preview-detail-content .journey-stop-gap.is-upcoming .journey-gap-dots {
  color: #747b80;
}

.preview-detail-content .journey-gap-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  color: #8a8e90;
  font-size: .55rem;
  letter-spacing: 1px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.preview-detail-content .journey-gap-label {
  padding-left: 5px;
  color: #72777a;
  font-size: .7rem;
  line-height: 1;
}

.preview-detail-content .journey-stop-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 50px 22px minmax(0, 1fr);
  align-items: stretch;
  color: #c9c8c3;
}

.preview-detail-content .journey-time-column {
  padding: 8px 5px 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  color: #c3c5c6;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.preview-detail-content .journey-time-value.is-empty {
  color: #5f666b;
}

.preview-detail-content .journey-axis {
  position: relative;
  min-height: 46px;
}

.preview-detail-content .journey-axis::before,
.preview-detail-content .journey-axis::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
}

.preview-detail-content .journey-axis::before {
  top: 0;
  bottom: 0;
  background: #596168;
}

.preview-detail-content .journey-axis::after {
  top: 0;
  bottom: 100%;
  background: var(--preview-gold-bright);
}

.preview-detail-content .journey-stop-row.is-first .journey-axis::before,
.preview-detail-content .journey-stop-row.is-first .journey-axis::after {
  top: 50%;
}

.preview-detail-content .journey-stop-row.is-last .journey-axis::before {
  bottom: 50%;
}

.preview-detail-content .journey-stop-row.is-passed .journey-axis::after {
  bottom: 0;
}

.preview-detail-content .journey-stop-row.is-passed.is-last .journey-axis::after {
  bottom: 50%;
}

.preview-detail-content .journey-stop-row.is-current .journey-axis::after,
.preview-detail-content .journey-stop-row.is-next .journey-axis::after {
  bottom: 50%;
}

.preview-detail-content .journey-stop-dot {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid #7b8389;
  border-radius: 50%;
  background: #151b20;
  transform: translate(-50%, -50%);
}

.preview-detail-content .journey-stop-row.is-passed .journey-stop-dot {
  border-color: var(--preview-gold-bright);
  background: var(--preview-gold-bright);
}

.preview-detail-content .journey-stop-row.is-current .journey-stop-dot {
  width: 14px;
  height: 14px;
  border: 3px solid #fff3d3;
  background: var(--preview-gold-bright);
  box-shadow: 0 0 0 3px rgba(226,180,93,.15);
}

.preview-detail-content .journey-stop-row.is-next .journey-stop-dot {
  width: 13px;
  height: 13px;
  border: 3px solid var(--preview-gold-bright);
  background: #151b20;
}

.preview-detail-content .journey-current-marker {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 13%;
  width: 15px;
  height: 5px;
  border-radius: 2px;
  background: var(--preview-gold-bright);
  box-shadow:
    0 0 0 2px #151b20,
    0 0 7px rgba(226, 180, 93, .28);
  transform: translate(-50%, -50%);
}

.preview-detail-content .journey-stop-content {
  min-width: 0;
  padding: 7px 8px 6px 5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 7px;
  align-content: center;
}

.preview-detail-content .journey-stop-name {
  min-width: 0;
  color: #d7d7d2;
  font-size: .78rem;
  line-height: 1.14;
}

.preview-detail-content .journey-stop-name a {
  color: inherit;
  text-decoration: none;
}

.preview-detail-content .journey-stop-role {
  grid-column: 1;
  color: #777f84;
  font-size: .55rem;
  line-height: 1.15;
}

.preview-detail-content .journey-stop-state {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #777f84;
  font-size: .54rem;
  white-space: nowrap;
}

.preview-detail-content .journey-stop-row.is-passed .journey-stop-name {
  color: #858985;
}

.preview-detail-content .journey-stop-row.is-current .journey-stop-name,
.preview-detail-content .journey-stop-row.is-next .journey-stop-name {
  color: #fff2d0;
  font-size: .84rem;
  font-weight: 800;
}

.preview-detail-content .journey-stop-row.is-next {
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent 70px,
      rgba(226, 180, 93, .055) 70px,
      rgba(226, 180, 93, .018) 100%
    );
}

.preview-detail-content .journey-stop-row.is-next .journey-time-column {
  color: var(--preview-gold-bright);
}

.preview-detail-content .journey-stop-row.is-current .journey-stop-state,
.preview-detail-content .journey-stop-row.is-next .journey-stop-state {
  color: var(--preview-gold-bright);
  font-weight: 700;
}

.preview-detail-content .journey-timeline-empty {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid rgba(130, 145, 154, .18);
  color: #7f8589;
  font-size: .58rem;
  line-height: 1.3;
}

.preview-detail-content .journey-position-caution {
  margin: 4px 0 0;
  padding: 4px 0 0;
  border-top: 1px solid rgba(130, 145, 154, .12);
  color: #747873;
  font-size: .56rem;
  line-height: 1.28;
}

.preview-detail-content .journey-primary-action {
  margin: 0;
  font-size: .68rem;
  font-weight: 700;
}

.preview-detail-content .journey-primary-actions {
  margin: 4px 0 2px;
  padding-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
}

.preview-detail-content .journey-official-link {
  color: var(--preview-gold-bright);
  font-size: .68rem;
  font-weight: 700;
}

.preview-detail-content .journey-booking-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: #e8ca8a;
  font-size: .67rem;
  font-weight: 700;
  text-decoration: none;
}

.preview-detail-content .journey-booking-link:not(.is-disabled):hover,
.preview-detail-content .journey-booking-link:not(.is-disabled):focus-visible {
  color: #ffe1a0;
  outline: none;
}

.preview-detail-content .journey-booking-link.is-disabled {
  color: #aa9875;
  opacity: .9;
  cursor: not-allowed;
  user-select: none;
}

.preview-detail-content .journey-booking-link.is-disabled .journey-ticket-icon {
  border-color: #b48d4d;
  background:
    linear-gradient(180deg, rgba(226,180,93,.16), rgba(157,117,53,.08)),
    #171610;
  filter: saturate(.72);
}

.preview-detail-content .journey-ticket-icon {
  position: relative;
  width: 48px;
  height: 22px;
  flex: 0 0 48px;
  display: inline-block;
  border: 1px solid #d5a349;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(226,180,93,.22), rgba(157,117,53,.10)),
    #1a1811;
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 164, .07),
    0 1px 4px rgba(0,0,0,.28);
}

.preview-detail-content .journey-ticket-icon::before,
.preview-detail-content .journey-ticket-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #101310;
  transform: translateY(-50%);
}

.preview-detail-content .journey-ticket-icon::before {
  left: -4px;
}

.preview-detail-content .journey-ticket-icon::after {
  right: -4px;
}

.preview-detail-content .journey-ticket-mark {
  position: absolute;
  left: 7px;
  top: 50%;
  color: #e2bd70;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .48rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .075em;
  text-transform: uppercase;
  transform: translateY(-52%);
}

.preview-detail-content .journey-ticket-cut {
  position: absolute;
  top: 3px;
  bottom: 3px;
  right: 11px;
  border-left: 1px dashed rgba(226,180,93,.82);
}

.preview-detail-content .journey-booking-label {
  white-space: nowrap;
  letter-spacing: .01em;
}

.preview-detail-content .journey-secondary-zone {
  margin-top: 1px;
  padding-top: 5px;
  border-top: 1px solid rgba(200, 150, 62, .14);
  display: grid;
  gap: 3px;
}

.preview-detail-content .journey-secondary-details {
  margin: 0;
  padding: 0;
  border: 0;
  color: #77756f;
  background: transparent;
  font-size: .59rem;
}

.preview-detail-content .journey-secondary-details summary {
  width: fit-content;
  cursor: pointer;
  color: #8f8879;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .025em;
}

.preview-detail-content .journey-secondary-list {
  margin: 4px 0 0;
  padding-left: 15px;
}

.preview-detail-content .journey-secondary-list li,
.preview-detail-content .journey-secondary-list a {
  color: #817b70;
  font-size: .57rem;
  line-height: 1.2;
}

.preview-detail-content .position-detail-context {
  margin-top: 12px;
  padding-top: 7px;
  border-top: 1px solid var(--preview-border-soft);
  color: var(--preview-muted);
  font-size: .66rem;
  line-height: 1.28;
}

.preview-detail-content .position-detail-context h3 {
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  color: #b99a60;
  font-size: .64rem;
  letter-spacing: .055em;
}

.preview-detail-content .position-detail-metrics {
  display: grid;
  gap: 1px;
}

.preview-detail-content .position-detail-metrics > div {
  margin: 0;
}

.preview-detail-content .position-detail-context strong {
  color: #b4a589;
  font-weight: 600;
}

.preview-detail-content .position-popup-sources {
  margin-top: 5px !important;
  padding-top: 4px;
  border-top-color: rgba(200, 150, 62, .12);
  opacity: .82;
}

.preview-detail-content .position-popup-sources ul {
  margin: 2px 0 0;
  padding-left: 14px;
}

.preview-detail-content .position-popup-sources li,
.preview-detail-content .position-popup-sources a {
  color: #817968;
  font-size: .59rem;
  line-height: 1.2;
}

@media (max-width: 1220px) {
  .preview-reference-header {
    grid-template-columns: minmax(250px, 1fr) auto minmax(118px, 136px);
    gap: 10px;
    padding-inline: 12px;
  }

  .preview-brand-seal {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .preview-brand-seal span {
    width: 40px;
    height: 40px;
  }

  .preview-brand-title {
    font-size: clamp(1.85rem, 3.1vw, 2.45rem);
  }

  .preview-brand-subtitle {
    font-size: .6rem;
  }

  .preview-nav-item {
    min-width: 82px;
    padding-inline: 7px;
    font-size: .64rem;
  }

  .preview-reference-grid {
    grid-template-columns:
      minmax(232px, 25vw)
      minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .preview-map-info-overlay,
  .public-about-overlay {
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100% - 72px);
  }

  .public-explorer-country-grid,
  .public-explorer-line-grid,
  .public-about-statuses {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .preview-reference-header {
    grid-template-columns: minmax(240px, 1fr) auto 126px;
  }

  .preview-nav-item {
    min-width: 74px;
    min-height: 44px;
    padding: 7px 6px;
  }

  .preview-reference-grid {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(224px, 30vw) minmax(0, 1fr);
    grid-template-areas: "controls map";
    overflow: visible;
  }

  .preview-control-panel {
    max-height: min(760px, calc(100vh - 150px));
  }

  .preview-map-stage {
    min-height: min(760px, calc(100vh - 150px));
  }

  .preview-detail-panel {
    width: min(360px, calc(100% - 20px));
    max-width: calc(100% - 20px);
    right: 10px;
    height: min(520px, calc(100% - 48px));
    max-height: calc(100% - 48px);
  }

  .preview-detail-content {
    overscroll-behavior: contain;
  }
}

@media (max-width: 820px) {
  .preview-reference-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-height: 0;
  }

  .preview-brand {
    min-width: 0;
  }

  .preview-reference-clock {
    grid-column: 2;
    grid-row: 1;
    min-width: 118px;
    padding-inline: 9px;
  }

  .preview-reference-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .preview-nav-item {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 40px;
  }

  .preview-warning {
    padding-inline: 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .preview-reference-grid {
    padding: 7px;
    gap: 7px;
    grid-template-columns: minmax(210px, 35vw) minmax(0, 1fr);
  }

  .preview-map-legend {
    left: 8px;
    right: 8px;
    bottom: 26px;
    justify-content: flex-start;
    gap: 8px 12px;
    font-size: .62rem;
  }
}

@media (max-width: 820px) {
  .preview-map-search-overlay {
    top: 68px;
    left: 54px;
    right: 10px;
    width: auto;
    max-width: none;
  }

  .preview-map-mode.preview-map-mode-overlay {
    top: 10px;
    right: 10px;
    width: 116px !important;
  }
}

@media (max-width: 680px) {
  .preview-reference-layout {
    overflow-x: hidden;
  }

  .preview-reference-header {
    padding: 8px 9px 7px;
  }

  .preview-reference-header::after {
    left: 9px;
    right: 9px;
  }

  .preview-brand {
    gap: 9px;
  }

  .preview-brand-seal {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  .preview-brand-seal span {
    width: 34px;
    height: 34px;
  }

  .preview-brand-title {
    font-size: clamp(1.55rem, 8vw, 2rem);
    letter-spacing: .045em;
  }

  .preview-brand-subtitle {
    margin-top: 4px;
    font-size: .54rem;
    line-height: 1.25;
  }

  .preview-reference-clock {
    min-width: 104px;
    padding: 6px 7px;
  }

  .preview-reference-clock strong {
    font-size: 1.12rem;
  }

  .preview-reference-clock span,
  .preview-public-link {
    font-size: .51rem;
  }

  .preview-reference-grid {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "controls"
      "map";
    padding: 6px;
    gap: 7px;
  }

  .preview-control-panel {
    max-height: none;
    overflow: visible;
  }

  .preview-panel-heading {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
  }

  .preview-map-stage {
    min-height: 0;
    height: clamp(430px, 68vh, 620px);
  }

  .preview-map-frame,
  .preview-reference-layout #preview-map,
  .preview-central-list {
    min-height: 0;
  }

  .preview-detail-panel {
    top: 50%;
    right: 6px;
    bottom: auto;
    width: calc(100% - 12px);
    max-width: calc(100% - 12px);
    height: min(480px, calc(100% - 32px));
    max-height: calc(100% - 32px);
  }

  .preview-detail-content {
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .preview-central-list {
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    padding: 10px;
  }

  .preview-map-search-results {
    max-height: 180px;
  }

  .preview-reference-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .preview-reference-summary div {
    padding: 7px 3px;
  }

  .preview-reference-summary strong {
    font-size: 1rem;
  }

  .preview-reference-summary span {
    font-size: .5rem;
  }

  .preview-detail-content h2,
  .preview-detail-content h3,
  .preview-detail-content p,
  .preview-detail-content li,
  .preview-detail-content dd,
  .preview-detail-content a {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .preview-reference-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-brand {
    grid-column: 1;
    width: 100%;
  }

  .preview-reference-clock {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .preview-reference-clock strong,
  .preview-reference-clock span,
  .preview-public-link {
    margin: 0;
  }

  .preview-reference-nav {
    grid-column: 1;
    grid-row: auto;
  }

  .preview-nav-item {
    min-height: 38px;
    padding: 6px 8px;
    font-size: .6rem;
  }

  .preview-reference-grid {
    padding: 5px;
  }

  .preview-control-panel {
    padding-inline: 9px;
  }

  .preview-panel-heading {
    margin-inline: -9px;
    padding-inline: 9px;
  }

  .preview-datetime-grid {
    grid-template-columns: 1fr;
  }

  .preview-reference-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-map-stage {
    height: clamp(380px, 62vh, 520px);
  }

  .preview-map-mode {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .preview-map-mode button {
    width: 100%;
  }

  .preview-map-legend {
    max-height: 88px;
    overflow-y: auto;
    pointer-events: auto;
    padding: 6px 7px;
  }

  .preview-central-list {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .preview-detail-panel-heading {
    padding-inline: 9px;
  }

  .preview-detail-content {
    padding: 11px 10px 15px;
  }

  .preview-detail-content .entity-facts {
    grid-template-columns: minmax(82px, .48fr) minmax(0, 1fr);
    gap: 5px 8px;
  }

  .preview-detail-empty {
    padding-inline: 6px;
  }
}

@media (max-width: 360px) {
  .preview-brand-title {
    font-size: 1.38rem;
  }

  .preview-brand-subtitle {
    font-size: .49rem;
  }

  .preview-nav-item {
    font-size: .56rem;
  }

  .preview-reference-layout input:not([type="hidden"]),
  .preview-reference-layout select {
    min-height: 42px;
    font-size: .9rem;
  }

  .preview-map-stage {
    height: 420px;
  }

  .preview-map-legend {
    font-size: .56rem;
  }
}



/* ==========================================================================
   Carte publique — reprise de la maquette de référence validée
   ========================================================================== */

.public-status-strip {
  color: var(--preview-gold-bright);
}

.public-reference-layout .preview-reference-grid {
  height: calc(100vh - 122px);
}

.public-reference-layout .locomotive-map-filter {
  margin-top: 10px;
}

.public-reference-layout .public-detail-panel {
  position: absolute;
  left: auto;
  top: 50%;
  right: 12px;
  bottom: auto;
  transform: translateY(-50%);
  width: min(372px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  height: min(540px, calc(100% - 64px));
  max-height: calc(100% - 64px);
  margin: 0;
  padding: 0;
  border: 1px solid var(--preview-border);
  color: var(--preview-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 18%),
    rgba(13, 17, 14, .985);
}

.public-reference-layout .public-detail-panel::backdrop {
  display: none;
  background: transparent;
}

.public-reference-layout .public-detail-shell {
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.public-reference-layout .entity-dialog-shell {
  width: auto;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.public-reference-layout .entity-dialog-close {
  position: static;
}

.public-reference-layout .preview-detail-content {
  width: 100%;
  height: 100%;
}

.public-reference-layout .entity-dialog-content,
.public-reference-layout #entity-dialog-content {
  min-width: 0;
}

.public-reference-layout #public-central-list .card {
  cursor: default;
}

.public-reference-layout #public-central-list[hidden],
.public-reference-layout #map[hidden] {
  display: none;
}

@media (max-width: 1024px) {
  .public-reference-layout .preview-reference-grid {
    height: auto;
  }

  .public-reference-layout .public-detail-panel {
    top: 50%;
    right: 10px;
    bottom: auto;
    width: min(360px, calc(100% - 20px));
    max-width: calc(100% - 20px);
    height: min(560px, calc(100% - 36px));
    min-height: 0;
    max-height: calc(100% - 36px);
  }
}

@media (max-width: 680px) {
  .public-reference-layout .public-detail-panel {
    top: 50%;
    right: 6px;
    bottom: auto;
    width: calc(100% - 12px);
    max-width: calc(100% - 12px);
    height: min(480px, calc(100% - 32px));
    max-height: calc(100% - 32px);
  }

  .public-reference-layout .public-detail-shell {
    overflow: hidden;
  }

  .public-reference-layout .preview-detail-content {
    overflow-y: auto;
    overflow-x: hidden;
  }
}


.public-reference-layout .public-period-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-reference-layout .public-period-grid input[type="date"] {
  min-width: 0;
  width: 100%;
  font-size: .76rem;
}

/* Carte / Liste : mêmes dimensions et même structure visuelle. */
.preview-map-mode {
  width: 118px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.preview-map-mode button {
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.public-reference-layout .public-status-fieldset {
  margin-top: 0;
}

.public-reference-layout .preview-circulation-picker {
  margin-top: 12px;
}

@media (max-width: 480px) {
  .public-reference-layout .public-period-grid {
    grid-template-columns: 1fr;
  }

  .preview-map-mode {
    width: 100%;
  }

  .preview-map-mode.preview-map-mode-overlay {
    width: 112px !important;
  }

  .preview-map-search-overlay {
    top: 66px;
    left: 50px;
    right: 8px;
  }
}


/* Vue cartographique large : halo discret uniquement le long des lignes/réseaux. */
.network-zone-swatch {
  width: 24px;
  height: 0;
  display: inline-block;
  border-top: 8px solid rgba(200,150,62,.09);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(226,180,93,.16);
}

.network-zone-halo {
  pointer-events: none;
}

/* Position courante : véhicule patrimonial orienté, médiator en fallback. */
.position-marker-leaflet {
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
}

.position-marker-shell {
  position: relative;
  min-width: 160px;
  height: 30px;
  pointer-events: none;
}

.position-mediator {
  --position-bearing: 0deg;
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 28px;
  display: grid;
  place-items: center;
  transform: rotate(calc(var(--position-bearing) - 180deg));
  transform-origin: 50% 93%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.position-mediator-svg {
  width: 24px;
  height: 28px;
  display: block;
  overflow: visible;
}

.position-mediator-svg path {
  fill: currentColor;
  stroke: #f7ebc8;
  stroke-width: 1.35;
}

.position-mediator-svg circle {
  fill: #11140f;
  stroke: rgba(255,255,255,.42);
  stroke-width: .9;
}

.position-mediator.real {
  color: var(--preview-green);
}

.position-mediator.estimated {
  color: var(--preview-orange);
}

.position-mediator.mixed {
  color: var(--preview-gold-bright);
}

.position-mediator.mixed::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: -1px;
  width: 12px;
  height: 5px;
  border: 1px solid #15120d;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--preview-green) 0 50%,
      var(--preview-orange) 50% 100%
    );
}

.position-vehicle {
  --vehicle-rotation: 0deg;
  --vehicle-flip: 1;
  --vehicle-width: 36px;
  --vehicle-wheel-y: 14px;
  position: absolute;
  left: 12px;
  top: 26px;
  width: 0;
  height: 0;
  transform: rotate(var(--vehicle-rotation));
  transform-origin: 0 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.52));
  pointer-events: none;
  z-index: 2;
}

.position-vehicle img {
  position: absolute;
  left: calc(var(--vehicle-width) / -2);
  top: calc(-1 * var(--vehicle-wheel-y));
  width: var(--vehicle-width) !important;
  min-width: 0 !important;
  max-width: var(--vehicle-width) !important;
  height: auto !important;
  display: block;
  transform: scaleX(var(--vehicle-flip));
  transform-origin: 50% var(--vehicle-wheel-y);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/*
 * Les images sont les pictogrammes fournis pour Steam Radar.
 * Tous sont normalisés avec l'avant vers la droite ; 90° = est.
 * Le point Leaflet se trouve sur la ligne de contact des roues avec la voie.
 */
.position-vehicle-steam {
  --vehicle-width: 36px;
  --vehicle-wheel-y: 20px;
}

.position-vehicle-diesel {
  --vehicle-width: 36px;
  --vehicle-wheel-y: 13px;
}

.position-vehicle-autorail {
  --vehicle-width: 38px;
  --vehicle-wheel-y: 13px;
}

.position-vehicle-tram {
  --vehicle-width: 36px;
  --vehicle-wheel-y: 18px;
}

/*
 * Le contour sombre reste sombre ; la teinte historique jaune/orange sert de
 * base et est déplacée vers la couleur de statut de la carte.
 */
.position-vehicle.real img {
  filter:
    hue-rotate(68deg)
    saturate(.78)
    brightness(.86)
    drop-shadow(0 0 1px var(--preview-green));
}

.position-vehicle.estimated img {
  filter:
    hue-rotate(-7deg)
    saturate(.92)
    brightness(.93)
    drop-shadow(0 0 1px var(--preview-orange));
}

.position-vehicle.mixed img {
  filter: saturate(.88) brightness(.92);
}

.position-marker-shell.state-real .position-marker-label {
  border-color: var(--preview-green);
}

.position-marker-shell.state-estimated .position-marker-label {
  border-color: var(--preview-orange);
}

.position-marker-label {
  position: absolute;
  left: 30px;
  top: 5px;
  max-width: 125px;
  padding: 2px 6px 3px;
  border: 1px solid rgba(200,150,62,.45);
  border-radius: 4px;
  color: #f3dfb0;
  background: rgba(10,13,10,.88);
  box-shadow: 0 1px 3px rgba(0,0,0,.32);
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.08;
  white-space: normal;
  text-shadow: 0 1px 1px #000;
}
.position-marker-shell.has-vehicle .position-marker-label {
  left: 40px;
}

.position-marker-label-tram {
  max-width: 118px;
  padding-inline: 5px;
  white-space: nowrap;
}
/* Suggestions contextuelles du champ de recherche. */
.search-suggestion-group {
  margin: 6px 0;
  padding: 4px 0 7px;
  border-bottom: 1px solid var(--preview-border-soft);
}

.search-suggestion-group:last-child {
  border-bottom: 0;
}

.search-suggestion-group > strong {
  display: block;
  padding: 3px 8px;
  color: var(--preview-gold-bright);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .065em;
}

.search-suggestion-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 5px 8px;
}

.search-suggestion-result > div {
  grid-column: 2;
}

.search-suggestion-kind {
  color: var(--preview-muted);
  font-size: .55rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Carte / Liste restent côte à côte sur les écrans larges. */
.public-reference-layout .preview-map-mode,
.preview-reference-layout .preview-map-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}



/* Sélecteur Carte/Liste flottant : compact et toujours horizontal. */
.preview-reference-layout .preview-map-mode.preview-map-mode-overlay,
.public-reference-layout .preview-map-mode.preview-map-mode-overlay {
  width: 118px !important;
  height: 32px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.preview-reference-layout .preview-map-mode.preview-map-mode-overlay button,
.public-reference-layout .preview-map-mode.preview-map-mode-overlay button {
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 5px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  line-height: 1;
}


/* Parcours avec circulations : contraste volontairement supérieur aux voies documentées. */
.planned-route.route-upcoming.planned-route-halo {
  stroke: #816a52 !important;
}

.planned-route.route-upcoming.planned-route-rail {
  stroke: #6a5542 !important;
}

.planned-route.route-upcoming.planned-route-core {
  stroke: #c8b596 !important;
}

.planned-route.route-active.planned-route-halo {
  stroke: #6f4d30 !important;
}

.planned-route.route-active.planned-route-rail {
  stroke: #533821 !important;
}

.planned-route.route-active.planned-route-core {
  stroke: #e4cda8 !important;
}

.route-swatch-upcoming::before {
  border-top-color: #6a5542;
  box-shadow: 0 0 0 2px rgba(129, 106, 82, .22);
}

.route-swatch-upcoming::after {
  border-top-color: #c8b596;
}

.route-swatch-active::before {
  border-top-color: #533821;
  box-shadow: 0 0 0 2px rgba(111, 77, 48, .38);
}

.route-swatch-active::after {
  border-top-color: #e4cda8;
}


/* Gares et arrêts : visibles à toutes les échelles, terminus renforcés. */
.station-marker {
  pointer-events: auto;
}

.station-marker-stop {
  stroke: #5a4a39;
  fill: #f7edcf;
}

.station-marker-terminus {
  stroke: #2f2418;
  fill: #e0a33a;
}

/*
 * Les noms de stations sont volontairement plus discrets que les libellés
 * des véhicules. Ils se lisent comme des annotations cartographiques.
 */
.station-map-label,
.selected-stop-label {
  border: 0 !important;
  border-radius: 3px !important;
  color: #3f3528 !important;
  background: rgba(255, 248, 229, .76) !important;
  box-shadow: none !important;
  font-size: .52rem !important;
  font-weight: 650 !important;
  line-height: 1.05 !important;
  padding: 2px 4px !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .85),
    1px 0 0 rgba(255, 255, 255, .7),
    -1px 0 0 rgba(255, 255, 255, .7);
}

.station-map-label::before,
.selected-stop-label::before {
  border-top-color: rgba(255, 248, 229, .76) !important;
}

.station-map-label-stop,
.selected-stop-label-intermediate {
  color: #51483b !important;
  background: rgba(255, 250, 238, .68) !important;
}

.station-map-label-terminus,
.selected-stop-label-terminus {
  border: 1px solid rgba(178, 126, 37, .55) !important;
  color: #4b3212 !important;
  background: rgba(250, 229, 181, .88) !important;
  font-weight: 750 !important;
}

.station-map-label-terminus::before,
.selected-stop-label-terminus::before {
  border-top-color: rgba(250, 229, 181, .88) !important;
}

/* Densité progressive : aucune étiquette permanente en vue large.
 * À partir du zoom utile, seuls les terminus restent nommés en permanence.
 * Les stations intermédiaires restent accessibles au survol / clic.
 */
.station-labels-wide .selected-stop-label-terminus {
  display: none !important;
}

.selected-stop-label-intermediate {
  opacity: .92 !important;
}

/* Les groupes de véhicules conservent le langage visuel sombre des véhicules. */
.vehicle-aggregate-tooltip {
  border: 1px solid rgba(200, 150, 62, .58) !important;
  border-radius: 4px !important;
  color: #f3dfb0 !important;
  background: rgba(10, 13, 10, .92) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .42) !important;
  font-size: .58rem !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  padding: 3px 5px !important;
}

.vehicle-aggregate-tooltip::before {
  border-top-color: rgba(10, 13, 10, .92) !important;
}

.selected-route-halo {
  stroke: #2e2117 !important;
}

.selected-route-rail {
  stroke: #9b7a55 !important;
}

.selected-route-core {
  stroke: #fff0d2 !important;
}

.selected-stop {
  pointer-events: auto;
}

.selected-stop-terminus {
  stroke: #2b1c0b;
  fill: #f2ad31;
}

.selected-stop-intermediate {
  stroke: #2b1c0b;
  fill: #fff0c5;
}


.selected-stop {
  cursor: pointer;
}

.selected-stop:hover {
  stroke-width: 3px;
}


/* Panneau gare : départs, arrivées et progression des arrêts. */
.station-popup.station-popup-board {
  width: min(390px, 72vw);
  min-width: 330px;
  max-width: 390px;
  max-height: min(430px, 58vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}

.station-popup-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 5px;
}

.station-popup-heading .station-popup-title {
  flex: 1 1 240px;
  margin: 0;
  font-size: 1.02rem;
}

.station-terminus-badge,
.station-stop-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .075em;
}

.station-terminus-badge {
  border: 1px solid #8a5a13;
  color: #3a260b;
  background: #e4ad43;
}

.station-stop-badge {
  border: 1px solid rgba(90, 74, 57, .42);
  color: var(--ink-soft);
  background: rgba(255, 250, 240, .72);
}

.station-request-stop-note {
  margin: 2px 0 7px;
  padding: 4px 7px;
  border-left: 3px solid #d59a31;
  border-radius: 3px;
  color: var(--ink-soft);
  background: rgba(229, 169, 63, .10);
  font-size: .7rem;
  line-height: 1.3;
}

.station-request-stop-note strong {
  color: var(--ink);
}

.station-popup-context {
  display: grid;
  gap: 3px;
  margin: 7px 0 9px;
  font-size: .76rem;
  line-height: 1.3;
}

.station-board {
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid #27313a;
  border-radius: 6px;
  background: #0d141a;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .26);
}

.station-board-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  border-bottom: 1px solid #33414c;
  background: #17222b;
}

.station-board-tab {
  grid-column: auto !important;
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  color: #b8c2c9;
  background: transparent;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.station-board-tab + .station-board-tab {
  border-left: 1px solid #33414c;
}

.station-board-tab.is-active {
  color: #ffe19a;
  background: #24313a;
  box-shadow: inset 0 -2px 0 #e5a93f;
}

.station-board-panel {
  max-height: none;
  overflow: visible;
}

.station-board-panel[hidden] {
  display: none;
}

.station-board-row {
  display: grid;
  grid-template-columns: 88px minmax(100px, 1.2fr) minmax(100px, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(93, 111, 124, .24);
  color: #edf2f5;
}

.station-board-row:last-child {
  border-bottom: 0;
}

.station-board-time {
  grid-row: 1 / span 2;
  align-self: start;
  color: #ffd56f;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .025em;
}

.station-board-time.is-window {
  font-size: .78rem;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.station-board-service {
  min-width: 0;
}

.station-board-service strong,
.station-board-service a {
  color: #f7f8f9 !important;
  font-size: .72rem;
  line-height: 1.15;
  text-decoration-color: rgba(247, 248, 249, .35);
}

.station-board-motorization {
  display: block;
  margin-top: 2px;
  color: #aebbc3;
  font-size: .61rem;
}

.station-board-direction {
  color: #f0d29a;
  font-size: .69rem;
  font-weight: 700;
  text-align: right;
}

.station-board-meta {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.station-board-date {
  margin-right: 2px;
  color: #aab6bd;
  font-size: .59rem;
  font-weight: 700;
}

.station-board-chip {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 1px 5px;
  border: 1px solid #4e5b64;
  border-radius: 999px;
  color: #cdd5da;
  background: #182128;
  font-size: .54rem;
  line-height: 1.15;
  white-space: nowrap;
}

.station-board-chip.is-real {
  border-color: rgba(105, 165, 64, .7);
  color: #bce098;
}

.station-board-chip.is-estimated {
  border-color: rgba(214, 154, 47, .76);
  color: #f2c96e;
}

.station-board-chip.is-planned {
  border-color: rgba(111, 143, 168, .7);
  color: #b8d2e5;
}

.station-board-chip.is-circulation-planned {
  border-color: rgba(112, 183, 245, .98);
  color: #f6fbff;
  background: rgba(24, 78, 126, .98);
  box-shadow:
    0 0 0 1px rgba(112, 183, 245, .22),
    0 0 8px rgba(65, 149, 226, .20);
  font-weight: 800;
}

.station-board-chip.is-service-ended {
  border-color: rgba(220, 74, 74, .96);
  color: #fff4f4;
  background: rgba(132, 24, 24, .98);
  box-shadow: 0 0 0 1px rgba(255, 112, 112, .18);
  font-weight: 800;
}

.station-board-chip.is-service-running {
  border-color: rgba(105, 165, 64, .82);
  color: #d7f0bf;
  background: rgba(28, 64, 24, .92);
  font-weight: 700;
}

.station-board-chip.is-service-upcoming {
  border-color: rgba(214, 154, 47, .82);
  color: #ffe0a3;
  background: rgba(92, 63, 18, .92);
  font-weight: 700;
}

.station-board-chip.is-passage {
  border-style: dashed;
}

.station-board-chip.is-terminus {
  border-color: rgba(226, 180, 93, .72);
  color: #f0cf89;
}

.station-board-empty {
  margin: 0;
  padding: 14px 12px;
  color: #aebbc3;
  font-size: .68rem;
  font-style: italic;
}

.station-progress {
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(141, 118, 85, .34);
  border-radius: 6px;
  background: rgba(255, 250, 240, .52);
}

.station-progress-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 7px;
  font-size: .72rem;
}

.station-progress-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.station-progress-stop {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 5px 7px;
  align-items: center;
  min-height: 28px;
  margin: 0 !important;
  padding: 4px 5px 4px 0;
  line-height: 1.15 !important;
}

.station-progress-stop::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -8px;
  bottom: 14px;
  width: 2px;
  background: #c8b596;
}

.station-progress-stop:first-child::before {
  top: 14px;
}

.station-progress-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid #6f5b47;
  border-radius: 50%;
  background: #fff8e5;
}

.station-progress-name {
  font-size: .68rem;
  font-weight: 700;
}

.station-progress-state {
  color: var(--ink-soft);
  font-size: .57rem;
  text-align: right;
}

.station-progress-stop.is-passed {
  opacity: .58;
}

.station-progress-stop.is-passed .station-progress-dot {
  border-color: #70786f;
  background: #9aa195;
}

.station-progress-stop.is-current .station-progress-dot,
.station-progress-stop.is-next .station-progress-dot {
  border-color: #8a5a13;
  background: #e3a83d;
  box-shadow: 0 0 0 3px rgba(227, 168, 61, .18);
}

.station-progress-stop.is-selected {
  margin-inline: -4px !important;
  padding-inline: 4px 5px;
  border-radius: 4px;
  background: rgba(226, 180, 93, .16);
}

.station-progress-stop.is-selected .station-progress-name {
  color: #5a3510;
}

.station-progress-empty {
  color: var(--ink-soft);
  font-size: .66rem;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .station-popup.station-popup-board {
    width: min(320px, 74vw);
    min-width: 280px;
    max-width: 320px;
    max-height: min(400px, 56vh);
  }

  .station-board-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .station-board-time {
    grid-row: 1 / span 3;
  }

  .station-board-direction {
    grid-column: 2;
    text-align: left;
  }

  .station-board-meta {
    grid-column: 2;
  }

  .station-progress-stop {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .station-progress-state {
    grid-column: 2;
    text-align: left;
  }
}


.station-popup-board .station-photo img {
  max-height: 128px;
}

.station-popup.station-popup-board::-webkit-scrollbar {
  width: 8px;
}

.station-popup.station-popup-board::-webkit-scrollbar-track {
  background: rgba(141, 118, 85, .10);
}

.station-popup.station-popup-board::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(141, 118, 85, .58);
  background-clip: padding-box;
}


/* Agrégation de véhicules proches, y compris sur plusieurs lignes, en vue large. */
.position-marker-shell.is-zone-aggregate {
  min-width: 52px;
  width: 52px;
  height: 42px;
}

.position-marker-shell.is-zone-aggregate .position-vehicle {
  left: 24px;
  top: 30px;
}

.position-marker-shell.is-zone-aggregate .position-mediator {
  left: 12px;
  top: 4px;
}

.position-zone-count-badge {
  position: absolute;
  z-index: 4;
  left: 30px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #17130d;
  border-radius: 999px;
  color: #17130d;
  background: #efb64c;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .52);
  font-size: .67rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.position-marker-shell.state-mixed .position-zone-count-badge {
  color: #17130d;
  background:
    linear-gradient(
      90deg,
      var(--preview-green) 0 50%,
      var(--preview-orange) 50% 100%
    );
}

.position-marker-leaflet-zone-aggregate {
  overflow: visible !important;
}


/* ==========================================================================
   Responsive public + SEO discovery — mobile-first hardening
   ========================================================================== */

.public-seo-discovery {
  border-top: 1px solid var(--preview-border, rgba(200, 150, 62, .52));
  color: var(--preview-text, #e9dfc9);
  background:
    radial-gradient(circle at 50% 0, rgba(200, 150, 62, .08), transparent 30rem),
    #090b0a;
}

.public-seo-discovery-inner {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(30px, 5vw, 52px) 0;
}

.public-seo-kicker {
  margin: 0 0 7px;
  color: var(--preview-gold, #c8963e);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.public-seo-discovery h2 {
  max-width: 780px;
  margin: 0;
  color: var(--preview-gold-bright, #e2b45d);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.4vw, 2.3rem);
  line-height: 1.12;
}

.public-seo-discovery p:not(.public-seo-kicker) {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--preview-muted, #a89b82);
  line-height: 1.55;
}

.public-seo-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-seo-links a {
  min-height: 44px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(200, 150, 62, .42);
  border-radius: 999px;
  color: var(--preview-gold-bright, #e2b45d);
  background: rgba(200, 150, 62, .06);
  text-decoration: none;
}

.public-seo-links a:hover,
.public-seo-links a:focus-visible {
  border-color: var(--preview-gold-bright, #e2b45d);
  background: rgba(200, 150, 62, .13);
  outline: none;
}

@media (max-width: 680px) {
  .public-reference-layout .preview-reference-grid {
    grid-template-areas:
      "map"
      "controls";
  }

  .public-reference-layout .preview-map-stage {
    height: min(72svh, 620px);
    min-height: 440px;
  }

  .public-reference-layout .preview-control-panel {
    max-height: none;
    overflow: visible;
  }

  .public-reference-layout input:not([type="hidden"]),
  .public-reference-layout select {
    min-height: 44px;
    font-size: 16px;
  }

  .public-reference-layout .public-detail-panel {
    top: auto;
    right: 6px;
    bottom: 6px;
    transform: none;
    width: calc(100% - 12px);
    max-width: calc(100% - 12px);
    height: min(72svh, 560px);
    max-height: calc(100% - 12px);
    border-radius: 12px 12px 7px 7px;
  }

  .public-reference-layout .preview-map-info-overlay,
  .public-reference-layout .public-about-overlay {
    top: 56px;
    left: 6px;
    right: 6px;
    width: auto;
    max-height: calc(100% - 64px);
  }

  .public-reference-layout .preview-map-search-overlay {
    top: 56px;
    left: 6px;
    right: 6px;
    width: auto;
    max-width: none;
  }

  .public-reference-layout .preview-map-legend {
    max-height: 88px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .public-seo-discovery-inner {
    width: min(100% - 22px, 1120px);
  }

  .public-seo-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-seo-links a {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .public-reference-layout .preview-reference-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-reference-layout .preview-reference-clock {
    display: none;
  }

  .public-reference-layout .preview-reference-nav {
    grid-column: 1;
    grid-row: 2;
  }

  .public-reference-layout .preview-map-stage {
    height: min(74svh, 560px);
    min-height: 420px;
  }

  .public-reference-layout .preview-reference-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (pointer: coarse) {
  .public-reference-layout button,
  .public-reference-layout .preview-nav-item,
  .public-reference-layout .entity-link,
  .public-reference-layout .booking-ticket-link {
    min-height: 44px;
  }

  .public-reference-layout .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    line-height: 44px;
  }
}

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


.public-mobile-filter-nav {
  display: none;
}

@media (max-width: 680px) {
  .public-reference-layout .public-mobile-filter-nav {
    display: inline-flex;
  }

  #public-filters {
    scroll-margin-top: 8px;
  }
}

.public-privacy-footer {
  border-top: 1px solid rgba(214, 181, 109, 0.22);
  background: rgba(8, 10, 9, 0.97);
  color: #d9d5c9;
}

.public-privacy-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.public-privacy-footer-inner p {
  margin: 0;
}

.public-privacy-footer-inner a {
  color: #e6c77e;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .public-privacy-footer-inner {
    width: min(100% - 24px, 1180px);
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .public-privacy-footer-inner a {
    white-space: normal;
  }
}

