/* ==========================================================================
   DEEPAL CONNECT — PURE BORDERLESS AUTOMOTIVE MINIMALISM (v2 PWA)
   Zero borders anywhere. Pure tonal elevation, generous air, real S07 renders.
   ========================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;

  /* Spacing Scale (4/8px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --page-px: 18px;

  /* Concentric Radii (outer = inner + inset) */
  --r-card: 24px;
  --r-tile: 14px;
  --r-control: 12px;
  --r-pill: 999px;
  --r-sheet: 28px;

  /* Dark Theme (Obsidian) */
  --app-bg: #0A0C10;
  --surface: #171B24;
  --surface-2: #222736;
  --surface-3: #2D3346;
  --ink: #F5F7FA;
  --ink-2: rgba(245, 247, 250, 0.76);
  --ink-3: rgba(245, 247, 250, 0.56);
  --divider: rgba(255, 255, 255, 0.08);

  --accent-fill: #F5F7FA;
  --accent-ink: #0A0C10;

  --warm: #F59E0B;
  --on-warm: #140B00;
  --warm-bg: rgba(245, 158, 11, 0.16);
  --cool: #38BDF8;
  --on-cool: #041524;
  --cool-bg: rgba(56, 189, 248, 0.16);
  --green: #34D399;
  --on-green: #07130E;
  --green-bg: rgba(52, 211, 153, 0.14);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.14);

  --card-shadow: none;
  --float-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
  --sheet-shadow: 0 -12px 44px rgba(0, 0, 0, 0.52), 0 -2px 12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --car-shadow: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.32) 48%, transparent 74%);
  --map-bg: #11151E;
  --map-block: #181D29;
  --map-road: #232A3A;
  --map-river: #131B2B;
  --cabin-tint: brightness(0.95) contrast(1.04);

  /* Motion & Craft Tokens */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-press: 150ms;
  --dur-micro: 180ms;
  --dur-nav: 340ms;
  --dur-sheet-in: 360ms;
  --dur-sheet-out: 180ms;
  color-scheme: dark;
}

html[data-theme="light"] {
  --app-bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #EAECEF;
  --surface-3: #DFE3EA;
  --ink: #101218;
  --ink-2: rgba(16, 18, 24, 0.72);
  --ink-3: rgba(16, 18, 24, 0.60);
  --divider: rgba(16, 18, 24, 0.06);

  --accent-fill: #101218;
  --accent-ink: #FFFFFF;

  --warm: #9A3412;
  --on-warm: #FFFFFF;
  --warm-bg: rgba(217, 119, 6, 0.13);
  --cool: #0369A1;
  --on-cool: #FFFFFF;
  --cool-bg: rgba(14, 165, 233, 0.13);
  --green: #047857;
  --on-green: #FFFFFF;
  --green-bg: rgba(16, 185, 129, 0.12);
  --danger: #B91C1C;
  --danger-bg: rgba(220, 38, 38, 0.1);

  --card-shadow: 0 2px 14px rgba(15, 23, 42, 0.045);
  --float-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.10), 0 -2px 10px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  --car-shadow: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.32) 0%, rgba(15, 23, 42, 0.1) 50%, transparent 74%);
  --map-bg: #E6EBF2;
  --map-block: #DCE2EC;
  --map-road: #FFFFFF;
  --map-river: #D1DFF0;
  --cabin-tint: brightness(1.06) contrast(0.96);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --app-bg: #F2F4F7;
    --surface: #FFFFFF;
    --surface-2: #EAECEF;
    --surface-3: #DFE3EA;
    --ink: #101218;
    --ink-2: rgba(16, 18, 24, 0.72);
    --ink-3: rgba(16, 18, 24, 0.60);
    --divider: rgba(16, 18, 24, 0.06);
    --accent-fill: #101218;
    --accent-ink: #FFFFFF;
    --warm: #9A3412;
    --on-warm: #FFFFFF;
    --warm-bg: rgba(217, 119, 6, 0.13);
    --cool: #0369A1;
    --on-cool: #FFFFFF;
    --cool-bg: rgba(14, 165, 233, 0.13);
    --green: #047857;
    --on-green: #FFFFFF;
    --green-bg: rgba(16, 185, 129, 0.12);
    --danger: #B91C1C;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --card-shadow: 0 2px 14px rgba(15, 23, 42, 0.045);
    --float-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.10), 0 -2px 10px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
    --car-shadow: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.32) 0%, rgba(15, 23, 42, 0.1) 50%, transparent 74%);
    --map-bg: #E6EBF2;
    --map-block: #DCE2EC;
    --map-road: #FFFFFF;
    --map-river: #D1DFF0;
    --cabin-tint: brightness(1.06) contrast(0.96);
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
  border: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
.haptic-sink {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.has-haptic {
  position: relative;
}
.haptic-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.haptic-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  visibility: hidden;
}
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

/* iOS 26 Standalone PWA: solid top-edge anchor disables WebKit Liquid Glass top blur wash-out */
.ios-statusbar-anchor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: env(safe-area-inset-top, 0px);
  background-color: var(--app-bg);
  z-index: 40;
  pointer-events: none;
  transition: background-color 0.25s ease;
}

/* Pre-paint route gates (zero FOUC, zero fixed-element sampling leaks in iOS Safari) */
html[data-gate="install"] .app-scroll,
html[data-gate="install"] .dock-backdrop,
html[data-gate="install"] .dock-wrap,
html[data-gate="welcome"] .app-scroll,
html[data-gate="welcome"] .dock-backdrop,
html[data-gate="welcome"] .dock-wrap {
  display: none !important;
}
html[data-gate="install"] #installOverlay {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
html[data-gate="welcome"] #welcomeOverlay {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100dvh;
  height: 100%;
  height: 100dvh;
  background: var(--app-bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.num { font-variant-numeric: tabular-nums; }
.km-unit { font-size: 18px; font-weight: 560; color: var(--ink-2); margin-left: 2px; }
.ink-3 { color: var(--ink-3); }
.text-green { color: var(--green); }
.row-divider-top { padding: 12px 0 0; box-shadow: inset 0 1px 0 var(--divider); }

button {
  font-family: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* ==========================================================================
   FULLSCREEN MOBILE PWA SHELL (100dvh + iOS Safe Area Insets)
   ========================================================================== */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.25s ease;
}

.app-scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.pane {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.pane.active { display: flex; }
.pane.pane-enter > .pane-scroll {
  animation: dc-pane-enter 200ms var(--ease-out) both;
}
@keyframes dc-pane-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pane > .hero-head,
.pane > .page-top {
  flex: none;
  padding: 40px 18px 8px;
  background: var(--app-bg);
  z-index: 15;
  transition: background 0.25s ease;
}

.pane-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-1) var(--page-px) calc(98px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  scrollbar-width: none;
}
.pane-scroll::-webkit-scrollbar { display: none; }
.pane-scroll > * { flex-shrink: 0; }

/* Smooth Bottom Backdrop Under Dock (prevents cards peeking below capsule) */
.dock-backdrop {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 480px);
  height: calc(84px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    to top,
    var(--app-bg) 0%,
    var(--app-bg) 44%,
    color-mix(in srgb, var(--app-bg) 84%, transparent) 72%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 24;
  transition: background 0.25s ease;
}

/* Floating 5-Tab Capsule Navigation (Zero borders, iOS Home Indicator aware) */
.dock-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  padding: 0 20px;
  bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 10px));
  z-index: 25;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.dock {
  pointer-events: auto;
  position: relative;
  width: 100%;
  height: 62px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}
.dock-indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  bottom: 6px;
  width: calc((100% - 12px) / 5);
  border-radius: 999px;
  background: var(--surface-2);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--dock-idx, 0) * 100%), 0, 0);
  transition: transform var(--dur-nav) var(--ease-spring), background-color 200ms ease-out;
  will-change: transform;
}
.dock.seg-no-anim .dock-indicator {
  transition: none;
}
.dock-btn {
  position: relative;
  z-index: 1;
  height: 50px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  transition: color var(--dur-micro) ease-out, transform var(--dur-press) var(--ease-out);
}
.dock-btn:not(:disabled):active {
  transform: scale(0.96);
}
.dock-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.85;
  transition: transform 240ms var(--ease-spring), stroke-width 180ms ease-out;
}
.dock-btn span {
  font-size: 10.5px;
  font-weight: 580;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.dock-btn.active {
  color: var(--ink);
}
.dock-btn.active svg {
  stroke-width: 2.15;
  transform: scale(1.06);
  fill: color-mix(in srgb, currentColor 12%, transparent);
}
.dock-btn[data-dock="3"].active svg circle,
.dock-btn[data-dock="4"].active svg circle {
  fill: none;
}
.dock-btn.active span {
  font-weight: 640;
}

/* ==========================================================================
   COMMON BORDERLESS SURFACES & CONTROLS
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--sp-4);
  box-shadow: var(--card-shadow);
  transition: background 0.25s ease;
}
.card.compact { padding: var(--sp-4); }
.card-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-link-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 4px 2px 2px;
}
.page-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.back-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--card-shadow);
  transition: background-color 150ms ease-out, transform var(--dur-press) var(--ease-out);
}
.back-circle:not(:disabled):active { transform: scale(0.94); }
.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.page-meta {
  font-size: 13px;
  font-weight: 540;
  color: var(--ink-2);
}

/* iOS Borderless Switch */
.sw {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  flex: none;
  transition: background-color 200ms ease-out, transform var(--dur-press) var(--ease-out);
}
.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.26);
  transition: transform 280ms var(--ease-spring), width 160ms var(--ease-out), background-color 200ms ease-out;
}
.sw:not(:disabled):active::after {
  width: 26px;
}
.sw.on { background: var(--accent-fill); }
html[data-theme="dark"] .sw.on::after { background: #0A0C10; }
.sw.on::after { transform: translateX(20px); }
.sw.on:not(:disabled):active::after { transform: translateX(16px); width: 26px; }
.sw.on.green { background: var(--green); }
html[data-theme="dark"] .sw.on.green::after { background: #07130E; }

/* Clean Divider-separated List Rows */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8.5px 0;
  width: 100%;
  text-align: left;
  transition: transform var(--dur-press) var(--ease-out), opacity 150ms ease-out;
}
button.list-row:not(:disabled):active,
.row-tap-main:not(:disabled):active {
  transform: scale(0.985);
}
.list-row:first-child,
.card-label + .list-row { padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row + .list-row {
  box-shadow: inset 0 1px 0 var(--divider);
}
.list-row[hidden] + .list-row {
  padding-top: 0;
  box-shadow: none;
}
.family-list {
  display: contents;
}
.family-list > .list-row {
  box-shadow: inset 0 1px 0 var(--divider);
  padding-top: 8.5px;
}
.family-list > .list-row:last-child {
  padding-bottom: 0;
}
.row-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.row-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 150ms var(--ease-out), background-color 200ms ease-out;
}
.row-ico svg { width: 23px; height: 23px; stroke-width: 1.9; }
.list-row:not(:disabled):active .row-ico { transform: scale(0.94); }
.row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.row-text b {
  font-size: 14.5px;
  font-weight: 580;
  line-height: 1.25;
  min-height: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.row-text span {
  font-size: 12.5px;
  line-height: 1.3;
  min-height: 16px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chev {
  color: var(--ink-3);
  flex: none;
  transition: transform var(--dur-micro) var(--ease-out), color var(--dur-micro) ease-out;
}

/* Borderless Smooth Range Slider */
.slider-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slider-block + .slider-block {
  margin-top: 13px;
  padding-top: 13px;
  box-shadow: inset 0 1px 0 var(--divider);
}
.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.slider-head span { font-size: 14px; font-weight: 550; color: var(--ink); }
.slider-head b { font-size: 15px; font-weight: 650; color: var(--ink); }
input[type="range"].clean-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: var(--sp-1) 0;
  border-radius: var(--r-pill);
  background: linear-gradient(
    to right,
    var(--accent-fill) 0%,
    var(--accent-fill) var(--range-pct, 50%),
    var(--surface-2) var(--range-pct, 50%),
    var(--surface-2) 100%
  );
  cursor: pointer;
}
input[type="range"].clean-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-fill);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 180ms var(--ease-spring), box-shadow 180ms ease-out;
}
input[type="range"].clean-range::-webkit-slider-thumb:active {
  transform: scale(1.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34), 0 0 0 6px color-mix(in srgb, var(--accent-fill) 16%, transparent);
}

/* ==========================================================================
   SCREEN 1: HOME (TESLA / LI AUTO SERENE AIRY HERO)
   ========================================================================== */
.hero-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 2px;
}
.hero-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}
.hero-car-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  box-shadow: var(--card-shadow);
  flex: none;
  transition: background-color 220ms ease-out, color 220ms ease-out, box-shadow 220ms ease-out, transform 180ms var(--ease-out);
}
.hero-lock-pill .hero-lock-ico {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 280ms var(--ease-spring);
}
.hero-lock-pill.locked {
  background: var(--green-bg);
  color: var(--green);
  box-shadow: none;
}
.hero-lock-pill.unlocked {
  background: var(--warm-bg);
  color: var(--warm);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--warm) 28%, transparent);
}
.hero-lock-pill.offline {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
  box-shadow: none;
}
.hero-lock-pill.unlocked .hero-lock-ico {
  transform: rotate(-8deg) scale(1.06);
}
.hero-quiet-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--ink-2);
  flex: none;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.status-dot.amber { background: var(--warm); }
.status-dot.danger { background: var(--danger); }

.hero-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  min-height: 18px;
}
.hero-cabin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 540;
  color: var(--ink-2);
}
.hero-cabin-chip svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-2);
}

/* Unified Borderless Energy Panel */
.energy-card {
  position: relative;
  z-index: 1;
  padding: 14px;
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.energy-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.energy-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}
.energy-over {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.hero-km {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
  font-size: 36px;
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1.0;
  min-height: 36px;
  margin-top: -2px;
}
.km-unit {
  font-size: 18px;
  font-weight: 560;
  color: var(--ink-2);
  margin-left: 0;
}
.energy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 660;
  line-height: 1.2;
  white-space: nowrap;
  flex: none;
  transition: background-color 220ms ease-out, color 220ms ease-out;
}
.energy-badge .e-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.energy-badge.charging .e-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  animation: dc-dot-pulse 2s ease-out infinite;
}
@keyframes dc-dot-pulse {
  0% { transform: scale(0.65); opacity: 0.65; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}
.energy-badge.charging {
  background: var(--green-bg);
  color: var(--green);
}
.energy-badge.warm {
  background: var(--warm-bg);
  color: var(--warm);
}
.energy-badge.cool {
  background: var(--cool-bg);
  color: var(--cool);
}

.energy-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.energy-tiles.ev-only {
  grid-template-columns: 1fr;
}
.energy-tile {
  background: var(--surface-2);
  border-radius: var(--r-tile);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.energy-tile.ev {
  cursor: pointer;
}
.energy-tile.ev:not(:disabled):active {
  transform: scale(0.98);
}
.energy-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.energy-tile-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-2);
}
.energy-tile-title svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.energy-tile-km {
  font-size: 12px;
  font-weight: 620;
  color: var(--ink-2);
}
.energy-tile-val {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--ink);
}
.energy-bar {
  margin-top: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.energy-tiles.ev-only .energy-bar {
  height: 8px;
}
.energy-fill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  transition: width 480ms var(--ease-out), background-color 250ms ease-out;
}
.energy-fill.ev {
  width: 64%;
  background: var(--green);
}
.energy-fill.ev.is-charging::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 52%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.44) 50%, transparent 100%);
  transform: translateX(-140%);
  animation: dc-charge-shimmer 2.4s linear infinite;
  pointer-events: none;
}
@keyframes dc-charge-shimmer {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(320%); }
}
.energy-fill.ev.low {
  background: var(--warm);
}
.energy-fill.ev.crit {
  background: var(--danger);
}
.energy-fill.fuel {
  width: 72%;
  background: var(--warm);
}
.energy-fill.fuel.crit {
  background: var(--danger);
}

/* Floating Photorealistic Deepal S07 (NO CARD, PURE AIR!) */
.car-hero-float {
  position: relative;
  z-index: 4;
  margin: 0;
  flex: none;
  height: 156px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
#homeScroll {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  gap: 9px;
  padding-bottom: max(82px, calc(62px + env(safe-area-inset-bottom, 0px)));
}
#homeScroll .energy-card {
  padding: 12px 14px;
}
#homeScroll .q-circle-item {
  gap: 6px;
}
#homeScroll .q-circle-btn {
  width: 58px;
  height: 58px;
}
#homeScroll .q-circle-btn svg {
  width: 28px;
  height: 28px;
}
#homeScroll .slide-track {
  height: 60px;
  padding: 5px;
}
#homeScroll .slide-thumb {
  width: 50px;
  height: 50px;
}
#homeScroll .card.compact {
  padding: 11px 16px;
}
#homeScroll .list-row {
  padding: 7px 0;
}
#homeScroll .row-ico {
  width: 39px;
  height: 39px;
  border-radius: 13px;
}
#homeScroll .row-ico svg {
  width: 23px;
  height: 23px;
}
#homeScroll .list-row:first-child {
  padding-top: 0;
}
#homeScroll .list-row:last-child {
  padding-bottom: 0;
}
.car-ground-shadow,
.welcome-car-shadow {
  display: none !important;
}
.car-ground-shadow {
  position: absolute;
  bottom: 4px;
  left: 9%;
  right: 9%;
  height: 24px;
  background: var(--car-shadow);
  pointer-events: none;
}
.car-ambient-aura {
  position: absolute;
  inset: 2px 10px 12px;
  border-radius: 50%;
  pointer-events: none;
}
.car-ambient-aura::before,
.car-ambient-aura::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 480ms var(--ease-out);
  will-change: opacity, transform;
}
.car-ambient-aura::before {
  background: radial-gradient(ellipse at 50% 54%, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0.09) 46%, transparent 72%);
}
.car-ambient-aura::after {
  background: radial-gradient(ellipse at 50% 54%, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.09) 46%, transparent 72%);
}
html[data-theme="light"] .car-ambient-aura::before {
  background: radial-gradient(ellipse at 50% 54%, rgba(14, 165, 233, 0.19) 0%, rgba(14, 165, 233, 0.07) 46%, transparent 72%);
}
html[data-theme="light"] .car-ambient-aura::after {
  background: radial-gradient(ellipse at 50% 54%, rgba(217, 119, 6, 0.19) 0%, rgba(217, 119, 6, 0.07) 46%, transparent 72%);
}
.car-hero-float.clim-cool .car-ambient-aura::before {
  opacity: 1;
  animation: dc-aura-breathe 4.4s ease-in-out infinite;
}
.car-hero-float.clim-warm .car-ambient-aura::after {
  opacity: 1;
  animation: dc-aura-breathe 4.4s ease-in-out infinite;
}
@keyframes dc-aura-breathe {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1.03); }
}

.car-hero-stage {
  position: relative;
  z-index: 2;
  height: 100%;
  width: auto;
  max-width: min(96%, 392px);
  aspect-ratio: 960 / 483;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(6px) scale(1.14);
}
.car-hero-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 180ms ease-out;
}
.car-hero-img.is-swapping {
  opacity: 0.82;
}

/* Headlight Beams & Lens Flares (preserves body color filter!) */
.car-headlight-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.car-hero-float.lights-on .car-headlight-fx {
  opacity: 0.72;
}
.car-hero-float.flashing .car-headlight-fx {
  animation: dc-headlight-flash 1.65s ease-in-out both;
}
.car-hero-float.flashing .hl-beam,
.car-hero-float.flashing .hl-flare-low {
  opacity: 0;
}
.car-hero-float.flashing .hl-flare-far,
.car-hero-float.flashing .hl-flare-near {
  background: radial-gradient(ellipse at center, #FFF3D1 0%, #FF9F0A 38%, rgba(255, 149, 0, 0.52) 70%, transparent 88%);
  filter: blur(1.4px);
}
.hl-hazard {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #FFF3D1 0%, #FF9F0A 40%, rgba(255, 149, 0, 0.45) 72%, transparent 90%);
  filter: blur(1px);
  transform: translate(-50%, -50%);
}
.car-hero-float.flashing .hl-hazard {
  opacity: 1;
}
.hl-mirror {
  left: 64.8%;
  top: 24.5%;
  width: 18px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(-8deg);
}
.hl-rear {
  left: 95.8%;
  top: 30.5%;
  width: 16px;
  height: 12px;
}
.hl-flare {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(186, 230, 253, 0.88) 34%, rgba(56, 189, 248, 0.42) 64%, transparent 80%);
  filter: blur(1.2px);
  transform: translate(-50%, -50%);
}
.hl-flare-far {
  left: 5.5%;
  top: 38.5%;
  width: 28px;
  height: 18px;
}
.hl-flare-near {
  left: 34.5%;
  top: 38.5%;
  width: 64px;
  height: 20px;
  transform: translate(-50%, -50%) rotate(-5deg);
}
.hl-flare-low {
  left: 30%;
  top: 61%;
  width: 34px;
  height: 24px;
}
.hl-beam {
  position: absolute;
  background: radial-gradient(ellipse at right center, rgba(224, 242, 254, 0.56) 0%, rgba(125, 211, 252, 0.22) 48%, transparent 78%);
  filter: blur(5px);
  transform-origin: right center;
}
.hl-far {
  left: -15%;
  top: 30%;
  width: 24%;
  height: 28%;
  transform: rotate(-10deg);
}
.hl-near {
  left: 2%;
  top: 44%;
  width: 32%;
  height: 34%;
  transform: rotate(-14deg);
}
@keyframes dc-headlight-flash {
  0%, 16%, 32%, 50%, 66%, 84%, 100% { opacity: 0; transform: scale(0.98); }
  8%, 41%, 75% { opacity: 1; transform: scale(1.03); }
}

/* 4 Clean Round Tesla-Style Quick Actions */
.quick-circles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
  padding: 0;
}
.q-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.q-circle-btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--card-shadow);
  transition: transform 150ms var(--ease-out), background-color 200ms ease-out, color 200ms ease-out, box-shadow 220ms ease-out;
}
.q-circle-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
.q-circle-btn.cmd-pulse::after {
  animation: dc-circle-pulse 420ms var(--ease-out);
}
@keyframes dc-circle-pulse {
  0% { opacity: 0.34; transform: scale(0.96); }
  100% { opacity: 0; transform: scale(1.22); }
}
.q-circle-btn:not(:disabled):active { transform: scale(0.96); }
.q-circle-btn svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.9;
  transition: transform 300ms var(--ease-spring);
}
.q-circle-btn .trunk-lid {
  transform-box: view-box;
  transform-origin: 14px 7px;
  transition: transform 340ms var(--ease-spring);
}
.q-circle-btn.warm .trunk-lid {
  transform: rotate(-58deg);
}
.q-circle-btn .trunk-arrow {
  transition: opacity 200ms ease-out, transform 240ms var(--ease-out);
}
.q-circle-btn.warm .trunk-arrow {
  opacity: 0;
  transform: translateY(-2px);
}
.q-circle-btn .win-glass {
  transition: transform 300ms var(--ease-spring);
}
.q-circle-btn.active .win-glass {
  transform: translateY(3px) rotate(180deg);
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .q-circle-btn[data-act="toggle-clim"].cool svg,
  .q-circle-btn[data-act="toggle-clim"].warm svg {
    animation: dc-fan-spin 2.8s linear infinite;
  }
  .hero-lock-pill.unlocked {
    animation: dc-unlock-pulse 2.4s ease-in-out infinite;
  }
}
@keyframes dc-fan-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes dc-unlock-pulse {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--warm) 30%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm) 14%, transparent); }
}
.q-circle-btn.active {
  background: var(--accent-fill);
  color: var(--accent-ink);
}
.q-circle-btn.cool {
  background: var(--cool-bg);
  color: var(--cool);
}
.q-circle-btn.warm {
  background: var(--warm-bg);
  color: var(--warm);
}
.q-circle-lbl {
  font-size: 12px;
  font-weight: 540;
  line-height: 1.25;
  color: var(--ink-2);
  text-align: center;
}

/* Interactive Slide-to-Unlock / Slide-to-Lock Capsule (NO BORDERS!) */
.slide-track {
  position: relative;
  height: 64px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 5px;
  display: flex;
  align-items: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.slide-track.in-sheet { background: var(--surface-2); }
.slide-track:active { cursor: grabbing; }
.slide-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  opacity: 0;
  background-color: color-mix(in srgb, var(--green) 16%, transparent);
  border-radius: 999px;
  pointer-events: none;
  transition: width 360ms var(--ease-spring), opacity 220ms ease-out, background-color 180ms ease-out;
}
.slide-track.unlocked .slide-fill {
  background-color: color-mix(in srgb, var(--warm) 16%, transparent);
}
.slide-track.in-sheet .slide-fill {
  background-color: color-mix(in srgb, var(--accent-fill) 12%, transparent);
}
.slide-track.dragging .slide-fill {
  transition: opacity 120ms ease-out, background-color 160ms ease-out;
}
.slide-track.ready .slide-fill {
  background-color: color-mix(in srgb, var(--green) 26%, transparent);
}
.slide-track.unlocked.ready .slide-fill {
  background-color: color-mix(in srgb, var(--warm) 28%, transparent);
}
.slide-track.ready .slide-thumb {
  background: var(--green);
  color: #FFFFFF;
}
.slide-track.unlocked.ready .slide-thumb {
  background: var(--warm);
  color: #FFFFFF;
}
.slide-thumb {
  position: relative;
  z-index: 3;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 360ms var(--ease-spring), background-color 200ms ease-out, box-shadow 200ms ease-out;
  flex: none;
  will-change: transform;
}
.slide-thumb svg {
  width: 26px;
  height: 26px;
  transition: transform 200ms var(--ease-spring);
}
.slide-track.dragging .slide-thumb {
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.slide-track.unlocked .slide-thumb {
  background: var(--warm);
  color: var(--on-warm);
}
.slide-track.ready .slide-thumb {
  background: var(--green);
  color: var(--on-green);
  box-shadow: 0 4px 18px rgba(52, 211, 153, 0.42);
}
.slide-track.ready .slide-thumb svg {
  transform: scale(1.08);
}
.slide-track.unlocked.ready .slide-thumb {
  background: var(--warm);
  color: var(--on-warm);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.42);
}
.slide-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 46px;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-2);
  pointer-events: none;
  transition: opacity 140ms ease-out;
}
.slide-track:not(.dragging):not(.ready) .slide-label {
  background: linear-gradient(
    90deg,
    var(--ink-2) 0%,
    var(--ink-2) 38%,
    var(--ink) 50%,
    var(--ink-2) 62%,
    var(--ink-2) 100%
  );
  background-size: 240% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dc-slide-glint 3.6s ease-in-out infinite;
}
@keyframes dc-slide-glint {
  0%, 55% { background-position: 115% 0; }
  100% { background-position: -35% 0; }
}

/* ==========================================================================
   SCREEN 2: CLIMATE (REAL DEEPAL S07 CABIN RENDER)
   ========================================================================== */
.cabin-hero {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-card);
  height: 272px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  transition: background 280ms ease-out, box-shadow 280ms ease-out;
}
.cabin-climate-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 360ms var(--ease-out), background 360ms ease-out;
}
.cabin-hero.clim-cool .cabin-climate-glow {
  opacity: 1;
  background: radial-gradient(ellipse 68% 58% at 50% 44%, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0.06) 52%, transparent 78%);
}
.cabin-hero.clim-warm .cabin-climate-glow {
  opacity: 1;
  background: radial-gradient(ellipse 68% 58% at 50% 44%, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.06) 52%, transparent 78%);
}
.cabin-hero.clim-auto .cabin-climate-glow {
  opacity: 0.75;
  background: radial-gradient(ellipse 64% 54% at 50% 44%, rgba(52, 211, 153, 0.14) 0%, transparent 74%);
}
html[data-theme="light"] .cabin-hero.clim-cool .cabin-climate-glow {
  background: radial-gradient(ellipse 68% 58% at 50% 44%, rgba(3, 105, 161, 0.14) 0%, rgba(3, 105, 161, 0.04) 52%, transparent 78%);
}
html[data-theme="light"] .cabin-hero.clim-warm .cabin-climate-glow {
  background: radial-gradient(ellipse 68% 58% at 50% 44%, rgba(180, 83, 9, 0.14) 0%, rgba(180, 83, 9, 0.04) 52%, transparent 78%);
}
html[data-theme="light"] .cabin-hero.clim-auto .cabin-climate-glow {
  background: radial-gradient(ellipse 64% 54% at 50% 44%, rgba(4, 120, 87, 0.10) 0%, transparent 74%);
}
.cabin-hero.clim-off .cabin-img {
  opacity: 0.86;
}
.cabin-img {
  position: relative;
  z-index: 1;
  height: 118%;
  width: auto;
  object-fit: contain;
  object-position: center 14%;
  filter: var(--cabin-tint);
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 280ms ease-out;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 85%, transparent 100%);
}
.seat-glow {
  position: absolute;
  z-index: 2;
  width: 66px;
  height: 82px;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease-out), background-color 300ms ease-out, transform 320ms var(--ease-out);
  filter: blur(16px);
  transform: scale(0.92);
}
.seat-glow.fl { top: 60px; left: calc(50% - 74px); }
.seat-glow.fr { top: 60px; right: calc(50% - 74px); }
.seat-glow.heat { opacity: 0.62; background: var(--warm); transform: scale(1); }
.seat-glow.vent { opacity: 0.62; background: var(--cool); transform: scale(1); }
.seat-glow.lvl-1 { opacity: 0.48; transform: scale(0.92); }
.seat-glow.lvl-2 { opacity: 0.68; transform: scale(1); }
.seat-glow.lvl-3 { opacity: 0.88; transform: scale(1.08); }

.cab-chip {
  position: absolute;
  z-index: 3;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform var(--dur-press) var(--ease-out), box-shadow 180ms ease-out;
}
html[data-theme="dark"] .cab-chip {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.36);
}
.cab-chip svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.cab-chip:not(:disabled):active { transform: scale(0.94); }
.cab-chip.heat { background: var(--warm); color: var(--on-warm); }
.cab-chip.vent { background: var(--cool); color: var(--on-cool); }
.cab-chip.top-def { top: var(--sp-3); left: 50%; transform: translateX(-50%); }
.cab-chip.top-def:not(:disabled):active { transform: translateX(-50%) scale(0.94); }
.cab-chip.wheel { top: 52px; right: calc(50% + clamp(52px, 16.5vw, 66px)); }
.cab-chip.seat-l { top: 108px; right: calc(50% + clamp(52px, 16.5vw, 66px)); }
.cab-chip.seat-r { top: 108px; left: calc(50% + clamp(52px, 16.5vw, 66px)); }
.cab-chip.rear-def { bottom: var(--sp-3); left: 50%; transform: translateX(-50%); }
.cab-chip.rear-def:not(:disabled):active { transform: translateX(-50%) scale(0.94); }

.clim-ctrl-card {
  transition: background-color 260ms ease-out, box-shadow 260ms ease-out;
}
.clim-ctrl-card.clim-cool {
  background-color: color-mix(in srgb, var(--cool) 18%, var(--surface));
  box-shadow: var(--card-shadow);
}
.clim-ctrl-card.clim-warm {
  background-color: color-mix(in srgb, var(--warm) 20%, var(--surface));
  box-shadow: var(--card-shadow);
}
.clim-ctrl-card.clim-auto {
  background-color: color-mix(in srgb, var(--green) 14%, var(--surface));
  box-shadow: var(--card-shadow);
}
/* High-contrast white controls on tinted active climate card (light theme) & translucent bright controls (dark theme) */
.clim-ctrl-card:not(.clim-off) .temp-btn {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}
.clim-ctrl-card:not(.clim-off) .mode-pills {
  background: rgba(255, 255, 255, 0.10);
}
.clim-ctrl-card:not(.clim-off) .mode-pills .mode-pill:not(.on) {
  color: rgba(245, 247, 250, 0.86);
}
html[data-theme="light"] .clim-ctrl-card:not(.clim-off) .temp-btn {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .clim-ctrl-card:not(.clim-off) .mode-pills {
  background: rgba(255, 255, 255, 0.82);
}
html[data-theme="light"] .clim-ctrl-card:not(.clim-off) .mode-pills .mode-pill:not(.on) {
  color: rgba(16, 18, 24, 0.78);
}
.clim-ctrl-card.clim-off .temp-big {
  color: var(--ink-3);
}
.temp-big {
  transition: color 220ms ease-out;
}

.clim-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.clim-card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.clim-card-title svg {
  width: 23px;
  height: 23px;
  color: var(--ink-2);
  flex: none;
  transition: color 220ms ease-out;
}
.clim-card-title.is-on svg {
  color: var(--ink);
  animation: dc-spin 9s linear infinite;
}
.clim-card-title.is-cool svg { color: var(--cool); }
.clim-card-title.is-warm svg { color: var(--warm); }

.temp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.temp-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
  display: grid;
  place-items: center;
  transition: transform var(--dur-press) var(--ease-out), background-color 150ms ease-out;
}
.temp-btn:not(:disabled):active { transform: scale(0.94); background: var(--surface-3); }
.temp-big {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-block;
}
.num-bump-up { animation: dc-num-up 220ms var(--ease-spring); }
.num-bump-dn { animation: dc-num-dn 220ms var(--ease-spring); }
.num-bump-pop { animation: dc-num-pop 220ms var(--ease-spring); }
@keyframes dc-num-up {
  0% { opacity: 0.72; transform: translateY(4px) scale(0.96); }
  55% { opacity: 1; transform: translateY(-1px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dc-num-dn {
  0% { opacity: 0.72; transform: translateY(-4px) scale(0.96); }
  55% { opacity: 1; transform: translateY(1px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dc-num-pop {
  0% { transform: scale(0.95); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.mode-pills {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border-radius: 16px;
  background: var(--surface-2);
  gap: 0;
}
.mode-pills .mode-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  bottom: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 13px;
  background: var(--accent-fill);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--seg-idx, 1) * 100%), 0, 0);
  transition: transform 320ms var(--ease-spring), background-color 200ms ease-out, opacity 160ms ease-out;
  will-change: transform;
}
.mode-pills[data-mode="cool"] .mode-thumb { background: var(--cool-bg); }
.mode-pills[data-mode="auto"] .mode-thumb { background: var(--accent-fill); }
.mode-pills[data-mode="heat"] .mode-thumb { background: var(--warm-bg); }
.mode-pills[data-mode="off"] .mode-thumb {
  opacity: 0;
  transform: translate3d(calc(var(--seg-idx, 1) * 100%), 0, 0) scale(0.95);
}
.mode-pills.seg-no-anim .mode-thumb { transition: none; }
.mode-pill {
  position: relative;
  z-index: 1;
  padding: 10px 8px;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.mode-pill:not(:disabled):active { transform: scale(0.96); }
.mode-pill.on { color: var(--accent-ink); }
.mode-pill.cool.on { color: var(--cool); }
.mode-pill.warm.on { color: var(--warm); }

/* Front Seats Grid */
.seats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.seat-col {
  background: var(--surface-2);
  border-radius: var(--r-tile);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.seat-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1);
}
.seat-col-head b {
  font-size: 13px;
  font-weight: 620;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
}
.seat-lvl-tag {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-2);
  white-space: nowrap;
}
.seat-lvl-tag.warm { color: var(--warm); }
.seat-lvl-tag.cool { color: var(--cool); }
.seat-ctrl-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}
.seat-mode-btn {
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  transition: background-color 180ms ease-out, color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.seat-mode-btn:not(:disabled):active { transform: scale(0.96); }
.seat-mode-btn svg {
  width: 22px;
  height: 22px;
}
.seat-mode-btn.warm.on {
  background: var(--warm-bg);
  color: var(--warm);
}
.seat-mode-btn.cool.on {
  background: var(--cool-bg);
  color: var(--cool);
}
.lvl-dots {
  display: inline-flex;
  gap: 3px;
}
.lvl-dots i {
  width: 5px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.22;
  transition: opacity 0.16s ease;
}
.seat-mode-btn.lvl-1 .lvl-dots i:nth-child(1),
.seat-mode-btn.lvl-2 .lvl-dots i:nth-child(-n+2),
.seat-mode-btn.lvl-3 .lvl-dots i:nth-child(-n+3) {
  opacity: 1;
}

/* Climate Features 2x2 Grid */
.clim-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.clim-tile {
  background: var(--surface-2);
  border-radius: var(--r-tile);
  padding: var(--sp-3);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.clim-tile:not(:disabled):active { transform: scale(0.96); }
.clim-tile.wide {
  grid-column: 1 / -1;
}
.clim-tile-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.clim-tile-ico svg {
  width: 23px;
  height: 23px;
}
.clim-tile-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.clim-tile-txt b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clim-tile-txt span {
  font-size: 11.5px;
  font-weight: 540;
  line-height: 1.25;
  color: var(--ink-2);
}
.clim-tile.warm { background: var(--warm-bg); }
.clim-tile.warm .clim-tile-ico { background: var(--warm); color: var(--on-warm); }
.clim-tile.warm .clim-tile-txt span { color: var(--warm); font-weight: 620; }
.clim-tile.green { background: var(--green-bg); }
.clim-tile.green .clim-tile-ico { background: var(--green); color: var(--on-green); }
.clim-tile.green .clim-tile-txt span { color: var(--green); font-weight: 620; }

/* Timer 4-Segment & Pill Icon Buttons */
.timer-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}
.seg-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  bottom: 3px;
  border-radius: 999px;
  background: var(--accent-fill);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transition: transform 320ms var(--ease-spring), opacity 160ms ease-out, background-color 180ms ease-out;
}
.seg-no-anim .seg-thumb {
  transition: none !important;
}
.seg-4 {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  gap: 0;
}
.seg-4 .seg-thumb {
  width: calc((100% - 6px) / 4);
  transform: translate3d(calc(var(--seg-idx, 0) * 100%), 0, 0);
}
.seg-4 button {
  position: relative;
  z-index: 1;
  padding: 7px 4px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.seg-4 button:not(:disabled):active { transform: scale(0.96); }
.seg-4 button.active {
  color: var(--accent-ink);
}
.action-pill-btn.with-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 8px;
  font-size: 12.5px;
  white-space: nowrap;
}
.action-pill-btn.with-ico svg {
  width: 19px;
  height: 19px;
  flex: none;
}

/* ==========================================================================
   SCREEN 3: CHARGING
   ========================================================================== */
.charge-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}
.charge-pct {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.charge-eta {
  text-align: right;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.35;
}
.charge-bar-bg {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 13px;
}
.charge-bar-fill {
  position: relative;
  height: 100%;
  width: 64%;
  border-radius: 999px;
  background: var(--green);
  overflow: hidden;
  transition: background-color 250ms ease-out, width 480ms var(--ease-out);
}
.charge-bar-fill:not(.paused)::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 48%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.42) 50%, transparent 100%);
  transform: translateX(-140%);
  animation: dc-charge-shimmer 2.4s linear infinite;
  pointer-events: none;
}
.charge-bar-fill.paused { background: var(--ink-3); }

.two-col-btns.one-col { grid-template-columns: 1fr; }
.action-pill-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 44px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-tile);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform var(--dur-press) var(--ease-out), box-shadow 220ms ease-out;
}
.action-pill-btn:not(:disabled):active { transform: scale(0.96); }
.action-pill-btn.primary { background: var(--accent-fill); color: var(--accent-ink); }
.action-pill-btn.danger { background: var(--danger-bg); color: var(--danger); }
.action-pill-btn.cmd-flash {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill) 22%, transparent);
}
.action-pill-btn.cmd-confirmed::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7.5px;
  background: currentColor;
  clip-path: polygon(14% 48%, 38% 72%, 86% 24%, 96% 34%, 38% 92%, 4% 58%);
  animation: dc-check-pop 680ms var(--ease-spring) both;
  pointer-events: none;
}
@keyframes dc-check-pop {
  0% { opacity: 0; transform: scale(0.45); }
  24% { opacity: 1; transform: scale(1.06); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.86); }
}
.two-col-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.two-col-btns.tight { margin-top: var(--sp-1); }

.metrics-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.metrics-3.single {
  grid-template-columns: 1fr;
}
[data-b="odoMetrics"] .m3-cell {
  padding: 12px 6px;
}
[data-b="odoMetrics"] .m3-cell b {
  font-size: clamp(13.5px, 3.8vw, 16.5px);
}
.m3-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  min-width: 0;
}
.m3-cell b {
  font-size: 16.5px;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.m3-cell span {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.2;
  white-space: nowrap;
}

/* ==========================================================================
   SCREEN 4: STATUS, TPMS & MAP (REAL TOP-DOWN S07)
   ========================================================================== */
.tpms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tpms-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.tpms-unit-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-2);
}
.tpms-unit-btn {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 620;
  color: var(--ink-2);
  line-height: 1.2;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.tpms-unit-btn:not(:disabled):active {
  transform: scale(0.96);
}
.tpms-unit-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.tpms-stage {
  position: relative;
  width: 100%;
  height: 248px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
}
.tpms-stage::before {
  content: "";
  position: absolute;
  width: 158px;
  height: 232px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ink) 6%, transparent) 0%, transparent 72%);
  pointer-events: none;
}
.tpms-car-img {
  position: relative;
  z-index: 1;
  height: 236px;
  width: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.34));
  pointer-events: none;
}
.tpms-wheel {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  width: calc(50% - 45px);
  transform: translateY(-50%);
}
.tpms-wheel.fl { top: 23%; left: 0; }
.tpms-wheel.fr { top: 23%; right: 0; flex-direction: row-reverse; }
.tpms-wheel.rl { top: 79%; left: 0; }
.tpms-wheel.rr { top: 79%; right: 0; flex-direction: row-reverse; }

.tpms-badge {
  flex: none;
  min-width: 82px;
  padding: 8px 11px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 180ms ease-out, background-color 180ms ease-out;
}
.tpms-wheel.fr .tpms-badge,
.tpms-wheel.rr .tpms-badge {
  align-items: flex-end;
  text-align: right;
}
.tpms-wheel.is-warn .tpms-badge {
  border-color: color-mix(in srgb, var(--warm) 45%, transparent);
  background: color-mix(in srgb, var(--warm) 10%, var(--surface-2));
}
.tpms-wheel.is-crit .tpms-badge {
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2));
}
.tpms-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  line-height: 1.1;
}
.tpms-wheel.fr .tpms-badge-top,
.tpms-wheel.rr .tpms-badge-top {
  flex-direction: row-reverse;
}
.tpms-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-3);
}
.tpms-wheel.is-ok .tpms-dot { background: var(--green); }
.tpms-wheel.is-warn .tpms-dot { background: var(--warm); }
.tpms-wheel.is-crit .tpms-dot { background: var(--danger); }

.tpms-badge-val {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.12;
  margin-top: 1px;
}
.tpms-badge-val b {
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.tpms-badge-val em {
  font-style: normal;
  font-size: 11px;
  font-weight: 560;
  color: var(--ink-2);
}
.tpms-wheel.is-empty .tpms-badge-val em {
  display: none;
}
.tpms-temp {
  font-size: 11px;
  font-weight: 540;
  color: var(--ink-2);
  line-height: 1.2;
}
.tpms-temp[hidden] {
  display: none;
}
.tpms-leader {
  flex: 1 1 auto;
  min-width: 10px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.tpms-wheel.fr .tpms-leader,
.tpms-wheel.rr .tpms-leader {
  flex-direction: row-reverse;
}
.tpms-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--divider);
}
.tpms-axle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-3);
  box-shadow: 0 0 0 3px var(--surface);
}
.tpms-wheel.is-ok .tpms-axle-dot { background: var(--green); }
.tpms-wheel.is-warn .tpms-axle-dot { background: var(--warm); }
.tpms-wheel.is-crit .tpms-axle-dot { background: var(--danger); }
@media (max-width: 350px) {
  .tpms-badge { min-width: 72px; padding: 7px 8px; }
  .tpms-badge-val b { font-size: 17px; }
  .tpms-wheel { width: calc(50% - 42px); }
}
.contour-summary {
  margin-top: 14px;
  padding-top: 14px;
  box-shadow: inset 0 1px 0 var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
}
.contour-summary b { color: var(--ink); font-weight: 600; }

.map-card {
  padding: 0;
  overflow: hidden;
}
.map-canvas {
  position: relative;
  height: 224px;
  background: var(--map-bg);
  overflow: hidden;
  isolation: isolate;
}
.vector-map-host {
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  z-index: 1;
}
.vector-map-host .maplibregl-map {
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  font-family: inherit;
}
.vector-map-host .maplibregl-canvas {
  outline: none;
}
.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 410;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  transition: transform var(--dur-press) var(--ease-out), background-color 150ms ease;
}
.map-ctrl-btn:active { transform: scale(0.92); }
.map-ctrl-btn svg { width: 21px; height: 21px; }

.map-gps-overlay {
  position: absolute;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: color-mix(in srgb, var(--surface) 64%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.map-gps-overlay[hidden] { display: none; }
.map-gps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-fill);
  animation: dc-pin-pulse 1.8s ease-out infinite;
}

.dc-car-pin-wrap {
  background: transparent;
  border: 0;
}
.dc-car-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dc-car-pin-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  margin-bottom: 5px;
}
.dc-car-pin-anchor {
  position: relative;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}
.dc-car-pin-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.34);
  animation: dc-pin-pulse 2.2s ease-out infinite;
}
.dc-car-pin-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
@keyframes dc-pin-pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  70% { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Route Navigator Action Sheet */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-logo {
  display: none !important;
}
.route-sheet-sub {
  margin-top: -6px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: left;
}
.nav-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.nav-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  min-width: 0;
  transition: transform var(--dur-press) var(--ease-out), background-color 150ms ease;
}
.nav-quick-btn:not(:disabled):active { transform: scale(0.95); }
.nav-quick-btn:disabled { opacity: 0.45; cursor: default; }
.nav-quick-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.nav-quick-ico svg {
  width: 28px;
  height: 28px;
  display: block;
}
.nav-quick-lbl {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.route-nav-row {
  width: 100%;
  justify-content: space-between;
  padding: 10px 0;
}
.route-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.route-nav-icon svg {
  width: 34px;
  height: 34px;
  display: block;
}
.route-nav-row.is-primary .row-text b {
  color: var(--ink);
}
.route-nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.route-nav-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent-fill) 16%, transparent);
  color: var(--accent-fill);
}
.map-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.map-addr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.soft-pill {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.soft-pill:not(:disabled):active { transform: scale(0.96); }
.soft-pill:disabled { opacity: 0.45; cursor: default; }
.soft-pill.primary { background: var(--accent-fill); color: var(--accent-ink); }
.srv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.srv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.srv-dot.wait { background: var(--warm); }
.srv-dot.danger { background: var(--danger); }

/* ==========================================================================
   SCREEN 5: CAMERAS 360 & SENTRY
   ========================================================================== */
.cam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.cam-tile {
  position: relative;
  border-radius: var(--r-tile);
  overflow: hidden;
  aspect-ratio: 16 / 9.2;
  background: #0D1119;
  transition: transform var(--dur-press) var(--ease-out), opacity 180ms ease-out, box-shadow 200ms ease-out;
}
.cam-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 9, 15, 0.72) 0%, rgba(6, 9, 15, 0.18) 38%, transparent 65%);
  pointer-events: none;
}
.cam-tile:not(:disabled):active { transform: scale(0.96); }
.cam-tile svg { width: 100%; height: 100%; display: block; }
.cam-tile-lbl {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 2;
  font-size: 11.5px;
  font-weight: 600;
  color: #F5F7FA;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cam-sel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 180ms ease-out, transform 200ms var(--ease-spring);
}
.cam-tile.selected {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78);
}
.cam-tile.selected .cam-sel-dot {
  background: #FFFFFF;
}
.cam-tile.selected.is-live .cam-sel-dot,
.cam-tile.is-live .cam-sel-dot {
  background: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  flex-shrink: 0;
}
.action-pill-btn.is-live {
  background: rgba(239, 68, 68, 0.14);
  color: #EF4444;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.action-pill-btn.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.8);
  animation: livePulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
.cam-empty-hint.is-live {
  color: #EF4444;
  font-weight: 600;
}
.cam-tile:not(.selected) { opacity: 0.78; }
.cam-tile.has-photo { opacity: 1; }
.cam-tile.has-photo .cam-placeholder { display: none; }
.cam-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cam-photo[hidden] { display: none; }
.cam-loading-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 2.2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 160ms ease-out;
}
.cam-tile.is-loading .cam-loading-ring {
  opacity: 1;
  animation: camSpin 0.8s linear infinite;
}
.cam-tile.is-loading .cam-photo {
  filter: brightness(0.68);
}
@keyframes camSpin {
  to { transform: rotate(360deg); }
}
.cam-empty-hint {
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  text-align: center;
  text-wrap: pretty;
}
.cam-error-box {
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--r-tile);
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cam-error-box[hidden] { display: none; }
.cam-error-txt {
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1.35;
  text-wrap: pretty;
}
.cam-error-box .soft-pill {
  flex: none;
  padding: 7px 12px;
  font-size: 12px;
  background: var(--surface);
  color: var(--ink);
}
.cam-caption {
  margin-top: var(--sp-3);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
  text-wrap: pretty;
}

/* Fullscreen 360 Camera Viewer */
.cam-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(6, 9, 14, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.cam-viewer.open {
  opacity: 1;
  pointer-events: auto;
}
.cam-viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
}
.cam-viewer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #F5F7FA;
}
.cam-viewer-meta b {
  font-size: 16px;
  font-weight: 600;
}
.cam-viewer-meta span {
  font-size: 12px;
  color: rgba(245, 247, 250, 0.62);
}
.cam-viewer-meta span.is-live {
  color: #FF6B6B;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cam-viewer-meta span.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
  animation: livePulse 1.4s ease-in-out infinite;
}
.cam-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cam-viewer-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #F5F7FA;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease-out, transform 120ms ease-out;
}
.cam-viewer-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.22);
}
.cam-viewer-btn.active {
  background: #FFFFFF;
  color: #0D1119;
}
.cam-viewer-live {
  gap: 6px;
  padding: 0 12px;
  letter-spacing: 0.02em;
}
.cam-viewer-live .live-dot {
  background: rgba(245, 247, 250, 0.55);
}
.cam-viewer-live.is-live {
  background: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.45);
}
.cam-viewer-live.is-live .live-dot {
  background: #FFFFFF;
  animation: livePulse 1.4s ease-in-out infinite;
}
.cam-viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  margin: 12px -16px;
  padding: 0;
  transform-origin: center center;
  will-change: transform;
  transition: transform 220ms var(--ease-snap);
}
.cam-viewer.zoomed .cam-viewer-stage {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.cam-viewer-track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 280ms cubic-bezier(0.2, 0, 0, 1);
}
.cam-viewer-track.is-dragging {
  transition: none !important;
}
.cam-viewer-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.cam-viewer-canvas {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
  max-width: calc(100% - 24px);
  max-height: 100%;
  aspect-ratio: 16 / 9;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: fill;
  background: #06090E;
  transition: transform 220ms var(--ease-out);
  transform-origin: center center;
}
.cam-viewer-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  object-fit: contain;
  transition: transform 220ms var(--ease-out);
  transform-origin: center center;
}
.cam-viewer.zoomed .cam-viewer-img,
.cam-viewer.zoomed .cam-viewer-canvas {
  transform: scale(2);
}
.cam-viewer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  z-index: 2;
}
.cam-viewer-tab {
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(245, 247, 250, 0.78);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 120ms ease-out;
}
.cam-viewer-tab.active {
  background: #FFFFFF;
  color: #0D1119;
}
.cam-viewer-tab:disabled {
  opacity: 0.35;
}
.cam-viewer-tab:not(:disabled):active {
  transform: scale(0.96);
}
@media (orientation: landscape) and (max-height: 520px) {
  .cam-viewer {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) calc(env(safe-area-inset-right, 0px) + 14px) calc(env(safe-area-inset-bottom, 0px) + 8px) calc(env(safe-area-inset-left, 0px) + 14px);
  }
  .cam-viewer-top {
    gap: 8px;
  }
  .cam-viewer-meta b {
    font-size: 14px;
  }
  .cam-viewer-meta span {
    font-size: 11px;
  }
  .cam-viewer-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }
  .cam-viewer-stage {
    margin: 6px 0;
  }
  .cam-viewer-slide {
    padding: 0 6px;
  }
  .cam-viewer-canvas {
    max-width: calc(100% - 12px);
  }
  .cam-viewer-tabs {
    gap: 6px;
  }
  .cam-viewer-tab {
    height: 32px;
    font-size: 12px;
    border-radius: 10px;
  }
}

/* ==========================================================================
   SCREEN 6: PRIVACY (E2EE), GARAGE & SETTINGS
   ========================================================================== */
.privacy-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.privacy-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.privacy-ico {
  width: 42px;
  height: 42px;
  border-radius: var(--r-control);
  background: var(--green-bg);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}
.privacy-ico.pending {
  background: var(--warm-bg);
  color: var(--warm);
}
.privacy-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.seg-inline {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  gap: 2px;
  flex: none;
}
.seg-inline .seg-thumb {
  left: 0;
  width: var(--seg-w, 0px);
  transform: translate3d(var(--seg-x, 0px), 0, 0);
  transition: transform 300ms var(--ease-spring), width 300ms var(--ease-spring), opacity 160ms ease-out;
}
.seg-inline:not(.seg-measured) .seg-thumb {
  opacity: 0;
}
.seg-inline button {
  position: relative;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.seg-inline button:not(:disabled):active { transform: scale(0.96); }
.seg-inline:not(.seg-measured) button.active {
  background: var(--accent-fill);
}
.seg-inline button.active {
  color: var(--accent-ink);
}
.text-action {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--danger-bg);
  transition: background-color 160ms ease-out, color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.text-action:not(:disabled):active { transform: scale(0.96); }
.text-action.restore {
  color: var(--ink);
  background: var(--surface-2);
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   TOAST & MODAL SHEETS (Borderless, Safe Area Aware)
   ========================================================================== */
.toast {
  position: fixed;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  width: max-content;
  max-width: min(calc(100% - 40px), 360px);
  z-index: 60;
  background: var(--accent-fill);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 150ms ease-out, transform 150ms var(--ease-snap), visibility 150ms linear;
}
html[data-theme="light"] .toast {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition: opacity 220ms var(--ease-out), transform 280ms var(--ease-spring), visibility 0ms linear;
}

.sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: center;
  align-items: flex-end;
  padding: 16px 0 0;
  visibility: hidden;
  pointer-events: none;
  --backdrop-alpha: 0;
}
.sheet-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: var(--backdrop-alpha);
  pointer-events: none;
}
html[data-theme="light"] .sheet-bg::before {
  background: rgba(15, 23, 42, 0.22);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sheet-bg::before {
    background: rgba(15, 23, 42, 0.22);
  }
}
.sheet-bg.opening {
  display: flex;
  visibility: visible;
  pointer-events: auto;
  --backdrop-alpha: 0;
}
.sheet-bg.open {
  display: flex;
  visibility: visible;
  pointer-events: auto;
  --backdrop-alpha: 1;
}
.sheet-bg.open::before {
  transition: opacity 280ms ease-out;
}
.sheet-bg.closing {
  display: flex;
  visibility: visible;
  pointer-events: none;
  --backdrop-alpha: 0;
}
.sheet-bg.closing::before {
  transition: opacity 220ms ease-out;
}
.sheet-bg.is-dragging::before {
  transition: none !important;
}
.sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 12px var(--sp-5) calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  box-shadow: var(--sheet-shadow);
  transform: translate3d(0, 100%, 0);
  opacity: 1;
  will-change: transform;
  scrollbar-width: none;
}
.sheet-grabber {
  width: 36px;
  height: 4.5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 20%, transparent);
  margin: 0 auto 2px;
  flex: none;
}
.sheet.is-dragging {
  transition: none !important;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet-bg.opening .sheet {
  transform: translate3d(0, 100%, 0);
  opacity: 1;
}
.sheet-bg.open .sheet {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
}
.sheet-bg.closing .sheet {
  transform: translate3d(0, 100%, 0);
  opacity: 1;
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 520px) and (min-height: 520px) {
  .sheet-bg {
    align-items: center;
    padding: 24px;
  }
  .sheet {
    max-width: 448px;
    border-radius: var(--r-sheet);
    padding: var(--sp-5);
    transform: translate3d(0, 12px, 0) scale(0.98);
    opacity: 0;
    will-change: transform, opacity;
  }
  .sheet-grabber {
    display: none;
  }
  .sheet-bg.opening .sheet {
    transform: translate3d(0, 12px, 0) scale(0.98);
    opacity: 0;
  }
  .sheet-bg.open .sheet {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    transition: transform 280ms cubic-bezier(0.2, 0, 0, 1), opacity 220ms ease-out;
  }
  .sheet-bg.closing .sheet {
    transform: translate3d(0, 8px, 0) scale(0.99);
    opacity: 0;
    transition: transform 160ms ease-out, opacity 150ms ease-out;
  }
}
.sheet h3 { margin: 0; font-size: 18px; font-weight: 680; line-height: 1.25; letter-spacing: -0.02em; }
.sheet p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

.qr-card {
  align-self: center;
  width: 156px;
  height: 156px;
  border-radius: 16px;
  background: #FFFFFF;
  padding: var(--sp-3);
  display: grid;
  place-items: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
}
.field-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-tile);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  user-select: text;
  -webkit-user-select: text;
}
.field-input::placeholder { color: var(--ink-3); }
textarea.field-input {
  min-height: 76px;
  resize: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 14px;
  line-height: 1.4;
}
.mono-pill {
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11.5px;
  text-align: center;
  user-select: text;
  -webkit-user-select: text;
}

.color-dots {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.color-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: relative;
  transition: transform var(--dur-press) var(--ease-out), box-shadow 180ms ease-out;
}
.color-dot:not(:disabled):active { transform: scale(0.92); }
.color-dot.active {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-fill);
}
.color-dot.c-silver { background: linear-gradient(145deg, #D5DAE2, #8B93A1); }
.color-dot.c-black  { background: linear-gradient(145deg, #2D323E, #0B0D12); }
.color-dot.c-white  { background: linear-gradient(145deg, #FFFFFF, #D8DEE9); }
.color-dot.c-blue   { background: linear-gradient(145deg, #3B82F6, #1D4ED8); }
.color-dot.c-orange { background: linear-gradient(145deg, #FB923C, #C2410C); }
.color-dot.c-yellow { background: linear-gradient(145deg, #FDE047, #CA8A04); }
.color-dot.c-green  { background: linear-gradient(145deg, #4E7A6E, #233E37); }
.color-dot.c-gray   { background: linear-gradient(145deg, #526074, #252E3B); }

/* ==========================================================================
   EXTENDED BORDERLESS CONTROLS (WINDOWS, SCHEDULES, DTC, SENTRY SENSITIVITY)
   ========================================================================== */
.seg-full {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  gap: 0;
  width: 100%;
}
.seg-full .seg-thumb {
  width: calc((100% - 6px) / 3);
  transform: translate3d(calc(var(--seg-idx, 0) * 100%), 0, 0);
}
.seg-full[data-has-active="0"] .seg-thumb {
  opacity: 0;
  transform: translate3d(calc(var(--seg-idx, 0) * 100%), 0, 0) scale(0.95);
}
.seg-full button {
  position: relative;
  z-index: 1;
  padding: 8px 4px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 180ms ease-out, transform var(--dur-press) var(--ease-out);
}
.seg-full button:not(:disabled):active { transform: scale(0.96); }
.seg-full button.active {
  color: var(--accent-ink);
}

/* Overview 3-tab segmented switch & panels */
.ov-seg-wrap {
  flex: none;
  padding: 2px var(--page-px) 10px;
  background: var(--app-bg);
  z-index: 14;
  transition: background 0.25s ease;
}
.ov-seg-wrap .seg-full {
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.ov-seg-wrap .seg-full button {
  padding: 9px 6px;
  font-size: 13px;
}
.ov-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.ov-panel[hidden] {
  display: none;
}

.sentry-sens-wrap {
  margin-top: 10px;
  padding-top: 12px;
  box-shadow: inset 0 1px 0 var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sentry-sens-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 560;
  color: var(--ink-2);
}

.row-tap-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.contour-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.contour-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 580;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.contour-pill.on {
  background: var(--green-bg);
  color: var(--green);
}
.contour-pill.warn {
  background: var(--warm-bg);
  color: var(--warm);
}
.contour-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.sheet-group {
  background: var(--surface-2);
  border-radius: 20px;
  padding: 6px 14px;
}
.sheet-group .list-row {
  padding: 10px 0;
}
.sheet-group .seg-inline {
  background: var(--surface);
}
.sheet-group .sw {
  background: var(--surface-3);
}
.sheet-group .sw.on {
  background: var(--accent-fill);
}

.win-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
}
.win-row + .win-row {
  box-shadow: inset 0 1px 0 var(--divider);
}
.win-lbl {
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink);
  white-space: nowrap;
}
.seg-inline.win-seg button {
  padding: 5px 8px;
  font-size: 10.5px;
}

.day-pills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-pill {
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.day-pill:not(:disabled):active { transform: scale(0.94); }
.day-pill.active {
  background: var(--accent-fill);
  color: var(--accent-ink);
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stepper-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.step-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  font-weight: 450;
  display: grid;
  place-items: center;
  transition: transform var(--dur-press) var(--ease-out), background-color 150ms ease-out;
}
.step-mini:not(:disabled):active { transform: scale(0.94); }
.step-val {
  min-width: 42px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 640;
  display: inline-block;
}

.dtc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
}
.dtc-row + .dtc-row {
  box-shadow: inset 0 1px 0 var(--divider);
}
.dtc-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--green-bg);
  color: var(--green);
  white-space: nowrap;
}
.dtc-badge.warn {
  background: var(--danger-bg);
  color: var(--danger);
}
.dtc-meta {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.card.tappable {
  cursor: pointer;
  transition: background-color 200ms ease-out, transform var(--dur-press) var(--ease-out);
}
.card.tappable:not(:disabled):active { transform: scale(0.985); }

/* ==========================================================================
   PULL-TO-REFRESH (PROGRESSIVE SVG RING) & BORDERLESS REFRESH BUTTON
   ========================================================================== */
@keyframes dc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes dc-ptr-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes dc-ptr-dash {
  0% { stroke-dasharray: 10 56.55; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 40 56.55; stroke-dashoffset: -14; }
  100% { stroke-dasharray: 10 56.55; stroke-dashoffset: -56.55; }
}
@keyframes dc-ptr-check {
  0% { stroke-dashoffset: 18; opacity: 0; transform: scale(0.8); }
  100% { stroke-dashoffset: 0; opacity: 1; transform: scale(1); }
}

.ptr-indicator {
  flex: none;
  height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.25;
  transition: height 260ms var(--ease-spring), opacity 200ms ease-out;
  margin-top: -6px;
}
.ptr-indicator.pulling {
  transition: none;
}
.ptr-indicator.refreshing,
.ptr-indicator.done {
  height: 40px;
  opacity: 1;
}
.ptr-ring-wrap {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
}
.ptr-indicator.pulse-hit .ptr-ring-wrap {
  animation: dc-ptr-pulse 260ms var(--ease-spring);
}
.ptr-svg {
  width: 22px;
  height: 22px;
  transform: rotate(var(--ptr-rot, -30deg));
  transition: transform 140ms ease-out;
}
.ptr-indicator.pulling .ptr-svg {
  transition: none;
}
.ptr-track {
  stroke: var(--surface-3);
  transition: stroke 200ms ease-out;
}
.ptr-arc {
  stroke: var(--ink);
  stroke-dasharray: 56.55;
  stroke-dashoffset: var(--ptr-offset, 56.55);
  transform-origin: 12px 12px;
  transform: rotate(-90deg);
  transition: stroke 200ms ease-out;
}
.ptr-check {
  stroke: var(--green);
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  opacity: 0;
  transform-origin: 12px 12px;
}
.ptr-indicator.ready .ptr-arc {
  stroke: var(--accent-fill);
}
.ptr-indicator.refreshing .ptr-svg {
  transform: none;
  animation: dc-spin 0.85s linear infinite;
}
.ptr-indicator.refreshing .ptr-arc {
  stroke: var(--ink);
  animation: dc-ptr-dash 1.3s ease-in-out infinite;
}
.ptr-indicator.done .ptr-svg {
  transform: rotate(0deg);
  animation: none;
}
.ptr-indicator.done .ptr-track {
  stroke: var(--green-bg);
}
.ptr-indicator.done .ptr-arc {
  stroke: var(--green);
  stroke-dasharray: 56.55;
  stroke-dashoffset: 0;
  animation: none;
}
.ptr-indicator.done .ptr-check {
  animation: dc-ptr-check 240ms var(--ease-spring) both;
}
.ptr-indicator.done .ptr-label {
  color: var(--green);
}

.hero-status-group,
.page-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.hero-car-title {
  min-width: 0;
}
.page-top-left {
  min-width: 0;
}
.page-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.refresh-ico-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: var(--card-shadow);
  transition: background-color 160ms ease-out, color 160ms ease-out, transform var(--dur-press) var(--ease-out);
}
.refresh-ico-btn:not(:disabled):active {
  transform: scale(0.94);
}
.refresh-ico-btn svg {
  width: 15px;
  height: 15px;
}
.refresh-ico-btn.spinning {
  color: var(--ink);
}
.refresh-ico-btn.spinning svg {
  animation: dc-spin 0.85s linear infinite;
}

.hero-updated-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  min-height: 0;
  line-height: 1.3;
  text-align: right;
}
.hero-updated-meta:empty {
  display: none;
}

.sheet-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: -2px 2px 2px;
}

/* ==========================================================================
   ONBOARDING OVERLAYS (WELCOME / PAIRING + iOS SAFARI INSTALL) — ZERO BORDERS
   ========================================================================== */
.settings-exit-btn {
  margin-top: 2px;
}

.onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--app-bg);
  display: none;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease, background 0.25s ease;
}
.onboard-overlay.install-overlay {
  z-index: 45;
}
.onboard-overlay.open {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.onboard-inner {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  height: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) 22px max(26px, calc(env(safe-area-inset-bottom, 0px) - 8px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
}

.onboard-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}
.onboard-top-bar .seg-inline {
  padding: 4px;
  gap: 3px;
}
.onboard-top-bar .seg-inline .seg-thumb {
  top: 4px;
  bottom: 4px;
}
.onboard-top-bar .seg-inline button {
  padding: 8px 13px;
  font-size: 13px;
  min-height: 34px;
}

.welcome-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  text-align: center;
  padding: var(--sp-2) 0;
}
.welcome-car-stage {
  position: relative;
  width: 100%;
  height: 196px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-spotlight {
  position: absolute;
  inset: -52px -48px -16px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 68% 58% at 50% 46%, rgba(148, 163, 184, 0.22) 0%, rgba(56, 189, 248, 0.08) 38%, transparent 68%);
}
html[data-theme="light"] .welcome-spotlight {
  background: radial-gradient(ellipse 68% 58% at 50% 46%, rgba(255, 255, 255, 0.96) 0%, rgba(203, 213, 225, 0.36) 40%, transparent 68%);
}
.welcome-podium-floor {
  position: absolute;
  bottom: -4px;
  left: -8%;
  right: -8%;
  height: 54px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 64% 68% at 50% 50%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 42%, transparent 68%);
}
html[data-theme="light"] .welcome-podium-floor {
  background: radial-gradient(ellipse 64% 68% at 50% 50%, rgba(15, 23, 42, 0.065) 0%, rgba(15, 23, 42, 0.02) 44%, transparent 68%);
}
.welcome-car-shadow {
  position: absolute;
  bottom: 8px;
  left: 8%;
  right: 8%;
  height: 24px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 68% 72% at 50% 50%, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.42) 42%, transparent 68%);
}
html[data-theme="light"] .welcome-car-shadow {
  background: radial-gradient(ellipse 68% 72% at 50% 50%, rgba(15, 23, 42, 0.34) 0%, rgba(15, 23, 42, 0.12) 44%, transparent 68%);
}
.welcome-car-img {
  position: relative;
  z-index: 2;
  width: 96%;
  height: 176px;
  object-fit: contain;
}
.welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  max-width: 320px;
}
.welcome-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.welcome-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}
.welcome-title {
  margin: 0;
  font-size: 30px;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.welcome-e2ee-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.welcome-e2ee-pill svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.welcome-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  min-height: 64px;
  max-width: 312px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.onboard-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.onboard-btn {
  padding: 15px 18px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 620;
  min-height: 52px;
}
.welcome-btn-primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 26px rgba(0, 0, 0, 0.42);
}
html[data-theme="light"] .welcome-btn-primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(16, 18, 24, 0.18);
}
.welcome-btn-secondary {
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 580;
  min-height: 50px;
  box-shadow: var(--card-shadow);
}
.onboard-btn:not(.primary):not(.welcome-btn-secondary) {
  background: var(--surface-2);
  color: var(--ink);
}

/* iOS Safari Install Screen */
.install-inner {
  justify-content: center;
  gap: 24px;
}
.install-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-top: 8px;
}
.install-logo {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--float-shadow);
  margin-bottom: 4px;
}
.install-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.install-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.install-desc {
  margin: 0;
  max-width: 310px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 18px;
}
.install-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.install-step + .install-step {
  box-shadow: inset 0 1px 0 var(--divider);
}
.install-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.install-step-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}
.install-step-ico svg {
  width: 19px;
  height: 19px;
}
.install-step .row-text span {
  white-space: normal;
  line-height: 1.35;
}

/* ==========================================================================
   HOVER-CAPABLE POINTERS ONLY (prevent sticky :hover on touch)
   ========================================================================== */
@media (hover: hover) {
  .dock-btn:hover { color: var(--ink-2); }
  .back-circle:hover { background: var(--surface-2); }
  .refresh-ico-btn:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .q-circle-btn:not(.active):not(.cool):not(.warm):hover {
    background: var(--surface-2);
  }
  .action-pill-btn:not(.primary):not(.danger):hover {
    background: var(--surface-3);
  }
  .energy-tile.ev:hover {
    background: var(--surface-3);
  }
  button.list-row:hover .chev,
  .row-tap-main:hover .chev {
    transform: translateX(2px);
    color: var(--ink-2);
  }
}

/* ==========================================================================
   RESPONSIVE FOLD LAYOUTS (iPhone Fold Cover 466x678 & Unfolded >= 600px)
   Standard iPhones (< 600px width, > 700px height) are completely untouched.
   ========================================================================== */

/* 1. iPhone Fold Cover Screen (compact height <= 700px, narrow width <= 599px) */
@media (max-height: 700px) and (max-width: 599px) {
  .pane > .hero-head,
  .pane > .page-top {
    padding-top: 24px;
    padding-bottom: 4px;
  }

  .ov-seg-wrap {
    padding-bottom: 6px;
  }

  .car-hero-float {
    height: 112px;
    margin: 2px 0;
  }

  #homeScroll {
    gap: 5px;
    overflow-y: auto;
    padding-bottom: max(78px, calc(66px + env(safe-area-inset-bottom, 0px)));
  }

  #homeScroll .energy-card {
    padding: 9px 12px;
    gap: 4px;
  }

  #homeScroll .hero-km {
    font-size: 30px;
  }

  #homeScroll .energy-tile {
    padding: 6px 9px;
    gap: 3px;
  }

  #homeScroll .energy-tile-val {
    font-size: 19px;
  }

  #homeScroll .q-circle-item {
    gap: 3px;
  }

  #homeScroll .q-circle-btn {
    width: 46px;
    height: 46px;
  }

  #homeScroll .slide-track {
    height: 50px;
    padding: 4px;
  }

  #homeScroll .slide-thumb {
    width: 42px;
    height: 42px;
  }

  #homeScroll .card.compact {
    padding: 8px 14px;
  }

  #homeScroll .list-row {
    padding: 4px 0;
  }

  #homeScroll .row-ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
}

/* 2. iPhone Fold Unfolded / Foldables (>= 600px width & >= 600px height) */
@media (min-width: 600px) and (min-height: 600px) {
  .app-shell {
    max-width: 780px;
    padding-right: 92px;
  }

  .dock-backdrop {
    display: none;
  }

  .dock-wrap {
    position: fixed;
    right: max(14px, env(safe-area-inset-right, 0px));
    top: 50%;
    transform: translateY(-50%);
    left: auto;
    bottom: auto;
    width: auto;
    padding: 0;
  }

  .dock {
    display: flex;
    flex-direction: column;
    width: 68px;
    height: auto;
    padding: 8px 6px;
    gap: 4px;
    border-radius: 26px;
  }

  .dock-btn {
    width: 100%;
    height: 54px;
    border-radius: 20px;
  }

  .dock-indicator {
    left: 6px;
    width: calc(100% - 12px);
    bottom: auto;
    border-radius: 20px;
    transform: none;
    transition: top var(--dur-nav) var(--ease-spring), height var(--dur-nav) var(--ease-spring), background-color 200ms ease-out;
    will-change: top, height;
  }

  .pane-scroll,
  #homeScroll {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .map-canvas {
    height: 300px;
  }
}

/* ==========================================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .pane.pane-enter > .pane-scroll {
    animation: dc-fade-only 140ms ease-out both;
  }
  @keyframes dc-fade-only {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .dock-indicator,
  .seg-thumb,
  .mode-pills .mode-thumb,
  .sw::after,
  .slide-thumb,
  .slide-fill {
    transition-duration: 1ms !important;
  }

  .sheet-bg.opening .sheet {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  .sheet-bg.open .sheet {
    transition: opacity 140ms ease-out;
  }
  .sheet-bg.closing .sheet {
    transform: translateY(0) scale(1);
    transition: opacity 120ms ease-out;
  }

  .toast {
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 140ms ease-out, visibility 140ms linear;
  }
  .toast.show {
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 140ms ease-out, visibility 0ms linear;
  }

  .energy-fill.ev.is-charging::after,
  .charge-bar-fill:not(.paused)::after,
  .energy-badge.charging .e-dot::after,
  .car-ambient-aura::before,
  .car-ambient-aura::after,
  .clim-card-title.is-on svg,
  .slide-label,
  .car-hero-float.flashing .car-headlight-fx {
    animation: none !important;
  }

  .car-hero-float.flashing .car-headlight-fx {
    opacity: 0.9;
  }

  .num-bump-up,
  .num-bump-dn,
  .num-bump-pop,
  .q-circle-btn.cmd-pulse::after,
  .action-pill-btn.cmd-confirmed::after,
  .ptr-indicator.pulse-hit .ptr-ring-wrap,
  .ptr-indicator.refreshing .ptr-svg,
  .ptr-indicator.refreshing .ptr-arc,
  .ptr-indicator.done .ptr-check,
  .refresh-ico-btn.spinning svg {
    animation: none !important;
  }
}

/* Prevent Android Chromium GPU layer flicker during Pull-to-Refresh */
#homeScroll > * {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ==========================================================================
   SUPPORT & DIAGNOSTICS UPLOAD (Settings, live mode)
   ========================================================================== */
.diag-item + .diag-item {
  box-shadow: inset 0 1px 0 var(--divider);
}
.diag-item > .diag-row {
  padding: 10px 0;
}
.card-label + .diag-item > .diag-row {
  padding-top: 0;
}
.diag-item:last-child > .diag-row {
  padding-bottom: 0;
}
.diag-item:last-child > .diag-progress {
  padding-bottom: 0;
}
.diag-row .row-text span {
  white-space: normal;
  line-height: 1.35;
}
.diag-row:disabled {
  opacity: 0.78;
  cursor: default;
}
.diag-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.diag-badge.ok {
  background: var(--green-bg);
  color: var(--green);
}
.diag-badge.err {
  background: var(--danger-bg);
  color: var(--danger);
}
.diag-progress {
  padding: 6px 0 8px;
}
.diag-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.diag-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent-fill);
  transition: width 320ms var(--ease-out);
}
.diag-sub-ok {
  color: var(--green) !important;
  font-weight: 560;
}
.diag-sub-err {
  color: var(--danger) !important;
}
.pair-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-tile);
  background: var(--surface-2);
}
.pair-status[hidden] {
  display: none;
}
.pair-status-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.pair-status .diag-progress {
  padding-top: 0;
}

/* Alerts Settings Sheet */
.alerts-sheet-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 0;
}
.alerts-sheet-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--surface);
  padding-top: 8px;
}
.alerts-sheet-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 180ms ease-out;
}
.alerts-sheet-groups.is-muted {
  opacity: 0.45;
  pointer-events: none;
}
.alerts-sheet-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.alerts-sheet-sec-title {
  font-size: 11.5px;
  font-weight: 640;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 4px;
}
.alerts-sheet-sec .sheet-group {
  margin-bottom: 0;
}
.alerts-sheet-sec .list-row {
  padding-top: 11px;
  padding-bottom: 11px;
}
.alerts-sheet-sec .row-text b {
  font-size: 14px;
}
.alerts-sheet-sec .row-text span {
  font-size: 12px;
  white-space: normal;
  line-height: 1.35;
}

/* Cameras Promo Card (when vehicle lacks Deepal Tools localization camera module) */
.cam-promo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 6px 4px;
}
.cam-promo-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 2px;
}
.cam-promo-title {
  font-size: 16px;
  font-weight: 660;
  color: var(--ink);
}
.cam-promo-sub {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 280px;
}
.cam-promo-btn {
  width: 100%;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
