:root {
  --bg: #0E0B1A;
  --surface: #171426;
  --surface-2: #1F1B33;
  --border: rgba(255, 255, 255, 0.07);
  --text: #FFFFFF;
  --text-muted: #A9A4C4;
  --text-dim: #7A7599;
  --primary: #8B3DFF;
  --primary-2: #6D28D9;
  --primary-3: #A855F7;
  --grad-primary: linear-gradient(90deg, #6D28D9 0%, #9333EA 100%);
  --accent-yellow: #FACC15;
  --user-blue: #3B82F6;
  --user-halo: rgba(59, 130, 246, 0.25);
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #38BDF8;
  --radius-sheet: 28px;
  --radius-card: 18px;
  --radius-pill: 16px;
  --radius-cta: 22px;
  --radius-round: 999px;
  --shadow-glow: 0 8px 28px rgba(139, 61, 255, 0.35);
  --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 62px;
  --pin-a: #22C55E;
  --pin-b: #8B3DFF;
  --nav-total: calc(var(--nav-h) + var(--safe-bottom));
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--primary-3);
  outline-offset: 2px;
}

.svg-sprite {
  display: none;
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ico-sm {
  width: 16px;
  height: 16px;
}

.ico-lg {
  width: 24px;
  height: 24px;
}

.app-root {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

#fullMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 1;
}

.dark-tiles .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(212deg) brightness(82%) contrast(108%) saturate(90%);
}

.leaflet-control-attribution {
  background: rgba(23, 20, 38, 0.78) !important;
  color: var(--text-dim) !important;
  font-size: 10px !important;
  border-top-right-radius: 8px;
}

.top-bar {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 15;
  pointer-events: none;
}

.round-map-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-round);
  background: rgba(23, 20, 38, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.nav-arrow-btn {
  position: absolute;
  right: 16px;
  bottom: calc(276px + var(--nav-total));
  z-index: 15;
}

.nav-arrow-btn.raised {
  bottom: calc(440px + var(--nav-total));
}

.details-top-right {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 16;
}

.trip-info-chip {
  background: rgba(23, 20, 38, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chip-row-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pin-marker {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.pin-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: var(--primary);
  border: 2px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-inner-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-round);
  background: var(--text);
  transform: rotate(45deg);
}

.pin-inner-ring {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-round);
  background: var(--text);
  border: 3px solid var(--primary-2);
  transform: rotate(45deg);
}

.user-loc-marker {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-loc-halo {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  background: var(--user-halo);
  animation: haloPulse 2s ease-in-out infinite;
}

.user-loc-core {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-round);
  background: var(--user-blue);
  border: 2.5px solid var(--text);
  z-index: 2;
}

.car-map-marker {
  width: 36px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--car-angle, 0deg));
}

@keyframes haloPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-loc-halo {
    animation: none;
  }
  .toast-box {
    transition: none;
  }
  .cta-btn {
    transition: none;
  }
}

.home-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--nav-total);
  background: var(--surface);
  border-top-left-radius: var(--radius-sheet);
  border-top-right-radius: var(--radius-sheet);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-sheet);
  padding: 10px 16px 12px;
  z-index: 16;
}

.drag-handle-btn {
  width: 48px;
  height: 20px;
  margin: 0 auto 8px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drag-handle-bar {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.25);
}

.addr-icon-purple {
  color: var(--primary-3);
}

.addr-text-col {
  min-width: 0;
  flex: 1;
}

.addr-kicker {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.addr-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.addr-title.muted {
  color: var(--text-dim);
  font-weight: 500;
}

.mini-gps-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-round);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cta-btn {
  width: 100%;
  height: 64px;
  min-height: 64px;
  border-radius: var(--radius-cta);
  border: none;
  background: var(--grad-primary);
  box-shadow: var(--shadow-glow);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.cta-btn:active {
  transform: scale(0.98);
}

.cta-btn:disabled {
  background: var(--surface-2);
  box-shadow: none;
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-total);
  padding: 0 8px var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 30;
}

.nav-item-btn {
  position: relative;
  min-height: 48px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.nav-item-btn.active {
  color: var(--primary-3);
}

.nav-item-btn {
  padding-bottom: 6px;
}

.nav-item-btn.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: var(--radius-round);
  background: var(--primary-3);
}

.guard-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.details-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--nav-total);
  max-height: calc(100dvh - var(--nav-total) - 120px - var(--safe-top));
  padding-bottom: 0;
  overflow-y: auto;
  background: var(--surface);
  border-top-left-radius: var(--radius-sheet);
  border-top-right-radius: var(--radius-sheet);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-sheet);
  padding: 14px 16px 18px;
  z-index: 18;
}

.price-hero {
  text-align: center;
  margin-bottom: 14px;
}

.price-hero-val {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.price-hero-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.shimmer-bar {
  height: 38px;
  width: 180px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--surface-2) 25%, rgba(168, 85, 247, 0.2) 50%, var(--surface-2) 75%);
}

.tariff-card-panel {
  display: grid;
  grid-template-columns: 112px 1px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  margin-bottom: 14px;
}

.tariff-car-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tariff-car-img {
  width: 116px;
  height: 58px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.tariff-divider {
  width: 1px;
  height: 100%;
  min-height: 110px;
  background: var(--border);
}

.tariff-right-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tariff-pills-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tariff-pill-btn {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.tariff-pill-btn.selected {
  background: var(--grad-primary);
  border-color: transparent;
  justify-content: flex-start;
}

.section-heading-row {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.payment-pill-btn {
  min-height: 46px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.payment-pill-btn.selected {
  background: var(--grad-primary);
  border-color: transparent;
}

.phone-box-card {
  min-height: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phone-box-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.phone-edit-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-round);
  border: none;
  background: var(--primary);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.input-row-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  margin-bottom: 10px;
}

.input-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.plain-field {
  width: 100%;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  color: var(--text);
  font-size: 16px; /* 16px+ stops iOS from zooming into the field */
  font-weight: 400;
}

.plain-field::placeholder {
  color: var(--text-dim);
}

.status-feedback {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.status-feedback.ok {
  color: var(--success);
}

.status-feedback.err {
  color: var(--danger);
}

.overlay-screen {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  padding: calc(16px + var(--safe-top)) 16px calc(88px + var(--safe-bottom));
  z-index: 25;
}

.overlay-screen.tab-screen {
  bottom: var(--nav-total);
  padding-bottom: 24px;
}

.overlay-screen.full-height {
  padding-bottom: calc(24px + var(--safe-bottom));
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.screen-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.search-field-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
}

.list-row-btn {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
}

.list-row-btn.selected {
  border-color: var(--primary-3);
  background: var(--surface-2);
}

.list-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.list-row-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.sticky-cta-wrap {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(14, 11, 26, 0) 0%, var(--bg) 35%);
}

.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  margin-bottom: 12px;
}

.trip-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.trip-code-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.status-chip {
  padding: 4px 10px;
  border-radius: var(--radius-round);
  font-size: 12px;
  font-weight: 700;
}

.chip-pending {
  background: rgba(245, 158, 11, 0.16);
  color: var(--warning);
}

.chip-onway {
  background: rgba(56, 189, 248, 0.16);
  color: var(--info);
}

.chip-intrip {
  background: rgba(168, 85, 247, 0.2);
  color: var(--primary-3);
}

.chip-done {
  background: rgba(34, 197, 94, 0.16);
  color: var(--success);
}

.chip-cancel {
  background: rgba(239, 68, 68, 0.16);
  color: var(--danger);
}

.route-connector-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.route-point-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.route-dot-start {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--primary-3);
}

.route-dot-end {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--success);
}

.trip-price-bold {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.trip-meta-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pill-action-primary {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--grad-primary);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.pill-action-outline {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.pill-action-danger {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.action-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-round);
  background: var(--grad-primary);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.empty-state-box {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}


.toast-box {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  max-width: 400px;
  width: calc(100% - 32px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none !important;
}

.map-grid-fallback {
  background-color: #120F22 !important;
  background-image:
    linear-gradient(to right, rgba(168, 85, 247, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(139, 61, 255, 0.16), transparent 65%) !important;
  background-size: 36px 36px, 36px 36px, 100% 100% !important;
}

/* ---- v12 additions ---- */
.status-feedback.warn {
  color: var(--warning);
}

/* A lone button in a two-column action row takes the full width */
.action-grid-2 > :only-child {
  grid-column: 1 / -1;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.boot-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(139, 61, 255, 0.25);
  border-top-color: var(--primary);
  animation: boot-spin 0.8s linear infinite;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-spinner { animation-duration: 2.4s; }
}

.call-driver-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  border-radius: var(--radius-pill);
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* ---- v13: live trip + map ---- */
.active-trip-block {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.trip-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.trip-live-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.trip-live-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.active-trip-block .call-driver-btn {
  margin-top: 0;
}

.searching-dots::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: searching-dots 1.4s steps(4, end) infinite;
}

@keyframes searching-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.taxi-marker {
  width: 28px;
  height: 44px;
  transform: rotate(var(--car-angle, 0deg));
  transition: transform 0.6s ease;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.taxi-marker svg {
  display: block;
}

.map-notice {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(280px, calc(100% - 40px));
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: rgba(23, 20, 38, 0.92);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.map-notice-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--grad-primary);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .searching-dots::after { animation: none; content: "..."; }
  .taxi-marker { transition: none; }
}

.link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--primary-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---- v14: contact card + profile ---- */
.contact-phone-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.contact-phone-line.phone-warn { color: var(--danger); }
.contact-phone-head { margin: 12px 0 6px; }
.field-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}
.profile-head-text { min-width: 0; }
.profile-head-text .addr-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.profile-form { display: flex; flex-direction: column; }
.profile-form .input-row-label { margin-bottom: 6px; }
.profile-form .cta-btn { margin-top: 14px; }
.profile-form .status-feedback { margin-top: 10px; }
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.profile-stat-val { font-size: 18px; font-weight: 700; }
.profile-stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.profile-foot {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin: 18px 0 4px;
}
.plain-field.invalid { border-color: var(--danger); }

/* Order button always visible at the bottom of the order sheet */
#confirmOrderBtn {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  margin-bottom: 12px;
  box-shadow: 0 -10px 18px 6px var(--surface);
  z-index: 2;
}

.picker-empty-hint {
  margin: 14px 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ================= v16: Yandex/Fasten-style home & search ================= */
.addr-top {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  min-width: 240px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(23, 20, 38, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  text-align: center;
  z-index: 15;
  pointer-events: none;
}
.addr-top-kicker { font-size: 12px; color: var(--text-muted); }
.addr-top-label {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.center-pin {
  position: absolute;
  left: 50%;
  top: calc((100% - var(--nav-total) - 190px) / 2 + 0px);
  transform: translate(-50%, -100%);
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
.center-pin-head {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-yellow);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
}
.center-pin.is-dest .center-pin-head { background: var(--pin-b); color: #fff; }
.center-pin-stick { width: 3px; height: 16px; background: #fff; }

.center-pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  border: 2px solid #fff;
  transform: translateY(50%);
}

.pin-bubble.pin-a { background: var(--pin-a); }
.pin-bubble.pin-b { background: var(--pin-b); }

.where-to-btn {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.where-to-btn span { flex: 1; text-align: left; }
.where-to-arrow { color: var(--text-muted); }

.place-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.place-row:last-child { border-bottom: none; }

/* Home screen: up to 3 last addresses as slim rows so the sheet stays low and the map stays visible */
#homeRecents { margin-top: 6px; }
#homeRecents .place-row { padding: 7px 4px; gap: 10px; }
#homeRecents .place-ico { width: 28px; height: 28px; }
#homeRecents .place-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#homeRecents .place-col { min-width: 0; }

/* Keyboard open in the order sheet: the order button stops floating over the fields */
body.kb-open #confirmOrderBtn { position: static; box-shadow: none; }
body.kb-open .bottom-nav { display: none; }
body.kb-open .details-sheet { bottom: 0; max-height: calc(100dvh - 60px - var(--safe-top)); }
.place-ico {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.place-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.place-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-sub {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-dist { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
#homeRecents { margin-top: 6px; }

.search-screen {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: var(--bg);
  overflow-y: auto;
  padding: calc(12px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}
#searchResults { flex: 1 0 auto; }
.search-free-bar {
  position: sticky;
  bottom: calc(var(--nav-total) - var(--safe-bottom) - 12px);
  margin: 16px -16px 0;
  padding: 10px 16px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.search-free-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 8px; }
.search-free-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.free-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.free-btn .ico { color: var(--primary); flex: none; }
.free-btn-wide { width: 100%; }
.search-section-title {
  margin: 14px 4px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 4px 12px;
  margin-bottom: 8px;
}
.search-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
}
.search-row + .search-row { border-top: 1px solid var(--border); }
.search-row-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-row-val {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-row-input .search-field-input {
  min-height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  outline: none;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pill-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-round);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.search-status { padding: 10px 4px; font-size: 14px; color: var(--text-muted); line-height: 1.45; }

.route-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
  border: 3px solid var(--pin-a);
  background: var(--surface);
}
.route-dot.dot-b { border-color: var(--pin-b); }

.route-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2px 12px;
  margin-bottom: 12px;
}
.route-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  font-size: 15px;
}
.route-row + .route-row { border-top: 1px solid var(--border); }
.route-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.map-pick-bar { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.map-pick-top {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.map-pick-text {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(23, 20, 38, 0.9);
  border: 1px solid var(--border);
}
.map-pick-done {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  pointer-events: auto;
}
.map-pick-done:disabled { opacity: 0.55; }
.nav-arrow-btn.raised { bottom: calc(96px + var(--safe-bottom)); }

/* Own place names on the map (admin "Joylar") */
.map-place-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  pointer-events: auto;
  transform: translateY(-1px);
}
.map-place-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary, #8B3DFF);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex: none;
}
.map-place-name {
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1F1B33;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Tariffs that are not open yet */
.tariff-pill-btn.soon { opacity: 0.55; }
.soon-badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  text-transform: lowercase;
}

/* My places: Uy / Ish */
.home-shortcuts, .search-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; }
.home-shortcuts { margin-top: 8px; }
.search-shortcuts { margin: 12px 0 4px; }
.shortcut-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: rgba(139, 61, 255, 0.14);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.shortcut-chip.ghost { background: transparent; border-style: dashed; color: var(--text-muted); }
.my-places-hint { margin: 2px 0 8px; }
.my-place-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.my-place-ico { font-size: 22px; width: 32px; text-align: center; flex: none; }
.my-place-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.my-place-title { font-weight: 700; }
.my-place-sub { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-place-btns { display: flex; gap: 6px; flex: none; }
.mini-btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mini-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.mini-btn.danger { color: var(--danger); }
