:root {
  --bg: #f2f4f7;
  --header: #0a1628;
  --card: #ffffff;
  --whami: #ffc107;
  --gps: #2196f3;
  --magnetic: #e53935;
  --sky: #43a047;
  --imu: #8e24aa;
  --landmark: #212121;
  --trust-high: #43a047;
  --trust-mid: #b28704;
  --trust-low: #e53935;
  --text: #0a1628;
  --muted: #546e7a;
  --divider: #eceff1;
  --nav-idle: #90a4ae;
  --map-wash: #e8eef2;
  --sheet: 42vh;
  --nav-h: 72px;
  --status-h: 26px;
  --chrome: calc(var(--nav-h) + var(--status-h) + var(--safe-bottom));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Roboto", "SF Pro Text", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: #0a1628;
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }

.app {
  width: min(480px, 100%);
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

.screen { display: none; position: absolute; inset: 0; }
.screen.active { display: flex; flex-direction: column; }
.screen-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }

/* ── Splash / onboarding ── */
.splash, .onboarding {
  background: var(--header);
  color: #fff;
  align-items: center;
  justify-content: center;
}
.splash-logo {
  width: 96px; height: 96px;
  background: #fff;
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.splash-logo img { width: 100%; height: 100%; object-fit: contain; }
.splash h1 {
  margin: 22px 0 6px;
  font-size: 28px;
  letter-spacing: 2px;
}
.splash p { margin: 0; color: #90a4ae; font-size: 14px; }

.onboarding { justify-content: flex-start; padding: 0; }
.onboard-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 0;
  width: 100%;
  flex-shrink: 0;
}
.onboard-brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; letter-spacing: 1px;
}
.onboard-brand img {
  width: 36px; height: 36px;
  background: #fff; border-radius: 9px; padding: 4px;
}
.onboard-page {
  flex: 1; display: flex; flex-direction: column;
  min-height: 0; width: 100%;
}
.onboard-kicker, .onboard-lead, .onboard-intro h2 { display: none; }
.onboard-intro {
  display: none;
}
.onboard-actions {
  order: 3;
  display: flex;
  justify-content: center;
  padding: 0 0 28px;
}
.onboarding-slides { order: 1; flex: 1; display: flex; }
.onboarding-skip {
  background: transparent;
  border: 1px solid #455a64;
  color: #eceff1;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
}
.onboarding-skip:hover { border-color: #90a4ae; color: #fff; }
.onboarding-slide {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 28px; text-align: center;
}
.onboarding-slide h3 {
  margin: 0 0 12px; font-size: 22px; font-weight: 800; line-height: 1.25;
}
.onboarding-icon {
  width: 88px; height: 88px; border-radius: 50%;
  border: 2px solid var(--whami);
  background: rgba(255,193,7,0.15);
  display: grid; place-items: center;
  color: var(--whami); margin-bottom: 28px;
}
.onboarding p { margin: 0; color: #b0bec5; font-size: 15px; line-height: 1.5; }
.dots {
  order: 2;
  display: flex; gap: 8px; justify-content: center; margin: 18px 0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #37474f; }
.dot.on { background: var(--whami); width: 22px; border-radius: 4px; }
.onboarding-next {
  margin: 0 28px;
  height: 48px; border: 0; border-radius: 12px;
  background: var(--whami); color: var(--header);
  font-weight: 700; font-size: 15px;
  min-width: 200px;
}

/* ── App chrome ── */
.appbar {
  background: var(--header);
  color: #fff;
  min-height: 56px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.appbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
.chip {
  background: rgba(67,160,71,0.15);
  color: var(--trust-high);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 700;
}

.tabs {
  display: flex;
  background: var(--header);
}
.tab {
  flex: 1; background: none; border: 0;
  color: #78909c; padding: 10px 4px 12px;
  font-size: 12px; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.tab.on { color: var(--whami); border-bottom-color: var(--whami); }
.tab svg { display: block; margin: 0 auto 4px; }

.chrome {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--header);
}
.chrome[hidden] { display: none !important; }
.status-bar {
  background: #1b5e20;
  color: #e8f5e9;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  padding: 6px 10px;
}
.status-bar.warn { background: #e65100; color: #fff8e1; }
.status-bar.off { background: #37474f; color: #cfd8dc; }

.nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--header);
  display: flex;
}
.nav button {
  flex: 1; background: none; border: 0;
  color: var(--nav-idle);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500;
}
.nav button.on { color: var(--whami); font-weight: 700; }
.nav .indicator {
  width: 48px; height: 28px; border-radius: 16px;
  display: grid; place-items: center;
}
.nav button.on .indicator { background: rgba(255,193,7,0.22); }

.page-pad {
  padding: 16px 16px calc(var(--chrome) + 16px);
}

/* ── Map ── */
#map-screen { background: var(--map-wash); }
#map {
  position: absolute; inset: 0;
  bottom: var(--chrome);
  background: #f2efe9;
}
#map .maplibregl-canvas-container,
#map .maplibregl-canvas,
#map .maplibregl-map {
  width: 100% !important;
  height: 100% !important;
}
.maplibregl-ctrl-attrib { font-size: 10px !important; }

.map-header {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 14px; right: 14px;
  display: flex; align-items: center; gap: 10px;
  z-index: 5; pointer-events: none;
}
.map-header > * { pointer-events: auto; }
.logo-tile {
  width: 52px; height: 52px;
  background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.tagline {
  flex: 1;
  font-size: 13px; font-weight: 500; color: #5a6570;
  text-shadow: 0 0 6px rgba(255,255,255,0.7);
}
.menu-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--header); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.28);
}

.notice {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 14px; right: 14px;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 5;
}
.notice h3 { margin: 0 0 4px; font-size: 14px; }
.notice p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.notice button {
  border: 0; background: var(--header); color: #fff;
  border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13px;
}

.map-fabs {
  position: absolute;
  right: 14px;
  bottom: calc(var(--chrome) + var(--sheet) + 72px);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 5;
}
.map-fabs.left {
  right: auto;
  left: 14px;
}
.fab {
  width: 48px; height: 48px; border: 0; border-radius: 14px;
  background: #fff; color: var(--header);
  box-shadow: 0 3px 10px rgba(0,0,0,0.16);
  display: grid; place-items: center;
}
.fab.text-fab {
  width: auto;
  padding: 0 14px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.spoof-banner {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 14px; right: 14px;
  background: #b71c1c;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  z-index: 8;
  box-shadow: 0 8px 24px rgba(183, 28, 28, 0.35);
}
.spoof-banner strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.spoof-banner p {
  margin: 0 0 10px;
  font-size: 13px;
  opacity: 0.95;
}
.spoof-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.spoof-banner button {
  border: 0;
  background: #fff;
  color: #b71c1c;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
}
.spoof-banner button.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.55);
}

.lock-chip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b5e20;
  color: #fff;
  border-radius: 999px;
  padding: 8px 10px 8px 14px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(27, 94, 32, 0.35);
}
.spoof-banner:not(.hidden) ~ .lock-chip {
  top: calc(env(safe-area-inset-top, 0px) + 168px);
}
.lock-chip button {
  border: 0;
  background: rgba(255,255,255,0.2);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.lock-dot .lock-core {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #43a047;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.45);
}

.link-btn {
  border: 0;
  background: transparent;
  color: #ffc107;
  font-weight: 700;
  font-size: 13px;
  padding: 8px;
}

#timeline-spark {
  width: 100%;
  height: 80px;
  background: #fff;
  border-radius: 12px;
  display: block;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.timeline-meta strong { font-size: 18px; }
.timeline-meta span { font-size: 28px; font-weight: 800; }
#timeline-scrub {
  width: 100%;
  margin: 14px 0 6px;
}
.timeline-cta .btn { margin-top: 10px; }

.track-pill {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: calc(100% + 8px);
  border: 0; background: #fff; color: var(--header);
  border-radius: 24px;
  padding: 11px 18px;
  font-weight: 800; font-size: 13px; letter-spacing: 0.7px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  z-index: 6;
  white-space: nowrap;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--trust-high);
  box-shadow: 0 0 0 0 rgba(67,160,71,0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(67,160,71,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,160,71,0); }
}

.sheet {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--chrome);
  height: var(--sheet);
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 28px rgba(0,0,0,0.18);
  z-index: 7;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: #dde3ea; margin: 10px auto 0;
  flex-shrink: 0;
}
.sheet-scroll { flex: 1; overflow: auto; padding: 14px 18px 16px; }
.trust-row { display: flex; align-items: flex-start; gap: 12px; }
.trust-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.trust-copy { flex: 1; min-width: 0; }
.trust-copy h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.15; }
.trust-copy p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.trust-score { text-align: right; flex-shrink: 0; }
.trust-score strong { font-size: 28px; font-weight: 800; line-height: 1; }
.trust-score span { font-size: 14px; font-weight: 600; opacity: 0.75; }
.explain { margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.verify-cta {
  margin-top: 10px; height: 44px; width: 100%;
  border-radius: 10px; background: #fff; font-weight: 700;
}
.sources-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; background: none; border: 0; width: 100%;
  font-size: 14px; font-weight: 700; color: var(--header);
}
.source-row {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px;
}
.source-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: #f0f3f6; display: grid; place-items: center; flex-shrink: 0;
}
.source-row h4 { margin: 0; font-size: 14px; font-weight: 700; }
.source-row p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.source-pct { font-size: 15px; font-weight: 800; }

/* ── Cards / lists ── */
.section-label {
  margin: 8px 16px 6px;
  font-size: 12px; font-weight: 700;
  color: var(--muted); letter-spacing: 0.8px; text-transform: uppercase;
}
.card {
  background: var(--card);
  border-radius: 16px;
  margin: 6px 16px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(10,22,40,0.06);
}
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sensor-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.bar {
  height: 6px; border-radius: 3px; background: #eceff1; margin-top: 10px; overflow: hidden;
}
.bar > i { display: block; height: 100%; border-radius: 3px; }

.search {
  width: 100%; border: 0; background: #eceff1; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; margin-bottom: 10px;
}
.filters { display: flex; gap: 8px; overflow: auto; padding-bottom: 8px; }
.filter {
  border: 0; background: #eceff1; color: var(--text);
  border-radius: 20px; padding: 7px 12px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.filter.on { background: var(--header); color: #fff; }

.pack-card .size { font-size: 12px; color: var(--muted); }
.pack-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  border: 0; border-radius: 12px; height: 40px; padding: 0 14px;
  font-weight: 700; font-size: 13px;
}
.btn-primary { background: var(--header); color: #fff; }
.btn-ghost { background: #eceff1; color: var(--header); }
.btn-outline {
  background: #fff; color: var(--header);
  border: 1px solid #cfd8dc;
}
.badge {
  font-size: 11px; font-weight: 700; border-radius: 8px;
  padding: 3px 8px;
}
.badge.active { background: #e8f5e9; color: #2e7d32; }
.badge.ready { background: #e3f2fd; color: #1565c0; }

.summary-chips { display: flex; gap: 10px; }
.summary-chip {
  flex: 1; border-radius: 14px; padding: 12px 10px; text-align: center;
}
.summary-chip strong { display: block; font-size: 20px; }
.summary-chip span { font-size: 12px; font-weight: 600; }
.crit { background: #ffebee; color: #c62828; }
.warn { background: #fff3e0; color: #b28704; }
.info { background: #e3f2fd; color: #1565c0; }

.event {
  border-left: 4px solid #90a4ae;
  padding-left: 12px;
}
.event.warning { border-color: #ffb300; }
.event.critical { border-color: #e53935; }
.event.info { border-color: #2196f3; }
.event time { font-size: 11px; color: var(--muted); }

.toggle {
  width: 46px; height: 28px; border-radius: 14px; border: 0;
  background: #cfd8dc; position: relative;
}
.toggle.on { background: var(--trust-high); }
.toggle i {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  transition: transform 0.18s ease;
}
.toggle.on i { transform: translateX(18px); }

.setting { padding: 14px 0; border-bottom: 1px solid var(--divider); }
.setting:last-child { border-bottom: 0; }

.install-banner {
  display: none;
  margin: 0 16px 12px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 14px;
  padding: 12px 14px;
}
.install-banner.show { display: block; }

.cam-wrap {
  background: #111; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4/3; position: relative;
}
#verify-video, #verify-canvas {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
#verify-canvas { display: none; }

.hidden { display: none !important; }
.muted { color: var(--muted); }

.chrome-brand {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 12px;
  color: #fff;
}
.chrome-brand img {
  width: 40px; height: 40px;
  background: #fff; border-radius: 10px; padding: 4px;
}
.chrome-brand strong { display: block; font-size: 16px; letter-spacing: 0.8px; }
.chrome-brand span { display: block; font-size: 11px; color: #90a4ae; margin-top: 2px; }

/* ── Desktop / tablet web layout ── */
@media (min-width: 900px) {
  body { background: var(--bg); overflow: auto; }
  .app {
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chrome {
    top: 0;
    bottom: 0;
    right: auto;
    width: 200px;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #152238;
  }
  .chrome-brand {
    display: flex;
    padding: 16px 14px 10px;
    gap: 10px;
  }
  .chrome-brand img { width: 34px; height: 34px; border-radius: 8px; }
  .chrome-brand strong { font-size: 14px; }
  .chrome-brand span { font-size: 10px; }
  .status-bar {
    order: 3;
    text-align: left;
    padding: 10px 14px 14px;
    background: transparent;
    color: #a5d6a7;
    font-size: 11px;
    line-height: 1.35;
  }
  .status-bar.warn { background: transparent; color: #ffcc80; }
  .status-bar.off { background: transparent; color: #b0bec5; }
  .nav {
    order: 2;
    flex: 0 0 auto;
    flex-direction: column;
    height: auto;
    padding: 4px 10px 8px;
    gap: 2px;
    align-items: stretch;
  }
  .nav button {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
  }
  .nav button.on { background: rgba(255,193,7,0.12); }
  .nav .indicator { width: 28px; height: 28px; }

  .screen { left: 200px; }
  .page-pad {
    padding: 28px 36px 40px;
    max-width: 1120px;
  }

  .appbar { padding: 16px 36px; min-height: 64px; }
  .appbar h1 { font-size: 22px; }
  .tabs { padding: 0 24px; }
  .tab { flex: 0 0 auto; padding: 14px 20px; font-size: 14px; }

  #map { bottom: 0; }
  .map-header {
    left: 16px;
    right: auto;
    top: 16px;
    width: auto;
    gap: 8px;
  }
  .map-header .logo-tile,
  .map-header .tagline { display: none; }
  .notice {
    left: 16px;
    right: auto;
    width: min(360px, calc(100% - 420px));
    top: 72px;
  }
  .sheet {
    left: auto;
    right: 20px;
    top: 20px;
    bottom: auto;
    width: 340px;
    height: auto;
    max-height: calc(100dvh - 40px);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(10,22,40,0.18);
  }
  .sheet-handle { display: none; }
  .sheet-scroll { padding-top: 8px; }
  .map-fabs {
    left: 16px;
    right: auto;
    bottom: 24px;
  }
  .track-pill {
    position: static;
    transform: none;
    width: calc(100% - 28px);
    margin: 14px 14px 0;
    border-radius: 12px;
    background: var(--header);
    color: #fff;
    box-shadow: none;
  }
  .track-pill .live-dot { box-shadow: 0 0 0 0 rgba(129,199,132,0.7); }
  .maplibregl-ctrl-top-right {
    top: auto !important;
    bottom: 88px;
    right: auto !important;
    left: 16px;
  }

  #sensor-list,
  #pack-list,
  #landmark-list,
  #activity-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    align-items: start;
  }
  #sensor-list .section-label,
  #landmark-list > .card:first-child {
    grid-column: 1 / -1;
  }
  .card { margin: 8px 0; }
  .summary-chips { max-width: 640px; }
  .install-banner { margin: 0 0 16px; }
  #settings-screen .card { max-width: 720px; }

  #onboarding-screen.screen.active {
    display: flex;
    flex-direction: column;
    left: 0;
    overflow: auto;
    background:
      radial-gradient(900px 420px at 50% -10%, rgba(255,193,7,0.12), transparent 60%),
      #0a1628;
  }
  .onboard-top {
    padding: 18px 48px;
    width: 100%;
    border-bottom: 1px solid #152238;
    background: rgba(10,22,40,0.72);
  }
  .onboard-brand img { width: 40px; height: 40px; }
  .onboard-brand span { font-size: 18px; }
  .onboarding-skip {
    padding: 10px 20px;
    font-size: 14px;
  }
  .onboard-page {
    flex: 1;
    width: min(1080px, calc(100% - 96px));
    margin: 0 auto;
    padding: 40px 0 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .onboard-intro {
    display: block;
    order: 1;
    padding: 0 0 36px;
    max-width: none;
    text-align: center;
  }
  .onboard-kicker {
    display: block;
    margin: 0 0 12px;
    color: var(--whami);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }
  .onboard-intro h2 {
    display: block;
    margin: 0 auto 16px;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    max-width: 16ch;
  }
  .onboard-lead {
    display: block;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.55;
    color: #b0bec5;
    max-width: 52ch;
  }
  .onboard-actions {
    order: 3;
    margin-top: auto;
    padding: 28px 0 8px;
    justify-content: center;
  }
  .onboarding-slides {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    flex: none;
  }
  .onboarding-slide,
  .onboarding-slide.hidden {
    display: flex !important;
    flex: none;
    align-items: flex-start;
    text-align: left;
    padding: 26px 24px;
    background: #152238;
    border: 1px solid #1e334d;
    border-radius: 18px;
  }
  .onboarding-slide h3 {
    font-size: 18px;
    color: #fff;
  }
  .onboarding-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }
  .onboarding-slide p { font-size: 14px; }
  .dots { display: none; }
  .onboarding-next {
    margin: 0;
    min-width: 140px;
    height: 42px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: none;
  }
  .cam-wrap { max-width: 640px; }
}

@media (min-width: 1280px) {
  #sensor-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #pack-list,
  #activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-pad { max-width: 1280px; }
}
