:root {
  color-scheme: dark;
  --bg: #020817;
  --bg-deep: #01050d;
  --surface: #061022;
  --surface-2: #0a1426;
  --surface-3: #111b2d;
  --line: #26334a;
  --line-soft: #182238;
  --text: #f4f7ff;
  --muted: #8e98aa;
  --blue: #0b49ce;
  --blue-bright: #1d63ed;
  --green: #6ce08a;
  --green-bg: rgba(14, 83, 35, 0.28);
  --amber: #f2bd59;
  --amber-bg: rgba(112, 67, 10, 0.22);
  --red: #ff7777;
  --red-bg: rgba(108, 20, 29, 0.25);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(18, 74, 182, 0.22), transparent 38rem),
    linear-gradient(180deg, #061126 0%, var(--bg) 40%, var(--bg-deep) 100%);
}
body.modal-open { overflow: hidden; }
button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: #8fb4ff; }

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom));
}
.app-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 20px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--blue-bright), #1143a7);
  font-size: 28px;
  font-weight: 800;
}
.brand-copy { min-width: 0; }
.eyebrow { color: #8aa8ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(21px, 5vw, 28px); line-height: 1.05; }
h2 { margin: 0; font-size: 22px; line-height: 1.15; }
.phase-pill, .status-pill, .tag, .ready-pill, .mini-pill, .line-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.phase-pill { padding: 6px 10px; color: var(--muted); font-size: 13px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(4, 13, 31, .96), rgba(2, 9, 22, .96));
  box-shadow: 0 20px 70px rgba(0, 0, 0, .28);
}
.input-panel { padding: 18px; }
.panel-title-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.input-panel p { margin: 8px 0 14px; color: var(--muted); line-height: 1.45; }
.icon-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10192b;
  color: var(--text);
  cursor: pointer;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 132px;
  padding: 16px;
  border: 1px solid #3a465a;
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: rgba(8, 17, 34, .98);
  font-size: 18px;
  line-height: 1.45;
}
textarea:focus { border-color: #477be5; box-shadow: 0 0 0 3px rgba(42, 104, 234, .16); }
.action-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 12px; }
.button {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}
.button:disabled { opacity: .55; cursor: wait; }
.button.secondary { background: #252e3f; border: 1px solid #3b4659; }
.button.secondary.listening { background: #703424; }
.button.primary { background: linear-gradient(135deg, var(--blue), #0b45c3); }
.service-message { min-height: 44px; margin-bottom: 0 !important; font-size: 14px; }
.service-message.error { color: var(--red); }
.service-message.success { color: #8ec5ff; }

.result-section { margin-top: 20px; display: grid; gap: 12px; }
.section-kicker { color: #86a7ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.result-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 3px 0 0; }
.result-title-row h2 { font-size: 21px; }
.ready-pill { padding: 6px 12px; color: var(--green); border-color: rgba(69, 174, 96, .3); background: var(--green-bg); font-size: 13px; }
.result-card { padding: 18px; }
.compact-route-card { padding-block: 15px; }
.route { margin: 0 0 7px; font-size: clamp(20px, 5vw, 26px); font-weight: 850; }
.time-line { margin: 0; font-size: 16px; line-height: 1.4; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag { padding: 5px 9px; color: #c1ccdd; background: #0d1423; font-size: 12px; font-weight: 750; }
.tag.live { color: var(--green); background: var(--green-bg); border-color: rgba(48, 151, 74, .35); }
.tag.schedule { color: var(--amber); background: var(--amber-bg); border-color: rgba(158, 109, 34, .45); }
.data-note { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.45; font-size: 14px; }

.clarification-card { padding: 18px; border-color: #594322; }
.clarification-title { display: flex; gap: 12px; align-items: flex-start; }
.question-mark { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #9e6d22; border-radius: 50%; color: var(--amber); }
.clarification-card h3 { margin: 0; font-size: 20px; }
.clarification-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.error-card { padding: 18px; border-color: #662a34; }
.error-card h3 { margin: 0 0 8px; color: #ffd3d7; }
.error-card p { color: var(--muted); }

.journey-list { display: grid; gap: 10px; }
.journey-card.compact { padding: 0; overflow: hidden; border-radius: 18px; }
.journey-open-button {
  display: block;
  width: 100%;
  padding: 15px;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.journey-open-button:focus-visible { outline: 3px solid rgba(84, 139, 255, .65); outline-offset: -3px; }
.journey-open-button:active { background: rgba(29, 99, 237, .08); }
.journey-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.compact-head { align-items: flex-start; }
.journey-times { font-size: 23px; font-weight: 900; letter-spacing: -.02em; }
.journey-meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mini-pill { padding: 4px 8px; color: #dbe4f4; background: #111a2b; font-size: 12px; font-weight: 760; }
.mini-pill.direct { color: var(--green); border-color: rgba(48,151,74,.35); background: var(--green-bg); }
.mini-pill.transfer { color: #ffe3ad; border-color: rgba(190,132,45,.45); background: rgba(95,55,8,.28); }
.delay-pill { color: var(--amber); border-color: rgba(190,132,45,.45); background: var(--amber-bg); }
.journey-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.line-badge { padding: 5px 8px; color: #e5ebf6; background: #10192a; font-size: 12px; font-weight: 800; }
.transfer-preview {
  margin-top: 11px;
  padding: 9px 11px;
  border-left: 3px solid #d79837;
  border-radius: 6px 10px 10px 6px;
  color: #f4ddb3;
  background: rgba(83, 50, 10, .24);
  font-size: 13px;
  line-height: 1.35;
}
.transfer-preview.direct-preview { border-left-color: #43b867; color: #baf2c8; background: rgba(14, 83, 35, .22); }
.journey-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}
.journey-card-footer strong { color: #a9c7ff; }
.delay { color: var(--red); font-size: 12px; font-weight: 750; }

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 4, 12, .82);
  backdrop-filter: blur(7px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 620px);
  max-height: min(88vh, 840px);
  overflow: hidden;
  border: 1px solid #3b4d69;
  border-radius: 20px;
  background: linear-gradient(180deg, #071326, #020813 78%);
  box-shadow: 0 35px 110px rgba(0,0,0,.7);
}
.modal-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 15px 15px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 20, 40, .96);
}
.modal-heading { min-width: 0; }
.modal-heading h2 { font-size: 22px; }
.modal-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.modal-close, .modal-back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #3a4659;
  border-radius: 10px;
  color: var(--text);
  background: #202a3a;
  cursor: pointer;
}
.modal-back[hidden] { visibility: hidden; display: grid; }
.modal-body { overflow: auto; padding: 15px; overscroll-behavior: contain; }
.modal-chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.journey-detail-list { display: grid; gap: 8px; }
.ride-block {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 13, 28, .92);
}
.ride-block-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ride-block-head > div { min-width: 0; }
.ride-block-head strong { font-size: 16px; }
.ride-block-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.segment-number { color: #8fb4ff; font-weight: 850; }
.ride-route-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  gap: 8px;
  margin-top: 10px;
  color: #d2dbea;
  font-size: 13px;
}
.ride-route-row span:last-child { text-align: right; }
.route-arrow { color: #6687bf; }
.ride-track-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.detail-button {
  width: 100%;
  min-height: 40px;
  margin-top: 11px;
  border: 1px solid #355482;
  border-radius: 9px;
  color: #e7efff;
  background: #173154;
  font-weight: 780;
  cursor: pointer;
}
.transfer-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid #66450e;
  border-radius: 10px;
  color: #ffe4b3;
  background: rgba(83, 50, 10, .28);
  font-size: 13px;
}
.transfer-strip.walk { border-color: #28567a; color: #c6e9ff; background: rgba(14, 63, 91, .25); }
.transfer-strip small { flex-basis: 100%; color: var(--muted); }
.modal-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.detail-direction { margin: 0 0 15px; color: #cfd9ea; }
.stop-timeline { position: relative; display: grid; gap: 0; }
.stop-point {
  position: relative;
  display: grid;
  grid-template-columns: 72px 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 74px;
}
.timeline-dot {
  grid-column: 2;
  width: 10px;
  height: 10px;
  border: 2px solid #d6e2f4;
  border-radius: 50%;
  background: #071326;
  z-index: 2;
}
.stop-time-box { grid-column: 1; grid-row: 1; display: grid; gap: 2px; }
.stop-time-box small { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 9px; }
.stop-time-box strong { font-size: 17px; }
.stop-time-box span { color: var(--amber); font-size: 10px; }
.stop-copy { grid-column: 3; grid-row: 1; min-width: 0; }
.stop-copy strong { display: block; font-size: 16px; }
.stop-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.timeline-line {
  display: grid;
  grid-template-columns: 72px 18px 1fr;
  min-height: 52px;
  color: var(--muted);
  font-size: 11px;
}
.timeline-line::before {
  content: "";
  grid-column: 2;
  justify-self: center;
  width: 2px;
  height: 100%;
  background: #5d6d83;
}
.timeline-line span { grid-column: 3; align-self: center; }
.technical-details { margin: 16px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.technical-details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 5px 0; }
.technical-details dt { color: var(--muted); font-size: 11px; }
.technical-details dd { margin: 0; color: #cfd9ea; font-size: 11px; overflow-wrap: anywhere; }

.attribution { margin-top: 18px; padding: 17px; }
.attribution h2 { font-size: 17px; }
.attribution p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.app-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  margin-top: 22px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}
.build-copy strong { color: #aab4c4; }
.status-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.status-pill { padding: 6px 9px; }
.status-pill.good { color: var(--green); background: var(--green-bg); border-color: rgba(48,151,74,.35); }
.status-pill.bad { color: var(--red); background: var(--red-bg); border-color: rgba(197,65,78,.36); }
.status-pill.neutral { color: var(--muted); }
.report-button {
  grid-column: 1 / -1;
  min-height: 45px;
  border: 1px solid #3d485d;
  border-radius: 12px;
  background: #151d2b;
  color: #e7ecf5;
  font-weight: 750;
  cursor: pointer;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 520px) {
  .shell { padding-inline: 14px; }
  .app-header { grid-template-columns: auto 1fr; }
  .phase-pill { display: none; }
  .app-footer { grid-template-columns: 1fr; }
  .status-pills { justify-content: flex-start; }
  .journey-head { display: grid; }
  .journey-head > .tag { justify-self: start; }
  .journey-times { font-size: 22px; }
  .transfer-preview.direct-preview { border-left-color: #43b867; color: #baf2c8; background: rgba(14, 83, 35, .22); }
.journey-card-footer { align-items: flex-end; }
  .modal { padding-inline: 8px; }
  .modal-panel { max-height: 94vh; border-radius: 16px; }
  .modal-header { padding: 12px; }
  .modal-body { padding: 12px; }
  .ride-block-head { display: grid; }
  .ride-route-row { grid-template-columns: 1fr; }
  .ride-route-row span:last-child { text-align: left; }
  .route-arrow { display: none; }
  .technical-details div { grid-template-columns: 1fr; gap: 2px; }
}

/* P2-06C-FIX1: gezielte Rückkehr zur bewährten Karten- und Detailoptik aus der Referenzdatei. */
.legacy-route-status {
  border: 1px solid rgba(73, 168, 91, .58);
  border-radius: 18px;
  padding: 14px 15px;
  color: #d9ffdf;
  background: linear-gradient(180deg, rgba(12, 43, 21, .96), rgba(5, 25, 13, .96));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
.legacy-route-status .route { margin-bottom: 5px; font-size: clamp(20px, 5vw, 25px); }
.legacy-route-status .time-line { color: #e7f8ea; }
.legacy-route-status .tags { margin-top: 10px; }
.legacy-route-status .tag { border-color: rgba(160, 216, 173, .35); color: #e4fae8; background: rgba(0, 0, 0, .22); }
.legacy-route-status .data-note { border-color: rgba(160, 216, 173, .22); color: #bcd6c1; }

.journey-list { gap: 12px; }
.legacy-journey-card {
  overflow: hidden;
  border: 1px solid #655130;
  border-radius: 19px;
  background: linear-gradient(180deg, #070b12, #02060c);
  box-shadow: 0 13px 34px rgba(0, 0, 0, .30);
}
.legacy-journey-card.delayed { border-color: #80642e; }
.legacy-journey-head {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px 12px;
  border: 0;
  border-bottom: 1px solid #354050;
  color: inherit;
  text-align: left;
  background: linear-gradient(180deg, #2b3441 0%, #252d39 100%);
  cursor: pointer;
}
.legacy-journey-head:hover,
.legacy-journey-head:focus-visible {
  outline: none;
  background: linear-gradient(180deg, #333e4d 0%, #293444 100%);
  box-shadow: inset 0 0 0 2px rgba(120, 168, 255, .18);
}
.legacy-journey-head-copy { min-width: 0; }
.legacy-journey-head-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.35px;
}
.legacy-journey-head-copy span {
  display: block;
  margin-top: 6px;
  color: #aeb7c4;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.3;
}
.legacy-journey-head-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.legacy-duration-badge,
.legacy-transfer-badge,
.legacy-data-badge,
.legacy-summary-pill {
  border: 1px solid #48617e;
  border-radius: 999px;
  padding: 5px 9px;
  color: #d7eaff;
  background: #172536;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.legacy-transfer-badge,
.legacy-summary-pill.transfer {
  border-color: #8a6630;
  color: #ffe0a8;
  background: #2b2514;
}
.legacy-transfer-badge.direct,
.legacy-summary-pill.direct,
.legacy-data-badge.live,
.legacy-summary-pill.live {
  border-color: #36724e;
  color: #d8ffe0;
  background: #13271b;
}
.legacy-data-badge.schedule,
.legacy-summary-pill.schedule {
  border-color: #665432;
  color: #ffe0a8;
  background: #272114;
}
.legacy-summary-pill.warn { border-color: #85652f; color: #ffe0a8; background: #2b2515; }
.legacy-journey-body { background: #02060c; }
.legacy-journey-leg {
  display: grid;
  width: 100%;
  grid-template-columns: 78px minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #28313e;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.legacy-journey-leg:last-child { border-bottom: 0; }
.legacy-journey-leg:hover,
.legacy-journey-leg:focus-visible { outline: none; background: #0b121d; box-shadow: inset 0 0 0 2px rgba(120, 168, 255, .13); }
.legacy-leg-time { font-size: 22px; font-weight: 950; letter-spacing: -.3px; }
.legacy-leg-main { min-width: 0; text-align: center; }
.legacy-leg-main > strong { display: block; font-size: 21px; line-height: 1.05; }
.legacy-leg-main > span {
  display: block;
  margin-top: 3px;
  color: #aeb7c4;
  font-size: 13px;
  font-weight: 730;
  line-height: 1.28;
}
.legacy-leg-track { text-align: right; }
.legacy-leg-track strong { display: block; font-size: 20px; }
.legacy-leg-track span { display: block; margin-top: 3px; color: #aeb7c4; font-size: 11px; font-weight: 800; }
.legacy-leg-status {
  display: inline-flex;
  margin-top: 7px;
  border: 1px solid #4b5868;
  border-radius: 999px;
  padding: 3px 8px;
  color: #cdd7e3;
  background: #18202a;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.legacy-leg-status.ok { border-color: #2f6d4b; color: #d9ffdf; background: #122519; }
.legacy-leg-status.warn { border-color: #8a6630; color: #ffe0a8; background: #2b2514; }
.legacy-leg-status.bad { border-color: #7d3434; color: #ffcaca; background: #2b1718; }
.legacy-transfer-strip {
  padding: 10px 14px;
  border-top: 1px solid #604c24;
  border-bottom: 1px solid #604c24;
  color: #ffe0a8;
  background: #202515;
  font-size: 13px;
  line-height: 1.35;
}
.legacy-transfer-strip strong { display: block; }
.legacy-transfer-strip small { display: block; margin-top: 3px; color: #c4b788; }
.legacy-transfer-strip.walk { border-color: #315d78; color: #c6e9ff; background: #132330; }
.legacy-transfer-strip.walk small { color: #9fbccb; }

/* Gesamtverbindung und Teilfahrt: gleiche Informationshierarchie wie in der bewährten Referenz. */
.modal { padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
.modal-backdrop { background: rgba(5, 8, 12, .78); backdrop-filter: blur(8px); }
.modal-panel {
  width: min(100%, 610px);
  max-height: min(94vh, 900px);
  border: 1px solid #4c596b;
  border-radius: 26px 26px 20px 20px;
  background: #151b23;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
}
.modal-header {
  padding: 16px 16px 13px;
  border-bottom: 1px solid #465366;
  background: linear-gradient(180deg, #26303d 0%, #202833 100%);
}
.modal-heading h2 { font-size: 27px; line-height: 1.05; letter-spacing: -.5px; }
.modal-heading p { margin-top: 5px; color: #c1cad6; font-size: 14px; font-weight: 800; }
.modal-close,
.modal-back { width: 42px; height: 42px; border-color: #5c6879; border-radius: 14px; background: #303946; font-size: 24px; }
.modal-body { padding: 13px 14px 16px; background: #151b23; }
.legacy-modal-summary { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.legacy-overview-list { display: grid; gap: 9px; }
.legacy-overview-leg {
  border: 1px solid #435268;
  border-radius: 17px;
  padding: 12px;
  background: #1c2632;
}
.legacy-overview-leg-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.legacy-overview-leg-top strong { display: block; color: #f2f5f8; font-size: 18px; }
.legacy-overview-leg-top span { display: block; margin-top: 3px; color: #aeb9c8; font-size: 12px; font-weight: 800; line-height: 1.3; }
.legacy-overview-leg-times { flex: 0 0 auto; color: #f2f5f8; font-size: 16px; font-weight: 950; white-space: nowrap; }
.legacy-overview-leg-meta { margin-top: 9px; color: #c7d2df; font-size: 13px; line-height: 1.4; }
.legacy-overview-status-row { min-height: 24px; }
.legacy-overview-leg-button {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
  border: 1px solid #4a6688;
  border-radius: 13px;
  color: #e7f2ff;
  background: #20334a;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.legacy-detail-direction { margin: 0 0 13px; color: #c5cfdb; font-weight: 800; }
.trip-journey-stop-list { display: grid; gap: 0; }
.trip-journey-stop {
  display: grid;
  grid-template-columns: 92px 18px minmax(0, 1fr) 66px;
  gap: 9px;
  align-items: start;
  min-height: 82px;
  padding: 5px 0 10px;
}
.trip-journey-times { padding-top: 1px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.trip-journey-time-line { display: flex; gap: 7px; align-items: baseline; white-space: nowrap; }
.trip-journey-time-line + .trip-journey-time-line { margin-top: 7px; }
.trip-journey-time-line small { width: 24px; color: #8490a0; font-size: 9px; font-weight: 950; text-transform: uppercase; letter-spacing: .05em; }
.trip-journey-time-line strong { color: #e9eff7; font-size: 14px; }
.trip-journey-time-line.live strong { color: #9be0a6; }
.trip-journey-time-line.live.changed strong { color: #ffc76d; }
.trip-journey-rail { position: relative; width: 18px; display: flex; justify-content: center; min-height: 76px; transform: translateX(3px); }
.trip-journey-rail::before { content: ""; position: absolute; top: 0; bottom: -12px; width: 2px; background: #5e6a79; }
.trip-journey-stop.last .trip-journey-rail::before { bottom: 58px; }
.trip-journey-rail::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid #4d82b8;
  border-radius: 50%;
  background: #8ec8ff;
  z-index: 1;
}
.trip-journey-main { min-width: 0; padding-top: 1px; }
.trip-journey-name { color: #edf3fa; font-size: 15px; font-weight: 900; line-height: 1.25; }
.trip-journey-note { margin-top: 4px; color: #97a3b2; font-size: 11px; font-weight: 750; line-height: 1.3; }
.trip-journey-note.warn { color: #ffd08a; }
.trip-journey-platform { padding-top: 2px; color: #d7e0ea; font-size: 13px; font-weight: 950; text-align: right; }
.trip-journey-platform small { display: block; margin-top: 3px; color: #8d99a8; font-size: 10px; font-weight: 800; }
.modal-note { border-top: 1px solid #344052; padding-top: 10px; color: #9ba6b5; line-height: 1.4; }

@media (max-width: 620px) {
  .legacy-journey-head { display: block; }
  .legacy-journey-head-badges { justify-content: flex-start; margin-top: 10px; }
  .legacy-journey-leg { grid-template-columns: 66px minmax(0, 1fr) 64px; gap: 8px; padding: 12px 10px; }
  .legacy-leg-time { font-size: 19px; }
  .legacy-leg-main > strong { font-size: 18px; }
  .legacy-leg-main > span { font-size: 12px; }
  .legacy-leg-track strong { font-size: 17px; }
  .legacy-overview-leg-top { display: block; }
  .legacy-overview-leg-times { margin-top: 7px; }
}
@media (max-width: 430px) {
  .modal { padding: 7px; align-items: end; }
  .modal-panel { max-height: 96vh; border-radius: 23px 23px 16px 16px; }
  .modal-header { padding: 14px 13px 12px; }
  .modal-heading h2 { font-size: 24px; }
  .modal-body { padding: 11px 11px 14px; }
  .trip-journey-stop { grid-template-columns: 84px 16px minmax(0, 1fr) 56px; gap: 7px; min-height: 78px; }
  .trip-journey-time-line { gap: 6px; }
  .trip-journey-time-line small { width: 22px; font-size: 8px; }
  .trip-journey-time-line strong { font-size: 13px; }
  .trip-journey-name { font-size: 14px; }
  .trip-journey-platform { font-size: 12px; }
}
