/*
 * SafeHouse Pocket — mobile-first layout.
 *
 * The shell is a single-column phone surface: a compact top bar, a vertically
 * scrolling content column, and a fixed bottom tab bar. Nothing is a desktop
 * card grid squeezed onto a phone — every surface is sized in relative units and
 * wraps, so the body never scrolls horizontally.
 */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#pocket {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
}

/* ── top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: calc(var(--safe-top) + var(--sp-4)) calc(var(--safe-right) + var(--sp-4))
    var(--sp-3) calc(var(--safe-left) + var(--sp-4));
  background: var(--glass);
  -webkit-backdrop-filter: var(--platform-bar-filter);
  backdrop-filter: var(--platform-bar-filter);
  border-bottom: 1px solid var(--hair);
}
.topbar > div:first-child {
  min-width: 0;
}

.topbar__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ISSUE-2 WI-3: the status chip is the elastic loser no more. Device capture
   (Pixel 9a, 2026-07-28) showed "Not confirmed · Tap to check" cut to
   "Not confirmed · Tap to che" — the chip shrank and its nowrap text was clipped
   mid-word. A status reading that is physically unreadable is the same failure
   this work item is about, one layer down. The title already ellipsizes
   gracefully, so it yields instead; the chip keeps its natural width. */
.topbar__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  min-width: 0;
  flex: 0 0 auto;
}

.topbar__actions .freshness {
  min-width: var(--tap);
  /* Backstop for a genuinely narrow screen: ellipsis, never a mid-word cut. */
  overflow: hidden;
}

.freshness > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__you {
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 var(--tap);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--line);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.topbar__you-icon {
  width: 20px;
  height: 20px;
}

/* freshness chip */
.freshness {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.freshness__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
/* The tap affordance on the idle chip (F-DG-7): a small trailing refresh glyph
   says "this is a button", without shouting over the freshness reading. */
.freshness__refresh {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: 0.75;
}
.freshness--fresh {
  color: var(--green-ink);
  background: var(--green-tint);
  border-color: var(--nav-on-line);
}
.freshness--fresh .freshness__dot {
  background: var(--green);
}
.freshness--recent {
  color: var(--blue-ink);
  background: var(--blue-tint);
}
.freshness--recent .freshness__dot {
  background: var(--blue);
}
.freshness--stale {
  color: var(--amber-ink);
  background: var(--amber-tint);
  border-color: var(--amber-bd);
}
.freshness--stale .freshness__dot {
  background: var(--amber);
}
.freshness--offline {
  color: var(--danger-ink);
  background: var(--danger-tint);
}
.freshness--offline .freshness__dot {
  background: var(--danger);
}
/* Preview mode: the chip reads as demo semantics, not a staleness alarm (F-5) */
.freshness--demo {
  color: var(--amber-ink);
  background: var(--amber-tint);
  border-color: var(--amber-bd);
}
.freshness--demo .freshness__dot {
  background: var(--amber);
}

/* ── scrolling content ───────────────────────────────────────────────── */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Bottom clearance = tabbar (84px) + the floating row above it (help
     button / connect pill / demo badge, ~56px) so the last card can always
     scroll clear of every floating layer (dogfood P-03/P-09). */
  padding: var(--sp-4) calc(var(--safe-right) + var(--sp-4))
    calc(var(--sp-6) + 140px + var(--safe-bottom)) calc(var(--safe-left) + var(--sp-4));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
  margin: var(--sp-2) 0 calc(-1 * var(--sp-1));
}

/* ── cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.card--accent {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-color: var(--nav-on-line);
}

.card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 6px;
  line-height: 1.25;
}

.card__body {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ── pills / badges ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--panel-3);
  color: var(--text-2);
  border: 1px solid var(--hair);
}
.pill--green {
  color: var(--green-ink);
  background: var(--green-tint);
}
.pill--amber {
  color: var(--amber-ink);
  background: var(--amber-tint);
}
.pill--blue {
  color: var(--blue-ink);
  background: var(--blue-tint);
}
.pill--danger {
  color: var(--danger-ink);
  background: var(--danger-tint);
}

.demo-badge {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--amber-ink);
  background: var(--amber-tint);
  border: 1px solid var(--amber-bd);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.status-dot--on {
  background: var(--green);
  box-shadow: var(--green-glow);
}
.status-dot--standby {
  background: var(--blue);
}
.status-dot--quiet {
  background: var(--gold);
}
.status-dot--off {
  background: var(--faint);
}

/* ── roster (Team) ───────────────────────────────────────────────────── */
.roster-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--bg-2);
  background: var(--grad-green);
}
.roster-item__main {
  flex: 1 1 auto;
  min-width: 0;
}
.roster-item__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.roster-item__meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}
.roster-item__focus {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ── notification preview ────────────────────────────────────────────── */
.notif {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
}
.notif__glyph {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--panel-3);
  font-size: 16px;
}
.notif__title {
  font-weight: 700;
  font-size: 14px;
}
.notif__body {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.notif__stage {
  font-size: 11px;
  color: var(--faint);
  margin-top: 6px;
}

/* ── clearances ──────────────────────────────────────────────────────── */
.clearance__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.tier-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 7px;
}
.tier-badge--t1 {
  color: var(--blue-ink);
  background: var(--blue-tint);
}
.tier-badge--t2 {
  color: var(--amber-ink);
  background: var(--amber-tint);
  border: 1px solid var(--amber-bd);
}
.gate-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--hair);
}

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 0 var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 160ms ease-out, transform 160ms ease-out, background 160ms ease-out;
}
.btn--full {
  width: 100%;
}
.btn--primary {
  color: var(--bg-2);
  background: var(--grad-green);
}
.btn--ghost {
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--line);
}
.btn--danger {
  color: #fff;
  background: var(--danger);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── order composer (Line) ───────────────────────────────────────────── */
.composer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.composer__input {
  width: 100%;
  min-height: 96px;
  resize: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--input-bg);
  padding: var(--sp-3);
  font-size: 14px;
  line-height: 1.45;
}
.composer__note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.queue-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.queue-item__dot {
  margin-top: 5px;
}

/* ── empty / degraded ────────────────────────────────────────────────── */
.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: var(--sp-6) var(--sp-4);
}
.banner {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  line-height: 1.4;
}
.banner--amber {
  background: var(--amber-bg);
  border: 1px solid var(--amber-bd);
  color: var(--amber-ink);
}

/* ── bottom tab bar ──────────────────────────────────────────────────── */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  display: flex;
  z-index: 10;
  padding: var(--sp-2) calc(var(--safe-right) + var(--sp-2))
    calc(var(--sp-2) + var(--safe-bottom)) calc(var(--safe-left) + var(--sp-2));
  background: var(--glass);
  -webkit-backdrop-filter: var(--platform-bar-filter);
  backdrop-filter: var(--platform-bar-filter);
  border-top: 1px solid var(--hair);
}
.tab {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px;
  min-height: var(--tap);
  border-radius: 12px;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease-out, background 160ms ease-out, transform 160ms ease-out,
    opacity 160ms ease-out;
}
.tab__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}
.tab__svg {
  width: 22px;
  height: 22px;
  display: block;
}
.tab__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab--active {
  color: var(--green-ink);
  background: var(--nav-on-bg);
}
.tab__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ── platform visual grammar ─────────────────────────────────────────── */
html.platform-ios .topbar,
html.platform-ios .tabbar {
  background: var(--glass);
}

html.platform-ios .card,
html.platform-ios .notif,
html.platform-ios .sheet__waiting {
  border-radius: 16px;
}

html.platform-ios .sheet__panel,
html.platform-ios .pocket-priming__card {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

html.platform-ios :where(.btn, .tab, .freshness, .topbar__you, .about-row, .sheet__back, .pocket-onb__skip, .pocket-onb-help):active {
  opacity: 0.76;
  transform: scale(var(--platform-press-scale));
}

html.platform-android .card,
html.platform-android .notif,
html.platform-android .sheet__waiting {
  border-radius: var(--radius);
}

html.platform-android .btn {
  border-radius: 999px;
}

html.platform-android .tab {
  border-radius: 18px;
}

html.platform-android .tab--active {
  border-radius: 999px;
}

html.platform-android :where(.btn, .tab, .freshness, .topbar__you, .about-row, .sheet__back, .pocket-onb__skip, .pocket-onb-help)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}

html.platform-android :where(.btn, .tab, .freshness, .topbar__you, .about-row, .sheet__back, .pocket-onb__skip, .pocket-onb-help):active::after {
  opacity: 0.12;
}

html.platform-android .btn--primary:active::after {
  opacity: 0.18;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* UX-1 — reachable exit from the camera scan.
 * The QR scan runs `windowed: true`, so the native camera renders BEHIND the
 * webview. Make the app surfaces transparent/hidden while scanning so the live
 * camera shows through, and leave only the #pocket-scan-cancel overlay
 * (created in pairing-controller.ts) visible on top with its Cancel button. */
html.pocket-scanning,
body.pocket-scanning {
  background: transparent !important;
}
body.pocket-scanning #pocket,
body.pocket-scanning .phone,
body.pocket-scanning #pocket-pairing {
  visibility: hidden !important;
}

/* UX-3 — the freshness chip is now the single refresh control (the old floating
 * engine strip is gone). It is a real <button>: tap to check for updates, with a
 * spinner while the wake is in flight. */
.freshness {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
.freshness:active {
  opacity: 0.85;
}
.freshness--checking {
  color: var(--muted);
  background: var(--panel-3);
  border-color: var(--hair);
}
.freshness__spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--hair);
  border-top-color: var(--green);
  animation: pocket-spin 0.7s linear infinite;
}
@keyframes pocket-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Compact button for inline use (the "This phone" card's next action). */
.btn--sm {
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  font-size: 13px;
}

/* ── S6 pairing sheet (UX-3) ─────────────────────────────────────────────
 * A design-system bottom sheet: a dimmed backdrop with a rounded panel that
 * slides up from the bottom, a grabber, and a `‹ Back` control. Replaces the
 * old full-bleed pairing overlay + floating pill. */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--scrim);
}
.sheet[data-open="true"] {
  display: flex;
}
.sheet__panel {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  box-sizing: border-box;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2) calc(var(--safe-right) + var(--sp-4))
    calc(var(--safe-bottom) + var(--sp-5)) calc(var(--safe-left) + var(--sp-4));
  animation: pocket-sheet-in var(--platform-sheet-duration) var(--platform-sheet-ease);
}
@keyframes pocket-sheet-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.sheet__grabber {
  width: 36px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--hair);
  margin: var(--sp-1) auto var(--sp-2);
}
.sheet__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
}
.sheet__back {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  min-width: 58px;
  padding: 0 var(--sp-2) 0 0;
  font-size: 16px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.sheet__back span[aria-hidden] {
  font-size: 22px;
  line-height: 1;
}
.sheet__back:active {
  opacity: 0.6;
}
.sheet__title {
  font-size: 18px;
  font-weight: 700;
}
.sheet__lead {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.sheet__error {
  margin: 0;
  color: var(--danger-ink);
  font-size: 14px;
  line-height: 1.45;
}
.sheet__hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.sheet__recover {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.sheet__waiting {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
}
.sheet__wait-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--green-glow);
  animation: pocket-pulse 1.4s ease-in-out infinite;
}
@keyframes pocket-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ── UX-2 onboarding + permission priming (additive) ─────────────────────────
 * First-run intro overlay, a re-view (help) entry, a Demo-mode badge, and the
 * post-pairing notification priming sheet. All self-mounted by onboarding.ts;
 * visibility is toggled inline (display:none ↔ flex), these rules only style. */

/* Keep the onboarding chrome out of the way of the live camera scan. */
body.pocket-scanning #pocket-onb-help,
body.pocket-scanning #pocket-demo-badge,
body.pocket-scanning #pocket-onboarding,
body.pocket-scanning #pocket-about,
body.pocket-scanning #pocket-priming {
  visibility: hidden !important;
}

/* ── S7 You/About sheet (ST-1B) ─────────────────────────────────────────── */
.pocket-about {
  z-index: 60;
}

.pocket-about__panel {
  gap: var(--sp-4);
}

.about-status {
  flex-wrap: wrap;
}

.about-version {
  margin-top: var(--sp-3);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.about-row {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 160ms ease-out, transform 160ms ease-out, background 160ms ease-out;
}

.about-row[disabled],
.about-row[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.about-row--danger {
  color: var(--danger-ink);
  background: var(--danger-tint);
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
}

.about-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-row__label {
  font-size: 14px;
  font-weight: 800;
}

.about-row__detail {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.about-confirm {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius);
  color: var(--danger-ink);
  background: var(--danger-tint);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
}

.about-confirm--done {
  color: var(--green-ink);
  background: var(--green-tint);
  border-color: var(--nav-on-line);
}

.about-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* first-run overlay */
.pocket-onb {
  position: fixed;
  inset: 0;
  z-index: 70;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
  padding: calc(var(--safe-top) + var(--sp-5))
    calc(var(--safe-right) + var(--sp-5)) calc(var(--safe-bottom) + var(--sp-5))
    calc(var(--safe-left) + var(--sp-5));
  animation: pocket-onb-fade 180ms ease-out;
}
.pocket-onb__bar,
.pocket-onb__stage,
.pocket-onb__actions {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  box-sizing: border-box;
}
.pocket-onb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pocket-onb__skip {
  position: relative;
  overflow: hidden;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--sp-3);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.pocket-onb__dots {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.pocket-onb__dot {
  position: relative;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  background: none;
}
.pocket-onb__dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  transition: width 160ms ease-out, background 160ms ease-out;
}
.pocket-onb__dot.is-active::after {
  width: 22px;
  background: var(--green);
}
.pocket-onb__stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-4);
  padding: var(--sp-6) 0;
}
.pocket-onb__art {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green-ink);
  background: var(--green-tint);
  border: 1px solid var(--nav-on-line);
}
.pocket-onb__art svg {
  width: 52px;
  height: 52px;
}
.pocket-onb__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.pocket-onb__text {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}
.pocket-onb__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
/* entry-side disclosure under the demo CTA (F-11) */
.pocket-onb__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--text-2);
}

/* re-view (help) entry — a stopgap until S7/ST-1 lands "Replay the tour" */
.pocket-onb-help {
  position: fixed;
  overflow: hidden;
  z-index: 40;
  left: calc(var(--safe-left) + var(--sp-3));
  bottom: calc(var(--safe-bottom) + 76px);
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-2);
  background: var(--glass);
  border: 1px solid var(--hair);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

/* Demo-mode badge — a real button since F-11: tapping it opens the
   leave-demo sheet, so the demo is never a one-way door. */
.pocket-demo-badge {
  position: fixed;
  z-index: 46;
  right: calc(var(--safe-right) + var(--sp-3));
  bottom: calc(var(--safe-bottom) + 78px);
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--amber-ink);
  background: var(--amber-tint);
  border: 1px solid var(--amber-bd);
  cursor: pointer;
}
/* invisible halo so the small pill still meets the touch-target size */
.pocket-demo-badge::after {
  content: "";
  position: absolute;
  inset: -12px;
}

/* iOS Add-to-Home teaching steps (F-2/F-3), inside the shared bottom sheet */
.pocket-install-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
}

/* post-pairing notification priming — a bottom sheet */
.pocket-priming {
  position: fixed;
  inset: 0;
  z-index: 55;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  background: var(--scrim);
  padding: var(--sp-4) calc(var(--safe-right) + var(--sp-4))
    calc(var(--safe-bottom) + var(--sp-4)) calc(var(--safe-left) + var(--sp-4));
}
.pocket-priming__card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: pocket-priming-rise 220ms ease-out;
}
.pocket-priming__glyph {
  font-size: 28px;
  line-height: 1;
}
.pocket-priming__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}
.pocket-priming__body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.pocket-priming__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-3);
}

@keyframes pocket-onb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pocket-priming-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
