:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #11151d;
  --surface-2: #181d27;
  --text: #f5f7f9;
  --body: #c5cbd4;
  --muted: #89929f;
  --line: rgba(255,255,255,.1);
  --accent: #32dfc1;
  --accent-strong: #17b99d;
  --accent-ink: #052b25;
  --warm: #ffca64;
  --danger: #ff7373;
  --radius: 16px;
  --display: Sora, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body-font); line-height: 1.55; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
textarea { width: 100%; margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #0a0d13; color: var(--text); padding: 12px; font: inherit; resize: vertical; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.hidden { display: none !important; }
.app-shell { width: min(760px, 100%); min-height: 100dvh; margin-inline: auto; padding-bottom: calc(92px + env(safe-area-inset-bottom)); background: var(--bg); }
.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(8,10,15,.92); backdrop-filter: blur(14px); }
.app-brand { border: 0; background: transparent; padding: 8px 0; font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; cursor: pointer; }
.app-brand span { color: var(--accent); }
.account-chip { max-width: 48%; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 7px 11px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.view { display: none; padding: 30px 20px 12px; }
.view.active { display: block; }
.view h1 { margin: 0; font-family: var(--display); font-size: clamp(2rem, 8vw, 3.5rem); line-height: 1.03; letter-spacing: -.04em; }
.view-lede { max-width: 620px; margin: 16px 0 0; color: var(--body); }
.home-intro { margin-bottom: 30px; }
.home-intro p { margin: 10px 0 0; color: var(--body); }
.today-card { padding: 26px; border-radius: 24px; background: linear-gradient(145deg, #eaf7f3, #cfeee6); color: #10211d; }
.today-card small { font-family: var(--display); font-weight: 700; color: #3d5f57; }
.today-card h1 { margin-top: 10px; font-size: clamp(2rem, 9vw, 3.8rem); }
.today-card p { color: #405b55; }
.button { min-height: 50px; border: 0; border-radius: 12px; padding: 13px 18px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 800; cursor: pointer; }
.button:hover { background: #55e8d0; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.button.danger { background: rgba(255,115,115,.12); color: #ffaaaa; border: 1px solid rgba(255,115,115,.28); }
.button.full { width: 100%; }
.today-card .button { margin-top: 10px; background: #10211d; color: #eef9f6; }
.progress-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.progress-strip div { min-width: 0; padding: 16px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.progress-strip strong { display: block; font-family: var(--display); font-size: 1.35rem; }
.progress-strip span { color: var(--muted); font-size: .76rem; }
.section-heading { margin: 42px 0 16px; font-family: var(--display); font-size: 1.25rem; }
.track-list { display: grid; gap: 12px; }
.product-switcher { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.product-switcher button { flex: 0 0 auto; min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 9px 13px; cursor: pointer; }
.product-switcher button.active { border-color: var(--accent); color: var(--accent); }
.track-card { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px; text-align: left; cursor: pointer; }
.track-card:hover { border-color: rgba(50,223,193,.45); }
.track-card small { color: var(--accent); font-weight: 700; }
.track-card strong { display: block; margin-top: 5px; font-family: var(--display); font-size: 1.08rem; }
.track-card span { display: block; margin-top: 5px; color: var(--muted); font-size: .88rem; }
.track-card.locked { cursor: not-allowed; opacity: .52; }
.track-card.done { border-color: rgba(50,223,193,.4); }
.track-card.done small::after { content: " · Listo"; }
.offer-shelf { margin-top: 42px; }
.offer-shelf .section-heading { margin-bottom: 0; }
.offer-grid { display: grid; gap: 12px; margin-top: 18px; }
.offer-card { width: 100%; border: 1px solid rgba(255,202,100,.24); border-radius: var(--radius); background: rgba(255,202,100,.06); padding: 18px; color: var(--text); text-align: left; cursor: pointer; }
.offer-card:hover { border-color: var(--warm); }
.offer-card small { color: var(--warm); font-weight: 800; }
.offer-card strong, .offer-card span { display: block; }
.offer-card strong { margin-top: 5px; font-family: var(--display); font-size: 1.08rem; }
.offer-card span { margin-top: 5px; color: var(--body); }
.offer-card b { display: inline-block; margin-top: 12px; color: var(--warm); }
.inline-progress { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #282d37; }
.inline-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.practice-card { margin-top: 16px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.unit-visual { margin: 20px 0; overflow: hidden; border-radius: var(--radius); }
.unit-visual svg { display: block; width: 100%; height: auto; }
.practice-card h2 { margin: 0; font-family: var(--display); font-size: 1.25rem; }
.practice-meta { margin-top: 5px; color: var(--accent); font-weight: 700; font-size: .86rem; }
.practice-context { color: var(--muted); }
.steps { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; padding-left: 42px; color: var(--body); counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(50,223,193,.13); color: var(--accent); font-weight: 800; }
.tip { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: rgba(255,202,100,.08); color: #f0d49d; }
.safety { margin-top: 12px; color: #ffb5b5; font-size: .9rem; }
.unit-actions { display: grid; gap: 10px; margin-top: 24px; }
.back-button { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; border: 0; background: transparent; padding: 6px 0; color: var(--muted); cursor: pointer; }
.result-box { margin-top: 20px; padding: 22px; border: 1px solid rgba(50,223,193,.35); border-radius: var(--radius); background: rgba(50,223,193,.08); }
.result-box h2 { margin: 0; font-family: var(--display); }
.result-box p { color: var(--body); }
.settings-list { display: grid; gap: 12px; margin-top: 28px; }
.settings-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-card h2 { margin: 0 0 12px; font-family: var(--display); font-size: 1.1rem; }
.settings-card p { color: var(--body); }
.settings-card > label { display: block; margin: 0 0 8px; }
.settings-card > input[type="range"] { display: block; width: 100%; margin: 8px 0 20px; }
.field { display: grid; gap: 7px; margin-top: 14px; }
.field label { color: var(--body); font-weight: 700; font-size: .9rem; }
.field input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #0a0d13; color: var(--text); padding: 12px 13px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.status { min-height: 22px; margin: 10px 0 0; color: var(--warm); font-size: .88rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 16px; }
.legal-links a { color: var(--body); text-underline-offset: 4px; }
.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); width: min(760px, 100%); transform: translateX(-50%); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(8,10,15,.96); backdrop-filter: blur(14px); }
.bottom-nav button { min-height: 58px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; }
.bottom-nav button svg { display: block; width: 21px; height: 21px; margin: 0 auto 4px; fill: none; stroke: currentColor; stroke-width: 2; }
.bottom-nav button.active { color: var(--accent); background: rgba(50,223,193,.08); }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: auto; padding: 20px; background: rgba(2,4,7,.9); }
.modal-card { width: min(560px, 100%); margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 28px 80px rgba(0,0,0,.5); }
.modal-card h1 { margin: 0; font-family: var(--display); font-size: clamp(2rem, 9vw, 3.25rem); line-height: 1.02; letter-spacing: -.04em; }
.modal-card h2 { margin: 0; font-family: var(--display); }
.modal-card p { color: var(--body); }
.modal-card .modal-close { margin-top: 10px; }
.privacy-note { font-size: .88rem; }
.privacy-note a { color: var(--accent); }
.check-row { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0; color: var(--body); }
.check-row input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--accent-strong); }
.assessment-step { color: var(--accent); font-weight: 700; }
.assessment-options { display: grid; gap: 10px; margin-top: 22px; }
.assessment-options button { min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 13px; text-align: left; cursor: pointer; }
.assessment-options button:hover { border-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 120; width: min(420px, calc(100% - 28px)); transform: translate(-50%, 18px); border-radius: 12px; background: #eff8f5; color: #10211d; padding: 13px 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.timer-display { margin: 24px 0; font-family: var(--display); font-size: clamp(3.5rem, 18vw, 6rem); font-weight: 800; text-align: center; }
.timer-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.timer-presets button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.button-row { display: flex; gap: 10px; margin-top: 18px; }
.button-row > * { flex: 1; }
.offline { position: fixed; top: 70px; left: 50%; z-index: 30; transform: translateX(-50%); border-radius: 999px; background: #44252a; color: #ffd7d7; padding: 7px 12px; font-size: .8rem; }

@media (min-width: 650px) {
  .view { padding-inline: 32px; }
  .today-card { padding: 36px; }
  .unit-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .view { padding-inline: 15px; }
  .app-header { padding-inline: 15px; }
  .today-card, .modal-card { padding: 22px 18px; }
  .progress-strip span { font-size: .68rem; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
