@font-face {
  font-family: 'LTAIdentity';
  src: url('assets/LTAIdentity.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #D7181C;
  --yellow: #FFD000;
  --blue: #0B1F5F;
  --blue-mid: #1A3399;
  --cyan: #00C8E0;
  --green: #00E07A;
  --white: #FFFEF5;
  --ink: #08101A;
  --card-bg: #0F1E3A;
  --card-border: #1E3560;
  --muted: #6A85B0;
}

footer {
  text-align: center;
  padding: 24px 20px 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer a:hover {
  color: var(--yellow);
}

body.light {
  --card-bg: #F4F6FA;
  --card-border: #D8DEF0;
  --muted: #6A7A9A;
  --white: #08101A;
  --ink: #FFFEF5;
  --green: #007A40;
  --yellow: #B8860B;
  background: #FFFFFF;
  color: #08101A;
}

body.light::before {
  display: none;
}

body.light .live-date {
  color: #6A7A9A;
}

body.light .search-tabs {
  background: #E0E8F8;
  border-color: #C8D4EE;
}

body.light .search-tab:not(.active) {
  color: #000000;
}

body.light .search-tab:not(.active):hover {
  color: #D7181C;
}

body.light .search-tab.active {
  color: #FFFFFF;
}

body.light .stop-input {
  background: #FFFFFF;
  border-color: #C8D4EE;
  color: #08101A;
}

body.light .stop-input:focus {
  border-color: #D7181C;
  box-shadow: 0 0 0 3px #D7181C15;
}

body.light .stop-input::placeholder {
  color: #9AAAC0;
}

body.light .stop-name-results {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .sn-item {
  border-color: #E8EDF8;
}

body.light .sn-item:hover,
.light .sn-item.highlighted {
  background: #EEF4FF;
}

body.light .sn-name {
  color: #08101A;
}

body.light .sn-road {
  color: #6A7A9A;
}

body.light .sn-arrow {
  color: #9AAAC0;
}

body.light .sn-empty {
  color: #9AAAC0;
}

body.light .near-me-btn {
  background: linear-gradient(135deg, #1A3399, #0B2F7F);
  border-color: #2A4A99;
  color: #FFFFFF;
}

body.light .near-me-btn .btn-sub {
  color: rgba(255, 255, 255, .7);
}

body.light .int-card {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .int-card:hover {
  background: #FFF8E0;
  border-color: #FFD000;
}

body.light .int-name {
  color: #08101A;
}

body.light .int-code {
  color: #6A7A9A;
}

body.light .nearby-stop {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .nearby-stop:hover {
  background: #EEF4FF;
  border-color: #00C8E0;
}

body.light .nearby-rank {
  color: #C8D4EE;
}

body.light .nearby-stop:hover .nearby-rank {
  color: #00C8E0;
}

body.light .nearby-stop-name {
  color: #08101A;
}

body.light .nearby-title {
  color: #0B6080;
}

body.light .bus-card {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .bus-card:hover {
  box-shadow: 0 8px 32px #00000018;
}

body.light .card-middle {
  background: #FFFFFF;
}

body.light .mins-big {
  color: #08101A;
}

body.light .mins-unit {
  color: #6A7A9A;
}

body.light .next-pill {
  color: #08101A;
}

body.light .sun-panel {
  border-color: #C8D4EE;
}

body.light .sun-inner {
  background: #F8FAFF;
}

body.light .bus-shell {
  background: #E8EDF8;
  border-color: #C8D4EE;
}

body.light .bus-windshield {
  background: #D0DAEA;
  border-color: #C8D4EE;
}

body.light .s {
  background: #E8EDF8;
  border-color: #C8D4EE;
}

body.light .diagram-legend {
  color: #6A7A9A;
}

body.light .leg-row {
  color: #6A7A9A;
}

body.light .rec-banner.good {
  background: linear-gradient(135deg, #00E07A12, #00E07A06);
  border-color: #00E07A40;
}

body.light .rec-banner.any {
  background: linear-gradient(135deg, #00C8E012, #00C8E006);
  border-color: #00C8E040;
}

body.light .rec-banner.hot {
  background: linear-gradient(135deg, #FFD00012, #FFD00006);
  border-color: #FFD00040;
}

body.light .stop-hero .stop-title {
  color: #08101A;
}

body.light .stop-road-block {
  color: #6A7A9A;
}

body.light .results-label {
  color: #6A7A9A;
}

body.light .refresh-btn {
  border-color: #C8D4EE;
  color: #6A7A9A;
}

body.light .refresh-btn:hover {
  border-color: #D7181C;
  color: #D7181C;
}

body.light .route-stop-card {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .route-stop-card:hover {
  background: #EEF4FF;
  border-color: #00C8E0;
}

body.light .route-connector {
  background: #C8D4EE;
}

body.light .route-dot {
  background: #C8D4EE;
  border-color: #9AAAC0;
}

body.light .route-stop-name {
  color: #08101A;
}

body.light .route-stop-code {
  color: #6A7A9A;
}

body.light .route-dist-km {
  color: #08101A;
}

body.light .route-seq {
  color: #C8D4EE;
}

body.light .dir-btn {
  background: #FFFFFF;
  border-color: #C8D4EE;
  color: #6A7A9A;
}

body.light .dir-btn.active {
  background: #D7181C15;
  border-color: #D7181C;
  color: #08101A;
}

body.light .dir-btn:hover:not(.active) {
  border-color: #9AAAC0;
  color: #08101A;
}

body.light .rsp-card {
  background: linear-gradient(135deg, #FFF8E0, #FFF4D0 50%, #EEF4FF);
  border-color: #E0C060;
}

body.light .rsp-title {
  color: #8A6A00;
}

body.light .rsp-rec {
  color: #08101A;
}

body.light .rsp-sub {
  color: #8A6A00;
}

body.light .rsp-strip {
  background: #00000008;
}

body.light .rsp-any {
  background: #00000010;
}

body.light .rsp-leg-item {
  color: #6A7A9A;
}

body.light .plan-trip-wrap {
  background: #F0F4FF;
}

body.light .plan-stop-input {
  background: #FFFFFF;
  border-color: #C8D4EE;
  color: #08101A;
}

body.light .plan-stop-input:focus {
  border-color: #00C8E0;
}

body.light .plan-stop-dropdown {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .plan-drop-item {
  border-color: #E8EDF8;
  color: #08101A;
}

body.light .plan-drop-item:hover {
  background: #EEF4FF;
}

body.light .plan-drop-name {
  color: #08101A;
}

body.light .trip-result-card {
  background: linear-gradient(135deg, #E8FFF4, #EEF4FF);
  border-color: #00E07A50;
}

body.light .trip-result-card.sunny {
  background: linear-gradient(135deg, #FFF4E8, #EEF4FF);
  border-color: #FF444450;
}

body.light .trip-result-map-wrap {
  border-color: #C8D4EE;
}

body.light .trip-rec-side {
  color: #08101A;
}

body.light .trip-seg-strip {
  background: #00000008;
}

body.light .trip-stops-row {
  color: #6A7A9A;
}

body.light .rs-arrival-row {
  border-color: #E8EDF8;
}

body.light .rs-arrivals-placeholder {
  color: #6A7A9A;
}

body.light .rs-timing-grid {
  border-color: #E8EDF8;
}

body.light .rs-timing-val {
  color: #08101A;
}

body.light .stop-timing-panel {
  border-color: #C8D4EE;
}

body.light .error-card {
  background: #FF22271A;
  border-color: #FF222740;
  color: #AA0000;
}

body.light .loading-txt {
  color: #6A7A9A;
}

body.light .panel-title {
  color: #C08000;
}

body.light .panel-title::after {
  background: #C8D4EE;
}

body.light #map-legend-box {
  background: rgba(255, 255, 255, .95);
  border-color: #D8DEF0;
}

body.light #map-legend-box span {
  color: #08101A;
}

body.light #map-legend-box .map-legend-item-label {
  color: #08101A;
}

body.light .trip-sun-icon {
  filter: drop-shadow(0 0 4px rgba(180, 120, 0, .8)) brightness(0.75);
}

body.light footer {
  color: #9AAAC0;
}

body.light .clear-nearby {
  border-color: #C8D4EE;
  color: #9AAAC0;
}

body.light .rs-action-btn {
  background: #E8EDF8;
  border-color: #C8D4EE;
  color: #08101A;
}

body.light .sun-toggle-btn {
  background: #FFD00020;
  border-color: #FFD00050;
  color: #9A7000;
}

body.light .sun-toggle-btn:hover {
  background: #FFD00035;
  border-color: #FFD000;
}

/* Route stop arrivals */
body.light .rs-time-main {
  color: #08101A;
}

body.light .rs-time-main.arriving {
  color: #08101A;
}

body.light .rs-time-next {
  color: #6A7A9A;
}

body.light .rs-loop-label {
  color: #000000;
}

body.light .rs-svc-col {
  color: #FFFFFF;
}

body.light .rs-timing-day {
  color: #6A7A9A;
}

body.light .rs-timing-head {
  color: #9AAAC0;
}

/* Route hero & service info */
body.light .route-meta {
  color: #6A7A9A;
}

body.light .route-stops-label {
  color: #6A7A9A;
}

body.light .route-dist-tag {
  color: #6A7A9A;
}

body.light .rs-chevron {
  color: #9AAAC0;
}

body.light .rs-chevron.rotated {
  color: #00A0B0;
}

body.light .route-stop-item:hover .route-stop-card {
  background: #EEF4FF;
  border-color: #00C8E0;
}

/* Journey panel tabs */
body.light #journey-details-wrap {
  border-color: #D8DEF0;
}

body.light #journey-details-wrap button:not(.plan-go-btn) {
  color: #6A7A9A;
}

/* Freq pills */
body.light .svc-freq-pill {
  background: #00000008;
  border-color: #D8DEF0;
  color: #08101A;
}

body.light .svc-freq-pill-label {
  color: #6A7A9A;
}

/* Stop timing */
body.light .stop-timing-inner {
  background: #FFFFFF;
}

/* Nearby extras */
body.light .nearby-sub {
  color: #9AAAC0;
}

body.light .nearby-stop-code {
  color: #6A7A9A;
}

body.light .nearby-dist-lbl {
  color: #9AAAC0;
}

body.light .nearby-walk {
  color: #9AAAC0;
}

/* Plan trip */
body.light .plan-stop-label {
  color: #6A7A9A;
}

body.light .plan-drop-seq {
  color: #9AAAC0;
}

body.light .plan-drop-code {
  color: #9AAAC0;
}

/* Trip result */
body.light .trip-rec-detail {
  color: #6A7A9A;
}

/* Dir btn dest */
body.light .dir-btn-dest {
  color: #08101A;
}

body.light .dir-btn-loop {
  color: #007A90;
}

/* rec-strong, rec-dir in light banners */
body.light .rec-banner {
  color: #08101A;
}

/* Bus type tag opacity */
body.light .bus-type-tag {
  opacity: 1;
}

/* Card right */
body.light .bus-num {
  color: #FFFFFF;
}

body.light .bus-num-from {
  color: #FFFFFF;
}

body.light .bus-num-to {
  color: #FFFFFF;
}

/* Search eyebrow */
body.light .search-eyebrow {
  color: #08101A;
}

/* Interchange sub */
body.light .interchange-header {
  color: #007A90;
}

/* Theme toggle in light */
body.light .theme-toggle {
  border-color: #D8DEF0;
  color: #6A7A9A;
}

body.light .theme-toggle:hover {
  border-color: #D7181C;
  color: #D7181C;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.theme-toggle:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 480px) {
  #app-logo {
    height: 48px;
  }

  .logo-sub {
    display: none;
  }

  .live-date {
    font-size: 10px;
  }

  .auth-btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  .auth-name {
    display: none;
  }

  .live-date {
    display: none;
  }

  .theme-toggle {
    font-size: 11px;
    padding: 4px 8px;
  }

  header {
    padding: 10px 12px 0;
    gap: 6px;
  }

  .header-right {
    padding-top: 2px;
  }

  .search-zone {
    margin: 14px 14px 0;
  }

  .results-area {
    margin: 18px 14px 0;
  }

  .stop-input {
    font-size: 18px;
    padding: 12px 14px;
    letter-spacing: 1px;
  }

  .stop-input.text-mode {
    font-size: 14px;
  }

  .go-btn {
    width: 50px;
    min-height: 50px;
  }

  /* Shrink service-number column on mobile */
  .bus-num-col {
    width: 100px !important;
    max-width: 100px !important;
    min-width: 100px !important;
    padding: 8px 6px !important;
  }

  .bus-num-from,
  .bus-num-to {
    display: block !important;
    font-size: 7px !important;
    max-width: 88px !important;
  }

  .bus-num {
    font-size: 20px;
  }

  /* Tighten timing middle */
  .card-middle {
    padding: 6px 2px 6px 6px !important;
    gap: 1px;
  }

  .arrival-row {
    gap: 0;
  }

  .first-timing {
    min-width: 0 !important;
    width: 58px;
    flex-shrink: 0;
    gap: 0;
  }

  .mins-big {
    font-size: 20px !important;
  }

  .mins-unit {
    font-size: 10px;
    margin-right: 0;
  }

  /* next-pill: tight fixed width */
  .next-pill {
    min-width: 0 !important;
    width: 52px !important;
    padding: 2px 2px !important;
    font-size: 10px !important;
    gap: 0 !important;
  }

  /* Shrink card-right buttons */
  .card-right {
    padding: 6px 4px 6px 0 !important;
    gap: 3px;
    min-width: 0;
    flex-shrink: 0;
    width: auto;
  }

  .sun-toggle-btn {
    font-size: 9px;
    padding: 4px 5px;
    white-space: nowrap;
  }

  .load-chip {
    padding: 3px 5px;
    font-size: 8px;
  }

  .bus-card {
    margin-bottom: 8px;
  }

  /* Road name: hide inline, show as block below stop name */
  .stop-road-inline {
    display: none;
  }

  .stop-road-block {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Other layout */
  .interchange-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .route-stop-card {
    padding: 8px 10px;
  }

  .route-stop-name {
    font-size: 13px;
  }

  .stop-title {
    font-size: 21px;
  }

  .sun-inner {
    padding: 14px 14px 16px;
  }

  .diagram-wrap {
    gap: 10px;
  }

  .s {
    width: 22px;
    height: 18px;
  }

  .rs-arrival-row {
    grid-template-columns: 42px 1fr 1fr 1fr;
  }

  .rs-time-main {
    font-size: 15px;
  }

  .rs-svc-col {
    font-size: 11px;
    padding: 3px 4px;
    min-width: 60px;
  }

  .search-eyebrow {
    font-size: 30px;
  }

  .near-me-btn {
    font-size: 15px;
    padding: 11px 14px;
  }

  .int-card {
    padding: 9px 7px;
  }

  .int-name {
    font-size: 12px;
  }

  .plan-inputs-row {
    flex-direction: column;
    gap: 6px;
  }

  .plan-inputs-row .go-btn.slim {
    display: none;
  }

  .plan-inputs-row input {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .bus-num-col {
    width: 90px !important;
    max-width: 90px !important;
    min-width: 90px !important;
    padding: 6px 5px !important;
  }

  .bus-num {
    font-size: 17px;
  }

  .bus-num-from,
  .bus-num-to {
    font-size: 6.5px !important;
  }

  .first-timing {
    width: 52px;
  }

  .mins-big {
    font-size: 18px !important;
  }

  .next-pill {
    width: 46px !important;
    font-size: 9px !important;
  }

  .card-middle {
    padding: 5px 2px 5px 5px !important;
  }

  .card-right {
    padding: 5px 3px 5px 0 !important;
  }

  .sun-toggle-btn {
    font-size: 8px;
    padding: 3px 4px;
  }

  .stop-input {
    font-size: 16px;
  }

  #app-logo {
    height: 56px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  background: #000000;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 208, 0, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 208, 0, .04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 0 100px;
}

/* HEADER */
header {
  padding: 16px 20px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#app-logo {
  content: url("assets/shiokbus-logo-dark.png");
}

.header-right {
  text-align: right;
  padding-top: 6px;
}

.live-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: .5;
    transform: scale(.7);
  }
}

/* SUN CARD */
@keyframes sunPulse {
  0%, 100% {
    box-shadow: 0 0 24px #FFD00060, 0 0 48px #FF880030;
  }
  50% {
    box-shadow: 0 0 36px #FFD00090, 0 0 72px #FF880050;
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(360deg);
  }
}

/* SEARCH */
.search-zone {
  margin: 20px 20px 0;
}

.search-eyebrow {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 900;
  font-size: 38px;
  line-height: .95;
  letter-spacing: -.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.search-eyebrow .accent {
  color: var(--yellow);
}

.search-eyebrow .red {
  color: var(--red);
}

.recent-drop-header {
  font-family: 'LTAIdentity', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding-left: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.recent-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}

.recent-remove-btn:hover {
  color: var(--white);
  background: var(--card-border);
}

/* SEARCH TABS */
.search-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 4px;
  overflow: hidden;
}

.search-tab {
  flex: 1;
  padding: 9px 6px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 10px;
  transition: all .2s;
  white-space: nowrap;
}

.search-tab.active {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 2px 12px #D7181C40;
}

.search-tab:not(.active):hover {
  color: var(--yellow);
}

/* Attach X button flush to the input on desktop */
.search-bar {
  display: flex;
  align-items: stretch;
}

.search-bar .go-btn.slim {
  margin-left: -1px;
  border-radius: 0 10px 10px 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.search-bar input.text-mode {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}

.search-bar-title {
  font-family: 'LTAIdentity', sans-serif;
}

.stop-input {
  flex: 1;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 16px;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.stop-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px #FFD00020;
}

.stop-input::placeholder {
  color: var(--muted);
  letter-spacing: 1px;
  font-size: 18px;
}

.stop-input.text-mode {
  font-size: 16px;
  letter-spacing: .5px;
  font-weight: 600;
}

.go-btn {
  background: var(--red);
  border: none;
  color: #fff;
  border-radius: 14px;
  width: 50px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px #D7181C50;
  flex-shrink: 0;
}

.go-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px #D7181C80;
}

.go-btn:active {
  transform: scale(.95);
}

.go-btn svg {
  width: 26px;
  height: 26px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.go-btn.slim {
  width: 28px;
  min-height: 38px;
  border-radius: 10px;
  box-shadow: none;
  border: 2px solid var(--card-border);
  border-left: none;
  color: #fff;
}

.go-btn.slim svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

/* STOP NAME LIVE RESULTS DROPDOWN */
.stop-name-results {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  margin-top: 8px;
  overflow-y: auto;
  max-height: 320px;
  display: none;
  animation: cardIn .2s ease;
}

.stop-name-results.open {
  display: block;
}

.sn-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--card-border);
  transition: background .15s;
}

.sn-item:last-child {
  border-bottom: none;
}

.sn-item:hover,
.sn-item.highlighted {
  background: #1A3070;
}

.sn-code {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.sn-info {
  flex: 1;
  min-width: 0;
}

.sn-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.sn-road {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.unified-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--card-border);
  transition: background .15s;
}

.unified-item:last-child {
  border-bottom: none;
}

.unified-item:hover,
.unified-item.highlighted {
  background: #1A3070;
}

.unified-code {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.unified-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  color: var(--white);
}

.unified-road {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

body.light .unified-item:hover,
.light .unified-item.highlighted {
  background: #EEF4FF;
}

body.light .unified-name {
  color: #08101A;
}

.sn-arrow {
  color: var(--muted);
  font-size: 14px;
}

.sn-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* BUS ROUTE RESULTS */
.route-hero {
  margin-bottom: 16px;
}

.route-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.route-stops-label {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.route-stop-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
  position: relative;
  cursor: pointer;
  transition: all .15s;
}

.route-stop-item:hover .route-stop-card {
  border-color: var(--cyan);
  background: #0F2040;
}

.route-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
  flex-shrink: 0;
  padding: 0;
}

.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card-border);
  border: 2px solid var(--muted);
  flex-shrink: 0;
  margin-top: 14px;
  z-index: 1;
  transition: all .2s;
}

.route-stop-item:first-child .route-dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px #00E07A60;
}

.route-stop-item:last-child .route-dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 8px #D7181C60;
}

.route-stop-item:hover .route-dot {
  background: var(--cyan);
  border-color: var(--cyan);
}

.route-connector {
  flex: 1;
  width: 2px;
  background: var(--card-border);
  margin-top: 0;
  min-height: 8px;
}

.route-stop-card {
  flex: 1;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 6px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
}

.route-seq {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--card-border);
  min-width: 22px;
}

.route-stop-info {
  flex: 1;
  min-width: 0;
}

.route-stop-name {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.route-stop-code {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'LTAIdentity', sans-serif;
  letter-spacing: .5px;
}

.route-dist-tag {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
}

.route-dist-km {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
}

.route-dist-side {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  margin-top: 2px;
}

/* STOP CODE TAB — TIMING PANEL */
.stop-timing-panel {
  border-top: 1.5px solid var(--card-border);
  padding: 14px 16px;
}

/* ROUTE STOP EXPAND */
.rs-chevron {
  color: var(--muted);
  font-size: 18px;
  transition: transform .25s;
  display: inline-block;
  line-height: 1;
}

.rs-chevron.rotated {
  transform: rotate(90deg);
  color: var(--cyan);
}

.rs-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.rs-expand.open {
  max-height: 3000px;
}

.rs-expand-inner {
  padding: 0 0 10px 0;
  margin-top: -4px;
}

.rs-actions {
  padding: 8px 0 10px;
}

.rs-action-btn {
  background: var(--blue-mid);
  border: 1.5px solid #2A4A99;
  border-radius: 10px;
  padding: 7px 16px;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s;
}

.rs-action-btn:hover {
  background: #2040AA;
  border-color: #4060BB;
}

.rs-arrivals {
  margin-bottom: 10px;
}

.rs-arrivals-placeholder {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

.rs-arrival-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  align-items: center;
  gap: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--card-border);
}

.rs-arrival-row:last-child {
  border-bottom: none;
}

.rs-svc-col {
  background: var(--red);
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 3px 2px;
  border-radius: 6px;
  min-width: 100px;
  text-align: center;
  cursor: pointer;
  transition: filter .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rs-svc-col:hover {
  filter: brightness(1.2);
}

.rs-dest-label {
  font-size: 8px;
  color: #FFFFFF;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.rs-svc-col.op-gas {
  background: #9A7000;
}

.rs-svc-col.op-tts {
  background: #1A6B2A;
}

.rs-svc-col.op-sbs {
  background: #5B2D8E;
}

.rs-svc-col.op-smrt {
  background: var(--red);
}

.rs-svc-col.op-private {
  background: #1A2C5B;
  color: #fff;
}

.bus-num-col.op-private {
  background: #1A2C5B;
}

.svc-drop-num.op-private {
  background: #1A2C5B !important;
  color: #fff !important;
}

.rs-time-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 2px;
}

.rs-arrival-row .rs-time-cell:first-of-type {
  padding-left: 10px;
}

.rs-time-main {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 650;
  font-size: 17px;
  line-height: 1;
  color: var(--white);
}

.rs-time-main.arriving {
  color: var(--white);
}

.rs-time-next {
  font-family: 'LTAIdentity', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.rs-time-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}

.rs-timing-panel {
  margin-top: 8px;
}

.rs-timing-grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 4px 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
}

.rs-timing-head {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
}

.rs-timing-day {
  font-size: 11px;
  color: var(--muted);
}

.rs-timing-val {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
}

/* DIR BTN DEST */
.dir-btn {
  flex: 1;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.dir-btn-dest {
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  margin-top: 3px;
  font-family: 'LTAIdentity', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  opacity: .85;
  line-height: 1.3;
}

.dir-btn-loop {
  font-size: 10px;
  color: var(--cyan);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'LTAIdentity', sans-serif;
  opacity: .9;
}

.rs-loop-label {
  font-size: 9px;
  color: #FFFFFF;
  margin-top: 2px;
  white-space: nowrap;
  letter-spacing: .2px;
  font-family: 'LTAIdentity', sans-serif;
  opacity: .9;
  text-align: center;
}

.dir-btn.active .dir-btn-dest {
  opacity: 1;
  color: var(--white);
}

/* ROUTE SUN PANEL */
.rsp-card {
  background: linear-gradient(135deg, #1A1200, #1A0A00 50%, #0F1E3A);
  border: 1.5px solid #5A3000;
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.rsp-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #FFD00020, transparent 70%);
  pointer-events: none;
}

.rsp-title {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #A08040;
  margin-bottom: 12px;
}

.rsp-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.rsp-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.rsp-rec {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  line-height: 1.2;
}

.rsp-rec strong {
  color: var(--green);
}

.rsp-sub {
  font-size: 12px;
  color: #A08040;
  margin-top: 3px;
}

.rsp-strip-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rsp-strip {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  display: flex;
  overflow: hidden;
  background: #FFFFFF08;
}

.rsp-seg {
  height: 100%;
  min-width: 1px;
  transition: opacity .2s;
}

.rsp-any {
  background: #FFFFFF10;
}

.rsp-strip-label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.rsp-legend {
  display: flex;
  gap: 12px;
}

.rsp-leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
}

.rsp-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* PLAN TRIP PANEL */
.plan-trip-wrap {
  background: var(--card-bg);
  padding: 16px;
  position: relative;
  z-index: 10;
}

.plan-stop-group {
  margin-bottom: 12px;
}

.plan-stop-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.plan-stop-input-wrap {
  position: relative;
}

.plan-stop-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
  display: none;
  z-index: 2;
}

.plan-stop-clear.visible {
  display: block;
}

body.light .plan-stop-clear {
  color: #fff !important;
}

.plan-stop-input {
  width: 100%;
  background: #0a1628;
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-size: 13px;
  padding: 10px 28px 10px 12px;
  outline: none;
  transition: border-color .2s;
}

.plan-stop-input:focus {
  border-color: var(--cyan);
}

.plan-stop-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0d1e3a;
  border: 1.5px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 9999;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

.plan-stop-dropdown.open {
  display: block;
}

.plan-drop-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--card-border);
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-drop-item:last-child {
  border-bottom: none;
}

.plan-drop-item:hover {
  background: #1A3070;
}

.plan-near-me-item {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #00C8E0;
  background: #0D1F45;
  border-radius: 8px;
  transition: background .15s;
}

.plan-near-me-item:hover {
  background: #1A3070;
}

.plan-drop-seq {
  font-size: 11px;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.plan-drop-name {
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.plan-drop-code {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* TRIP RESULT CARD */
.trip-result-card {
  background: linear-gradient(135deg, #001A0A, #0a1628);
  border: 1.5px solid #00E07A40;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.trip-result-card.sunny {
  border-color: #FF444440;
  background: linear-gradient(135deg, #1A0800, #0a1628);
}

.trip-result-map-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--card-border);
}

#trip-map {
  height: 260px;
  width: 100%;
}

.trip-rec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.trip-rec-emoji {
  font-size: 32px;
}

.trip-rec-side {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
}

.trip-rec-side strong {
  color: var(--green);
}

.trip-rec-side.sunny strong {
  color: #FF8800;
}

.trip-rec-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.6;
}

.trip-seg-strip {
  height: 8px;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  background: #FFFFFF08;
  margin-bottom: 8px;
}

.trip-seg {
  height: 100%;
  min-width: 1px;
}

.trip-stops-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* SERVICE FREQ GRID */
.svc-freq-pill {
  background: #FFFFFF08;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.svc-freq-pill-label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  font-family: 'LTAIdentity', sans-serif;
}

/* DIRECTION TOGGLE */
.dir-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.dir-btn.active {
  background: #D7181C20;
  border-color: var(--red);
  color: var(--white);
}

.dir-btn:hover:not(.active) {
  border-color: var(--muted);
  color: var(--white);
}

/* NEAR ME BUTTON */
.near-me-btn {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--blue-mid), #0B2F7F);
  border: 1.5px solid #2A4A99;
  border-radius: 14px;
  padding: 13px 20px;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .2s;
}

.near-me-btn:hover {
  background: linear-gradient(135deg, #2040AA, #1035A0);
  border-color: #4060BB;
  transform: translateY(-1px);
}

.near-me-btn:active {
  transform: scale(.98);
}

.near-me-btn.loading {
  opacity: .7;
  pointer-events: none;
}

.near-me-btn .btn-icon {
  font-size: 16px;
}

.near-me-btn .btn-sub {
  font-size: 10px;
  color: #8AAAD0;
  font-weight: 400;
  letter-spacing: .5px;
  font-family: 'LTAIdentity', sans-serif;
  margin-top: 1px;
}

/* INTERCHANGE GRID */
.interchange-header {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 16px;
  margin-bottom: 10px;
}

.interchange-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.int-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 11px 10px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.int-card:hover {
  border-color: var(--yellow);
  background: #FFD00008;
  transform: translateY(-2px);
}

.int-card:active {
  transform: scale(.96);
}

.int-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.int-code {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .5px;
}

/* NEARBY STOPS LIST */
.nearby-section {
  margin-top: 16px;
}

.nearby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nearby-title {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
}

.nearby-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.clear-nearby {
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  font-family: 'LTAIdentity', sans-serif;
  transition: all .2s;
}

.clear-nearby:hover {
  border-color: var(--red);
  color: #FF9999;
}

.nearby-stop {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .2s;
  animation: cardIn .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

.nearby-stop:hover {
  border-color: var(--cyan);
  transform: translateX(3px);
  background: #0F2040;
}

.nearby-rank {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--card-border);
  min-width: 28px;
  text-align: center;
}

.nearby-stop:hover .nearby-rank {
  color: var(--cyan);
}

.nearby-stop-info {
  flex: 1;
  min-width: 0;
}

.nearby-stop-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-stop-code {
  font-family: 'LTAIdentity', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: .5px;
}

.nearby-dist {
  text-align: right;
  flex-shrink: 0;
}

.nearby-dist-m {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  line-height: 1;
}

.nearby-dist-lbl {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.nearby-walk {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* RESULTS */
.results-area {
  margin: 24px 20px 0;
}

.route-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg, #0F1E3A);
  padding: 12px 14px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--card-border);
}

body.light .route-sticky-header {
  background: #FFFFFF;
}

.stops-scroll-wrap {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  padding-right: 8px;
}

/* ── GLOBAL THEMED SCROLLBARS ── */
/* Covers: html, stop-name-results, plan-stop-dropdown, svc-dropdown, settings-drawer, stops-scroll-wrap */
html,
.stop-name-results,
.plan-stop-dropdown,
.stops-scroll-wrap,
#svc-dropdown,
#settings-drawer {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

html::-webkit-scrollbar,
.stop-name-results::-webkit-scrollbar,
.plan-stop-dropdown::-webkit-scrollbar,
.stops-scroll-wrap::-webkit-scrollbar,
#svc-dropdown::-webkit-scrollbar,
#settings-drawer::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

html::-webkit-scrollbar-track,
.stop-name-results::-webkit-scrollbar-track,
.plan-stop-dropdown::-webkit-scrollbar-track,
.stops-scroll-wrap::-webkit-scrollbar-track,
#svc-dropdown::-webkit-scrollbar-track,
#settings-drawer::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
.stop-name-results::-webkit-scrollbar-thumb,
.plan-stop-dropdown::-webkit-scrollbar-thumb,
.stops-scroll-wrap::-webkit-scrollbar-thumb,
#svc-dropdown::-webkit-scrollbar-thumb,
#settings-drawer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover,
.stop-name-results::-webkit-scrollbar-thumb:hover,
.plan-stop-dropdown::-webkit-scrollbar-thumb:hover,
.stops-scroll-wrap::-webkit-scrollbar-thumb:hover,
#svc-dropdown::-webkit-scrollbar-thumb:hover,
#settings-drawer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Light mode */
body.light html,
body.light .stop-name-results,
body.light .plan-stop-dropdown,
body.light .stops-scroll-wrap,
body.light #svc-dropdown,
body.light #settings-drawer {
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

body.light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

body.light ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

.svc-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .15s;
  font-family: 'LTAIdentity', sans-serif;
}

.svc-drop-item:hover {
  background: var(--card-border);
}

.svc-drop-item:last-child {
  border-radius: 0 0 10px 10px;
}

.svc-drop-num {
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 6px;
  color: #fff;
  min-width: 42px;
  text-align: center;
  flex-shrink: 0;
}

.svc-drop-cat {
  font-size: 12px;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light .svc-drop-cat {
  color: #4A5A7A;
}

body.light .svc-drop-num {
  color: #000000;
}

body.light .svc-drop-item:hover {
  background: #EEF4FF;
}

body.light #svc-dropdown {
  background: #FFFFFF;
}

.stop-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.stop-title {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}

.stop-road-block {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
}

.refresh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-label {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.refresh-btn {
  background: none;
  border: 1.5px solid var(--card-border);
  color: var(--muted);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.refresh-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* BUS CARD */
.bus-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  margin-bottom: 12px;
  overflow: hidden;
  animation: cardIn .4s cubic-bezier(.34, 1.56, .64, 1) both;
  transition: transform .2s, box-shadow .2s;
}

.bus-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px #00000060;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-top {
  display: flex;
  align-items: stretch;
  cursor: pointer;
}

.bus-num-col {
  background: var(--red);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.bus-num-col::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 20px;
  background: inherit;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

.bus-num-col:hover {
  filter: brightness(1.2);
}

.bus-num-col.op-gas {
  background: #9A7000;
}

.bus-num-col.op-tts {
  background: #1A6B2A;
}

.bus-num-col.op-sbs {
  background: #5B2D8E;
}

.bus-num-col.op-smrt {
  background: var(--red);
}

.bus-num {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: #FFFFFF;
}

.bus-num-from {
  font-size: 9px;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  margin-bottom: 2px;
  text-align: center;
}

.bus-num-to {
  font-size: 9px;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.2;
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  margin-top: 2px;
  text-align: center;
}

.card-middle {
  flex: 1;
  padding: 10px 14px 10px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.arrival-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.mins-big {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--white);
}

.mins-unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-right: 2px;
}

.first-timing {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 78px;
  flex-shrink: 0;
}

.next-pill {
  padding: 4px 6px 3px;
  font-size: 13px;
  color: var(--white);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 72px;
}

.bus-type-tag {
  display: flex;
  align-items: center;
  margin-top: 3px;
  opacity: .8;
}

.card-right {
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.sun-toggle-btn {
  background: #FFD00015;
  border: 1px solid #FFD00030;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
}

.sun-toggle-btn:hover {
  background: #FFD00025;
  border-color: #FFD00060;
}

/* SUN PANEL */
.sun-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
  border-top: 0 solid var(--card-border);
}

.sun-panel.open {
  max-height: 420px;
  border-top-width: 1.5px;
}

.sun-inner {
  padding: 18px 18px 20px;
}

.panel-title {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* DIAGRAM */
.diagram-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.bus-map {
  flex: 1;
}

.bus-shell {
  background: #060F20;
  border: 2px solid var(--card-border);
  border-radius: 24px 24px 16px 16px;
  padding: 10px 10px 12px;
  position: relative;
}

.bus-windshield {
  background: #0B2040;
  border-bottom: 1.5px solid var(--card-border);
  margin: -10px -10px 10px;
  border-radius: 22px 22px 0 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ws-light {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--yellow);
}

.seat-row-d {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.seat-pair {
  display: flex;
  gap: 5px;
}

.s {
  width: 26px;
  height: 22px;
  border-radius: 5px;
  border: 1.5px solid #1E3560;
  background: #0F1E3A;
  transition: all .3s ease;
}

.s.rec {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 10px #00E07A50;
}

.s.hot {
  background: #FF222715;
  border-color: #FF222740;
}

.s.very-hot {
  background: #FF222730;
  border-color: #FF222270;
}

.bus-aisle {
  width: 16px;
}

.diagram-legend {
  min-width: 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.map-legend-item-label {
  color: #ccc;
}

#map-legend-box {
  background: #0a0e1aee;
  border: 1px solid var(--card-border);
}

.map-legend-inline {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1000;
  background: #0a0e1aee;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 10px;
  line-height: 1.8;
  backdrop-filter: blur(4px);
}

.leaflet-control-attribution {
  font-size: 9px !important;
  opacity: .7;
}

.leg-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.leg-swatch {
  width: 14px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.rec-banner {
  margin-top: 14px;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.rec-banner.good {
  background: linear-gradient(135deg, #00E07A18, #00E07A08);
  border: 1.5px solid #00E07A30;
}

.rec-banner.any {
  background: linear-gradient(135deg, #00C8E018, #00C8E008);
  border: 1.5px solid #00C8E030;
}

.rec-banner.hot {
  background: linear-gradient(135deg, #FFD00018, #FFD00008);
  border: 1.5px solid #FFD00030;
}

.rec-emoji {
  font-size: 26px;
  flex-shrink: 0;
}

.rec-strong {
  color: var(--green);
  font-weight: 700;
}

.rec-dir {
  color: var(--yellow);
  font-weight: 700;
}

/* EMPTY */
.empty {
  text-align: center;
  padding: 60px 20px;
}

@keyframes bobBus {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* LOADING */
.loading-state {
  text-align: center;
  padding: 50px 20px;
}

.bus-loader {
  font-size: 40px;
  animation: busRide 1s ease-in-out infinite;
  display: inline-block;
}

@keyframes busRide {
  0% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(-10px);
  }
}

.loading-txt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* FAVOURITES */
.auth-btn {
  display: flex;
  align-items: center;
  background: none;
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
}

.auth-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  transition: transform .2s;
  flex-shrink: 0;
}

.view-btn:hover {
  transform: scale(1.3);
}

.stop-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  border-radius: 16px 16px 0 0;
  background: #0d1b2e;
  position: relative;
  z-index: 1;
}

body.light .stop-map-header {
  background: #ffffff;
  color: #000;
}

body.light .stop-map-header span {
  color: #000;
}

body.light .stop-map-header button {
  color: #555;
}
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  transition: transform .2s;
  flex-shrink: 0;
}

.fav-btn:hover {
  transform: scale(1.3);
}

.fav-section {
  margin: 16px 20px 0;
}

.fav-header {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.fav-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, opacity .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  user-select: none;
}

.fav-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.fav-card.dragging {
  opacity: .4;
  transform: scale(.97);
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px var(--yellow);
}

.fav-card.drag-over {
  border-color: #00C8E0;
  box-shadow: 0 0 0 2px #00C8E0;
  transform: scale(1.03);
}

.fav-card.long-press-ready {
  transform: scale(1.04);
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow);
  transition: transform .15s, box-shadow .15s;
}

.fav-card-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 600;
}

.fav-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-card-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 13px;
  opacity: .5;
  cursor: pointer;
  line-height: 1;
}

.fav-remove:hover {
  opacity: 1;
}

.fav-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
}

body.light .fav-card-name {
  color: #08101A;
}

body.light .fav-header {
  color: #007A90;
}

/* CONFIRM MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  padding: 24px 24px 20px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 20px 60px #00000080;
  animation: slideUp .2s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
}

.modal-title {
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  text-align: center;
  margin-bottom: 6px;
}

.modal-body {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-name {
  color: var(--white);
  font-weight: 700;
}

.modal-btns {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 11px;
  border-radius: 12px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.modal-btn.cancel {
  background: var(--card-border);
  color: var(--muted);
}

.modal-btn.cancel:hover {
  background: #2A3A60;
  color: var(--white);
}

.modal-btn.confirm {
  background: var(--red);
  color: #fff;
}

.modal-btn.confirm:hover {
  filter: brightness(1.15);
}

body.light .modal-box {
  background: #FFFFFF;
  border-color: #C8D4EE;
}

body.light .modal-title {
  color: #08101A;
}

body.light .modal-name {
  color: #08101A;
}

body.light .modal-btn.cancel {
  background: #E8EDF8;
  color: #6A7A9A;
}

.plan-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s;
}

.plan-card:hover {
  border-color: var(--red);
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.plan-total-time {
  font-family: 'LTAIdentity', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
}

.plan-card-legs {
  padding: 0 16px 14px;
  border-top: 1px solid var(--card-border);
}

.plan-leg {
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 13px;
}

.plan-leg:last-child {
  border-bottom: none;
}

.plan-leg-walk {
  color: var(--muted);
}

.plan-leg-walk > i {
  color: #fff;
}

body.light .plan-leg-walk > i {
  color: #08101A;
}

.plan-route-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.plan-summary-bus {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
}

.plan-summary-mrt {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
}

.plan-summary-walk {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

.plan-summary-arrow {
  color: var(--muted);
  font-size: 11px;
}

.plan-walk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #08101A;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 20px;
}

body.light .plan-walk-pill {
  background: #08101A;
  color: #fff;
}

.plan-leg-bus,
.plan-leg-mrt {
  color: var(--white);
}

.mrt-line-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .5px;
  color: #fff;
  white-space: nowrap;
}

.plan-leg-stops {
  font-size: 11px;
  color: var(--white);
  margin-top: 4px;
}

.plan-stop-link {
  cursor: pointer;
}

.plan-stop-link:hover {
  color: var(--cyan);
}

.plan-leg-meta {
  font-size: 12px;
  color: var(--white);
}

body.light .plan-leg-stops {
  color: #08101A;
}

body.light .plan-leg-meta {
  color: #08101A;
}

.plan-bus-badge {
  background: var(--red);
  color: #fff;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 8px;
}

.plan-sun-pill {
  background: var(--yellow);
  color: #000;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

body.light .plan-sun-pill {
  color: #fff;
}

/* ERROR */
.error-card {
  background: #FF222715;
  border: 1.5px solid #FF222740;
  border-radius: 14px;
  padding: 16px 18px;
  color: #FF9999;
  font-size: 14px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--ink);
  padding: 11px 22px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 13px;
  z-index: 999;
  animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1);
  white-space: nowrap;
}

@keyframes toastIn {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* ── SETTINGS DRAWER ── */
.settings-section {
  padding: 20px 20px 4px;
  border-bottom: 1px solid var(--card-border);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.settings-row-label {
  font-size: 13px;
  color: var(--white);
  margin-bottom: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--white);
}

.settings-tab-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--white);
  cursor: pointer;
  transition: background .15s;
}

.settings-tab-opt:hover {
  background: var(--card-border);
}

.settings-tab-opt.active {
  background: var(--card-border);
  color: var(--yellow);
}

.settings-tab-opt .check {
  font-size: 13px;
  opacity: 0;
}

.settings-tab-opt.active .check {
  opacity: 1;
}

.settings-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 14px;
}

.settings-signout-btn {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1.5px solid #FF6B6B40;
  border-radius: 10px;
  color: #FF6B6B;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}

.settings-signout-btn:hover {
  background: #FF6B6B15;
}

.settings-signin-btn {
  width: 100%;
  padding: 11px;
  background: var(--red);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* ── RAIN BADGE ── */
.rain-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: 'LTAIdentity', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  margin-top: 5px;
  white-space: nowrap;
  background: #3c3c41;
  color: #ffffff;
}

.legend-nosun-swatch {
  background: #FFFFFF;
}

body.light .legend-nosun-swatch {
  background: #4A6090;
}

/* ── TRAIN ALERTS ── */
#train-alert-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 999;
  background: #B8000A;
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'LTAIdentity', sans-serif;
  cursor: pointer;
  gap: 8px;
  align-items: flex-start;
}

#train-alert-banner.visible {
  display: flex;
}

#train-alert-banner .alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

#train-alert-banner .alert-body {
  flex: 1;
  min-width: 0;
}

#train-alert-banner .alert-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

#train-alert-banner .alert-msg {
  font-size: 11px;
  opacity: .9;
  line-height: 1.4;
}

#train-alert-banner .alert-expand {
  font-size: 11px;
  opacity: .7;
  flex-shrink: 0;
  align-self: center;
}

.train-alert-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #B8000A18;
  border: 1px solid #B8000A55;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  font-size: 12px;
  color: var(--white);
}

.train-alert-inline .tai-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.train-alert-inline .tai-body {
  flex: 1;
}

.train-alert-inline .tai-title {
  font-weight: 700;
  margin-bottom: 3px;
  font-size: 12px;
}

.train-alert-inline .tai-detail {
  font-size: 11px;
  opacity: .85;
  line-height: 1.5;
}

.train-alert-inline .tai-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'LTAIdentity', sans-serif;
  font-size: 10px;
  color: #fff;
  margin-right: 3px;
}

#train-alert-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #00000088;
  align-items: flex-end;
}

#train-alert-modal.visible {
  display: flex;
}

#train-alert-modal-inner {
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 16px 32px;
}

#train-alert-modal-inner h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--white);
}

.tam-alert {
  background: #B8000A18;
  border: 1px solid #B8000A55;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.tam-alert-line {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tam-alert-row {
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.5;
  color: var(--muted);
}

.tam-alert-row span {
  color: var(--white);
  font-weight: 600;
}

.tam-alert-msg {
  font-size: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #ffffff18;
  line-height: 1.6;
  color: var(--white);
  opacity: .9;
}