/* ============================================================
   QCU Student Portal — eta.css
   QCity Bus · Libreng Sakay panel (Route 4) + reference map

   Full viewport OpenFreeMap canvas, floating route card, pill stop
   markers, and published schedule details. Route colors describe
   the path; they do not imply traffic or live bus tracking.
   ============================================================ */

/* Screen-reader-only text. The route plate carries "4" visually; the
   heading needs the full name for assistive technology. */
.bus-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Page header: bus mark + title + free-ride badge ── */
.bus-page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.bus-page-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
}

.bus-page-mark i,
.bus-page-mark svg { width: 22px; height: 22px; stroke-width: 2; }

.bus-page-headings { min-width: 0; flex: 1 1 auto; }

.bus-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Fact badge — outlined, not filled: only alerts earn filled colour. */
.bus-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--blue-mid);
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.bus-free-badge i,
.bus-free-badge svg { width: 11px; height: 11px; stroke-width: 2.4; }

/* ── Shared section shell: 3px top rail, squared, flat ── */
.bus-panel {
  min-width: 0;
  padding: 13px 14px 12px;
  border: 1px solid var(--divider);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.bus-panel--muted { border-top-color: var(--fn-slate); background: var(--bg); }

.bus-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.bus-panel-title-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bus-panel-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--blue); stroke-width: 2;
}

.bus-panel--muted .bus-panel-icon { color: var(--fn-slate); }

.bus-panel-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* ── Route card: number plate + corridor summary ── */
.bus-route-ident {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

/* Route number reads as a plate, not a pill: squared, solid, tabular. */
.bus-route-no {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.bus-route-ident-text { min-width: 0; }

.bus-route-corridor {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.bus-route-anchor {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.bus-route-note {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bus-route-note strong { font-weight: 800; color: var(--text); }

/* ── Key/value fact rows ── */
.bus-facts {
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}

.bus-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--divider);
}

.bus-fact:last-child { border-bottom: none; }

.bus-fact-k {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.bus-fact-v {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.bus-fact-v--free { color: var(--fn-green); letter-spacing: 0.04em; }
.bus-fact-v--muted { color: var(--muted); font-weight: 700; font-size: 12px; }
.bus-fact-v--unknown { color: var(--fn-slate); font-weight: 700; font-size: 12px; font-style: italic; }

/* ── Advisory block — matches .flood-guidance accent bar ── */
.bus-advisory {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 8px 0 8px 10px;
  border-left: 3px solid var(--fn-slate);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.bus-advisory-icon {
  width: 15px; height: 15px; flex-shrink: 0;
  stroke-width: 2; margin-top: 1px;
  color: var(--fn-slate);
}

.bus-advisory strong { font-weight: 800; }
.bus-advisory p { margin: 0; overflow-wrap: anywhere; }
.bus-advisory p + p { margin-top: 3px; color: var(--muted); }

/* ============================================================
   MAP — kept as the primary visual element of this page
   ============================================================ */

.eta-map-wrapper {
  position: relative;
  width: 100%;
  height: clamp(320px, 56vh, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: hidden;
}

#eta-map { width: 100%; height: 100%; }

/* ── Route plate overlay (top-left) ── */
.map-route-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  max-width: min(272px, calc(100% - 20px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 6px rgba(10, 61, 110, 0.14);
}

.map-route-overlay-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.map-route-overlay-no {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.map-route-overlay-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.map-route-overlay-sub {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--divider);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ── Legend (bottom-left) ── */
.map-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  max-width: calc(100% - 20px);
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 6px rgba(10, 61, 110, 0.14);
}

.map-legend-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
  margin-bottom: 6px;
}

.map-legend-list {
  display: grid;
  gap: 5px;
  list-style: none;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}

/* Legend keys are drawn to match the actual map marks, 1:1. */
.map-legend-key { flex-shrink: 0; display: block; }

.map-legend-key--campus {
  width: 11px; height: 11px;
  border: 3px solid var(--blue);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fff;
}

.map-legend-key--terminus {
  width: 11px; height: 11px;
  border: 3px solid var(--navy);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fff;
}

.map-legend-key--route {
  width: 16px; height: 4px;
  border-radius: 1px;
  background: var(--blue);
}

.map-legend-key--stop {
  width: 9px; height: 9px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
}

/* ── Map markers ── */
.qcu-marker-container,
.terminus-marker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  user-select: none;
}

.qcu-marker-pin,
.terminus-marker-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border: 3px solid var(--blue);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(10, 61, 110, 0.32);
}

.qcu-marker-pin::after,
.terminus-marker-pin::after {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 50%;
  transform: rotate(45deg);
}

.terminus-marker-pin { border-color: var(--navy); }
.terminus-marker-pin::after { background: var(--navy); }

.qcu-marker-label,
.terminus-marker-label {
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.terminus-marker-label { background: var(--navy); }

/* Stop dots are drawn as a MapLibre circle layer; this styles their popups. */
.maplibregl-popup-content {
  padding: 7px 10px !important;
  border: 1px solid var(--border) !important;
  border-radius: 3px !important;
  box-shadow: 0 2px 8px rgba(10, 61, 110, 0.18) !important;
  font-family: inherit;
}

.map-stop-popup-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.map-stop-popup-kind {
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.maplibregl-popup-close-button {
  width: 22px; height: 22px;
  font-size: 15px;
  color: var(--muted);
  border-radius: 2px;
}
.maplibregl-popup-close-button:hover { background: var(--bg-soft); color: var(--text); }

/* ── MapLibre chrome, themed to the app ── */
.maplibregl-ctrl-bottom-right { bottom: 10px !important; right: 10px !important; }

.maplibregl-ctrl-group {
  border: 1px solid var(--border) !important;
  border-radius: 3px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}

.maplibregl-ctrl-group button { width: 44px; height: 44px; }
.maplibregl-ctrl-group button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; box-shadow: none !important; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--muted); }

/* Map fallback when tiles or WebGL are unavailable. */
.map-unavailable {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  background: var(--bg-soft);
}

.map-unavailable i, .map-unavailable svg {
  width: 22px; height: 22px; color: var(--muted); stroke-width: 2;
}

.map-unavailable-title { font-size: 13px; font-weight: 800; color: var(--text); }
.map-unavailable-desc { font-size: 11.5px; font-weight: 600; color: var(--muted); max-width: 34ch; line-height: 1.5; }

/* ============================================================
   SCHEDULE CARD — tabs + scheduled-departure list
   ============================================================ */

.bus-sched-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 11px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.bus-sched-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px 8px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  text-align: center;
  min-width: 0;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.bus-sched-tab-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.bus-sched-tab-meta {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.bus-sched-tab:hover { background: var(--bg-soft); color: var(--text); }
.bus-sched-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.bus-sched-tab[aria-selected="true"] {
  color: var(--blue);
  background: var(--blue-soft);
  border-bottom-color: var(--blue);
}

.bus-sched-tab[aria-selected="true"] .bus-sched-tab-meta { color: var(--blue); }

.bus-sched-tab[disabled] { color: var(--fn-slate); opacity: 0.55; cursor: default; }
.bus-sched-tab[disabled]:hover { background: none; color: var(--fn-slate); }

/* ── Panel body ── */
.bus-sched-body { padding-top: 10px; }

.bus-sched-list-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
  margin-bottom: 6px;
}

.bus-sched-list-count { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* Scroll container — hairline framed, own scrollbar theming. */
.bus-sched-scroll {
  max-height: 208px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--blue-mid) transparent;
}

.bus-sched-scroll::-webkit-scrollbar { width: 9px; }
.bus-sched-scroll::-webkit-scrollbar-track { background: transparent; }
.bus-sched-scroll::-webkit-scrollbar-thumb {
  background: var(--blue-mid);
  border: 3px solid var(--bg);
  border-radius: 5px;
}
.bus-sched-scroll::-webkit-scrollbar-thumb:hover { background: var(--blue); }

.bus-sched-rows { list-style: none; }

.bus-sched-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--divider);
  min-width: 0;
}

.bus-sched-row:last-child { border-bottom: none; }

.bus-sched-seq {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  flex-shrink: 0;
}

.bus-sched-time {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.bus-sched-dir {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.bus-sched-foot {
  margin-top: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ── Direction rows: what QC actually publishes per direction ── */
.bus-sched-dirrow {
  padding: 10px 11px;
  border-bottom: 1px solid var(--divider);
  min-width: 0;
}

.bus-sched-dirrow:last-child { border-bottom: none; }

.bus-sched-dirrow-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bus-sched-dirrow-times {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-top: 7px;
}

.bus-sched-dirrow-slot { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.bus-sched-dirrow-k {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.bus-sched-dirrow-v {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.bus-sched-dirrow-rule { width: 1px; background: var(--divider); flex-shrink: 0; }

.bus-sched-dirrow-headway {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.bus-sched-dirrow-note {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Badge falls back to neutral when the schedule state is not a known one. */
.bus-free-badge--muted {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--fn-slate);
}

/* ── Operating-window state: QC publishes hours + interval, not clock times ── */
.bus-window {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}

.bus-window-cell {
  padding: 9px 11px;
  min-width: 0;
  border-bottom: 1px solid var(--divider);
}

.bus-window-cell:nth-child(odd) { border-right: 1px solid var(--divider); }
.bus-window-cell:nth-last-child(-n+2) { border-bottom: none; }

.bus-window-k {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.bus-window-v {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.bus-window-v--sm { font-size: 12.5px; font-weight: 700; }
.bus-window-v--unknown { font-size: 12.5px; font-weight: 700; color: var(--fn-slate); font-style: italic; }

/* ── Empty / unavailable states ── */
.bus-sched-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 22px 16px;
  text-align: center;
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg);
}

.bus-sched-empty i, .bus-sched-empty svg {
  width: 20px; height: 20px; color: var(--fn-slate); stroke-width: 2;
}

.bus-sched-empty-title { font-size: 13px; font-weight: 800; color: var(--text); }
.bus-sched-empty-desc { font-size: 11.5px; font-weight: 600; color: var(--muted); max-width: 38ch; line-height: 1.5; }

/* ── Loading skeleton ── */
.bus-skeleton {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg);
}

.bus-skeleton-bar {
  height: 12px;
  border-radius: 2px;
  background: var(--bg-soft);
  animation: busSkeleton 1.4s ease-in-out infinite;
}

.bus-skeleton-bar:nth-child(2) { width: 78%; animation-delay: 0.12s; }
.bus-skeleton-bar:nth-child(3) { width: 56%; animation-delay: 0.24s; }

@keyframes busSkeleton {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============================================================
   ABOUT CARD
   ============================================================ */

.bus-about-lead {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: anywhere;
}

.bus-about-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
  list-style: none;
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}

.bus-about-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--divider);
  min-width: 0;
}

.bus-about-item:last-child { border-bottom: none; }

.bus-about-item i, .bus-about-item svg {
  width: 15px; height: 15px; flex-shrink: 0;
  margin-top: 1px;
  color: var(--blue);
  stroke-width: 2;
}

.bus-about-item-text { min-width: 0; }

.bus-about-item-k {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.bus-about-item-d {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* ── Source / official link footer ── */
.bus-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}

.bus-source-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.bus-source-note i, .bus-source-note svg { width: 12px; height: 12px; stroke-width: 2; flex-shrink: 0; }
.bus-source-note time { font-variant-numeric: tabular-nums; font-weight: 700; }

.bus-official-link { border-radius: 3px; }

/* ============================================================
   MOTION — one authored moment: the schedule panel changing day.
   Rows arrive on an exponential ease-out from an already-visible
   default, so a no-JS or reduced-motion render is fully legible.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .bus-sched-body[data-enter] > * {
    animation: busPanelIn 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .bus-sched-body[data-enter] .bus-sched-row,
  .bus-sched-body[data-enter] .bus-sched-dirrow {
    animation: busRowIn 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 22ms);
  }

  @keyframes busPanelIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
  }

  @keyframes busRowIn {
    from { opacity: 0; transform: translateY(6px); filter: blur(1.5px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 720px) {
  .eta-map-wrapper { height: 520px; }
  .bus-sched-scroll { max-height: 268px; }
  .bus-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .bus-facts .bus-fact:nth-last-child(-n+2) { border-bottom: none; }
  .bus-about-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bus-about-item:nth-child(odd) { border-right: 1px solid var(--divider); }
  .bus-about-item:nth-child(4) { border-bottom: none; }
  .bus-about-item:nth-child(5) { grid-column: 1 / -1; border-right: none; }
  .bus-official-link { width: auto; }
}

@media (max-width: 719px) {
  .bus-official-link { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .eta-map-wrapper { height: clamp(300px, 48vh, 440px); }
  .bus-panel { padding: 11px 12px 10px; }
  .bus-page-mark { width: 36px; height: 36px; }
  .bus-page-mark i, .bus-page-mark svg { width: 20px; height: 20px; }
  .bus-route-corridor { font-size: 13px; }
  .bus-sched-scroll { max-height: 192px; }
  /* Strips, not floating cards: the corridor is a tall ribbon on a portrait
     map, so the chrome moves out of its way instead of sitting beside it. */
  .map-route-overlay { left: 8px; right: 8px; top: 8px; max-width: none; padding: 7px 9px; }
  .map-legend { left: 8px; right: 50px; bottom: 8px; max-width: none; padding: 7px 9px; }
  .map-legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 4px; }
  .maplibregl-ctrl-bottom-right { bottom: 8px !important; right: 8px !important; }
}

@media (max-width: 390px) {
  .bus-fact-k { font-size: 10px; }
  .bus-fact-v { font-size: 12px; }
  .bus-route-no { width: 34px; height: 34px; font-size: 17px; }
  .bus-window-v { font-size: 14px; }
  .bus-sched-tab-name { font-size: 10px; }
  .bus-about-item-k { font-size: 12px; }
}

@media (max-width: 340px) {
  .eta-map-wrapper { height: 268px; }
  .bus-window { grid-template-columns: minmax(0, 1fr); }
  .bus-window-cell:nth-child(odd) { border-right: none; }
  .bus-window-cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--divider); }
  .bus-window-cell:last-child { border-bottom: none; }
  .bus-fact { flex-direction: column; align-items: flex-start; gap: 1px; }
  .bus-fact-v { text-align: left; }
  .map-legend-list { grid-template-columns: minmax(0, 1fr); }
  .map-legend { max-width: calc(100% - 16px); }
  .bus-sched-dir { display: none; }
  .bus-sched-dirrow-v { font-size: 15px; }
}

/* ── Print: the schedule is the thing worth carrying offline ── */
@media print {
  .eta-map-wrapper, .bus-official-link { display: none; }
  .bus-sched-scroll { max-height: none; overflow: visible; }
  .bus-panel { border-top-width: 2px; break-inside: avoid; }
}

/* ============================================================
   SOFT-UI THEME OVERLAY (matches the Home dashboard design)
   Loaded last so it wins the cascade over the civic flat style.
   Tokens mirror soft-ui.css: bg #F4F7FC, primary #4A3AFF,
   navy #1A1B41, pastels peach/mint/lavender, radius 28px.
   ============================================================ */

/* Page container + spacing */
.student-shell .page-container.section-stack { gap: 18px; padding-bottom: 140px; }

/* ── Page header card: floating white, purple icon chip ── */
.student-shell .portal-card {
  border-radius: 28px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  padding: 22px !important;
}
.bus-page-head { align-items: center; gap: 16px; }
.bus-page-mark {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: #4A3AFF;
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 22px -6px rgba(74, 58, 255, 0.5);
  flex-shrink: 0;
}
.bus-page-mark i, .bus-page-mark svg { width: 24px; height: 24px; stroke-width: 2; }
.page-title {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #1A1B41 !important;
  letter-spacing: -0.02em;
}
.bus-free-badge {
  background: #E0F7F6 !important;
  color: #0F766E !important;
  border: 0 !important;
  border-radius: 9999px !important;
  padding: 5px 12px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  box-shadow: none !important;
}
.caption { color: #8E92AD !important; }

/* ── Route panel: floating white card ── */
.bus-panel {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  border-top: 0 !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
  padding: 22px !important;
}
.bus-panel--muted { background: #fff !important; }

.bus-panel-head { gap: 12px; }
.bus-panel-title-group { gap: 10px; }
.bus-panel-icon {
  color: #4A3AFF;
  width: 20px; height: 20px;
}
.bus-panel-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #1A1B41 !important;
  letter-spacing: -0.02em;
}

/* Route number badge: purple circle */
.bus-route-no {
  background: #4A3AFF !important;
  color: #fff !important;
  border-radius: 9999px !important;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-weight: 800;
  box-shadow: 0 10px 22px -6px rgba(74, 58, 255, 0.5);
  font-size: 18px !important;
}
.bus-route-corridor { color: #1A1B41 !important; font-weight: 800 !important; }
.bus-route-anchor { color: #4A3AFF !important; font-weight: 700 !important; }
.bus-route-note { color: #4B4F6B !important; line-height: 1.6; }

/* ── Facts: pastel grid (peach/mint/lavender rotation) ── */
.bus-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0 !important;
  margin-top: 16px !important;
}
@media (min-width: 640px) {
  .bus-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bus-fact {
  border: 0 !important;
  border-radius: 20px;
  padding: 13px 15px;
  background: #EDEAFF;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bus-fact:nth-child(3n + 1) { background: #FFE8D6; }
.bus-fact:nth-child(3n + 2) { background: #E0F7F6; }
.bus-fact:nth-child(3n) { background: #EDEAFF; }
.bus-fact-k {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8E92AD !important;
}
.bus-fact-v {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #1A1B41 !important;
}
.bus-fact-v--free { color: #0F766E !important; }
.bus-fact-v--muted { color: #8E92AD !important; font-weight: 700 !important; }

/* Advisory: lavender row */
.bus-advisory {
  background: #EDEAFF;
  border: 0 !important;
  border-left: 4px solid #7B6CF6 !important;
  border-radius: 14px;
  padding: 12px 14px !important;
  margin-top: 14px !important;
}
.bus-advisory-icon { color: #7B6CF6 !important; }

/* ── Map: rounded soft frame ── */
.eta-map-wrapper {
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
  background: #F4F7FC;
}
.map-route-overlay {
  border-radius: 16px !important;
  border: 0 !important;
  border-top: 0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  padding: 10px 14px !important;
}
.map-route-overlay-no {
  background: #4A3AFF !important;
  border-radius: 9999px !important;
  width: 22px; height: 22px;
  font-size: 11px;
}
.map-legend {
  border-radius: 16px !important;
  border: 0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* ── Schedule tabs: purple active pill like the calendar ── */
.bus-sched-tabs {
  display: flex;
  gap: 8px;
  background: #F4F7FC;
  border: 0 !important;
  border-radius: 9999px;
  padding: 5px;
  margin-top: 14px !important;
}
.bus-sched-tab {
  flex: 1;
  border: 0 !important;
  border-radius: 9999px !important;
  background: transparent !important;
  padding: 9px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.bus-sched-tab[aria-selected="true"] {
  background: #4A3AFF !important;
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(74, 58, 255, 0.5);
}
.bus-sched-tab[aria-selected="true"] .bus-sched-tab-name,
.bus-sched-tab[aria-selected="true"] .bus-sched-tab-meta { color: #fff !important; }
.bus-sched-tab-name {
  font-size: 12px !important;
  font-weight: 700;
  color: #8E92AD;
}
.bus-sched-tab:not([aria-selected="true"]):hover { background: #ECEBFF !important; }
.bus-sched-tab-meta { font-size: 10.5px !important; color: #8E92AD; font-weight: 600; }

/* Schedule body rows */
.bus-sched-body { margin-top: 14px !important; }
.bus-sched-dir {
  border: 0 !important;
  border-radius: 20px !important;
  background: #F4F7FC;
  padding: 14px 16px !important;
}
.bus-sched-dir + .bus-sched-dir { margin-top: 10px !important; }
.bus-sched-dir-label { color: #1A1B41 !important; font-weight: 800 !important; }
.bus-sched-row { border-color: rgba(26, 27, 65, 0.08) !important; }
.bus-sched-time { color: #4A3AFF !important; font-weight: 700 !important; }
.bus-sched-foot { color: #8E92AD !important; }

/* ── About list: pastel rows with icon chips (like Home goals) ── */
.bus-about-lead { color: #4B4F6B !important; font-weight: 600; }
.bus-about-list { gap: 10px !important; }
.bus-about-item {
  border: 0 !important;
  border-radius: 20px;
  background: #F4F7FC;
  padding: 13px 15px !important;
  gap: 12px !important;
  align-items: flex-start !important;
}
.bus-about-item:nth-child(odd) { background: #FFE8D6; }
.bus-about-item:nth-child(even) { background: #E0F7F6; }
.bus-about-item i, .bus-about-item svg {
  width: 20px; height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}
.bus-about-item:nth-child(odd) i, .bus-about-item:nth-child(odd) svg { color: #FF9F6E; }
.bus-about-item:nth-child(even) i, .bus-about-item:nth-child(even) svg { color: #35C4C8; }
.bus-about-item-k { color: #1A1B41 !important; font-weight: 800 !important; font-size: 13px !important; }
.bus-about-item-d { color: #5C607E !important; font-size: 12px !important; }

/* Source footer + official link button */
.bus-source {
  border-top: 1px solid rgba(26, 27, 65, 0.08);
  margin-top: 14px !important;
  padding-top: 14px !important;
}
.bus-source-note { color: #8E92AD !important; }
/* Full viewport route map with independently floating, accessible controls. */
body[data-page="campus-eta"] { overflow: hidden; }
body[data-page="campus-eta"] .app-shell { padding: 0; min-height: 100dvh; }
body[data-page="campus-eta"] .page-header {
  position: fixed; inset: 12px 16px auto; z-index: 30;
  border: 1px solid #E8EDF3; border-radius: 22px;
  background: rgba(255,255,255,.96); box-shadow: 0 8px 30px #18345112;
  max-width: 1408px; margin-inline: auto;
}
body[data-page="campus-eta"] .header-inner { min-height: 68px; padding: 10px 16px; }
body[data-page="campus-eta"] .header-clock,
body[data-page="campus-eta"] .qc-logo { display: none; }
.bus-map-scene { position: relative; width: 100%; height: 100vh; height: 100dvh; outline: none; }
.bus-map-scene .eta-map-wrapper {
  position: absolute; inset: 0; height: 100%; width: 100%;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: #EBEFF0; isolation: isolate;
}
.bus-map-scene #eta-map { width: 100%; height: 100%; }
.bus-map-heading {
  position: absolute; z-index: 3; top: calc(96px + env(safe-area-inset-top, 0px)); left: 24px;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 48px);
  padding: 13px 16px; background: #fff; border: 1px solid #E4EAF1;
  border-radius: 22px; box-shadow: 0 8px 28px #17355312;
}
.bus-map-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: #E9F0FF; color: #245ACB; flex-shrink: 0; }
.bus-map-icon svg { width: 23px; height: 23px; }
.bus-map-eyebrow { color: #5A6578; font-size: 11px; font-weight: 600; margin: 0 0 3px; }
.bus-map-heading h1 { font-size: 21px; line-height: 1.2; margin: 0; color: #1B2942; }
.bus-map-heading h1 span { color: #245ACB; }
.bus-map-fare { font-size: 11px; color: #16684F; background: #E8F7EF; border-radius: 30px; padding: 7px 10px; margin-left: 20px; white-space: nowrap; font-weight: 700; }
.bus-map-controls {
  position: absolute; z-index: 4; right: max(24px, env(safe-area-inset-right, 0px));
  top: calc(96px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column;
  padding: 3px; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px #17355318;
}
.bus-map-controls button, .bus-details-toolbar button {
  display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #DFE6EE;
  border-radius: 15px; background: #fff; color: #245ACB; cursor: pointer; box-shadow: 0 5px 18px #17355312;
}
.bus-map-controls button { border: 0; border-radius: 11px; box-shadow: none; color: #5144EC; }
.bus-map-controls button + button { border-top: 1px solid #EFEDF8; }
.bus-map-controls button:hover:not(:disabled) { background: #F0EEFF; }
.bus-map-controls button:disabled { opacity: .45; cursor: default; }
.bus-map-controls svg, .bus-details-toolbar svg { width: 20px; height: 20px; }
.bus-map-scene .maplibregl-ctrl-bottom-right { bottom: calc(87px + env(safe-area-inset-bottom, 0px)); right: 12px; }
.bus-map-scene .maplibregl-ctrl-attrib { font-size: 10px; max-width: calc(100vw - 24px); background: rgba(255,255,255,.94); }
.bus-trip-card {
  position: absolute; z-index: 5; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); left: 24px;
  width: min(384px, calc(100% - 48px)); padding: 0 22px 16px;
  max-height: calc(100dvh - 280px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; background: #fff; border: 0; border-radius: 26px;
  box-shadow: 0 14px 48px #17355320; color: #24232B;
}
.bus-trip-toggle { flex-shrink: 0; padding: 10px 0 12px; width: 100%; min-height: 44px; background: transparent; border: 0; text-align: left; color: inherit; cursor: pointer; }
.bus-trip-handle { display: block; width: 34px; height: 4px; background: #DCD9ED; border-radius: 10px; margin: 0 auto 10px; }
.bus-trip-summary { display: flex; align-items: center; gap: 10px; }
.bus-trip-route-badge { color: #5144EC; background: #EFEDFF; padding: 5px 10px; font-size: 13px; border-radius: 30px; font-weight: 700; white-space: nowrap; }
.bus-trip-summary-distance { margin-left: auto; color: #65616F; font-size: 13px; font-weight: 600; }
.bus-trip-summary-distance { min-width: 0; text-align: right; }
.bus-trip-summary svg { width: 18px; height: 18px; flex-shrink: 0; color: #5144EC; transition: transform 180ms ease-out; }
.bus-trip-card[data-expanded="true"] .bus-trip-summary svg { transform: rotate(180deg); }
.bus-trip-summary-route { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.bus-trip-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.bus-trip-content[hidden] { display: none; }
.bus-trip-stats { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin: 18px 0; }
.bus-trip-stats > div + div { border-left: 1px solid #E9EDF2; padding-left: 18px; }
.bus-trip-stats dt { font-size: 12px; color: #657084; margin-bottom: 5px; }
.bus-trip-stats dd { font-size: 30px; line-height: 1.15; font-weight: 800; margin: 0; letter-spacing: -.7px; }
.bus-trip-stats dd small { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.bus-trip-stats dd.bus-stat-unavailable, .bus-trip-stats .bus-stat-unavailable { font-size: 16px; letter-spacing: -.3px; padding-top: 7px; }
.bus-trip-stats p { font-size: 11px; color: #657084; margin: 5px 0 0; }
.bus-trip-endpoints { display: grid; gap: 14px; position: relative; margin: 0 0 17px; }
.bus-trip-endpoints::before { content: ""; position: absolute; left: 6px; top: 17px; bottom: 17px; border-left: 1px dashed #C5D3E4; }
.bus-trip-endpoints > div { display: flex; align-items: center; gap: 12px; }
.bus-endpoint-dot { width: 13px; height: 13px; border: 3px solid #D8E8FF; background: #2474E8; border-radius: 50%; flex-shrink: 0; z-index: 1; }
.bus-endpoint-dot--destination { background: #159C73; border-color: #D7F0E6; }
.bus-trip-endpoints small { display: block; font-size: 11px; color: #657084; margin-bottom: 1px; }
.bus-trip-endpoints strong { font-size: 13px; font-weight: 700; }
.bus-trip-action {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 46px;
  border: 0; background: #5144EC; color: #fff; border-radius: 14px; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.bus-trip-action svg:first-child { margin-left: 4px; }
.bus-trip-action:hover { background: #4335D6; }
.bus-trip-action svg { width: 18px; height: 18px; flex-shrink: 0; }
.bus-trip-action svg:last-child { margin-left: auto; }
.bus-trip-disclaimer { color: #65616F; font-size: 11px; text-align: center; margin: 8px 0 0; flex-shrink: 0; }
.bus-details-dialog {
  --timeline-blue: #5144EC;
  padding: 0; margin: auto; width: min(500px, calc(100% - 32px)); height: min(88dvh, 920px); max-height: none;
  border: 0; border-radius: 28px; background: #fff; color: #24232B;
  box-shadow: 0 20px 80px #17355340; overflow: hidden;
}
.bus-details-dialog[open] { display: flex; flex-direction: column; }
.bus-details-dialog::backdrop { background: #152A4B66; backdrop-filter: blur(3px); }
.bus-details-toolbar { display: flex; align-items: center; gap: 12px; padding: 20px 24px 8px; flex-shrink: 0; }
.bus-details-toolbar button { border: 0; border-radius: 50%; color: var(--timeline-blue); box-shadow: none; flex-shrink: 0; }
.bus-details-toolbar button:hover { background: #F0EEFF; }
.bus-timeline-badge { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--timeline-blue); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.4; }
.bus-timeline-badge svg { width: 16px; height: 16px; flex-shrink: 0; }
.bus-timeline-badge.is-unavailable { background: #EFEDF8; color: #65616F; }
.bus-details-heading { position: relative; padding: 12px 24px 20px 96px; flex-shrink: 0; }
.bus-details-heading::before { content: ""; position: absolute; top: 22px; left: 50px; width: 25px; height: 54px; border: 3px solid #8378ED; border-right: 0; border-top-left-radius: 14px; border-bottom-left-radius: 14px; }
.bus-details-heading h2 { margin: 0; color: #24232B; font-size: clamp(26px, 6vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.bus-details-heading p { color: #6B6775; font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.bus-details-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 28px 24px; scrollbar-width: thin; scrollbar-color: #B5ADEA #fff; }
.bus-timeline-context { margin: 0 0 18px 68px; color: #6B6775; font-size: 12px; line-height: 1.5; }
.bus-stop-timeline { list-style: none; padding: 0; margin: 0 0 24px; }
.bus-stop-timeline li { position: relative; display: grid; grid-template-columns: 20px 20px minmax(0, 1fr); align-items: start; column-gap: 14px; padding: 0 0 32px; min-height: 110px; }
.bus-stop-timeline li::before { content: ""; position: absolute; width: 3px; top: 18px; bottom: -18px; left: 42.5px; background: #8378ED; }
.bus-stop-timeline li:last-child { padding-bottom: 0; min-height: 0; }
.bus-stop-timeline li:last-child::before { display: none; }
.bus-stop-timeline .bus-stop-number { display: block; padding-top: 9px; text-align: center; font-size: 14px; font-weight: 600; color: #38343F; }
.bus-stop-node { position: relative; margin-top: 9px; width: 20px; height: 20px; border: 2px solid #DEDCE4; background: #fff; border-radius: 50%; box-shadow: 0 0 0 6px #fff; }
.bus-stop-timeline .is-active .bus-stop-node { border-color: var(--timeline-blue); background: var(--timeline-blue); }
.bus-stop-timeline .is-active .bus-stop-node::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.bus-stop-timeline .bus-stop-content { display: block; width: 100%; min-height: 44px; min-width: 0; padding: 5px 0 4px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: inherit; box-shadow: none; }
.bus-stop-timeline button.bus-stop-content { cursor: pointer; }
.bus-stop-timeline button.bus-stop-content:hover:not(:disabled) { background: #F6F4FF; }
.bus-stop-timeline button.bus-stop-content:disabled { cursor: default; }
.bus-stop-timeline strong { display: block; font-size: 17px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.bus-stop-timeline small { display: block; margin-top: 5px; color: #6B6775; font-size: 14px; line-height: 1.5; }
.bus-stop-timeline li.bus-timeline-empty { display: block; color: #6B6775; font-size: 14px; line-height: 1.6; min-height: 0; }
.bus-stop-timeline li.bus-timeline-empty::before { display: none; }
.bus-details-scroll .bus-panel { margin: 28px 0 0; padding: 24px 0 0 !important; border-top: 1px solid #EFEDF5 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
.bus-details-dialog .bus-panel-title { color: #24232B !important; }
.bus-details-dialog .bus-route-note { font-size: 12px; color: #6B6775; line-height: 1.6; }
.bus-details-dialog .bus-about-list { border: 0; background: transparent; }
.bus-details-dialog .bus-about-item { border: 0 !important; border-radius: 0 !important; padding: 6px 0 !important; background: transparent !important; }
.bus-details-dialog .bus-about-item :is(svg, i) { color: var(--timeline-blue) !important; }
.bus-details-dialog .bus-about-item-d, .bus-details-dialog .bus-source-note, .bus-details-dialog .bus-sched-foot { color: #6B6775 !important; }
.bus-details-dialog .bus-sched-tab-meta { color: #6B6775; font-size: 11px !important; }
.bus-details-dialog .bus-source-note { font-size: 11px !important; }
.bus-details-dialog .bus-sched-tab[aria-selected="true"] { background: var(--timeline-blue) !important; }
.bus-details-footer { flex-shrink: 0; padding: 12px 24px 20px; background: #fff; }
.bus-details-footer .bus-trip-action { position: relative; justify-content: center; min-height: 50px; font-size: 15px; padding-inline: 42px; }
.bus-details-footer .bus-trip-action svg { position: absolute; right: 16px; }
.bus-details-dialog ::selection { background: #E5E0FF; color: #30277B; }
@media (prefers-reduced-motion: reduce) { .bus-trip-summary svg { transition: none; } }
.route-marker { position: absolute; padding: 0; width: 14px; height: 14px; border: 0; background: transparent; cursor: pointer; z-index: 2; overflow: visible; }
.route-marker-pill {
  position: absolute; bottom: 27px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; height: 36px; padding: 4px 11px 4px 4px;
  width: max-content; max-width: 222px; background: #fff; color: #213958;
  border: 1px solid #90A9D1; border-radius: 999px; box-shadow: 0 3px 10px #19335A24;
}
.route-marker-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #E8F0FF; color: #245ACB; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.route-marker-icon svg { width: 15px; height: 15px; }
.route-marker-name { font: 600 11px/1.3 var(--font-body, "Public Sans", sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-marker-pointer { position: absolute; bottom: 11px; left: 6px; width: 2px; height: 16px; background: #245ACB; }
.route-marker-dot { position: absolute; inset: 0; border-radius: 50%; border: 3px solid #fff; background: #245ACB; box-shadow: 0 0 0 1px #245ACB, 0 2px 5px #19335A24; }
.route-marker--campus .route-marker-pill { border-color: #245ACB; border-width: 2px; }
.route-marker--campus .route-marker-icon { background: #245ACB; color: #fff; }
.route-marker.is-overview.is-compact .route-marker-dot { inset: 3px; border-width: 1px; box-shadow: 0 0 0 1px #fff; }
.route-marker.is-overview:is(:hover, :focus-visible) .route-marker-dot { inset: 0; border-width: 3px; }
.route-marker.is-compact .route-marker-pill, .route-marker.is-compact .route-marker-pointer { visibility: hidden; }
.route-marker:is(:hover, :focus-visible) { z-index: 10 !important; }
.route-marker:is(:hover, :focus-visible) .route-marker-pill, .route-marker:is(:hover, :focus-visible) .route-marker-pointer { visibility: visible; }
.route-marker:focus-visible { outline: 3px solid #162F66; outline-offset: 4px; border-radius: 50%; }
.bus-map-scene :is(.bus-trip-toggle, .bus-trip-action, .bus-map-controls button, .bus-details-dialog button):focus-visible { outline: 3px solid #5144EC; outline-offset: 3px; }
.bus-map-scene .map-unavailable { inset: 180px 80px auto; padding: 18px; max-width: 400px; margin: auto; border: 1px solid #DCE4EE; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px #17355312; }
@media (max-width: 899px) {
  .bus-map-heading { left: max(16px, env(safe-area-inset-left, 0px)); max-width: calc(100% - 96px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); gap: 9px; padding: 11px 13px; }
  .bus-map-fare { display: none; }
  .bus-map-controls { right: max(16px, env(safe-area-inset-right, 0px)); padding: 2px; border-radius: 14px; }
  .bus-trip-card { left: max(16px, env(safe-area-inset-left, 0px)); width: min(460px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); padding: 0 18px 14px; max-height: calc(100dvh - 288px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .bus-trip-endpoints { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bus-trip-endpoints::before { display: none; }
  .bus-map-scene .map-unavailable { inset: 184px 80px auto 16px; font-size: 12px; }
}
@media (max-width: 599px) {
  .bus-details-dialog { width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .bus-details-toolbar { padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .bus-details-scroll { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .bus-details-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .bus-details-heading { padding-left: 92px; }
  .bus-details-heading::before { left: 46px; }
  .bus-timeline-badge { font-size: 11px; }
}
@media (max-width: 359px) {
  .bus-map-heading { gap: 8px; padding: 10px; }
  .bus-map-heading h1 { font-size: 19px; }
  .bus-map-eyebrow { font-size: 11px; }
  .bus-map-icon { width: 36px; height: 36px; border-radius: 12px; }
  .bus-map-fare { padding: 6px 8px; font-size: 10px; }
  .bus-trip-summary { gap: 7px; }
  .bus-trip-summary-distance { font-size: 12px; }
  .bus-details-toolbar { gap: 6px; padding-inline: 16px; }
  .bus-details-heading { padding-right: 16px; }
  .bus-stop-timeline strong { font-size: 16px; }
}
@media (max-height: 730px) and (max-width: 899px) {
  .bus-trip-card[data-expanded="true"] { width: min(460px, calc(100% - 96px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); }
  .bus-trip-card[data-expanded="true"] .bus-trip-summary-route { display: none; }
  .bus-trip-card[data-expanded="true"] .bus-trip-disclaimer { display: none; }
  .bus-trip-stats { margin: 4px 0 14px; gap: 10px; }
  .bus-trip-stats > div + div { padding-left: 10px; }
  .bus-trip-stats dd { font-size: 26px; }
  .bus-trip-stats dd.bus-stat-unavailable { font-size: 14px; }
  .bus-trip-endpoints strong { font-size: 12px; }
  .bus-trip-card { padding: 0 14px 12px; }
  .bus-trip-action { font-size: 12px; min-height: 44px; gap: 6px; padding-inline: 8px; }
}
@media (max-height: 500px) and (orientation: portrait) {
  .bus-trip-card { width: calc(100% - 96px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); }
}
@media (max-height: 540px) and (orientation: landscape) {
  .bus-map-heading { top: 94px; left: 336px; max-width: calc(100% - 416px); }
  .bus-map-fare { display: none; }
  .bus-trip-card, .bus-trip-card[data-expanded="true"] { left: max(16px, env(safe-area-inset-left, 0px)); width: 300px; max-height: calc(100dvh - 204px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .bus-map-controls { top: 100px; }
  .bus-details-toolbar { padding-block: 8px 0; }
  .bus-details-heading { padding-block: 6px 10px; }
  .bus-details-heading::before { height: 30px; top: 10px; }
  .bus-details-footer { padding-block: 8px; }
}
@media (max-height: 380px) and (orientation: landscape) {
  body[data-page="campus-eta"] .header-inner { min-height: 52px; padding-block: 6px; }
  .bus-map-controls { top: calc(76px + env(safe-area-inset-top, 0px)); }
  .bus-map-heading { top: calc(76px + env(safe-area-inset-top, 0px)); left: 280px; max-width: calc(100% - 360px); padding: 10px; }
  .bus-map-heading h1 { font-size: 17px; }
  .bus-map-heading .bus-map-icon { display: none; }
  .bus-trip-card, .bus-trip-card[data-expanded="true"] { width: 248px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 172px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .bus-trip-toggle { padding-block: 8px; }
  .bus-trip-handle { margin-bottom: 6px; }
  .bus-trip-summary-route { margin-top: 5px; font-size: 13px; }
  .bus-trip-disclaimer { margin-top: 5px; }
  .bus-trip-card[data-expanded="true"] .bus-trip-handle { display: none; }
}
.btn-primary, .bus-official-link {
  background: #4A3AFF !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 22px -6px rgba(74, 58, 255, 0.5);
  font-weight: 700;
  padding: 10px 16px !important;
}
