/* =====================================================================================
   Ride together: the hub (/rides), invite preview and the live ride screen (/ride/:code).
   Phone first: big touch targets, high contrast for sunlight, one-handed reach (actions sit
   low on the screen). Built only from base.css tokens, so light and dark themes just work.
   ===================================================================================== */

/* ---------- Navigation: "you're in a ride" ---------- */
.ride-pill,
.ride-side-icon {
  position: relative;
}
.ride-pill {
  color: var(--ok);
}
.ride-pill__dot {
  position: absolute;
  top: 7px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--bg);
  animation: ride-blink 2s var(--ease) infinite;
}
.ride-side-icon .ride-pill__dot {
  top: -2px;
  right: -3px;
}
.ride-side-live {
  color: var(--ok) !important;
  font-weight: 800 !important;
}
@keyframes ride-blink {
  50% {
    opacity: 0.35;
  }
}

/* ---------- Hub ---------- */
.rides {
  display: grid;
  gap: 18px;
}
.rides-hero {
  display: grid;
  justify-items: center;
  padding: 10px 0 2px;
  text-align: center;
}
.rides-hero__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 22px;
  color: #fff;
  background: var(--brand);
  box-shadow:
    var(--shadow-brand),
    inset 0 1px 0 rgb(255 255 255 / 0.3);
}
.rides-hero__title {
  margin: 0;
  font-size: clamp(38px, 9vw, 48px);
  line-height: 1;
}
.rides-hero__title em {
  color: var(--accent);
}
.rides-hero__lead {
  max-width: 30em;
  margin: 10px 0 12px;
  font-size: 16px;
  color: var(--text-2);
}
.rides-hero__points {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.rides-hero__points li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rides-hero__points .icon {
  color: var(--accent);
}
.rides-section {
  margin: 0;
}
.rides-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
}
.rides-form {
  display: grid;
  gap: 12px;
}
.rides-form .field__hint a {
  font-weight: 700;
}
.rides-code {
  text-align: center;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.rides-code::placeholder {
  letter-spacing: 0.24em;
  font-weight: 700;
}
.rides-found {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.rides-found .alert {
  margin: 0;
}
[data-join-result] .alert {
  margin: 0;
}
.ride-list {
  display: grid;
  gap: 8px;
}
.rides-fine {
  margin-top: 10px;
}

.ride-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--text);
  text-decoration: none !important;
  transition:
    border-color var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}
.ride-card:hover {
  border-color: var(--line-2);
}
.ride-card:active {
  transform: scale(0.99);
}
.ride-card--current {
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: linear-gradient(135deg, var(--ok-soft), transparent 70%), var(--surface);
}
.ride-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--text-2);
}
.ride-card--current .ride-card__icon {
  color: #fff;
  background: var(--ok);
}
.ride-card__body {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.ride-card__name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ride-card__meta {
  font-size: 13px;
  color: var(--text-2);
}
.ride-card__voice {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold-2) 18%, transparent);
  color: var(--gold-text);
}
.ride-card__open {
  flex: none;
}
.ride-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
  animation: ride-blink 2s var(--ease) infinite;
}

/* Invite preview */
.ride-preview {
  display: grid;
  gap: 16px;
}
.ride-preview__leader {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ride-preview__kicker {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-2);
}
.ride-preview__name {
  margin: 2px 0 0;
  font-size: 32px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.ride-preview--compact .ride-preview__name {
  font-size: 26px;
}
.ride-preview__facts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}
.ride-preview__facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ride-preview__facts .icon {
  margin-top: 2px;
  color: var(--accent);
}
.ride-preview--compact {
  padding: 14px;
  border-radius: var(--radius-l);
  background: var(--surface-2);
}
.ride-invite {
  display: grid;
  gap: 18px;
}
.ride-invite__fine {
  text-align: center;
}
.ride-gone {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 32px 22px;
  text-align: center;
}
.ride-gone__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.ride-gone__title {
  margin: 0;
  font-size: 22px;
}
.ride-gone p {
  margin: 0 0 16px;
}

/* ---------- Sheets: confirm, invite, settings ---------- */
.ride-sheet__text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.ride-sheet__text strong {
  color: var(--text);
}
.ride-sheet__actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.invite {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.invite__label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.invite__code {
  margin: -4px 0 4px;
  font-size: clamp(36px, 11vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.invite__qr {
  width: min(220px, 62vw);
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-1);
}
.invite__qr .qr {
  display: block;
  width: 100%;
  height: auto;
}
.invite__hint {
  max-width: 26em;
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}
.invite__link {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
.invite__url {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  overflow: hidden;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}
.invite__link .btn {
  flex: none;
  min-height: 48px;
}
.invite__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.invite__actions .btn {
  flex: 1 1 140px;
}

.ride-settings {
  display: grid;
  gap: 10px;
}
.ride-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.ride-switch.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ride-switch__text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.ride-switch__text strong {
  font-size: 15.5px;
}
.ride-switch__text small {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
}
.ride-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ride-switch__track {
  position: relative;
  width: 52px;
  height: 32px;
  flex: none;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  transition: background-color var(--dur-2) var(--ease);
}
.ride-switch__track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform var(--dur-2) var(--ease-spring);
}
.ride-switch input:checked + .ride-switch__track {
  background: var(--ok);
  border-color: transparent;
}
.ride-switch input:checked + .ride-switch__track span {
  transform: translateX(20px);
}
.ride-switch input:focus-visible + .ride-switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ride-settings__note {
  display: flex;
  gap: 10px;
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-m);
  background: var(--blue-soft);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.ride-settings__note .icon {
  margin-top: 1px;
  color: var(--blue);
}
.ride-settings .ride-sheet__actions {
  margin-top: 8px;
}

/* =====================================================================================
   Live ride screen
   ===================================================================================== */
html.ride-live body {
  overflow: hidden;
}
html.ride-live .verify-banner {
  display: none;
}
html.ride-live .page--enter {
  animation-name: fade-in;
}
@media (max-width: 1023.98px) {
  /* The ride screen has its own header and panel: the app bars step aside. */
  html.ride-live .topbar,
  html.ride-live .tabbar {
    display: none !important;
  }
  html.ride-live .toasts {
    top: calc(var(--safe-t) + 80px);
    bottom: auto;
  }
}

.rl {
  --panel-open: min(50dvh, 460px);
  --overlap: 20px;
  position: fixed;
  z-index: 1;
  inset: 0 0 0 var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.rl--voice {
  --panel-open: min(57dvh, 540px);
}
.rl__stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.rl__map.map {
  position: absolute;
  inset: 0 0 calc(var(--overlap) * -1);
  height: auto;
  border: 0;
  border-radius: 0;
}
.rl__map--offline::before {
  content: 'The map could not load. Check your signal.';
  position: absolute;
  inset: 40% 20px auto;
  text-align: center;
  font-weight: 700;
  color: var(--text-2);
}
.rl .leaflet-bottom {
  bottom: var(--overlap);
}
.rl .leaflet-control-zoom {
  display: none;
}
.rl .leaflet-control-attribution {
  font-size: 10px;
}

/* Header */
.rl__head {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-t) + 8px);
  left: calc(8px + var(--safe-l));
  right: calc(8px + var(--safe-r));
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 60px;
  padding: 6px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2);
}
.rl__title {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}
.rl__name {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rl__sub {
  display: flex;
  align-items: center;
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  white-space: nowrap;
}
.rl__conn {
  width: 9px;
  height: 9px;
  flex: none;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--text-3);
}
.rl__conn.is-live {
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: rl-live 2.4s var(--ease) infinite;
}
.rl__conn.is-wait {
  background: var(--warn);
}
.rl__conn.is-off {
  background: var(--danger);
}
/* No internet, riding on with the phones close by (Bluetooth and Wi-Fi Direct, in the app) */
.rl__conn.is-mesh {
  margin-top: 4px;
  background: var(--blue);
}
.rl--mesh .rl__sub {
  align-items: flex-start;
  line-height: 1.3;
  white-space: normal;
}
.rl--mesh .rl__sep,
.rl--mesh [data-rl-count] {
  display: none;
}
/* The header is a line taller then: alerts start under it. */
.rl--mesh .rl__alerts {
  top: calc(var(--safe-t) + 86px);
}
@keyframes rl-live {
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
}
.rl__hbtn {
  flex: none;
}
.rl__sep {
  margin: 0 6px;
  color: var(--text-3);
}

/* Alerts and SOS banners */
.rl__alerts {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-t) + 76px);
  left: calc(8px + var(--safe-l));
  right: calc(8px + var(--safe-r));
  display: grid;
  gap: 6px;
  pointer-events: none;
}
.rl__alerts > * {
  pointer-events: auto;
}
.rl-alert {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 4px 4px 4px 8px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1);
  animation: rl-drop 320ms var(--ease) both;
}
@keyframes rl-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
.rl-alert__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
}
.rl-alert--lost .rl-alert__icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.rl-alert__text {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  align-content: center;
  cursor: pointer;
}
.rl-alert__text small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.rl-alert__x {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-2);
}
.rl-alert__x:hover {
  background: var(--surface-2);
}
.rl-alert-more {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.rl-sos {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: #d91f26;
  color: #fff;
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 0.85),
    0 16px 40px -12px rgb(217 31 38 / 0.8);
  animation: rl-sos 1.2s var(--ease) infinite alternate;
}
@keyframes rl-sos {
  to {
    box-shadow:
      0 0 0 3px rgb(255 255 255 / 0.85),
      0 0 0 10px rgb(217 31 38 / 0.35),
      0 16px 40px -12px rgb(217 31 38 / 0.8);
  }
}
.rl-sos__top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rl-sos__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  color: #d91f26;
}
.rl-sos__text {
  display: grid;
  min-width: 0;
}
.rl-sos__text strong {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}
.rl-sos__text span {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.95;
}
.rl-sos__actions {
  display: flex;
  gap: 8px;
}
.rl-sos__actions .btn {
  flex: 1;
  min-height: 48px;
  padding: 0 12px;
  font-size: 15px;
}
.rl-sos__show {
  background: #fff !important;
  color: #b3141a !important;
}
.rl-sos__ok {
  background: rgb(255 255 255 / 0.18) !important;
  color: #fff !important;
  border-color: rgb(255 255 255 / 0.5) !important;
}

/* Map buttons */
.rl__mapctl {
  position: absolute;
  z-index: 3;
  left: calc(10px + var(--safe-l));
  right: calc(10px + var(--safe-r));
  bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.rl__mapctl > * {
  pointer-events: auto;
}
.rl__geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: 62%;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.rl__geo span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl__geo-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
}
.rl__geo.is-ok .rl__geo-dot {
  animation: rl-live 2.4s var(--ease) infinite;
}
.rl__geo.is-wait .rl__geo-dot {
  background: var(--warn);
}
.rl__geo.is-paused .rl__geo-dot {
  background: var(--text-3);
}
.rl__geo.is-bad {
  color: var(--danger);
}
.rl__geo.is-bad .rl__geo-dot {
  background: var(--danger);
}
.rl__fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 52px;
  height: 52px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2);
  color: var(--ok);
  font-size: 14px;
  font-weight: 800;
}
.rl__fab-label {
  display: none;
  color: var(--text);
}

/* Walkie-talkie with riders close by (offline riding): press and hold, or Open mic (hands-free)
   in a small switch above it */
.rl__walkie {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
  /* Only the buttons take taps: the map still drags beside them. */
  pointer-events: none;
}
.rl__walkie > button {
  pointer-events: auto;
}
.rl__walkie[hidden],
.rl__open[hidden] {
  display: none;
}
.rl__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.rl__open-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--text-3);
}
.rl__open[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.rl__open[aria-pressed='true'] .rl__open-dot {
  background: #fff;
}
.rl__open:disabled {
  opacity: 0.6;
}
.rl__talk {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2);
  color: var(--blue);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.rl__talk[hidden] {
  display: none;
}
.rl__talk.is-on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 30%, transparent), var(--shadow-2);
}
.rl__talk.is-hearing {
  border-color: var(--ok);
  color: var(--ok);
}
/* Open mic is on: the button glows (riders close by hear you); a tap closes it. */
.rl__talk.is-open {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  animation: rl-open 2s var(--ease) infinite;
}
@keyframes rl-open {
  0%,
  100% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent), var(--shadow-2);
  }
  50% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--blue) 18%, transparent), var(--shadow-2);
  }
}
.rl__talk-who {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  max-width: 200px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.rl__talk-who:empty {
  display: none;
}
.rl__fab.is-off {
  color: var(--accent);
}
.rl__fab.is-off .rl__fab-label {
  display: inline;
}

/* Nobody has shared a location yet */
.rl__waiting {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, calc(100% - 40px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text-2);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.rl__waiting .icon {
  color: var(--accent);
}

/* SOS countdown */
.rl__hold {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 96px;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: min(320px, calc(100% - 32px));
  padding: 14px 18px 16px;
  border-radius: 20px;
  background: #d91f26;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 40px -12px rgb(217 31 38 / 0.8);
  transform: translateX(-50%);
}
.rl__hold strong {
  font-size: 17px;
  font-weight: 850;
}
.rl__hold span {
  font-size: 14px;
  font-weight: 600;
}
.rl__hold b {
  font-size: 30px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.rl__hold-bar {
  width: 100%;
  height: 6px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.3);
}
.rl__hold-bar span {
  display: block;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.rl__hold--hint {
  background: var(--glass-strong);
  color: var(--text);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2);
}
.rl__hold--hint span {
  color: var(--text-2);
}

/* Bottom panel (side panel on wide screens) */
.rl__panel {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  height: var(--panel-open);
  margin-top: calc(var(--overlap) * -1);
  padding: 0 0 var(--safe-b);
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -10px 30px -12px rgb(0 0 0 / 0.35);
  transition: height var(--dur-3) var(--ease-sheet);
}
.rl--min .rl__panel {
  height: auto;
}
.rl--min .rl__pane {
  display: none;
}
.rl__grab {
  display: grid;
  place-items: center;
  height: 24px;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.rl__grab span {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-2);
}
.rl__voice {
  flex: none;
  padding: 0 12px;
}
.rl__voice:empty {
  display: none;
}
.rl__tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.rl--min .rl__tabs {
  border-bottom: 0;
  padding-bottom: calc(10px + var(--safe-b));
}
.rl__tablist {
  display: flex;
  flex: 1;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.rl__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 750;
  transition:
    background-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}
.rl__tab[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.rl--min .rl__tab[aria-selected='true'] {
  background: none;
  color: var(--text-2);
  box-shadow: none;
}
.rl__badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--brand-3);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
}
.rl__count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
}

/* SOS: press and hold */
.rl__sos {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6b6b, #d91f26 60%, #a8121a);
  color: #fff;
  box-shadow:
    0 8px 20px -6px rgb(217 31 38 / 0.75),
    inset 0 1px 0 rgb(255 255 255 / 0.35);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform var(--dur-2) var(--ease);
}
.rl__sos-text {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.rl__sos-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#d91f26 calc(var(--p) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}
.rl__sos.is-holding {
  transform: scale(1.08);
}

/* Panes */
.rl__pane {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.rl__pane[hidden] {
  display: none;
}
.rl__msgs {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 10px 12px 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.rl__empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 10px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-2);
}
.rl__empty strong {
  font-size: 15px;
  color: var(--text);
}
.rl__empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}

.rm {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 8px;
}
.rm--mine {
  justify-content: flex-end;
}
.rm__avatar .avatar {
  box-shadow: 0 0 0 2px var(--c);
}
.rm__bubble {
  display: grid;
  max-width: min(80%, 420px);
  padding: 7px 12px 6px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-2);
}
.rm--mine .rm__bubble {
  border-radius: 18px 18px 6px 18px;
  background: color-mix(in srgb, var(--brand-2) 22%, var(--surface-2));
}
.rm__name {
  font-size: 12.5px;
  font-weight: 800;
  color: color-mix(in srgb, var(--c) 72%, var(--text));
}
.rm__body {
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.rm--quick .rm__body {
  font-size: 17px;
  font-weight: 800;
}
.rm__time {
  justify-self: end;
  font-size: 11px;
  color: var(--text-3);
}
.rm--system {
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}
.rm--system time {
  opacity: 0.8;
}
.rm--sos {
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--text);
}
.rm__sos-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: #d91f26;
  color: #fff;
}
.rm__sos-body {
  display: grid;
  flex: 1;
  min-width: 0;
  font-size: 14px;
}
.rm__sos-body strong {
  font-size: 15px;
  color: var(--danger);
}
.rm__sos-body time {
  font-size: 11.5px;
  color: var(--text-3);
}
.rm__sos-show {
  flex: none;
}

.rl__compose {
  flex: none;
  padding: 8px 0 10px;
  border-top: 1px solid var(--line);
}
.rl__quick {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: 12px;
}
.rl__quick::-webkit-scrollbar {
  display: none;
}
.rl__chip {
  flex: none;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 750;
  white-space: nowrap;
  transition:
    background-color var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}
.rl__chip:hover {
  background: var(--surface-3);
}
.rl__chip:active {
  transform: scale(0.96);
}
.rl__chip:disabled {
  opacity: 0.5;
}
.rl__form {
  display: flex;
  gap: 8px;
  padding: 0 12px;
}
.rl__input {
  flex: 1;
  min-width: 0;
  min-height: 48px !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
}
.rl__send {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-brand);
}
.rl__send:disabled {
  opacity: 0.5;
}

/* Riders */
.rl__pane--riders {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rl__riders {
  margin: 0;
  padding: 6px 8px;
  list-style: none;
}
.rr {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 16px;
}
.rr + .rr {
  border-top: 1px solid var(--line);
}
.rr__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 64px;
  padding: 8px 6px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.rr__main:hover {
  background: var(--surface-2);
}
.rr__avatar .avatar {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5.5px var(--c);
  transition: box-shadow var(--dur-2) var(--ease);
}
.rr.is-speaking .rr__avatar .avatar {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5.5px var(--c),
    0 0 0 10px color-mix(in srgb, var(--c) 35%, transparent);
}
.rr--lost .rr__avatar,
.rr--paused .rr__avatar {
  filter: grayscale(1);
  opacity: 0.7;
}
.rr__body {
  display: grid;
  flex: 1;
  min-width: 0;
}
.rr__name {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 800;
  white-space: nowrap;
}
.rr__role {
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-2) 20%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.rr__voice {
  display: inline-grid;
  color: var(--ok);
}
/* The walkie-talkie reaches this rider straight from your phone. */
.rr__walkie {
  display: inline-grid;
  color: var(--blue);
}
.rr__status {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rr__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
}
.rr--stopped .rr__dot {
  background: var(--warn);
}
.rr--lost .rr__dot,
.rr--paused .rr__dot {
  background: var(--danger);
}
.rr--none .rr__dot {
  background: var(--text-3);
}
.rr--lost .rr__status {
  color: var(--danger);
}
.rr__ago {
  color: var(--text-3);
}
.rr__dist {
  flex: none;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rr__remove {
  flex: none;
  color: var(--text-2);
}
.rl__leave {
  display: grid;
  gap: 8px;
  padding: 10px 12px 14px;
}

/* Voice */
.rv-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
}
.rv-note .icon {
  color: var(--text-3);
}
.rv-note a {
  font-weight: 750;
  white-space: nowrap;
}
.rv-join {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.rv-join__btn {
  flex: none;
  min-height: 48px;
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}
.rv-join__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-2);
}
.rv {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}
.rv__row {
  display: flex;
  gap: 6px;
}
.rv__talk {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 64px;
  padding: 8px 12px 8px 8px;
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  border-radius: 20px;
  background: var(--ok-soft);
  color: var(--text);
  text-align: left;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    background-color var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}
.rv__talk:disabled {
  opacity: 0.55;
}
.rv__talk-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
}
.rv__talk-text {
  display: grid;
  min-width: 0;
}
.rv__talk-text strong {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.15;
  /* "Hold to talk" may wrap onto two lines on narrow phones rather than being cut off. */
  overflow-wrap: anywhere;
}
.rv__talk-text small {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv__talk.is-live {
  background: var(--ok);
  color: #fff;
  transform: scale(0.99);
}
.rv__talk.is-live small {
  color: rgb(255 255 255 / 0.85);
}
.rv__talk.is-live .rv__talk-icon {
  background: #fff;
  color: var(--ok);
  animation: rv-talk 1.2s var(--ease) infinite;
}
@keyframes rv-talk {
  50% {
    box-shadow: 0 0 0 8px rgb(255 255 255 / 0.3);
  }
}
.rv__tool {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 60px;
  white-space: nowrap;
  min-height: 64px;
  flex: none;
  padding: 4px 2px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
}
.rv__tool[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.rv__tool:disabled {
  opacity: 0.45;
}
.rv__tool--leave {
  color: var(--danger);
}
.rv__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.rv__dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
}
.rv.is-busy .rv__dot {
  animation: rl-live 1.2s var(--ease) infinite;
}
.rv.is-reconnecting .rv__dot {
  background: var(--warn);
}
.rv__play {
  min-height: 32px;
}
.rv__safety {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.rl__audio {
  display: none;
}

/* Pins */
.rpin-wrap {
  background: none;
  border: 0;
}
.rpin {
  --c: var(--accent);
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transition:
    opacity var(--dur-3) var(--ease),
    filter var(--dur-3) var(--ease);
}
/* Leaflet sizes marker images to their natural width; photos must fill their circle. */
.leaflet-container .leaflet-marker-pane .rpin__face img {
  width: 100%;
  height: 100%;
}
.rpin__face .avatar {
  --s: 40px;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px var(--c),
    0 0 0 5px #fff,
    0 8px 18px -4px rgb(0 0 0 / 0.55);
}
.rpin--me .rpin__face .avatar {
  --s: 44px;
  box-shadow:
    0 0 0 3.5px var(--c),
    0 0 0 6.5px #fff,
    0 0 0 9px color-mix(in srgb, var(--c) 45%, transparent),
    0 8px 18px -4px rgb(0 0 0 / 0.55);
}
.rpin__label {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  display: flex;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.rpin__meta {
  font-weight: 650;
  color: var(--text-2);
}
.rpin__meta:empty,
.rpin__more:empty {
  display: none;
}
.rpin__more {
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 800;
}
/* Riders bunched together: only one name label per spot (see declutter() in live.js). */
.rpin-wrap.is-crowded .rpin__label {
  display: none;
}
.rpin__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.rpin.is-lost {
  opacity: 0.6;
  filter: grayscale(1);
}
.rpin.is-stopped .rpin__label {
  border-color: color-mix(in srgb, var(--warn) 60%, transparent);
}
.rpin.is-speaking .rpin__pulse {
  animation: rpin-pulse 1s var(--ease) infinite;
  box-shadow: 0 0 0 0 var(--c);
}
/* Talking on group voice: a steady green ring and a mic badge, plus the pulse. */
.rpin.is-speaking .rpin__face .avatar {
  box-shadow:
    0 0 0 3px var(--c),
    0 0 0 5px #fff,
    0 0 0 9px var(--ok),
    0 8px 18px -4px rgb(0 0 0 / 0.55);
}
.rpin.is-speaking .rpin__name::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}
.rpin.is-sos .rpin__pulse {
  animation: rpin-sos 0.9s var(--ease) infinite;
  box-shadow: 0 0 0 0 #d91f26;
}
.rpin.is-sos .rpin__label {
  background: #d91f26;
  border-color: #d91f26;
  color: #fff;
}
.rpin.is-sos .rpin__meta {
  color: rgb(255 255 255 / 0.85);
}
@keyframes rpin-pulse {
  to {
    box-shadow: 0 0 0 16px transparent;
  }
}
@keyframes rpin-sos {
  to {
    box-shadow: 0 0 0 26px transparent;
  }
}
.leaflet-marker-icon.is-flash .rpin {
  animation: rpin-flash 900ms var(--ease-spring);
}
@keyframes rpin-flash {
  30% {
    transform: scale(1.35);
  }
}
.rpin-accuracy {
  fill: var(--blue);
  fill-opacity: 0.1;
  stroke: var(--blue);
  stroke-opacity: 0.35;
}
.sos-pin {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #d91f26;
  background: rgb(217 31 38 / 0.16);
  box-shadow: 0 0 0 0 rgb(217 31 38 / 0.6);
  animation: rpin-sos 0.9s var(--ease) infinite;
  pointer-events: none;
}
.sos-pin span {
  position: absolute;
  top: -13px;
  left: 50%;
  padding: 1px 8px;
  border-radius: 999px;
  background: #d91f26;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
}

/* Ride over */
.rl-over {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.rl-over__card {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(400px, 100%);
  padding: 28px 22px 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  text-align: center;
}
.rl-over__card h2 {
  margin: 0;
  font-size: 21px;
}
.rl-over__card p {
  margin: 0 0 14px;
  color: var(--text-2);
}
.rl-over__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}

/* Small phones: a little tighter */
@media (max-width: 380px) {
  .rv__tool {
    width: 54px;
    font-size: 10.5px;
  }
  .rv__talk {
    gap: 8px;
    padding-right: 8px;
  }
  .rv__talk-icon {
    width: 40px;
    height: 40px;
  }
  .rl__tab {
    gap: 5px;
    font-size: 14.5px;
  }
  .rl__chip {
    padding: 0 13px;
  }
}

/* Phones on their side, tablets and computers: the panel moves to the side. */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 560px) {
  .rl {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(400px, 44vw);
    /* One row, exactly as tall as the screen: a long chat scrolls inside the panel. */
    grid-template-rows: minmax(0, 1fr);
  }
  .rl__map.map {
    inset: 0;
  }
  .rl .leaflet-bottom {
    bottom: 0;
  }
  .rl__panel,
  .rl--min .rl__panel {
    height: auto;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    box-shadow: none;
    padding-top: 8px;
  }
  .rl--min .rl__pane {
    display: flex;
  }
  .rl--min .rl__pane[hidden] {
    display: none;
  }
  .rl--min .rl__tab[aria-selected='true'] {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-1);
  }
  .rl__grab {
    display: none;
  }
  .rl__mapctl {
    bottom: 22px;
  }
  .rl__hold {
    bottom: 40px;
  }
}
@media (min-width: 1024px) {
  /* Toasts over the middle of the map, clear of the chat box. */
  html.ride-live .toasts {
    bottom: 96px;
    left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w) - min(400px, 44vw)) / 2);
  }
  .rl__head,
  .rl__alerts {
    left: 16px;
    right: auto;
    width: min(460px, calc(100% - 100px));
  }
  .rl__head {
    top: 16px;
  }
  .rl__alerts {
    top: 88px;
  }
  .rl--mesh .rl__alerts {
    top: 98px;
  }
  .rl .leaflet-control-zoom {
    display: block;
  }
  .rl .leaflet-top.leaflet-right {
    top: 8px;
    right: 8px;
  }
  .rl__geo {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ride-pill__dot,
  .ride-live-dot,
  .rl__conn.is-live,
  .rl__geo.is-ok .rl__geo-dot,
  .rl-alert,
  .rl-sos,
  .rv__talk.is-live .rv__talk-icon,
  .rl__talk.is-open,
  .rv.is-busy .rv__dot,
  .rpin.is-speaking .rpin__pulse,
  .rpin.is-sos .rpin__pulse,
  .sos-pin,
  .leaflet-marker-icon.is-flash .rpin {
    animation: none !important;
  }
  .rpin.is-speaking .rpin__pulse {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 55%, transparent);
  }
  .rl__talk.is-open {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 30%, transparent), var(--shadow-2);
  }
  .rpin.is-sos .rpin__pulse,
  .sos-pin {
    box-shadow: 0 0 0 8px rgb(217 31 38 / 0.4);
  }
  .rl__panel,
  .ride-switch__track span {
    transition: none;
  }
}
