/* ═══════════════════════════════════════════════════════════════════════
   DREV NETWORK — phone-first density and safe-area pass
   Loaded last so the simulator and every service drawer fit narrow screens
   without desktop-sized spacing or controls falling below the viewport.
   ═══════════════════════════════════════════════════════════════════════ */

html { -webkit-text-size-adjust: 100%; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

@media (max-width: 720px) {
  :root {
    --mobile-edge: 8px;
    --mobile-radius: 12px;
  }

  /* Top navigation remains fully reachable by horizontal swipe. */
  #nav-bar {
    top: max(6px, env(safe-area-inset-top));
    left: var(--mobile-edge);
    right: var(--mobile-edge);
    gap: 3px;
    min-height: 32px;
    padding: 3px;
    border-radius: 10px;
    scroll-snap-type: x proximity;
  }
  #nav-bar .nav-sep { height: 15px; margin: 0 1px; }
  .nav-btn {
    min-height: 40px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11px;
    letter-spacing: .45px;
    scroll-snap-align: start;
  }
  #nav-bar .nav-cta { gap: 3px; padding-inline: 8px; }
  #nav-bar .nav-cta .nav-cta-sub,
  #nav-bar .nav-cta .nav-cta-count { display: none; }

  #mode-badge {
    top: calc(max(6px, env(safe-area-inset-top)) + 40px);
    left: 8px;
    padding: 4px 7px;
    font-size: 6.5px;
    letter-spacing: .7px;
  }
  #weather-chip {
    top: calc(max(6px, env(safe-area-inset-top)) + 39px);
    right: 8px;
    max-width: 145px;
    min-height: 27px;
    padding: 4px 7px;
    gap: 5px;
    border-radius: 8px;
  }
  .weather-chip-title { font-size: 6.5px !important; }
  .weather-chip-detail { display: none !important; }

  /* One compact action cluster; descriptions collapse to their strong label. */
  #cascade-fab {
    right: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom));
    gap: 6px;
  }
  #cascade-main-btn {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  #cascade-main-btn svg { width: 18px; height: 18px; }
  .cascade-action-btn { gap: 7px; }
  .cascade-action-btn .cab-icon { width: 38px; height: 38px; border-radius: 11px; }
  .cascade-action-btn .cab-icon svg { width: 18px; height: 18px; }
  .cascade-action-btn .cab-label {
    max-width: calc(100vw - 72px);
    overflow: hidden;
    padding: 6px 10px;
    font-size: 0;
    line-height: 1;
    text-overflow: ellipsis;
  }
  .cascade-action-btn .cab-label strong { font-size: 8.5px; letter-spacing: .03em; }
  .cascade-action-btn .cab-label strong + span { font-size: 9px; }
  .cab-assist .cab-icon img { width: 32px; height: 32px; }

  /* Move the auxiliary DREV dock control to the opposite edge. */
  #drev-fab {
    left: 8px !important;
    right: auto !important;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    min-height: 42px !important;
    padding: 0 9px 0 6px !important;
    border-radius: 12px !important;
  }
  .drev-fab-mark { width: 29px !important; height: 29px !important; border-radius: 8px !important; }
  .drev-fab-mark img { width: 30px !important; }
  .drev-fab-label b { font-size: 8px !important; }
  .drev-fab-label small { display: none; }

  /* Drawers behave like true phone sheets, with tighter but consistent rhythm.
     Hide world launchers while a sheet is open so they cannot sit above a
     purchase CTA (the shared DREV dock has its own high stacking context). */
  body.in-orbit #global-dock-container,
  body.in-orbit #drev-fab,
  body.in-orbit #drev-fab-menu,
  body.in-orbit #cascade-fab,
  body.in-orbit #cascade-main-btn,
  body.in-orbit #sp-tour-launch,
  body.in-orbit #business-return,
  body.in-orbit #drev-assist-fab,
  body.sp-tour-active #global-dock-container,
  body.sp-tour-active #drev-fab,
  body.sp-tour-active #drev-fab-menu,
  body.sp-tour-active #cascade-fab,
  body.sp-tour-active #cascade-main-btn,
  body.sp-tour-active #sp-tour-launch,
  body.sp-tour-active #business-return,
  body.sp-tour-active #drev-assist-fab,
  body.drawer-open #global-dock-container,
  body.drawer-open #drev-fab,
  body.drawer-open #drev-fab-menu,
  body.drawer-open #cascade-fab { display: none !important; }
  .apple-drawer .drawer-sheet {
    width: 100%;
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    border-radius: 16px 16px 0 0;
  }
  .drawer-handle-bar { min-height: 37px; padding: 8px 0 5px; }
  .drawer-pill { width: 34px; height: 3px; }
  .drawer-close {
    top: 5px;
    right: 8px;
    width: 29px;
    height: 29px;
    font-size: 13px;
  }
  .drawer-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .dw-section { padding: 15px 13px; }
  .dw-section-title { margin-bottom: 5px; font-size: 14px; }
  .dw-section-note,
  .us-lede { margin: 0 0 11px; font-size: 11px; line-height: 1.42; }
  .dw-media-hero img { height: 180px; }
  .dw-media-hero-copy { padding: 16px 13px 15px !important; }
  .dw-hero-eye { margin-bottom: 5px; font-size: 7px; letter-spacing: 1.15px; }
  .dw-hero-title { margin-bottom: 5px; font-size: 21px !important; line-height: 1.06; }
  .dw-media-hero-copy .dw-hero-sub { font-size: 11px; line-height: 1.4; }
  .dw-card { margin-bottom: 9px; border-radius: 11px; }
  .dw-card-body { padding: 12px; }
  .dw-card-title { font-size: 13px; }
  .dw-card-sub { font-size: 11px; line-height: 1.4; }
  .dw-bento { grid-template-columns: 1fr 1fr; gap: 7px; }
  .dw-bento-card { min-height: 0; padding: 10px; border-radius: 10px; }
  .dw-bento-val { font-size: 16px; }
  .dw-bento-lbl { margin-top: 4px; font-size: 9px; line-height: 1.3; }
  .dw-gallery { gap: 10px; }
  .dw-gallery-card { flex-basis: min(78vw, 240px); }
  .dw-gallery-card img,
  .dw-gallery-card img[style] { height: 126px !important; }
  .pricing-grid { grid-template-columns: 1fr; gap: 8px; }
  .pricing-card { padding: 13px; border-radius: 11px; }
  .pricing-name { font-size: 9px; }
  .pricing-price { font-size: 21px; }
  .pricing-desc { font-size: 11px; }
  .dw-form-grid { grid-template-columns: 1fr; gap: 0; }
  .dw-form-full { grid-column: auto; }
  .dw-form-group { margin-bottom: 9px; }
  .dw-form-label { font-size: 10px; }
  .dw-form-input,
  .dw-form-select { min-height: 42px; padding: 9px 10px; border-radius: 9px; font-size: 16px; }
  .dw-submit-btn { min-height: 42px; padding: 10px; border-radius: 10px; font-size: 12px; }
  .dw-btn-row { gap: 7px; margin-top: 9px; }
  .dw-btn { min-width: 0; min-height: 39px; padding: 9px 10px; border-radius: 9px; font-size: 11px; }

  /* Commercial-services presentation. */
  #tesla-drawer .dw-section[style] { padding-top: 0 !important; }
  #tesla-drawer video { max-height: 190px; }
  .dw-free-assessment-note { margin-top: 7px !important; font-size: 10px !important; }

  /* Buy-a-charger flow: dense overview, swipeable choices, sticky actions. */
  #unit-drawer .drawer-body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .us-hero img { height: 205px !important; }
  .us-hero .dw-hero-sub { font-size: 10.5px; }
  .us-hero-actions { gap: 7px; margin-top: 10px; }
  .us-hero-actions .dw-btn { flex: 1 1 46%; }
  .us-journey {
    top: 0;
    gap: 4px;
    padding: 7px 9px;
  }
  .us-journey button { min-height: 32px; padding: 4px 7px; }
  .us-journey button b { font-size: 7px; }
  .us-journey button span { font-size: 8px; }
  .us-unit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .us-unit { min-height: 68px; padding: 9px 7px 7px; border-radius: 9px; }
  .us-unit-num { font-size: 18px; }
  .us-unit-id,
  .us-unit-status { font-size: 8.5px; }
  .us-unit-space { font-size: 8px; }
  .us-unit-note { gap: 9px; margin-top: 8px; font-size: 9px; }
  .us-tier-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(235px, 78vw);
    gap: 9px;
    overflow-x: auto;
    padding: 11px 1px 7px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .us-tier-grid::-webkit-scrollbar { display: none; }
  .pricing-card.us-tier { scroll-snap-align: start; padding: 17px 13px 13px; }
  .us-tier .pricing-price { font-size: 19px; }
  .us-access li { margin-bottom: 4px; font-size: 10.5px; }
  .us-est { gap: 13px; }
  .us-est-inputs label { margin-bottom: 11px; font-size: 10.5px; }
  .us-est-big span { font-size: 26px; }
  .us-est-row { grid-template-columns: 1fr auto; padding: 6px 7px; font-size: 10.5px; }
  .us-est-cov { font-size: 10px; }
  .us-steps {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 55vw);
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .us-steps::-webkit-scrollbar { display: none; }
  .us-step { padding: 11px; scroll-snap-align: start; }
  .us-step strong { font-size: 12px; }
  .us-step span { font-size: 10px; }
  .us-form-foot { align-items: stretch; gap: 10px; }
  .dw-submit-btn.us-submit { width: 100%; min-width: 0; }
  .us-mobile-bar {
    position: absolute;
    z-index: 8;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: .74fr 1.26fr;
    gap: 7px;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,176,32,.28);
    background: linear-gradient(to top, rgba(5,9,15,1) 70%, rgba(5,9,15,.93));
    backdrop-filter: blur(18px);
  }
  .us-mobile-bar button {
    min-height: 42px;
    border: 1px solid rgba(255,176,32,.36);
    border-radius: 10px;
    color: #ffd98d;
    background: rgba(255,176,32,.08);
    font: 800 8px/1 'Orbitron', sans-serif;
    letter-spacing: .05em;
  }
  .us-mobile-bar #us-mobile-reserve { border: 0; color: #1a1206; background: linear-gradient(135deg,#ffc65d,#d88a00); }

  /* Site-walk HUD fits even a 320 px screen. */
  #unit-hud {
    bottom: calc(58px + env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-width: none;
    gap: 7px;
    padding: 9px;
    border-radius: 12px;
  }
  .uh-head { gap: 6px; }
  .uh-pill { padding: 3px 6px; font-size: 7px; letter-spacing: .8px; }
  .uh-title { font-size: 10.5px; }
  .uh-title small { font-size: 8.5px; }
  #uh-close { width: 24px; height: 24px; }
  .uh-units { gap: 3px; }
  .uh-chip { height: 29px; border-radius: 7px; font-size: 10px; }
  .uh-actions { gap: 5px; }
  .uh-btn { min-height: 34px; padding: 6px !important; border-radius: 8px; font-size: 9px !important; }
  .uh-step { flex-basis: 30px; font-size: 18px !important; }
  .uh-walk-note { font-size: 8.5px; }

  /* Orbital landing scales to short phone screens instead of overflowing. */
  #orbital-ui { padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
  .orb-inner { transform: none; }
  .orb-logo img { width: 56px; height: 56px; }
  .orb-stats { gap: 5px; margin-bottom: 10px; }
  .orb-stat { padding: 7px; }
  .orb-stat span { font-size: 16px; }
  .orb-stat label { font-size: 7px; }
  .orb-offer { gap: 6px; margin: 0 0 9px; padding: 8px; border-radius: 10px; }
  .orb-offer-pill { padding: 4px 7px; font-size: 7px; }
  .orb-offer-text { flex-basis: 190px; font-size: 9px; }
  .orb-offer-cta { font-size: 9px; }
  .orb-entry-label,
  .orb-hint { display: none; }
  .orb-entries { margin-bottom: 8px; }
  .orb-actions { gap: 6px; }
  .orb-btn,
  .orb-select { min-height: 37px; padding: 0 9px; font-size: 9px; }

}

@media (max-width: 390px) {
  .nav-btn { padding-inline: 7px; font-size: 7px; }
  .dw-bento { grid-template-columns: 1fr 1fr; }
  .us-unit-grid { gap: 4px; }
  .us-unit { padding-inline: 6px; }
  .uh-title small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-height: 620px) and (max-width: 720px) {
  .orb-stats { display: none; }
  .orb-offer { margin-bottom: 7px; }
  .orb-entries { max-height: 90px; overflow-y: auto; }
  #unit-hud { bottom: calc(8px + env(safe-area-inset-bottom)); }
}

@media (min-width: 721px) {
  .us-mobile-bar { display: none; }
}

/* Mobile vehicle input: analog steering and throttle joysticks appear only
   during an active drive session. Pointer capture keeps both sticks stable
   while fingers move, and touch-action prevents page/map gestures. */
#touch-controls {
  display: none;
  position: fixed;
  z-index: 650;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
  touch-action: none;
}
@media (max-width: 720px), (pointer: coarse) {
  body.vehicle-session-active #touch-controls {
    display: flex;
    bottom: calc(190px + env(safe-area-inset-bottom));
  }
  body.vehicle-session-active #ctrl-hint,
  body.vehicle-session-active #cam-strip { display: none; }
  body.drawer-open #touch-controls { display: none; }
  .touch-stick {
    position: relative;
    width: clamp(100px, 25vw, 132px);
    height: clamp(100px, 25vw, 132px);
    border: 1px solid rgba(108, 224, 255, .48);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 34, 48, .68), rgba(3, 10, 20, .5) 72%);
    box-shadow: inset 0 0 22px rgba(64, 194, 230, .12), 0 6px 24px rgba(0, 0, 0, .32);
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .touch-stick::before,
  .touch-stick::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    background: rgba(145, 214, 235, .22);
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .touch-stick::before { width: 1px; height: 66%; }
  .touch-stick::after { width: 66%; height: 1px; }
  .touch-stick-title {
    position: absolute;
    left: 50%; top: -20px;
    transform: translateX(-50%);
    color: rgba(205, 238, 248, .88);
    font: 700 9px/1.2 var(--font-data, sans-serif);
    letter-spacing: 1.3px;
    text-shadow: 0 1px 5px #000;
    pointer-events: none;
  }
  .touch-stick-knob {
    position: absolute;
    left: 50%; top: 50%;
    width: 39%; height: 39%;
    border: 1px solid rgba(179, 244, 255, .82);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(104, 225, 255, .78), rgba(17, 94, 128, .74) 72%);
    box-shadow: 0 0 16px rgba(46, 196, 236, .4);
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .touch-stick.active { border-color: rgba(108, 224, 255, .9); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Mobile quality pass — readable type, comfortable targets, and real use of
   portrait/landscape touch screens. Keep the simulation/map visible; let the
   panels scroll instead of shrinking the product down to desktop scale.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  #nav-bar {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    min-height: 48px;
    transform: none;
    justify-content: flex-start;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 14px;
    scroll-padding-inline: 6px;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
  }
  #nav-bar .nav-btn {
    min-width: 44px;
    min-height: 40px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 10.5px;
    letter-spacing: .04em;
    scroll-snap-align: start;
  }
  #nav-bar .nav-sep { height: 22px; margin-inline: 2px; }

  #mode-badge {
    top: calc(max(8px, env(safe-area-inset-top)) + 56px);
    left: 10px;
    min-height: 30px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 10px;
    letter-spacing: .08em;
  }
  #weather-chip {
    top: calc(max(8px, env(safe-area-inset-top)) + 56px);
    right: 10px;
    min-height: 34px;
    max-width: min(54vw, 230px);
    padding: 6px 9px;
    gap: 7px;
  }
  .weather-chip-title { font-size: 10px !important; letter-spacing: .05em; }

  #cascade-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
  #cascade-main-btn { width: 52px; height: 52px; }
  .cascade-action-btn .cab-icon { width: 46px; height: 46px; }
  .cascade-action-btn .cab-label { padding: 9px 12px; }
  .cascade-action-btn .cab-label strong { font-size: 12px; }
  .cascade-action-btn .cab-label strong + span { font-size: 12px; }
  #drev-fab {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    min-height: 48px !important;
  }
  .drev-fab-mark { width: 34px !important; height: 34px !important; }
  .drev-fab-label b { font-size: 11px !important; }

  .apple-drawer .drawer-sheet {
    top: max(8px, env(safe-area-inset-top));
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    border-radius: 20px 20px 0 0;
  }
  .drawer-handle-bar { min-height: 44px; }
  .drawer-close { width: 40px; height: 40px; font-size: 18px; }
  .drawer-body {
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .dw-section { padding: 18px 16px; }
  .dw-section-title { font-size: 17px; }
  .dw-section-note,
  .us-lede { font-size: 14px; line-height: 1.5; }
  .dw-hero-eye { font-size: 10px; }
  .dw-hero-title { font-size: clamp(23px, 6vw, 30px) !important; line-height: 1.12; }
  .dw-media-hero-copy .dw-hero-sub { font-size: 14px; line-height: 1.5; }
  .dw-card-title { font-size: 16px; }
  .dw-card-sub { font-size: 13px; line-height: 1.5; }
  .dw-bento-lbl { font-size: 11px; line-height: 1.4; }
  .pricing-name { font-size: 11px; }
  .pricing-desc { font-size: 13px; line-height: 1.45; }
  .dw-form-label { font-size: 13px; }
  .dw-form-input,
  .dw-form-select { min-height: 48px; font-size: 16px; }
  .dw-submit-btn,
  .dw-btn { min-height: 46px; font-size: 14px; }

  #unit-drawer .drawer-body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .us-journey button { min-width: 44px; min-height: 44px; padding: 6px 8px; }
  .us-journey button b { font-size: 10px; }
  .us-journey button span { font-size: 10px; }
  .us-unit { min-height: 76px; }
  .us-unit-id,
  .us-unit-status,
  .us-unit-space { font-size: 10px; }
  .us-unit-note { font-size: 11px; line-height: 1.35; }
  .us-mobile-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .us-mobile-bar button { min-height: 50px; font-size: 12px; }
  #unit-hud {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    left: 10px;
    right: 10px;
    padding: 12px;
  }
  .uh-pill { min-height: 28px; font-size: 10px; }
  .uh-title { font-size: 13px; }
  .uh-title small { font-size: 11px; }
  .uh-btn { min-height: 44px; font-size: 12px !important; }
  .uh-walk-note { font-size: 11px; }

  #orbital-ui {
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(max(60px, env(safe-area-inset-top) + 50px)) 16px calc(18px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }
  .orb-inner {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 14px 14px 12px;
  }
  .orb-logo img { width: 48px; height: 48px; }
  .orb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
  .orb-stat { min-height: 48px; padding: 7px 10px; border-radius: 10px; }
  .orb-stat span { font-size: 18px; }
  .orb-stat label { font-size: 9px; letter-spacing: .03em; }
  .orb-offer {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 9px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .orb-offer-pill { font-size: 9px; padding: 3px 8px; }
  .orb-offer-text { min-width: 0; font-size: 12px; line-height: 1.35; }
  .orb-offer-cta { grid-column: 1 / -1; justify-self: end; font-size: 12px; font-weight: 700; }
  .orb-entry-label { display: block; margin-bottom: 6px; font-size: 10px; letter-spacing: .08em; text-align: center; }
  .orb-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-bottom: 10px; }
  .orb-entry { min-height: 76px; padding: 7px 4px; border: 0; border-radius: 8px; background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
  .orb-entry-state { width: 52px; height: 36px; }
  .orb-entry-copy { align-items: center; text-align: center; }
  .orb-entry-name { font-size: 12px; }
  .orb-entry-tag { font-size: 8px; letter-spacing: .06em; }
  .orb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
  .orb-btn,
  .orb-select { min-width: 0; min-height: 42px; padding: 0 12px; font-size: 12.5px; border-radius: 9999px; }
  .orb-select { grid-column: 1 / -1; width: 100%; }
  .orb-hint { display: block; width: auto; height: auto; margin: 4px 0 0; background: none; font-size: 11px; letter-spacing: .02em; text-align: center; text-transform: none; }

}

@media (max-width: 390px) {
  #nav-bar .nav-btn { padding-inline: 10px; font-size: 10px; }
  .us-unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .us-unit { min-height: 82px; }
  .orb-actions { grid-template-columns: 1fr; }
  .orb-select { grid-column: auto; }
}

@media (max-height: 620px) and (max-width: 720px) {
  #orbital-ui { justify-content: flex-start; }
  .orb-inner { margin-block: 0; }
  .orb-mark { display: none; }
  .orb-stats { display: grid; }
  .orb-stat { min-height: 48px; }
  .orb-sub { margin-bottom: 9px; }
  .orb-offer { margin-bottom: 8px; }
  .orb-entries { max-height: 25dvh; overflow-y: auto; }
  .orb-hint { display: none; }
  body.vehicle-session-active #touch-controls { bottom: calc(158px + env(safe-area-inset-bottom)); }
  body.vehicle-session-active .touch-stick { width: 86px; height: 86px; }
}

@media (pointer: coarse) and (min-width: 721px) {
  #nav-bar .nav-btn,
  .fleet-tab,
  #spawn-btn,
  .cascade-action-btn,
  .cascade-action-btn .cab-icon,
  #cascade-main-btn { min-height: 44px; }
  #nav-bar .nav-btn { font-size: 11px; }
  .orb-btn,
  .orb-select,
  .dw-btn,
  .dw-submit-btn { min-height: 48px; }
  .dw-form-input,
  .dw-form-select { min-height: 48px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .touch-stick,
  .touch-stick-knob,
  #cascade-fab,
  .apple-drawer .drawer-sheet { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Mobile retains the full desktop fleet rail: same class tabs, one complete
   vehicle card per row, and the full registry list inside a scrollable rail. */
@media (max-width: 720px) {
  body:not(.vehicle-session-active) #fleet-rail {
    position: fixed !important;
    z-index: 700 !important;
    top: calc(max(92px, env(safe-area-inset-top) + 88px)) !important;
    right: auto !important;
    bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: min(286px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - max(174px, env(safe-area-inset-top) + 174px) - env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 0 8px 9px !important;
    gap: 7px !important;
    transform: none !important;
    border-radius: 18px !important;
  }
  body:not(.vehicle-session-active) #fleet-rail > .card-grip {
    position: sticky;
    top: 0;
    z-index: 8;
    min-height: 40px;
    background: rgba(5, 11, 18, .98) !important;
  }
  body:not(.vehicle-session-active) #fleet-rail > .fleet-tabs {
    position: sticky;
    top: 40px;
    z-index: 7;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 0 7px !important;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: rgba(5, 11, 18, .98);
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-tab {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 42px !important;
    height: 42px !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 7px;
    border-radius: 9px !important;
    touch-action: manipulation;
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-tab svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-tab[data-rail-class]::after {
    content: attr(data-rail-class);
    color: currentColor;
    font: 750 9px/1 system-ui, sans-serif;
    text-transform: uppercase;
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-tab.spacecraft-type::after { content: 'Orbit'; }
  body:not(.vehicle-session-active) #fleet-rail .fleet-concept-filter::after {
    content: 'Concept';
    color: currentColor;
    font: 750 9px/1 system-ui, sans-serif;
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-concept-filter .fleet-tab-n { display: none; }
  body:not(.vehicle-session-active) #fleet-rail .fleet-tab-n {
    top: 2px;
    right: 4px;
    font: 700 8px/1 system-ui, sans-serif;
  }
  body:not(.vehicle-session-active) #fleet-rail .fleet-item {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    min-height: 88px !important;
    height: auto !important;
    padding: 9px !important;
    gap: 0 9px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  body:not(.vehicle-session-active) #fleet-rail .fi-visual { width: 56px; height: 48px; }
  body:not(.vehicle-session-active) #fleet-rail .fi-top b { font-size: 8px; }
  body:not(.vehicle-session-active) #fleet-rail .fi-top em { font-size: 7px; }
  body:not(.vehicle-session-active) #fleet-rail .fi-copy > strong { font-size: 13px; }
  body:not(.vehicle-session-active) #fleet-rail .fi-copy > small { font-size: 10px; }
  body:not(.vehicle-session-active) #fleet-rail .fi-metrics { display: grid; }
  body:not(.vehicle-session-active) #fleet-rail > #spawn-btn {
    min-height: 48px !important;
    margin: 0 !important;
    touch-action: manipulation;
  }

  /* ── Mobile Collapsed Fleet Rail ── */
  #fleet-rail.collapsed,
  body:not(.vehicle-session-active) #fleet-rail.collapsed {
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    top: calc(max(6px, env(safe-area-inset-top)) + 52px) !important;
    bottom: auto !important;
    left: 8px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    border-radius: 9999px !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5) !important;
  }
  #fleet-rail.collapsed .card-grip,
  body:not(.vehicle-session-active) #fleet-rail.collapsed .card-grip {
    min-height: 40px !important;
    height: 40px !important;
    border-bottom: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
  #fleet-rail.collapsed .grip-dots,
  body:not(.vehicle-session-active) #fleet-rail.collapsed .grip-dots {
    display: none !important;
  }
  #fleet-rail.collapsed .card-title,
  body:not(.vehicle-session-active) #fleet-rail.collapsed .card-title {
    display: inline-block !important;
    font-size: 10px !important;
    color: #fff !important;
  }
  #fleet-rail.collapsed .fleet-tabs,
  #fleet-rail.collapsed .fleet-item,
  #fleet-rail.collapsed #spawn-btn,
  body:not(.vehicle-session-active) #fleet-rail.collapsed .fleet-tabs,
  body:not(.vehicle-session-active) #fleet-rail.collapsed .fleet-item,
  body:not(.vehicle-session-active) #fleet-rail.collapsed #spawn-btn {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   VTOL LIFT axis + camera button.

   Powered-lift craft previously had no climb input on touch at all: lift
   lived on Space/C and on pointer-locked mouse-Y, neither of which exists
   on a phone, so a VTOL could never leave the pad. LIFT is a third stick,
   shown only for cls="vtol". CAM moved here from the old unstyled
   #drev-touch-controls overlay, which was never given any CSS.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px), (pointer: coarse) {
  /* Three sticks have to clear a 375px viewport, so tighten the rail. */
  #touch-controls { left: 10px; right: 10px; gap: 8px; }

  .touch-stick {
    width: clamp(74px, 19vw, 108px);
    height: clamp(74px, 19vw, 108px);
    flex: 0 0 auto;
  }
  .touch-stick-title { font-size: 9px; letter-spacing: .14em; }

  /* LIFT is meaningless on ground and water craft. */
  #touch-controls .touch-stick[data-stick="lift"] { display: none; }
  body[data-veh-cls="vtol"] #touch-controls .touch-stick[data-stick="lift"] {
    display: block;
    border-color: rgba(126, 231, 168, .55);
    background: radial-gradient(circle, rgba(16, 46, 32, .68), rgba(3, 16, 10, .5) 72%);
    box-shadow: inset 0 0 22px rgba(74, 212, 140, .14), 0 6px 24px rgba(0, 0, 0, .32);
  }
  body[data-veh-cls="vtol"] #touch-controls .touch-stick[data-stick="lift"] .touch-stick-knob {
    background: radial-gradient(circle, rgba(170, 255, 205, .95), rgba(40, 170, 110, .75));
  }

  #touch-cam {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    min-width: 52px;
    padding: 8px 12px;
    border: 1px solid rgba(108, 224, 255, .5);
    border-radius: 9px;
    background: rgba(6, 18, 30, .82);
    color: #bfe9ff;
    font: 700 10px/1 Orbitron, system-ui, sans-serif;
    letter-spacing: .14em;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  #touch-cam:active { background: rgba(18, 54, 78, .92); }
}


/* ── Mobile crash fix: reduce GPU compositing layer count ──────────────
   94 backdrop-filter layers simultaneously during drawer transitions
   exceeds iOS Safari's compositing budget and causes jetsam crashes.
   On pointer:coarse (touch) devices we degrade blurs to solid backgrounds
   which are rasterized in the normal layer tree with no extra GPU cost.
   ─────────────────────────────────────────────────────────────────────── */
@media (pointer: coarse) and (max-width: 900px) {
  /* Drawers and sheets — solid dark bg instead of blur */
  .apple-drawer,
  .apple-drawer > *,
  .us-mobile-bar,
  .drev-fab-menu,
  .cascade-fab-container,
  .cascade-action-btn,
  .cab-own-label,
  .cab-route-label,
  .cab-tesla-label,
  .cab-v2h-label,
  .cab-dash-label,
  .fleet-rail,
  .fleet-minimized-pill,
  .card-grip,
  #touch-controls,
  .touch-stick,
  .nav-chip,
  .sat-toggle-btn,
  .weather-chip,
  #weather-chip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Keep one blur for the primary bottom drawer sheet only */
  .apple-drawer.open {
    background: rgba(8, 12, 24, 0.97) !important;
  }
  /* Prevent will-change thrashing on animated elements */
  * { will-change: auto !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   2026-11 bottom-right return pill (replaces the header collision fix)
   The "DREV Energy" return pill docks to the bottom-right corner of the
   screen, clear of the top navigation row — it previously covered
   "Orbit" and "Own a charger". The whole button (icon + label) stays
   visible at every width; no row sharing is required anymore.
   The corner is free in the Network Map view: the fleet rail is on the
   left, the cascade FAB floats higher (bottom: calc(76px + safe-area)),
   the DREV dock launcher and shared dock only render on the business
   landing page, drawers (z 1000) outrank this pill (z 910) and hide it
   while open, and the touch sticks during a vehicle session sit above
   bottom: calc(158px + safe-area).
   The mode badge keeps its own row under the nav, unclipped at the left
   edge.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  #business-return {
    top: auto !important;
    left: auto !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    min-height: 44px !important;
    border-radius: 14px !important;
  }

  #mode-badge {
    top: calc(max(8px, env(safe-area-inset-top)) + 56px) !important;
    left: 8px !important;
    max-width: calc(100vw - 16px);
    transform: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 720px) {
  /* Leave room for the weather chip sharing the second row. */
  #mode-badge { max-width: calc(100vw - 56px - 168px) !important; }
}

body.drev-dock-open 
