/* ZeroAge — original site skin
   bg #060a0f · accent #00ff9d · Playfair + DM Mono + Instrument Sans
   STACK handoff: #00e5cc / deep navy panels
   Longevity product — not BTC chrome, not SAGE DNA emerald-muted alone
*/
:root {
  --za-bg: #060a0f;
  --za-surface: #0a1218;
  --za-card: #0c1620;
  --za-elevated: #101c28;
  --za-hover: #142230;
  --za-border: rgba(255, 255, 255, 0.06);
  --za-border-hover: rgba(255, 255, 255, 0.11);
  --za-primary: #00ff9d;
  --za-primary-dim: rgba(0, 255, 157, 0.45);
  --za-primary-ghost: rgba(0, 255, 157, 0.08);
  --za-cyan: #00e5cc;
  --za-amber: #D4915E;
  --za-amber-ghost: rgba(212, 145, 94, 0.08);
  --za-red: #C45C5C;
  --za-red-ghost: rgba(196, 92, 92, 0.08);
  --za-violet: #8B7EC8;
  --za-text: #E8E8ED;
  --za-text-soft: #A0A0B0;
  --za-text-dim: #5C5C6E;
  --za-ink: #04140f;
  --za-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --za-font: "Instrument Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --za-mono: "DM Mono", "SF Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --top-h: 64px;
  --glow: 0 0 18px rgba(0, 255, 157, 0.28);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--za-bg); color: var(--za-text); font-family: var(--za-font); min-height: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(0, 255, 157, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(0, 229, 204, 0.05), transparent 46%),
    var(--za-bg);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: calc(var(--nav-h) + 36px); background: transparent; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; height: var(--top-h); background: rgba(6,10,15,0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--za-border); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background-image: url('icons/icon.svg'); background-size: cover; background-position: center; background-repeat: no-repeat; background-color: #0c1620; box-shadow: var(--glow); }
.brand-name { font-family: var(--za-display); font-weight: 600; letter-spacing: -0.02em; font-size: 20px; }
.brand-sub { font-family: var(--za-mono); font-size: 10px; color: var(--za-text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.xp-pill { font-family: var(--za-mono); font-size: 11px; padding: 6px 10px; border-radius: 999px; background: var(--za-primary-ghost); color: var(--za-primary); border: 1px solid rgba(0,255,157,0.28); }
.view { display: none; padding: 16px; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(480px, 100%); height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(10,18,24,0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--za-border); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--za-text-dim); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; font-family: var(--za-mono); text-transform: uppercase; }
.nav-btn .nav-ico { font-size: 16px; line-height: 1; font-family: var(--za-display); font-weight: 600; text-transform: none; }
.nav-btn.active { color: var(--za-primary); }
.app-footer { text-align: center; font-size: 10px; color: var(--za-text-dim); padding: 8px 16px 12px; letter-spacing: 0.08em; font-family: var(--za-mono); text-transform: uppercase; }
.card { background: var(--za-card); border: 1px solid var(--za-border); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card.elevated { background: var(--za-elevated); box-shadow: 0 0 0 1px rgba(0,255,157,0.08); }
.card.navy { background: linear-gradient(180deg, #101c28, #0c1620); }
.card h3 { margin: 0 0 10px; font-size: 11px; font-weight: 500; color: var(--za-cyan); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--za-mono); }
.headline { font-family: var(--za-display); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.22; margin: 0 0 12px; }
.headline span { color: var(--za-primary); font-style: italic; font-weight: 500; }
.fact-kicker { color: var(--za-accent, #00ff9d) !important; letter-spacing: 0.14em; }
.mantra { font-family: var(--za-display); font-style: italic; font-size: 22px; line-height: 1.35; margin: 0 0 8px; letter-spacing: -0.02em; }
.mantra-body { color: var(--za-text-soft); font-size: 14px; line-height: 1.55; margin: 0 0 16px; }
.kicker { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--za-primary); margin: 0 0 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat { background: var(--za-elevated); border-radius: 14px; padding: 14px; border: 1px solid var(--za-border); }
.stat .label { font-size: 10px; color: var(--za-text-dim); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--za-mono); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .value.mono { font-family: var(--za-mono); font-size: 16px; font-weight: 500; }
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { width: 96px; height: 96px; position: relative; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center strong { font-family: var(--za-display); font-size: 20px; font-weight: 600; display: block; }
.ring-center span { font-size: 10px; color: var(--za-text-dim); font-family: var(--za-mono); letter-spacing: 0.04em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 16px; border-radius: 12px; font-weight: 650; font-size: 14px; transition: 0.15s ease; }
.btn-primary { background: var(--za-primary); color: var(--za-ink); width: 100%; box-shadow: var(--glow); }
.btn-primary:active { transform: scale(0.98); filter: brightness(1.05); }
.btn-ghost { background: var(--za-primary-ghost); color: var(--za-primary); border: 1px solid rgba(0,255,157,0.22); width: 100%; }
.btn-amber { background: var(--za-amber-ghost); color: var(--za-amber); border: 1px solid rgba(212,145,94,0.25); }
.btn-sm { min-height: 40px; padding: 8px 12px; font-size: 13px; width: auto; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 14px; border-radius: 999px; background: var(--za-elevated); border: 1px solid var(--za-border); color: var(--za-text-soft); font-size: 13px; font-weight: 600; min-height: 44px; }
.chip.active { background: var(--za-primary-ghost); border-color: rgba(0,255,157,0.45); color: var(--za-primary); }
.chip.cheese { border-color: rgba(212,145,94,0.3); }
.chip.cheese.active { background: var(--za-amber-ghost); color: var(--za-amber); border-color: rgba(212,145,94,0.45); }
.chip.fish.active { background: rgba(0,229,204,0.12); color: var(--za-cyan); }
.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--za-border); }
.ex-list li:last-child { border-bottom: none; }
.ex-check { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--za-text-dim); flex-shrink: 0; display: grid; place-items: center; margin-top: 2px; transition: 0.15s; }
.ex-check.done { background: var(--za-primary); border-color: var(--za-primary); color: var(--za-ink); }
.ex-title { font-weight: 600; font-size: 14px; }
.ex-meta { font-size: 12px; color: var(--za-text-dim); margin-top: 2px; font-family: var(--za-mono); }
.mood-row { display: flex; gap: 8px; }
.mood-btn { flex: 1; min-height: 52px; border-radius: 12px; background: var(--za-elevated); border: 1px solid var(--za-border); font-size: 18px; font-weight: 800; color: var(--za-text-soft); }
.mood-btn.active { background: var(--za-primary-ghost); border-color: var(--za-primary); color: var(--za-primary); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11px; color: var(--za-text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; font-family: var(--za-mono); }
.field input, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; background: var(--za-elevated); border: 1px solid var(--za-border); outline: none; }
.field input:focus { border-color: rgba(0,255,157,0.55); box-shadow: 0 0 0 3px rgba(0,255,157,0.12); }
.chart-box { position: relative; height: 200px; }
.vault-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vault-card { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; border: 1px solid var(--za-border); background: var(--za-elevated); }
.vault-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vault-card.locked img { filter: blur(14px) saturate(0.4) brightness(0.45); transform: scale(1.08); }
.vault-card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(6,10,15,0.92) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; }
.vault-card.locked .veil { background: linear-gradient(180deg, rgba(6,10,15,0.35), rgba(6,10,15,0.92)); }
.vault-card .v-title { font-family: var(--za-display); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.vault-card .v-cond { font-size: 11px; color: var(--za-text-soft); margin-top: 4px; line-height: 1.35; }
.vault-card .lock-badge { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(6,10,15,0.7); display: grid; place-items: center; font-size: 12px; border: 1px solid var(--za-border); z-index: 3; }
.vault-card.unlocked .lock-badge { background: rgba(0,255,157,0.9); color: var(--za-ink); }
.vault-card.placeholder .ph { position: absolute; inset: 0; background: linear-gradient(145deg, #101c28, #060a0f 40%, rgba(0,255,157,0.18)); display: flex; align-items: flex-end; padding: 12px; }
.scenario { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 12px; background: var(--za-elevated); border: 1px solid var(--za-border); margin-bottom: 8px; }
.scenario strong { color: var(--za-cyan); font-family: var(--za-mono); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); transform: translateX(-50%) translateY(20px); max-width: min(420px, calc(100% - 32px)); background: var(--za-elevated); border: 1px solid rgba(0,255,157,0.4); color: var(--za-text); padding: 14px 18px; border-radius: 14px; z-index: 50; opacity: 0; transition: 0.25s ease; box-shadow: 0 12px 40px rgba(0,0,0,0.45); font-weight: 600; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.modal-card { position: relative; width: min(440px, calc(100vw - 24px)); background: var(--za-card); border: 1px solid rgba(0,255,157,0.28); border-radius: 20px; padding: 20px; z-index: 1; max-height: 85dvh; overflow-y: auto; overflow-x: hidden; box-sizing: border-box; }
.modal-x { position: absolute; top: 10px; right: 12px; font-size: 24px; color: var(--za-text-dim); width: 36px; height: 36px; }
.modal-card img { width: 100%; border-radius: 12px; margin-bottom: 12px; }
.tag { display: inline-block; font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--za-primary-ghost); color: var(--za-primary); font-family: var(--za-mono); }
.tag.warn { background: var(--za-amber-ghost); color: var(--za-amber); }
.tag.bad { background: var(--za-red-ghost); color: var(--za-red); }
.tag.dim { background: rgba(255,255,255,0.04); color: var(--za-text-dim); }
.muted { color: var(--za-text-soft); font-size: 13px; line-height: 1.5; }
.rule { padding: 10px 0; border-bottom: 1px solid var(--za-border); font-size: 13px; color: var(--za-text-soft); }
.rule:last-child { border-bottom: none; }
.rule strong { color: var(--za-text); }
.seg { display: flex; gap: 6px; background: var(--za-surface); padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 40px; border-radius: 10px; font-weight: 650; font-size: 12px; color: var(--za-text-dim); font-family: var(--za-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.seg button.active { background: var(--za-elevated); color: var(--za-text); }
.surplus-bar { height: 8px; border-radius: 999px; background: var(--za-surface); overflow: hidden; margin-top: 8px; }
.surplus-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--za-primary), var(--za-cyan)); border-radius: 999px; }
.streak-flame { color: var(--za-amber); }
.tabs-note { font-size: 12px; color: var(--za-text-dim); margin: -4px 0 12px; }

/* Map */
.map-track { display: flex; flex-direction: column; gap: 0; }
.map-lane { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--za-text-dim); padding: 12px 8px 6px; }
.map-lane.core { color: var(--za-primary); }
.map-lane.side { color: var(--za-text-dim); }
.map-lane.vision { color: var(--za-cyan); }
.map-node { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; opacity: 0.42; }
.map-node.unlocked { opacity: 1; }
.map-node.active { background: var(--za-primary-ghost); border: 1px solid rgba(0,255,157,0.25); }
.map-node.side { padding-left: 18px; }
.map-node.vision { border: 1px dashed rgba(0,229,204,0.28); }
.map-orb { width: 44px; height: 44px; border-radius: 50%; background: var(--za-elevated); border: 2px solid var(--za-border); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; color: var(--za-primary); font-family: var(--za-display); }
.map-node.unlocked .map-orb { border-color: var(--za-primary); box-shadow: var(--glow); }
.map-node.active .map-orb { background: rgba(0,255,157,0.16); }
.map-node.side .map-orb { width: 34px; height: 34px; font-size: 13px; }
.map-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map-label strong { font-size: 14px; font-weight: 650; }
.map-label span { font-size: 12px; color: var(--za-text-dim); }
.map-label .mono { font-family: var(--za-mono); font-size: 11px; color: var(--za-cyan); }
.map-path { width: 2px; height: 10px; background: var(--za-border); margin-left: 29px; }
.map-path.side { margin-left: 34px; height: 8px; }

/* Foil cards */
.foil-card { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); background: #0c1620; }
.foil-card .foil-shine { pointer-events: none; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.14) 48%, transparent 60%); mix-blend-mode: screen; animation: shine 2.4s ease infinite; z-index: 2; }
@keyframes shine { 0%,100% { transform: translateX(-40%); opacity: 0.2; } 50% { transform: translateX(40%); opacity: 0.55; } }
.foil-art { aspect-ratio: 3/4; background: linear-gradient(160deg, #101c28, #060a0f); display: grid; place-items: center; }
.foil-art img { width: 100%; height: 100%; object-fit: cover; }
.foil-art.missing::after { content: 'FOIL DROP'; font-weight: 700; letter-spacing: 0.12em; color: var(--za-text-dim); font-family: var(--za-mono); font-size: 11px; }
.foil-meta { padding: 12px 14px 16px; position: relative; z-index: 3; }
.foil-rarity { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--za-amber); font-family: var(--za-mono); }
.foil-title { font-family: var(--za-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.foil-sub { color: var(--za-text-soft); font-size: 13px; }
.rarity-common .foil-rarity { color: var(--za-text-soft); }
.rarity-rare .foil-rarity { color: var(--za-cyan); }
.rarity-epic .foil-rarity { color: var(--za-violet); }
.rarity-legendary .foil-rarity, .rarity-ultra .foil-rarity { color: var(--za-amber); }
.foil-gold { box-shadow: 0 0 0 1px rgba(212,145,94,0.35), 0 8px 28px rgba(212,145,94,0.12); }
.foil-emerald { box-shadow: 0 0 0 1px rgba(0,255,157,0.35), 0 8px 28px rgba(0,255,157,0.12); }
.foil-cyan { box-shadow: 0 0 0 1px rgba(0,229,204,0.35); }
.foil-violet { box-shadow: 0 0 0 1px rgba(139,126,200,0.4); }
.foil-amber { box-shadow: 0 0 0 1px rgba(212,145,94,0.4); }
.pack-open .foil-card { animation: packPop 0.55s cubic-bezier(.2,1.2,.3,1); }
@keyframes packPop { from { transform: scale(0.7) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.vault-card .foil-shine { opacity: 0.35; }
.vault-card.unlocked .foil-shine { opacity: 0.7; }
.bar-row { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.bar-col .bar { width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--za-cyan), var(--za-primary)); min-height: 4px; }
.bar-col span { font-size: 10px; color: var(--za-text-dim); font-family: var(--za-mono); }
.spark { display: block; }

/* Tiny BTC chip — Stack Sats node/card only */
.mp-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--za-mono); font-size: 10px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(0,229,204,0.22); color: var(--za-text-soft); background: rgba(0,229,204,0.06); margin-top: 4px; width: fit-content; }
.mp-chip strong { color: var(--za-cyan); font-weight: 500; }
.market-pulse.compact { background: transparent; border: 0; padding: 0; }

/* Morning quests */
.quest-list { list-style: none; margin: 0; padding: 0; }
.quest-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--za-border); }
.quest-item:last-child { border-bottom: none; }
.quest-item .q-body { flex: 1; min-width: 0; }
.quest-item .q-title { font-weight: 650; font-size: 14px; }
.quest-item .q-sub { font-size: 12px; color: var(--za-text-dim); margin-top: 2px; }
.quest-item.done .q-title { color: var(--za-primary); }
.inline-row { display: flex; gap: 8px; margin-top: 8px; }
.inline-row input { flex: 1; min-height: 42px; padding: 8px 12px; border-radius: 10px; background: var(--za-surface); border: 1px solid var(--za-border); }
.bonus-note { margin-top: 10px; font-family: var(--za-mono); font-size: 11px; color: var(--za-primary); letter-spacing: 0.04em; }

/* Forest recap + incentives + profile */
.forest p { margin: 0 0 8px; }
.incentive { padding: 12px 0; border-bottom: 1px solid var(--za-border); }
.incentive:last-child { border-bottom: none; }
.incentive .i-k { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--za-cyan); margin-bottom: 4px; }
.incentive p { margin: 0; font-size: 13px; color: var(--za-text-soft); line-height: 1.5; }
.profile-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--za-border); font-size: 13px; }
.profile-row:last-child { border-bottom: none; }
.profile-row strong { font-weight: 650; }
.profile-row span { color: var(--za-text-dim); text-align: right; font-size: 12px; }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 10px; border-radius: 10px; background: var(--za-elevated); border: 1px solid var(--za-border); font-size: 12px; text-align: left; width: 100%; color: inherit; }
.inv-item.on { border-color: rgba(0,255,157,0.4); background: var(--za-primary-ghost); color: var(--za-primary); }
.inv-item .qty { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--za-text-dim); white-space: nowrap; }
.inv-item.on .qty { color: rgba(0,255,157,0.85); }
.inv-item.burned, .inv-item.empty { opacity: 0.55; border-color: rgba(196,92,92,0.35); }
.inv-item.burned .qty { color: #C45C5C; }
.inv-row { display: flex; align-items: stretch; gap: 6px; }
.inv-row .inv-item { flex: 1; }
.inv-restock { flex: 0 0 36px; min-height: 44px; border-radius: 10px; border: 1px dashed rgba(0,229,204,0.35); background: transparent; color: var(--za-cyan); font-size: 18px; line-height: 1; }
.inv-restock:active { background: rgba(0,229,204,0.12); }
.growth-meter .growth-bar { height: 10px; border-radius: 999px; background: var(--za-surface); overflow: hidden; margin: 10px 0 8px; }
.growth-meter .growth-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--za-primary), var(--za-cyan), #8B7EC8); }
.growth-meter .growth-score { font-size: 22px; font-weight: 700; color: var(--za-primary); }
.growth-meter .growth-score span { font-size: 12px; color: var(--za-text-dim); font-weight: 500; margin-left: 4px; }
.growth-meter .growth-parts { margin: 6px 0 0; font-size: 12px; }
.empty { text-align: left; padding: 8px 0; }
.empty .fact-kicker { color: var(--za-accent, #00ff9d) !important; letter-spacing: 0.14em; }
.mantra { font-size: 18px; }

/* Onboarding */
.onboard { position: fixed; inset: 0; z-index: 80; background: rgba(6,10,15,0.96); display: grid; place-items: center; padding: 28px 20px; }
.onboard[hidden] { display: none; }
.onboard-inner { max-width: 420px; width: 100%; }
.onboard-inner .kicker { margin-bottom: 12px; }
.onboard-inner .fact-kicker { color: var(--za-accent, #00ff9d) !important; letter-spacing: 0.14em; }
.mantra { font-size: 28px; }
.onboard-steps { margin: 18px 0 22px; }
.onboard-steps .rule { font-size: 14px; }

.reward-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--za-border); }
.reward-row label { font-size: 12px; color: var(--za-text-soft); }
.reward-row input { min-height: 42px; padding: 8px 12px; border-radius: 10px; background: var(--za-elevated); border: 1px solid var(--za-border); }


/* Exercise profile cards */
.ex-info { flex: 1; min-width: 0; text-align: left; padding: 0; background: none; border: none; color: inherit; cursor: pointer; }
.ex-info:active { opacity: 0.85; }
.ex-info .ex-meta { color: var(--za-cyan); }
.ex-profile {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 0;
  padding-right: 28px;
  box-sizing: border-box;
}
.ex-profile-head { margin-bottom: 10px; }
.ex-profile-name {
  font-family: var(--za-display);
  font-size: clamp(18px, 5.2vw, 24px);
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ex-aka { font-family: var(--za-mono); font-size: 11px; color: var(--za-cyan); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
.ex-diagram-wrap { margin: 0 0 14px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,255,157,0.22); background: #060a0f; }
.ex-diagram { display: block; width: 100%; height: auto; max-height: 160px; }
.ex-profile h3 { margin: 14px 0 6px; font-size: 11px; font-weight: 500; color: var(--za-cyan); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--za-mono); }
.body-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.body-pill { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--za-primary-ghost); color: var(--za-primary); border: 1px solid rgba(0,255,157,0.28); }
.act-chip { font-size: 12px; min-height: 36px; padding: 8px 12px; background: rgba(0,229,204,0.08); border-color: rgba(0,229,204,0.28); color: var(--za-cyan); }
.ex-cues { margin: 0; padding-left: 18px; color: var(--za-text-soft); font-size: 13px; line-height: 1.55; }
.ex-cues li { margin-bottom: 4px; }


/* Contests · NPC rivals */
.contest-banner { border-color: rgba(0,255,157,0.22); box-shadow: 0 0 0 1px rgba(0,255,157,0.06), 0 12px 40px rgba(0,0,0,0.25); }
.contest-banner-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.contest-title { font-family: var(--za-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 2px; }
.contest-idle h3 { margin-bottom: 6px; }
.contest-bars { display: flex; flex-direction: column; gap: 8px; }
.cbar-row { display: grid; grid-template-columns: 72px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; color: var(--za-text-soft); }
.cbar-row strong { text-align: right; color: var(--za-primary); }
.surplus-bar.npc i { background: linear-gradient(90deg, #00e5cc, #8B7EC8); }
.quest-list.compact { margin: 0; }
.quest-list.compact .quest-item { padding: 8px 0; }
.contest-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin: 14px 0; }
.npc-card { background: var(--za-elevated); border: 1px solid var(--za-border); border-radius: 14px; padding: 12px; text-align: center; }
.npc-card.you { border-color: rgba(0,255,157,0.28); }
.npc-avatar { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 8px; display: grid; place-items: center; font-family: var(--za-display); font-weight: 600; font-size: 18px; background: #060a0f; color: var(--za-cyan); border: 1px solid rgba(0,229,204,0.35); }
.npc-avatar.you { color: var(--za-ink); background: linear-gradient(135deg, var(--za-primary), var(--za-cyan)); border: none; }
.npc-avatar[data-npc="cipher"] { color: #00e5cc; }
.npc-avatar[data-npc="nova"] { color: #D4915E; }
.npc-avatar[data-npc="morrow"] { color: #8B7EC8; }
.npc-avatar[data-npc="sable"] { color: #A0A0B0; }
.npc-name { font-family: var(--za-display); font-weight: 600; font-size: 15px; }
.npc-tag { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--za-cyan); margin: 4px 0 6px; }
.npc-blurb { font-size: 12px; line-height: 1.45; margin: 0; }
.vs-pill { align-self: center; font-family: var(--za-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--za-primary); padding: 6px 8px; border-radius: 999px; border: 1px solid rgba(0,255,157,0.28); background: var(--za-primary-ghost); }
.contest-meta { font-size: 11px; color: var(--za-text-dim); margin: 0 0 14px; letter-spacing: 0.04em; }
.contest-scoreline { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin: 12px 0; font-size: 15px; }
.contest-scoreline strong { color: var(--za-primary); font-family: var(--za-mono); font-size: 20px; }
.contest-pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.contest-pick { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--za-elevated); border: 1px solid var(--za-border); color: inherit; }
.contest-pick:active { border-color: rgba(0,255,157,0.4); background: var(--za-primary-ghost); }
.cp-name { font-family: var(--za-display); font-weight: 600; font-size: 16px; }
.cp-meta { font-size: 10px; color: var(--za-cyan); margin: 2px 0 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.cp-blurb { font-size: 12px; margin: 0; line-height: 1.4; }
.contest-hist { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--za-border); font-size: 12px; color: var(--za-text-soft); }
.contest-hist strong.win { color: var(--za-primary); }
.contest-hist strong.lose { color: var(--za-amber); }
.contest-hist strong.tie { color: var(--za-cyan); }
@media (max-width: 380px) {
  .contest-vs { grid-template-columns: 1fr; }
  .vs-pill { justify-self: center; }
}

/* Gear art + dose / how-to exercise cards */
.ex-form-visual,
.ex-gear-wrap {
  width: 100%;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,255,157,0.22);
  background: #060a0f;
  aspect-ratio: 4 / 3;
  max-height: min(280px, 40vh);
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.ex-gear {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(280px, 40vh);
  object-fit: contain;
  object-position: center;
}
.ex-dose {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: normal;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--za-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--za-ink);
  background: linear-gradient(135deg, var(--za-primary), var(--za-cyan));
  font-weight: 600;
  box-sizing: border-box;
}
.ex-section { margin: 0 0 4px; max-width: 100%; }
.ex-section h3 { margin: 14px 0 6px; }
.ex-howto {
  margin: 0;
  padding-left: 18px;
  color: var(--za-text-soft);
  font-size: 13px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}
.ex-howto li { margin-bottom: 4px; }
.chip-row,
.body-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}
.chip-row .chip,
.body-pills .body-pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.ex-coach {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,229,204,0.08);
  border: 1px solid rgba(0,229,204,0.28);
  color: var(--za-cyan);
  font-size: 13px;
  line-height: 1.5;
}

/* Day rhythm */
.day-rhythm { border-color: rgba(0,229,204,0.22); }
.day-rhythm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.day-rhythm-clock { font-size: 11px; color: var(--za-cyan); }
.day-rhythm-line {
  margin: 0;
  font-size: 14px;
  color: var(--za-text-soft);
  line-height: 1.45;
}
.fasting-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,255,157,0.08);
  border: 1px solid rgba(0,255,157,0.28);
  color: var(--za-primary);
  font-size: 13px;
  line-height: 1.45;
}
.diet-win-h {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--za-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--za-mono);
}
.win-chip .win-h {
  opacity: 0.7;
  font-size: 10px;
  margin-left: 4px;
}
.sleep-chips .chip {
  min-height: 36px;
  font-family: var(--za-mono);
  font-size: 12px;
}
.chip.coffee {
  border-color: rgba(212,145,94,0.45);
  color: #D4915E;
}

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.field textarea { width: 100%; min-height: 64px; resize: vertical; background: var(--za-surface); border: 1px solid var(--za-border); color: var(--za-text); border-radius: 10px; padding: 10px 12px; font-family: var(--za-sans); font-size: 14px; line-height: 1.4; }
.field textarea:focus { outline: none; border-color: rgba(0,255,157,0.4); }

.inv-pulse .pulse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.pulse-cell { background: var(--za-surface); border: 1px solid var(--za-border); border-radius: 10px; padding: 10px 8px; text-align: center; }
.pulse-k { font-family: var(--za-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--za-text-dim); }
.pulse-v { font-size: 18px; font-weight: 700; color: var(--za-primary); margin-top: 4px; }
.pulse-v span { font-size: 11px; color: var(--za-text-dim); font-weight: 500; }
.addsub { display: grid; gap: 12px; }
.addsub .i-k { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--za-cyan); margin-bottom: 4px; }
.inv-tools { display: flex; flex-direction: column; gap: 4px; }
.inv-adj { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--za-border); background: var(--za-surface); color: var(--za-text); font-size: 14px; line-height: 1; }
.inv-adj:active { border-color: var(--za-primary); color: var(--za-primary); }
@media (max-width: 400px) {
  .inv-pulse .pulse-grid { grid-template-columns: repeat(2, 1fr); }
}


/* Energy recursive vibe */
.vibe-recap { padding: 12px; border-radius: 14px; background: rgba(0,229,204,0.06); border: 1px solid rgba(0,229,204,0.18); margin-bottom: 14px; }
.vibe-recap .vr-title { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--za-cyan); margin: 0 0 8px; }
.vibe-recap .vr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vibe-recap .vr-cell { font-size: 13px; color: var(--za-text-soft); line-height: 1.4; }
.vibe-recap .vr-cell strong { color: var(--za-text); display: block; font-size: 15px; margin-top: 2px; }
.vibe-recap .vr-today { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--za-border); margin-top: 2px; }
.field .hint { font-size: 11px; color: var(--za-text-dim); margin: 4px 0 0; }
.team-scale .mood-btn { font-size: 14px; }
.flow-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 14px; }
.flow-steps .fs { font-family: var(--za-mono); font-size: 11px; padding: 8px 10px; border-radius: 10px; background: var(--za-elevated); border: 1px solid var(--za-border); color: var(--za-primary); }
.flow-steps .fs-arrow { color: var(--za-text-dim); font-size: 12px; }
.node-map { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.node-map .nm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--za-border); background: var(--za-elevated); font-size: 13px; }
.node-map .nm-row.current { border-color: rgba(0,255,157,0.45); background: var(--za-primary-ghost); box-shadow: 0 0 0 1px rgba(0,255,157,0.12); }
.node-map .nm-row .nm-xp { font-family: var(--za-mono); font-size: 11px; color: var(--za-cyan); white-space: nowrap; }
.cybio-stub .cy-line { margin: 0 0 8px; font-size: 13px; color: var(--za-text-soft); line-height: 1.45; }
.cybio-stub .cy-line strong { color: var(--za-text); }
.cybio-stub .cy-poc { font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--za-text-dim); margin: 10px 0 0; }

.alert-strip { border-color: rgba(0,255,157,0.35); }
.alerts-panel .chip-row { flex-wrap: wrap; gap: 8px; }


/* Workout load inputs + progressive overload */
.overload-guide { margin: 0 0 12px; border-color: rgba(0,255,157,0.22); }
.ex-list li.ex-row { flex-direction: column; align-items: stretch; gap: 8px; }
.ex-row-main { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.ex-load { width: 100%; padding-left: 40px; box-sizing: border-box; }
.ex-load-label { display: block; font-family: var(--za-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--za-cyan); margin: 0 0 4px; }
.ex-load-in {
  width: 100%;
  max-width: 160px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--za-elevated);
  border: 1px solid var(--za-border);
  color: var(--za-text);
  font-size: 14px;
  box-sizing: border-box;
}
.ex-bw-row { display: flex; align-items: center; gap: 8px; }
.ex-bw-tag {
  font-family: var(--za-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--za-primary-ghost);
  color: var(--za-primary);
  border: 1px solid rgba(0,255,157,0.28);
}
.ex-load-hint { font-size: 11px; color: var(--za-text-dim); margin: 6px 0 0; line-height: 1.35; max-width: 280px; }
.ex-pr { font-size: 11px; margin-top: 4px; }
.ex-band-chips { margin-top: 6px; }
.ex-band-chips .chip { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.ex-band-chips .chip.active { border-color: rgba(0,255,157,0.5); background: var(--za-primary-ghost); color: var(--za-primary); }

@media (max-width: 400px) {
  .modal-card { padding: 14px; width: min(440px, calc(100vw - 16px)); }
  .ex-profile { padding-right: 24px; }
  .ex-profile-name { font-size: clamp(16px, 5vw, 20px); }
  .ex-load { padding-left: 0; }
  .ex-form-visual,
  .ex-gear-wrap { aspect-ratio: 1 / 1; max-height: min(220px, 36vh); }
}


/* Branded export panel */
.export-panel select#export-section {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--za-elevated);
  border: 1px solid var(--za-border);
  color: var(--za-text);
  font-size: 14px;
}
.export-panel .chip.active {
  border-color: rgba(0,255,157,0.5);
  background: var(--za-primary-ghost);
  color: var(--za-primary);
}
.export-section-wrap[hidden] { display: none !important; }

/* Energy suggestions */
.suggest-card .suggest-label {
  font-family: var(--za-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--za-amber, #f59e0b);
  margin: 12px 0 6px;
}
.suggest-chip { border-color: rgba(245,158,11,0.35); }
.suggest-chip.stack { border-color: rgba(16,185,129,0.4); }
.suggest-accepted {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.suggest-accepted li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--za-elevated);
  border: 1px solid var(--za-border);
  font-size: 13px;
}

/* Sleep–wake history */
.sleep-card .sleep-chips .chip.active {
  border-color: rgba(0,255,157,0.5);
  background: var(--za-primary-ghost);
  color: var(--za-primary);
}
.sleep-history { margin-top: 12px; overflow-x: auto; }
.sleep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.sleep-table th,
.sleep-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--za-border);
}
.sleep-table th {
  font-family: var(--za-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--za-cyan);
}


/* —— Consumer flow UX (v18) —— */
.home-hero { border-color: rgba(0,255,157,0.35); box-shadow: 0 0 0 1px rgba(0,255,157,0.08); }
.home-hero.needs-entry { border-color: rgba(255,176,32,0.45); }
.hero-title { font-family: "Playfair Display", serif; font-size: clamp(22px, 5vw, 28px); margin: 4px 0 6px; line-height: 1.15; }
.hero-sub { margin: 0 0 14px; }
.hero-cta { width: 100%; }
.hero-secondary { margin-top: 12px; }
.hero-secondary .chip { font-size: 12px; }
.flow-strip { padding: 12px 14px; }
.flow-strip-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.flow-strip-count { font-size: 11px; color: var(--za-cyan, #00e5cc); }
.flow-check-row { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.flow-check {
  flex: 1 0 auto; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 6px; border-radius: 12px; border: 1px solid var(--za-border);
  background: rgba(255,255,255,0.02); color: var(--za-text); cursor: pointer;
}
.flow-check.done { border-color: rgba(0,255,157,0.45); background: var(--za-primary-ghost, rgba(0,255,157,0.08)); }
.flow-check .flow-dot { font-size: 12px; color: var(--za-primary, #00ff9d); font-weight: 700; }
.flow-check:not(.done) .flow-dot { color: var(--za-muted, #8b9aab); }
.flow-lab { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.empty-next { padding: 10px 0 4px; }
.toast { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.toast-msg { flex: 1 1 auto; }
.toast-next {
  border: 1px solid rgba(0,255,157,0.5); background: var(--za-primary-ghost, rgba(0,255,157,0.12));
  color: var(--za-primary, #00ff9d); font-weight: 700; font-size: 12px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
}


/* Age Pulse daily hero */
.age-pulse-hero { border-color: rgba(0,229,204,0.4); box-shadow: 0 0 0 1px rgba(0,255,157,0.1), 0 12px 40px rgba(0,0,0,0.35); }
.age-pulse-hero.compact { box-shadow: none; }
.age-pulse-top { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:4px; }
.age-conf { font-size:10px; color:var(--za-text-dim); letter-spacing:0.06em; text-transform:uppercase; }
.age-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 12px; }
.age-metric { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:10px 8px; text-align:center; }
.am-k { font-family:var(--za-mono); font-size:9px; letter-spacing:0.1em; text-transform:uppercase; color:var(--za-cyan,#00e5cc); margin-bottom:4px; }
.am-v { font-family:"Playfair Display",serif; font-size:clamp(22px,5vw,28px); font-weight:700; line-height:1; color:var(--za-text); }
.am-l { font-size:11px; color:var(--za-text-soft); margin-top:6px; line-height:1.35; }
.age-delta.lean-good { color:var(--za-primary,#00ff9d); font-weight:700; }
.age-delta.lean-bad { color:#C45C5C; font-weight:700; }
.age-delta.lean-flat { color:var(--za-amber,#D4915E); font-weight:700; }
.age-driver { font-size:13px; margin:0 0 10px; color:var(--za-text-soft); }
.home-hero-secondary { margin-top:10px; padding:12px 14px; }
.home-hero-secondary .hero-secondary-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.age-formula .rule { margin:8px 0; }
@media (max-width:420px) {
  .age-metrics { grid-template-columns:1fr; }
  .am-v { font-size:24px; }
}
