:root {
  --ink: #162b27;
  --muted: #64736f;
  --line: #dce5e1;
  --paper: #fff;
  --page: #eaf0ed;
  --brand: #0875e1;
  --brand-dark: #0754a8;
  --brand-cyan: #26c6eb;
  --accent: #ec765b;
  --navy: #0a1f4a;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--page);
  color: var(--ink);
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI", sans-serif;
}

.app-shell {
  max-width: 1040px;
  margin: 0 auto;
}

.driver-app {
  width: 100%;
}

.auth-card {
  border-radius: 20px;
  background: #ffffff;
}

.login-brand-mark {
  display: block;
  width: 144px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
}

.login-brand-title {
  color: #0a1f4a;
  font-weight: 750;
}

.login-brand-title strong {
  color: #0765d9;
}

.summary-box {
  background: linear-gradient(135deg, #0d6efd, #3d8bfd);
  color: white;
}

#totalFare {
  font-size: 2rem;
  font-weight: 700;
}

.card {
  border-radius: 18px;
}

.trip-heading {
  margin: 1rem 0 0.85rem;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
}

.app-topbar > div,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-lockup {
  min-width: 0;
  gap: 0.65rem !important;
}

.brand-mark {
  display: block;
  flex: 0 0 68px;
  width: 68px;
  height: 46px;
  object-fit: contain;
}

html[data-ui-theme="night"] .brand-mark {
  filter: drop-shadow(0 0 1px rgb(255 255 255 / 90%));
}

.brand-copy {
  display: grid !important;
  gap: 0.05rem !important;
  line-height: 1;
}

.brand-title {
  color: #fff;
  font-size: 1.42rem;
  font-weight: 750;
}

.brand-title strong {
  color: var(--brand-cyan);
}

.brand-subtitle {
  margin-top: 0.2rem;
  color: #e2f2ff;
  font-size: 0.68rem;
}

.settings-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  color: #fff;
  background: transparent;
  border: 0;
}

.settings-trigger i {
  font-size: 1.55rem;
  line-height: 1;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  color: #203a34;
  background: #fff;
  border: 1px solid rgb(19 63 52 / 12%);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgb(18 50 42 / 14%);
  font-size: 0.72rem;
  font-weight: 650;
}

.location-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #efad58;
  content: "";
}

.location-badge.is-connected::before {
  background: #16a56b;
}

.availability-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.7rem;
  background: #f3f7fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.availability-control .form-check-input {
  width: 2.6rem;
  height: 1.35rem;
  margin: 0;
  cursor: pointer;
}

.topbar-availability {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.topbar-availability-label {
  margin: 0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-availability .form-switch {
  margin: 0;
  padding-left: 0;
}

.topbar-availability .form-switch .form-check-input {
  float: none;
  width: 2.5rem;
  height: 1.3rem;
  margin: 0;
  cursor: pointer;
}

.topbar-availability .form-switch .form-check-input:checked {
  background-color: #36d8c6;
  border-color: #36d8c6;
}

.app-topbar .topbar-availability-status {
  max-width: 9rem;
  color: #e2f2ff !important;
  font-size: 0.66rem;
  line-height: 1.2;
}

.app-topbar .topbar-availability-status.text-danger {
  color: #ffd1d1 !important;
}

.nearby-taxis-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.6rem;
  color: #294459;
  background: #fff;
  border: 1px solid rgb(19 63 52 / 12%);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgb(18 50 42 / 10%);
  font-size: 0.7rem;
  font-weight: 650;
}

.map-status-chip {
  position: absolute;
  z-index: 500;
  bottom: 2.1rem;
  left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.map-center-btn {
  position: absolute;
  z-index: 600;
  right: 1rem;
  bottom: 2.1rem;
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  place-items: center;
  color: var(--brand);
  border: 1px solid rgb(0 72 160 / 12%);
  border-radius: 50% !important;
  box-shadow: 0 4px 18px rgb(14 50 90 / 18%);
}

.map-center-btn i {
  font-size: 1.35rem;
}

body.fare-open .map-center-btn {
  bottom: calc(min(38dvh, 330px) + 2.1rem);
}

body.fare-open .map-status-chip {
  bottom: calc(min(38dvh, 330px) + 2.1rem);
}

.pickup-map-icon span {
  display: block;
  width: 22px;
  height: 22px;
  background: #14966a;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgb(20 150 106 / 22%), 0 2px 8px rgb(0 35 25 / 35%);
}

.destination-map-icon {
  display: grid;
  place-items: start center;
  color: #ff5a2c;
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgb(44 27 30 / 28%));
}

.circuit-stop-pin {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #0c1220;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgb(0 0 0 / 45%);
}

.circuit-stop-pin b {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  text-align: center;
}

.location-badge:where(:not(:empty)) {
  white-space: nowrap;
}

.fare-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.fare-mode-row--single {
  grid-template-columns: 1fr;
}

.taxi-meter-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 10px !important;
}

.taxi-meter {
  position: absolute;
  z-index: 700;
  top: 1rem;
  left: 50%;
  display: grid;
  gap: 0.6rem;
  width: min(92%, 320px);
  padding: 0.9rem 1rem;
  color: #fff;
  background: rgb(12 18 32 / 94%);
  border: 1px solid rgb(255 214 10 / 60%);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 40%);
  transform: translateX(-50%);
}

.taxi-meter.d-none {
  display: none;
}

.taxi-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taxi-meter-title {
  color: #ffd60a;
}

.taxi-meter-status {
  color: #bff6ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.taxi-meter-fare {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.taxi-meter-stats {
  display: flex;
  justify-content: space-around;
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.taxi-meter-roles,
.taxi-meter-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.4rem;
}

.taxi-meter-roles .btn {
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 35%);
}

.taxi-meter-roles .btn.active {
  color: #061022;
  background: #ffd60a;
  border-color: #ffd60a;
}

.taxi-meter-actions .btn {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 800;
}

.route-form {
    background: #16a56b;
  z-index: 2;
  padding: 0.8rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(20 55 45 / 8%);
}

.trip-map-stage {
  position: relative;
  min-width: 0;
  min-height: 340px;
}

.trip-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
  gap: 1rem;
  align-items: stretch;
}

.trip-planner.trip-details-collapsed .trip-layout {
  display: block;
}

.route-fields {
  position: relative;
  display: grid;
  gap: 0;
}

.route-field {
  position: relative;
  padding-left: 1.65rem;
  padding-bottom: 0.45rem;
}

.route-point {
  position: absolute;
  left: 0;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 0.78rem;
}

.pickup-point {
  top: 1.85rem;
  background: #14966a;
}

.destination-point {
  top: 2.55rem;
  background: #ed4655;
}

.destination-field {
  padding-top: 0.4rem;
  padding-bottom: 0.15rem;
  border-top: 1px solid var(--line);
}

.destination-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  gap: 0.5rem;
}

.route-field .form-label {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.destination-label-row .form-label {
  margin: 0;
}

.destination-label-row .origin-toggle {
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
}

.route-field .form-control {
  min-height: 46px;
  border-color: var(--line);
  background: #f8faf9;
}

.route-field .form-control[readonly] {
  color: var(--ink);
  opacity: 1;
}

.destination-search {
  position: relative;
  z-index: 10;
}

.destination-search-control {
  display: flex;
  gap: 0.4rem;
}

.destination-search-control .form-control {
  min-width: 0;
}

.route-field .destination-search-control .form-control {
  font-size: calc(1rem + 2px);
}

.destination-voice-btn {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.destination-voice-btn i {
  font-size: 1.1rem;
}

.destination-voice-btn.is-recording {
  color: #b42332;
  background: #fff0f1;
  border-color: #e8a1a8;
}

.destination-voice-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.destination-voice-status:not(:empty) {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.destination-suggestions {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgb(18 42 36 / 18%);
}

.destination-suggestion {
  display: grid;
  width: 100%;
  gap: 0.18rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.destination-suggestion:last-child {
  border-bottom: 0;
}

.suggestions-empty {
  padding: 0.75rem 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.destination-attribution {
  padding: 0.3rem 0.15rem 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.destination-attribution a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.destination-suggestion:hover,
.destination-suggestion:focus-visible,
.destination-suggestion[aria-selected="true"] {
  background: #eef7ff;
  outline: 0;
}

.suggestion-title {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-detail {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-distance {
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-weight: 650;
}

.destination-selected-detail {
  overflow: hidden;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.origin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 1.65rem;
  font-weight: 600;
}

.route-map {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7ece8;
  z-index: 0;
}

.circuit-map-badge {
  padding: 0.35rem 0.55rem;
  color: #0c302f;
  font-size: 0.68rem;
  font-weight: 800;
  background: #54e0cd;
  border: 1px solid #d5fff8;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 28%);
}

body.circuit-ride-mode #tripMapStage {
  outline: 1px solid #2b2f36;
  outline-offset: -1px;
}

body.circuit-ride-mode #tripMapStage {
  box-shadow: 0 0 14px rgb(54 216 198 / 22%);
}

body.circuit-ride-mode {
  --ink: #e9f6ff;
  --muted: #8fb3c9;
  --line: rgb(54 216 198 / 35%);
  --paper: #0f1d3a;
  --page: #070d1f;
  --brand: #36d8c6;
  --brand-dark: #1f9e8f;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgb(124 58 237 / 35%), transparent 40%),
    radial-gradient(circle at 90% 10%, rgb(54 216 198 / 25%), transparent 35%),
    var(--page);
  background-attachment: fixed;
}

body.circuit-ride-mode .route-form,
body.circuit-ride-mode .fare-review,
body.circuit-ride-mode .ride-center,
body.circuit-ride-mode .circuit-ride-picker {
  color: var(--ink);
  background: rgb(15 29 58 / 92%);
  border: 1px solid rgb(54 216 198 / 35%);
  box-shadow: 0 0 24px rgb(124 58 237 / 25%), inset 0 1px 0 rgb(255 255 255 / 6%);
}

body.circuit-ride-mode .form-control,
body.circuit-ride-mode .form-select {
  color: var(--ink);
  background-color: #0a1530;
  border-color: rgb(54 216 198 / 40%);
}

body.circuit-ride-mode .form-control:focus,
body.circuit-ride-mode .form-select:focus {
  color: var(--ink);
  background-color: #0a1530;
  border-color: #36d8c6;
  box-shadow: 0 0 0 0.2rem rgb(54 216 198 / 35%);
}

body.circuit-ride-mode .btn-primary {
  color: #061022;
  font-weight: 800;
  background: linear-gradient(135deg, #36d8c6, #ffd166);
  border: 0;
  box-shadow: 0 0 18px rgb(54 216 198 / 45%);
}

body.circuit-ride-mode .btn-primary:hover:not(:disabled) {
  color: #061022;
  background: linear-gradient(135deg, #ffd166, #36d8c6);
}

body.circuit-ride-mode .btn-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
}

body.circuit-ride-mode .maplibregl-ctrl-group {
  background: transparent;
  box-shadow: none;
  border: 0;
}

body.circuit-ride-mode .maplibregl-ctrl-group button {
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgb(12 16 24 / 78%);
  border: 0;
  border-radius: 6px !important;
  margin-bottom: 4px;
}

body.circuit-ride-mode .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: invert(1);
}

body.circuit-ride-mode .circuit-route-line {
  filter: drop-shadow(0 0 6px rgb(54 216 198 / 90%));
}

body.circuit-ride-mode .circuit-stop-pin {
  border-color: #ffd60a;
}

body.circuit-ride-mode .circuit-stop-pin b {
  color: #fff;
}

.taxi-gps-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  z-index: 2;
}

.taxi-gps-icon > svg {
  display: block;
  width: 40px;
  height: 64px;
  filter: drop-shadow(0 3px 3px rgb(0 0 0 / 35%));
}

/* Taxi icon only in game (circuit) mode; regular mode shows role pins. */
.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 45%));
}

.map-pin svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-pin-driver {
  width: 32px;
  height: 32px;
}

.taxi-gps-icon .map-pin {
  display: none;
}

body:not(.circuit-ride-mode) .taxi-gps-icon > svg {
  display: none;
}

body:not(.circuit-ride-mode) .taxi-gps-icon .map-pin {
  display: flex;
}

body.circuit-ride-mode .circuit-map-badge {
  color: #fff;
  background: rgb(12 18 32 / 92%);
  border: 1px solid rgb(255 214 10 / 55%);
  box-shadow: inset 3px 0 0 #ffd60a, 0 2px 10px rgb(0 0 0 / 40%);
  letter-spacing: 0.04em;
}

body.circuit-ride-mode .nearby-taxis-badge {
  color: #e9f6ff;
  background: rgb(12 18 32 / 85%);
  border-color: rgb(255 255 255 / 16%);
}

body.circuit-ride-mode .location-badge {
  color: #e9f6ff;
  background: rgb(12 18 32 / 85%);
  border-color: rgb(255 255 255 / 16%);
}

.route-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.route-summary span {
  min-width: 0;
}

.route-summary > div {
  display: grid;
  gap: 0.25rem;
}

.summary-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.fare-review {
  position: relative;
  max-width: 620px;
  margin: 1rem auto 2rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(20 55 45 / 8%);
}

.ride-center {
  max-width: 620px;
  margin: 1rem auto;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(20 55 45 / 8%);
}

.ride-center-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.ride-status-badge {
  flex: 0 0 auto;
  padding: 0.3rem 0.6rem;
  color: var(--brand-dark);
  background: #eaf4fc;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.incoming-rides,
.active-ride-panel {
  display: grid;
  gap: 0.65rem;
}

.incoming-ride-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.incoming-ride-card h3 {
  margin: 0;
  font-size: 0.9rem;
}

.incoming-ride-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.ride-offers {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ride-offers-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.ride-offer-list,
.driver-offer-controls {
  display: grid;
  gap: 0.5rem;
}

.ride-offer-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
}

.ride-offer-card p {
  margin: 0;
}

.driver-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.driver-offer-grid .btn {
  font-size: 0.75rem;
}

.ride-messages {
  display: grid;
  gap: 0.4rem;
  max-height: 220px;
  margin-bottom: 0.65rem;
  padding: 0.6rem;
  overflow-y: auto;
  background: #f6f8f7;
  border-radius: 8px;
}

.ride-message {
  max-width: 88%;
  margin: 0;
  padding: 0.45rem 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.ride-message.own {
  justify-self: end;
  background: #eaf4fc;
}

.ride-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.trip-details-toggle {
  color: var(--brand-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
  touch-action: none;
  user-select: none;
}

.trip-details-toggle-expanded {
  z-index: 1101;
  padding: 0.3rem 0;
  background: transparent;
  border-color: transparent;
}

.trip-details-grabber {
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: #cbd6d1;
}

.trip-details-toggle-collapsed {
  z-index: 700;
}

.trip-details-toggle-collapsed .trip-details-grabber {
  display: none;
}

@media (min-width: 769px) {
  .trip-details-toggle-expanded .trip-details-grabber {
    display: none;
  }
}

.review-topline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.review-price-block {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  gap: 0.2rem;
  padding: 1rem;
  color: white;
  background: var(--brand);
  border-radius: 8px;
}

.currency-badge {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  background: #0a4f9e;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 750;
}

.fare-label {
  grid-column: 2;
  color: #d8e9e4;
  font-size: 0.82rem;
}

.review-price-block > strong {
  grid-column: 2;
  grid-row: 2;
  font-size: 2rem;
  line-height: 1.1;
}

.review-route-meta {
  color: #d8e9e4;
  font-size: 0.85rem;
}

.fare-details {
  margin-bottom: 0.75rem;
}

.fare-details summary {
  padding: 0.45rem 0;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.fare-breakdown {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 1rem;
  padding: 0;
  list-style: none;
}

.fare-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  transform: translateY(calc(100% + 1rem));
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.fare-breakdown li span {
  color: var(--muted);
}

.settings-menu {
  width: min(380px, calc(100vw - 24px));
  max-height: min(78vh, 680px);
  overflow-y: auto;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgb(15 42 35 / 18%);
}

.settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.75rem;
  gap: 0 0.75rem;
}

.app-account-menu {
  padding: 0.55rem !important;
}

.app-menu-nav {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.app-menu-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.app-menu-link:hover,
.app-menu-link.active {
  color: var(--brand-dark);
  background: #eaf4fc;
}

.app-menu-link i {
  width: 1.1rem;
  font-size: 1rem;
  text-align: center;
}

.app-menu-panel {
  padding: 0.8rem 0.2rem 0.25rem;
}

.app-menu-panel[hidden] {
  display: none !important;
}

.chat-page {
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: flex;
  flex-direction: column;
  background: var(--bs-body-bg, #fff);
  color: var(--ink);
}

.chat-page[hidden] {
  display: none !important;
}

body.chat-page-open {
  overflow: hidden;
}

body.circuit-ride-mode .chat-page.inbox-page {
  --ink: #162b27;
  --line: #dce5e1;
}

.chat-page:not([hidden]) {
  animation: slide-in-up 0.26s ease-out;
}

.driver-request-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1095;
  max-height: 75vh;
  overflow-y: auto;
  padding: 1rem 1rem 1.25rem;
  color: var(--ink);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 32px rgb(15 42 35 / 22%);
  animation: slide-in-up 0.26s ease-out;
}

.driver-request-sheet[hidden] {
  display: none !important;
}

.driver-request-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.driver-request-sheet-body {
  display: grid;
  gap: 0.65rem;
  max-width: 640px;
  margin: 0 auto;
}

@keyframes slide-in-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.chat-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
}

.chat-page-body > section {
  max-width: 640px;
  margin: 0 auto;
}

.chat-page.settings-page {
  --ink: #162b27;
  --muted: #64736f;
  --line: #dce5e1;
}

.settings-page .settings-list {
  grid-template-columns: 1fr;
}

.settings-page .setting-summary {
  min-height: 44px;
}

.settings-page .setting-label,
.settings-page .setting-value {
  font-size: 0.9rem;
}

.settings-page .setting-edit-btn {
  width: 44px;
  height: 44px;
}

.settings-status {
  color: #0754a8;
}

.settings-status:empty {
  display: none;
}

body.circuit-ride-mode .settings-page .setting-editor .form-control,
body.circuit-ride-mode .settings-page .setting-editor .form-select {
  color: #162b27;
  background-color: #fff;
}

.chat-page.friends-page {
  --chat-surface: #fff;
  --chat-background: #f0f5fb;
  --chat-thread: #e8f0f7;
  --chat-text: #142a47;
  --chat-muted: #60738b;
  --chat-border: #dce7f3;
  --chat-bubble: #fff;
  --chat-own: #dcecff;
  --chat-avatar: #e1edfb;
  --chat-accent: #075fc2;
  color: var(--chat-text);
  background: var(--chat-background);
}

html[data-ui-theme="night"] .chat-page.friends-page {
  --chat-surface: #102644;
  --chat-background: #08182f;
  --chat-thread: #0c203b;
  --chat-text: #eef6ff;
  --chat-muted: #b7c9df;
  --chat-border: #294464;
  --chat-bubble: #1a3454;
  --chat-own: #174e82;
  --chat-avatar: #224b70;
  --chat-accent: #7bdfff;
}

.friends-page > .chat-page-header {
  color: var(--chat-text);
  background: var(--chat-surface);
  border-color: var(--chat-border);
}

.friends-page > .chat-page-header button {
  color: var(--chat-accent);
}

.friends-page.friend-thread-open > .chat-page-header {
  display: none;
}

.friends-page .chat-page-body {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.friends-page #friendsPanel {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  min-height: 0;
  padding: 0;
}

.friends-list-view {
  padding: 1.25rem 1rem 2rem;
}

.friends-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.friends-intro h2 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 750;
}

.friends-intro p {
  margin: 0;
  color: var(--chat-muted);
  font-size: 0.86rem;
}

.friends-intro .friends-eyebrow {
  margin-bottom: 0.35rem;
  color: var(--chat-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.friends-intro-icon,
.friend-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--chat-accent);
  background: var(--chat-avatar);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 750;
}

.friends-intro-icon {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}

.friends-list-view #friendsMessage:not(.text-danger) {
  color: var(--chat-muted) !important;
}

.friends-list-view #friendsMessage:empty {
  display: none;
}

.friend-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem 0.35rem 0.8rem;
  color: var(--chat-muted);
  background: var(--chat-surface);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
}

.friends-page .friend-search-form .form-control,
.friends-page .friend-search-form .form-control:focus {
  min-width: 0;
  padding: 0.4rem 0;
  color: var(--chat-text);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.friend-search-form .form-control::placeholder,
.friend-message-form .form-control::placeholder {
  color: var(--chat-muted);
  opacity: 1;
}

.friend-search-form:focus-within {
  outline: 2px solid var(--chat-accent);
  outline-offset: 2px;
}

.friend-search-form .btn,
.friend-quick-actions .btn {
  color: var(--chat-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.friend-quick-actions {
  display: flex;
  gap: 0.6rem;
  margin: 0.75rem 0 1.2rem;
}

.friend-quick-actions .btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  background: var(--chat-surface);
  border: 1px solid var(--chat-border);
  border-radius: 12px;
}

.friend-quick-actions .btn i {
  margin-right: 0.4rem;
}

.friend-section-title {
  margin: 1.2rem 0 0.55rem;
  color: var(--chat-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
  padding: 0.7rem;
  background: var(--chat-surface);
  border: 1px solid var(--chat-border);
  border-radius: 15px;
}

.friend-row-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.friend-row-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 700;
}

.friend-row-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

.friend-row-actions .btn {
  border-radius: 9px;
  font-size: 0.72rem;
}

html[data-ui-theme="night"] .friend-row-actions .btn-outline-secondary {
  color: var(--chat-text);
  border-color: #6d849e;
}

html[data-ui-theme="night"] .friend-row-actions .btn-outline-danger {
  color: #ffb6b9;
  border-color: #d17b83;
}

.friend-chat-view:not(.d-none) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.friend-chat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  background: var(--chat-surface);
  border-bottom: 1px solid var(--chat-border);
}

.friend-chat-back {
  width: 40px;
  height: 40px;
  color: var(--chat-accent);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.25rem;
}

.friend-chat-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.friend-chat-identity strong {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-chat-identity span {
  color: var(--chat-muted);
  font-size: 0.74rem;
}

.friend-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1.2rem 1rem;
  background: var(--chat-thread);
}

.friend-messages .ride-message {
  align-self: flex-start;
  max-width: min(85%, 480px);
  padding: 0.65rem 0.8rem 0.45rem;
  color: var(--chat-text);
  background: var(--chat-bubble);
  border: 1px solid var(--chat-border);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 3px 10px rgb(3 23 48 / 6%);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.friend-messages .ride-message.own {
  align-self: flex-end;
  background: var(--chat-own);
  border-radius: 16px 4px 16px 16px;
}

.friend-messages .ride-message small,
.friend-messages .ride-message .btn {
  color: var(--chat-muted) !important;
  font-size: 0.68rem;
}

.friend-empty-state {
  align-self: center;
  max-width: 270px;
  margin: auto;
  padding: 0.7rem 1rem;
  color: var(--chat-muted);
  background: var(--chat-surface);
  border-radius: 14px;
  font-size: 0.8rem;
  text-align: center;
}

.friend-chat-status {
  margin: 0;
  padding: 0.4rem 1rem;
  background: var(--chat-surface);
  font-size: 0.8rem;
}

.friend-chat-status:empty {
  display: none;
}

html[data-ui-theme="night"] .friends-page .text-danger {
  color: #ffb6b9 !important;
}

.friend-message-form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem max(0.75rem, env(safe-area-inset-bottom));
  background: var(--chat-surface);
  border-top: 1px solid var(--chat-border);
}

.friends-page .friend-message-form .form-control,
.friends-page .friend-message-form .form-control:focus {
  min-height: 44px;
  padding: 0.6rem 1rem;
  color: var(--chat-text);
  background: var(--chat-background);
  border: 1px solid var(--chat-border);
  border-radius: 24px;
}

.friend-send-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #0867cd;
  border: 0;
  border-radius: 50%;
}

.friend-chat-back:focus-visible,
.friend-send-button:focus-visible {
  outline: 3px solid var(--chat-accent);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .friend-row {
    flex-wrap: wrap;
  }

  .friend-row-identity {
    flex: 1 1 100%;
  }

  .friend-row-actions {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding-left: 3.4rem;
  }
}

.circuit-board-grid {
  display: grid;
  gap: 0.5rem;
}

.circuit-board-option {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.circuit-board-option.selected {
  border-color: var(--brand);
  box-shadow: inset 3px 0 var(--brand);
}

.circuit-board-option:disabled {
  opacity: 0.58;
}

.circuit-board-option span:not(.circuit-progress-track) {
  color: var(--muted);
  font-size: 0.78rem;
}

.circuit-progress-track {
  display: block;
  height: 5px;
  overflow: hidden;
  background: #e8edf0;
  border-radius: 3px;
}

.circuit-progress-track > span {
  display: block;
  height: 100%;
  background: var(--brand);
}

.circuit-game-view {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #eef7ff;
  background: #071624;
}

.circuit-game-view[hidden] {
  display: none !important;
}

.circuit-game-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.45rem 0.75rem;
  background: #081c2c;
  border-bottom: 1px solid rgb(116 198 224 / 24%);
}

.circuit-game-back {
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  place-items: center;
  color: #f0c84b;
  background: #102b40;
  border: 1px solid rgb(116 198 224 / 28%);
  border-radius: 8px;
}

.circuit-game-brand {
  display: grid;
  gap: 0.1rem;
  font-size: 0.72rem;
  line-height: 1.1;
}

.circuit-game-brand span {
  color: #91aabd;
  font-size: 0.62rem;
  font-weight: 700;
}

.circuit-game-brand strong {
  color: #4be0d0;
  font-size: 0.85rem;
}

.circuit-game-xp,
.circuit-level-badge {
  padding: 0.35rem 0.55rem;
  color: #f6d05c;
  font-size: 0.78rem;
  font-weight: 750;
  background: #203047;
  border: 1px solid rgb(246 208 92 / 50%);
  border-radius: 999px;
}

.circuit-game-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.circuit-game-map {
  position: absolute;
  inset: 0;
  background: #10283a;
}

.circuit-game-map .route-map {
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.circuit-game-map-label {
  position: absolute;
  z-index: 500;
  top: 0.85rem;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  color: #eaf5ff;
  font-size: 0.68rem;
  font-weight: 750;
  background: rgb(7 22 36 / 90%);
  border: 1px solid rgb(116 198 224 / 28%);
  border-radius: 8px;
}

.circuit-live-dot {
  width: 8px;
  aspect-ratio: 1;
  background: #4be0d0;
  border-radius: 50%;
  box-shadow: 0 0 10px #4be0d0;
}

.circuit-game-sheet {
  position: absolute;
  z-index: 500;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: max(0.75rem, env(safe-area-inset-left));
  width: min(440px, calc(100% - 1.5rem));
  max-height: min(60%, 510px);
  margin-left: auto;
  padding: 1rem;
  overflow-y: auto;
  color: #edf6ff;
  background: rgb(7 22 36 / 95%);
  border: 1px solid rgb(75 224 208 / 38%);
  border-radius: 10px;
  box-shadow: 0 16px 46px rgb(0 0 0 / 38%);
  backdrop-filter: blur(12px);
}

.circuit-game-sheet-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.circuit-game-sheet .eyebrow {
  color: #4be0d0;
  font-size: 0.66rem;
  font-weight: 750;
}

.circuit-game-sheet h1 {
  margin: 0;
  color: #f4f8fc;
  font-size: 1.12rem;
  font-weight: 750;
}

.circuit-game-sheet .form-select {
  color: #edf6ff;
  background-color: #102b40;
  border-color: rgb(116 198 224 / 32%);
}

.circuit-game-stops {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0;
  padding: 0;
  list-style: none;
}

.circuit-game-stops li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.35rem 0.5rem;
  background: #10283a;
  border: 1px solid rgb(116 198 224 / 20%);
  border-radius: 6px;
}

.circuit-game-stop-number {
  color: #4be0d0;
  font-size: 0.68rem;
  font-weight: 750;
}

.circuit-game-stops li strong {
  font-size: 0.83rem;
}

.circuit-game-stops li > span:last-child {
  color: #f6d05c;
  font-size: 0.7rem;
  font-weight: 700;
}

.circuit-game-progress {
  height: 6px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  background: #183348;
  border-radius: 4px;
}

.circuit-game-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #41d6c6, #f5c84c);
}

.circuit-game-status {
  color: #a9bfce;
}

.circuit-game-footnote {
  margin-top: 0.65rem;
  color: #91aabd;
  font-size: 0.68rem;
  text-align: center;
}

@media (max-width: 640px) {
  .circuit-game-sheet {
    right: max(0.55rem, env(safe-area-inset-right));
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    left: max(0.55rem, env(safe-area-inset-left));
    width: auto;
    max-height: 54%;
    padding: 0.8rem;
  }
}

.profile-details {
  display: grid;
  gap: 0.55rem;
}

.profile-details > div {
  display: grid;
  gap: 0.08rem;
}

.profile-details dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.profile-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 650;
}

.wallet-public-address {
  display: block;
  overflow-wrap: anywhere;
  padding: 0.55rem;
  color: var(--ink);
  background: #f3f6f8;
  border-radius: 6px;
  font-size: 0.75rem;
}

.wallet-payout-form .form-control,
.wallet-payout-form .btn {
  border-radius: 0;
}

.wallet-payout-note {
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--bs-primary, #0d6efd);
  background: #f3f6f8;
}

.trip-history-list {
  display: grid;
  gap: 0.55rem;
  max-height: 42vh;
  overflow-y: auto;
}

.inbox-list {
  display: grid;
  gap: 0.5rem;
  max-height: 42vh;
  overflow-y: auto;
}

.chat-page-body .inbox-list {
  max-height: none;
  overflow: visible;
}

.inbox-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 0.6rem;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.inbox-item.unread {
  border-color: var(--bs-primary, #0d6efd);
  background: rgba(13, 110, 253, 0.06);
}

.trip-history-item {
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.trip-history-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
}

.trip-history-item p {
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.help-list p {
  margin-bottom: 0.65rem;
}

.app-menu-logout {
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.setting-item {
  min-width: 0;
  padding: 0.08rem 0;
  border-bottom: 1px solid var(--line);
}

.setting-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "label value edit";
  align-items: center;
  column-gap: 0.35rem;
  min-height: 27px;
}

.setting-label {
  grid-area: label;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-value {
  grid-area: value;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-edit-btn {
  grid-area: edit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 0.75rem;
  text-decoration: none;
}

.setting-editor {
  grid-column: 1 / -1;
  padding: 0.25rem 0 0.15rem;
}

.setting-editor .form-control,
.setting-editor .form-select {
  min-height: 36px;
  font-size: 0.9rem;
}

.trip-map-fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 2000;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.trip-map-fullscreen .route-map {
  height: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
}

.current-location-dot {
  filter: drop-shadow(0 0 7px rgb(8 117 225 / 75%));
}

.trip-nav-overlay {
  position: absolute;
  z-index: 700;
  top: max(0.75rem, env(safe-area-inset-top));
  right: 0.75rem;
  left: 0.75rem;
}

.trip-nav-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(20 55 45 / 18%);
}

.trip-nav-card > div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.trip-nav-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-trip-label {
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 750;
}

.trip-active-body {
  overflow: hidden;
}

.maplibregl-map {
  font: inherit;
}

.driver-map-marker {
  position: relative;
  background: transparent;
  border: 0;
}

.driver-map-marker .driver-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(8 117 225 / 40%);
  animation: driver-pulse 1.8s ease-out infinite;
}

.driver-map-marker .map-pin {
  position: absolute;
  top: 4px;
  left: 4px;
}

.driver-map-marker .driver-label {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.12rem 0.4rem;
  color: #bff6ff;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgb(12 18 32 / 85%);
  border: 1px solid rgb(34 211 238 / 50%);
  border-radius: 999px;
}

.nearby-taxi-marker,
.passenger-map-marker {
  opacity: 0.92;
}

.passenger-map-marker {
  z-index: 1;
}

.nearby-taxi-marker .map-pin,
.passenger-map-marker .map-pin {
  display: block;
  width: 100%;
  height: 100%;
}

.nearby-taxi-marker svg,
.passenger-map-marker svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes driver-pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

input, select, button {
  border-radius: 12px !important;
}

@media (max-width: 430px) {
  .app-topbar--driver {
    gap: 0.4rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .app-topbar--driver .brand-lockup {
    gap: 0.25rem !important;
  }

  .app-topbar--driver .brand-mark {
    flex-basis: 48px;
    width: 48px;
  }

  .app-topbar--driver .brand-title {
    font-size: 1.15rem;
  }

  .app-topbar--driver .brand-subtitle {
    font-size: 0.58rem;
  }

  .app-topbar--driver .topbar-actions,
  .app-topbar--driver .topbar-availability {
    gap: 0.2rem;
  }

  .app-topbar--driver .settings-trigger {
    padding-right: 0.4rem;
    padding-left: 0.4rem;
  }

  .app-topbar.app-topbar--driver .topbar-availability-status.text-danger {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0.5rem;
    max-width: 13rem;
    padding: 0.25rem 0.5rem;
    color: #ad2431 !important;
    background: #fff0f1;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
  }
}

@media (max-width: 768px) {
  body.fare-open {
    overflow-y: hidden;
  }

  .app-shell {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .app-topbar {
    position: sticky;
    z-index: 1000;
    top: 0;
    margin: -0.25rem -0.25rem 0;
    border-radius: 0 0 8px 8px;
  }

  .app-topbar .topbar-availability-status {
    display: none;
  }

  .app-topbar .topbar-availability-status.text-danger {
    display: inline-block;
    max-width: 6rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .trip-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .trip-heading h1 {
    font-size: 1.45rem;
  }

  .trip-layout {
    position: relative;
    display: block;
  }

  .route-form {
    position: absolute;
    z-index: 500;
    top: 0.65rem;
    right: 0.65rem;
    left: 0.65rem;
    padding: 0.4rem 0.5rem;
  }

  .route-field {
    padding-left: 1.65rem;
    padding-bottom: 0.2rem;
  }

  .destination-field {
    padding-top: 0.15rem;
    padding-bottom: 0;
  }

  .route-field .form-label {
    margin-bottom: 0.1rem;
  }

  .route-field .form-control {
    min-height: 44px;
    font-size: 0.95rem;
  }

  .route-field .destination-search-control .form-control {
    font-size: 18px;
  }

  .destination-voice-btn {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .destination-label-row {
    min-height: 20px;
  }

  .destination-label-row .origin-toggle {
    font-size: 0.72rem;
  }

  .pickup-point {
    top: 1.8rem;
  }

  .destination-point {
    top: 1.05rem;
  }

  #routeButton {
    min-height: 40px;
    font-size: 0.95rem;
  }

  .route-button {
    min-height: 44px;
  }

  .trip-map-stage {
    height: max(470px, calc(100dvh - 74px));
    min-height: 470px;
  }

  .route-map {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    border-radius: 8px;
  }

  .trip-map-stage .maplibregl-ctrl-top-left {
    top: auto;
    right: 0;
    bottom: 5.5rem;
    left: auto;
  }

  .trip-map-stage .maplibregl-ctrl-top-left .maplibregl-ctrl {
    margin: 0 10px 0 0;
  }

  body.fare-open .trip-map-stage .maplibregl-ctrl-top-left {
    bottom: calc(min(30dvh, 260px) + 5.5rem);
  }

  .route-status:not(.text-danger) {
    display: none;
  }

  .fare-review {
    position: fixed;
    z-index: 1100;
    right: 0.55rem;
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    left: 0.55rem;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 1.45rem 0.5rem 0.45rem;
    box-shadow: 0 10px 36px rgb(15 42 35 / 24%);
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  .fare-review-collapsed {
    transform: translateY(calc(100% - 48px));
  }

  .fare-review.trip-details-dragging,
  .route-form.trip-details-dragging {
    transition: none !important;
  }

  .route-form {
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  .route-form-sliding-up {
    transform: translateY(calc(-100% - 1rem));
    pointer-events: none;
  }

  .trip-details-toggle-expanded {
    width: 6rem;
    height: 26px;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .trip-details-toggle-expanded:hover,
  .trip-details-toggle-expanded:active,
  .trip-details-toggle-expanded:focus {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .trip-details-grabber {
    width: 42px;
    height: 4px;
  }

  .trip-details-toggle-collapsed {
    max-width: calc(100% - 1rem);
    min-height: 44px;
    padding-inline: 0.75rem;
  }

  .review-topline {
    display: none;
  }

  #fareReview > p.small {
    display: none;
  }

  body.fare-open .map-center-btn,
  body.fare-open .map-status-chip {
    bottom: calc(min(30dvh, 260px) + 1.7rem);
  }

  .fare-review .route-summary {
    margin-bottom: 0;
    padding: 0.15rem 0;
    font-size: 0.82rem;
  }

  .review-topline h2 {
    font-size: 1.05rem;
  }

  .review-price-block {
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    align-items: center;
    padding: 0.3rem 0.5rem;
  }

  .currency-badge {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .review-price-block > strong {
    font-size: 1.55rem;
  }

  #startTripBtn {
    min-height: 40px;
    padding-block: 0.45rem;
    font-size: 0.92rem;
  }

  .route-summary {
    position: static;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
  }

  .route-summary strong {
    display: block;
    font-size: 1.05rem;
  }

  .route-summary span:last-child {
    align-self: center;
    text-align: right;
    color: var(--muted);
    font-size: 0.8rem;
  }

  .fare-breakdown {
    margin: 0.25rem 0 0.5rem;
  }

  .fare-breakdown li {
    padding: 0.38rem 0;
    font-size: 0.82rem;
  }

  #startTripBtn {
    min-height: 42px;
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
  }

  .trip-map-fullscreen {
    position: fixed !important;
    inset: 0;
    width: 100vw;
    height: 100dvh;
  }

  .ride-center {
    position: fixed;
    z-index: 1200;
    right: 0.55rem;
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    left: 0.55rem;
    max-height: 52dvh;
    margin: 0;
    overflow-y: auto;
  }

  body.fare-open .ride-center {
    z-index: 1090;
    max-height: 34dvh;
    bottom: calc(min(30dvh, 260px) + 0.75rem);
  }

  .trip-active-body .ride-center {
    display: none;
  }

  .trip-nav-card {
    align-items: start;
    padding: 0.7rem;
  }

  .trip-nav-card .btn {
    flex: 0 0 auto;
  }
}
