/* Lokal gehostet statt per Google-Fonts-CDN nachgeladen (kein Live-Request an
   Google, keine IP-Uebertragung an Dritte - siehe Datenschutzpruefung
   2026-07-12). Eine Variable-Font-Datei deckt 600-800 ab, siehe die
   identischen "latin"-Subset-URLs in der Original-Google-Fonts-CSS. */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-latin-variable.woff2") format("woff2");
}

:root {
  --panel-soft: #fff5cf;
  --accent-soft: #f2f7c5;
  --brand-green: #8fbd22;
  --brand-green-dark: #4f6f08;
  --comic-red: #c9332c;
  --comic-blue: #2d70b8;
  --comic-yellow: #ffd25a;
  --ink: #20221f;
  --paper: #fff1bd;
  --line: #20221f;
  --muted: #5e6257;
  --warning: #8f5f00;
  --warning-soft: #ffe49a;
  --severe-delayed: #c9332c;
  --danger-soft: #ffd3c9;
  --unknown: #4e5a61;
  --unknown-soft: #e7ebdc;
  --shadow-soft: 10px 10px 0 rgba(32, 34, 31, 0.16);
  --shadow-panel: 7px 7px 0 rgba(32, 34, 31, 0.15);
  --font-display: "Baloo 2", var(--gsky-font-family, Inter), ui-sans-serif, system-ui, sans-serif;
  font-family: var(--gsky-font-family, Inter), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16px 16px, rgba(32, 34, 31, 0.12) 0 2px, transparent 2px) 0 0 / 24px 24px,
    radial-gradient(circle at 4px 4px, rgba(201, 51, 44, 0.12) 0 1px, transparent 2px) 0 0 / 13px 13px,
    linear-gradient(180deg, #ffe7a0 0, #fff1bd 420px, #fff9df 100%);
  color: var(--ink);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  position: relative;
  z-index: 1;
}

.home-page .app-shell {
  padding-top: 0;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 max(18px, calc((100vw - 1120px) / 2));
  border-bottom: 4px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 210, 90, 0.32) 0 8px, transparent 8px 18px),
    #fff7d7;
  box-shadow: 0 7px 0 rgba(32, 34, 31, 0.14);
}

.brand-mark {
  display: grid;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-sub {
  color: var(--comic-red);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-links a,
.topbar-links button {
  color: var(--ink);
  padding: 8px 13px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 750;
  text-decoration: none;
}

.topbar-links button {
  border-top: 0;
  border-bottom: 0;
  border-right: 0;
  background: none;
  cursor: pointer;
}

.topbar-links a:hover,
.topbar-links button:hover {
  color: var(--line);
  border-color: var(--line);
  background: var(--comic-yellow);
  box-shadow: 3px 3px 0 rgba(32, 34, 31, 0.16);
}

.hero-banner {
  width: 100%;
  position: relative;
  height: 375px;
  overflow: hidden;
  border-bottom: 5px solid var(--line);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px) 0 0 / 22px 22px,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #81d5e4 0, #ffe29a 74%, #fff1bd 100%);
  box-shadow: inset 0 -18px 0 rgba(32, 34, 31, 0.08);
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.2)),
    repeating-radial-gradient(circle at 0 0, rgba(38, 48, 41, 0.13) 0 1px, transparent 1px 6px);
  mix-blend-mode: multiply;
  opacity: 0.28;
}

.hero-illustration {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-sun {
  transform-origin: 1048px 52px;
  animation: heroSunPop 4.8s ease-in-out infinite;
}

.hero-cloud {
  animation: heroCloudDrift 14s ease-in-out infinite alternate;
}

.hero-cloud-b {
  animation-duration: 18s;
  animation-delay: -4s;
}

.hero-speed-lines {
  animation: heroSpeedPulse 1.1s steps(2, end) infinite;
}

.hero-train {
  animation: heroTrainBob 1.8s ease-in-out infinite;
}

.hero-alert-board {
  animation: heroBoardBounce 2.4s ease-in-out infinite;
}

.hero-bus-small {
  animation: heroSmallBus 3.2s ease-in-out infinite;
}

.hero-bus-main {
  transform-box: fill-box;
  transform-origin: center;
  animation: heroBusDrive 6.4s cubic-bezier(0.35, 0.02, 0.24, 1) infinite;
}

.hero-route-card {
  animation: heroRouteCard 3.2s ease-in-out infinite;
  transform-origin: 106px 48px;
}

.hero-wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: heroWheelSpin 780ms linear infinite;
}

.hero-comic-burst {
  transform-box: fill-box;
  transform-origin: center;
  animation: heroBurstPulse 1.4s ease-in-out infinite;
}

.hero-commuter-hero {
  transform-box: fill-box;
  transform-origin: center bottom;
}

.hero-commuter-hero-a {
  animation: heroCapeFloatA 1.7s ease-in-out infinite;
}

.hero-commuter-hero-b {
  animation: heroCapeFloatB 1.9s ease-in-out infinite;
}

@keyframes heroSunPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes heroCloudDrift {
  from { transform: translateX(-12px); }
  to { transform: translateX(22px); }
}

@keyframes heroSpeedPulse {
  0%, 100% { opacity: 0.18; transform: translateX(0); }
  50% { opacity: 0.46; transform: translateX(-14px); }
}

@keyframes heroTrainBob {
  0%, 100% { transform: translate(332px, 112px) rotate(-0.6deg); }
  50% { transform: translate(340px, 106px) rotate(0.8deg); }
}

@keyframes heroBoardBounce {
  0%, 100% { transform: translate(735px, 120px) rotate(0deg); }
  50% { transform: translate(735px, 112px) rotate(-2deg); }
}

@keyframes heroSmallBus {
  0%, 100% { transform: translate(200px, 154px) rotate(-1deg); }
  50% { transform: translate(216px, 147px) rotate(1.6deg); }
}

@keyframes heroBusDrive {
  0% { transform: translate(1210px, 82px) rotate(-1deg); }
  12% { transform: translate(910px, 78px) rotate(1deg); }
  52% { transform: translate(835px, 74px) rotate(-0.8deg); }
  68% { transform: translate(530px, 82px) rotate(1deg); }
  100% { transform: translate(-360px, 82px) rotate(-1deg); }
}

@keyframes heroRouteCard {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes heroBurstPulse {
  0%, 100% { transform: translate(82px, 36px) scale(1) rotate(-3deg); }
  50% { transform: translate(82px, 36px) scale(1.05) rotate(2deg); }
}

@keyframes heroCapeFloatA {
  0%, 100% { transform: translate(905px, 116px) rotate(-1deg); }
  50% { transform: translate(905px, 108px) rotate(1.4deg); }
}

@keyframes heroCapeFloatB {
  0%, 100% { transform: translate(1052px, 132px) rotate(1deg); }
  50% { transform: translate(1052px, 125px) rotate(-1.2deg); }
}

@keyframes heroWheelSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .hero-banner {
    height: 250px;
  }

  .site-topbar {
    min-height: 54px;
    padding: 6px 12px;
  }

  .brand-main {
    font-size: 1.2rem;
  }

  .brand-sub {
    font-size: 0.62rem;
  }

  .topbar-links a,
  .topbar-links button {
    padding: 12px 9px;
    font-size: 0.82rem;
  }

  .hero-bus-main {
    animation-name: heroBusDriveMobile;
  }
}

@keyframes heroBusDriveMobile {
  0% { transform: translate(1220px, 112px) scale(0.72) rotate(-1deg); }
  14% { transform: translate(795px, 108px) scale(0.72) rotate(1deg); }
  58% { transform: translate(640px, 102px) scale(0.72) rotate(-0.7deg); }
  74% { transform: translate(300px, 108px) scale(0.72) rotate(1deg); }
  100% { transform: translate(-340px, 112px) scale(0.72) rotate(-1deg); }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 32px;
  padding: 34px 38px;
  border: 1px solid rgba(36, 48, 40, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(147, 189, 34, 0.09), transparent 35%),
    rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.route-scope {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed #d8d0bd;
}

.route-scope-label {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.route-scope-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--gsky-color-muted, #657169);
}

.route-scope-field select {
  border: 1px solid rgba(36, 48, 40, 0.18);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  max-width: 200px;
}

.home-page .page-header {
  margin-top: -72px;
}

.page-header::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  width: 210px;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--brand-green), var(--comic-blue));
}

.page-header::after {
  content: "S6";
  position: absolute;
  right: 26px;
  bottom: -18px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand-green-dark);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 16px 26px -20px rgba(36, 48, 40, 0.6);
  transform: rotate(2deg);
}

@media (max-width: 720px) {
  .home-page .page-header {
    margin-top: -34px;
  }

  .page-header {
    padding: 24px 18px 26px;
  }

  .page-header::before {
    left: 18px;
    width: 150px;
  }

  .page-header::after {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: -14px;
    font-size: 1rem;
  }
}

.unofficial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid #ded7c7;
  background: #fff;
  color: #636a5f;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-area {
  display: grid;
  justify-items: end;
  gap: 8px;
}

/* Login/Logout sitzen in der Service-Leiste; die WebKit-Auth-Komponente bekommt
   hier die passenden Farben fuer den hellen, leicht transparenten Kopfbereich. */
.site-topbar .auth-area {
  --gsky-color-text: var(--ink);
  --gsky-color-muted: var(--muted);
  --gsky-color-panel: #fff;
  --gsky-color-border: rgba(36, 48, 40, 0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.site-topbar .login-form input {
  min-height: 34px;
  width: 120px;
}

.site-topbar .login-form button {
  min-height: 34px;
  padding: 0 12px;
}

.site-topbar .login-error {
  color: var(--severe-delayed);
}

@media (max-width: 720px) {
  .site-topbar {
    flex-wrap: wrap;
  }

  .site-topbar .auth-area {
    margin-left: 0;
    padding: 6px 0;
    flex-wrap: wrap;
  }
}

.login-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.login-form input {
  min-height: 40px;
  border: 1px solid rgba(36, 48, 40, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  font: inherit;
  width: 140px;
}

.login-form button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: white;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.login-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -16px rgba(36, 48, 40, 0.55);
}

.login-error {
  margin: 0;
  color: var(--gsky-color-danger, #9c2222);
  font-size: 0.85rem;
  text-align: right;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-refresh-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: white;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.admin-refresh-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -16px rgba(36, 48, 40, 0.55);
}

.admin-refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.danger-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--severe-delayed);
  color: white;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.danger-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -16px rgba(36, 48, 40, 0.55);
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.stats-reset-message {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--gsky-color-muted, #657169);
}

.admin-stats-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.admin-stats-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.15);
}

.admin-message {
  margin: 0;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.85rem;
  text-align: right;
}

@media (max-width: 720px) {
  .auth-area {
    justify-items: stretch;
  }

  .login-form {
    flex-wrap: wrap;
  }

  .login-form input {
    width: 100%;
  }

  .admin-refresh-button {
    width: 100%;
  }

  .admin-stats-link {
    width: 100%;
    justify-content: center;
  }

  .admin-message {
    text-align: left;
  }
}

.kicker {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--brand-green-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--brand-green);
  text-shadow: 0 2px 0 #fff, 0 4px 0 rgba(43, 45, 44, 0.08);
}

.updated-info {
  margin: 10px 0 0;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.95rem;
}

.ui-refresh-info {
  margin: 4px 0 0;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.85rem;
  font-style: italic;
}

.status-info {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(36, 48, 40, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--gsky-color-muted, #657169);
  font-size: 0.85rem;
  line-height: 1.4;
}

.error-list {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 14px;
  color: var(--gsky-color-muted, #657169);
}

.error-list {
  display: block;
  border-color: #e7b8b2;
  background: var(--danger-soft);
  color: var(--gsky-color-danger, #9c2222);
}

.error-list p {
  margin: 0;
}

.error-list p + p {
  margin-top: 6px;
}

.connection-list {
  display: grid;
  gap: 24px;
}

.direction-group h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0;
  color: #2b2d2c;
}

.direction-group h2::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--brand-green);
}

.direction-group-list {
  display: grid;
  gap: 10px;
}

.connection {
  border: 1px solid rgba(36, 48, 40, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(147, 189, 34, 0.09) 0 6px, transparent 6px),
    #fff;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.connection:hover {
  box-shadow: 0 22px 52px -32px rgba(36, 48, 40, 0.55);
  transform: translateY(-2px);
}

.connection summary {
  display: grid;
  grid-template-columns: minmax(155px, 1fr) minmax(160px, 1.2fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  transition: background-color 150ms ease;
}

.connection summary::-webkit-details-marker {
  display: none;
}

.connection[open] summary {
  border-bottom: 1px solid #e6dfd0;
  background: var(--panel-soft);
}

/* Fahrt, die gerade unterwegs ist (Abfahrt vorbei, Ankunft noch nicht erreicht) - nur
   die Kopfzeile markieren, nicht die ganze Karte inkl. aufgeklapptem Inhalt. */
.connection--current summary {
  border-left: 8px solid var(--brand-green);
  background: var(--accent-soft);
  padding-left: 8px;
}

.connection--current[open] summary {
  background: var(--accent-soft);
}

/* Haltestellen-Zeile, die gerade in die aktuelle Zeit faellt (Zug ist dort/gerade
   losgefahren) - nur bei einer aktuell laufenden Fahrt relevant. */
.stop-row--current {
  background: var(--accent-soft);
  border-radius: 4px;
  font-weight: 600;
}

.times {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.time-main {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 750;
  color: #2b2d2c;
}

.direction {
  min-width: 0;
}

.direction strong,
.duration {
  display: block;
}

.duration {
  margin-top: 3px;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.92rem;
}

.status-badge {
  justify-self: end;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: none;
}

.status-on_time {
  background: var(--accent-soft);
  color: var(--brand-green-dark);
}

.status-delayed {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-cancelled {
  background: var(--danger-soft);
  color: var(--gsky-color-danger, #9c2222);
}

.status-unclear,
.status-unknown {
  background: var(--unknown-soft);
  color: var(--unknown);
}

.details-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.leg {
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  overflow: hidden;
}

.leg-header,
.transfer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel-soft);
  font-weight: 750;
}

.transfer {
  border: 2px dashed var(--brand-green-dark);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand-green-dark);
}

.stop-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 86px 88px 88px auto;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid #e3ddcf;
  align-items: center;
}

.stop-row span:nth-child(3),
.stop-row span:nth-child(4) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.platform-cell {
  color: var(--gsky-color-muted, #657169);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.stop-row .actual-delayed {
  color: var(--warning);
  font-weight: 750;
}

.alt-toggle {
  min-height: 30px;
  border: 1px solid rgba(36, 48, 40, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.alt-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -16px rgba(36, 48, 40, 0.55);
}

.alt-toggle[aria-expanded="true"] {
  background: var(--brand-green);
  color: #fff;
}

.alt-panel {
  padding: 10px 12px 12px;
  border-top: 1px dashed #d8d0bd;
  background: var(--panel-soft);
  font-size: 0.85rem;
  color: var(--gsky-color-muted, #657169);
}

.alt-summary {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
}

.alt-partial-note {
  margin: 0 0 8px;
  padding: 6px 9px;
  border: 1px solid #d8c58a;
  border-radius: 8px;
  background: #fff6df;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.alt-dest {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}

.alt-dest-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 160px;
  font-weight: 600;
  color: var(--ink);
}

.alt-dest-select {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(36, 48, 40, 0.18);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.alt-option {
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.alt-option + .alt-option {
  margin-top: 8px;
}

.alt-option-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 4px;
  font-weight: 700;
}

.alt-option-route {
  color: var(--ink);
}

.alt-option-arrival {
  color: var(--gsky-color-muted, #657169);
  font-weight: 600;
  white-space: nowrap;
}

.alt-leg {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.82rem;
}

/* Feiner Trennstrich zwischen den Etappen einer Alternative - bei mehreren Zeilen
   (Fussweg/Bus/Tram gemischt) verliert man sonst die Zuordnung innerhalb der Zeile. */
.alt-leg + .alt-leg {
  border-top: 1px dashed #e3ddcf;
}

.alt-leg span:first-child {
  font-weight: 700;
  color: var(--brand-green-dark);
  white-space: nowrap;
}

.alt-leg-icon {
  margin-right: 5px;
}

.alt-fallback {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 48, 40, 0.16);
  border-radius: 8px;
  background: #fff;
}

.alt-fallback-heading {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink);
}

.alt-fallback-item {
  margin: 0;
  padding: 2px 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.alt-fallback-item a {
  color: var(--brand-green-dark);
  font-weight: 700;
  text-decoration: underline;
}

.alt-fallback-note {
  color: var(--gsky-color-muted, #657169);
}

.empty {
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  color: var(--gsky-color-muted, #657169);
}

.admin-guard-message {
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  color: var(--gsky-color-muted, #657169);
}

.log-table-wrap {
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  overflow-x: auto;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.85rem;
}

.log-table-wrap--compact {
  max-height: 220px;
  overflow: auto;
}

.log-table-wrap--compact .log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.log-table th,
.log-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #e3ddcf;
  white-space: nowrap;
}

.log-table th {
  color: var(--gsky-color-muted, #657169);
  font-weight: 600;
}

.log-table td button {
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 6px;
}

.log-table td button:first-of-type {
  background: var(--brand-green);
  color: #fff;
}

.stats-panel {
  margin-top: 24px;
  display: grid;
  gap: 28px;
  min-width: 0;
}

.stats-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(36, 48, 40, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
}

.stats-block::before,
.feedback-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(38, 48, 41, 0.08) 0 1px, transparent 1px 9px);
  opacity: 0.18;
}

.stats-block h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--brand-green-dark);
}

.stats-sub {
  margin: 0;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.9rem;
}

.stats-desc {
  margin: -4px 0 4px;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.82rem;
}

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stats-kpi {
  border: 1px solid rgba(36, 48, 40, 0.1);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: none;
  padding: 12px 14px;
}

.stats-block h2 {
  font-family: var(--font-display);
}

.stats-kpi-num {
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1;
}

.stats-kpi-lbl {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--gsky-color-muted, #657169);
}

.stats-kpi.on_time .stats-kpi-num {
  color: var(--brand-green-dark);
}

.stats-kpi.delayed .stats-kpi-num {
  color: var(--warning);
}

.stats-kpi.cancelled .stats-kpi-num {
  color: var(--gsky-color-danger, #9c2222);
}

.stats-kpi.severe_delayed .stats-kpi-num {
  color: var(--severe-delayed);
}

.source-status-badge {
  display: inline-block;
  min-width: 92px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.source-status-ok {
  background: #dff2c2;
  color: #2f5c05;
}

.source-status-warning {
  background: #fff0c2;
  color: #7a4b00;
}

.source-status-error {
  background: #ffd6d0;
  color: #8d1c11;
}

.source-status-disabled,
.source-status-unknown {
  background: #ececec;
  color: #595959;
}

.source-status-note {
  margin: 8px 0 0;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.82rem;
}

.stats-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  --gsky-chart-height: 280px;
}

.api-hourly-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding-top: 18px;
  overflow-x: auto;
}

.api-hourly-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.api-hourly-fill {
  width: 100%;
  min-height: 2px;
  background: var(--brand-green);
  border-radius: 3px 3px 0 0;
}

.api-hourly-count {
  font-size: 0.68rem;
  line-height: 1;
  color: var(--gsky-color-muted, #657169);
  margin-bottom: 3px;
  min-height: 0.7rem;
}

.api-hourly-hour {
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--gsky-color-muted, #657169);
}

.feedback-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(36, 48, 40, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
}

.feedback-panel h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--brand-green-dark);
}

.feedback-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.feedback-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  border: 1px solid rgba(36, 48, 40, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

/* Honeypot: fuer Menschen unsichtbar (nicht display:none - manche Bots ueberspringen
   das gezielt), aber weiterhin im Layout/Tab-Fluss vorhanden fuer automatisiertes Ausfuellen. */
.feedback-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.feedback-captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-captcha-row label {
  font-weight: 600;
  font-size: 0.85rem;
}

.feedback-captcha-row input[type="text"] {
  width: 70px;
  border: 1px solid rgba(36, 48, 40, 0.2);
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
}

.feedback-captcha-row button {
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 6px 16px;
  cursor: pointer;
}

.feedback-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--brand-green-dark);
}

.feedback-status-error {
  color: var(--severe-delayed);
}

.feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.feedback-item {
  border: 1px solid #e3ddcf;
  border-radius: 8px;
  padding: 8px 10px;
}

.feedback-item-date {
  margin: 0 0 2px;
  font-size: 0.72rem;
  color: var(--gsky-color-muted, #657169);
}

.feedback-item-name {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.feedback-item-message {
  margin: 0;
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.platform-label {
  display: inline-block;
  margin-left: 5px;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.76em;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 22px;
  }

  .home-page .app-shell {
    padding-top: 0;
  }

  .page-header,
  .connection summary {
    align-items: stretch;
  }

  .page-header {
    flex-direction: column;
  }

  .connection summary {
    grid-template-columns: 1fr;
  }

  .status-badge {
    justify-self: start;
  }

  .stop-row {
    grid-template-columns: minmax(0, 1fr) 72px 58px 58px;
  }

  .stop-row .alt-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .stats-kpis {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
  padding: 12px 0 4px;
  text-align: center;
}

.impressum-link {
  border: none;
  background: none;
  color: var(--gsky-color-muted, #657169);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.impressum-link:hover {
  color: #2b2d2c;
}

.impressum-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.impressum-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.impressum-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 rgba(43, 45, 44, 0.16);
}

.impressum-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid #2b2d2c;
}

.impressum-panel-header h2 {
  margin: 0;
  font-family: var(--font-display);
}

.impressum-close {
  min-width: 32px;
  min-height: 32px;
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.impressum-close:hover {
  background: #f4f1e8;
}

.impressum-body {
  padding: 16px;
}

.impressum-body p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.impressum-body p:last-child {
  margin-bottom: 0;
}

.privacy-panel {
  width: min(640px, 100%);
}

.privacy-body h3 {
  margin: 18px 0 7px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.privacy-body h3:first-child {
  margin-top: 0;
}

.privacy-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(640px, calc(100vw - 36px));
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 8px 8px 0 rgba(43, 45, 44, 0.16);
  padding: 14px;
}

.privacy-notice__text {
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.privacy-notice__text strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.privacy-notice__button {
  flex: 0 0 auto;
  border: 2px solid #2b2d2c;
  border-radius: 8px;
  background: var(--brand-green);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 750;
  padding: 8px 16px;
}

.privacy-notice__button:hover {
  background: var(--brand-green-dark);
}

@media (max-width: 720px) {
  .impressum-panel {
    width: 100%;
  }

  .privacy-notice {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    flex-direction: column;
    align-items: stretch;
  }

  .privacy-notice__button {
    width: 100%;
  }
}

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

  .hero-bus-main {
    transform: translate(760px, 82px);
  }
}

/* 60s comic layer: bewusst als abschliessende Stil-Schicht, damit die ganze Seite
   wie ein Retro-Comic-Heft wirkt, ohne die bestehende Layoutstruktur umzubauen. */
.page-header,
.connection,
.stats-block,
.feedback-panel,
.status-info,
.empty,
.error-list,
.impressum-panel,
.privacy-notice {
  border: 3px solid var(--line);
  background:
    radial-gradient(circle at 8px 8px, rgba(45, 112, 184, 0.08) 0 2px, transparent 3px) 0 0 / 18px 18px,
    #fffdf1;
  box-shadow: var(--shadow-panel);
}

.page-header {
  border-width: 4px;
  background:
    radial-gradient(circle at 10px 10px, rgba(201, 51, 44, 0.13) 0 2px, transparent 3px) 0 0 / 18px 18px,
    linear-gradient(135deg, #fff8d7 0, #fff1bd 70%);
}

.page-header::before {
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--comic-red) 0 24px, var(--comic-yellow) 24px 48px, var(--comic-blue) 48px 72px);
}

.page-header::after {
  border: 4px solid var(--line);
  background: var(--comic-yellow);
  color: var(--line);
  box-shadow: 5px 5px 0 rgba(32, 34, 31, 0.18);
  transform: rotate(7deg);
}

.route-scope {
  border-top: 2px dashed rgba(32, 34, 31, 0.3);
}

.route-scope-field select,
.feedback-form input,
.feedback-form textarea,
.feedback-captcha-row input[type="text"],
.alt-dest-select,
.login-form input {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff9df;
}

.unofficial-badge,
.status-badge,
.alt-toggle,
.feedback-captcha-row button,
.login-form button,
.admin-refresh-button,
.danger-button,
.admin-stats-link {
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 3px 3px 0 rgba(32, 34, 31, 0.13);
}

.login-form button,
.admin-refresh-button,
.feedback-captcha-row button {
  background: var(--comic-yellow);
  color: var(--line);
}

.danger-button {
  background: var(--comic-red);
}

h1 {
  color: var(--comic-red);
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(32, 34, 31, 0.12);
}

.kicker,
.direction-group h2,
.stats-block h2,
.feedback-panel h2 {
  color: var(--line);
  text-transform: uppercase;
}

.direction-group h2::before {
  border: 3px solid var(--line);
  background: var(--comic-yellow);
}

.connection:hover {
  box-shadow: 10px 10px 0 rgba(32, 34, 31, 0.16);
  transform: translate(-2px, -2px) rotate(-0.25deg);
}

.connection[open] summary {
  border-bottom: 3px solid var(--line);
}

.connection--current summary {
  border-left: 10px solid var(--comic-red);
}

.time-main {
  color: var(--line);
}

.leg,
.alt-option,
.stats-kpi {
  border: 2px solid var(--line);
}

.leg-header,
.transfer {
  background: #fff1bd;
}

.transfer {
  border: 2px dashed var(--line);
}

/* Los-Santos-inspirierte Fluchtplan-Schicht: sunset, palms, asphalt, neon route UI. */
:root {
  --panel-soft: #151d24;
  --accent-soft: rgba(126, 240, 106, 0.16);
  --brand-green: #7ef06a;
  --brand-green-dark: #58c04f;
  --comic-red: #e15b3d;
  --comic-blue: #2d70b8;
  --comic-yellow: #ffd56f;
  --ink: #f8edcf;
  --paper: #101820;
  --line: #071017;
  --muted: #b9c2b0;
  --warning: #ffd56f;
  --warning-soft: rgba(255, 213, 111, 0.18);
  --severe-delayed: #ff6b4a;
  --danger-soft: rgba(255, 107, 74, 0.18);
  --unknown: #b9c2b0;
  --unknown-soft: rgba(185, 194, 176, 0.16);
  --shadow-soft: 0 26px 70px -36px rgba(0, 0, 0, 0.76);
  --shadow-panel: 0 24px 55px -34px rgba(0, 0, 0, 0.82);
}

body {
  background:
    radial-gradient(circle at 84% 3%, rgba(255, 213, 111, 0.24), transparent 24rem),
    radial-gradient(circle at 12% 0%, rgba(225, 91, 61, 0.22), transparent 28rem),
    linear-gradient(180deg, #12182a 0, #35273c 220px, #101820 650px, #0c1116 100%);
  color: var(--ink);
}

.site-topbar {
  border-bottom: 1px solid rgba(255, 213, 111, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 213, 111, 0.11), transparent 38%, rgba(126, 240, 106, 0.08)),
    rgba(10, 16, 22, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px -32px rgba(0, 0, 0, 0.9);
}

.brand-mark,
.topbar-links a,
.topbar-links button {
  color: #fff1c0;
}

.brand-main {
  color: #fff1c0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.brand-sub {
  color: var(--comic-yellow);
}

.topbar-links a,
.topbar-links button {
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.topbar-links a:hover,
.topbar-links button:hover {
  color: #071017;
  background: var(--comic-yellow);
  border-color: var(--comic-yellow);
  box-shadow: 0 12px 22px -16px rgba(255, 213, 111, 0.8);
}

.hero-banner {
  height: 410px;
  border-bottom: 1px solid rgba(255, 213, 111, 0.28);
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 213, 111, 0.28), transparent 18rem),
    linear-gradient(180deg, #20284b 0, #dd7257 42%, #ffc46b 66%, #16272b 100%);
  box-shadow: inset 0 -48px 90px rgba(0, 0, 0, 0.34);
}

.hero-banner::after {
  background:
    linear-gradient(90deg, rgba(255, 213, 111, 0.15), transparent 35%, rgba(126, 240, 106, 0.09)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 4px);
  opacity: 0.68;
  mix-blend-mode: screen;
}

.home-page .page-header {
  margin-top: -86px;
}

.page-header,
.connection,
.stats-block,
.feedback-panel,
.status-info,
.empty,
.error-list,
.impressum-panel,
.privacy-notice {
  border: 1px solid rgba(255, 213, 111, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 213, 111, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(21, 29, 36, 0.96), rgba(11, 17, 23, 0.96));
  box-shadow: var(--shadow-panel);
  color: var(--ink);
}

.page-header {
  border-color: rgba(255, 213, 111, 0.4);
}

.page-header::before {
  background: linear-gradient(90deg, var(--comic-red), var(--comic-yellow), var(--brand-green));
}

.page-header::after {
  content: "FLUCHT";
  width: 96px;
  border: 1px solid rgba(255, 213, 111, 0.55);
  border-radius: 8px;
  background: rgba(7, 16, 23, 0.88);
  color: var(--comic-yellow);
  font-size: 1rem;
  transform: rotate(3deg);
  box-shadow: 0 18px 35px -24px rgba(0, 0, 0, 0.9);
}

.kicker {
  color: var(--comic-yellow);
}

h1 {
  color: #fff1c0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.34), 0 0 34px rgba(255, 213, 111, 0.18);
}

.updated-info,
.ui-refresh-info,
.duration,
.stats-sub,
.stats-desc,
.admin-message,
.status-info,
.platform-cell,
.source-status-note {
  color: var(--muted);
}

.unofficial-badge,
.status-badge,
.alt-toggle,
.feedback-captcha-row button,
.login-form button,
.admin-refresh-button,
.danger-button,
.admin-stats-link {
  border: 1px solid rgba(255, 213, 111, 0.42);
  border-radius: 8px;
  box-shadow: none;
}

.unofficial-badge {
  background: rgba(255, 213, 111, 0.12);
  color: #fff1c0;
}

.route-scope {
  border-top: 1px solid rgba(255, 213, 111, 0.18);
}

.route-scope-label,
.route-scope-field,
.direction-group h2,
.stats-block h2,
.feedback-panel h2,
.time-main,
.direction strong {
  color: #fff1c0;
}

.route-scope-field select,
.feedback-form input,
.feedback-form textarea,
.feedback-captcha-row input[type="text"],
.alt-dest-select,
.login-form input {
  border: 1px solid rgba(255, 213, 111, 0.26);
  background: rgba(7, 16, 23, 0.72);
  color: #fff1c0;
}

.route-scope-field select option {
  background: #101820;
  color: #fff1c0;
}

.connection {
  background:
    linear-gradient(90deg, rgba(126, 240, 106, 0.13) 0 5px, transparent 5px),
    linear-gradient(180deg, rgba(21, 29, 36, 0.98), rgba(10, 15, 20, 0.98));
}

.connection:hover {
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, 0.95), 0 0 36px rgba(255, 213, 111, 0.08);
  transform: translateY(-2px);
}

.connection[open] summary {
  border-bottom: 1px solid rgba(255, 213, 111, 0.2);
  background: rgba(255, 213, 111, 0.06);
}

.connection--current summary {
  border-left: 7px solid var(--brand-green);
  background: rgba(126, 240, 106, 0.12);
}

.direction-group h2 {
  text-transform: uppercase;
}

.direction-group h2::before {
  border: 0;
  background: var(--brand-green);
  box-shadow: 0 0 18px rgba(126, 240, 106, 0.55);
}

.status-on_time {
  background: rgba(126, 240, 106, 0.18);
  color: var(--brand-green);
}

.status-delayed {
  background: rgba(255, 213, 111, 0.18);
  color: var(--comic-yellow);
}

.status-cancelled {
  background: rgba(255, 107, 74, 0.18);
  color: #ff8a70;
}

.leg,
.alt-option,
.stats-kpi,
.feedback-item {
  border: 1px solid rgba(255, 213, 111, 0.18);
  background: rgba(7, 16, 23, 0.42);
}

.leg-header,
.transfer {
  background: rgba(255, 213, 111, 0.09);
}

.transfer {
  border: 1px dashed rgba(255, 213, 111, 0.42);
}

.alt-toggle,
.login-form button,
.admin-refresh-button,
.feedback-captcha-row button {
  background: linear-gradient(135deg, var(--comic-yellow), #ff9b55);
  color: #071017;
}

.alt-toggle[aria-expanded="true"] {
  background: linear-gradient(135deg, var(--brand-green), #42b85a);
  color: #071017;
}

.danger-button {
  background: linear-gradient(135deg, #ff765d, var(--comic-red));
}

.stats-block::before,
.feedback-panel::before {
  opacity: 0.12;
  background: radial-gradient(circle, rgba(255, 213, 111, 0.18) 0 1px, transparent 1px 10px);
}

.stats-kpi {
  background: rgba(7, 16, 23, 0.48);
}

.impressum-link {
  color: var(--muted);
}

.impressum-link:hover {
  color: var(--comic-yellow);
}

/* Magnus-inspirierte Flucht/Bahn-Schicht: hell, freundlich, blau-rot, mit
   handgezeichneter Illustrationsanmutung und viel Luft. */
:root {
  --panel-soft: #f6fbfd;
  --accent-soft: #e4f3f6;
  --brand-green: #95c93d;
  --brand-green-dark: #5f8d20;
  --comic-red: #d94b3d;
  --comic-blue: #174b78;
  --comic-yellow: #eeb342;
  --ink: #183f66;
  --paper: #ffffff;
  --line: #174b78;
  --muted: #627f92;
  --warning: #b46e00;
  --warning-soft: #fff1cf;
  --severe-delayed: #d42a2f;
  --danger-soft: #ffe0df;
  --unknown: #617284;
  --unknown-soft: #edf3f8;
  --shadow-soft: 0 24px 60px -38px rgba(17, 61, 115, 0.38);
  --shadow-panel: 0 18px 44px -32px rgba(17, 61, 115, 0.26);
}

body {
  background:
    radial-gradient(circle at 7% 12%, rgba(220, 240, 246, 0.88), transparent 22rem),
    radial-gradient(circle at 96% 18%, rgba(238, 179, 66, 0.12), transparent 18rem),
    linear-gradient(180deg, #ffffff 0, #eff8fa 420px, #ffffff 100%);
  color: var(--ink);
}

.site-topbar {
  position: sticky;
  min-height: 86px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px -36px rgba(17, 61, 115, 0.42);
}

.brand-mark,
.topbar-links a,
.topbar-links button {
  color: var(--comic-blue);
}

.brand-main {
  color: var(--comic-blue);
  font-size: 1.9rem;
  text-shadow: none;
  text-transform: uppercase;
}

.brand-sub {
  color: var(--comic-red);
}

.topbar-links {
  gap: 10px;
}

.topbar-links a,
.topbar-links button {
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  padding: 10px 13px;
}

.topbar-links a:hover,
.topbar-links button:hover {
  color: var(--comic-blue);
  background: #e4f3f6;
  box-shadow: none;
}

.hero-banner {
  height: 360px;
  border-bottom: 0;
  background: #e9f6fa;
  box-shadow: inset 0 -1px 0 rgba(23, 75, 120, 0.08);
}

.hero-banner::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 70%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.42), transparent 18rem);
  opacity: 1;
  mix-blend-mode: normal;
}

.hero-rays {
  animation: heroMagnusRays 14s ease-in-out infinite;
}

.hero-wave {
  animation: heroWaveFloat 8s ease-in-out infinite;
}

.hero-wave-a {
  transform-origin: center;
}

.hero-cloud {
  animation: heroCloudDrift 18s ease-in-out infinite alternate;
}

.hero-cloud-b {
  animation-duration: 22s;
}

.hero-lifebuoy {
  animation: heroLifebuoyFloat 4.8s ease-in-out infinite;
}

.hero-soft-badge {
  animation: heroSoftBadgeFloat 5.8s ease-in-out infinite;
}

.hero-train {
  animation: heroMagnusTrain 4.8s ease-in-out infinite;
}

.hero-flucht-sign {
  animation: heroFluchtSign 8.5s ease-in-out infinite;
}

.hero-moewe {
  animation: heroMoeweGlide 10s ease-in-out infinite;
}

@keyframes heroMagnusRays {
  0%, 100% { opacity: 0.86; }
  50% { opacity: 1; }
}

@keyframes heroWaveFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes heroLifebuoyFloat {
  0%, 100% { transform: translate(492px, 0) rotate(-2deg); }
  50% { transform: translate(492px, -6px) rotate(2deg); }
}

@keyframes heroSoftBadgeFloat {
  0%, 100% { transform: translate(952px, 20px) rotate(16deg) scale(1); }
  50% { transform: translate(952px, 14px) rotate(13deg) scale(1.03); }
}

@keyframes heroMagnusTrain {
  0%, 100% { transform: translate(410px, 203px) rotate(-0.2deg); }
  50% { transform: translate(416px, 199px) rotate(0.2deg); }
}

@keyframes heroFluchtSign {
  0%, 100% { transform: translate(218px, 192px) rotate(-0.4deg); }
  50% { transform: translate(218px, 187px) rotate(0.4deg); }
}

@keyframes heroMoeweGlide {
  0%, 100% { transform: translate(802px, 136px) rotate(-10deg); }
  50% { transform: translate(818px, 128px) rotate(-7deg); }
}

.home-page .page-header {
  margin-top: -44px;
}

.page-header,
.connection,
.stats-block,
.feedback-panel,
.status-info,
.empty,
.error-list,
.impressum-panel,
.privacy-notice {
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-panel);
  color: var(--ink);
}

.page-header {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(228, 243, 246, 0.9), rgba(255, 255, 255, 0.98) 52%),
    #fff;
}

.page-header::before {
  height: 7px;
  background: linear-gradient(90deg, var(--comic-blue), #77b6c9, var(--comic-red));
}

.page-header::after {
  content: "FLUCHT";
  width: 86px;
  height: 54px;
  border: 3px solid var(--comic-red);
  border-radius: 50%;
  background: #fff;
  color: var(--comic-red);
  font-size: 1rem;
  box-shadow: none;
  transform: rotate(12deg);
}

.kicker {
  color: var(--comic-red);
}

h1 {
  color: var(--comic-blue);
  text-shadow: none;
}

.updated-info,
.ui-refresh-info,
.duration,
.stats-sub,
.stats-desc,
.admin-message,
.status-info,
.platform-cell,
.source-status-note {
  color: var(--muted);
}

.unofficial-badge {
  border: 1px solid #d8eaef;
  background: #f6fbfd;
  color: var(--muted);
  box-shadow: none;
}

.route-scope {
  border-top: 1px solid #d8eaef;
}

.route-scope-label,
.route-scope-field,
.direction-group h2,
.stats-block h2,
.feedback-panel h2,
.time-main,
.direction strong {
  color: var(--comic-blue);
}

.route-scope-field select,
.feedback-form input,
.feedback-form textarea,
.feedback-captcha-row input[type="text"],
.alt-dest-select,
.login-form input {
  border: 2px solid #d8eaef;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.route-scope-field select option {
  background: #fff;
  color: var(--ink);
}

.connection {
  background:
    linear-gradient(90deg, rgba(226, 29, 44, 0.08) 0 6px, transparent 6px),
    #fff;
}

.connection:hover {
  box-shadow: 0 24px 52px -32px rgba(17, 61, 115, 0.34);
  transform: translateY(-2px);
}

.connection[open] summary {
  border-bottom: 1px solid #d8eaef;
  background: #f6fbfd;
}

.connection--current summary {
  border-left: 8px solid var(--comic-red);
  background: #fff5f6;
}

.direction-group h2 {
  text-transform: none;
}

.direction-group h2::before {
  border: 3px solid var(--comic-blue);
  background: #fff;
  box-shadow: none;
}

.status-badge,
.alt-toggle,
.feedback-captcha-row button,
.login-form button,
.admin-refresh-button,
.danger-button,
.admin-stats-link {
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.status-on_time {
  background: #e9f7d8;
  color: var(--brand-green-dark);
}

.status-delayed {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-cancelled {
  background: var(--danger-soft);
  color: var(--severe-delayed);
}

.leg,
.alt-option,
.stats-kpi,
.feedback-item {
  border: 1px solid #d8eaef;
  background: #fff;
}

.leg-header,
.transfer {
  background: #f6fbfd;
}

.transfer {
  border: 1px dashed #9ecae2;
}

.alt-toggle,
.login-form button,
.admin-refresh-button,
.feedback-captcha-row button {
  background: var(--comic-blue);
  color: #fff;
}

.alt-toggle[aria-expanded="true"] {
  background: var(--comic-red);
  color: #fff;
}

.danger-button {
  background: var(--comic-red);
}

.stats-block::before,
.feedback-panel::before {
  opacity: 0.08;
  background: radial-gradient(circle, rgba(17, 61, 115, 0.16) 0 1px, transparent 1px 10px);
}

.stats-kpi {
  background: #f6fbfd;
}

.impressum-link {
  color: var(--muted);
}

.impressum-link:hover {
  color: var(--comic-red);
}

@media (max-width: 720px) {
  .hero-banner {
    height: 245px;
  }

  .site-topbar {
    min-height: 64px;
  }
}

/* Bitmap banner supplied as final artwork. Keep the image dominant and avoid
   decorative overlays from older SVG banner iterations. */
.hero-banner {
  height: clamp(260px, 28vw, 430px);
  background: #fff;
  overflow: hidden;
}

.hero-banner::after {
  display: none;
}

.hero-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 720px) {
  .hero-banner {
    height: 210px;
  }

  .hero-banner-image {
    object-position: 50% 50%;
  }
}
