.rider-app {
  background: #eef6f4;
}

.rider-app .shell {
  width: min(100%, 1480px);
  padding-top: 16px;
}

.rider-app .topbar {
  margin-bottom: 14px;
}

.rider-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.rider-mode-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(0, 166, 147, .12);
}

.rider-app .account-bar {
  margin: 0 0 14px;
}

.rider-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 430px);
  gap: 16px;
  min-height: min(760px, calc(100vh - 170px));
}

.rider-unified-map {
  min-height: 680px;
  border-radius: 30px;
  box-shadow: 0 22px 60px rgba(18, 51, 47, .14);
}

.rider-unified-map .map-chip {
  top: 18px;
  left: 18px;
  max-width: calc(100% - 220px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-controls {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-filter {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(18, 51, 47, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(18, 51, 47, .12);
  backdrop-filter: blur(14px);
}

.map-filter button,
.map-locate {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.map-filter button {
  padding: 8px 10px;
  border-radius: 999px;
}

.map-filter button.active {
  background: var(--ink);
  color: white;
}

.map-locate {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(18, 51, 47, .1);
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(18, 51, 47, .12);
  font-size: 18px;
}

.map-locate:disabled {
  opacity: .55;
}

.mobility-map-status {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(18, 51, 47, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(18, 51, 47, .13);
  backdrop-filter: blur(14px);
}

.mobility-map-status p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.mobility-map-status button {
  flex: 0 0 auto;
}

.ride-sheet {
  align-self: start;
  max-height: min(760px, calc(100vh - 170px));
  overflow: auto;
  padding: 22px;
  border-radius: 30px;
  box-shadow: 0 22px 60px rgba(18, 51, 47, .12);
}

.ride-sheet h1 {
  max-width: none;
  margin-bottom: 10px;
  font-size: clamp(31px, 3.2vw, 46px);
}

.ride-sheet .lede {
  margin-bottom: 16px;
  font-size: 14px;
}

.service-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.service-choice {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.service-choice:hover {
  border-color: var(--line-strong);
  background: var(--turquoise-subtle);
}

.service-choice.selected {
  border: 2px solid var(--turquoise);
  padding: 9px;
  background: var(--turquoise-soft);
}

.service-choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.service-choice[data-service="scooter"] .service-choice-icon {
  background: var(--turquoise);
}

.service-choice strong,
.service-choice small {
  display: block;
}

.service-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.booking-mode {
  min-width: 0;
}

.booking-mode .field-stack {
  margin-top: 8px;
}

.scooter-code-wrap {
  margin-bottom: 10px;
}

.scooter-nearby-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
}

.scooter-nearby-heading strong {
  font-size: 13px;
}

.scooter-nearby-heading span {
  color: var(--muted);
  font-size: 11px;
}

.scooter-nearby-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  margin-bottom: 12px;
}

.nearby-scooter {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.nearby-scooter:hover,
.nearby-scooter.selected {
  border-color: var(--turquoise);
  background: var(--turquoise-subtle);
}

.nearby-scooter-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--turquoise);
  color: white;
  font-weight: 900;
}

.nearby-scooter strong,
.nearby-scooter small {
  display: block;
}

.nearby-scooter small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.mobility-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.mobility-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.mobility-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mobility-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.mobility-legend .scooter-dot {
  background: var(--turquoise);
}

.map-info {
  min-width: 130px;
  color: #12332f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.45;
}

.rider-app .history-panel {
  margin-top: 16px;
  padding: 24px 26px;
}

@media (max-width: 1000px) {
  .rider-map-layout {
    grid-template-columns: 1fr;
  }

  .rider-unified-map {
    min-height: 520px;
    order: 0;
  }

  .ride-sheet {
    max-height: none;
    order: 1;
  }
}

@media (max-width: 640px) {
  .rider-app {
    padding-bottom: 0;
  }

  .rider-app .shell {
    padding: 10px;
  }

  .rider-app .topbar {
    padding: 4px 4px 0;
  }

  .rider-mode-badge {
    padding: 8px 10px;
    font-size: 11px;
  }

  .rider-app .account-bar {
    margin-bottom: 10px;
    padding: 12px;
  }

  .rider-unified-map {
    min-height: 48vh;
    border-radius: 24px;
  }

  .rider-unified-map .map-chip {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 76px);
    padding: 9px 11px;
    font-size: 11px;
  }

  .map-controls {
    top: 58px;
    right: 12px;
    left: 12px;
    justify-content: space-between;
  }

  .map-filter button {
    padding: 7px 9px;
    font-size: 11px;
  }

  .map-locate {
    width: 38px;
    height: 38px;
  }

  .mobility-map-status {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 10px 11px;
  }

  .mobility-map-status p {
    font-size: 11px;
  }

  .mobility-map-status .secondary {
    padding: 9px 10px;
    font-size: 11px;
  }

  .ride-sheet {
    margin-top: -2px;
    padding: 18px;
    border-radius: 24px;
  }

  .ride-sheet h1 {
    font-size: 34px;
  }

  .service-choice {
    grid-template-columns: 36px 1fr;
    min-height: 56px;
    padding: 8px;
  }

  .service-choice.selected {
    padding: 7px;
  }

  .service-choice-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
}

.map-search {
  position: absolute;
  z-index: 5;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 112px));
  min-height: 48px;
  border: 1px solid rgba(18,51,47,.12);
  border-radius: 999px;
  background: #fff;
  color: #38534f;
  text-align: left;
  padding: 0 20px;
  box-shadow: 0 10px 28px rgba(18,51,47,.16);
  font: inherit;
}

.sheet-handle {
  display: none;
  width: 100%;
  height: 30px;
  border: 0;
  background: transparent;
}

.sheet-handle span {
  display: block;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #c7d6d3;
  margin: auto;
}

.rider-nav {
  position: static;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 680px;
  margin: 16px auto 0;
  padding: 8px;
  border: 1px solid rgba(18,51,47,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(18,51,47,.09);
}

.rider-nav a {
  min-width: 116px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 14px;
  color: #38534f;
  text-decoration: none;
  font-weight: 700;
}

.rider-nav a[aria-current="page"] {
  color: #007f73;
  background: #e6f7f4;
}

@media (max-width: 760px) {
  .rider-app .shell {
    padding-bottom: 94px;
  }

  .sheet-handle {
    display: block;
  }

  .ride-sheet {
    transition: max-height .25s ease;
    max-height: 74vh;
    overflow: auto;
  }

  .ride-sheet.collapsed {
    max-height: 92px;
    overflow: hidden;
  }

  .map-search {
    top: 56px;
  }

  .rider-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    margin: 0;
    justify-content: space-around;
    box-shadow: 0 12px 34px rgba(18,51,47,.18);
    backdrop-filter: blur(18px);
  }

  .rider-nav a {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
    font-size: 12px;
  }
}
