@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --paper: #f5f8f6;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --line: #dfe9e5;
  --teal: #00a896;
  --teal-dark: #087f72;
  --teal-pale: #e3f7f3;
  --coral: #ff6b55;
  --coral-dark: #ec523c;
  --sun: #ffca5c;
  --navy: #102a43;
  --shadow: 0 24px 70px rgba(16, 42, 67, .12);
  --shadow-soft: 0 10px 35px rgba(16, 42, 67, .09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 75% 4%, rgba(0, 168, 150, .10), transparent 28rem),
    linear-gradient(180deg, #f9fbfa 0%, var(--paper) 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--teal-dark);
}

.app-container {
  width: min(1480px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--navy);
  border-radius: 10px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  width: 430px;
  height: 430px;
  top: -240px;
  right: -130px;
  background: rgba(255, 202, 92, .13);
  animation: ambientFloat 12s ease-in-out infinite;
}

.ambient-two {
  width: 260px;
  height: 260px;
  left: -150px;
  top: 44%;
  background: rgba(255, 107, 85, .08);
  animation: ambientFloat 10s ease-in-out -4s infinite reverse;
}

.topbar {
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid rgba(16, 42, 67, .07);
  background: rgba(249, 251, 250, .78);
  backdrop-filter: blur(16px);
}

.navbar {
  min-height: 80px;
  padding: 0;
}

.navbar-brand {
  color: var(--ink);
}

.navbar-brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: white;
  font-size: 1.28rem;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 9px 22px rgba(0, 168, 150, .24);
  transform: rotate(-4deg);
}

.brand-mark.large {
  width: 64px;
  height: 64px;
  font-size: 1.75rem;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(0, 74, 67, .25);
}

.brand-title,
.brand-subtitle {
  display: block;
  line-height: 1.05;
}

.brand-title {
  font-family: "Manrope", sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.live-chip {
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--teal-dark);
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid rgba(0, 168, 150, .14);
  border-radius: 999px;
  background: rgba(227, 247, 243, .68);
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.live-dot::after {
  position: absolute;
  content: "";
  inset: -4px;
  border: 1px solid var(--teal);
  border-radius: inherit;
  animation: livePulse 1.8s ease-out infinite;
}

.icon-button,
.locate-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .7);
  transition: transform .25s ease, color .25s ease, border-color .25s ease, background .25s ease;
}

.icon-button:hover,
.locate-button:hover {
  color: var(--teal-dark);
  border-color: rgba(0, 168, 150, .35);
  background: white;
  transform: translateY(-2px);
}

.page-shell {
  padding-top: 28px;
}

.hero {
  display: flex;
  min-height: 148px;
  padding: 8px 24px 24px;
  align-items: center;
  justify-content: space-between;
}

.eyebrow,
.section-kicker {
  display: flex;
  margin: 0 0 12px;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.15rem, 3.8vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.hero h1 span {
  color: var(--coral);
}

.hero-copy {
  max-width: 580px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: .96rem;
}

.hero-orbit {
  position: relative;
  width: 190px;
  height: 125px;
  margin-right: 38px;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  width: 118px;
  height: 118px;
  border: 1px dashed rgba(0, 168, 150, .32);
  border-radius: 50%;
  animation: orbitSpin 22s linear infinite;
}

.orbit-center,
.orbit-card {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.orbit-center {
  width: 58px;
  height: 58px;
  color: white;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--ink), #275979);
  animation: centerFloat 4s ease-in-out infinite;
}

.orbit-card {
  z-index: 2;
  width: 38px;
  height: 38px;
  background: white;
}

.orbit-card-one {
  top: 2px;
  left: 22px;
  color: var(--coral);
  animation: cardFloat 5s ease-in-out infinite;
}

.orbit-card-two {
  right: 16px;
  bottom: 2px;
  color: var(--teal);
  animation: cardFloat 5s ease-in-out -2.5s infinite;
}

.workspace {
  position: relative;
  margin-bottom: 38px;
  overflow: visible;
  border: 1px solid rgba(16, 42, 67, .07);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace-tabs-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.workspace-tabs .nav-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  color: var(--ink-soft);
  font-weight: 700;
  border: 0;
  border-radius: 15px;
  transition: color .3s ease, background .3s ease, transform .3s ease;
}

.workspace-tabs .nav-link::after {
  position: absolute;
  content: "";
  right: 25%;
  bottom: 5px;
  left: 25%;
  height: 3px;
  border-radius: 4px;
  background: var(--coral);
  transform: scaleX(0);
  transition: transform .3s ease;
}

.workspace-tabs .nav-link:hover {
  color: var(--ink);
  background: #f5f9f7;
}

.workspace-tabs .nav-link.active {
  color: var(--ink);
  background: var(--teal-pale);
}

.workspace-tabs .nav-link.active::after {
  transform: scaleX(1);
}

.workspace-tabs .nav-link i {
  font-size: 1.08rem;
}

.tab-pane.active {
  animation: paneIn .48s cubic-bezier(.2, .8, .2, 1);
}

.route-grid {
  display: grid;
  min-height: 720px;
  grid-template-columns: minmax(370px, 430px) minmax(0, 1fr);
}

.route-sidebar,
.tool-sidebar {
  padding: 34px;
}

.route-sidebar {
  max-height: 780px;
  overflow-x: visible;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  margin-bottom: 25px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading h2,
.tool-sidebar h2,
.modal-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.045em;
}

.section-kicker {
  margin-bottom: 6px;
  font-size: .7rem;
}

.journey-fields {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  min-height: 148px;
  padding: 10px 48px 10px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.journey-fields:focus-within {
  border-color: rgba(0, 168, 150, .48);
  box-shadow: 0 0 0 4px rgba(0, 168, 150, .08);
}

.journey-rail {
  display: flex;
  padding-block: 24px;
  align-items: center;
  flex-direction: column;
}

.rail-origin,
.rail-destination {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.rail-destination {
  border-color: var(--coral);
  background: var(--coral);
}

.rail-line {
  width: 1px;
  flex: 1;
  margin-block: 4px;
  border-left: 1px dashed #b9cbc4;
}

.journey-inputs {
  min-width: 0;
}

.journey-inputs label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.place-input {
  min-height: 40px;
  padding: 0;
  font-weight: 600;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}

.field-divider {
  height: 1px;
  margin: 8px 0;
  background: var(--line);
}

.swap-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 13px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--teal-dark);
  border: 1px solid #cde7e2;
  border-radius: 11px;
  background: var(--teal-pale);
  transform: translateY(-50%);
  transition: transform .3s ease, background .3s ease;
}

.swap-button:hover {
  background: #d1f0ea;
  transform: translateY(-50%) rotate(180deg);
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 8px);
  right: -42px;
  left: -38px;
  display: none;
  max-height: 310px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  box-shadow: 0 18px 45px rgba(16, 42, 67, .18);
}

.standalone-search .autocomplete-menu {
  right: 0;
  left: 0;
}

.autocomplete-menu.show {
  display: block;
  animation: menuIn .2s ease-out;
}

.suggestion-item {
  display: flex;
  width: 100%;
  padding: 10px;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  background: transparent;
  transition: background .2s ease, transform .2s ease;
}

.suggestion-item:hover,
.suggestion-item:focus-visible {
  outline: none;
  background: var(--teal-pale);
  transform: translateX(2px);
}

.suggestion-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal-dark);
  border-radius: 10px;
  background: #eff8f5;
}

.suggestion-label {
  min-width: 0;
}

.suggestion-label strong,
.suggestion-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-label strong {
  font-size: .9rem;
}

.suggestion-label small {
  color: var(--ink-soft);
  font-size: .75rem;
}

.suggestion-status {
  padding: 14px;
  color: var(--ink-soft);
  text-align: center;
  font-size: .83rem;
}

.time-choice {
  display: grid;
  margin-top: 18px;
  padding: 4px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: 13px;
  background: #edf3f0;
}

.time-choice .btn {
  padding: 9px 8px;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
}

.time-choice .btn-check:checked + .btn {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 12px rgba(16, 42, 67, .08);
}

.date-time-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.form-label {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 48px;
  color: var(--ink);
  border-color: var(--line);
  border-radius: 13px;
  background-color: white;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(0, 168, 150, .55);
  box-shadow: 0 0 0 4px rgba(0, 168, 150, .09);
}

.input-with-icon {
  position: relative;
}

.input-with-icon > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  color: var(--teal-dark);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 42px;
}

.search-button {
  display: flex;
  min-height: 52px;
  margin-top: 20px;
  padding-inline: 20px;
  align-items: center;
  justify-content: space-between;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  box-shadow: 0 12px 24px rgba(255, 107, 85, .25);
  transition: transform .25s ease, box-shadow .25s ease;
}

.search-button:hover,
.search-button:focus {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(255, 107, 85, .32);
}

.search-button:disabled {
  color: #8da09a;
  background: #dfe8e4;
  box-shadow: none;
}

.search-button .spinner-border {
  width: 1rem;
  height: 1rem;
}

.map-panel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) 0;
  background: #e7efeb;
}

.map {
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #e7efeb;
}

.leaflet-container {
  font-family: "DM Sans", sans-serif;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-soft) !important;
}

.leaflet-control-zoom a {
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

.leaflet-popup-content {
  margin: 12px 15px;
}

.map-overlay {
  position: absolute;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 13px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.map-hint {
  top: 18px;
  right: 18px;
  padding: 10px 13px;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
}

.map-hint i {
  color: var(--teal);
}

.map-loading {
  top: 18px;
  left: 50%;
  padding: 11px 16px;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  transform: translateX(-50%);
}

.results-list {
  margin-top: 23px;
}

.route-card {
  position: relative;
  width: 100%;
  margin-bottom: 11px;
  padding: 15px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: listItemIn .45s both;
}

.route-card:hover,
.route-card.active {
  border-color: rgba(0, 168, 150, .45);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.route-card.active::before {
  position: absolute;
  content: "";
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--teal);
}

.route-times {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.route-times strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.15rem;
}

.route-duration {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 600;
}

.route-summary,
.route-modes {
  display: flex;
  align-items: center;
}

.route-summary {
  gap: 10px;
}

.route-modes {
  margin-top: 11px;
  gap: 5px;
  flex-wrap: wrap;
}

.mode-chip {
  display: inline-flex;
  min-height: 25px;
  padding: 3px 8px;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: .7rem;
  font-weight: 800;
  border-radius: 7px;
  background: #edf3f0;
}

.mode-chip.walk {
  color: var(--ink-soft);
  background: transparent;
}

.transfer-copy {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: .72rem;
}

.empty-state {
  display: flex;
  min-height: 470px;
  padding: 30px;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.empty-state.compact-empty {
  min-height: 170px;
  padding: 20px;
}

.empty-state h3 {
  margin: 14px 0 5px;
  font-family: "Manrope", sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
}

.empty-state p {
  max-width: 340px;
  margin: 0;
  color: var(--ink-soft);
}

.empty-icon,
.empty-illustration {
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  border-radius: 50%;
  background: var(--teal-pale);
}

.empty-icon {
  width: 45px;
  height: 45px;
}

.empty-illustration {
  position: relative;
  width: 105px;
  height: 105px;
  font-size: 2.4rem;
}

.empty-illustration::before,
.empty-illustration::after {
  position: absolute;
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid var(--coral);
  border-radius: 50%;
}

.empty-illustration::before {
  top: 2px;
  right: -5px;
}

.empty-illustration::after {
  bottom: 7px;
  left: -3px;
  width: 10px;
  height: 10px;
  border-color: var(--sun);
}

.line-illustration {
  color: var(--coral);
  background: #fff0ed;
}

.more-button {
  display: flex;
  margin-top: 12px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: .82rem;
  font-weight: 800;
  border: 1px solid #cfe5e0;
  border-radius: 12px;
  background: var(--teal-pale);
}

.more-button:hover {
  color: var(--teal-dark);
  background: #d4f2ec;
}

.tool-layout {
  display: grid;
  min-height: 660px;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
}

.tool-sidebar {
  border-right: 1px solid var(--line);
}

.section-copy {
  margin: 12px 0 25px;
  color: var(--ink-soft);
  font-size: .92rem;
}

.standalone-search {
  margin-bottom: 4px;
}

.tip-card {
  display: flex;
  margin-top: 28px;
  padding: 15px;
  align-items: flex-start;
  gap: 11px;
  color: #66531d;
  border: 1px solid rgba(255, 202, 92, .42);
  border-radius: 14px;
  background: rgba(255, 245, 210, .65);
}

.tip-card i {
  color: #d39a14;
}

.tip-card p {
  margin: 0;
  font-size: .78rem;
}

.tool-content {
  padding: 28px 34px;
  background: linear-gradient(135deg, rgba(246, 250, 248, .8), rgba(255, 255, 255, .75));
  border-radius: 0 0 var(--radius-lg) 0;
}

.board-header {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.board-header h3 {
  margin: 0 0 3px;
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.board-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .82rem;
}

.updated-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--teal-dark);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--teal-pale);
}

.departure-row {
  display: grid;
  min-height: 78px;
  margin-bottom: 9px;
  padding: 12px 15px;
  align-items: center;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 5px 20px rgba(16, 42, 67, .04);
  animation: listItemIn .45s both;
  transition: transform .22s ease, box-shadow .22s ease;
}

.departure-row:hover {
  box-shadow: var(--shadow-soft);
  transform: translateX(3px);
}

.line-badge {
  display: inline-flex;
  width: fit-content;
  min-width: 40px;
  min-height: 34px;
  padding: 6px 10px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.departure-destination strong,
.departure-destination small {
  display: block;
}

.departure-destination strong {
  font-size: .94rem;
}

.departure-destination small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: .73rem;
}

.departure-time {
  text-align: right;
}

.departure-time strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 1.08rem;
}

.realtime-label {
  color: var(--teal-dark);
  font-size: .66rem;
  font-weight: 700;
}

.realtime-label::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  content: "";
  border-radius: 50%;
  background: var(--teal);
}

.service-alert {
  display: flex;
  margin: 13px 0;
  padding: 12px 14px;
  align-items: center;
  gap: 10px;
  color: #845120;
  border: 1px solid #f1d2ae;
  border-radius: 12px;
  background: #fff8ed;
  font-size: .78rem;
}

.line-content {
  display: grid;
  padding: 0;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.2fr);
}

.line-content:has(.line-map-wrap.d-none) {
  display: block;
  padding: 28px 34px;
}

.line-map-wrap {
  min-height: 660px;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.line-map {
  min-height: 660px;
}

#linePlan:not(:has(.empty-state)) {
  max-height: 660px;
  padding: 26px;
  overflow-y: auto;
}

.line-plan-header {
  margin-bottom: 24px;
}

.line-plan-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-plan-title h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.line-plan-header p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: .82rem;
}

.stop-timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 25px;
  list-style: none;
}

.stop-timeline::before {
  position: absolute;
  content: "";
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 3px;
  border-radius: 4px;
  background: var(--line-color, var(--teal));
}

.timeline-stop {
  position: relative;
  display: grid;
  min-height: 60px;
  padding: 4px 0 15px 8px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  animation: listItemIn .4s both;
}

.timeline-stop::before {
  position: absolute;
  content: "";
  top: 8px;
  left: -24px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--line-color, var(--teal));
  border-radius: 50%;
  background: white;
}

.timeline-stop:first-child::before,
.timeline-stop:last-child::before {
  background: var(--line-color, var(--teal));
}

.timeline-stop strong {
  font-size: .88rem;
}

.timeline-stop small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: .7rem;
}

.timeline-time {
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
}

.app-footer {
  display: flex;
  padding: 10px 10px 35px;
  justify-content: space-between;
  gap: 15px;
  color: var(--ink-soft);
  font-size: .74rem;
}

.app-footer p {
  margin: 0;
}

.animated-modal {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(16, 42, 67, .25);
}

.modal.show .animated-modal {
  animation: modalSpring .45s cubic-bezier(.2, .9, .3, 1.15);
}

.modal-header,
.modal-body {
  padding: 24px 28px;
}

.modal-header + .modal-body {
  padding-top: 4px;
}

.modal-backdrop.show {
  opacity: .36;
  backdrop-filter: blur(5px);
}

.about-modal {
  overflow: hidden;
}

.about-gradient {
  display: grid;
  height: 125px;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 202, 92, .7), transparent 25%),
    linear-gradient(135deg, #dff5f0, #ffe6df);
}

.about-feature {
  display: flex;
  margin-top: 10px;
  padding: 11px 13px;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  background: #f4f8f6;
  font-size: .85rem;
}

.about-feature i {
  color: var(--teal-dark);
}

.journey-detail-header {
  display: flex;
  margin-bottom: 22px;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  border-radius: 15px;
  background: #f1f7f4;
}

.journey-detail-header strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
}

.detail-leg {
  position: relative;
  display: grid;
  padding: 0 0 24px 46px;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.detail-leg::before {
  position: absolute;
  content: "";
  top: 12px;
  bottom: -8px;
  left: 17px;
  width: 3px;
  border-radius: 4px;
  background: var(--leg-color, var(--teal));
}

.detail-leg:last-child::before {
  display: none;
}

.detail-leg-icon {
  position: absolute;
  z-index: 2;
  top: -2px;
  left: 0;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: white;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--leg-color, var(--teal));
  box-shadow: 0 4px 12px rgba(16, 42, 67, .15);
}

.detail-leg h4 {
  margin: 2px 0 3px;
  font-size: .95rem;
  font-weight: 800;
}

.detail-leg p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .78rem;
}

.detail-leg-time {
  font-size: .8rem;
  font-weight: 800;
}

.app-toast {
  border: 1px solid #f0d0c9;
  border-radius: 15px;
  background: rgba(255, 250, 249, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.toast-icon {
  color: var(--coral);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e8efec;
}

.skeleton::after {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.3s infinite;
}

.board-skeleton {
  height: 78px;
  margin-bottom: 9px;
  border-radius: 14px;
}

.custom-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  border: 4px solid white;
  border-radius: 50% 50% 50% 10%;
  background: var(--marker-color, var(--teal));
  box-shadow: 0 5px 15px rgba(16, 42, 67, .25);
  transform: rotate(-45deg);
}

.custom-marker i {
  font-size: .75rem;
  transform: rotate(45deg);
}

.stop-dot-marker {
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--marker-color, var(--teal));
  box-shadow: 0 2px 8px rgba(16, 42, 67, .35);
}

@keyframes paneIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes listItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSpring {
  from { opacity: 0; transform: translateY(24px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes livePulse {
  0% { opacity: .8; transform: scale(.65); }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes centerFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

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

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 18px); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.reveal-up {
  animation: revealUp .75s both cubic-bezier(.2, .8, .2, 1);
}

.reveal-up.delay-1 {
  animation-delay: .12s;
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .route-grid {
    grid-template-columns: 390px minmax(0, 1fr);
  }

  .route-sidebar,
  .tool-sidebar {
    padding: 28px;
  }

  .line-content {
    grid-template-columns: 1fr;
  }

  .line-map-wrap,
  .line-map {
    min-height: 320px;
  }

  #linePlan:not(:has(.empty-state)) {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-container {
    width: min(100% - 24px, 720px);
  }

  .page-shell {
    padding-top: 20px;
  }

  .hero {
    min-height: 132px;
    padding: 4px 8px 20px;
  }

  .route-grid,
  .tool-layout {
    grid-template-columns: 1fr;
  }

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

  .map-panel {
    min-height: 500px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .tool-content {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .line-map-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .app-container {
    width: min(100% - 16px, 540px);
  }

  .navbar {
    min-height: 68px;
  }

  .brand-mark {
    width: 41px;
    height: 41px;
  }

  .hero {
    min-height: 142px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10.5vw, 2.8rem);
  }

  .hero-copy {
    font-size: .94rem;
  }

  .workspace {
    border-radius: 21px;
  }

  .workspace-tabs-wrap {
    padding: 7px;
  }

  .workspace-tabs {
    gap: 3px;
  }

  .workspace-tabs .nav-link {
    min-height: 58px;
    padding: 8px 4px;
    gap: 4px;
    flex-direction: column;
    font-size: .66rem;
    line-height: 1.05;
  }

  .workspace-tabs .nav-link::after {
    bottom: 2px;
  }

  .route-sidebar,
  .tool-sidebar,
  .tool-content {
    padding: 22px 18px;
  }

  .panel-heading h2,
  .tool-sidebar h2 {
    font-size: 1.45rem;
  }

  .date-time-grid {
    grid-template-columns: 1fr;
  }

  .autocomplete-menu {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: 45vh;
    border-radius: 18px;
  }

  .map-panel,
  .map {
    min-height: 420px;
  }

  .map-hint {
    display: none;
  }

  .departure-row {
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }

  .departure-time {
    grid-column: 2;
    text-align: left;
  }

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

  .line-content:has(.line-map-wrap.d-none) {
    padding: 22px 18px;
  }

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

  .modal-header,
  .modal-body {
    padding-inline: 20px;
  }
}

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