/* ============================================================
   ZENTRADE — DESIGN SYSTEM 2026
   Deep warm neutrals + single signature accent: "Radiance" gold.
   Calm, premium, editorial. Not a trading terminal.
   ============================================================ */
:root {
  --bg: #0B0B0E;
  --bg-deep: #070709;
  --surface-1: #101014;
  --surface-2: #16161B;
  --surface-3: #1D1D24;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --text: #F4F1EA;
  --text-2: #A9A295;
  --text-3: #89806F;
  --accent: #E7B355;
  --accent-hi: #F6D489;
  --accent-soft: rgba(231,179,85,0.13);
  --accent-line: rgba(231,179,85,0.32);
  --success: #93C0A2;
  --success-soft: rgba(147,192,162,0.13);
  --danger: #C96F5E;
  --danger-soft: rgba(201,111,94,0.13);
  --warning: #DCAA69;
  --warning-soft: rgba(220,170,105,0.12);
  --info: #7FA8C9;

  --r-xs: 10px;
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 34px;
  --r-pill: 999px;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-base: 340ms;
  --t-slow: 760ms;
  --t-ceremony: 1500ms;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 56px;
  --space-7: 88px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -12%, rgba(231,179,85,0.05), transparent 62%),
    radial-gradient(900px 500px at 85% 110%, rgba(120,140,200,0.04), transparent 60%),
    var(--bg);
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

::selection { background: var(--accent); color: #101014; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.hidden { display: none !important; }
/* Login / auth overlay */
#login-overlay { transition: opacity 0.35s ease, visibility 0.35s ease; }
#login-overlay.hidden-auth { opacity: 0; pointer-events: none; visibility: hidden; }
.login-btn-loading { opacity: 0.7; filter: grayscale(0.3); cursor: wait; }
.opacity-0 { opacity: 0; pointer-events: none; }

button { font-family: inherit; cursor: pointer; color: inherit; }
textarea, input, select { font-family: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-line); outline-offset: 3px;
}

/* ---------- LAYOUT ---------- */
main {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: 0 20px 130px; display: flex; flex-direction: column; gap: 0;
}

.glass-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* ---------- TYPOGRAPHY ---------- */

/* ---------- HERO / PROTAGONIST ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--space-7) 0 var(--space-6);
}
.hero-kicker {
  max-width: 460px; margin: 0 auto var(--space-5);
  font-size: 0.86rem; line-height: 1.65; color: var(--text-2);
}
.hero-kicker b { color: var(--accent-hi); font-weight: 500; }

.orb-wrap { position: relative; width: min(52vw, 240px); height: min(52vw, 240px); margin-bottom: var(--space-5); }
.orb {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(231,179,85,0.16), rgba(231,179,85,0.04) 45%, transparent 68%);
  display: grid; place-items: center;
}
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); transition: transform var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease); }
.orb-ring.r2 { inset: 11%; }
.orb-ring.r3 { inset: 22%; border-style: dashed; opacity: 0.7; }
.orb-core {
  width: 38%; height: 38%; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, var(--accent-hi), var(--accent) 58%, #b98a35 100%);
  box-shadow: 0 0 26px rgba(231,179,85,0.35), 0 0 70px rgba(231,179,85,0.12), inset 0 0 18px rgba(255,255,255,0.08);
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease), opacity var(--t-base) var(--ease);
}
.orb[data-state="empty"] .orb-core { opacity: 0.32; box-shadow: 0 0 16px rgba(231,179,85,0.12); }
.orb[data-state="empty"] .orb-ring { transform: scale(0.92); opacity: 0.5; }
.orb[data-state="checked"] .orb-core { transform: scale(0.82); opacity: 0.55; box-shadow: 0 0 12px rgba(127,168,201,0.2); }
.orb[data-state="checked"] .orb-ring.r2 { border-color: rgba(127,168,201,0.5); }
.orb[data-state="active"] .orb-ring { border-color: rgba(231,179,85,0.55); }
.orb[data-state="active"] .orb-ring.r2 { border-color: rgba(231,179,85,0.35); }
.orb.bloom { animation: orbBloom var(--t-ceremony) var(--ease); }
@keyframes orbBloom {
  0% { box-shadow: 0 0 0 0 rgba(231,179,85,0); }
  28% { box-shadow: 0 0 0 22px rgba(231,179,85,0);
         box-shadow: 0 0 54px 10px rgba(231,179,85,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(231,179,85,0); }
}

.hero-state { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--space-2); }
.hero-value { font-family: var(--mono); font-weight: 300; font-size: clamp(3.4rem, 13vw, 5.2rem); line-height: 1; margin: 0; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-caption { font-size: 0.82rem; color: var(--text-2); margin: var(--space-2) 0 0; }
.hero-meta {
  display: flex; justify-content: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-5);
}
.hero-meta-item {
  min-width: 118px; padding: var(--space-2) var(--space-3);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line); border-radius: var(--r-sm);
  display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden;
}
.hero-meta-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--accent-line), transparent); opacity: 0.6;
}
.meta-label { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.meta-value { font-family: var(--mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.meta-value.stat-positive { color: var(--success); }
.meta-value.long { font-size: 0.82rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- NOTIFICATION / EXTERNAL LAPSE PANELS ---------- */
.notification-panel, .external-lapse-panel {
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start;
  position: relative; overflow: hidden;
}
.notification-panel::before, .external-lapse-panel::before {
  content: ''; position: absolute; left: 0; top: var(--space-3); bottom: var(--space-3); width: 3px; border-radius: 999px;
}
.notification-panel::before { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.external-lapse-panel::before { background: linear-gradient(180deg, var(--warning), #A16A3A); }
.notification-copy, .external-lapse-copy { min-width: 0; }
.notification-title, .external-lapse-title {
  font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; color: var(--text); margin: 0 0 4px;
}
.notification-status, .external-lapse-description {
  font-size: 0.82rem; line-height: 1.6; color: var(--text-2); margin: 0;
}
.notification-btn, .external-lapse-btn {
  align-self: flex-start; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-hi); font-weight: 500; font-size: 0.85rem; transition: all var(--t-fast) var(--ease); cursor: pointer;
}
.notification-btn:hover, .external-lapse-btn:hover { background: var(--accent); color: #14100A; border-color: var(--accent); }
.notification-panel::after, .external-lapse-panel::after {
  content: ''; position: absolute; right: -20%; top: -30%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(231,179,85,0.08), transparent 70%); pointer-events: none;
}
/* ---------- COMPASS + PLANS ---------- */
.compass-card, .plans-card { padding: var(--space-5); }
.compass-header { display: flex; align-items: flex-start; gap: var(--space-3); }
.compass-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 32% 30%, rgba(231,179,85,0.28), rgba(231,179,85,0.06));
  border: 1px solid var(--accent-line);
  display: grid; place-items: center; font-size: 1.15rem;
}
.compass-header-text { flex: 1; min-width: 0; }
.compass-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.compass-preview { font-size: 1rem; color: var(--text); font-weight: 300; line-height: 1.6; margin: 0; font-style: italic; }
.compass-hint { font-size: 0.8rem; color: var(--text-3); margin: 0; line-height: 1.6; }
.compass-edit-box { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); }

.plans-list { display: flex; flex-direction: column; margin-top: var(--space-2); }
.plan-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line);
}
.plan-row:last-child { border-bottom: none; }
.plan-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plan-trigger-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.plan-action-text { font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.plan-action-text.plan-empty { color: var(--text-3); font-style: italic; }
.plan-edit-inline { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; }
.plan-edit-textarea {
  width: 100%; background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: var(--space-2) var(--space-3); color: var(--text); font-size: 0.88rem; resize: none; line-height: 1.55;
}
.plan-edit-actions { display: flex; gap: var(--space-3); }

.plan-callout {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--r-sm); padding: var(--space-3) var(--space-4);
}
.plan-callout-label { color: var(--accent-hi); font-weight: 500; font-size: 0.85rem; }
.plan-callout-text { color: var(--text); font-size: 0.9rem; }

/* ---------- ACTION LINK ---------- */
.action-link { background: none; border: none; padding: 0; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); transition: color var(--t-fast) var(--ease); }
.action-link.export:hover { color: var(--accent-hi); }
.action-link.import:hover { color: var(--text); }
.action-link.danger:hover { color: var(--danger); }

/* ---------- THE GATE (check-in ritual) ---------- */

.field-label { display: block; font-size: 0.86rem; font-weight: 500; color: #A9A295; margin: 0 0 var(--space-3); letter-spacing: -0.01em; }
/* Force visible questions / labels — never white / invisible */
.field-label, .context-label-row, .decision-gate-label, .intensity-row { color: #A9A295 !important; }
.form-step-header span { color: #A9A295; font-weight: 600; }
.form-step-header { color: #A9A295; }

.trigger-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.emotion-btn {
  padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent;
  color: var(--text-2); font-size: 0.84rem; font-weight: 400;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.emotion-btn:hover { border-color: var(--accent-line); color: var(--text); }
.emotion-btn.active {
  background: var(--accent); color: #14100A; border-color: transparent;
  box-shadow: 0 6px 24px rgba(231,179,85,0.25);
}

/* Step numbers desktop guard */
@media (min-width: 640px) {
  .form-step-header .step-num { background: var(--accent); color: #14100A !important; box-shadow: 0 2px 8px rgba(231,179,85,0.35); }
  .form-step-header.open .step-num { background: #F4F1EA; color: #14100A !important; }
}

/* Desktop guard: never white / invisible */
@media (min-width: 640px) {
  .emotion-btn { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
  .emotion-btn.active { background: var(--accent); color: #14100A; }
  .urgency-btn { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
  .urgency-btn.active { background: var(--accent); color: #14100A; }
}

.decision-gate-box {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.decision-gate-note { font-size: 0.78rem; color: var(--text-3); margin: -6px 0 0; line-height: 1.55; }
.gate-options { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.gate-option-label {
  flex: 1; min-width: 210px; display: flex; align-items: center; gap: 10px;
  padding: var(--space-3); background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); cursor: pointer; font-size: 0.85rem; color: var(--text-2);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.gate-option-label:hover { border-color: var(--accent-line); }
.gate-option-label:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.gate-option-label input[type="radio"] { accent-color: var(--accent); }
.gate-error { font-size: 0.8rem; color: var(--danger); margin: 0; }

.intensity-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.intensity-value, .intensity-chip { font-family: var(--mono); font-weight: 500; border-radius: var(--r-xs); }
.intensity-value { font-size: 1.3rem; padding: 2px 10px; letter-spacing: 0.01em; }
.intensity-chip { min-width: 2.1rem; height: 2.1rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.88rem; flex-shrink: 0; border: 1px solid transparent; }
.level-low  { color: var(--accent-hi); background: var(--accent-soft);  border-color: var(--accent-line); }
.level-mid  { color: var(--warning); background: var(--warning-soft); border-color: rgba(220,170,105,0.35); }
.level-high { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(201,111,94,0.4); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; cursor: pointer; height: 26px; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: var(--line-strong); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; height: 20px; width: 20px; margin-top: -8.5px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface-1); box-shadow: 0 0 0 1px var(--accent-line), 0 4px 14px rgba(231,179,85,0.3);
  transition: transform var(--t-fast) var(--ease);
}
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.25); }
input[type=range]::-moz-range-track { height: 3px; background: var(--line-strong); border-radius: 4px; }
input[type=range]::-moz-range-thumb { height: 16px; width: 16px; border-radius: 50%; border: 3px solid var(--surface-1); background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); }
.slider-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }

.context-box {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: var(--space-4); display: flex; flex-direction: column; gap: 4px;
}
.context-fields { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-2); }
@media (min-width: 640px) { .context-fields { grid-template-columns: repeat(3, 1fr); } }
.context-field { display: flex; flex-direction: column; gap: 6px; }
.context-field-label { color: var(--text-3); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; }

select.history-filter-select, .report-month {
  width: 100%; background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  padding: 10px 12px; font-size: 0.8rem;
}
select.history-filter-select:focus, .report-month:focus { outline: 2px solid var(--accent-line); outline-offset: 2px; border-color: transparent; }

.cbt-box { background: linear-gradient(180deg, var(--accent-soft), transparent); border: 1px solid var(--accent-line); padding: var(--space-4) var(--space-4) var(--space-5); border-radius: var(--r-md); animation: rise var(--t-base) var(--ease) both; }
.cbt-label { font-size: 0.9rem; font-weight: 600; color: var(--accent-hi); }
.cbt-hint { font-size: 0.84rem; color: var(--text-2); margin: 0 0 var(--space-3); line-height: 1.6; }
.cbt-hint em { font-style: italic; font-weight: 500; color: var(--text); }
.cbt-breathe-link { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-3); background: none; border: none; padding: 0; color: var(--accent-hi); font-size: 0.8rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cbt-breathe-link:hover { color: var(--text); }

textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); padding: var(--space-3); color: var(--text); font-size: 0.9rem; resize: none; line-height: 1.6;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea::placeholder { color: var(--text-3); }
textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }

.save-btn {
  position: relative; width: 100%; border: none; padding: 0; background: none; border-radius: var(--r-sm); overflow: hidden;
}
.save-btn-bg { position: absolute; inset: 0; background: linear-gradient(120deg, #ca9849, var(--accent), #e6c27c); opacity: 0.85; transition: opacity var(--t-fast) var(--ease); }
.save-btn:hover .save-btn-bg { opacity: 1; }
.save-btn-inner {
  position: relative; background: rgba(16,16,19,0.92); padding: calc(var(--space-3) + 2px) var(--space-4);
  border-radius: calc(var(--r-sm) - 1px); color: #fff; font-weight: 500; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.save-btn:hover .save-btn-inner { background: transparent; color: #14100A; }
.save-btn.ready { transform: translateZ(0); }

/* ---------- FIREWALL ---------- */
.firewall-section { padding: var(--space-5); border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-2); }
.firewall-header { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 1rem; }
.firewall-desc { font-size: 0.8rem; color: var(--text-3); margin-top: -2px; margin-bottom: var(--space-2); line-height: 1.5; }
.fw-check-item {
  display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3);
  background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--line);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.fw-check-item:hover { border-color: var(--line-strong); }
.fw-check-item input[type="checkbox"] {
  appearance: none; width: 20px; height: 20px; border: 2px solid var(--line-strong); margin-top: 1px;
  border-radius: 7px; background: transparent; cursor: pointer; position: relative; flex-shrink: 0;
  transition: all var(--t-fast) var(--ease);
}
.fw-check-item input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.fw-check-item input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #14100A; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fw-text { display: flex; flex-direction: column; }
.fw-title { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.fw-sub { font-size: 0.76rem; color: var(--text-3); margin-top: 2px; }

/* ---------- TREND ---------- */
.trend-panel { padding: var(--space-5); }
.trend-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.trend-title { font-size: 1.05rem; font-weight: 500; color: var(--text); margin: 0 0 4px; }
.trend-subtitle { font-size: 0.8rem; color: var(--text-3); margin: 0; line-height: 1.5; }
.trend-summary { font-size: 0.82rem; color: var(--accent-hi); margin: var(--space-3) 0 0; }
.trend-chart-wrap { position: relative; height: 240px; margin-top: var(--space-3); }
.trend-fallback { font-size: 0.8rem; color: var(--text-3); margin: var(--space-3) 0 0; }

/* ---------- HISTORY ---------- */
.history-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 2px; margin-bottom: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
.history-title { font-size: 1.15rem; font-weight: 400; color: var(--text); margin: 0; letter-spacing: -0.01em; }
.history-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.history-filters { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md); }
.history-filter-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 180px; }
.history-filter-label { color: var(--text-3); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }
.history-filter-summary { flex-basis: 100%; color: var(--text-3); font-size: 0.74rem; margin: 0; }
.report-actions { display: flex; align-items: flex-end; gap: var(--space-2); flex-wrap: wrap; margin-left: auto; }
.report-action-btn { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-2); border-radius: var(--r-xs); padding: 9px 14px; font-size: 0.76rem; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.report-action-btn:hover { border-color: var(--accent-line); color: var(--accent-hi); }

.history-list { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; padding-right: 4px; padding-bottom: var(--space-4); }
.empty-state { padding: var(--space-6) var(--space-4); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.empty-state p { color: var(--text-3); margin: 0; }

.log-card { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); border: 1px solid transparent; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; transition: background var(--t-fast) var(--ease); }
.log-card:hover { background: var(--surface-1); border-radius: var(--r-sm); }
.log-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.log-top-left { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.log-top-right { display: flex; align-items: center; gap: var(--space-2); }
.log-emotion-tag { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-hi); font-size: 0.74rem; font-weight: 500; padding: 4px 11px; border-radius: var(--r-pill); }
.log-date { color: var(--text-3); font-size: 0.74rem; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.log-delete { background: none; border: none; color: var(--text-3); font-size: 1.1rem; line-height: 1; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.log-delete:hover { color: var(--danger); background: var(--danger-soft); }
.log-notes { font-size: 0.9rem; color: var(--text); font-weight: 300; margin: 0; padding-left: 24px; }
.log-cbt-notes { font-size: 0.88rem; color: var(--text-2); font-weight: 300; font-style: italic; border-left: 2px solid var(--accent-line); padding-left: var(--space-3); margin: 0; }

.context-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 24px; }
.context-tag { font-size: 0.68rem; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-3); }
.context-tag.urgency { color: var(--warning); border-color: rgba(220,170,105,0.3); }

.intent-badge { display: inline-block; font-size: 0.62rem; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 6px; font-weight: 500; }
.intent-planned { background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-line); }
.intent-emotional { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(220,170,105,0.3); }
.intent-conflict { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(220,170,105,0.3); }
.protocol-bypassed { background: rgba(169,162,149,0.1); color: var(--text-2); border: 1px solid var(--line-strong); }
.protocol-interrupted { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(220,170,105,0.3); }
.external-lapse-badge { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(220,170,105,0.3); }

.audit-summary { font-size: 0.82rem; background: var(--success-soft); border: 1px solid rgba(147,192,162,0.25); padding: var(--space-2) var(--space-3); border-radius: var(--r-xs); color: var(--success); }
.audit-status-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; background: var(--warning-soft); border: 1px solid rgba(220,170,105,0.25); padding: var(--space-2) var(--space-3); border-radius: var(--r-xs); font-size: 0.76rem; color: var(--warning); }
.audit-btn-trigger { background: var(--warning); color: #14100A; border: none; padding: 5px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.7rem; }
.audit-pending-note { font-size: 0.76rem; color: var(--text-3); }

.outcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: 2px; }
.outcome-prompt { font-size: 0.78rem; color: var(--text-3); }
.outcome-btn { font-size: 0.76rem; font-weight: 500; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); transition: all var(--t-fast) var(--ease); }
.outcome-btn.resist:hover { border-color: rgba(147,192,162,0.5); color: var(--success); background: var(--success-soft); }
.outcome-btn.check:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-2); }
.outcome-badge { display: inline-flex; align-self: flex-start; font-size: 0.74rem; font-weight: 500; padding: 6px 12px; border-radius: var(--r-pill); }
.outcome-resisted { background: var(--success-soft); color: var(--success); border: 1px solid rgba(147,192,162,0.3); }
.outcome-checked { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-strong); }

/* ---------- TOOLTIP "i" ---------- */
.info-tip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; min-height: 24px; width: 1.4rem; height: 1.4rem; border-radius: 50%; padding: 2px; margin-left: 6px;
  border: 1px solid var(--accent-line); background: transparent;
  color: var(--accent); font-size: 0.62rem; font-weight: 600; line-height: 1;
  cursor: pointer; flex-shrink: 0; vertical-align: middle; font-family: inherit;
  text-transform: none; letter-spacing: normal;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.info-tip:hover, .info-tip:focus-visible, .info-tip[aria-expanded="true"] { background: var(--accent); color: #14100A; transform: scale(1.12); outline: none; }
.cbt-label-row, .compass-label-row, .plans-label-row, .gate-label-row, .context-label-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cbt-label-row { margin-bottom: var(--space-2); }
.cbt-label-row .cbt-label { margin: 0; }
.label-inline { display: flex; align-items: center; }

.zt-tooltip {
  position: fixed; z-index: 3000; max-width: 272px;
  background: #14141A; border: 1px solid var(--accent-line);
  border-radius: var(--r-sm); padding: var(--space-2) var(--space-3);
  font-size: 0.78rem; line-height: 1.6; color: var(--text-2);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  opacity: 0; transform: translateY(5px) scale(0.98); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.zt-tooltip.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---------- TOAST ---------- */
.zt-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 12px);
  background: rgba(20,20,26,0.94); border: 1px solid var(--accent-line);
  color: var(--accent-hi); padding: var(--space-2) var(--space-4); border-radius: var(--r-pill);
  font-size: 0.84rem; box-shadow: 0 14px 44px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  z-index: 2100; max-width: 90vw; text-align: center; font-weight: 400;
}
.zt-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.zt-toast.ceremony { border-color: var(--success); color: var(--success); }

/* ---------- BREATHE MODAL ---------- */
.breathe-modal, .crisis-modal, .audit-modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity var(--t-base) var(--ease); padding: var(--space-4);
}
.breathe-modal { background: rgba(8,8,10,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.crisis-modal { background: rgba(8,8,10,0.97); text-align: center; overflow-y: auto; }
.audit-modal { background: rgba(8,8,10,0.9); backdrop-filter: blur(10px); }

.breathe-circle-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 15rem; height: 15rem; margin-bottom: var(--space-6); }
.breathe-circle { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent-line); background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%); }
.breathe-text { font-size: 1.7rem; font-weight: 300; color: var(--text); z-index: 1; }
.breathe-text.phase-in { font-weight: 500; color: var(--accent-hi); }
.breathe-text.phase-hold { font-weight: 500; color: var(--success); }
.breathe-text.phase-out { font-weight: 500; color: var(--warning); }
.breathe-close-btn { padding: 10px 22px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: none; color: var(--text-2); font-size: 0.86rem; transition: all var(--t-fast) var(--ease); }
.breathe-close-btn:hover { border-color: var(--accent-line); color: var(--text); background: var(--surface-2); }

/* ---------- CRISIS MODAL ---------- */
.crisis-content { max-width: 31rem; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); animation: rise var(--t-base) var(--ease); margin: auto; }
.crisis-title { color: var(--text); font-size: 1.4rem; font-weight: 400; margin: 0; letter-spacing: -0.01em; }
.crisis-reason { font-size: 0.8rem; color: var(--warning); margin: 0; }
.crisis-text { color: var(--text-2); font-size: 0.94rem; line-height: 1.7; font-weight: 300; margin: 0; }
.crisis-compass { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-md); padding: var(--space-3) var(--space-4); max-width: 27rem; width: 100%; }
.crisis-compass-label { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-hi); margin: 0 0 6px; }
.crisis-compass-text { font-size: 0.95rem; color: var(--text); margin: 0; line-height: 1.6; font-style: italic; }
.crisis-timer { font-size: 3rem; font-weight: 300; color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; margin: var(--space-2) 0; }

.orb-breathe { position: relative; width: 8rem; height: 8rem; margin-bottom: var(--space-2); border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%); display: grid; place-items: center; }
.orb-breathe::after { content: ""; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: radial-gradient(circle at 35% 32%, var(--accent-hi), var(--accent)); box-shadow: 0 0 26px rgba(231,179,85,0.4); }
.animate-478 { animation: breathe478 19s linear infinite; }
@keyframes breathe478 {
  0%     { transform: scale(1); box-shadow: 0 0 0px rgba(231,179,85,0); }
  21.05% { transform: scale(1.5); box-shadow: 0 0 44px rgba(231,179,85,0.32); }
  57.89% { transform: scale(1.5); box-shadow: 0 0 44px rgba(147,192,162,0.28); }
  100%   { transform: scale(1); box-shadow: 0 0 0px rgba(246,212,137,0); }
}

.btn-surge {
  background: var(--accent); color: #14100A; font-size: 0.98rem; font-weight: 600; padding: 13px 30px;
  border-radius: var(--r-pill); border: none; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  box-shadow: 0 8px 30px rgba(231,179,85,0.22); cursor: pointer;
}
.btn-surge:hover { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(231,179,85,0.3); }
.btn-bypass { background: transparent; color: var(--text-3); font-size: 0.78rem; border: none; text-decoration: underline; transition: color var(--t-fast) var(--ease); }
.btn-bypass:hover { color: var(--text-2); }

.surfing-wave-wrap { position: relative; width: 190px; height: 190px; display: grid; place-items: center; margin-bottom: var(--space-2); }
.surfing-circle { position: absolute; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%); border: 1px solid var(--accent-line); animation: surgePulse 9s var(--ease) infinite; }
@keyframes surgePulse { 0%, 100% { transform: scale(0.8); opacity: 0.4; } 50% { transform: scale(1.45); opacity: 0.9; } }
.surfing-prompt { font-size: 1.05rem; font-weight: 400; color: var(--text); min-height: 4rem; transition: opacity 0.4s var(--ease); margin: 0; line-height: 1.6; }
.surfing-timer-el { color: var(--text-3); font-family: var(--mono); font-variant-numeric: tabular-nums; margin-top: var(--space-3); }

.rerating-box { background: var(--surface-1); padding: var(--space-5); border-radius: var(--r-lg); border: 1px solid var(--line-strong); width: 100%; }
.rerate-title { font-size: 1.3rem; color: var(--text); font-weight: 400; margin: 0 0 6px; }
.rerate-sub { color: var(--text-2); margin: 0 0 var(--space-4); line-height: 1.6; }

/* ---------- AUDIT MODAL ---------- */
.audit-box { background: #15151B; border: 1px solid var(--line-strong); padding: var(--space-5); border-radius: var(--r-lg); width: 100%; max-width: 34rem; display: flex; flex-direction: column; gap: var(--space-4); animation: rise var(--t-base) var(--ease); max-height: 90vh; overflow-y: auto; }
.audit-title { font-size: 1.2rem; font-weight: 500; color: var(--text); margin: 0; }
.audit-subtitle { font-size: 0.84rem; color: var(--text-2); margin: 6px 0 0; line-height: 1.6; }
.audit-question { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.audit-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.audit-pill { padding: 9px 15px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-2); font-size: 0.78rem; cursor: pointer; transition: all var(--t-fast) var(--ease); }
.audit-pill:hover { border-color: var(--accent-line); }
.audit-pill.selected { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hi); }

/* ---------- INFO METRICS MODAL ---------- */
.metrics-info-trigger {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0;
  color: var(--text-3); font: inherit; font-size: 0.72rem; letter-spacing: 0.04em; cursor: pointer;
  align-self: flex-start; transition: color var(--t-fast) var(--ease); margin: var(--space-4) 0 0;
}
.metrics-info-trigger:hover { color: var(--accent-hi); }
.metrics-info-trigger svg { width: 14px; height: 14px; }
.info-metrics-modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.9); backdrop-filter: blur(10px); transition: opacity var(--t-base) var(--ease); padding: var(--space-4);
}
.info-metrics-box {
  background: #15151B; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  width: 100%; max-width: 35rem; max-height: 85vh; display: flex; flex-direction: column;
  animation: rise var(--t-base) var(--ease);
}
.info-metrics-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5) 0; flex-shrink: 0; }
.info-metrics-header h3 { font-size: 1.05rem; font-weight: 500; color: var(--text); margin: 0; }
.info-metrics-close { background: none; border: none; color: var(--text-3); font-size: 1.2rem; line-height: 1; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all var(--t-fast) var(--ease); }
.info-metrics-close:hover { color: var(--text); background: var(--surface-2); }
.info-metrics-body { padding: var(--space-3) var(--space-5) var(--space-5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4); }
.metric-entry { display: flex; flex-direction: column; gap: 6px; }
.metric-entry-name { font-size: 0.9rem; font-weight: 500; color: var(--accent-hi); }
.metric-entry p { font-size: 0.82rem; color: var(--text-2); line-height: 1.65; margin: 0; }
.metric-entry strong { color: var(--text); font-weight: 500; }
.metric-entry em { font-style: italic; color: var(--accent-hi); }
.info-metrics-footer { padding: 0 var(--space-5) var(--space-4); flex-shrink: 0; }
.info-metrics-footer p { font-size: 0.72rem; color: var(--text-3); margin: 0; line-height: 1.5; }

/* ---------- FOCUS MODE ---------- */
.focus-banner {
  display: none; align-items: center; justify-content: center; gap: 10px;
  margin-top: var(--space-5); padding: var(--space-3);
  border: 1px dashed var(--accent-line); border-radius: var(--r-md);
  color: var(--accent-hi); font-size: 0.84rem; text-align: center; letter-spacing: 0.02em;
}
body.focus-mode .focus-banner { display: flex; }
body.focus-mode [data-focus-hidden] { display: none !important; }
body.focus-mode .hero { padding-top: var(--space-5); }

/* ---------- MOTION SYSTEM ---------- */
.rise { animation: rise var(--t-base) var(--ease) both; }
.rise-slow { animation: rise var(--t-slow) var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* staggered hero entrance */
.hero > * { opacity: 0; animation: rise var(--t-slow) var(--ease) forwards; }
.hero > *:nth-child(1) { animation-delay: 60ms; }
.hero > *:nth-child(2) { animation-delay: 160ms; }
.hero > *:nth-child(3) { animation-delay: 260ms; }
.hero > *:nth-child(4) { animation-delay: 360ms; }
.hero > *:nth-child(5) { animation-delay: 460ms; }

@media (prefers-reduced-motion: reduce) {
  .animate-478, .cbt-box, .crisis-content, .surfing-circle, .hero > *, .rise, .rise-slow { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}

@media (max-width: 399px) {
  .gate-option-label { min-width: 0; width: 100%; }
  .panel { padding: var(--space-4); }
}

/* ---------- APP HEADER / FOCUS MODE / HERO EXTRAS ---------- */
.app-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-5) 0 0; }
.app-title { font-size: 1.05rem; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text); margin: 0; }
.app-header-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

.breathe-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-2);
  font-size: 0.78rem; padding: 9px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.breathe-cta svg { width: 15px; height: 15px; }
.breathe-cta:hover { border-color: var(--accent-line); color: var(--accent-hi); }

.focus-mode-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-2);
  font-size: 0.78rem; padding: 9px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.focus-mode-btn svg { width: 15px; height: 15px; }
.focus-mode-btn:hover { border-color: var(--accent-line); color: var(--accent-hi); }
body.focus-mode .focus-mode-btn { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hi); }

.hero-plan-hint { font-size: 0.84rem; line-height: 1.6; color: var(--text-2); margin: var(--space-3) 0 0; max-width: 440px; }

/* Spaziatura e fluidità tra sezioni desktop */
main > section { margin-top: var(--space-6); }
main > section:first-of-type { margin-top: 0; }
.hero { padding-top: var(--space-7); padding-bottom: var(--space-6); }
.app-header { padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.external-lapse-panel, .notification-panel { margin-top: var(--space-4); }

/* ---------- SESSION TIMER ---------- */
.session-timer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); background: var(--surface-1);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-top: var(--space-3); flex-wrap: wrap; position: relative;
}
.session-timer-left { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex: 1; }
.session-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0;
}
.session-dot.active { background: var(--success); animation: sessionPulse 2s var(--ease) infinite; }
.session-dot.warning { background: var(--warning); }
@keyframes sessionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(147,192,162,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(147,192,162,0); }
}
.session-timer-label { font-size: 0.78rem; color: var(--text-2); white-space: nowrap; }
.session-timer-clock {
  font-family: var(--mono); font-size: 0.88rem; color: var(--text); font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.session-timer-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.session-timer-btn {
  padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font-size: 0.76rem; font-weight: 500;
  transition: all var(--t-fast) var(--ease); white-space: nowrap;
}
.session-timer-btn:hover { border-color: var(--accent-line); color: var(--accent-hi); }
.session-timer-btn.primary { background: var(--accent); color: #14100A; border-color: var(--accent); }
.session-timer-btn.primary:hover { background: var(--accent-hi); }
.session-timer-btn.danger { border-color: rgba(201,111,94,0.4); color: var(--danger); }
.session-timer-btn.danger:hover { background: var(--danger-soft); }
.session-progress { width: 100%; height: 3px; background: var(--line); border-radius: 4px; overflow: hidden; }
.session-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 1s linear; }
.session-settings {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  margin-top: var(--space-2);
}
.session-settings-title { font-size: 0.82rem; color: var(--text); font-weight: 500; margin: 0; }
.session-settings-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.session-settings-label {
  font-size: 0.7rem; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase;
  min-width: 80px;
}
.session-settings-input {
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  padding: 7px 10px; color: var(--text); font-family: var(--mono); font-size: 0.82rem;
}
.session-settings-input:focus { outline: 2px solid var(--accent-line); border-color: transparent; }
.session-settings-sep { color: var(--text-3); font-size: 0.82rem; }

/* ---------- GOAL PROGRESS ---------- */
.goal-section {
  margin-top: var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  width: 100%;
}
.goal-bar-wrap { width: 100%; max-width: 320px; }
.goal-bar { width: 100%; height: 6px; background: var(--line-strong); border-radius: var(--r-pill); overflow: hidden; }
.goal-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: var(--r-pill); transition: width var(--t-slow) var(--ease);
}
.goal-label { font-size: 0.78rem; color: var(--text-2); text-align: center; line-height: 1.5; }
.goal-label strong { color: var(--accent-hi); font-weight: 500; }
.goal-edit-trigger {
  background: none; border: none; padding: 0; font-size: 0.7rem; color: var(--text-3);
  cursor: pointer; transition: color var(--t-fast) var(--ease); text-decoration: underline;
  text-underline-offset: 2px;
}
.goal-edit-trigger:hover { color: var(--accent-hi); }
.goal-edit-panel {
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: var(--space-4); width: 100%; max-width: 360px; margin-top: var(--space-2);
}
.goal-edit-row { display: flex; align-items: center; gap: var(--space-2); }
.goal-edit-row label {
  font-size: 0.76rem; color: var(--text-3); min-width: 90px; white-space: nowrap;
}

/* ---------- QUICK CHECK-IN ---------- */
.quick-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi)); color: #14100A;
  border: none; box-shadow: 0 8px 30px rgba(231,179,85,0.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.quick-fab:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(231,179,85,0.4); }
.quick-fab:active { transform: scale(0.95); }
.quick-fab svg { width: 24px; height: 24px; }

.quick-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8,8,10,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity var(--t-base) var(--ease); padding: 0;
}
.quick-modal-box {
  background: var(--surface-1); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--space-5) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-4);
  animation: rise var(--t-base) var(--ease);
}
.quick-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
}
.quick-modal-title { font-size: 1.05rem; font-weight: 500; color: var(--text); margin: 0; }
.quick-modal-close {
  background: none; border: none; color: var(--text-3); font-size: 1.2rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast) var(--ease);
}
.quick-modal-close:hover { color: var(--text); background: var(--surface-2); }
.quick-modal-subtitle { font-size: 0.82rem; color: var(--text-3); margin: -4px 0 0; line-height: 1.5; }
.quick-trigger-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.quick-trigger-btn {
  padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font-size: 0.8rem; font-weight: 400;
  transition: all var(--t-fast) var(--ease);
}
.quick-trigger-btn:hover { border-color: var(--accent-line); color: var(--text); }
.quick-trigger-btn.active {
  background: var(--accent); color: #14100A; border-color: transparent;
  box-shadow: 0 4px 16px rgba(231,179,85,0.2);
}
.quick-modal-actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-1); }
.quick-log-btn {
  width: 100%; padding: 13px; border-radius: var(--r-sm); border: none;
  background: var(--accent); color: #14100A; font-weight: 500; font-size: 0.92rem;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.quick-log-btn:hover { background: var(--accent-hi); }
.quick-log-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.quick-full-btn {
  width: 100%; padding: 11px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-3); font-size: 0.82rem; cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.quick-full-btn:hover { border-color: var(--accent-line); color: var(--text); }

@media (max-width: 480px) {
  .quick-fab { bottom: 20px; right: 20px; width: 50px; height: 50px; }
  .quick-fab svg { width: 22px; height: 22px; }
  .quick-modal-box { padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); }
  /* ===== MOBILE-FIRST — ACCORDION STEP, BOTTOM SHEET 66VH, STICKY SAVE, 44px, SAFE-AREA ===== */
@media (max-width: 639px) {
  /* 1. STEP ACCORDION */
  .form-step { border-top: 1px solid var(--line-strong); }
  .form-step-header { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; cursor: pointer; min-height: 48px; }
  .form-step-header .step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #14100A; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; box-shadow: 0 2px 8px rgba(231,179,85,0.35); }
  .form-step-header.open .step-num { background: #F4F1EA; color: #14100A; }
  /* FORCE visible numbers: never white / invisible */
  .form-step-header .step-num { color: #14100A !important; }
  .form-step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
  .form-step-body.open { grid-template-rows: 1fr; }
  .form-step-body > .step-inner { overflow: hidden; padding-bottom: var(--space-3); animation: stepReveal 0.35s ease-out both; }
  @keyframes stepReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .form-step-header { transition: background 0.2s ease, color 0.2s ease; }

  /* 2. QUICK CHECK-IN — BOTTOM SHEET 2/3 */
  .quick-modal { align-items: flex-end !important; padding: 0; background: rgba(20,20,26,0.55) !important; }
  .quick-modal-box { width: 100% !important; max-width: 100% !important; max-height: 66vh !important; border-radius: 24px 24px 0 0 !important; margin: 0 !important; padding: calc(var(--space-4) + env(safe-area-inset-top, 0px)) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px)) !important; box-shadow: 0 -8px 40px rgba(0,0,0,0.45) !important; }
  .quick-modal-box .quick-trigger-grid { gap: var(--space-2); }
  .quick-trigger-btn { min-height: 72px; min-width: 80px; border-radius: 14px; font-size: 0.9rem; }

  /* 3. STICKY SAVE BUTTON */
  .save-sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: rgba(15,15,22,0.96); backdrop-filter: saturate(140%) blur(12px); border-top: 1px solid var(--line-strong); padding: 12px var(--space-3); display: flex; justify-content: center; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .save-sticky-bar .save-btn { width: 100%; max-width: 480px; padding: 14px 24px; border-radius: 14px; font-size: 1rem; font-weight: 600; }

  /* 4. TOUCH TARGETS 44×44 min */
  .emotion-btn, .urgency-btn, .quick-trigger-btn, .intent-gate-label, button { min-height: 44px; min-width: 44px; }
  .form-card input, .form-card select, .form-card textarea { font-size: 1rem; } /* prevent zoom on iOS */

  /* 5. SAFE-AREA INSETS GLOBAL */
  .quick-fab { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: calc(20px + env(safe-area-inset-right, 0px)); }
}

.session-timer-bar { padding: var(--space-2) var(--space-3); }
}

/* ---------- PRE-SESSION RITUAL ---------- */
.ritual-card {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--space-4); margin-top: var(--space-3);
}
.ritual-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.ritual-title { font-size: 0.9rem; font-weight: 500; color: var(--text); margin: 0; }
.ritual-hint { font-size: 0.78rem; color: var(--text-3); margin: 4px 0 0; line-height: 1.5; }
.ritual-items { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.ritual-item {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--line);
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.ritual-item:hover { border-color: var(--line-strong); }
.ritual-item input[type="checkbox"] {
  appearance: none; width: 18px; height: 18px; border: 2px solid var(--line-strong);
  border-radius: 6px; background: transparent; cursor: pointer; position: relative; flex-shrink: 0;
  transition: all var(--t-fast) var(--ease);
}
.ritual-item input[type="checkbox"]:checked { background: var(--success); border-color: var(--success); }
.ritual-item input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px;
  border: solid #14100A; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ritual-item-text { flex: 1; font-size: 0.84rem; color: var(--text-2); min-width: 0; }
.ritual-item.done .ritual-item-text { text-decoration: line-through; color: var(--text-3); }
.ritual-item-delete {
  background: none; border: none; color: var(--text-3); font-size: 1rem; width: 1.4rem;
  height: 1.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast) var(--ease); opacity: 0; flex-shrink: 0;
}
.ritual-item:hover .ritual-item-delete { opacity: 1; }
.ritual-item-delete:hover { color: var(--danger); background: var(--danger-soft); }
.ritual-add-row { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.ritual-add-input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); padding: 8px 12px; color: var(--text); font-size: 0.84rem;
}
.ritual-add-input::placeholder { color: var(--text-3); }
.ritual-add-input:focus { outline: 2px solid var(--accent-line); border-color: transparent; }
.ritual-complete-btn {
  width: 100%; margin-top: var(--space-3); padding: 11px; border-radius: var(--r-sm);
  border: none; background: var(--success); color: #14100A; font-weight: 500;
  font-size: 0.88rem; cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.ritual-complete-btn:hover { background: #a8cfb6; }
.ritual-complete-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- STREAK CALENDAR ---------- */
.streak-calendar { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.streak-calendar-title { font-size: 0.82rem; color: var(--text-2); margin: 0 0 var(--space-2); }
.streak-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.streak-cal-header {
  font-size: 0.58rem; color: var(--text-3); text-align: center;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 0;
}
.streak-cal-day {
  aspect-ratio: 1; border-radius: 4px; display: flex; align-items: center;
  justify-content: center; font-size: 0.58rem; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--line); position: relative;
}
.streak-cal-day.resisted { background: var(--success-soft); border-color: rgba(147,192,162,0.3); color: var(--success); }
.streak-cal-day.checked { background: var(--warning-soft); border-color: rgba(220,170,105,0.3); color: var(--warning); }
.streak-cal-day.mixed { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hi); }
.streak-cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); }
.streak-cal-day.future { background: transparent; border-style: dashed; opacity: 0.3; }
.streak-cal-legend {
  display: flex; gap: var(--space-3); margin-top: var(--space-2); flex-wrap: wrap;
}
.streak-cal-legend-item { display: flex; align-items: center; gap: 4px; font-size: 0.66rem; color: var(--text-3); }
.streak-cal-legend-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }

/* ---------- POST-SESSION JOURNAL ---------- */
.journal-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: opacity var(--t-base) var(--ease); padding: var(--space-4);
}
.journal-box {
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: var(--space-5); width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: var(--space-4);
  animation: rise var(--t-base) var(--ease);
}
.journal-title { font-size: 1.1rem; font-weight: 500; color: var(--text); margin: 0; }
.journal-prompt { font-size: 0.88rem; color: var(--text-2); margin: 0; line-height: 1.6; }
.journal-prompt em { font-style: italic; color: var(--accent-hi); }
.journal-textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); padding: var(--space-3); color: var(--text);
  font-size: 0.88rem; resize: none; line-height: 1.6; min-height: 80px;
}
.journal-textarea::placeholder { color: var(--text-3); }
.journal-textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }
.journal-actions { display: flex; gap: var(--space-2); }
.journal-save-btn {
  flex: 1; padding: 11px; border-radius: var(--r-sm); border: none;
  background: var(--accent); color: #14100A; font-weight: 500; font-size: 0.88rem;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.journal-save-btn:hover { background: var(--accent-hi); }
.journal-skip-btn {
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-3); font-size: 0.82rem; cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.journal-skip-btn:hover { border-color: var(--accent-line); color: var(--text); }

/* ---------- QUICK FAB BADGE ---------- */
.quick-fab { position: relative; }
.quick-fab-badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px;
  border-radius: 50%; background: var(--danger); color: #fff; font-size: 0.6rem;
  font-weight: 600; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg); line-height: 1;
}

/* ---------- ONBOARDING ---------- */
.ob-overlay {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7,7,9,0); backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
  pointer-events: none; transition: background var(--t-slow) var(--ease), backdrop-filter var(--t-slow) var(--ease);
}
.ob-overlay.active {
  background: rgba(7,7,9,0.84); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

.ob-card {
  position: relative; z-index: 1;
  background: var(--surface-1); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  width: 100%; max-width: 420px; margin: 0 var(--space-4);
  overflow: hidden;
  opacity: 0; transform: translateY(30px) scale(0.96);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.ob-overlay.active .ob-card { opacity: 1; transform: translateY(0) scale(1); }
.ob-card.transitioning { opacity: 0; transform: translateY(-12px) scale(0.98); }

.ob-card-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(231,179,85,0.12), transparent 70%);
  pointer-events: none; opacity: 0.7;
  transition: opacity var(--t-base) var(--ease);
}

.ob-illust {
  width: 80px; height: 80px; margin: var(--space-5) auto 0;
  display: grid; place-items: center; position: relative;
}
.ob-illust-orb {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center;
  transition: background var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
}
.ob-illust-orb svg { width: 36px; height: 36px; }

.ob-body {
  padding: var(--space-4) var(--space-5) var(--space-3);
  text-align: center; display: flex; flex-direction: column; gap: var(--space-2);
}
.ob-kicker {
  font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent-hi); font-weight: 500; margin: 0;
}
.ob-title {
  font-size: 1.35rem; font-weight: 300; color: var(--text); margin: 0;
  line-height: 1.4; letter-spacing: -0.02em;
}
.ob-title b { font-weight: 500; }
.ob-desc {
  font-size: 0.88rem; color: var(--text-2); line-height: 1.7; margin: 0;
}

.ob-interactive {
  margin: var(--space-2) 0 0; display: flex; flex-direction: column; gap: var(--space-2);
}
.ob-input {
  width: 100%; background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: var(--space-3);
  color: var(--text); font-size: 0.92rem; font-family: inherit;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ob-input::placeholder { color: var(--text-3); font-style: italic; }
.ob-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }

.ob-example {
  font-size: 0.82rem; color: var(--text-3); font-style: italic; line-height: 1.6; margin: 0;
}
.ob-example em { color: var(--accent-hi); font-style: italic; }

.ob-card-footer {
  padding: 0 var(--space-5) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-2);
}

.ob-nav {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  justify-content: space-between; padding: var(--space-3) var(--space-5) var(--space-4);
  border-top: 1px solid var(--line);
}
.ob-skip {
  background: none; border: none; color: var(--text-3); font-size: 0.76rem;
  font-weight: 500; padding: 8px 4px; cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.ob-skip:hover { color: var(--text-2); }

.ob-dots {
  display: flex; gap: 5px; align-items: center;
}
.ob-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-strong);
  transition: all var(--t-base) var(--ease);
}
.ob-dot.active {
  background: var(--accent); width: 18px; border-radius: 10px;
  box-shadow: 0 0 8px rgba(231,179,85,0.3);
}
.ob-dot.done { background: rgba(231,179,85,0.4); }

.ob-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px; border-radius: var(--r-pill); border: none;
  background: var(--accent); color: #14100A; font-weight: 500; font-size: 0.88rem;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
  box-shadow: 0 4px 18px rgba(231,179,85,0.2);
}
.ob-btn-primary:hover { background: var(--accent-hi); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(231,179,85,0.3); }
.ob-btn-primary:active { transform: translateY(0); }
.ob-btn-primary.green { background: var(--success); color: #0E1210; }
.ob-btn-primary.green:hover { background: #a8cfb6; }

.ob-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--text-3); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.ob-btn-ghost:hover { border-color: var(--accent-line); color: var(--text-2); }

.ob-btn-row {
  display: flex; gap: var(--space-2); width: 100%;
}
.ob-btn-row .ob-btn-primary { flex: 1; }

.ob-completion {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  padding: var(--space-6) var(--space-5) var(--space-4);
}
.ob-completion-orb {
  position: relative; width: 100px; height: 100px; display: grid; place-items: center;
}
.ob-completion-orb-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--accent-line);
}
.ob-completion-orb-core {
  width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, var(--accent-hi), var(--accent) 60%, #b98a35 100%);
  box-shadow: 0 0 30px rgba(231,179,85,0.45), 0 0 70px rgba(231,179,85,0.15);
  animation: obOrbPulse 3s var(--ease) infinite;
}
@keyframes obOrbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(231,179,85,0.45), 0 0 70px rgba(231,179,85,0.15); }
  50% { transform: scale(1.08); box-shadow: 0 0 44px rgba(231,179,85,0.55), 0 0 90px rgba(231,179,85,0.2); }
}
.ob-completion-text {
  font-size: 1.5rem; font-weight: 300; color: var(--text); text-align: center;
  line-height: 1.5; letter-spacing: -0.02em;
}
.ob-completion-text b { font-weight: 500; color: var(--accent-hi); }

.ob-glow {
  position: relative; z-index: 5001;
  box-shadow: 0 0 0 2px rgba(231,179,85,0.45), 0 0 24px rgba(231,179,85,0.14);
  transition: box-shadow var(--t-slow) var(--ease);
}

@keyframes obFadeIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }
.ob-fade-in { animation: obFadeIn var(--t-base) var(--ease) both; }

@media (max-width: 520px) {
  .ob-card { margin: 0 var(--space-3); }
  .ob-title { font-size: 1.15rem; }
  .ob-body { padding: var(--space-3) var(--space-4) var(--space-2); }
  .ob-nav, .ob-card-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* FORCE DARK BACKGROUND for all form elements — never white */
.form-card, .form-body, .form-step-body > .step-inner { background: var(--surface-1) !important; }
.form-step, .form-step-body { background: transparent !important; }
.form-step-header { background: var(--surface-2) !important; color: #A9A295 !important; border-bottom: 1px solid var(--line-strong); }
.form-step-header.open { background: var(--surface-3) !important; }
