/*
 * لوين؟ — /trip journey planner. Loaded only on /trip (before app.css, so
 * every rule is scoped under .page--trip or .planner to win by specificity).
 *
 * Phones: the map is the canvas, a search card floats on top and the
 * results live in a bottom sheet (peek / half / full, js/sheet.js). From
 * 900px (as the shell): a side panel on the right (RTL start) with the
 * search and the results. The page frame (header, tab bar) is shell.css.
 *
 * The one loud element is the line "placard": a white sign with a band in
 * the line's colour, like the route board behind a microbus windshield.
 */

/* ── The planner fills the shell main area ── */

.planner {
  --elev: 0 1px 2px rgba(20, 45, 78, 0.08), 0 6px 20px rgba(20, 45, 78, 0.12);
  --card-h: 0px;
  --sheet-visible: 0px;
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.planner .ticon { flex-shrink: 0; }

/* ── Map canvas ── */

.planner__map { position: absolute; inset: 0; }
.planner .map--trip { width: 100%; height: 100%; min-height: 0; max-height: none; border-radius: 0; }
.planner .map--trip.leaflet-grab { cursor: crosshair; }
/* The centre crosshair (Enter puts the point there) only when the map is used by keyboard. */
.planner .map--trip:focus-visible ~ .map-crosshair { display: none; }
.planner .map--trip.is-keyboard:focus ~ .map-crosshair { display: block; }
.planner .map--trip:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }

/* Leaflet controls stay clear of the card (top) and follow the sheet (bottom). */
.planner .leaflet-top { top: calc(var(--card-h) + 8px); }
.planner .leaflet-bottom { bottom: var(--sheet-visible); transition: bottom 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.planner.is-dragging .leaflet-bottom { transition: none; }
.planner .leaflet-control-attribution { background: rgba(255, 255, 255, 0.92); }
.planner .layer-switch { top: calc(var(--card-h) + 16px); }

.map-hint {
  position: absolute;
  top: calc(var(--card-h) + 16px);
  left: 50%;
  z-index: 1000;
  max-width: calc(100% - 140px);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 45, 78, 0.86);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--elev);
  transform: translateX(-50%);
  pointer-events: none;
}
.map-hint:empty { display: none; }

/* «موقعي» (.map-locate, shared with «الخطوط»: me.css) rides on top of the sheet. */
.planner.is-dragging .map-locate { transition: none; }

/* «ملء الشاشة»: an icon in the same round button as «موقعي» (its name for screen readers and as a tooltip),
   under the zoom buttons (2 × 44 px from 10 px under the card), clear of the prompt above the map. */
.planner .map-fab--fullscreen {
  top: calc(var(--card-h) + 121px);
  bottom: auto;
  left: 12px;
  justify-content: center;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--border);
}
.planner .map-fab--fullscreen .icon { width: 22px; height: 22px; }
/* The notice under the options: compact; not in a chosen option's steps, nor while loading or riding. */
.trip-sheet .accuracy-notice { margin: 14px 0 4px; padding: 8px 12px; font-size: 0.8125rem; }
.trip-sheet .accuracy-notice__title { font-size: 0.875rem; }
.trip-sheet[data-phase="steps"] .accuracy-notice,
.trip-sheet[data-phase="live"] .accuracy-notice,
.trip-sheet[data-phase="loading"] .accuracy-notice { display: none; }

/* Fullscreen: the map covers the screen (a CSS overlay: iOS Safari too); the card and the sheet step
   aside, the route, «أنا», «موقعي» and the zoom stay. js/trip.js makes the header inert meanwhile. */
.planner.is-fullscreen .planner__panel { display: none; }
.planner.is-fullscreen .planner__map {
  --card-h: 0px;
  --sheet-visible: 0px;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--white);
}
.planner.is-fullscreen .leaflet-top { top: env(safe-area-inset-top, 0px); }
.planner.is-fullscreen .leaflet-bottom { bottom: env(safe-area-inset-bottom, 0px); transition: none; }
.planner.is-fullscreen .layer-switch,
.planner.is-fullscreen .map-hint { top: calc(16px + env(safe-area-inset-top, 0px)); }
.planner.is-fullscreen .map-locate { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transition: none; }
.planner.is-fullscreen .map-fab--fullscreen { top: calc(113px + env(safe-area-inset-top, 0px)); background: var(--navy); color: var(--white); }
.planner.is-fullscreen .fs-icon--enter { display: none; }
.planner.is-fullscreen .fs-icon--exit { display: inline-flex; }
.planner .map-fab--fullscreen:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.planner.is-fullscreen .map-fab--fullscreen:focus-visible { outline-color: var(--yellow); }
/* Phones: fingers zoom the map, so no zoom buttons; «ملء الشاشة» takes their place under the card. */
@media (max-width: 899.98px) and (pointer: coarse) {
  .planner .leaflet-control-zoom { display: none; }
  .planner .map-fab--fullscreen { top: calc(var(--card-h) + 12px); }
  .planner.is-fullscreen .map-fab--fullscreen { top: calc(12px + env(safe-area-inset-top, 0px)); }
}

/* Start: yellow circle. Destination: teal square. A white halo keeps them clear of the tiles. */
.trip-pin { display: grid; place-items: center; cursor: grab; }
.trip-pin.leaflet-drag-target { cursor: grabbing; }
.trip-pin__shape {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--white), 0 3px 8px rgba(20, 45, 78, 0.45);
}
.trip-pin--to .trip-pin__shape { border-radius: 6px; background: var(--teal); }
.trip-pin.leaflet-drag-target .trip-pin__shape { transform: scale(1.15); }

/* Boarding / alighting / transfer spots: a dot with a navy callout above it. */
.trip-stop {
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 0 0 2px var(--white);
}
.callout {
  position: absolute;
  bottom: 14px;
  left: 50%;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(20, 45, 78, 0.3);
  transform: translateX(-50%);
}
.callout::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--navy);
}

/* ── Search card ── */

.trip-card {
  position: absolute;
  top: 8px;
  inset-inline: 8px;
  z-index: 1100;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--elev);
}

.trip-fields {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  gap: 6px 4px;
  align-items: center;
}
.trip-mark { grid-column: 1; justify-self: center; position: relative; z-index: 1; width: 14px; height: 14px; border: 2.5px solid var(--navy); }
.trip-mark--from { grid-row: 1; border-radius: 999px; background: var(--yellow); }
.trip-mark--to { grid-row: 2; border-radius: 3px; background: var(--teal); }
.trip-mark.is-active { box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--navy); }
/* Dotted connector between the two marks. */
.trip-rail {
  grid-column: 1;
  grid-row: 1 / 3;
  justify-self: center;
  align-self: stretch;
  width: 0;
  margin-block: 25px;
  border-inline-start: 2px dotted var(--border-strong);
}
.trip-field {
  grid-column: 2;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.trip-field[data-point="from"] { grid-row: 1; }
.trip-field[data-point="to"] { grid-row: 2; }
.trip-field.is-active { border-color: var(--navy); background: var(--white); box-shadow: inset 0 0 0 1px var(--navy); }
.trip-field:focus-within { border-color: var(--navy); background: var(--white); box-shadow: inset 0 0 0 1px var(--navy), 0 0 0 3px rgba(20, 45, 78, 0.16); }
.trip-field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 1rem;
}
.trip-field__input::placeholder { color: var(--muted); opacity: 1; }
.trip-field__input:focus { outline: none; }
.trip-field__input::-webkit-search-cancel-button { display: none; }
.trip-field.is-set .trip-field__input { font-weight: 600; }
.trip-field__clear {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.trip-field__clear .ticon { width: 18px; height: 18px; }
.trip-field__clear:hover { color: var(--navy); }
.trip-field__clear:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }

.trip-swap {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.trip-swap:hover:not(:disabled) { border-color: var(--navy); }
.trip-swap:disabled { color: var(--border-strong); cursor: not-allowed; }
.trip-swap:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.trip-card__row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-inline-start: 32px; }

/* Walk limit: a pill around a native select (the phone's own picker). */
.walk-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 12px 4px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.walk-chip .ticon { width: 18px; height: 18px; color: var(--muted); }
.walk-chip:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 45, 78, 0.16); }
.walk-chip__select {
  min-height: 40px;
  padding-inline: 8px 28px;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23142D4E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}
.walk-chip__select:focus { outline: none; }

/* Suggestions under the card: my location, pick on the map, search results. */
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  z-index: 2;
  max-height: min(60vh, 28rem);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--elev);
}
.suggest__list { margin: 0; padding: 0; list-style: none; }
.suggest__list--places:empty { display: none; }
.suggest__list--places { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
.suggest__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--navy);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.suggest__item:hover,
.suggest__item:focus-visible { background: var(--surface); }
.suggest__item:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.suggest__icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--surface); }
.suggest__item:hover .suggest__icon,
.suggest__item:focus-visible .suggest__icon { background: var(--white); }
/* «ابحث عن «…»»: the one action while a name is typed — tinted, its icon solid */
.suggest__item--search { margin-top: 4px; background: var(--teal-50); box-shadow: inset 0 0 0 1px rgba(22, 184, 166, 0.45); }
/* While typing «موقعي الحالي» and «اختر على الخريطة» step aside: the matches come first, no line above them */
#suggest-actions[hidden] + .suggest__list--places { margin-top: 0; padding-top: 0; border-top: 0; }
/* A known stop: the bus in the brand's quiet slate, as its sign on the map */
.suggest__icon--stop { background: #E8EEF5; color: #3F5878; }
.suggest__item--search .suggest__icon,
.suggest__item--search:hover .suggest__icon,
.suggest__item--search:focus-visible .suggest__icon { background: var(--navy); color: var(--white); }
.suggest__item--search:hover,
.suggest__item--search:focus-visible { background: #D5F1EC; }
.suggest__text { display: flex; flex-direction: column; min-width: 0; }
.suggest__name { font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.suggest__sub {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.suggest__status { margin: 6px 8px 2px; font-size: 0.875rem; color: var(--muted); }
.suggest__status:empty { display: none; }

/* ── Results sheet (phones) ── */

.trip-sheet {
  position: absolute;
  inset-inline: 0;
  /* Full height stops under the search card, so the points stay in view. */
  top: calc(var(--card-h, 0px) + 4px);
  bottom: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 20px 20px 0 0;
  background: var(--white);
  box-shadow: 0 -1px 2px rgba(20, 45, 78, 0.06), 0 -6px 24px rgba(20, 45, 78, 0.14);
}
/* Off screen until js/sheet.js takes it over; without it the sheet is a plain panel. */
.trip-sheet[data-sheet-ready] { transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* …with no grip or size toggle to press, and no peek-only line. */
.trip-sheet:not([data-sheet-ready]) .trip-sheet__grip,
.trip-sheet:not([data-sheet-ready]) .trip-sheet__toggle,
.trip-sheet:not([data-sheet-ready]) .trip-sheet__peek { display: none; }
.planner.is-dragging .trip-sheet { transition: none; }
/* JS on (phones): off screen from the first paint until js/sheet.js takes it over (no full sheet
   flashing on a slow load); if sheet.js never runs, the plain panel slides in after 8 s. The
   keyframes are shell.css's; app.css turns animations off for reduced motion, hence !important. */
@media (scripting: enabled) and (max-width: 899.98px) {
  .trip-sheet:not([data-sheet-ready]) { animation: shell-sheet-wait 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) 8s both; }
}
@media (scripting: enabled) and (max-width: 899.98px) and (prefers-reduced-motion: reduce) {
  .trip-sheet:not([data-sheet-ready]) { animation: shell-sheet-wait 1ms linear 8s both !important; }
}
.trip-sheet__head { flex: none; padding: 0 16px 12px; touch-action: none; cursor: grab; user-select: none; }
.trip-sheet__grip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
}
.trip-sheet__grip span { width: 44px; height: 5px; border-radius: 999px; background: var(--border-strong); }
.trip-sheet__grip:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; border-radius: 12px; }
.trip-sheet__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.trip-sheet__title { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.trip-sheet__toggle {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.trip-sheet__toggle:hover { border-color: var(--navy); }
.trip-sheet__toggle:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.trip-sheet__peek:empty,
.trip-sheet:not([data-snap="peek"]) .trip-sheet__peek { display: none; }
.trip-sheet__peek { margin-top: 4px; }
.trip-sheet[data-phase="intro"] .trip-sheet__toggle { display: none; }
.trip-sheet__peek-text { margin: 0; color: var(--muted); }
.trip-sheet__peek-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--navy);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.trip-sheet__peek-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.trip-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 24px;
}
.trip-sheet[data-sheet-ready][data-snap="peek"] .trip-sheet__body { visibility: hidden; }

.trip-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.trip-note .ticon { width: 16px; height: 16px; margin-top: 2px; }
.trip-note--approx { margin-top: 12px; }
.trip-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 16px 0 0; font-size: 0.8125rem; }
.trip-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }

/* ── States ── */

.trip-state:empty { display: none; }
.state { padding: 16px 0 8px; }
.state__text { margin: 0 0 12px; line-height: 1.6; }
.state--error .state__text { font-weight: 600; }
.state__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--control-edge);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.pill-btn:hover { background: var(--surface); border-color: var(--border-strong); color: var(--navy); }
.pill-btn--primary { border-color: var(--navy); background: var(--navy); color: var(--white); }
.pill-btn--primary:hover { background: var(--navy-700); color: var(--white); }
.pill-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.pill-btn .ticon { width: 18px; height: 18px; }

.skeleton { padding: 16px 0; border-bottom: 1px solid var(--border); }
.skeleton__bar { height: 14px; margin-bottom: 10px; border-radius: 7px; background: #E6ECF1; }
.skeleton__bar--wide { width: 82%; height: 30px; border-radius: 8px; }
.skeleton__bar--short { width: 46%; margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton__bar { animation: trip-pulse 1.4s ease-in-out infinite; }
}
@keyframes trip-pulse { 50% { opacity: 0.45; } }

/* ── The search widened the walk by itself ──
 * Above the results, kept short so the first result stays in view at «half»: the server's
 * sentence, then the walk drawn as on the map (dots in the walk colour) from the distance the
 * rider chose to the one the results needed, a walker arriving at its end. The walk chip in the
 * search card turns the same warm yellow while it shows that longer walk. */

/* An end with no line nearby: the nearest area lines serve, a button to go there, a way to add the line */
.trip-nearby { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #F2C55C; border-radius: 14px; background: var(--yellow-50); }
.trip-nearby__text { margin: 0 0 8px; font-size: 0.9375rem; line-height: 1.7; color: var(--navy); }
.trip-nearby .state__actions + .trip-nearby__text { margin-top: 12px; }
.trip-nearby__add { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--navy); font-size: 0.875rem; font-weight: 700; text-underline-offset: 0.2em; }

.trip-widened {
  margin: 8px 0 2px;
  padding: 10px 12px;
  border: 1px solid #EBCB7A;
  border-radius: 14px;
  background: var(--yellow-50);
  color: var(--navy);
}
.trip-widened__text { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.trip-widened__scale { display: flex; align-items: center; gap: 4px; margin: 6px 0 0; font-size: 0.8125rem; font-weight: 700; line-height: 1.45; }
/* The walker faces the end of the walk (the icon walks to the right; the page reads right to left). */
.trip-widened__scale .ticon { flex: none; width: 18px; height: 18px; color: var(--navy); transform: scaleX(-1); }
.trip-widened__m {
  flex: none;
  padding: 0 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* The distance the results used: the strong end of the walk. */
.trip-widened__m:last-child { border-color: var(--navy); background: var(--navy); color: var(--white); }
/* 4 px dots every 9 px, like the dotted walks on the map; whole dots only. */
.trip-widened__walk {
  flex: 1 1 3rem;
  max-width: 8rem;
  height: 6px;
  background: radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px) center / 9px 6px space no-repeat;
}

.walk-chip.is-widened { border-color: #D9A32B; background: var(--yellow-50); }
.walk-chip.is-widened .ticon { color: var(--navy); }

@media (prefers-reduced-motion: no-preference) {
  /* An end with no line nearby: the nearest area lines serve, a button to go there, a way to add the line */
.trip-nearby { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #F2C55C; border-radius: 14px; background: var(--yellow-50); }
.trip-nearby__text { margin: 0 0 8px; font-size: 0.9375rem; line-height: 1.7; color: var(--navy); }
.trip-nearby .state__actions + .trip-nearby__text { margin-top: 12px; }
.trip-nearby__add { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--navy); font-size: 0.875rem; font-weight: 700; text-underline-offset: 0.2em; }

.trip-widened { animation: trip-widen-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  /* The walk draws itself from the chosen distance (start, right) to the one used. */
  .trip-widened__walk { animation: trip-widen-walk 0.6s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s both; }
  .trip-widened__scale .ticon { animation: trip-widen-fade 0.25s ease-out 0.55s both; }
  .trip-widened__m:last-child { animation: trip-widen-in 0.25s ease-out 0.6s both; }
}
@keyframes trip-widen-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes trip-widen-fade { from { opacity: 0; } }
@keyframes trip-widen-walk { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }

@media (forced-colors: active) {
  .trip-widened__walk { height: 0; border-top: 3px dotted CanvasText; background: none; }
}

/* ── Routes ── */

/* Each suggestion is its own card: a clear edge, a gap between cards, and a number. */
.routes { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.route {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(20, 45, 78, 0.06);
}
.route__num {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E3E8EF;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 700;
}
.route.is-selected .route__num { background: var(--navy); color: var(--white); }
.route__head {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--navy);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.route__head:hover,
.route.is-previewed .route__head { background: var(--surface); }
/* Selected: a navy edge around the whole card and a little lift. */
.route.is-selected { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 10px 22px -12px rgba(20, 45, 78, 0.35); }
.route.is-selected .route__head:hover { background: none; }
.route__head:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }

/* The trip at a glance: walk → placard → (transfer → placard) → walk, in reading order. */
/* Wraps rather than crushing the placards: line names stay readable. */
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; min-width: 0; }
.strip__leg { display: inline-flex; flex: none; align-items: center; gap: 2px; color: var(--muted); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.strip__leg .ticon { width: 18px; height: 18px; }
.strip__leg--transfer { color: var(--navy); }
.strip__next { flex: none; width: 14px; height: 14px; color: var(--border-strong); }

.placard {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 10px 5px 8px;
  border: 1.5px solid var(--line);
  border-top-width: 4px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
}
.placard .ticon { width: 18px; height: 18px; }
.placard__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.placard__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.placard__dir { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.placard--return .placard__dir { color: #5B1F93; }
/* Way back estimated from the outbound: a dashed sign. */
.placard--estimated { border-style: dashed; border-top-style: solid; }

.route__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.875rem; color: var(--muted); }
.route__best { padding: 0 10px; border: 1px solid #F2C55C; border-radius: 999px; background: var(--yellow-50); color: #6B4700; font-size: 0.8125rem; font-weight: 700; }
.route__kind { font-weight: 700; color: var(--navy); }
.route__walk { display: inline-flex; align-items: center; gap: 2px; }
.route__walk .ticon { width: 16px; height: 16px; }
.route__trust { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.trip-badge { padding: 1px 8px; border: 1px solid; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.trip-badge--useful { border-color: #8CD9CF; background: var(--teal-50); color: #0B5E55; }
.trip-badge--new { border-color: #EBCB7A; background: var(--yellow-50); color: #6B4700; }
.votes { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.votes--ok.has-votes { color: #0B5E55; }
.votes--bad.has-votes { color: #9B1C1C; }
/* A count still at zero is not shown (screen readers still hear it) */
.votes:not(.has-votes) > [aria-hidden="true"] { display: none; }

/* Step-by-step: a rail of dots (walking) and solid line colour (riding). */
.trip-steps { margin: 0; padding: 0; list-style: none; }
.trip-step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.trip-step:last-child { padding-bottom: 0; }
.trip-step::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 2px;
  inset-inline-start: 15px;
  border-inline-start: 2px dotted var(--border-strong);
}
.trip-step:last-child::before { display: none; }
.trip-step--ride::before { inset-inline-start: 14px; border-inline-start: 4px solid var(--line); }
.trip-step__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
}
.trip-step__icon .ticon { width: 18px; height: 18px; }
.trip-step--ride .trip-step__icon { border: 2.5px solid var(--line); color: var(--navy); }
.trip-step--stop .trip-step__icon { border: 3px solid var(--navy); }
.trip-step__body { min-width: 0; padding-top: 4px; }
.trip-step__text { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.trip-step--ride .trip-step__text { font-weight: 700; }
.trip-step__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.875rem; }
.trip-step__hint { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.trip-step__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-size: 0.9375rem; font-weight: 700; }

.dir-tag { padding: 1px 8px; border: 1px solid #8CD9CF; border-radius: 999px; background: var(--teal-50); color: #0B5E55; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.dir-tag--return { border-color: #C9A6EA; background: #F4ECFB; color: #5B1F93; }

/* Line colours: same palette and order as /map (PALETTE in map.js and trip.js). */
.lc-0 { --line: #16B8A6; }
.lc-1 { --line: #1D4ED8; }
.lc-2 { --line: #DB2777; }
.lc-3 { --line: #4D7C0F; }
.lc-4 { --line: #7B2CBF; }
.lc-5 { --line: #B91C1C; }
.lc-6 { --line: #0E7490; }
.lc-7 { --line: #9333EA; }
.lc-8 { --line: #059669; }
.lc-9 { --line: #BE185D; }

/* ── From 900px (the shell switches there too): side panel on the right (RTL start), map fills the rest ── */

@media (min-width: 900px) {
  /* The same panel width as the shell's sheet (shell.css): 24rem, 26rem from 1200px. */
  .planner { display: grid; grid-template-columns: 24rem minmax(0, 1fr); }
  .planner__panel {
    position: relative;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-inline-end: 1px solid var(--border);
    background: var(--white);
  }
  .planner__map { position: relative; inset: auto; min-width: 0; }
  .planner .leaflet-top { top: 0; }
  .planner .leaflet-bottom { bottom: 0; }
  .planner .layer-switch { top: 12px; }
  .map-hint { top: 16px; }
  .planner .map-fab--fullscreen { top: 113px; }

  /* Flex items: z-index applies even unpositioned. The card (and its suggestions) stays above the results. */
  .trip-card { position: relative; top: auto; inset-inline: auto; z-index: 2; flex: none; margin: 16px 16px 8px; padding: 0; border: 0; box-shadow: none; }
  .suggest { top: calc(100% + 4px); }

  .trip-sheet { position: static; z-index: 1; flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; transform: none; transition: none; }
  .trip-sheet__head { padding: 12px 16px 4px; cursor: auto; touch-action: auto; user-select: auto; }
  .trip-sheet__grip,
  .trip-sheet__toggle,
  .trip-sheet__peek { display: none; }
  .trip-sheet[data-sheet-ready] { transform: none; transition: none; }
  .trip-sheet[data-sheet-ready][data-snap="peek"] .trip-sheet__body { visibility: visible; }
  .trip-sheet__body { padding-bottom: 24px; }
}

@media (min-width: 64em) {
  .trip-card { margin: 20px 20px 12px; }
  .trip-sheet__head { padding-inline: 20px; }
  .trip-sheet__body { padding-inline: 20px; }
}

@media (min-width: 1200px) {
  .planner { grid-template-columns: 26rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .trip-sheet[data-sheet-ready],
  .planner .leaflet-bottom { transition: none; }
}

@media (forced-colors: active) {
  .trip-field.is-active,
  .route.is-selected .route__head { outline: 3px solid CanvasText; }
  .placard { border-color: CanvasText; }
}

/* ── Phones: a compact search card that folds to one line ── */

.trip-collapse,
.trip-summary { display: none; }

@media (max-width: 899.98px) {
  .trip-card { top: 6px; inset-inline: 6px; padding: 6px; border-radius: 16px; }
  .trip-fields { grid-template-columns: 24px minmax(0, 1fr) 40px; gap: 4px; }
  .trip-mark { width: 12px; height: 12px; border-width: 2px; }
  .trip-rail { margin-block: 22px; }
  .trip-field__input { height: 40px; padding: 0 10px; font-size: 0.9375rem; }
  .trip-field__clear { width: 40px; height: 40px; }
  .trip-swap { width: 40px; height: 40px; }
  .trip-card__row { margin-top: 4px; padding-inline-start: 28px; }

  .trip-collapse {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    margin-inline-start: auto;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--navy);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }
  .trip-collapse .ticon { width: 16px; height: 16px; transform: rotate(90deg); }
  .trip-collapse:hover { background: var(--surface); }
  .trip-collapse:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

  .trip-card.is-collapsed .trip-fields,
  .trip-card.is-collapsed .trip-card__row { display: none; }
  .trip-card.is-collapsed .trip-summary:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--navy);
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  .trip-summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
  .trip-summary__mark { flex: none; width: 10px; height: 10px; border: 2px solid var(--navy); }
  .trip-summary__mark--from { border-radius: 999px; background: var(--yellow); }
  .trip-summary__mark--to { border-radius: 2px; background: var(--teal); }
  .trip-summary__text { flex: 1 1 0; min-width: 0; overflow: hidden; font-size: 0.9375rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .trip-summary__arrow { flex: none; color: var(--muted); }
  .trip-summary__edit { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--surface); font-size: 0.8125rem; font-weight: 700; }
}

/* Where the suggested lines run («دمشق» / «ريف دمشق»). */
.route__gov { color: var(--muted); font-size: 0.8125rem; }
.placard__name .verified { margin-inline-start: 3px; vertical-align: -2px; }
.placard__name .verified .ticon { width: 16px; height: 16px; }

/* ══ The chosen option and «ابدأ الرحلة» (trip/live.blade.php, js/trip-live.js) ══
 *
 * Steps view: back to the options, the option at a glance, its steps, then
 * a teal «ابدأ الرحلة». Live: the sheet head carries a navy route board (the
 * band of the placard, in the colour of the line, on top) with the distance
 * left in big figures and a rail (the brand's line between stops) where a
 * yellow stop, you, moves towards the alighting stop. Near the stop the board
 * turns yellow and its title changes («اقتربت من نقطة النزول»).
 */

.steps-view { padding: 0 0 8px; }
.steps-view__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-inline-start: -10px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--navy);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
/* The «next» chevron points to the end (left); back points to the start (right). */
.steps-view__back .ticon { width: 18px; height: 18px; transform: scaleX(-1); }
.steps-view__back:hover { background: var(--surface); }
.steps-view__back:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
/* «الخيارات» at the start, «شارك الرحلة» at the end of the same row. */
.steps-view__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.steps-view__share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.steps-view__share .ticon { width: 18px; height: 18px; }
.steps-view__share:hover { background: var(--surface); }
.steps-view__share:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.steps-view__head { display: grid; gap: 10px; margin: 4px 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.steps-view__head:empty { display: none; }

/* Where the rider is while live: the current step stands out, the ones behind fade. */
.trip-step[aria-current="step"] .trip-step__icon { border-color: var(--navy); background: var(--yellow); color: var(--navy); }
.trip-step--ride[aria-current="step"] .trip-step__icon { border-color: var(--line); background: var(--line); color: var(--white); }
.trip-step.is-done .trip-step__text { color: var(--muted); }

/* The steps body ends --sheet-hidden lower (the part of the sheet below the screen at «half»), so
   every step can scroll up into view and the bar below sticks to the bottom of what is on screen
   (sticky offsets count from inside the padding). js/sheet.js sets --sheet-hidden. */
.trip-sheet[data-phase="steps"] .trip-sheet__body {
  padding-bottom: calc(var(--sheet-hidden, 0px) + 24px);
  /* Keyboard focus never lands under the bar (80 px + the 24 px band under it). */
  scroll-padding-bottom: calc(var(--sheet-hidden, 0px) + 104px);
}
.live-start {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 4px -16px 0;
  padding: 14px 16px 12px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--white) 14px);
  box-shadow: 0 24px 0 var(--white);   /* covers the 24 px under it */
}
/* The bar sticks within the whole sheet body, not only below the disclaimer: on a short screen
   at «half» it may cover the top of the body, never fall off its bottom. */
.trip-sheet[data-phase="steps"] .trip-state,
.trip-sheet[data-phase="steps"] .steps-view { display: contents; }

@media (max-width: 899.98px) {
  /* The head stays short at «half»: the line names show in full in the steps and the strip. */
  .trip-sheet[data-phase="steps"] .trip-sheet__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}
@media (max-width: 899.98px) and (max-height: 700px) {
  .live-start { padding-block: 10px 8px; }
  .live-start .live-start__btn { min-height: 48px; }
}
.live-start__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: var(--navy);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(22, 184, 166, 0.75);
}
.live-start__btn .ticon { width: 20px; height: 20px; transform: rotate(-90deg); }
.live-start__btn:hover { background: #13A493; }
.live-start__btn:active { box-shadow: 0 3px 8px -4px rgba(22, 184, 166, 0.6); transform: translateY(1px); }
.live-start__btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.live-start__note,
.live__privacy { display: flex; align-items: flex-start; gap: 6px; margin: 16px 0 0; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }
.live-start__note .ticon,
.live__privacy .ticon { width: 16px; height: 16px; margin-top: 2px; }

/* ── The live card (sheet head: visible at every height and in the side panel) ── */

.planner .trip-sheet[data-phase="live"] .trip-sheet__peek { display: block; }
.trip-sheet[data-phase="live"] .trip-sheet__toggle { display: none; }
/* Live and at the end, the search card and the map prompt step aside: the map and the board get the room. */
.planner[data-phase="live"] .trip-card,
.planner[data-phase="end"] .trip-card,
.planner[data-phase="live"] .map-hint { display: none; }

.live { display: grid; gap: 10px; margin-top: 2px; }
.live-board {
  --progress: 0;
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(20, 45, 78, 0.26);
}
/* The band of the placard: the colour of the line being ridden. */
.live-board::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 5px; background: var(--line, var(--teal)); }
.live-board__top { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 0.875rem; font-weight: 700; color: rgba(255, 255, 255, 0.84); }
.live-board__dot { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--teal); }
.live-board__line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-board__leg { flex: none; margin-inline-start: auto; padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 0.8125rem; white-space: nowrap; }
.live-board__leg:empty { display: none; }
.live-board__title { margin: 10px 0 0; font-size: 1.125rem; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.live-board__km {
  display: inline-block;
  margin-inline: 2px;
  font: 800 2.75rem/1 var(--shell-display, var(--font));
  font-variant-numeric: tabular-nums;
  color: var(--yellow);
  direction: ltr;
  unicode-bidi: isolate;
  vertical-align: -0.12em;
}
.live-board__place { font-weight: 800; }
.live-board__sub { margin: 6px 0 0; font-size: 0.9375rem; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }

/* The rail: from the boarding stop (start, right) to the alighting stop (end, left). */
.live-rail { position: relative; height: 20px; margin: 14px 8px 2px; }
.live-rail::before { content: ""; position: absolute; top: 50%; inset-inline: 0; height: 4px; margin-top: -2px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
.live-rail__done { position: absolute; top: 50%; inset-inline-start: 0; width: calc(var(--progress) * 100%); height: 4px; margin-top: -2px; border-radius: 999px; background: var(--line, var(--teal)); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.live-rail__me {
  position: absolute;
  top: 50%;
  inset-inline-start: calc(var(--progress) * 100%);
  width: 18px;
  height: 18px;
  margin-block-start: -9px;
  margin-inline-start: -9px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 2px var(--yellow);
  transition: inset-inline-start 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.live-rail__stop { position: absolute; top: 50%; inset-inline-end: 0; width: 16px; height: 16px; margin-block-start: -8px; margin-inline-end: -8px; border: 3px solid var(--white); border-radius: 4px; background: var(--navy); }

.live-board.is-waiting .live-rail { opacity: 0.35; }
.live-board.is-weak .live-board__sub { color: var(--yellow); font-weight: 700; }

/* ≤ 300 m: yellow board, navy text, a bigger title. */
.live-board.is-near { background: var(--yellow); color: var(--navy); box-shadow: 0 10px 26px rgba(196, 140, 20, 0.38); }
.live-board.is-near .live-board__top,
.live-board.is-near .live-board__sub { color: var(--navy); }
.live-board.is-near .live-board__leg { background: rgba(20, 45, 78, 0.12); }
.live-board.is-near .live-board__dot { background: var(--navy); }
.live-board.is-near .live-board__title { font: 800 1.625rem/1.3 var(--shell-display, var(--font)); }
.live-board.is-near .live-rail::before { background: rgba(20, 45, 78, 0.22); }
.live-board.is-near .live-rail__done { background: var(--navy); }
.live-board.is-near .live-rail__me { border-color: var(--yellow); background: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.live-board.is-near .live-rail__stop { border-color: var(--navy); background: var(--white); }

@media (prefers-reduced-motion: no-preference) {
  .live-board__dot { animation: live-ping 1.8s ease-out infinite; }
  .live-board.is-near { animation: live-nudge 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 2; }
}
@keyframes live-ping {
  0% { box-shadow: 0 0 0 0 rgba(22, 184, 166, 0.7); }
  75%, 100% { box-shadow: 0 0 0 9px rgba(22, 184, 166, 0); }
}
@keyframes live-nudge { 50% { transform: scale(1.025); } }

.live-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.live-notify,
.live-end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.live-notify[hidden] { display: none; }
.live-notify .ticon,
.live-end .ticon { width: 18px; height: 18px; }
.live-notify { flex: 0 1 auto; border: 1.5px solid var(--border-strong); background: var(--white); color: var(--navy); }
.live-notify:hover { border-color: var(--navy); }
/* On: teal, and the bell is filled (not colour alone). */
.live-notify[aria-pressed="true"] { border-color: #0B8F80; background: var(--teal-50); color: #0B5E55; }
.live-notify[aria-pressed="true"] .ticon { fill: currentColor; }
.live-end { flex: 1 1 10rem; border: 0; background: var(--navy); color: var(--white); }
.live-end .ticon { fill: currentColor; }
.live-end:hover { background: var(--navy-700); }
.live-notify:focus-visible,
.live-end:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.live__note { margin: 0; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }
/* Why following stopped (location denied, unavailable, outside): on top of the steps. */
.live__error { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #F4B8B2; border-radius: 12px; background: var(--danger-50); color: var(--danger); font-weight: 600; }
.live__privacy { margin: 0; }

/* You, on the map: the blue dot of «أنا» (me.css) with a halo. */
.live-me { display: grid; place-items: center; }
.live-me__dot { display: block; width: 20px; height: 20px; border: 3px solid var(--white); border-radius: 999px; background: var(--me); box-shadow: 0 0 0 7px var(--me-halo), 0 2px 6px rgba(20, 45, 78, 0.4); }

/* ── The end ── */

.trip-end { padding: 4px 0 8px; }
.trip-end__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.trip-verify { margin-bottom: 16px; padding: 14px; border: 1px solid #8CD9CF; border-radius: 16px; background: var(--teal-50); }
.trip-verify__lines { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-weight: 700; }
.trip-verify__privacy { margin: 8px 0 0; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }

@media (min-width: 900px) {
  .planner .trip-sheet[data-phase="live"] .trip-sheet__peek { margin-top: 8px; }
}
@media (min-width: 64em) {
  .live-start { margin-inline: -20px; padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-rail__done,
  .live-rail__me { transition: none; }
}

@media (forced-colors: active) {
  .live-board { border: 2px solid CanvasText; }
  .live-board.is-near { border-width: 4px; }
  .live-rail__me { forced-color-adjust: none; }
}
