:root {
  --navy: #071a3d;
  --navy-deep: #04112a;
  --navy-soft: #102a5f;
  --yellow: #ffd447;
  --yellow-soft: #ffe489;
  --white: #ffffff;
  --ink: #dfe8ff;
  --muted: #aebddd;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(2, 10, 30, 0.34);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --body-accent: rgba(255, 212, 71, 0.14);
  --body-start: var(--navy-deep);
  --body-mid: var(--navy);
  --body-end: #0d2452;
  --grid-line: rgba(255, 255, 255, 0.02);
  --surface-top: rgba(255, 255, 255, 0.05);
  --surface-bottom: rgba(255, 255, 255, 0.03);
  --surface-accent-a: rgba(8, 27, 63, 0.94);
  --surface-accent-b: rgba(8, 20, 48, 0.92);
  --soft-bg: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] {
  --navy: #0f2a63;
  --navy-deep: #eaf1ff;
  --navy-soft: #385caa;
  --white: #102243;
  --ink: #183058;
  --muted: #5e7096;
  --line: rgba(16, 34, 67, 0.12);
  --shadow: 0 20px 48px rgba(35, 60, 120, 0.14);
  --body-accent: rgba(255, 212, 71, 0.2);
  --body-start: #f8fbff;
  --body-mid: #edf3ff;
  --body-end: #e3ecff;
  --grid-line: rgba(16, 34, 67, 0.04);
  --surface-top: rgba(255, 255, 255, 0.9);
  --surface-bottom: rgba(242, 247, 255, 0.96);
  --surface-accent-a: rgba(245, 249, 255, 0.98);
  --surface-accent-b: rgba(233, 240, 255, 0.98);
  --soft-bg: rgba(255, 255, 255, 0.74);
  --input-bg: rgba(255, 255, 255, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, var(--body-accent), transparent 22%),
    linear-gradient(180deg, var(--body-start) 0%, var(--body-mid) 55%, var(--body-end) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Syne", sans-serif;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.96;
  color: var(--white);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
}

h3 {
  font-size: 1.2rem;
  color: var(--white);
}

h4 {
  font-size: 1rem;
  color: var(--yellow);
}

p {
  margin: 0;
  line-height: 1.6;
}

.eyebrow,
.package-tag {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--yellow);
}

.hero-text {
  color: var(--muted);
  max-width: 56ch;
}

.top-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-brand {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
}

.site-disclaimer {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  opacity: 0.82;
}

.site-version {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.7;
}

.site-easter-egg {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.72;
}

.proposal-empty-state {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--soft-bg);
  line-height: 1.6;
}

.operator-note-card {
  align-items: flex-start;
}

.page-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-stack {
  display: grid;
  gap: 10px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  flex: 0 0 auto;
}

.brand-wordmark {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-switcher {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-button,
.theme-button {
  min-width: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.page-language-switcher {
  gap: 6px;
}

.page-language-switcher .lang-button {
  min-width: 38px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.theme-button {
  min-width: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
}

.theme-button.light {
  background: #ffffff;
  border-color: rgba(16, 34, 67, 0.14);
}

.theme-button.dark {
  background: #101010;
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-button.active,
.theme-button.active {
  color: var(--yellow);
  border-color: rgba(255, 212, 71, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 212, 71, 0.14);
}

.hidden {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 16px 30px rgba(255, 212, 71, 0.24);
}

.button-secondary {
  background: var(--soft-bg);
  border: 1px solid var(--line);
  color: var(--white);
}

.home-layout {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 20px;
  align-items: start;
  min-height: 100vh;
  padding: 0 0 24px;
}

.planner-stage,
.routes-panel,
.routes-header,
.route-suggestion-card,
.proposal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--surface-top), var(--surface-bottom)),
    linear-gradient(135deg, var(--surface-accent-a), var(--surface-accent-b));
  box-shadow: var(--shadow);
}

.planner-stage,
.routes-panel,
.route-suggestion-card,
.proposal-card {
  padding: 28px;
}

.planner-intro {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.planner-intro h1 {
  font-size: clamp(1.4rem, 2.1vw, 2.1rem);
  line-height: 1.08;
  max-width: 18ch;
}

.planner-subtitle {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.planner-form {
  display: grid;
  gap: 16px;
}

.planner-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.planner-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--white);
  position: relative;
}

.planner-checkbox {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--input-bg);
  font-weight: 600 !important;
}

.planner-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--yellow);
  flex: 0 0 auto;
}

.advanced-options {
  margin-top: 2px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.advanced-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  color: var(--white);
  font-weight: 700;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.advanced-options summary::after {
  content: "+";
  color: var(--yellow);
  font-size: 1.1rem;
  line-height: 1;
}

.advanced-options[open] summary::after {
  content: "−";
}

.advanced-options-body {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.advanced-options-highlight {
  border-color: rgba(255, 212, 71, 0.28);
  background: linear-gradient(180deg, rgba(255, 212, 71, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 10px 24px rgba(255, 212, 71, 0.08);
}

.advanced-options-highlight summary {
  background: rgba(255, 212, 71, 0.08);
}

.advanced-options-highlight summary:hover {
  background: rgba(255, 212, 71, 0.12);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--white);
  background: var(--input-bg);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

small {
  color: var(--muted);
}

.input-suggestions {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(7, 26, 61, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .input-suggestions {
  background: rgba(248, 251, 255, 0.98);
}

.suggestion-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--white);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
}

.planner-button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.form-status {
  min-height: 24px;
  color: var(--yellow-soft);
  font-size: 0.95rem;
}

.planner-loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 14, 30, 0.72);
  backdrop-filter: blur(8px);
}

.planner-loading.hidden {
  display: none;
}

.planner-loading-card {
  width: min(720px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 37, 77, 0.98), rgba(9, 24, 54, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
}

.planner-loading-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
}

.planner-loading-copy {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.planner-loading-track {
  position: relative;
  height: 110px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(120, 175, 255, 0.08), rgba(255, 255, 255, 0.02) 38%, rgba(29, 72, 30, 0.18) 72%, rgba(255, 212, 71, 0.08) 100%),
    rgba(255, 255, 255, 0.02);
}

.planner-loading-scenery {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.planner-loading-scenery-strip {
  position: absolute;
  left: -50%;
  display: flex;
  gap: 36px;
  width: 300%;
  min-width: 300%;
  bottom: 42px;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
  will-change: transform;
  animation: planner-scenery-drift 16s linear infinite;
}

.planner-loading-scenery-strip > span {
  flex: 0 0 auto;
  display: inline-flex;
  white-space: nowrap;
}

.planner-loading-scenery-strip-sky {
  top: 10px;
  bottom: auto;
  font-size: 1.05rem;
  opacity: 0.62;
  animation-duration: 34s;
}

.planner-loading-scenery-strip-near {
  bottom: 46px;
  font-size: 1.16rem;
  opacity: 0.82;
  animation-duration: 14s;
}

.planner-loading-scenery-strip-mid {
  bottom: 62px;
  font-size: 1.12rem;
  opacity: 0.74;
  animation-duration: 18s;
}

.planner-loading-scenery-strip-far {
  bottom: 82px;
  font-size: 1.02rem;
  opacity: 0.56;
  filter: saturate(0.92);
  animation-duration: 26s;
}

.planner-loading-scenery-strip-ground {
  bottom: 30px;
  font-size: 1rem;
  opacity: 0.88;
  animation-duration: 12s;
}

.planner-loading-track::before,
.planner-loading-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 212, 71, 0.28);
}

.planner-loading-track::before {
  bottom: 26px;
}

.planner-loading-track::after {
  bottom: 10px;
}

.planner-loading-track::selection {
  background: transparent;
}

.planner-loading-train {
  position: absolute;
  left: -10%;
  bottom: 18px;
  transform: none;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.12em;
  white-space: nowrap;
  animation: planner-train-ride 2.8s linear infinite;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}

@keyframes planner-scenery-drift {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-25%);
  }
}

@keyframes planner-train-ride {
  0% {
    left: -10%;
  }
  100% {
    left: 105%;
  }
}

.example-route-box {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.example-route-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.example-route-button {
  width: fit-content;
  padding: 12px 16px;
  border: 1px solid rgba(255, 212, 71, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.example-route-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 71, 0.48);
}

.routes-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.routes-button {
  width: fit-content;
}

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

.mini-route-list span {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.92rem;
}

.routes-page,
.proposal-page {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.routes-header,
.proposal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.routes-header-copy {
  display: grid;
  gap: 10px;
}

.admin-page {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 20px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--surface-top), var(--surface-bottom)),
    linear-gradient(135deg, var(--surface-accent-a), var(--surface-accent-b));
  box-shadow: var(--shadow);
  padding: 24px;
}

.admin-shell,
.admin-grid,
.admin-form,
.admin-actions,
.admin-routes-list {
  display: grid;
  gap: 16px;
}

.admin-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.admin-config-card {
  display: grid;
  gap: 18px;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.admin-section-heading p,
.admin-config-note,
.admin-form small {
  margin: 0;
  color: var(--muted);
}

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

.admin-config-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tab-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-button.active {
  background: rgba(255, 212, 71, 0.16);
  border-color: rgba(255, 212, 71, 0.32);
  color: var(--yellow);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: grid;
  gap: 18px;
}

.admin-preview,
.saved-route-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
}

.admin-form textarea {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--white);
  background: var(--input-bg);
}

.admin-preview-block {
  display: grid;
  gap: 10px;
}

.admin-preview-block ul {
  margin: 0;
  padding-left: 18px;
}

.admin-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-progress-block {
  display: grid;
  gap: 8px;
}

.admin-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-progress-step {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.admin-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.admin-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.72), rgba(255, 212, 71, 1));
  transition: width 0.35s ease;
  box-shadow: 0 0 18px rgba(255, 212, 71, 0.22);
}

.admin-stopover-shell,
.admin-stopovers-list {
  display: grid;
  gap: 12px;
}

.admin-stopover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.admin-feed-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-feed-source-label {
  min-width: 0;
}

.station-input-wrap {
  position: relative;
}

.button-small {
  padding: 10px 14px;
  min-height: auto;
  font-size: 0.92rem;
}

.add-stop-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  min-height: 46px;
  color: var(--navy);
  background: linear-gradient(180deg, rgba(255, 212, 71, 1), rgba(255, 198, 31, 1));
  border: 1px solid rgba(255, 212, 71, 0.34);
  box-shadow: 0 18px 36px rgba(255, 212, 71, 0.26);
  font-weight: 800;
}

.add-stop-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(255, 212, 71, 0.32);
}

.add-stop-button:focus-visible {
  outline: 2px solid rgba(255, 212, 71, 0.65);
  outline-offset: 3px;
}

.add-stop-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(7, 26, 61, 0.16);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

[data-theme="light"] .add-stop-button {
  color: var(--navy);
  border-color: rgba(7, 26, 61, 0.08);
  box-shadow: 0 12px 22px rgba(7, 26, 61, 0.08);
}

[data-theme="light"] .add-stop-plus {
  background: rgba(7, 26, 61, 0.08);
}

.routes-header {
  padding: 28px;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.top-routes-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.top-routes-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.top-routes-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.top-route-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-route-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.16);
  color: var(--yellow);
  font-weight: 800;
}

.top-route-copy,
.top-route-meta,
.route-vote-block,
.route-vote-head {
  display: grid;
  gap: 6px;
}

.top-route-copy strong {
  color: var(--white);
}

.top-route-copy span,
.top-route-meta span,
.route-vote-summary,
.route-vote-feedback {
  color: var(--muted);
}

.route-suggestion-card {
  display: grid;
  gap: 14px;
}

.route-vote-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.route-video-block {
  display: grid;
  gap: 10px;
}

.route-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.route-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.route-vote-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.route-vote-button:hover:not(:disabled) {
  border-color: rgba(255, 212, 71, 0.32);
  background: rgba(255, 212, 71, 0.08);
}

.route-vote-button-down:hover:not(:disabled) {
  border-color: rgba(255, 122, 122, 0.35);
  background: rgba(255, 122, 122, 0.08);
}

.route-vote-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.route-vote-feedback {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.9rem;
}

.home-top-routes {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-top-routes-list {
  display: grid;
  gap: 10px;
}

.home-top-route-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-top-route-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.16);
  color: var(--yellow);
  font-weight: 800;
}

.home-top-route-copy {
  display: grid;
  gap: 4px;
}

.home-top-route-copy strong {
  color: var(--white);
}

.home-top-route-copy span,
.home-top-route-copy small {
  color: var(--muted);
}

.proposal-head-copy {
  display: grid;
  gap: 8px;
}

.proposal-route-ribbon {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 212, 71, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 212, 71, 0.16);
}

.proposal-route-ribbon h1 {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.proposal-route-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.route-stop-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
}

.route-stop-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.route-stop-chip::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.route-stop-chip:last-child::after {
  display: none;
}

.back-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.proposal-summary {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  padding-top: 6px;
}

.proposal-summary span {
  white-space: nowrap;
}

.proposal-share-header-button {
  width: fit-content;
}

.proposal-header-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: min(100%, 360px);
}

.proposal-filters-card {
  width: min(100%, 360px);
  padding: 18px 20px;
}

.proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.proposal-side {
  display: grid;
  gap: 16px;
}

.booking-steps-card {
  margin-top: 20px;
}

.cost-summary,
.cost-breakdown,
.day-overview {
  display: grid;
  gap: 12px;
}

.day-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.day-card-top,
.timeline-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-card-top strong,
.timeline-day-header span,
.timeline-day-header strong {
  color: var(--white);
}

.day-title {
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.day-title-text {
  color: var(--white);
}

.day-segments {
  color: var(--muted);
  font-size: 0.95rem;
}

.day-ticket-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.day-ticket-empty {
  color: var(--muted);
}

.day-interrail {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.day-interrail.active,
.timeline-day-header strong.active {
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
}

.timeline-day-header {
  padding: 8px 2px 0;
}

.timeline-day-header strong {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.cost-total,
.cost-line {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.cost-total strong,
.cost-line strong {
  display: block;
  color: var(--white);
}

.cost-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cost-total span,
.cost-line > span {
  color: var(--yellow);
  font-weight: 700;
  white-space: nowrap;
}

.cost-line div {
  display: grid;
  gap: 4px;
}

.cost-line div span,
.cost-summary-copy,
.timeline-ticket-plan {
  color: var(--muted);
}

.pass-compare {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
}

.pass-compare-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 800;
}

.pass-compare.selected .pass-compare-mark {
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
}

.pass-compare.not-selected .pass-compare-mark {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
}

.pass-compare-copy {
  display: grid;
  gap: 2px;
}

.pass-compare-copy strong {
  color: var(--white);
}

.pass-compare-copy span {
  color: var(--muted);
}

.pass-compare-copy em {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
}

.pass-compare.selected .pass-compare-copy em {
  color: #22c55e;
}

.pass-compare.not-selected .pass-compare-copy em {
  color: #ef4444;
}

.timeline-ticket-plan {
  font-weight: 700;
}

.operator-overview {
  display: grid;
  gap: 10px;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-weight: 700;
}

.booking-steps {
  margin-top: 18px;
}

.booking-step-list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.booking-step-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.booking-step-copy {
  display: grid;
  gap: 4px;
}

.booking-step-copy strong {
  color: var(--white);
}

.booking-step-copy span {
  color: var(--muted);
}

.booking-step-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.booking-step-side span {
  color: var(--yellow);
  font-weight: 700;
  white-space: nowrap;
}

.booking-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.22);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.booking-link:hover {
  border-color: rgba(255, 212, 71, 0.42);
  color: var(--yellow);
}

.route-map {
  overflow: hidden;
  border-radius: 18px;
  min-height: 220px;
  background:
    radial-gradient(circle at top left, rgba(255, 212, 71, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.proposal-map-head {
  align-items: center;
}

.route-map-large {
  min-height: min(72vh, 760px);
}

.route-map .leaflet-container {
  width: 100%;
  min-height: 220px;
  background: #0a1836;
}

.route-map-large .leaflet-container {
  min-height: min(72vh, 760px);
}

.route-map .leaflet-control-attribution {
  background: rgba(7, 26, 61, 0.72);
  color: rgba(223, 232, 255, 0.72);
  font-size: 9px;
}

.route-map .leaflet-control-attribution a {
  color: var(--yellow);
}

.route-map-label {
  background: rgba(7, 26, 61, 0.92);
  color: var(--white);
  border: 1px solid rgba(255, 212, 71, 0.18);
  border-radius: 999px;
  box-shadow: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  pointer-events: none;
  white-space: nowrap;
}

.route-map-label::before {
  display: none;
}

.route-map-label-large {
  font-size: 12px;
  padding: 6px 10px;
  border-color: rgba(255, 212, 71, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.route-map-label-stop {
  background: rgba(7, 26, 61, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 10px;
}

html[data-theme="light"] .route-map-label,
html[data-theme="light"] .route-map-label-stop {
  color: #f8fbff;
  background: rgba(7, 26, 61, 0.92);
  border-color: rgba(255, 212, 71, 0.24);
  box-shadow: 0 8px 20px rgba(7, 26, 61, 0.18);
}

html[data-theme="light"] .route-map-label-stop {
  background: rgba(17, 41, 88, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.map-modal.hidden {
  display: none;
}

.map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 30, 0.72);
  backdrop-filter: blur(6px);
}

.map-modal-card {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.map-modal .leaflet-container,
.map-modal .leaflet-pane,
.map-modal .leaflet-control-container {
  z-index: auto;
}

body.modal-open {
  overflow: hidden;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-weight: 700;
}

.filter-chip.active {
  background: rgba(255, 212, 71, 0.14);
  border-color: rgba(255, 212, 71, 0.32);
  color: var(--yellow);
}

.operator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #071a3d;
  background: var(--yellow);
  flex: 0 0 auto;
}

.operator-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 22px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
}

.operator-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.city-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 1rem;
}

.operator-icon.db {
  background: #ff6b6b;
}

.operator-icon.generic {
  background: #cbd5e1;
  color: #0f172a;
}

.operator-icon.eurostar {
  background: #60a5fa;
}

.operator-icon.sncb {
  background: #fbbf24;
}

.operator-icon.ns {
  background: #fb923c;
}

.operator-icon.govolta {
  background: #6ee7c8;
}

.operator-icon.sleeper {
  background: #a7f3d0;
}

.operator-icon.nightjet {
  background: #93c5fd;
}

.operator-icon.eurobahn {
  background: #f9a8d4;
}

.operator-icon.interrail {
  background: #ffd447;
}

.operator-icon.deutschlandticket {
  background: #86efac;
}

.filter-chip,
.timeline-meta,
.timeline-ticket-plan,
.day-ticket-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-city-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-arrow {
  color: rgba(255, 255, 255, 0.42);
}

.timeline-separator {
  color: rgba(255, 255, 255, 0.32);
}

.proposal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.proposal-share-panel {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.proposal-share-panel.hidden {
  display: none;
}

.proposal-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.timeline-item,
.transfer-row {
  display: grid;
  grid-template-columns: 88px 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline-time {
  text-align: right;
  padding-top: 2px;
}

.timeline-time strong {
  display: block;
  color: var(--white);
  font-size: 1.15rem;
}

.timeline-time span {
  color: #8fd27d;
  font-size: 0.92rem;
}

.timeline-time small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-line {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100%;
}

.timeline-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -26px;
  width: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(255, 212, 71, 0.16);
}

.timeline-content {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.timeline-meta,
.timeline-note,
.timeline-headsign,
.timeline-coverage {
  color: var(--muted);
}

.timeline-headsign {
  margin-top: -2px;
  line-height: 1.45;
}

.timeline-headsign strong {
  color: var(--text);
}

.timeline-product-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.28);
  background: rgba(255, 212, 71, 0.12);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

html[data-theme="light"] .timeline-product-badge {
  border-color: rgba(16, 34, 67, 0.18);
  background: rgba(255, 212, 71, 0.22);
}

.timeline-coverage {
  margin-top: -2px;
  font-weight: 700;
}

.timeline-coverage-yes {
  color: #a7ef9f;
}

.proposal-logic-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.proposal-logic-list li {
  line-height: 1.5;
}

.proposal-logic-story {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.proposal-logic-story p {
  margin: 0;
  line-height: 1.65;
}

.proposal-logic-story strong {
  color: var(--text);
  font-weight: 700;
}

.timeline-info {
  position: relative;
  width: fit-content;
  margin-top: 2px;
}

.timeline-info summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-bg);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.timeline-info summary::-webkit-details-marker {
  display: none;
}

.timeline-info[open] summary,
.timeline-info summary:hover {
  color: var(--yellow);
  border-color: rgba(255, 212, 71, 0.28);
}

.timeline-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 4;
  min-width: min(320px, 75vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 26, 61, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  color: var(--muted);
}

.timeline-tooltip p + p {
  margin-top: 8px;
}

.timeline-ticket {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
  font-weight: 700;
}

.transfer-badge {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

@media (max-width: 1100px) {
  .home-layout,
  .proposal-grid,
  .routes-grid,
  .top-routes-list,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-config-grid,
  .admin-section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-feed-row {
    grid-template-columns: 1fr;
  }

  .home-layout {
    min-height: auto;
  }

  .proposal-header {
    flex-direction: column;
  }

  .proposal-header-meta {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .proposal-filters-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .home-layout,
  .routes-page,
  .proposal-page {
    width: min(100% - 20px, 1380px);
    padding-top: 0;
  }

  .page-brand {
    width: min(100% - 20px, 1380px);
    padding: 16px 0 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    width: min(100% - 20px, 1380px);
  }

  .page-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .planner-stage,
  .routes-panel,
  .routes-header,
  .route-suggestion-card,
  .proposal-card {
    padding: 20px;
  }

  .planner-row,
  .routes-header,
  .proposal-header {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .top-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-item,
  .transfer-row {
    grid-template-columns: 62px 16px minmax(0, 1fr);
  }

  .booking-step-item {
    flex-direction: column;
  }

  .booking-step-side {
    justify-items: start;
  }

  .proposal-route-ribbon h1 {
    font-size: 1.05rem;
  }
}
