/* ──────────────────────────────────────────────────────────────────────────
   SCREENS — per-screen layouts
   ────────────────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   AWAKENING — character creation
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-awaken .page { padding-top: 32px; }
.avatar-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.avatar-pick {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-size: 22px;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
.avatar-pick:hover { background: var(--surface-2); border-color: var(--accent); }
.avatar-pick.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(77, 204, 255, 0.30);
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS — the showcase home screen
   ═══════════════════════════════════════════════════════════════════════════ */
.status-head {
  margin-bottom: 18px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.status-log-btn {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 14px;
  background: var(--bg-2); color: var(--accent);
  border: 1.5px solid var(--accent); font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 0 18px rgba(77,204,255,0.28), inset 0 0 10px rgba(77,204,255,0.16);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  margin-top: 2px;
}
.status-log-btn:hover { transform: scale(1.06); box-shadow: 0 0 26px rgba(77,204,255,0.45), inset 0 0 10px rgba(77,204,255,0.24); }
.status-log-btn:active { transform: scale(0.95); }
.status-eyebrow { display: inline-block; }
.status-greeting {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.hunter-card { padding: 22px 20px 18px; }
.hunter-card-row {
  display: flex; align-items: center; gap: 16px;
}
.hunter-avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  box-shadow: inset 0 0 12px rgba(77, 204, 255, 0.15);
}
.hunter-id { flex: 1; min-width: 0; }
.hunter-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  letter-spacing: 0.02em;
}
.hunter-title {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 4px 0;
}
.hunter-class {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-dim);
}

.hunter-streak {
  text-align: center;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}
.streak-flame { font-size: 22px; line-height: 1; }
.streak-num {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--warn);
  text-shadow: 0 0 8px rgba(255, 170, 60, 0.45);
  line-height: 1;
  margin-top: 2px;
}
.streak-label {
  font-size: 9px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-top: 4px;
}

.pstat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 480px) {
  .pstat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Gain feed rows */
.gain-list {
  display: flex; flex-direction: column; gap: 6px;
}
.gain-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.gain-pillar {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em;
  width: 60px;
}
.gain-label { flex: 1; min-width: 0; color: var(--text); }
.gain-amt {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255, 206, 0, 0.35);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PILLARS HUB
   ═══════════════════════════════════════════════════════════════════════════ */
.pillar-hub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pillar-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  overflow: hidden;
}
.pillar-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--pcolor) 0%, transparent 50%);
  opacity: 0.08;
  pointer-events: none;
}
.pillar-card:hover {
  transform: translateY(-2px);
  border-color: var(--pcolor);
  box-shadow: 0 0 24px var(--pcolor);
}
.pillar-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.pillar-emoji {
  font-size: 32px;
  filter: drop-shadow(0 0 8px var(--pcolor));
}
.pillar-key {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  color: var(--pcolor);
  letter-spacing: 0.20em;
}
.pillar-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-dim);
}
.pillar-lvl {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  margin-top: 4px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEVEL UP modal
   ═══════════════════════════════════════════════════════════════════════════ */
.levelup-stage {
  position: relative;
  text-align: center;
  padding: 48px 32px;
  max-width: 420px;
}
.levelup-glow {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  animation: pulse 1.6s ease-in-out infinite;
}
.levelup-banner {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  margin: 20px 0;
}
.levelup-brackets {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent), 0 0 48px var(--accent);
  animation: brackets 1.2s ease-in-out infinite alternate;
}
@keyframes brackets {
  from { transform: translateX(0); }
  to   { transform: translateX(-6px); }
}
.levelup-brackets:last-child { animation-name: brackets-right; }
@keyframes brackets-right {
  from { transform: translateX(0); }
  to   { transform: translateX(6px); }
}
.levelup-text {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 800;
  letter-spacing: 0.20em;
  background: var(--grad-system);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(77, 204, 255, 0.6));
}
.levelup-sub {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-dim);
  margin: 12px 0 24px;
}
.levelup-numbers {
  display: flex; align-items: baseline; justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}
.lu-old {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 700;
  color: var(--text-mute);
}
.lu-arrow {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}
.lu-new {
  font-family: var(--font-display);
  font-size: 80px; font-weight: 800;
  letter-spacing: 0.02em;
  animation: pop 600ms var(--ease-spring) 200ms both;
}


/* ═══════════════════════════════════════════════════════════════════════════
   WELCOME — full-bleed hero with floating produce, headline, dual CTAs
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-welcome { padding-bottom: var(--safe-bot); }

#screen-welcome .hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: max(40px, var(--safe-top)) 24px 32px;
  max-width: 480px; margin: 0 auto;
  position: relative;
}

.hero-art {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  margin: 12px 0 8px;
}
.hero-art .ring {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 165, 90, 0.20) 0%, transparent 70%);
}
.hero-art .ring-2 {
  position: absolute;
  width: 220px; height: 220px;
  border: 1.5px dashed var(--border-accent);
  border-radius: 50%;
  animation: spin 32s linear infinite;
  opacity: 0.5;
}
.hero-art .jar {
  position: relative; z-index: 2;
  width: 140px; height: 140px;
  border-radius: 28px;
  background: var(--grad-fresh);
  display: flex; align-items: center; justify-content: center;
  font-size: 76px;
  box-shadow: var(--shadow-glow), inset 0 -8px 24px rgba(0,0,0,0.20);
  animation: float 4s ease-in-out infinite;
}
.hero-art .floater {
  position: absolute;
  font-size: 36px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
  animation: float 5s ease-in-out infinite;
}
.hero-art .floater.f1 { top:  10%; left: 12%; animation-delay: -0.5s; }
.hero-art .floater.f2 { top:  20%; right: 8%; animation-delay: -1.6s; }
.hero-art .floater.f3 { bottom: 18%; left: 6%; animation-delay: -2.4s; }
.hero-art .floater.f4 { bottom: 12%; right: 12%; animation-delay: -3.2s; }
.hero-art .floater.f5 { top: 45%; right: 0%; animation-delay: -1.0s; font-size: 28px; }

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
}
.hero h1 em { font-style: italic; color: var(--accent-2); }
.hero .lede {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 26px;
}

.hero-ctas { display: flex; flex-direction: column; gap: 10px; }
.hero-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
}
.hero-foot a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAYWALL — pricing card, benefits, CTA
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-paywall { padding-bottom: var(--safe-bot); }

#screen-paywall .page { padding-top: 24px; }
#screen-paywall .close-x {
  position: absolute; top: calc(20px + var(--safe-top)); right: 20px;
  z-index: 5;
}

#screen-paywall h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 28px 0 8px;
  text-align: center;
}
#screen-paywall h1 em { font-style: italic; color: var(--accent-2); }
#screen-paywall .lede {
  color: var(--text-dim); text-align: center; margin: 0 0 28px;
  font-size: 15px;
}

.price-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-2) 100%);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.price-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-premium);
}
.price-tag-row {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  margin-bottom: 4px;
}
.price-cur { font-size: 22px; color: var(--text-dim); font-weight: 600; }
.price-num {
  font-size: 64px; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad-premium);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.price-per { color: var(--text-mute); font-size: 14px; margin-top: 4px; }
.price-plan { font-size: 12px; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 16px; }

.bullets { margin: 24px 0 4px; padding: 0; list-style: none; text-align: left; }
.bullets li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
}
.bullets li + li { border-top: 1px solid var(--border); }
.bullets .check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  font-weight: 800; font-size: 12px;
}

.paywall-foot {
  text-align: center; color: var(--text-mute);
  font-size: 12px; margin-top: 22px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVATE — license key entry
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-activate { padding-bottom: var(--safe-bot); }
#screen-activate .page { padding-top: 64px; }
#screen-activate .key-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--grad-fresh);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOME
   ═══════════════════════════════════════════════════════════════════════════ */
.home-greet { font-size: 13px; color: var(--text-mute); font-weight: 500; }
.home-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
  line-height: 1.05;
}
.home-title em { font-style: italic; color: var(--accent-2); }

.home-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
}
.home-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}

.quick-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 20px;
}
.quick-row .btn { padding: 16px 12px; font-size: 14px; border-radius: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PANTRY
   ═══════════════════════════════════════════════════════════════════════════ */
.pantry-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.pantry-count { font-size: 13px; color: var(--text-mute); }
.pantry-count strong { color: var(--text); font-weight: 700; }

.pantry-group { margin-bottom: 18px; }
.pantry-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.10em;
  margin: 0 0 10px;
}
.pantry-group-title .count {
  background: var(--surface-2); color: var(--text-mute);
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700;
}

.pi-name { font-size: 15px; font-weight: 600; }
.pi-meta { color: var(--text-mute); font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.pi-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }

.pi-trailing {
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end; flex-shrink: 0;
}
.pi-actions { display: flex; gap: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   SCAN
   ═══════════════════════════════════════════════════════════════════════════ */
.scan-zone {
  position: relative;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(63, 165, 90, 0.12), transparent 70%),
    var(--surface-2);
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 40px 24px 32px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.scan-zone:hover {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(63, 165, 90, 0.20), transparent 70%),
    var(--surface-3);
  border-color: var(--accent);
}
.scan-zone.dragover {
  background: rgba(63, 165, 90, 0.10);
  border-color: var(--accent-2);
  transform: scale(1.01);
}
.scan-zone .ic {
  width: 72px; height: 72px;
  border-radius: 24px;
  background: var(--grad-fresh);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-glow);
  animation: float 4s ease-in-out infinite;
}
.scan-zone h3 {
  margin: 0 0 6px;
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
}
.scan-zone p {
  margin: 0 0 18px;
  color: var(--text-dim); font-size: 14px;
}

/* Source picker row (Camera / Library buttons under the scan zone) */
.source-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.source-card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px;
  padding: 16px 16px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.source-card:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.source-card:active { transform: scale(0.99); }
.source-ic {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 4px;
}
.source-label {
  font-size: 14px; font-weight: 700;
  color: var(--text);
}
.source-sub {
  font-size: 12px; color: var(--text-mute);
}

.tips-card ul {
  margin: 0; padding: 0; list-style: none;
}
.tips-card li {
  padding: 8px 0;
  font-size: 13px; color: var(--text-dim);
  display: flex; align-items: center; gap: 10px;
}
.tips-card li + li { border-top: 1px solid var(--border); }
.tips-card li::before {
  content: "✓"; color: var(--gold); font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REVIEW
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-review .receipt-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 18px;
}
#screen-review .receipt-card-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
}
.receipt-store { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.receipt-meta {
  color: var(--text-mute); font-size: 12px;
  margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.receipt-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }

.receipt-total-label { color: var(--text-mute); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.receipt-total {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  background: var(--grad-fresh);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.receipt-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 14px;
}

#screen-review .item-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 6px;
  transition: background var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
}
#screen-review .item-row:hover { background: var(--surface-3); }
#screen-review .item-row.removing {
  opacity: 0; transform: translateX(-20px); pointer-events: none;
}
#screen-review .item-row .badge {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--surface-3);
  flex-shrink: 0;
}
#screen-review .item-row .name-input {
  background: transparent; border: none; padding: 0;
  font-size: 14px; font-weight: 600; color: var(--text);
  width: 100%; outline: none;
}
#screen-review .item-row .name-input:focus {
  border-bottom: 1px solid var(--accent);
}
#screen-review .item-row .name { flex: 1; min-width: 0; }
#screen-review .item-row .cat-meta {
  color: var(--text-mute); font-size: 11px; margin-top: 2px;
}
#screen-review .item-row .price-input { width: 78px; }
#screen-review .item-row .x {
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--bad); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bad-soft);
}
#screen-review .item-row .x:hover { background: var(--bad); color: white; }

#screen-review .save-bar {
  position: fixed; left: 0; right: 0;
  bottom: 0;
  padding: 14px 16px calc(14px + var(--safe-bot));
  background: linear-gradient(180deg, transparent, rgba(10, 26, 16, 0.96) 35%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}
#screen-review .save-bar-inner {
  max-width: 580px; margin: 0 auto;
}

/* Loading state */
.scan-loading { padding: 40px 20px; text-align: center; }
.scan-loading-art {
  width: 200px; height: 240px;
  margin: 0 auto 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.scan-loading-art::before {
  content: "🧾"; font-size: 80px;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.4;
}
.scan-loading-art::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(93, 199, 122, 0.5), transparent);
  filter: blur(6px);
  animation: scanLine 2s ease-in-out infinite;
}
.scan-loading h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.scan-loading p { color: var(--text-dim); font-size: 13px; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPENDING
   ═══════════════════════════════════════════════════════════════════════════ */
.spend-hero {
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(63, 165, 90, 0.15), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  margin-bottom: 18px;
}
.spend-hero-label { color: var(--text-dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.10em; }
.spend-hero-amt {
  font-size: 48px; font-weight: 800; letter-spacing: -0.03em;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  background: var(--grad-fresh);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.spend-trend { color: var(--text-mute); font-size: 13px; }
.spend-trend.up { color: var(--bad); }
.spend-trend.down { color: var(--good); }

/* Daily bar chart */
.chart-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}
.chart-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 12px;
}
.bar-chart {
  display: flex; align-items: flex-end; gap: 4px;
  height: 120px;
  padding-bottom: 18px;
  position: relative;
}
.bar-chart .col {
  flex: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center;
  position: relative;
}
.bar-chart .bar {
  width: 100%;
  background: var(--grad-fresh);
  border-radius: 4px 4px 0 0;
  transition: opacity var(--t-fast);
  min-height: 2px;
}
.bar-chart .col:hover .bar { opacity: 0.8; }
.bar-chart .col-label {
  position: absolute; bottom: -16px;
  font-size: 9px; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Category breakdown */
.cat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
}
.cat-row + .cat-row { border-top: 1px solid var(--border); }
.cat-row .cat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cat-row .cat-name { flex: 1; font-size: 14px; font-weight: 600; }
.cat-row .cat-amt {
  font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cat-bar-track {
  height: 5px; background: rgba(255,255,255,0.05);
  border-radius: 3px; margin-top: 6px; overflow: hidden;
}
.cat-bar-track > div {
  height: 100%; border-radius: 3px;
  transition: width 600ms var(--ease);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECIPES
   ═══════════════════════════════════════════════════════════════════════════ */
/* Recipe preferences card */
.prefs-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 16px 14px;
  margin-bottom: 14px;
}
.prefs-title {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; font-weight: 700;
  color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.prefs-row { margin-top: 12px; }
.prefs-row .label { margin-bottom: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.10em; color: var(--text-mute); }

/* Slider component */
.slider-block { margin-bottom: 18px; }
.slider-block:last-of-type { margin-bottom: 0; }
.slider-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.slider-label {
  font-size: 13px; font-weight: 600; color: var(--text);
}
.slider-value {
  font-size: 13px; font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 0;
}
/* Fluid slider — colored fill follows the thumb (via inline --fill %). */
.slider.slider-fluid {
  height: 6px;
  background: linear-gradient(to right,
    var(--accent) 0%, var(--accent) var(--fill, 0%),
    rgba(255,255,255,0.10) var(--fill, 0%), rgba(255,255,255,0.10) 100%);
}
.slider-ends {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-dim); margin-top: 6px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 0 4px rgba(245, 245, 240, 0.10);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 6px rgba(245, 245, 240, 0.16);
}
.slider::-webkit-slider-thumb:active { transform: scale(1.15); }
.slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--accent);
  border: none; border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Dual-thumb range (two overlapping sliders) */
.slider-block.dual .slider-track-wrap {
  position: relative;
  height: 22px;
}
.slider-block.dual .slider {
  position: absolute;
  left: 0; right: 0;
  width: 100%;
  pointer-events: none;
  background: transparent;
}
.slider-block.dual .slider::-webkit-slider-thumb { pointer-events: auto; }
.slider-block.dual .slider::-moz-range-thumb { pointer-events: auto; }
.slider-block.dual .slider-track-wrap::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; margin-top: -2px;
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
}

.recipe-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 12px;
  transition: transform var(--t-fast), background var(--t-fast);
}
.recipe-card:hover { background: var(--surface-3); transform: translateY(-1px); }

.recipe-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 12px;
}
.recipe-emoji {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--grad-fresh);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(63, 165, 90, 0.25);
}
.recipe-info { flex: 1; min-width: 0; }
.recipe-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.2;
}
.recipe-meta {
  margin-top: 4px;
  color: var(--text-mute); font-size: 12px;
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  align-items: center;
}
.recipe-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }

.recipe-ings {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
}
.recipe-ings strong { color: var(--text); font-weight: 600; }

.recipe-missing {
  color: var(--warn); font-size: 12px; margin-top: 6px;
}

.recipe-toggle {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--accent-2);
  cursor: pointer;
}
.recipe-steps {
  display: none;
  margin: 12px 0 0; padding-left: 22px;
  font-size: 13px; line-height: 1.6;
  color: var(--text-dim);
}
.recipe-steps li { margin: 4px 0; }
.recipe-card.open .recipe-steps { display: block; }
.recipe-card.open .recipe-toggle .arrow { transform: rotate(180deg); }
.recipe-toggle .arrow { transition: transform var(--t-fast); display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════════════
   SHOPPING — profile form + result
   ═══════════════════════════════════════════════════════════════════════════ */
.profile-form { display: block; }
.form-row { margin-bottom: 14px; }
.form-row.two {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.input-with-suffix {
  position: relative;
}
.input-with-suffix .input { padding-right: 56px; }
.suffix-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--surface-3);
  color: var(--text);
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border);
}
.suffix-toggle:hover { border-color: var(--gold); color: var(--gold); }

select.input {
  background: rgba(0,0,0,0.30) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23a8a8a0' d='M6 8L0 0h12z'/></svg>") no-repeat right 14px center;
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
}

.macro-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.macro {
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: center;
}
.macro-label { font-size: 10px; color: var(--text-mute); font-weight: 700; text-transform: uppercase; letter-spacing: 0.10em; }
.macro-value { font-size: 18px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }

.shop-group {
  margin-bottom: 14px;
}
.shop-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.10em;
}
.shop-group-head .cat-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.shop-group-name { flex: 1; }
.shop-group-total {
  font-size: 13px; font-weight: 700;
  color: var(--text);
}

.shop-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.shop-row-main { flex: 1; min-width: 0; }
.shop-name { font-size: 14px; font-weight: 600; }
.shop-reason {
  color: var(--text-mute); font-size: 12px; margin-top: 3px;
  line-height: 1.4;
}
.shop-row-trailing {
  text-align: right; flex-shrink: 0;
}
.shop-qty { font-size: 11px; color: var(--text-mute); font-weight: 600; }
.shop-price { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   QUIZ — fitness onboarding (calm, full-screen, one question per step)
   ═══════════════════════════════════════════════════════════════════════════ */
.quiz-shell {
  min-height: 100vh;
  max-width: 540px;
  margin: 0 auto;
  display: flex; flex-direction: column;
  padding: max(20px, var(--safe-top)) 20px 24px;
}

.quiz-top {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.quiz-progress { flex: 1; }
.quiz-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 360ms var(--ease);
}
.quiz-progress-label {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.quiz-skip { opacity: 0.6; }
.quiz-skip:hover { opacity: 1; }

.quiz-body { flex: 1; animation: fadeInUp 280ms var(--ease); }

.quiz-eyebrow {
  font-size: 11px; font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
}
:root[data-theme="system"] .quiz-eyebrow {
  font-family: var(--font-display);
  color: var(--accent);
  letter-spacing: 0.22em;
}

.quiz-question {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text);
}
:root[data-theme="system"] .quiz-question {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 24px;
}
.quiz-help {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 24px;
}

/* Choice list (single-select) */
.quiz-choices {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.quiz-choice {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
}
.quiz-choice:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.quiz-choice:active { transform: scale(0.99); }
.quiz-choice.active {
  background: var(--surface-3);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.quiz-choice-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.quiz-choice-body { flex: 1; min-width: 0; }
.quiz-choice-label {
  display: block;
  font-size: 15px; font-weight: 600;
  color: var(--text);
}
.quiz-choice-sub {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
  line-height: 1.4;
}
.quiz-choice-check {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

/* Multi-select chip grid */
.quiz-chip-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.quiz-chip {
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast);
}
.quiz-chip:hover { color: var(--text); border-color: var(--border-strong); }
.quiz-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0b0d;
}

/* Numeric inputs in quiz steps */
.quiz-input,
.quiz-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  margin-bottom: 6px;
}
.quiz-textarea { resize: vertical; }

.quiz-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.quiz-num-with-unit {
  display: flex; gap: 8px;
  align-items: stretch;
}
.quiz-num-with-unit .input { flex: 1; padding: 12px 14px; font-size: 16px; }
.unit-toggle {
  display: flex;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.unit-toggle button {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all var(--t-fast);
}
.unit-toggle button.active {
  background: var(--accent);
  color: #0b0b0d;
}
.unit-toggle.disabled { pointer-events: none; opacity: 0.6; }

/* Segmented control (1-7 frequency) */
.quiz-segmented {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
.quiz-segmented button {
  padding: 12px 0;
  font-weight: 600; font-size: 14px;
  color: var(--text-mute);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all var(--t-fast);
}
.quiz-segmented button.active {
  background: var(--accent);
  color: #0b0b0d;
}

.quiz-day-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.quiz-day {
  padding: 14px 0;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 700; font-size: 12px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.quiz-day:hover { color: var(--text); }
.quiz-day.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0b0d;
}

.quiz-hint {
  font-size: 12px;
  color: var(--text-mute);
  margin: 14px 0 8px;
  text-align: center;
}
.quiz-cta-bar { margin-top: 16px; }

/* Big tap-only readout for slider-driven values */
.big-readout {
  text-align: center;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 18px 0 14px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.big-readout-unit {
  font-size: 18px;
  color: var(--text-mute);
  font-weight: 500;
  margin-left: 6px;
}

.quiz-slider { width: 100%; margin: 4px 0 4px; }
.quiz-slider-range {
  display: flex; justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Per-stat block (height / weight / target) */
.stat-block {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.stat-block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.stat-block .quiz-label { margin: 0; }
.stat-block .big-readout { font-size: 40px; margin: 12px 0 8px; }

/* Featured chip (e.g. "Full body", "No issues") */
.quiz-chip.featured {
  background: var(--accent-soft);
  border-color: var(--border-accent);
  color: var(--text);
  font-weight: 700;
}
.quiz-chip.featured.active {
  background: var(--accent);
  color: #0b0b0d;
  border-color: var(--accent);
}
.quiz-chip.dimmed {
  opacity: 0.45;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPEARANCE PICKER (Settings)
   ═══════════════════════════════════════════════════════════════════════════ */
.theme-picker {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.theme-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex; flex-direction: column; gap: 6px;
}
.theme-card:hover { background: var(--surface-2); border-color: var(--border-strong); }
.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-swatch {
  height: 64px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}
.swatch-calm {
  background: linear-gradient(135deg, #161618, #0b0b0d);
  color: #f1f1f2;
  border: 1px solid rgba(255,255,255,0.10);
}
.swatch-system {
  background: linear-gradient(135deg, #050a14, #02050a);
  color: #4dccff;
  font-family: "Orbitron", monospace;
  letter-spacing: 0.10em;
  border: 1px solid #4dccff;
  box-shadow: inset 0 0 16px rgba(77,204,255,0.20);
}
.theme-name { font-size: 14px; font-weight: 700; color: var(--text); }
.theme-desc { font-size: 12px; color: var(--text-mute); line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════
   STRENGTH PILLAR — aligned with the UI helpers in ui.js
   ═══════════════════════════════════════════════════════════════════════════ */

/* Body-map sub-controls */
.bm-toggle {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 10px;
}
.str-tab.small { padding: 6px 14px; font-size: 10px; }

.bm-svg-wrap {
  display: flex; justify-content: center;
  padding: 6px 0 4px;
}
.bm-svg-wrap svg {
  width: 100%; max-width: 280px; height: auto; display: block;
}

.bm-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 9px; color: var(--text-mute);
  letter-spacing: 0.16em;
}
.bm-legend i {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Muscle detail panel */
.muscle-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.muscle-fancy {
  font-size: 11px; color: var(--text-mute);
  margin-top: 2px;
  font-style: italic;
}
.muscle-score {
  text-align: right;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.muscle-score.untrained {
  color: var(--text-mute);
  border-color: var(--border);
  box-shadow: none;
}
.muscle-score-num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  line-height: 1;
}
.muscle-score-tier {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em;
  margin-top: 4px;
}
.muscle-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* Exercise rows in muscle detail */
.ex-row {
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  border-left: 2px solid var(--accent);
}
.ex-row.accessory { border-left-color: var(--text-faint); }
.ex-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.ex-note {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.45;
}

/* "Your lifts that train it" rows in muscle detail */
.lift-trains-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

/* Workout tab — lift rankings */
.lift-card { margin-bottom: 14px; }
.lift-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.lift-card-name {
  font-size: 14px; font-weight: 600;
}
.lift-card-rank {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
}

/* Log-a-set form */
.log-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  align-items: end;
}
.log-form.two { grid-template-columns: 1fr 1fr; }
.log-form .label { display: flex; flex-direction: column; gap: 4px; }
.log-form .label > span {
  font-family: var(--font-display);
  font-size: 9px; color: var(--text-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.log-form .input { padding: 9px 10px; font-size: 13px; }

/* Goals tab */
.goal-row { margin-bottom: 12px; }
.goal-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.goal-row textarea.input {
  resize: vertical;
  min-height: 52px;
  font-size: 13px; line-height: 1.45;
}

/* ─── Exercise picker (Workout tab section A) ─── */
.ex-search { margin-bottom: 10px; }
.ex-search .input { padding: 10px 12px; }
.ex-filter-row {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 10px;
}
.ex-filter-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
}
.ex-filter-row .input { padding: 7px 10px; font-size: 13px; }

.ex-results {
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.ex-pick {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.ex-pick:last-child { border-bottom: 0; }
.ex-pick:hover { background: var(--surface-2); }
.ex-pick.active { background: var(--surface-3); }
.ex-pick-main { flex: 1; min-width: 0; }
.ex-pick-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ex-pick-meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.ex-pick-score {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  width: 38px;
  text-align: right;
}

.ex-selected {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.ex-selected-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
}
.ex-selected-name { font-size: 16px; font-weight: 700; color: var(--text); }
.ex-selected-meta { font-size: 11px; color: var(--text-mute); margin-top: 3px; line-height: 1.4; }
.ex-selected-overall {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}
.ex-selected-overall span { font-size: 12px; color: var(--text-mute); margin-left: 2px; }
.ex-rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.mini-stat {
  background: var(--surface-3);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}
.mini-stat-num {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  line-height: 1;
}
.mini-stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  margin: 4px 0 5px;
}
.mini-stat-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.mini-stat-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.ex-selected-notes {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.45;
  font-style: italic;
}
.ex-selected-muscles {
  margin-top: 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
}
.chip.muted { background: var(--surface-2); color: var(--text-mute); }

.log-form.three { grid-template-columns: 1fr 1fr 1.4fr; }

.ex-cta-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.ex-cta-row .btn { padding: 12px 10px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════════
   WORKOUT TAB — bento, primary CTA, history cards, routine cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* Bento stat hero (Strava/Whoop-inspired) */
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 10px;
  margin: 14px 0 18px;
}
.bento-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.bento-card.bento-hero {
  background:
    radial-gradient(120% 100% at 0% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--surface-2);
}
.bento-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.bento-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bento-hero .bento-value { font-size: 36px; }
.bento-unit {
  font-size: 14px;
  color: var(--text-mute);
  font-weight: 600;
  margin-left: 3px;
}
.sparkline {
  display: flex; align-items: flex-end;
  gap: 3px;
  height: 24px;
  margin-top: 10px;
}
.spark-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 1px;
  min-height: 2px;
  transition: opacity var(--t-fast);
}

/* Primary CTA — the big "+ Start workout" button */
.primary-cta {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  margin-bottom: 18px;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.primary-cta::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}
.primary-cta:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.primary-cta-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent);
  color: #0b0b0d;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 300;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.primary-cta-text { flex: 1; position: relative; z-index: 1; }
.primary-cta-title { font-size: 16px; font-weight: 700; color: var(--text); }
.primary-cta-sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.primary-cta-arrow { font-size: 22px; color: var(--text-mute); position: relative; z-index: 1; }

/* Routine cards — horizontal scroll row */
.routine-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  margin: 0 -4px 12px;
  padding: 0 4px 8px;
  scrollbar-width: none;
}
.routine-row::-webkit-scrollbar { display: none; }
.routine-card {
  min-width: 200px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  flex-shrink: 0;
}
.routine-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px;
}
.routine-name { font-size: 14px; font-weight: 700; color: var(--text); }
.routine-meta { font-size: 11px; color: var(--text-mute); margin: 6px 0 12px; }
.routine-card .btn-sm { padding: 8px 12px; font-size: 13px; }

/* Workout history cards (Strong-style) */
.workout-history { display: flex; flex-direction: column; gap: 8px; }
.workout-history-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.whc-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.whc-name { font-size: 14px; font-weight: 700; color: var(--text); }
.whc-date { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.whc-volume {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.whc-volume span { font-size: 11px; color: var(--text-mute); margin-left: 2px; font-weight: 600; }
.whc-meta {
  display: flex; gap: 8px;
  font-size: 11px; color: var(--text-mute);
  margin-bottom: 10px;
}
.whc-exercises { display: flex; flex-wrap: wrap; gap: 6px; }
.whc-chip {
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border);
}
.whc-chip.muted { color: var(--text-mute); }

/* Collapsible quick-log */
.quick-log-details {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: hidden;
}
.quick-log-summary {
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.quick-log-summary .t-mute { font-size: 11px; font-weight: 500; }
.quick-log-summary::-webkit-details-marker { display: none; }
.quick-log-summary::after {
  content: "›";
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 20px; color: var(--text-mute);
  transition: transform var(--t-fast);
}
.quick-log-summary { position: relative; padding-right: 38px; }
.quick-log-details[open] .quick-log-summary::after { transform: translateY(-50%) rotate(270deg); }
.quick-log-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVE WORKOUT SESSION (Strong/Hevy style)
   ═══════════════════════════════════════════════════════════════════════════ */
.active-workout {
  padding-bottom: 100px; /* room for sticky bottom bar */
}
.aw-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin: 12px 0 14px;
}
.aw-eyebrow {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.aw-name {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 4px;
}

.aw-stat-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}
.aw-stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 600;
}
.aw-stat-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.aw-stat-value span {
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 600;
  margin-left: 3px;
}

.aw-exercise {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.awe-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.awe-name { font-size: 15px; font-weight: 700; color: var(--text); }
.awe-meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

.awe-set-table {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.awe-set-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 40px;
  gap: 8px;
  align-items: center;
}
.awe-set-head {
  font-size: 10px;
  color: var(--text-mute);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 8px 4px;
  border-bottom: 1px solid var(--border);
}
.awe-set-num {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dim);
}
.awe-set-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.40);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.awe-set-input::placeholder { color: var(--text-faint); }
.awe-set-input:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.55);
}
.awe-set-row.done .awe-set-input {
  background: rgba(76, 224, 168, 0.10);
  border-color: rgba(125, 201, 154, 0.45);
  color: var(--text);
}
.awe-check {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
}
.awe-check:hover { border-color: var(--accent); }
.awe-check.done {
  background: var(--good);
  border-color: var(--good);
  color: #0b0b0d;
}
.awe-add-set {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.awe-add-set:hover { color: var(--accent); border-color: var(--accent); }

.aw-empty {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface-1);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.aw-empty-icon { font-size: 40px; opacity: 0.6; margin-bottom: 8px; }
.aw-empty-text { color: var(--text-mute); font-size: 13px; }

.aw-bottom {
  position: sticky;
  bottom: 0;
  padding: 14px 0 0;
  background: linear-gradient(180deg, transparent, var(--bg-0) 30%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #0b0b0d;
  font-weight: 700;
}

.goal-top-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VITALITY HUB
   ═══════════════════════════════════════════════════════════════════════════ */
.vit-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.vit-sub-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex; flex-direction: column; gap: 4px;
}
.vit-sub-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.vit-sub-icon { font-size: 22px; margin-bottom: 2px; }
.vit-sub-label { font-size: 14px; font-weight: 700; color: var(--text); }
.vit-sub-meta { font-size: 12px; color: var(--text-mute); }

.pantry-action-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECIPE MODE CARDS + PICKER + NOTES
   ═══════════════════════════════════════════════════════════════════════════ */
.recipe-modes {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.recipe-mode-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast);
}
.recipe-mode-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.recipe-mode-card.highlight {
  background: linear-gradient(135deg, var(--gold-soft), var(--surface-2));
  border-color: rgba(232, 196, 120, 0.35);
}
.rmc-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #0b0b0d;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.rmc-body { flex: 1; min-width: 0; }
.rmc-title { font-size: 15px; font-weight: 700; color: var(--text); }
.rmc-sub { font-size: 12px; color: var(--text-mute); margin-top: 3px; line-height: 1.4; }
.rmc-arrow { color: var(--text-faint); font-size: 22px; }

/* ── Recipe picker grid ── */
.picker-summary {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--violet-soft);
  border: 1px solid rgba(153, 112, 255, 0.30);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}
.picker-summary-label {
  font-size: 13px; font-weight: 700;
  color: var(--violet);
  margin-bottom: 8px;
}
.picker-summary-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.picker-summary-chips .chip {
  cursor: pointer;
  background: rgba(153, 112, 255, 0.18);
  color: var(--text);
}
.picker-summary-hint {
  font-size: 12px; color: var(--text-mute);
}

.picker-group { margin-bottom: 16px; }
.picker-group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
}
.picker-group-count {
  background: var(--surface-2);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: var(--text-mute);
}

.picker-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.picker-item {
  position: relative;
  padding: 12px 14px;
  background: var(--surface-1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
}
.picker-item:hover { background: var(--surface-2); }
.picker-item.picked {
  background: var(--violet-soft);
  border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet);
}
.picker-item-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  padding-right: 24px;
}
.picker-item-meta {
  font-size: 11px; color: var(--text-mute);
  margin-top: 3px;
}
.picker-item-check {
  position: absolute; top: 8px; right: 10px;
  color: var(--violet);
  font-weight: 800;
  font-size: 14px;
}

/* Recipe notes (compromise explanations) */
.recipe-notes {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--surface-1);
  border-radius: 8px;
  border-left: 3px solid var(--violet);
}
.recipe-notes strong { color: var(--violet); }

/* ═══════════════════════════════════════════════════════════════════════════
   SCAN SUMMARY
   ═══════════════════════════════════════════════════════════════════════════ */
.scan-summary-card {
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  text-align: center;
  margin-top: 12px;
  box-shadow: var(--shadow);
}
.scan-summary-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--good);
  color: #0b0b0d;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800;
}
.scan-summary-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.01em;
}
.scan-summary-sub { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

.scan-summary-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
}
.scan-summary-stats .ws-stat { background: rgba(0,0,0,0.25); }

.scan-summary-items {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
  margin-top: 18px;
}

.scan-summary-actions { display: flex; flex-direction: column; gap: 10px; }
.scan-summary-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Recipe "I cooked this" CTA row */
.recipe-cta-row {
  display: flex; justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.recipe-cta-row .btn-mini {
  background: var(--good-soft);
  color: var(--good);
  border-color: rgba(125, 201, 154, 0.30);
}
.recipe-cta-row .btn-mini:hover {
  background: var(--good);
  color: #0b0b0d;
  border-color: var(--good);
}

/* kg/lb pill toggle (active workout header) */
.weight-unit-toggle {
  display: inline-flex;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.weight-unit-toggle button {
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.weight-unit-toggle button.active {
  background: var(--accent);
  color: #0b0b0d;
}

/* Picker card inside active workout */
.ex-picker-card {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface-1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   POST-WORKOUT SUMMARY MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.ws-modal {
  background: linear-gradient(180deg, var(--surface-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  width: calc(100% - 32px);
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(255,255,255,0.08);
  animation: pop 420ms var(--ease-spring);
}
.ws-celebrate {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--good);
  color: #0b0b0d;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 800;
}
.ws-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.ws-sub { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

.ws-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 18px;
}
.ws-stat {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px 6px;
}
.ws-stat-num {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ws-stat-num span {
  font-size: 12px; font-weight: 600;
  color: var(--text-mute);
  margin-left: 2px;
}
.ws-stat-label {
  font-size: 10px; color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 600;
  margin-top: 4px;
}

.ws-section {
  font-size: 11px; color: var(--text-mute);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  text-align: left;
  margin: 4px 0 8px;
}
.ws-muscles {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.ws-muscle {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 13px;
}
.ws-muscle-name { color: var(--text); font-weight: 600; }
.ws-muscle-delta {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--good);
  font-size: 14px;
}

.ws-xp {
  margin: 14px 0 18px;
  padding: 12px;
  background: var(--gold-soft);
  border: 1px solid rgba(255, 206, 84, 0.25);
  border-radius: var(--radius);
  display: flex; align-items: baseline; justify-content: center;
  gap: 8px;
}
.ws-xp-num {
  font-size: 24px; font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.ws-xp-label {
  font-size: 11px; color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 700;
}

/* AI suggestion row inside Goals tab */
.suggestion-row {
  display: flex; gap: 12px; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STRENGTH PILLAR (legacy class names, kept for any old refs) — tabs, body map, muscle detail, lift cards, log form, goals
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tab strip */
.str-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 18px;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.str-tab {
  padding: 10px 8px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: transparent;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
}
.str-tab:hover { color: var(--text); }
.str-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(77, 204, 255, 0.20), 0 0 16px rgba(77, 204, 255, 0.15);
}

/* Overall rank window */
.str-overall {
  display: flex; align-items: center; gap: 18px;
}
.str-overall-rank {
  font-family: var(--font-display);
  font-size: 64px; font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.str-overall-body { flex: 1; min-width: 0; }
.str-overall-label {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.str-overall-pct {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--gold);
  margin: 4px 0 6px;
}
.str-overall-pct .ord { font-size: 12px; color: var(--text-mute); margin-left: 1px; }
.str-overall-tier { margin-left: 10px; font-size: 12px; letter-spacing: 0.10em; }
.str-overall-foot {
  font-size: 10px; color: var(--text-mute);
  margin-top: 8px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

/* Body map */
.body-map-wrap { text-align: center; }
.body-map-controls {
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 6px;
}
.body-map-svg {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
}
.body-map-svg path {
  cursor: pointer;
  transition: all 350ms var(--ease);
}
.body-map-legend {
  display: flex; justify-content: center; gap: 14px;
  margin-top: 10px;
  font-size: 9px; color: var(--text-mute);
  font-family: var(--font-display);
  letter-spacing: 0.16em;
}
.body-map-legend .swatch {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Muscle detail panel (under body map) */
.muscle-detail {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.muscle-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.muscle-detail-name {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(77, 204, 255, 0.25);
}
.muscle-detail-fancy {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
  font-style: italic;
}
.muscle-detail-score {
  text-align: right;
  flex-shrink: 0;
}
.muscle-detail-score-num {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  line-height: 1;
}
.muscle-detail-score-out { font-size: 13px; color: var(--text-mute); }
.muscle-detail-tier {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em;
  margin-top: 4px;
}

.muscle-detail-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.muscle-trained-by {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.muscle-trained-by strong { color: var(--accent); font-weight: 600; }

.muscle-exercises {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.muscle-exercises-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 12px 0 8px;
}
.exercise-row {
  display: block;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  border-left: 2px solid var(--accent);
}
.exercise-row.accessory { border-left-color: var(--text-faint); }
.exercise-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.exercise-note {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.4;
}

.muscle-detail-actions {
  margin-top: 14px;
  display: flex; gap: 8px;
}

/* Workout tab — lift rankings */
.lift-row {
  margin-bottom: 14px;
}
.lift-row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.lift-row-name {
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.lift-row-rank {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.10em;
}
.lift-row-meta {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.lift-bar {
  height: 8px;
  background: rgba(77, 204, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.lift-bar > div {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms var(--ease);
}

/* Log-a-set form */
.log-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}
.log-form-stack {
  display: flex; gap: 10px;
  margin-top: 12px;
}
.log-form-stack > * { flex: 1; min-width: 0; }
.log-form-foot {
  margin-top: 12px;
  font-size: 10px;
  color: var(--text-mute);
  line-height: 1.5;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.field {
  display: block;
}
.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--text-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.field .input { padding: 9px 10px; }

/* Goals tab */
.goal-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.goal-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.goal-card-name {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.goal-card-score {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.goal-card-score.has-score { color: var(--gold); border-color: rgba(255, 206, 84, 0.30); }
.goal-card textarea.input {
  min-height: 64px; resize: vertical;
  font-size: 13px; line-height: 1.45;
}

/* AI suggestion attached to a goal */
.goal-ai {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--violet-soft);
  border: 1px solid rgba(153, 112, 255, 0.30);
  border-radius: var(--radius);
}
.goal-ai-title {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 8px;
}
.goal-ai-rationale {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.5;
}
.goal-ai-ex {
  padding: 8px 10px;
  background: rgba(0,0,0,0.20);
  border-radius: 8px;
  margin-bottom: 6px;
}
.goal-ai-ex-name {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600;
}
.goal-ai-ex-prescript {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.goal-ai-ex-cue {
  font-size: 11px; color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENTS — home cards, runner screen
   ═══════════════════════════════════════════════════════════════════════════ */
.agent-grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .agent-grid { grid-template-columns: 1fr 1fr; }
}
.agent-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
  width: 100%;
}
.agent-card:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.agent-card:active { transform: scale(0.99); }
.agent-card.unconfigured {
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
}
.agent-card.unconfigured .agent-name { color: var(--text-dim); }
.agent-ic {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--grad-premium);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(232, 196, 120, 0.20);
}
.agent-card.unconfigured .agent-ic {
  background: var(--surface-3);
  box-shadow: none;
}
.agent-info { flex: 1; min-width: 0; }
.agent-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent-desc {
  font-size: 12px; color: var(--text-mute); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent-chev { color: var(--text-faint); font-size: 20px; line-height: 1; }

/* Runner screen */
.agent-hero {
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 22px;
}
.agent-hero-ic {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--grad-premium);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(232, 196, 120, 0.25);
}

.agent-input {
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

.agent-result {
  margin-top: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 320ms var(--ease);
}
.agent-result-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.agent-result-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold);
}
.agent-result-body {
  padding: 14px;
  font-size: 14px; line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60vh;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.settings-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: -6px 4px 16px;
}
.settings-note code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-3, rgba(255,255,255,0.06));
}
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.settings-row:hover { background: var(--surface-3); }
.settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row .ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.settings-row .label-main { flex: 1; font-size: 14px; font-weight: 600; }
.settings-row .value {
  color: var(--text-mute); font-size: 13px;
}
.settings-row .chev { color: var(--text-faint); font-size: 18px; }

.subscription-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--gold-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  color: var(--gold);
}
.subscription-badge.trial { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.subscription-badge.dev { background: rgba(155, 184, 232, 0.15); border-color: rgba(155, 184, 232, 0.4); color: #9bb8e8; }

/* ═══════════════════════════════════════════════════════════════════════════
   STRENGTH PILLAR — body map, lift cards, muscle detail, goals
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Overall rank window ── */
.rank-row {
  display: flex; align-items: center; gap: 20px;
}
.rank-glyph {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  flex-shrink: 0;
  min-width: 56px;
  text-align: center;
}
.rank-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
}
.rank-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ── Sub-tab strip inside Strength ── */
.str-tabs {
  display: flex; gap: 6px;
  margin: 18px 0 14px;
  background: rgba(2, 5, 10, 0.6);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.str-tab {
  flex: 1;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-mute);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.str-tab:hover { color: var(--text); }
.str-tab.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(77, 204, 255, 0.18), rgba(77, 204, 255, 0.06));
  border-color: rgba(77, 204, 255, 0.5);
  box-shadow: 0 0 10px rgba(77, 204, 255, 0.25);
}
.str-tab.small { padding: 7px 14px; flex: 0 0 auto; }

/* ── Body map ── */
.bm-toggle {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 10px;
}
.bm-svg-wrap {
  display: flex; justify-content: center;
  padding: 8px 0 4px;
}
.bm-svg-wrap svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}
.bm-legend {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}
.bm-legend span {
  display: inline-flex; align-items: center; gap: 5px;
}
.bm-legend i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
}

/* ── Muscle detail panel ── */
.muscle-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.muscle-fancy {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
  font-style: italic;
}
.muscle-score {
  flex-shrink: 0;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  text-align: center;
  background: var(--surface-1);
  transition: all var(--t-fast);
}
.muscle-score.untrained {
  color: var(--text-mute);
  border-style: dashed;
}
.muscle-score-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
}
.muscle-score-tier {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}
.muscle-bio {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.ex-row {
  display: flex; flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ex-row:last-child { border-bottom: none; }
.ex-row.accessory { padding-left: 8px; opacity: 0.92; }
.ex-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ex-note {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.5;
}

.lift-trains-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.lift-trains-row:last-child { border-bottom: none; }

/* ── Workout tab ── */
.log-form {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr;
  gap: 10px;
}
.log-form.two { grid-template-columns: 1fr 1fr; }
.log-form .label {
  display: block;
}
.log-form .label > span {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.log-form .input {
  padding: 10px 12px;
  font-size: 14px;
}

.lift-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.lift-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.lift-card-name {
  font-size: 14px;
  font-weight: 600;
}
.lift-card-rank {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
}

/* ── Goals tab ── */
.goal-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.goal-row:last-child { border-bottom: none; }
.goal-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.goal-row textarea.input {
  font-size: 13px;
  min-height: 44px;
  resize: vertical;
  line-height: 1.5;
}

.suggestion-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.suggestion-row:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════════════
   WIS — Reading (book cards, covers, stars, detail)
   ═══════════════════════════════════════════════════════════════════════ */
button.bento-card { font: inherit; color: inherit; width: 100%; cursor: pointer; }
button.bento-card.bento-hero:active { transform: scale(0.99); }

.book-card { cursor: pointer; margin-bottom: 8px; transition: border-color .15s, transform .1s; }
.book-card:active { transform: scale(0.995); }
.book-card-title {
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.book-card-sub {
  color: var(--text-mute); font-size: 12px; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.book-cover {
  width: 44px; height: 56px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(160deg, rgba(153,112,255,.28), rgba(153,112,255,.07));
  border: 1px solid rgba(153,112,255,.32);
}
.book-cover.lg { width: 64px; height: 84px; font-size: 34px; border-radius: 10px; }

.book-detail-head { display: flex; gap: 14px; align-items: flex-start; }

.stars { display: flex; gap: 4px; align-items: center; }
.stars .star { font-size: 18px; color: var(--text-dim); line-height: 1; }
.stars .star.on { color: var(--gold); }
.stars.lg .star { font-size: 30px; }
.stars button.star { background: none; border: none; padding: 2px 1px; cursor: pointer; }
.stars button.star:active { transform: scale(0.9); }

/* Category launcher cards */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-card {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  background: var(--card, rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-left: 3px solid var(--cat, #9970ff);
  border-radius: 14px; padding: 14px;
  transition: transform .1s, border-color .15s;
}
.cat-card:active { transform: scale(0.98); }
.cat-icon { font-size: 26px; }
.cat-label { font-weight: 700; margin-top: 8px; }
.cat-meta { color: var(--text-mute); font-size: 12px; margin-top: 2px; }

/* 1–10 rating */
.rate10 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rate10 .seg10 {
  font: inherit; font-size: 12px; font-variant-numeric: tabular-nums;
  height: 34px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: rgba(255,255,255,.03); color: var(--text-dim);
}
.rate10.interactive .seg10 { cursor: pointer; transition: background .1s, color .1s; }
.rate10 .seg10.on {
  background: var(--gold); color: #1a1000; border-color: var(--gold); font-weight: 700;
}
.rate10.interactive .seg10:active { transform: scale(0.92); }

.rate-badge {
  flex: none; display: inline-flex; align-items: baseline; gap: 1px;
  background: var(--gold); color: #1a1000;
  font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 9px; line-height: 1;
}
.rate-badge .rate-badge-max { font-size: 10px; font-weight: 600; opacity: .7; }
.rate-badge.empty { background: transparent; color: var(--text-dim); border: 1px dashed var(--border); }

.top-row { margin-bottom: 8px; cursor: pointer; }
.top-rank {
  flex: none; width: 30px; text-align: center;
  font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 13px;
}

/* Per-category goals sheet */
.goal-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.goal-row-label { flex: 1; font-weight: 600; }
.goal-input { width: 88px; flex: none; text-align: center; }

/* Insights charts (interactive SVG) */
.ch-svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.ch-grid { stroke: var(--border); stroke-width: 1; opacity: 0.45; }
.ch-y, .ch-x { fill: var(--text-dim); font-size: 9px; font-family: inherit; font-variant-numeric: tabular-nums; }
.ch-hit { fill: transparent; cursor: pointer; }
.ch-hit:hover { fill: rgba(255,255,255,0.05); }

.chart-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.chart-chips .fchip { padding: 5px 11px; font-size: 12px; }
.chart-chips-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }

.chart-tip {
  position: fixed; z-index: 240; left: 0; top: 0;
  background: rgba(18, 18, 26, 0.97);
  border: 1px solid var(--border);
  color: var(--text, #fff);
  font-size: 12px; font-weight: 600; line-height: 1.3;
  padding: 7px 10px; border-radius: 9px;
  pointer-events: none; max-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  opacity: 0; transform: translateY(4px); transition: opacity .12s ease;
}
.chart-tip.show { opacity: 1; transform: none; }

/* Shopping checklist + cookbook */
.btn-mini-ghost { background: transparent !important; }
.recipe-cta-row { display: flex; gap: 8px; flex-wrap: wrap; }

.shop-check-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.shop-check-row:last-child { border-bottom: none; }
.shop-check-row.done .shop-check-name { text-decoration: line-through; color: var(--text-mute); }
.shop-check {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  border: 1.5px solid var(--border-strong, var(--border)); background: transparent;
  color: var(--good); font-weight: 800; font-size: 13px; cursor: pointer; line-height: 1;
}
.shop-check-row.done .shop-check { background: var(--good); border-color: var(--good); color: #06231a; }
.shop-check-main { flex: 1; min-width: 0; }
.shop-check-name { font-weight: 600; }
.shop-check-src { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.shop-del { flex: none; background: none; border: none; color: var(--text-dim); font-size: 14px; cursor: pointer; padding: 4px 6px; }
.shop-del:hover { color: var(--bad); }
.shop-check-done-head { font-size: 12px; color: var(--text-dim); margin: 12px 0 2px; text-transform: uppercase; letter-spacing: .04em; }

.cookbook-card .recipe-emoji { font-size: 26px; }

/* Recipe "Cook now" — expiring notice + pantry status */
.banner.banner-warn {
  cursor: default; border-color: rgba(232, 196, 120, 0.4);
  background: var(--warn-soft, rgba(232, 196, 120, 0.10));
}
.banner.banner-warn:hover { transform: none; box-shadow: none; }
.banner.banner-warn .banner-icon { background: transparent; }
.pantry-status {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--text-dim);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; margin-bottom: 14px;
}
.pantry-status strong { color: var(--text); }

/* Achievements (Profile) */
.ach-count { color: var(--text-dim); font-weight: 400; font-size: 12px; }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach {
  text-align: center; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 4px; background: rgba(255,255,255,0.03);
}
.ach.got { border-color: var(--gold); background: var(--gold-soft, rgba(232,196,120,0.12)); }
.ach.locked { opacity: 0.5; }
.ach-emoji { font-size: 24px; line-height: 1; }
.ach-name { font-size: 10px; margin-top: 5px; color: var(--text-dim); line-height: 1.15; }
.ach.got .ach-name { color: var(--text); font-weight: 600; }

/* Status "At a glance" cross-pillar cards */
.glance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.glance-card {
  font: inherit; color: inherit; cursor: pointer; text-align: center;
  background: var(--card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-top: 2px solid var(--gc, var(--accent));
  border-radius: 12px; padding: 10px 4px;
  transition: transform .1s;
}
.glance-card:active { transform: scale(0.96); }
.glance-icon { font-size: 18px; }
.glance-big { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; margin-top: 3px; line-height: 1.1; }
.glance-label { font-size: 9.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.1; }

/* ═══ WLT — Wealth ═══ */
/* Transaction rows */
.txn-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.txn-row:last-child { border-bottom: none; }
.card.txn-row { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; }
.txn-ic {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.txn-main { flex: 1; min-width: 0; }
.txn-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-meta { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.txn-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Calculator keypad */
.page-keypad { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 24px; }
.kp-type-toggle {
  display: flex; gap: 6px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin: 4px 0 8px;
}
.kp-type {
  flex: 1; padding: 9px 0; border: none; background: transparent; border-radius: 9px;
  color: var(--text-dim); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.kp-type.active { background: var(--surface-3, rgba(255,255,255,0.10)); color: var(--text); }
.kp-amount {
  text-align: center; font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 14px 0 10px; letter-spacing: -1px;
}
.kp-row { margin-bottom: 8px; }
.kp-sub { font-size: 12px; color: var(--text-dim); margin: 6px 0 4px; }
.kp-note { margin-top: 10px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.kp-key {
  font: inherit; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 16px 0; border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer;
  transition: background .1s, transform .05s;
}
.kp-key:active { background: rgba(255,255,255,0.10); transform: scale(0.97); }
.kp-key.kp-back { font-size: 20px; color: var(--text-dim); }
.kp-save { margin-top: auto; border: none; font-weight: 800; }

/* Cleaner weekly spending hero */
.spend-hero2 {
  display: flex; gap: 14px; align-items: stretch;
  background: var(--card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 18px; padding: 18px; margin-bottom: 16px;
}
.spend-hero2-main { flex: 1; min-width: 0; }
.spend-hero2-label { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; }
.spend-hero2-amt { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 4px; }
.spend-pill {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: var(--text-dim);
}
.spend-pill.up { background: var(--bad-soft, rgba(217,117,112,0.16)); color: var(--bad); }
.spend-pill.down { background: var(--good-soft, rgba(76,224,168,0.16)); color: var(--good); }
.spend-hero2-side { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.spend-mini {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px; min-width: 96px; text-align: right;
}
.spend-mini-label { font-size: 11px; color: var(--text-mute); }
.spend-mini-val { font-size: 17px; font-weight: 700; margin-top: 1px; }

/* ═══ PROTOCOL ASCENSION — authoring wizard (Module A0) ═══ */
.pd-body { padding-bottom: 8px; }
.pd-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; margin-top: 8px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 36%);
}
.pd-foot .btn { min-width: 120px; }

/* phase timeline preview */
.pd-timeline {
  display: flex; gap: 4px; align-items: stretch;
  margin: 4px 0 2px; width: 100%;
}
.pd-tl-seg {
  border: 1px solid; border-radius: 8px;
  padding: 8px 6px; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
}
.pd-tl-name {
  font-size: 11px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-tl-meta { font-size: 10px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* editable phase / milestone cards */
.pd-phases, .pd-miles { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pd-phase, .pd-mile { padding: 14px; }
.pd-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pd-name {
  flex: 1; font-weight: 700; font-size: 15px;
  background: rgba(255,255,255,0.03);
}
.pd-ord { display: flex; gap: 4px; flex-shrink: 0; }

.btn-icon.sm {
  width: 30px; height: 30px; min-width: 30px; font-size: 13px;
  border-radius: 8px; padding: 0;
}
.btn-icon.sm.danger { color: var(--bad); }
.btn-icon.sm:disabled { opacity: 0.3; pointer-events: none; }

.fchip.sm { padding: 5px 9px; font-size: 12px; }

.pd-review-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 10px;
}
.pd-review-grid > div { display: flex; flex-direction: column; gap: 1px; }
.pd-review-grid .t-mute { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.pd-review-grid b { font-size: 14px; color: var(--text); }

/* ═══ DAILY COMMAND CONSOLE (Module B) ═══ */
.console { margin-top: 14px; }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.console-daytype {
  font-size: 12px; color: var(--accent); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-top: 2px;
}
.cons-ring { flex-shrink: 0; }
.cons-pct { fill: var(--text); font-size: 15px; font-weight: 800; font-family: var(--font-mono, monospace); }

.console-directives { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dir-chip {
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.03);
  color: var(--text); border-radius: 10px; padding: 9px 13px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.dir-chip.done { border-color: var(--good); color: var(--good); background: rgba(76,224,168,0.08); }
.dir-chip.rest { cursor: default; color: var(--text-mute); }

.qlog-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.qlog {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 6px; text-align: center; cursor: pointer;
  transition: border-color 140ms var(--ease), transform 90ms var(--ease);
}
.qlog:active { transform: scale(0.97); }
.qlog:hover { border-color: var(--border-strong); }
.qlog-label { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; }
.qlog-val { font-size: 16px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }

.fuel-block { margin-top: 14px; }
.fuel-head { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 6px; }
.adh-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adh {
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-mute); border-radius: 10px; padding: 10px 6px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.adh.active { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.06); }
.adh.active.good { color: var(--good); border-color: var(--good); background: rgba(76,224,168,0.10); }
.adh.active.warn { color: var(--gold); border-color: var(--gold); background: rgba(255,206,0,0.08); }

.supp-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.supp {
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-mute); border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 700; text-transform: capitalize; cursor: pointer;
}
.supp.active { color: var(--good); border-color: var(--good); background: rgba(76,224,168,0.10); }

/* ═══ SCHEDULE + ALARMS (Module F) ═══ */
.console-head-right { display: flex; align-items: center; gap: 8px; }

/* reusable on/off toggle */
.toggle {
  width: 46px; height: 28px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,255,255,0.10); border: 1px solid var(--border);
  position: relative; cursor: pointer; transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.toggle > span {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: transform 160ms var(--ease);
}
.toggle.on { background: var(--good); border-color: var(--good); }
.toggle.on > span { transform: translateX(18px); }

.sched-master { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sched-notif { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.sched-list { display: flex; flex-direction: column; gap: 8px; }
/* reminder = a "system directive" card, themed to match sys-windows */
.sched-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 14px;
  border-left: 3px solid var(--kc, var(--accent));
  position: relative; overflow: hidden;
}
.sched-row::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--kc, var(--accent)) 9%, transparent), transparent 42%);
  pointer-events: none;
}
.sched-row.off { opacity: 0.45; }
.sched-ic {
  font-size: 20px; flex-shrink: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid color-mix(in srgb, var(--kc, var(--accent)) 40%, transparent);
  background: color-mix(in srgb, var(--kc, var(--accent)) 10%, transparent);
  position: relative; z-index: 1;
}
.sched-main { flex: 1; min-width: 0; text-align: left; background: none; border: none; cursor: pointer; padding: 0; position: relative; z-index: 1; }
.sched-time { font-family: var(--font-display, sans-serif); display: flex; align-items: baseline; gap: 5px; }
.sched-time .t-mono { font-size: 21px; font-weight: 800; letter-spacing: 0.02em; }
.sched-ap { font-size: 11px; color: var(--text-mute); font-weight: 700; }
.sched-name { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }
.sched-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-mute); margin-top: 4px; }
.sched-tag {
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 9.5px;
  border: 1px solid; border-radius: 999px; padding: 2px 7px;
}
.sched-row .toggle { position: relative; z-index: 1; }

/* in-app alarm takeover */
.alarm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, rgba(77,204,255,0.18), rgba(2,5,10,0.92) 60%), rgba(2,5,10,0.96);
  backdrop-filter: blur(8px);
  padding: 28px;
}
.alarm-overlay.ringing { animation: alarmFlash 1.1s var(--ease) infinite; }
@keyframes alarmFlash { 0%,100% { background-color: rgba(2,5,10,0.96); } 50% { background-color: rgba(8,20,32,0.96); } }
.alarm-card { text-align: center; max-width: 360px; width: 100%; position: relative; }
.alarm-pulse {
  position: absolute; left: 50%; top: 22px; width: 120px; height: 120px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(77,204,255,0.35), transparent 70%);
  animation: alarmPulse 1.1s ease-out infinite;
}
@keyframes alarmPulse { 0% { transform: translate(-50%,-50%) scale(0.7); opacity: 0.9; } 100% { transform: translate(-50%,-50%) scale(1.8); opacity: 0; } }
.alarm-icon { font-size: 64px; position: relative; }
.alarm-time { font-family: var(--font-display, sans-serif); font-size: 40px; font-weight: 800; margin-top: 10px; color: var(--accent); text-shadow: 0 0 28px rgba(77,204,255,0.6); }
.alarm-title { font-size: 22px; font-weight: 800; margin-top: 8px; }
.alarm-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); margin-top: 4px; }
.alarm-actions { display: flex; gap: 12px; margin-top: 32px; }
.alarm-btn { flex: 1; padding: 16px; border-radius: 16px; font-size: 16px; font-weight: 800; cursor: pointer; border: 1px solid var(--border-strong); }
.alarm-btn.snooze { background: rgba(255,255,255,0.06); color: var(--text); }
.alarm-btn.dismiss { background: var(--accent); color: #02050a; border-color: var(--accent); }

/* ═══ ENDURANCE WING (Module C) ═══ */
/* tighten the STR sub-tab strip now that there are 4 tabs */
.str-tabs .str-tab { letter-spacing: 0.06em; padding: 10px 4px; }
@media (max-width: 380px) { .str-tabs .str-tab { font-size: 10px; } }

.endur-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.endur-big { font-family: var(--font-display, sans-serif); font-size: 40px; font-weight: 800; line-height: 1; }
.endur-unit { font-size: 16px; color: var(--text-mute); margin-left: 4px; }
.endur-meta { text-align: right; }

.endur-split { margin-top: 14px; }
.es-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06); }
.es-easy { background: var(--good); }
.es-hard { background: var(--gold); }
.es-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-mute); margin-top: 6px; }

.endur-warn {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  border: 1px solid;
}
.endur-warn.bad  { color: var(--bad);  border-color: var(--bad);  background: rgba(255,93,108,0.08); }
.endur-warn.warn { color: var(--gold); border-color: var(--gold); background: rgba(255,206,0,0.07); }
.endurance-locked .sys-window-title { color: var(--gold); }

.run-list { display: flex; flex-direction: column; gap: 8px; }
.run-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.run-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; width: 64px; flex-shrink: 0; }
.run-main { flex: 1; min-width: 0; }
.run-dist { font-size: 15px; font-weight: 700; }
.run-sub { font-size: 11px; color: var(--text-mute); margin-top: 1px; }
.run-pace { font-size: 14px; font-weight: 700; flex-shrink: 0; }

.race-card { display: flex; align-items: center; gap: 14px; border-color: rgba(255,206,0,0.45) !important; margin-bottom: 8px; }
.race-medal { font-size: 32px; flex-shrink: 0; }
.race-title { font-size: 13px; font-weight: 800; color: var(--gold); letter-spacing: .04em; }
.race-stats { font-size: 12px; color: var(--text-mute); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ═══ ASCENSION MAP (Module D) ═══ */
.asc-summary { display: flex; align-items: center; gap: 14px; }
.asc-rank { font-family: var(--font-display, sans-serif); font-size: 48px; font-weight: 800; line-height: 1; flex-shrink: 0; }
.asc-gates { font-size: 13px; font-weight: 700; }
.asc-proj { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.5; }

.asc-timeline { margin-top: 18px; position: relative; }
.asc-phase { display: flex; gap: 12px; align-items: stretch; }
.asc-rail { position: relative; width: 34px; flex-shrink: 0; display: flex; justify-content: center; }
/* the connecting spine */
.asc-rail::before { content: ""; position: absolute; top: 0; bottom: -16px; width: 2px; background: var(--border-strong); }
.asc-phase:last-child .asc-rail::before { bottom: 50%; }
.asc-node {
  position: relative; z-index: 1; margin-top: 2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); border: 2px solid var(--border-strong);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.asc-phase.active .asc-node { box-shadow: 0 0 16px var(--accent); }
.asc-pcard {
  flex: 1; min-width: 0; margin-bottom: 16px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
}
.asc-phase.active .asc-pcard { border-color: var(--accent); box-shadow: 0 0 18px rgba(77,204,255,0.12); }
.asc-phase.future .asc-pcard { opacity: 0.62; }
.asc-phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asc-pname { font-size: 15px; font-weight: 800; }
.asc-pbadge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border: 1px solid; border-radius: 999px; padding: 2px 8px; }
.asc-pmeta { font-size: 10.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }

.boss { margin-top: 12px; }
.boss-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.boss-name { font-size: 13px; font-weight: 700; }
.boss-pct { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.boss.cleared .boss-name { color: var(--good); }
.boss-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.bp {
  font-size: 11px; color: var(--text-mute);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px 7px; font-variant-numeric: tabular-nums;
}
.bp.done { color: var(--good); border-color: rgba(76,224,168,0.4); }
.bp b { color: var(--text); font-weight: 700; }
.bp.done b { color: var(--good); }
.boss-clear { margin-top: 8px; font-size: 11px; font-weight: 800; color: var(--good); letter-spacing: .1em; }

/* ═══ AI COACH weekly debrief (Module E) ═══ */
.coach-assess { font-size: 13px; line-height: 1.55; margin: 8px 0 12px; }
.coach-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.coach-row:first-of-type { border-top: none; }
.coach-k { flex: 0 0 92px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); padding-top: 1px; }
.coach-v { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; }
.coach-loading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-mute); padding: 12px 0; }
.coach-spinner {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: coachSpin 0.7s linear infinite;
}
@keyframes coachSpin { to { transform: rotate(360deg); } }

/* ═══ CONNECTIONS — wearables & health ═══ */
.conn-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.conn-card { border-left: 3px solid var(--kc, var(--accent)); }
.conn-head { display: flex; gap: 12px; align-items: flex-start; }
.conn-ic {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  border: 1px solid;
}
.conn-name { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.conn-blurb { font-size: 12px; color: var(--text); opacity: .85; margin-top: 2px; }
.conn-provides { font-size: 10.5px; color: var(--text-mute); text-transform: capitalize; margin-top: 3px; }
.conn-status { font-size: 11.5px; color: var(--good); margin-top: 12px; font-weight: 600; }
.conn-actions { display: flex; gap: 8px; margin-top: 8px; }
.conn-actions .btn { flex: 1; }
.conn-reason { font-size: 11px; color: var(--text-mute); margin-top: 6px; text-align: center; }
