/* Prototype 2 — Uber Eats–style top tabs + lean bottom nav */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=IBM+Plex+Mono:wght@400;500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --cream: #f4f4f6;
  --cream-dark: #ececef;
  --card: #ffffff;
  --ink: #111113;
  --muted: #6e6e76;
  --border: #e2e2e8;
  --accent: #111113;
  --on-accent: #fff;
  --chip-active-bg: #ececef;
  --chip-active-border: #111113;
  --chip-active-color: #111113;
  --charcoal: #111113;
  --ok: #15803d;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --success-bg: rgba(34, 197, 94, 0.1);
  --warn: #a16207;
  --warn-bg: rgba(234, 179, 8, 0.16);
  --shadow-card: 0 14px 28px rgba(17, 17, 19, 0.08);
  --font: 'Source Sans 3', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --phone-w: 390px;
  --phone-h: 844px;
  --bottom-h: 72px;
}
.mono-caps {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -10%, #e8eefc 0%, transparent 55%),
    linear-gradient(180deg, #ececef, #d8d8de);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.tiny { font-size: 10px; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.mt-md { margin-top: 18px; }
.mb-sm { margin-bottom: 8px; }

/* Page chrome */
.wf-topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 8px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
.wf-brand h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  margin: 4px 0 0;
  line-height: 1.15;
}
.wf-links { display: flex; gap: 14px; font-size: 13px; }
.wf-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.wf-links a:hover { color: var(--ink); }

.lede {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 24px 24px;
}
.lede h2 { margin: 0 0 6px; font-size: 1.05rem; }
.lede p { margin: 0; max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.stage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: var(--phone-w) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; justify-items: center; }
}

.notes {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(17,17,19,.06);
}
.notes h3 { margin: 0 0 10px; font-size: 15px; }
.notes ol { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notes li { margin-bottom: 6px; }
.notes p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notes .file code {
  font-size: 12px;
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Phone — iPhone frame (matches Prototype 1) */
.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 44px;
  box-shadow: 0 24px 48px rgba(17, 17, 19, 0.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.phone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  z-index: 100;
  color: var(--ink);
  pointer-events: none;
}
.phone[data-flow="welcome"] .phone-status {
  color: transparent;
}
.phone-status-overlay {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(17, 17, 19, 0.7);
  pointer-events: none;
}
.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  z-index: 120;
  pointer-events: none;
}

.root {
  position: absolute;
  inset: 0;
  background: var(--cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.root[hidden] { display: none !important; }

/* App header + top tabs */
.app-head {
  flex-shrink: 0;
  background: var(--card);
  border-bottom: none;
  padding: 36px 14px 8px;
  z-index: 2;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
  width: 100%;
}
.home-loc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 96px);
  color: var(--ink);
  padding: 0;
  text-align: left;
}
.home-loc-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}
.home-loc-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.home-loc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-loc-place {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-loc > svg {
  flex-shrink: 0;
  opacity: 0.85;
  margin-top: 8px;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.icon-btn:hover { background: var(--cream-dark); }

.top-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 14px;
  padding: 8px 0 12px;
  background: linear-gradient(180deg, var(--cream) 70%, transparent);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.top-tabs::-webkit-scrollbar { display: none; }
.top-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #3f3f46;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 226, 232, 0.95);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.1;
  box-shadow: 0 8px 18px rgba(17, 17, 19, 0.08);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: color 0.18s ease, background 0.18s ease, font-weight 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.top-tab:hover {
  color: #111113;
  background: rgba(255, 255, 255, 0.92);
}
.top-tab.active {
  color: #fff;
  font-weight: 800;
  background: rgba(17, 17, 19, 0.88);
  border-color: rgba(17, 17, 19, 0.9);
  box-shadow: 0 10px 22px rgba(17, 17, 19, 0.2);
}

/* Single home scroll · in-place panel swap */
.home-hub,
.home-browse {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.home-hub[hidden],
.home-browse[hidden] {
  display: none !important;
}
.home-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px calc(var(--bottom-h) + 28px);
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
}

/* Concept C · Soft Chrome browse tabs */
.chrome-bar.soft-c {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 10px 10px 0;
  background: var(--cream-dark);
  border-bottom: none;
}
.ctab {
  flex: 1;
  min-width: 0;
  height: 42px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: #6e6e76;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ctab .ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ctab .ico svg { width: 16px; height: 16px; display: block; }
.ctab .lbl { overflow: hidden; text-overflow: ellipsis; }
.ctab.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 -1px 0 var(--card);
}
.chrome-sheet {
  flex: 1;
  min-height: 0;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
.chrome-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px calc(var(--bottom-h) + 28px);
  -webkit-overflow-scrolling: touch;
  background: var(--card);
}
.stack-screen {
  height: 100%;
  overflow-y: auto;
  padding: 48px 16px calc(var(--bottom-h) + 24px);
  background: var(--cream);
}

.panels {
  position: relative;
}
.panel {
  animation: panelIn 220ms ease;
}
.panel[hidden] {
  display: none !important;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.spacer { height: 24px; }

/* Home hero + hub cards — exact P1 replica */
.home-hero {
  margin-bottom: 20px;
}
.home-hero h2 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.home-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.hub-stack {
  display: grid;
  gap: 12px;
  padding-bottom: 8px;
  min-width: 0;
  max-width: 100%;
}

.hub-card {
  --tint: #1e5bd7;
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hub-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
  padding: 14px;
  width: 100%;
  box-sizing: border-box;
}

.hub-card__head .text {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  grid-column: 1;
}

.hub-card .title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hub-card .desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.hub-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  width: fit-content;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--tint, var(--accent));
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tint, var(--accent)) 35%, transparent);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.hub-cta::after { content: " →"; }

.hub-card__body {
  padding: 0 14px 14px;
  min-width: 0;
  max-width: 100%;
}

.hub-card__body > * {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  min-width: 0;
  max-width: 100%;
}

.hub-organ-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  max-width: 100%;
}
.hub-organ-rail::-webkit-scrollbar { display: none; }

.organ-chip {
  flex: 0 0 auto;
  width: 52px;
  text-align: center;
  padding: 0;
  color: inherit;
  font: inherit;
}
.organ-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  overflow: hidden;
}
.organ-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.organ-chip > span:not(.organ-icon) {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: var(--ink);
}
.organ-chip.active .organ-icon,
.organ-chip:hover .organ-icon {
  border-color: var(--ink);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

.hub-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.hub-audience {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 8%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--tint) 14%, var(--border));
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: var(--ink);
  font-family: inherit;
}

.hub-profile-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.hub-profile-rail::-webkit-scrollbar { display: none; }

.hub-profile-mini {
  flex: 0 0 74px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cream-dark);
  text-align: center;
  padding: 0;
  font: inherit;
  color: inherit;
}
.hub-profile-mini--icon {
  flex: 0 0 64px;
  background: transparent;
  border: none;
  overflow: visible;
}
.hub-profile-mini--icon .art--icon {
  height: 54px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--ptint, #5a2d8f) 22%, #fff),
    color-mix(in srgb, var(--ptint, #5a2d8f) 8%, #fff)
  );
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}
.hub-profile-mini--icon .art--icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.hub-profile-mini--icon .label {
  min-height: 0;
  padding: 5px 0 0;
  font-size: 9px;
  font-weight: 700;
  color: var(--ink);
}

.hub-row-list {
  display: grid;
  gap: 6px;
}
.hub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  font-family: inherit;
}
.hub-row .meta {
  color: var(--muted);
  font-weight: 500;
  font-size: 9px;
  margin-top: 1px;
}
.hub-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--success-bg);
  color: #15803d;
}
.hub-toggle {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #e5e5ea;
  position: relative;
  flex-shrink: 0;
}
.hub-toggle.on { background: #34c759; }
.hub-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.hub-toggle.on::after { left: 16px; }

.hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hub-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--border));
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.metric-row-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -4px 0;
  padding: 2px 4px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.metric-row-scroll::-webkit-scrollbar { display: none; }
.metric-row {
  display: flex;
  gap: 8px;
  width: max-content;
}
.metric-row > .metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 156px;
  flex-shrink: 0;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(17, 17, 19, 0.08);
  box-sizing: border-box;
}
.metric-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.metric--good { --metric-color: #2ea44f; }
.metric--warn { --metric-color: #f2960c; }
.metric-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.metric-row .metric-value {
  color: var(--metric-color, #2ea44f);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.metric-row small {
  color: var(--metric-color, #2ea44f);
  font-size: 11px;
  font-weight: 600;
}
.metric-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--metric-color, #2ea44f) 16%, transparent);
  color: var(--metric-color, #2ea44f);
}
.metric-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Organ rail (browse / push screens) */
.organ-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.organ-rail::-webkit-scrollbar { display: none; }
.organ {
  flex: 0 0 56px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}
.organ img {
  width: 44px; height: 44px;
  object-fit: contain;
  margin: 0 auto 4px;
  padding: 8px;
  background: var(--cream-dark);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.row-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--cream-dark);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.row-pill em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 3px 7px;
  border-radius: 999px;
}

/* All tab */
.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.seg {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.seg button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
}
.seg button.on { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.chip-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  color: var(--muted);
}
.chip.on { border-color: var(--ink); color: var(--ink); background: var(--card); }

.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 14px; }

/* KYB · Prototype 1 Body page */
.kyb-head { margin-bottom: 12px; }
.page-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.page-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.organ-rail-wrap {
  position: relative;
  margin: 0 -4px 4px;
  padding: 0 4px;
  min-width: 0;
}
.organ-rail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 19px;
}
.organ-rail-meta .page-sub {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.organ-rail-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.organ-rail-hint__arrows {
  display: inline-block;
  animation: organHintNudge 1.4s ease-in-out infinite;
}
@keyframes organHintNudge {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(3px); opacity: 1; }
}
.organ-rail-wrap::after {
  content: "";
  position: absolute;
  top: 28px;
  right: 0;
  bottom: 12px;
  width: 36px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--card));
  z-index: 2;
}
[data-panel="kyb"] .organ-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
[data-panel="kyb"] .organ-rail::-webkit-scrollbar { display: none; }
[data-panel="kyb"] .organ-chip {
  flex: 0 0 auto;
  width: 76px;
  text-align: center;
  padding: 0;
  color: inherit;
  font: inherit;
}
[data-panel="kyb"] .organ-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  overflow: hidden;
}
[data-panel="kyb"] .organ-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
[data-panel="kyb"] .organ-chip > span:not(.organ-icon) {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
[data-panel="kyb"] .organ-chip.active .organ-icon,
[data-panel="kyb"] .organ-chip:hover .organ-icon {
  border-color: var(--ink);
  background: var(--card);
}

.test-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.test-card .body { padding: 14px; }
.test-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--ink);
}
.test-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.price-row .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.price-row .old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.price-row .off {
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.home-hero--tests { margin-bottom: 8px; }
.home-hero--tests h2 {
  font-size: 1.35rem;
  margin: 4px 0 10px;
}

.tests-toolbar-mini { margin-bottom: 12px; }

.audience-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin: 0 0 12px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.audience-tabs::-webkit-scrollbar { display: none; }
.audience-tab {
  flex: 0 0 auto;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.audience-tab.active {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-border);
  color: var(--chip-active-color);
}

.health-chip-row,
.audience-quick-links {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
  margin: 0 -4px 4px;
  scrollbar-width: none;
}
.health-chip-row::-webkit-scrollbar,
.audience-quick-links::-webkit-scrollbar { display: none; }
.health-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.health-chip.active {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-border);
  color: var(--chip-active-color);
}
.audience-quick-row.is-collapsed,
.health-chip-row.is-collapsed { display: none; }

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 24px;
}
.catalog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.catalog-card:hover,
.catalog-card:focus-within {
  border-color: color-mix(in srgb, var(--ink) 35%, var(--border));
  box-shadow: 0 8px 18px rgba(17, 17, 19, 0.08);
}
.catalog-card[hidden] { display: none !important; }
.catalog-card__media {
  position: relative;
  height: 78px;
  background: var(--cream-dark);
  overflow: hidden;
  flex-shrink: 0;
}
.catalog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.catalog-card__media.tone-blood { background: #e8e8ea; }
.catalog-card__media.tone-heart { background: #e4e4e6; }
.catalog-card__media.tone-thyroid { background: #ececef; }
.catalog-card__media.tone-vitamin { background: #f0f0f2; }
.catalog-card__media.tone-body { background: #e6e6ea; }
.catalog-card__media.tone-women { background: #ebebed; }
.catalog-card__media.tone-urine { background: #e9e9eb; }
.catalog-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-card h4 {
  margin: 8px 8px 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.catalog-card > p {
  margin: 0 8px 8px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.catalog-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 0 8px 8px;
  margin-top: auto;
}
.catalog-card__price .price {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.catalog-card__price .old {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-decoration: line-through;
  margin-top: 1px;
}
.catalog-select {
  flex-shrink: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
}
.home-empty { margin: 0 0 12px; }

.test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.test {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.test .thumb {
  height: 72px;
  background: var(--cream-dark) center/cover no-repeat;
}
.test h4 { margin: 8px 8px 2px; font-size: 12px; line-height: 1.25; }
.test p { margin: 0 8px; font-size: 10px; color: var(--muted); flex: 1; }
.test strong { margin: 6px 8px; font-size: 13px; }
.test button {
  margin: 0 8px 8px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Profiles list */
.section-kicker {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title {
  font-family: var(--display);
  font-size: 1.5rem;
  margin: 2px 0 14px;
}
.pkg {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.pkg img {
  width: 72px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
}
.pkg h4 { margin: 0; font-size: 13px; }
.pkg p { margin: 2px 0; font-size: 11px; color: var(--muted); }
.pkg strong { font-size: 13px; }
.pkg button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Insights */
.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.insight-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.insight-top em {
  font-style: normal;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
}
.insight-top em.ok { background: var(--ok-bg); color: var(--ok); }
.insight-top em.warn { background: var(--warn-bg); color: var(--warn); }
.big { font-size: 1.6rem; display: block; margin: 6px 0 10px; }
.big small { font-size: .55em; color: var(--muted); font-weight: 600; }
.spark {
  height: 36px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 40%, rgba(37,99,235,.08)),
    repeating-linear-gradient(90deg, #2563eb 0 2px, transparent 2px 14px);
  opacity: .7;
}
.spark.amber {
  background:
    linear-gradient(180deg, transparent 40%, rgba(234,179,8,.1)),
    repeating-linear-gradient(90deg, #ca8a04 0 2px, transparent 2px 14px);
}
.spark.warn {
  background:
    linear-gradient(180deg, transparent 40%, rgba(220,38,38,.08)),
    repeating-linear-gradient(90deg, #dc2626 0 2px, transparent 2px 14px);
}

/* Search / Account / Cart roots */
.search-screen, .account-screen, .cart-screen {
  padding: 48px 16px calc(var(--bottom-h) + 24px);
  height: 100%;
  overflow-y: auto;
}
.search-bar.live {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-btn.search-filter {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.filter-btn.search-filter:hover {
  border-color: var(--ink);
}
.search-bar.live input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
}
.search-bar .clear {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.suggest {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.avatar-lg {
  width: 64px; height: 64px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}
.account-screen h2 { margin: 0; font-size: 1.35rem; }

.cart-screen h2 { margin: 0 0 4px; font-size: 1.35rem; }
.cart-list { margin: 18px 0 12px; }
.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row strong { display: block; font-size: 14px; }
.cart-row .tiny { display: block; margin-top: 2px; font-size: 12px; }
.cart-row .price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 18px;
  font-size: 15px;
}
.cart-screen .btn-primary {
  width: 100%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
}
.acct-list { margin-top: 20px; }
.acct-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

/* Bottom nav — Concept G: fade scroll rail + labeled Search */
.bottom-nav {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.bottom-nav > * {
  pointer-events: auto;
}
.rail-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 226, 232, 0.95);
  box-shadow: 0 10px 24px rgba(17, 17, 19, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
  border-radius: 0 999px 999px 0;
}
.nav-rail {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 6px 18px 6px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-rail::-webkit-scrollbar { display: none; }
.nav-mode {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #6e6e76;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 11px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease, font-weight 0.18s ease;
}
.nav-mode:hover { color: #111113; }
.nav-mode.active {
  font-weight: 800;
  color: #fff;
  background: rgba(17, 17, 19, 0.88);
}
.bnav-search {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: #111113;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(17, 17, 19, 0.22);
  transition: background 0.18s ease, transform 0.18s ease;
}
.bnav-search svg {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.bnav-search:hover { background: #2a2a30; }
.bnav-search.active {
  background: #d61f26;
  box-shadow: 0 12px 28px rgba(214, 31, 38, 0.28);
}

/* ═══════════════════════════════════════════
   Complete UI — flows, push stack, sheets
   ═══════════════════════════════════════════ */

.center { text-align: center; }
.center-pad { text-align: center; }
.mb { margin-bottom: 16px; }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; text-align: left; }
.grow strong, .grow span { display: block; }
.ghost { color: var(--muted); padding: 6px; }
.link { color: var(--accent); font-weight: 700; font-size: 13px; }
.save { color: var(--ok) !important; }
.danger { color: #b91c1c !important; }

.btn-primary, .btn-secondary, .btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
  padding: 12px 16px;
}
.btn-primary {
  background: var(--ink);
  color: var(--on-accent);
}
.btn-secondary {
  background: var(--cream-dark);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-block { width: 100%; }
.btn-primary.sm, .btn-secondary.sm { padding: 8px 12px; font-size: 12px; border-radius: 999px; }
.btn-social {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  margin-bottom: 8px;
}
.btn-social.apple { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }

.phone[data-flow="welcome"] .bottom-nav,
.phone[data-flow="auth"] .bottom-nav,
.phone[data-push] .bottom-nav { display: none; }

/* Keep dock visible on primary tab pushes */
.phone[data-push="alerts"] .bottom-nav,
.phone[data-push="deals"] .bottom-nav,
.phone[data-push="notifications"] .bottom-nav {
  display: flex;
  z-index: 25;
}
.phone[data-push="alerts"] .push-pad,
.phone[data-push="deals"] .push-pad,
.phone[data-push="notifications"] .push-pad {
  padding-bottom: calc(var(--bottom-h) + 28px);
}

.flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  z-index: 2;
}
.flow[hidden] { display: none !important; }

.welcome-flow {
  background:
    radial-gradient(600px 400px at 50% 20%, #ffe8d6 0%, transparent 60%),
    linear-gradient(180deg, #fff, var(--cream));
  justify-content: space-between;
  padding: 56px 24px 36px;
}
.welcome-center { text-align: center; }
.welcome-center h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 14px 0 6px;
}
.brand-logo { margin: 0 auto; }
.brand-logo.sm { margin-bottom: 8px; }
.welcome-footer { padding-bottom: 8px; }

.auth-flow { background: var(--card); overflow-y: auto; color: var(--ink); }
.auth-title {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 8px 0 0;
}
.auth-seg { margin: 18px 0; }
.or-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0;
}
.or-line::before, .or-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-line span { flex-shrink: 0; }

.app-flow {
  background: var(--cream);
  z-index: 1;
}
.app-flow > .root {
  inset: 0;
  top: 0;
}

.push-pad {
  padding: 12px 16px 28px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  color: var(--ink);
}
.push-pad.has-sticky { padding-bottom: 96px; }

.back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 36px;
}
.back-row.static { justify-content: space-between; }
.back-row.left { text-align: left; width: 100%; }
.back-row button[aria-label="Back"] {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--cream-dark);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.back-row .mono { flex: 1; }
.back-row .link { margin-left: auto; }

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  text-align: left;
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--ink); }
.phone-prefix {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 4px 4px 12px;
  background: var(--card);
}
.phone-prefix input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 8px;
  background: transparent;
  min-width: 0;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel.soft {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.panel + .panel { margin-top: 12px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.menu-row:last-child { border-bottom: none; }
.menu-row .label {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}
.menu-row .chev { color: var(--muted); }
.menu-row .badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 0;
}
.btn-ghost.danger { color: #b91c1c; }
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 700;
  font-size: 13px;
}
.btn-social.apple { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.mb-md { margin-bottom: 14px; }
.mb-sm { margin-bottom: 8px; }
#browse-scroll > .panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total { font-weight: 800; padding-top: 10px; }

.sticky-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(17,17,19,.08);
}
.sticky-bar.overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 5;
  margin: 0;
}
.sticky-bar > div { display: grid; gap: 2px; }
.sticky-bar strong { font-size: 16px; }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.cart-dot,
.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #d61f26;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.notif-dot {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  top: 6px;
  right: 6px;
  border: 1.5px solid #fff;
}
.icon-btn { position: relative; }

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}
.search-fake {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.filter-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
}

button.row-pill {
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line .thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ececef center/cover no-repeat;
  flex-shrink: 0;
}
.cart-line .price { font-weight: 800; margin-top: 4px; }

/* Push stack */
.push-stack {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--cream);
}
.push-stack[hidden] { display: none !important; }
.push-screen {
  position: absolute;
  inset: 0;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}
.push-screen[hidden] { display: none !important; }

.organ-rail.compact { margin: 8px 0 16px; }
.test-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.test-row .thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #ececef center/cover no-repeat;
  flex-shrink: 0;
}
.test-row h4 { margin: 0; font-size: 14px; }
.test-row p { margin: 2px 0; font-size: 12px; color: var(--muted); }
.test-row strong { font-size: 13px; }

.pkg-hero {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.price-lg { font-size: 1.35rem; display: block; margin-top: 8px; }
.price-lg .old {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 600;
}
.bullet-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.report-card, .alert-card, .deal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
}
.report-card strong, .alert-card strong, .deal-card h3 {
  display: block;
  margin: 0 0 4px;
  font-size: 15px;
}

.alerts-hero.app-header,
.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.alerts-hero .page-title { margin: 2px 0 0; }
.alerts-hero .page-sub { margin-top: 4px; }
.alerts-hero .header-actions {
  margin-left: 0;
  flex-shrink: 0;
}
.alerts-hero .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.notif-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  box-sizing: border-box;
  width: 100%;
}
.notif-card .meta { min-width: 0; }
.notif-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.notif-card .meta span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-card .meta .notif-source {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: normal;
}
.toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e5e5ea;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle.on { background: #34c759; }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.toggle.on::after { transform: translateX(18px); }
.account-theme-row {
  margin-bottom: 0;
  background: transparent;
  border: none;
  padding: 0;
}
.back-row .header-actions {
  margin-left: auto;
  flex-shrink: 0;
}
.deal-card h3 { font-size: 16px; }
.deal-card.flat {
  width: 100%;
  cursor: pointer;
}
.row-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.report-card.upcoming { opacity: .85; }
.report-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
}
.report-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.report-line:last-child { border-bottom: none; }
.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  text-align: left;
}
.notif-item.unread {
  border-color: rgba(30, 91, 215, 0.28);
  background: rgba(30, 91, 215, 0.04);
}
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  background: #f4f4f6;
}
.notif-icon.order { background: rgba(214, 31, 38, 0.1); }
.notif-icon.report { background: rgba(15, 118, 110, 0.12); }
.notif-icon.pay { background: rgba(21, 128, 61, 0.12); color: #15803d; }
.notif-icon.app { background: rgba(30, 91, 215, 0.12); color: #1e5bd7; }
.notif-icon.deal { background: rgba(180, 83, 9, 0.12); color: #b45309; }
.phone[data-theme="dark"] .notif-item {
  background: #222228;
  border-color: #2e2e36;
}
.pill-on {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 4px 8px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.stepper .step {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 8px 4px;
  border-radius: 999px;
  background: #ececef;
  color: var(--muted);
}
.stepper .step.active { background: var(--ink); color: #fff; }
.stepper .step.done { background: rgba(17,17,19,.12); color: var(--ink); }

.date-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.date-rail::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  gap: 2px;
}
.date-chip b { font-size: 12px; }
.date-chip span { font-size: 11px; color: var(--muted); }
.date-chip.selected, .date-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.date-chip.selected span, .date-chip.active span { color: rgba(255,255,255,.7); }

.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.slot {
  text-align: left;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 4px;
}
.slot strong { font-size: 13px; }
.slot span { font-size: 11px; font-weight: 700; }
.slot.open span { color: var(--ok); }
.slot.closing {
  background: var(--warn-bg);
  border-color: rgba(161,98,7,.25);
}
.slot.closing span { color: var(--warn); }
.slot.unavailable { opacity: .45; }
.slot.selected, .slot.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.slot-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 4px;
}
.slot-legend .dot.open { background: var(--ok); }
.slot-legend .dot.closing { background: #ca8a04; }
.slot-legend .dot.unavailable { background: #a1a1aa; }

.member-card, .address-card, .pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.member-card.selected, .address-card.selected, .pay-method.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.pay-method.static { cursor: default; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.check-box, .radio {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #cfcfd6;
  flex-shrink: 0;
}
.check-box.on, .radio.on {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px #fff;
}
.address-card { display: block; }
.address-card p { margin: 4px 0 0; }
.wallet-use {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}
.success-ring {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  margin: 40px auto 16px;
}
.wallet-hero {
  background: #111;
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
}
.wallet-hero strong { font-size: 2rem; display: block; margin: 6px 0; }
.invite-code {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .12em;
  background: #fff;
  border: 1.5px dashed var(--ink);
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0 0;
}
.avatar-lg.edit { margin: 8px auto 16px; }
.theme-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  font-weight: 700;
}
.theme-row .switch {
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: #d4d4d8;
  position: relative;
  transition: background .18s ease;
}
.theme-row .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform .18s ease;
}
.theme-row.on .switch { background: var(--ink); }
.theme-row.on .switch::after { transform: translateX(16px); }

/* Sheets */
.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-layer[hidden] { display: none !important; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,17,19,.45);
}
.sheet {
  position: relative;
  z-index: 1;
  background: var(--card);
  color: var(--ink);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px 24px;
  max-height: 78%;
  overflow-y: auto;
  box-shadow: 0 -16px 40px rgba(17,17,19,.18);
}
.sheet[hidden] { display: none !important; }
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #d4d4d8;
  margin: 4px auto 12px;
}
.sheet h3 { margin: 0 0 4px; font-size: 1.15rem; }
.sheet-sticky { margin-top: 16px; }
.rec-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}
.rec-rail::-webkit-scrollbar { display: none; }
.rec {
  flex: 0 0 auto;
  background: #f4f4f6;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.share-grid button {
  background: #f4f4f6;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
}

.notes .small { font-size: 12px; line-height: 1.5; }

/* Dark mode — Prototype 1 token model */
.phone[data-theme="dark"] {
  --cream: #0a0a0b;
  --cream-dark: #141416;
  --card: #161618;
  --ink: #f4f4f5;
  --charcoal: #f4f4f5;
  --muted: #a1a1aa;
  --border: #2a2a2e;
  --accent: #f4f4f5;
  --on-accent: #0a0a0b;
  --chip-active-bg: #222226;
  --chip-active-border: #f4f4f5;
  --chip-active-color: #f4f4f5;
  --shadow-card: 0 14px 28px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  border-color: #2a2a2e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}
.phone[data-theme="dark"] .phone-status { color: var(--ink); }
.phone[data-theme="dark"] .hub-cta {
  color: #0a0a0b !important;
  background: #f4f4f5;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.phone[data-theme="dark"] .toggle { background: #39393d; }
.phone[data-theme="dark"] .toggle.on { background: #30d158; }
.phone[data-theme="dark"] .hub-toggle { background: #39393d; }
.phone[data-theme="dark"] .hub-toggle.on { background: #30d158; }
.phone[data-theme="dark"] .hub-badge { color: #86efac; }
.phone[data-theme="dark"] .btn-ghost.danger { color: #f87171; }
.phone[data-theme="dark"] .catalog-card__media.tone-blood,
.phone[data-theme="dark"] .catalog-card__media.tone-heart,
.phone[data-theme="dark"] .catalog-card__media.tone-thyroid,
.phone[data-theme="dark"] .catalog-card__media.tone-vitamin,
.phone[data-theme="dark"] .catalog-card__media.tone-body,
.phone[data-theme="dark"] .catalog-card__media.tone-women,
.phone[data-theme="dark"] .catalog-card__media.tone-urine {
  background: #1c1c1f;
}
.phone[data-theme="dark"] .rail-wrap {
  background: rgba(40, 40, 48, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}
.phone[data-theme="dark"] .rail-wrap::after {
  background: linear-gradient(90deg, transparent, rgba(40, 40, 48, 0.98));
}
.phone[data-theme="dark"] .nav-mode { color: rgba(255, 255, 255, 0.65); }
.phone[data-theme="dark"] .nav-mode:hover { color: #fff; }
.phone[data-theme="dark"] .nav-mode.active {
  background: rgba(255, 255, 255, 0.92);
  color: #111113;
}
.phone[data-theme="dark"] .bnav-search {
  background: #fff;
  color: #111113;
}
.phone[data-theme="dark"] .bnav-search.active {
  background: #d61f26;
  color: #fff;
}
.phone[data-theme="dark"] .organ-rail-wrap::after {
  background: linear-gradient(90deg, transparent, var(--card));
}
.phone[data-theme="dark"] .ctab { color: var(--muted); }
.phone[data-theme="dark"] .ctab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 -1px 0 var(--card);
}

.organ.on {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
