:root {
  color-scheme: light;
  --ink: #071326;
  --muted: #667085;
  --line: #e3eaf3;
  --paper: #eef3f7;
  --white: #fff;
  --blue: #2c74df;
  --green: #24ad82;
  --teal: #23b9ad;
  --orange: #ff8a00;
  --purple: #33206f;
  --red: #c81e2b;
  --shadow: 0 18px 42px rgba(12, 24, 44, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(44,116,223,.12), transparent 32%),
    linear-gradient(220deg, rgba(36,173,130,.16), transparent 28%),
    var(--paper);
  color: var(--ink);
  font-family: Arial, "Noto Sans KR", sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; }

.app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: #f6f8fb;
  box-shadow: 0 0 0 1px rgba(7,19,38,.04), var(--shadow);
  padding: 0 16px 92px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -16px;
  padding: 14px 16px 12px;
  background: rgba(246,248,251,.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(36,173,130,.28);
}

.brand strong, .brand em {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand em {
  margin-top: 1px;
  color: var(--green);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.icon-btn.active {
  border-color: rgba(36,173,130,.36);
  background: rgba(36,173,130,.12);
  color: var(--green);
}

.icon-btn[hidden] {
  display: none;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.bus-mode-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.bus-mode-nav button {
  min-width: 0;
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(7,19,38,.08);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(12,24,44,.06);
}

.bus-mode-nav button.active {
  border-color: rgba(36,173,130,.32);
  background: linear-gradient(180deg, #ffffff, #eefbf7);
  color: #08735d;
}

.bus-mode-nav span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(36,173,130,.1);
  font-size: 17px;
  line-height: 1;
}

.bus-mode-nav strong {
  max-width: 100%;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bus-mode-nav em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.mode-feature-panel {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(7,19,38,.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(12,24,44,.06);
}

.mode-feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-feature-head span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.mode-feature-head strong {
  font-size: 15px;
}

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

.mode-feature-grid button {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 8px;
  text-align: left;
}

.mode-feature-grid strong {
  font-size: 13px;
  font-weight: 900;
}

.mode-feature-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.hero-card,
.screen-head.dark {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #10233c, #0a978e);
  color: #fff;
}

.hero-card {
  padding: 24px 18px 18px;
}

.hero-card::after,
.screen-head.dark::after {
  content: "";
  position: absolute;
  right: -44px;
  top: 28px;
  width: 180px;
  height: 104px;
  border-radius: 28px;
  background: rgba(255,255,255,.1);
  transform: rotate(-16deg);
}

.hero-card p,
.screen-head span {
  margin: 0;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .4px;
}

.hero-card h1 {
  margin: 7px 0 18px;
  font-size: 30px;
  letter-spacing: 0;
}

.api-status {
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin: -5px 0 12px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  font-size: 11px;
  font-weight: 900;
}

.api-status[data-mode="ok"] {
  background: rgba(36,173,130,.2);
  color: #eafff7;
}

.api-status[data-mode="warn"] {
  background: rgba(255,184,0,.2);
  color: #fff5d2;
}

.search-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 9px;
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  box-shadow: 0 16px 30px rgba(0,0,0,.16);
}

.search-card label,
.fare-card label {
  display: grid;
  gap: 6px;
}

.search-card label span,
.fare-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.search-card input,
.search-card select,
.fare-card select,
.fare-card input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
}

.terminal-pick-btn {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 46px 10px 12px;
  text-align: left;
}

.terminal-pick-btn strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.terminal-pick-btn em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.quick-terminals {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 0 2px;
}

.quick-terminals button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(36,173,130,.22);
  border-radius: 999px;
  background: rgba(36,173,130,.1);
  color: var(--green);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.initial-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0 2px;
}

.initial-filter button {
  flex: 0 0 auto;
  min-width: 34px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.initial-filter button.active {
  border-color: rgba(36,173,130,.4);
  background: rgba(36,173,130,.12);
  color: var(--green);
}

.swap-btn {
  position: absolute;
  right: 22px;
  top: 55px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.search-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.option-chip,
.category-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.option-chip.active,
.category-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.primary-btn,
.total-card button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.summary-row article,
.section-block,
.route-card,
.fare-card,
.total-card,
.terminal-card {
  border: 1px solid rgba(7,19,38,.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(12,24,44,.06);
}

.summary-row article {
  min-width: 0;
  padding: 11px 10px;
}

.summary-row span,
.section-title span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.summary-row strong,
.summary-row em {
  display: block;
}

.summary-row strong {
  margin: 5px 0 3px;
  font-size: 18px;
}

.summary-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-block {
  padding: 14px;
  margin-top: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-title h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.route-list.compact .route-card:nth-child(n+3) {
  display: none;
}

.route-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  text-align: left;
}

.route-code {
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.route-code.green { background: var(--green); }
.route-code.orange { background: var(--orange); }
.route-code.red { background: var(--red); }
.route-code.purple { background: var(--purple); }

.route-main strong {
  display: block;
  font-size: 14px;
}

.route-main span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.route-side {
  text-align: right;
}

.route-side strong {
  display: block;
  color: var(--green);
  font-size: 15px;
}

.route-side span {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  padding: 5px 7px;
  background: rgba(36,173,130,.1);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.live-strip {
  display: grid;
  gap: 8px;
}

.live-mini {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  background: #f6f9fc;
  padding: 10px;
}

.live-mini strong {
  display: block;
  font-size: 13px;
}

.live-mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.eta {
  color: var(--teal);
  font-size: 21px;
  font-weight: 900;
}

.screen-head {
  margin-bottom: 14px;
  border-radius: 22px;
  background: #fff;
  padding: 20px 18px;
}

.screen-head.dark {
  background: linear-gradient(135deg, #10233c, #1d2b5c);
}

.screen-head span {
  color: var(--green);
}

.screen-head.dark span,
.screen-head.dark p {
  color: rgba(255,255,255,.72);
}

.screen-head h1 {
  margin: 5px 0 7px;
  font-size: 25px;
}

.screen-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.category-tabs button {
  flex: 0 0 auto;
  padding: 0 14px;
}

.live-list {
  display: grid;
  gap: 12px;
}

.list-tools {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 12px;
}

.list-tools button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 900;
}

.list-tools button.active {
  background: var(--ink);
  color: #fff;
}

.city-live-panel {
  border: 1px solid rgba(7,19,38,.08);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  margin: 0 0 12px;
  box-shadow: 0 10px 24px rgba(12,24,44,.06);
}

.city-live-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.city-live-head strong {
  font-size: 15px;
}

.city-live-head span,
.city-live-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.city-live-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.city-live-grid label {
  display: grid;
  gap: 6px;
}

.city-live-grid select,
.city-live-grid input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0 11px;
  font-weight: 900;
}

.city-live-grid select:disabled {
  color: var(--muted);
  opacity: 1;
}

.city-live-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.city-live-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.city-live-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.route-live-results {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.live-loading,
.live-empty-motion {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(36,173,130,.28);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
  color: var(--ink);
}

.live-loading strong,
.live-empty-motion strong {
  font-size: 13px;
}

.live-empty-motion > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.realtime-pending-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(36,173,130,.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f7fbfa);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

.pending-badge {
  justify-self: start;
  border-radius: 999px;
  background: #e7f7f2;
  color: #087964;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
}

.realtime-pending-card strong {
  color: #087964;
  font-size: 11px;
  font-weight: 900;
}

.realtime-pending-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.realtime-pending-card p,
.realtime-pending-card span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
}

.pending-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.pending-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.pending-actions button + button {
  background: #e7f7f2;
  color: #087964;
}

.loading-road {
  position: relative;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #eef7f4, #fff);
}

.loading-road::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 20px;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(7,19,38,.25) 0 13px, transparent 13px 23px);
}

.loading-road span {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 33px;
  height: 20px;
  border-radius: 7px 7px 5px 5px;
  background: var(--green);
  box-shadow: 0 8px 16px rgba(36,173,130,.24);
  animation: loadingBus 2.4s ease-in-out infinite;
}

.loading-road span::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 4px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.78);
}

.loading-road.muted span {
  background: #94a3b8;
  box-shadow: none;
}

@keyframes loadingBus {
  from { transform: translateX(0); }
  50% { transform: translateX(245px); }
  to { transform: translateX(0); }
}

.city-live-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 11px;
  text-align: left;
  color: var(--ink);
}

.city-live-item strong {
  display: block;
  font-size: 13px;
}

.city-live-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.station-live-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  background: #fff;
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 6px 16px rgba(15,23,42,.05);
}

.station-icon {
  display: grid !important;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 !important;
  border-radius: 12px;
  background: #e8f7f2;
  font-size: 20px !important;
}

.station-copy {
  display: grid !important;
  gap: 3px;
  margin: 0 !important;
}

.station-copy strong {
  color: #111827;
  font-size: 14px;
  letter-spacing: 0;
}

.station-copy span,
.station-copy em {
  display: block;
  margin: 0;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.station-live-item > b {
  border-radius: 999px;
  background: #102033;
  color: #fff;
  padding: 7px 10px;
  font-size: 11px;
}

.arrival-live-item {
  overflow: hidden;
  background: #fff;
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 6px 16px rgba(15,23,42,.05);
}

.arrival-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.arrival-route {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  color: var(--ink) !important;
}

.arrival-route em {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #1f6ed8;
  font-style: normal;
  font-size: 17px;
}

.arrival-route strong {
  display: inline;
  font-size: 17px;
  color: #111827;
}

.arrival-route small {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.arrival-live-head b {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(36,173,130,.12);
  color: var(--green);
  padding: 7px 10px;
  font-size: 12px;
}

.arrival-lane {
  position: relative;
  height: 42px;
  margin: 8px 0 2px;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef7f4, #f8fafc);
  overflow: hidden;
}

.lane-road {
  position: absolute;
  left: 34px;
  right: 42px;
  top: 21px;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(7,19,38,.25) 0 12px, transparent 12px 20px);
}

.lane-start,
.lane-stop {
  position: absolute;
  top: 13px;
  z-index: 2;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.lane-start { display: none; }
.lane-stop { right: 10px; color: var(--green); }

.consumer-copy {
  margin-top: 7px !important;
  color: #344054 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.arrival-context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.arrival-context div {
  min-width: 0;
  border-radius: 12px;
  background: #f6f8fb;
  padding: 9px;
}

.arrival-context small,
.arrival-stop-flow small {
  display: block;
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.arrival-context strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 12px;
  line-height: 1.35;
}

.arrival-context em {
  display: block;
  margin-top: 3px;
  color: #08735d;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.arrival-stop-flow {
  margin-top: 9px;
}

.arrival-stop-flow p {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 6px 0 0;
  padding-bottom: 2px;
}

.arrival-stop-flow span {
  flex: 0 0 auto;
  max-width: 124px;
  margin: 0;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
}

.arrival-stop-flow.muted span {
  background: #f8fafc;
  color: #667085;
}

.live-freshness {
  display: block !important;
  margin-top: 10px !important;
  color: #667085 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-align: right;
}

.no-arrival-card {
  border: 1px solid rgba(36,173,130,.22);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.no-arrival-top {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
}

.no-arrival-top > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e8f7f2;
  font-size: 20px;
}

.no-arrival-top strong {
  display: block;
  color: #111827;
  font-size: 15px;
}

.no-arrival-top em {
  display: block;
  margin-top: 3px;
  color: #08735d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.no-arrival-card > p,
.arrival-suggestions p {
  margin: 10px 0 0;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.no-arrival-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.no-arrival-actions button {
  min-height: 38px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 11px;
  background: #102033;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.no-arrival-actions button + button {
  background: #fff;
  color: #102033;
}

.arrival-suggestions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.arrival-suggestions > small {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.suggestion-stop {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15,23,42,.09);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
}

.suggestion-stop strong {
  color: #111827;
  font-size: 13px;
}

.suggestion-stop span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.no-route-card {
  border: 1px solid rgba(36,173,130,.22);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.no-route-card > div:first-child {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
}

.no-route-card > div:first-child span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e8f7f2;
  font-size: 20px;
}

.no-route-card strong {
  display: block;
  color: #111827;
  font-size: 14px;
}

.no-route-card em {
  display: block;
  margin-top: 3px;
  color: #08735d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.no-route-card > p,
.route-suggestions p {
  margin: 10px 0 0;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.no-route-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.no-route-actions button,
.route-suggestions button {
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 11px;
  background: #102033;
  color: #fff;
  padding: 10px;
  font-size: 12px;
  font-weight: 900;
}

.no-route-actions button + button {
  background: #fff;
  color: #102033;
}

.route-suggestions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.route-suggestions > small {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.route-suggestions button {
  display: grid;
  gap: 3px;
  background: #f8fafc;
  color: #111827;
  text-align: left;
}

.route-suggestions button span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
}

.moving-bus {
  position: absolute;
  left: 34px;
  top: 10px;
  z-index: 3;
  width: 31px;
  height: 20px;
  border-radius: 7px 7px 5px 5px;
  background: var(--green);
  box-shadow: 0 8px 16px rgba(36,173,130,.28);
  transform: translateX(calc(var(--progress) - 34px));
  animation: busApproach var(--duration) ease-in-out infinite alternate;
}

.moving-bus::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 4px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.78);
}

.moving-bus::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -3px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 4px 3px, #071326 0 3px, transparent 3px), radial-gradient(circle at calc(100% - 4px) 3px, #071326 0 3px, transparent 3px);
}

.moving-bus em {
  position: absolute;
  right: -4px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff7b0;
}

@keyframes busApproach {
  from { margin-left: -8px; }
  to { margin-left: 8px; }
}

.route-live-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 11px;
  text-align: left;
}

.route-live-item strong,
.route-live-summary strong,
.bus-location-card strong {
  display: block;
  font-size: 13px;
}

.route-live-item span,
.route-live-summary span,
.bus-location-card span,
.route-live-item em,
.bus-location-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.route-live-summary {
  border-radius: 15px;
  background: rgba(36,173,130,.1);
  color: var(--green);
  padding: 12px;
}

.route-live-summary span {
  display: block;
  margin-top: 4px;
}

.route-motion-map {
  position: relative;
  min-height: 156px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(44,116,223,.14), transparent 42%),
    linear-gradient(135deg, #eef7fb, #f6fbf5);
  border: 1px solid rgba(7,19,38,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.route-motion-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(7,19,38,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,19,38,.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.motion-road {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 78px;
  height: 20px;
  border-radius: 999px;
  background: #26384f;
  box-shadow: 0 10px 24px rgba(7,19,38,.18);
}

.motion-road::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 9px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.8) 0 16px, transparent 16px 28px);
}

.motion-stop {
  position: absolute;
  left: var(--x);
  top: 70px;
  z-index: 2;
  width: 10px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 2px solid rgba(44,116,223,.45);
  transform: translateX(-50%);
}

.motion-stop span {
  position: absolute;
  left: 50%;
  top: -26px;
  max-width: 74px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motion-bus {
  position: absolute;
  left: var(--x);
  top: calc(68px + var(--lane) * 24px);
  z-index: 4;
  width: 42px;
  height: 25px;
  border: 0;
  border-radius: 9px 9px 7px 7px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(36,173,130,.32);
  transform: translateX(-50%);
  animation: mapBusFloat 1.9s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.motion-bus span {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 5px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255,255,255,.82);
}

.motion-bus::before,
.motion-bus::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #071326;
}

.motion-bus::before { left: 7px; }
.motion-bus::after { right: 7px; }

.motion-bus em {
  position: absolute;
  left: 50%;
  bottom: -23px;
  max-width: 76px;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes mapBusFloat {
  from { margin-left: -6px; margin-top: 0; }
  to { margin-left: 8px; margin-top: -3px; }
}

.bus-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bus-location-card {
  border-radius: 14px;
  background: #172846;
  color: #fff;
  padding: 11px;
}

.bus-location-card span,
.bus-location-card em {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.72);
}

.route-timeline {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.route-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 9px;
  min-height: 42px;
  padding: 0 0 10px;
}

.route-timeline li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}

.route-timeline li:last-child::before {
  display: none;
}

.route-timeline i {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 3px solid #dbe5ef;
  border-radius: 50%;
  background: #fff;
}

.route-timeline li.has-bus i {
  border-color: var(--green);
  background: var(--green);
}

.route-timeline strong {
  display: block;
  font-size: 12px;
}

.route-timeline em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.route-timeline b {
  align-self: start;
  border-radius: 999px;
  background: rgba(36,173,130,.12);
  color: var(--green);
  padding: 4px 7px;
  font-size: 10px;
}

.live-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #142033 0%, #101827 100%);
  color: #fff;
  padding: 16px;
}

.live-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.live-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.live-card p {
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.arrival {
  margin: 14px 0 10px;
  color: var(--teal);
  font-size: 34px;
  font-weight: 900;
}

.arrival span {
  color: #fff;
  font-size: 15px;
}

.seat-bars {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  margin-top: 12px;
}

.seat-bars i {
  height: 12px;
  border-radius: 3px;
  background: rgba(36,173,130,.85);
}

.seat-bars i.dim {
  background: rgba(255,255,255,.16);
}

.live-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
}

.live-route-title {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.live-route-title span {
  min-width: 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.live-route-title i {
  position: relative;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
}

.live-route-title i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255,255,255,.7);
  border-right: 2px solid rgba(255,255,255,.7);
  transform: rotate(45deg);
}

.live-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.live-info-grid div {
  min-width: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  padding: 9px;
}

.live-info-grid div:nth-child(3) {
  grid-column: 1 / -1;
}

.live-info-grid small,
.live-stop-strip small {
  display: block;
  color: rgba(255,255,255,.62);
  font-size: 10px;
  font-weight: 900;
}

.live-info-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 12px;
}

.live-stop-strip {
  margin-top: 10px;
}

.live-stop-strip p {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 6px 0 0;
}

.live-stop-strip span {
  flex: 0 0 auto;
  max-width: 128px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.9);
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
}

.fare-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.total-card {
  margin-top: 12px;
  padding: 20px;
  background: var(--green);
  color: #fff;
}

.total-card > span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}

.total-card > strong {
  display: block;
  margin: 8px 0;
  font-size: 42px;
}

.total-card p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 900;
}

.fare-line {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.22);
  padding: 11px 0;
  font-size: 13px;
  font-weight: 900;
}

.total-card button {
  margin-top: 18px;
  background: #fff;
  color: var(--green);
}

.terminal-search {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.terminal-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.terminal-search input,
.terminal-search select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  font-weight: 900;
}

.terminal-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.terminal-filter-panel {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
}

.terminal-filter-row,
.terminal-initial-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.terminal-filter-row button,
.terminal-initial-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475467;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
}

.terminal-filter-row button.active,
.terminal-initial-row button.active {
  border-color: #102033;
  background: #102033;
  color: #fff;
}

.terminal-list {
  display: grid;
  gap: 12px;
}

.airport-guide {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(36,173,130,.2);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f2fbf8 100%);
  padding: 14px;
}

.airport-guide-head {
  display: grid;
  gap: 4px;
}

.airport-guide-head span {
  color: #08735d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.airport-guide-head strong {
  color: #071326;
  font-size: 18px;
  font-weight: 950;
}

.airport-guide-head p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.airport-check-strip {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 6px;
  border-radius: 14px;
  background: #102033;
  padding: 10px;
  color: #fff;
}

.airport-check-strip span {
  font-size: 11px;
  font-weight: 950;
}

.airport-check-strip b {
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 900;
}

.airport-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.airport-guide-card {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.airport-guide-card b {
  color: #071326;
  font-size: 13px;
  font-weight: 950;
}

.airport-guide-card span {
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
}

.airport-guide-card em {
  color: #08735d;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.airport-route-card-grid {
  display: grid;
  gap: 8px;
}

.airport-route-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.airport-route-card span {
  grid-column: 1 / -1;
  color: #08735d;
  font-size: 10px;
  font-weight: 950;
}

.airport-route-card strong {
  display: grid;
  place-items: center;
  width: 54px;
  height: 36px;
  border-radius: 12px;
  background: #2476df;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.airport-route-card b {
  color: #071326;
  font-size: 13px;
  font-weight: 950;
}

.airport-route-card em {
  grid-column: 2;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.airport-route-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.airport-route-chips button {
  flex: 0 0 auto;
  min-width: 86px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: #102033;
  color: #fff;
  padding: 9px 12px;
  text-align: left;
}

.airport-route-chips strong {
  font-size: 13px;
  font-weight: 950;
}

.airport-route-chips span {
  max-width: 120px;
  overflow: hidden;
  color: rgba(255,255,255,.76);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 850;
}

.airport-terminal-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.airport-terminal-guide button {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 3px 10px;
  border: 1px solid rgba(36,173,130,.18);
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
  text-align: left;
}

.airport-terminal-guide strong {
  grid-row: span 2;
  align-self: center;
  color: #071326;
  font-size: 13px;
  font-weight: 950;
}

.airport-terminal-guide span {
  color: #08735d;
  font-size: 11px;
  font-weight: 950;
}

.airport-terminal-guide em {
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.city-bus-guide {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(36,173,130,.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(36,173,130,.08), transparent 56%),
    #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.city-bus-guide-head {
  display: grid;
  gap: 4px;
}

.city-bus-guide-head span {
  color: #08735d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
}

.city-bus-guide-head strong {
  color: #071326;
  font-size: 18px;
  font-weight: 950;
}

.city-bus-guide-head p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.city-bus-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.city-bus-guide-card {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.city-bus-guide-card b {
  color: #071326;
  font-size: 13px;
  font-weight: 950;
}

.city-bus-guide-card span {
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
}

.city-bus-guide-card em {
  justify-self: start;
  border-radius: 999px;
  background: #e8f7f2;
  color: #08735d;
  padding: 5px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.city-route-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.city-route-chips button {
  flex: 0 0 auto;
  min-width: 94px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: #102033;
  color: #fff;
  padding: 9px 12px;
  text-align: left;
}

.city-route-chips strong {
  font-size: 13px;
  font-weight: 950;
}

.city-route-chips span {
  max-width: 118px;
  overflow: hidden;
  color: rgba(255,255,255,.76);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 850;
}

.city-mini .route-code {
  display: grid;
  place-items: center;
  color: #fff;
}

.terminal-card {
  margin-bottom: 12px;
  padding: 18px;
  border-top: 4px solid var(--blue);
}

.terminal-card.green {
  border-top-color: var(--green);
}

.terminal-card strong {
  display: block;
  font-size: 20px;
}

.terminal-card p {
  color: var(--muted);
  line-height: 1.45;
}

.terminal-card dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  margin: 14px 0 0;
  border-radius: 14px;
  background: #f6f9fc;
  padding: 14px;
}

.terminal-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.terminal-card dd {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
}

.terminal-more {
  width: 100%;
  min-height: 44px;
  margin: 4px 0 84px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #102033;
  font-size: 13px;
  font-weight: 900;
}

.terminal-more[hidden] {
  display: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 30;
  width: min(calc(100% - 24px), 398px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(7,19,38,.08);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 30px rgba(12,24,44,.18);
  backdrop-filter: blur(18px);
  padding: 7px;
}

.bottom-nav button {
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #7a8494;
  font-size: 10px;
  font-weight: 900;
}

.bottom-nav button.active {
  background: rgba(36,173,130,.12);
  color: var(--green);
}

.bottom-nav svg {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 40;
  width: min(calc(100% - 32px), 380px);
  transform: translate(-50%, 18px);
  border-radius: 16px;
  background: rgba(7,19,38,.94);
  color: #fff;
  padding: 13px 16px;
  box-shadow: 0 16px 30px rgba(12,24,44,.25);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.terminal-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.terminal-picker.open {
  display: block;
}

.terminal-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,19,38,.46);
}

.terminal-picker-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  max-height: min(82vh, 720px);
  transform: translateX(-50%);
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  border-radius: 24px 24px 0 0;
  background: #fff;
  padding: 16px;
  box-shadow: 0 -18px 48px rgba(7,19,38,.22);
}

.terminal-picker-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.terminal-picker-sheet header span,
.picker-section-title,
.picker-count,
.picker-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.terminal-picker-sheet header strong {
  display: block;
  margin-top: 2px;
  font-size: 21px;
}

.picker-close {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.picker-search {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.picker-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 0 14px;
  font-weight: 900;
}

.picker-section-title {
  margin: 4px 0 8px;
}

.picker-recents {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.picker-recents button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(44,116,223,.2);
  border-radius: 999px;
  background: rgba(44,116,223,.08);
  color: var(--blue);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}

.picker-initials {
  margin-bottom: 10px;
}

.picker-count {
  margin-bottom: 8px;
}

.picker-results {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 4px;
}

.picker-result {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fafc;
  padding: 12px;
  text-align: left;
}

.picker-result strong {
  font-size: 15px;
}

.picker-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.picker-result em {
  justify-self: start;
  border-radius: 999px;
  background: rgba(36,173,130,.1);
  color: var(--green);
  padding: 4px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

@media (min-width: 700px) {
  body {
    display: grid;
    place-items: start center;
  }

  .app {
    min-height: 100vh;
  }
}

/* Mature mobile-app visual refresh */
:root {
  --ink: #121826;
  --muted: #697386;
  --line: #d9e0ea;
  --paper: #edf1f5;
  --green: #139c7d;
  --teal: #0e827b;
  --blue: #2563c9;
  --shadow: 0 8px 22px rgba(18, 24, 38, .08);
}

body {
  background: #e9eef3;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

.app {
  background: #f7f8fa;
  box-shadow: 0 0 0 1px rgba(18,24,38,.08);
  padding: 0 14px 118px;
}

.app-header {
  margin: 0 -14px;
  padding: 12px 16px 10px;
  background: rgba(247,248,250,.96);
  border-bottom: 1px solid rgba(18,24,38,.06);
  backdrop-filter: blur(14px);
}

.brand {
  gap: 9px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #1da783;
  box-shadow: none;
  font-size: 0;
}

.brand-mark::before {
  content: "🚌";
  font-size: 20px;
  line-height: 1;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand em {
  color: #16896f;
  letter-spacing: .8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}

.hero-card,
.screen-head.dark {
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 16px;
}

.screen-head.dark::after {
  display: none;
}

.hero-card::before {
  content: "🚌";
  position: absolute;
  right: 17px;
  top: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef7f4;
  font-size: 23px;
}

.hero-card::after {
  content: "🚏";
  position: absolute;
  right: 64px;
  top: 23px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3f6fa;
  font-size: 15px;
  transform: none;
}

.hero-card p,
.screen-head span,
.screen-head.dark span {
  color: #16896f;
  font-size: 11px;
  letter-spacing: .2px;
}

.hero-card h1 {
  margin: 5px 0 12px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  padding-right: 76px;
}

.api-status {
  margin: 0 0 12px;
  border: 1px solid rgba(19,156,125,.18);
  border-radius: 999px;
  background: #ecf8f5;
  color: #08735d;
  padding: 6px 9px;
  font-size: 11px;
}

.api-status[data-mode="ok"] {
  background: #ecf8f5;
  color: #08735d;
}

.api-status[data-mode="warn"] {
  background: #fff7e8;
  color: #a46100;
}

.search-card {
  gap: 10px;
  border-top: 1px solid rgba(18,24,38,.08);
  border-radius: 0;
  background: transparent;
  padding: 13px 0 0;
  box-shadow: none;
}

.search-card label span,
.fare-card span {
  color: #596579;
  font-size: 11px;
}

.search-card label:first-of-type > span::before {
  content: "🚌 ";
}

.search-card label:nth-of-type(2) > span::before {
  content: "🚏 ";
}

.terminal-pick-btn {
  min-height: 55px;
  border-color: #d8e1ec;
  border-radius: 10px;
  background: #fff;
  padding: 10px 44px 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.terminal-pick-btn strong {
  font-size: 16px;
}

.terminal-pick-btn em {
  margin-top: 1px;
  color: #697386;
  font-size: 10px;
}

.swap-btn {
  right: 10px;
  top: 62px;
  width: 34px;
  height: 34px;
  background: #121826;
  box-shadow: 0 6px 14px rgba(18,24,38,.18);
}

.quick-terminals {
  gap: 6px;
  padding: 0 0 1px;
  scrollbar-width: none;
}

.quick-terminals::-webkit-scrollbar,
.picker-recents::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar,
.list-tools::-webkit-scrollbar {
  display: none;
}

.quick-terminals button {
  min-height: 30px;
  border: 1px solid #d7e0ea;
  border-radius: 9px;
  background: #fff;
  color: #23715f;
  padding: 0 10px;
  font-size: 11px;
}

.search-options {
  gap: 8px;
}

.option-chip,
.category-tabs button,
.list-tools button {
  min-height: 34px;
  border-radius: 10px;
  background: #fff;
  color: #4b5565;
}

.option-chip.active,
.category-tabs button.active,
.list-tools button.active {
  border-color: #121826;
  background: #121826;
  color: #fff;
}

.primary-btn,
.city-live-actions button {
  height: 47px;
  border-radius: 10px;
  background: #139c7d;
  box-shadow: none;
}

.summary-row {
  gap: 0;
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.summary-row article {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 10px;
}

.summary-row article + article {
  border-left: 1px solid rgba(18,24,38,.08);
}

.summary-row span,
.section-title span {
  color: #6b7280;
  font-size: 10px;
}

.summary-row strong {
  font-size: 17px;
}

.section-block,
.fare-card,
.total-card,
.terminal-card,
.city-live-panel {
  border-color: rgba(18,24,38,.08);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.section-block {
  padding: 13px;
  margin-top: 10px;
}

.section-title {
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 17px;
}

.text-btn {
  color: #08735d;
}

.route-card {
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  border-radius: 11px;
  box-shadow: none;
  padding: 11px;
}

.route-code {
  height: 40px;
  border-radius: 9px;
  font-size: 13px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0,0,0,.18);
}

.live-mini .route-code,
.route-card .route-code {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.route-code.blue { background: #1f6ed8; }
.route-code.green { background: #0f9878; }
.route-code.orange { background: #e87500; }
.route-code.red { background: #bd1f2a; }
.route-code.purple { background: #43268b; }

.route-main strong {
  font-size: 13px;
}

.route-main strong::before {
  content: "🚌 ";
  font-size: 13px;
}

.route-side span {
  border-radius: 7px;
}

.screen-head {
  margin-bottom: 12px;
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.screen-head.dark p {
  color: var(--muted);
}

.screen-head h1 {
  font-size: 22px;
}

#screen-live .screen-head h1::before {
  content: "🚌 ";
}

#screen-routes .screen-head h1::before {
  content: "🛣️ ";
}

#screen-terminal .screen-head h1::before {
  content: "🚏 ";
}

.live-card,
.bus-location-card {
  border-radius: 12px;
  background: #172033;
}

.live-card h3::before,
.bus-location-card strong::before,
.route-live-summary strong::before,
.arrival-live-head strong::before {
  content: "🚌 ";
}

.arrival-route strong::before {
  content: "";
}

.terminal-card > strong::before {
  content: "🚏 ";
}

.route-motion-map {
  border-radius: 12px;
  background: #f4f7fa;
}

.arrival-lane,
.loading-road {
  border-radius: 10px;
}

.bottom-nav {
  bottom: 0;
  width: min(100%, 430px);
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -10px 28px rgba(18,24,38,.14);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav button {
  min-height: 54px;
  border-radius: 14px;
  font-size: 10px;
}

.bottom-nav button.active {
  background: #eaf6f3;
  color: #08735d;
}

.terminal-picker-sheet {
  border-radius: 18px 18px 0 0;
}

/* App layout alignment pass */
html,
body {
  width: 100%;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding-right: 16px;
  padding-left: 16px;
  padding-bottom: calc(122px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.app-header {
  margin-right: -16px;
  margin-left: -16px;
  padding-right: 16px;
  padding-left: 16px;
}

.screen,
.hero-card,
.screen-head,
.section-block,
.city-live-panel,
.fare-card,
.total-card,
.terminal-card {
  width: 100%;
}

.hero-card {
  padding: 18px 16px;
}

.search-card {
  width: 100%;
  gap: 12px;
}

.terminal-pick-btn {
  display: grid;
  align-items: center;
  min-width: 0;
}

.terminal-pick-btn strong,
.terminal-pick-btn em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swap-btn {
  right: 12px;
  top: 66px;
  z-index: 5;
}

.quick-terminals,
.category-tabs,
.list-tools,
.terminal-filter-row,
.terminal-initial-row,
.picker-recents,
.picker-initials {
  margin-right: -2px;
  margin-left: -2px;
  padding-right: 2px;
  padding-left: 2px;
}

.search-options,
.summary-row,
.counter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-chip,
.category-tabs button,
.list-tools button,
.city-live-actions button,
.terminal-filter-row button,
.terminal-initial-row button,
.bottom-nav button {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-btn,
.city-live-actions button {
  justify-content: center;
}

.summary-row article {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.summary-row span,
.summary-row strong,
.summary-row em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-title,
.city-live-head,
.live-top,
.arrival-live-head,
.route-live-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title > div,
.city-live-head > strong,
.route-main,
.arrival-route,
.terminal-card p {
  min-width: 0;
}

.section-title h2,
.route-main strong,
.route-main span,
.arrival-route strong,
.arrival-route span,
.terminal-card strong,
.terminal-card p {
  overflow-wrap: anywhere;
}

.text-btn,
.route-side,
.live-top > strong {
  flex: 0 0 auto;
}

.route-card,
.live-mini,
.picker-result {
  align-items: center;
}

.route-card {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.live-mini {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  width: 100%;
}

.live-mini > span:nth-child(2),
.live-mini strong,
.live-mini span span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-live-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.city-live-grid label,
.fare-card label,
.terminal-search {
  min-width: 0;
}

.city-live-grid input,
.city-live-grid select,
.fare-card input,
.fare-card select,
.terminal-search input,
.terminal-search select,
.terminal-pick-btn {
  font-size: 15px;
}

.city-live-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.route-live-panel .city-live-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-card dl {
  grid-template-columns: minmax(76px, .8fr) minmax(0, 1.2fr);
}

.terminal-card dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bottom-nav {
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  transform: none;
  border-right: 0;
  border-left: 0;
  border-bottom: 0;
}

.bottom-nav button {
  justify-items: center;
  align-content: center;
}

.bottom-nav svg {
  margin: 0 auto;
}

.toast {
  bottom: calc(78px + env(safe-area-inset-bottom));
}

@media (max-width: 360px) {
  .app {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-header {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-card h1 {
    font-size: 23px;
  }

  .summary-row strong {
    font-size: 15px;
  }

  .route-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .route-side {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: flex;
    justify-content: space-between;
  }

  .bottom-nav button {
    font-size: 9px;
  }
}

@media (max-width: 700px) {
  body {
    display: block;
  }

  .app {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    transform: none;
  }

  .summary-row {
    width: 100%;
  }
}

@media (min-width: 701px) {
  body {
    display: block;
  }

  .app {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    transform: none;
  }
}

/* Optical spacing pass */
.app-header {
  min-height: 68px;
  padding-top: 16px;
  padding-bottom: 14px;
}

.brand {
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.brand-mark::before {
  display: block;
  line-height: 1;
  transform: translateY(1px);
}

.brand strong {
  font-size: 17px;
  line-height: 1.25;
}

.brand em {
  margin-top: 3px;
  line-height: 1.2;
}

.hero-card {
  margin-top: 2px;
}

.terminal-pick-btn {
  min-height: 60px;
  padding-top: 12px;
  padding-bottom: 12px;
  row-gap: 6px;
}

.terminal-pick-btn strong {
  line-height: 1.25;
}

.terminal-pick-btn em {
  line-height: 1.25;
}

.search-options {
  gap: 10px;
}

.option-chip,
.category-tabs button,
.list-tools button {
  min-height: 38px;
  padding-right: 12px;
  padding-left: 12px;
  line-height: 1.2;
}

.primary-btn,
.city-live-actions button,
.terminal-more {
  min-height: 52px;
  gap: 11px;
  line-height: 1.25;
}

.primary-btn svg {
  flex: 0 0 20px;
}

.summary-row article {
  min-height: 86px;
  row-gap: 4px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.summary-row strong {
  line-height: 1.2;
}

.route-card,
.live-mini,
.city-live-item,
.terminal-card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.route-card {
  gap: 13px;
}

.route-code {
  align-self: center;
}

.city-live-grid {
  gap: 10px;
}

.city-live-actions {
  gap: 10px;
}

.bottom-nav {
  padding-top: 10px;
  padding-right: 12px;
  padding-left: 12px;
}

.bottom-nav button {
  min-height: 62px;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.2;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.bottom-nav span {
  display: block;
  line-height: 1.2;
}

/* Bus type IA pass */
.app {
  width: min(100vw, 430px);
  max-width: 430px;
  margin-right: auto;
  margin-left: auto;
}

.bottom-nav {
  left: 50%;
  right: auto;
  width: min(100vw, 430px);
  max-width: 430px;
  transform: translateX(-50%);
}

.bus-mode-nav {
  position: relative;
  top: auto;
  z-index: 19;
  width: auto;
  margin: 0 0 12px;
  padding: 2px 0 10px;
  background: transparent;
  backdrop-filter: none;
  overflow: hidden;
}

.bus-mode-nav button {
  padding-right: 4px;
  padding-left: 4px;
}

.mode-feature-panel {
  overflow: hidden;
}

.search-card.mode-live-search > label:not(.mode-search-field),
.search-card.mode-live-search .swap-btn,
.search-card.mode-live-search .quick-terminals {
  display: none;
}

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

.mode-search-field {
  display: grid;
  gap: 6px;
}

.mode-search-field input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 17px;
  font-weight: 900;
}

.mode-search-shortcuts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mode-search-shortcuts button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(36,173,130,.22);
  border-radius: 999px;
  background: rgba(36,173,130,.1);
  color: #08735d;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}

.mode-guide {
  text-align: left;
}

@media (max-width: 360px) {
  .bus-mode-nav {
    gap: 6px;
  }

  .bus-mode-nav button {
    min-height: 68px;
  }

  .bus-mode-nav strong {
    font-size: 12px;
  }

  .mode-feature-grid {
    grid-template-columns: 1fr;
  }
}
