:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-warm: #f7d8a2;
  --bg-deep: #143642;
  --panel: rgba(255, 248, 239, 0.84);
  --panel-strong: rgba(255, 250, 244, 0.94);
  --panel-border: rgba(20, 54, 66, 0.12);
  --text: #14232a;
  --muted: #5d6b71;
  --accent: #ff7a00;
  --accent-soft: #ffe0bf;
  --accent-deep: #1f2f36;
  --success: #188b5a;
  --shadow: 0 20px 50px rgba(20, 35, 42, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.24), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(20, 54, 66, 0.14), transparent 26%),
    linear-gradient(135deg, #f6f1e8 0%, #f0e5d4 42%, #f4efe6 100%);
}

body {
  position: relative;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, #000 48%, transparent 100%);
}

.page-shell {
  position: relative;
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar,
.section-head,
.step-card-head,
.map-panel-head,
.action-row,
.wizard-nav,
.led-board-head,
.selected-stop,
.hero,
.wizard-layout,
.hero-stats,
.topbar-status {
  display: flex;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, #ff8c24, #ff5c00);
  box-shadow:
    0 0 0 10px rgba(255, 122, 0, 0.14),
    0 12px 24px rgba(255, 122, 0, 0.22);
  transform: rotate(12deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 13px;
}

.topbar-status {
  align-items: center;
  gap: 10px;
}

.live-pill,
.city-pill,
.result-badge,
.board-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-pill {
  background: rgba(24, 139, 90, 0.12);
  color: var(--success);
}

.city-pill,
.result-badge {
  background: rgba(20, 54, 66, 0.08);
  color: var(--text);
}

.hero {
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 40px 0 26px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1,
.section-head h2,
.step-card-head h3 {
  margin: 0;
  letter-spacing: -0.06em;
}

.hero h1 {
  max-width: 840px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.93;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.5;
}

.hero-panel,
.step-card,
.result-card,
.board-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  min-width: 300px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(20, 54, 66, 0.92), rgba(24, 58, 68, 0.85));
  color: #fff4e8;
}

.hero-panel-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.hero-stats {
  gap: 12px;
  margin-top: 18px;
}

.hero-stats article {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats span,
.result-box span,
.departure-kicker,
.selected-stop-kicker,
.pace-label,
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero-stats span {
  color: rgba(255, 244, 232, 0.64);
  margin-bottom: 8px;
}

.hero-stats strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.wizard-layout {
  align-items: start;
  gap: 18px;
}

.wizard-column {
  flex: 1.1;
  min-width: 0;
}

.result-column {
  flex: 0.9;
  min-width: 360px;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 16px;
}

.section-head {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 0.98;
}

.step-progress {
  display: inline-flex;
  gap: 8px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(20, 54, 66, 0.16);
  padding: 0;
}

.step-dot.is-active {
  width: 38px;
  background: linear-gradient(90deg, #ff9a3d, #ff6f00);
}

.step-card,
.result-card,
.board-card {
  padding: 22px;
}

.step-card {
  margin-bottom: 14px;
  opacity: 0.54;
  transform: translateY(18px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.step-card.is-active {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(255, 122, 0, 0.2);
}

.step-card-head {
  gap: 16px;
  margin-bottom: 18px;
}

.step-index {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.15), rgba(20, 54, 66, 0.12));
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}

.step-card-head h3 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.step-card-head p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 660px;
  line-height: 1.5;
}

.search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

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

.field-label,
.selected-stop-kicker {
  color: var(--muted);
}

.field input,
.pace-card input {
  width: 100%;
  border: 1px solid rgba(20, 54, 66, 0.12);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  outline: none;
  color: var(--text);
}

.field input {
  padding: 18px 18px;
  font-size: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.pace-card input:focus {
  border-color: rgba(255, 122, 0, 0.34);
  transform: translateY(-1px);
}

.selected-stop {
  flex-direction: column;
  align-items: start;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(20, 54, 66, 0.1);
}

.selected-stop strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.selected-stop small {
  color: var(--muted);
}

.stop-results,
.line-results,
.pace-summary {
  display: grid;
  gap: 10px;
}

.stop-results {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stop-chip,
.line-chip {
  width: 100%;
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stop-chip {
  text-align: left;
  padding: 14px 16px;
}

.stop-chip:hover,
.line-chip:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
}

.stop-chip.is-selected,
.line-chip.is-selected {
  border-color: rgba(255, 122, 0, 0.4);
  box-shadow: 0 16px 30px rgba(255, 122, 0, 0.12);
}

.stop-chip strong,
.line-chip-top strong,
.result-box strong,
.pace-pill strong {
  letter-spacing: -0.04em;
}

.stop-chip strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.stop-chip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.map-panel {
  display: grid;
  gap: 10px;
}

.map-panel-head {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#stop-map {
  height: 390px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(20, 54, 66, 0.1);
}

.leaflet-container {
  font-family: var(--sans);
}

.stop-map-point {
  stroke: rgba(20, 35, 42, 0.18);
  stroke-width: 1;
}

.line-results {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.line-chip {
  text-align: left;
  padding: 18px;
}

.line-chip-top,
.line-chip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.line-chip-top strong {
  font-size: 30px;
}

.line-chip-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
}

.line-chip-bottom {
  margin-top: 14px;
  align-items: end;
}

.line-chip-destination {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.4;
  max-width: 82%;
}

.line-chip-route-name {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  max-width: 82%;
}

.line-empty,
.led-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

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

.pace-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(20, 54, 66, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.pace-card strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.pace-card input {
  padding: 18px 16px;
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

.pace-card small {
  color: var(--muted);
}

.pace-slow {
  background: linear-gradient(180deg, rgba(225, 242, 255, 0.82), rgba(255, 255, 255, 0.82));
}

.pace-normal {
  background: linear-gradient(180deg, rgba(255, 243, 214, 0.9), rgba(255, 255, 255, 0.84));
}

.pace-fast {
  background: linear-gradient(180deg, rgba(255, 227, 212, 0.92), rgba(255, 255, 255, 0.84));
}

.action-row,
.wizard-nav {
  grid-column: 1 / -1;
  gap: 12px;
}

.wizard-nav {
  justify-content: flex-end;
}

.ghost-btn,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border: 1px solid rgba(20, 54, 66, 0.12);
}

.ghost-btn.compact {
  padding: 10px 14px;
  font-size: 13px;
}

.primary-btn {
  background: linear-gradient(135deg, #ff8e2b, #ff6b00);
  color: white;
  box-shadow: 0 16px 30px rgba(255, 107, 0, 0.24);
}

.departure-hero {
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(20, 54, 66, 0.96), rgba(23, 48, 56, 0.94));
  color: #fff3e1;
}

.departure-kicker {
  color: rgba(255, 243, 225, 0.62);
}

.departure-main {
  margin-top: 12px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.departure-copy {
  margin: 14px 0 0;
  color: rgba(255, 243, 225, 0.78);
  font-size: 16px;
  line-height: 1.5;
}

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

.result-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(20, 54, 66, 0.08);
}

.result-box span {
  color: var(--muted);
  margin-bottom: 10px;
}

.result-box strong {
  display: block;
  font-size: 22px;
}

.pace-summary {
  margin-top: 14px;
}

.pace-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 54, 66, 0.08);
}

.pace-pill span {
  color: var(--muted);
}

.pace-pill strong {
  font-size: 18px;
}

.board-card {
  background:
    linear-gradient(180deg, rgba(12, 12, 10, 0.96), rgba(20, 16, 10, 0.98));
  color: #ffc37e;
}

.board-status {
  background: rgba(255, 195, 126, 0.12);
  color: #ffc37e;
}

.led-board {
  border-radius: 24px;
  padding: 16px;
  background:
    radial-gradient(circle at top, rgba(255, 140, 50, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(10, 10, 9, 0.98), rgba(20, 16, 10, 1));
  border: 1px solid rgba(255, 195, 126, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(255, 195, 126, 0.06);
}

.led-board-head,
.led-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 74px;
  gap: 12px;
  align-items: center;
}

.led-board-head {
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 195, 126, 0.12);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 195, 126, 0.72);
}

.led-board-body {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.led-row {
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(255, 195, 126, 0.03);
  font-family: var(--mono);
  text-shadow: 0 0 10px rgba(255, 147, 56, 0.28);
}

.led-line {
  font-size: 24px;
  font-weight: 600;
}

.led-destination {
  font-size: 15px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.led-eta {
  justify-self: end;
  font-size: 20px;
  font-weight: 600;
}

.led-empty {
  background: rgba(255, 195, 126, 0.04);
  color: rgba(255, 195, 126, 0.68);
  font-family: var(--mono);
}

@media (max-width: 1180px) {
  .wizard-layout {
    flex-direction: column;
  }

  .result-column {
    width: 100%;
    min-width: 0;
    position: static;
  }
}

@media (max-width: 880px) {
  .hero {
    flex-direction: column;
    align-items: start;
  }

  .hero-panel {
    width: 100%;
    min-width: 0;
  }

  .pace-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 18px));
    padding-top: 18px;
  }

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

  .hero {
    padding-top: 28px;
  }

  .hero-text {
    font-size: 18px;
  }

  .stop-results,
  .line-results {
    grid-template-columns: 1fr;
  }

  .step-card,
  .result-card,
  .board-card {
    padding: 18px;
    border-radius: 24px;
  }

  #stop-map {
    height: 320px;
  }

  .led-board-head,
  .led-row {
    grid-template-columns: 70px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .led-line {
    font-size: 20px;
  }

  .led-eta {
    font-size: 16px;
  }
}
