/* ============================================================
   Kairos — Design System v2.1
   Dark-first. Mobile-first. Ruhig. Hochwertig.
   ============================================================ */

:root {
    /* Color tokens — dark mode defaults */
    --bg:            #0a0a0a;
    --bg-soft:       #121212;
    --bg-card:       #161616;
    --bg-card-hover: #1a1a1a;
    --border:        #1f1f1f;
    --border-strong: #2a2a2a;
    --text:          #f5f5f5;
    --text-muted:    #8b8b87;
    --text-dim:      #5a5a56;

    --accent:        #7fb069;     /* warm green — calm, not neon */
    --accent-soft:   #7fb06922;
    --accent-strong: #95c77c;
    --warn:          #e0a96d;
    --danger:        #c86666;

    /* Typography */
    --font-ui: -apple-system, BlinkMacSystemFont, "Inter", "Manrope", system-ui, sans-serif;
    --font-serif: "Fraunces", Georgia, "Playfair Display", serif;

    /* Spacing */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;
    --s-9: 96px;

    /* Radius */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 28px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 320ms;
    --dur-slow: 600ms;

    color-scheme: dark;
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --bg:            #f8f7f4;
    --bg-soft:       #efeeeb;
    --bg-card:       #ffffff;
    --bg-card-hover: #f5f4f1;
    --border:        #e2e0db;
    --border-strong: #d0cec8;
    --text:          #1a1a18;
    --text-muted:    #6b6b66;
    --text-dim:      #9b9b94;

    --accent:        #5a8f42;
    --accent-soft:   #5a8f4218;
    --accent-strong: #4a7a36;
    --warn:          #c4842a;
    --danger:        #b84c4c;

    color-scheme: light;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

.main { min-height: 100svh; }
body.is-auth .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

/* ===== Flash ===== */
.flash {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    animation: flash-in var(--dur) var(--ease-out);
}
.flash-error { border-color: var(--danger); color: #ffb3b3; }
.flash-ok, .flash-success { border-color: var(--accent); color: var(--accent); }
@keyframes flash-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast {
    position: fixed;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 14px;
    animation: toast-in var(--dur) var(--ease-out);
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   LANDING / HOME
   ============================================================ */
body.landing { background: radial-gradient(ellipse at top, #141414 0%, #0a0a0a 60%); }

/* Landing Nav */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--s-5);
    height: 56px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.landing-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.landing-nav-logo svg { color: var(--accent); }
.landing-nav-logo span { font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: -0.02em; }
.landing-nav-links {
    display: flex;
    gap: var(--s-5);
}
.landing-nav-links a {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 160ms;
}
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-shrink: 0;
}
.landing-nav-login {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--r-sm);
    transition: color 160ms;
}
.landing-nav-login:hover { color: var(--text); }
.landing-nav-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--bg);
    background: var(--accent);
    padding: 7px 18px;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: opacity 160ms;
}
.landing-nav-cta:hover { opacity: 0.9; }
.landing-nav-burger { display: none; padding: 6px; color: var(--text-muted); }
.fine-link { color: var(--accent); text-decoration: none; }
.fine-link:hover { text-decoration: underline; }

body.landing .hero { padding-top: calc(56px + var(--s-6)); }

@media (max-width: 680px) {
    .landing-nav-links,
    .landing-nav-actions { display: none; }
    .landing-nav-burger { display: block; }
    .landing-nav.is-open {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: var(--s-4);
    }
    .landing-nav.is-open .landing-nav-links,
    .landing-nav.is-open .landing-nav-actions {
        display: flex;
        width: 100%;
        padding-top: var(--s-3);
    }
    .landing-nav.is-open .landing-nav-links {
        flex-direction: column;
        gap: var(--s-2);
    }
    .landing-nav.is-open .landing-nav-links a {
        padding: var(--s-2) 0;
    }
    .landing-nav.is-open .landing-nav-actions {
        padding-top: var(--s-3);
        border-top: 1px solid var(--border);
        margin-top: var(--s-2);
    }
}

.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: var(--s-6) var(--s-5);
}
.hero-inner {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}
.logo-mark {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: var(--s-7);
}
.logo-mark.sm { width: 36px; height: 36px; }

.hero h1 {
    font-size: clamp(44px, 9vw, 64px);
    letter-spacing: -0.035em;
    line-height: 1.02;
    font-weight: 600;
    margin-bottom: var(--s-5);
}
.hero .accent { color: var(--accent); }
.hero-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: var(--s-7);
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-8);
}
@media (min-width: 520px) {
    .hero-ctas { flex-direction: row; }
}

.pillars {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    margin-bottom: var(--s-7);
}
.pillars li {
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.pillar-num {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: var(--s-2);
}
.pillars h3 {
    font-size: 20px;
    margin-bottom: var(--s-2);
}
.pillars p {
    color: var(--text-muted);
    font-size: 15px;
}
.fine-print {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
}

/* ============================================================
   LANDING — Conversion Page v2.6
   ============================================================ */
.landing-section {
    padding: var(--s-9) var(--s-5);
}
.landing-section.section-dark {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.landing-wrap {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}
.landing-wrap-narrow { max-width: 720px; }

.section-title {
    font-size: clamp(28px, 5vw, 40px);
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: var(--s-4);
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
    max-width: 600px;
    margin: var(--s-6) auto 0;
    line-height: 1.6;
}
.section-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto var(--s-7);
    line-height: 1.6;
}

/* --- Scenes (Problem section) --- */
.scene-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
    margin-top: var(--s-6);
}
@media (max-width: 600px) {
    .scene-grid { grid-template-columns: 1fr; }
}
.scene-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
}
.scene-icon {
    font-size: 28px;
    display: block;
    margin-bottom: var(--s-3);
}
.scene-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* --- Steps (So funktioniert's) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
}
@media (max-width: 800px) {
    .steps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .steps-grid { grid-template-columns: 1fr; }
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
}
.step-num {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: var(--s-3);
}
.step-card h3 {
    font-size: 18px;
    margin-bottom: var(--s-2);
}
.step-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

/* --- Contrast (Abgrenzung) --- */
.contrast-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
    margin-top: var(--s-5);
}
@media (max-width: 600px) {
    .contrast-grid { grid-template-columns: 1fr; }
}
.contrast-col {
    padding: var(--s-5);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}
.contrast-no {
    background: rgba(200,102,102,0.04);
    border-color: rgba(200,102,102,0.15);
}
.contrast-yes {
    background: rgba(127,176,105,0.04);
    border-color: rgba(127,176,105,0.15);
}
.contrast-col h3 {
    font-size: 16px;
    margin-bottom: var(--s-4);
}
.contrast-no h3 { color: var(--danger); }
.contrast-yes h3 { color: var(--accent); }
.contrast-col ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}
.contrast-col li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
    padding-left: 24px;
    position: relative;
}
.contrast-no li::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-size: 12px;
    top: 2px;
}
.contrast-yes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 12px;
    top: 2px;
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-4);
    align-items: start;
}
@media (max-width: 800px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--s-6) var(--s-5);
    display: flex;
    flex-direction: column;
    position: relative;
}
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 40px rgba(127,176,105,0.08);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}
.pricing-header {
    text-align: center;
    margin-bottom: var(--s-5);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--border);
}
.pricing-header h3 {
    font-size: 20px;
    margin-bottom: var(--s-3);
}
.pricing-amount {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.03em;
}
.pricing-per {
    font-size: 15px;
    color: var(--text-muted);
}
.pricing-period {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: var(--s-2);
}
.pricing-features {
    list-style: none;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
}
.pricing-features li {
    font-size: 14px;
    padding-left: 26px;
    position: relative;
    line-height: 1.4;
}
.pricing-features .included {
    color: var(--text-muted);
}
.pricing-features .included::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 13px;
}
.pricing-features .excluded {
    color: var(--text-dim);
}
.pricing-features .excluded::before {
    content: '—';
    position: absolute;
    left: 2px;
    color: var(--text-dim);
    font-size: 13px;
}
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* --- Trust --- */
.trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
}
@media (max-width: 600px) {
    .trust-grid { grid-template-columns: 1fr; }
}
.trust-item {
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.trust-icon {
    font-size: 24px;
    margin-bottom: var(--s-3);
}
.trust-item h3 {
    font-size: 16px;
    margin-bottom: var(--s-2);
}
.trust-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.faq-item + .faq-item { margin-top: -1px; }
.faq-item summary {
    padding: var(--s-4) var(--s-5);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    transition: color 160ms var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform 200ms var(--ease);
}
.faq-item[open] summary::after {
    content: '−';
    color: var(--accent);
}
.faq-item summary:hover { color: var(--accent); }
.faq-item > p,
.faq-item > div {
    padding: 0 var(--s-5) var(--s-5);
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Final CTA --- */
.landing-cta-section {
    padding: var(--s-9) var(--s-5);
}
.cta-headline {
    font-size: clamp(32px, 6vw, 48px);
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: var(--s-5);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: all var(--dur) var(--ease);
    white-space: nowrap;
    border: 1px solid transparent;
    min-height: 48px;
}
.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus-visible {
    background: var(--accent-strong);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
    background: var(--bg-card);
    border-color: var(--text-dim);
}
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 16px; min-height: 56px; }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-block { width: 100%; }
.inline { display: inline; }

/* ============================================================
   FORMS
   ============================================================ */
.form { display: flex; flex-direction: column; gap: var(--s-4); }
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field > span {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.field > span em {
    font-style: normal;
    color: var(--text-dim);
    font-weight: 400;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea,
.field select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    color: var(--text);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
    font-size: 16px;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-soft);
}
.field input:disabled { opacity: 0.5; }
.field textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.form-actions {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-3);
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    position: relative;
}
.auth-back {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 20px);
    left: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    border-radius: 50%;
    transition: background var(--dur);
}
.auth-back:hover { background: var(--bg-card); color: var(--text); }
.auth-card {
    width: 100%;
    max-width: 400px;
}
.auth-title {
    font-size: 32px;
    margin-bottom: var(--s-2);
}
.auth-sub {
    color: var(--text-muted);
    margin-bottom: var(--s-6);
}
.auth-switch {
    text-align: center;
    margin-top: var(--s-5);
    font-size: 14px;
    color: var(--text-muted);
}
.auth-switch a { color: var(--accent); }
.auth-links {
    display: flex;
    justify-content: center;
    gap: var(--s-4);
    margin-top: var(--s-4);
    font-size: 13px;
}
.auth-links a { color: var(--text-muted); }
.auth-links a:hover { color: var(--accent); }
.settings-sub-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 var(--s-3);
    letter-spacing: -0.01em;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
body.onboarding { background: var(--bg); }
.onb-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: var(--s-6) var(--s-5) var(--s-8);
}
.onb-head { margin-bottom: var(--s-7); text-align: center; }
.onb-head .logo-mark { margin: 0 auto var(--s-5); color: var(--accent); }
.onb-head h1 {
    font-size: 32px;
    margin-bottom: var(--s-3);
    letter-spacing: -0.03em;
}
.onb-head p { color: var(--text-muted); }
.onb-section.is-hidden { display: none; }
.onb-p {
    color: var(--text-muted);
    margin-bottom: var(--s-5);
}

.target-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-6);
}
@media (min-width: 480px) {
    .target-grid { grid-template-columns: repeat(2, 1fr); }
}
.target-card {
    position: relative;
    cursor: pointer;
}
.target-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.target-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: all var(--dur) var(--ease);
    min-height: 92px;
}
.target-card:hover .target-body { background: var(--bg-card-hover); }
.target-card input:checked + .target-body {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.target-label {
    font-size: 17px;
    font-weight: 600;
}
.target-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
}
.suggestion-chip {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
    transition: all var(--dur) var(--ease);
}
.suggestion-chip:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--accent);
}
.suggestion-chip.is-picked {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text);
}
.field-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--s-2);
    letter-spacing: 0.01em;
}
.field-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: calc(-1 * var(--s-2));
    font-style: italic;
}

.onb-actions {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-6);
    justify-content: flex-end;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.shake { animation: shake 300ms var(--ease); }

/* --- Onboarding: Live-Demo der Bremse --- */
.onb-demo {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-5);
    padding: var(--s-5) 0;
}
.onb-demo .breath {
    width: min(76vw, 280px);
    height: min(76vw, 280px);
}
.onb-demo-hint {
    font-size: 14px;
    color: var(--text-dim);
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    max-width: 320px;
    line-height: 1.5;
}
.onb-fineprint {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: var(--s-4);
    font-style: italic;
    text-align: center;
}
.is-hidden { display: none; }

/* ============================================================
   TODAY / HOME
   ============================================================ */
.today {
    max-width: 560px;
    margin: 0 auto;
    padding: var(--s-5) var(--s-5) var(--s-6);
    min-height: calc(100svh - 72px);
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}
.today-head {
    padding-top: calc(env(safe-area-inset-top) + 8px);
}
.greeting {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.brake-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-5);
}
.brake-btn {
    position: relative;
    width: min(72vw, 288px);
    height: min(72vw, 288px);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, var(--accent) 0%, #5d9350 70%, #4a7a41 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 1px rgba(127,176,105,0.3),
        0 20px 80px rgba(127,176,105,0.15),
        inset 0 -20px 40px rgba(0,0,0,0.2);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.brake-btn:active {
    transform: scale(0.97);
    box-shadow:
        0 0 0 1px rgba(127,176,105,0.5),
        0 10px 40px rgba(127,176,105,0.2),
        inset 0 -20px 40px rgba(0,0,0,0.25);
}
.brake-label {
    font-size: 24px;
    font-weight: 600;
    color: #0a0a0a;
    letter-spacing: -0.01em;
    z-index: 2;
}
.brake-ring, .brake-ring-2 {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    animation: brake-pulse 3.5s infinite ease-out;
}
.brake-ring-2 { animation-delay: 1.75s; }
@keyframes brake-pulse {
    0%   { transform: scale(1);   opacity: 0.4; }
    80%  { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}
.brake-hint {
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
    max-width: 300px;
}

/* Schmaler Wochen-Tease als Fußband, nicht mehr dominanter Karten-Block */
.week-tease {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: background var(--dur);
}
.week-tease:hover { background: var(--bg-card-hover); }
.week-tease-slim {
    padding: var(--s-3) var(--s-4);
    border-radius: 999px;
    align-self: center;
    gap: var(--s-3);
    max-width: max-content;
}
.week-tease-slim .wt-num {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
}
.week-tease-slim .wt-label {
    font-size: 13px;
    color: var(--text-muted);
}
.week-tease-slim .wt-arrow {
    font-size: 16px;
    color: var(--text-dim);
    margin-left: var(--s-2);
}
.wt-left { display: flex; flex-direction: column; }
.wt-num {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}
.wt-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.wt-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.wt-today {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}
.wt-arrow {
    font-size: 22px;
    color: var(--text-muted);
}

/* Impuls-Satz als ruhige Fußnote unter allem */
.today-impulse {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dim);
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
    padding: var(--s-3) var(--s-4) 0;
    font-style: italic;
    letter-spacing: 0.005em;
}

/* ============================================================
   BRAKE / INTERRUPT SCREEN
   ============================================================ */
body.brake {
    background: radial-gradient(ellipse at 50% 40%, #162016 0%, #0a0a0a 70%);
}
body.brake .tabbar { display: none; }
body.brake .main { padding-bottom: 0; }

.brake-screen {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--s-6) var(--s-5);
    position: relative;
}
.brake-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 20px);
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    z-index: 10;
}

/* Context-Badge oben links: zeigt den gewählten Zustand während der Bremse */
.brake-context-badge {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 28px);
    left: 24px;
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    z-index: 10;
}

/* Missing-Buttons identisch zu Outcome-Buttons (gleiche Komponente, andere Funktion) */
.missing-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-align: left;
    transition: all var(--dur) var(--ease);
}
.missing-btn:hover, .missing-btn:active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.missing-btn.is-selected {
    background: var(--accent-soft);
    border-color: var(--accent);
    transform: scale(0.97);
}

.brake-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-6);
    text-align: center;
    animation: fade-in var(--dur-slow) var(--ease);
}
@keyframes fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.breath {
    position: relative;
    width: min(86vw, 340px);
    height: min(86vw, 340px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.breath-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(127,176,105,0.30);
    transform-origin: center;
    animation: breathe 6s infinite ease-in-out;
    transition: border-color 800ms var(--ease), opacity 800ms var(--ease);
}
.breath-ring.r-2 { inset: 22px; border-color: rgba(127,176,105,0.22); animation-delay: 0.6s; }
.breath-ring.r-3 { inset: 44px; border-color: rgba(127,176,105,0.14); animation-delay: 1.2s; }
@keyframes breathe {
    0%, 100% { transform: scale(0.90); opacity: 0.45; }
    50%      { transform: scale(1.04); opacity: 0.95; }
}

/* Phase 2 — ring intensifiziert sich, Kern erscheint */
.breath.is-holding .breath-ring   { border-color: rgba(127,176,105,0.55); }
.breath.is-holding .breath-ring.r-2 { border-color: rgba(127,176,105,0.40); }
.breath.is-holding .breath-ring.r-3 { border-color: rgba(127,176,105,0.28); }

/* Phase 3 — Ring zerfällt langsam */
.breath.is-letting-go .breath-ring {
    animation-duration: 4s;
    opacity: 0.15;
    border-color: rgba(127,176,105,0.12);
}

.breath-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
    padding: 0 var(--s-4);
    max-width: 86%;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1200ms var(--ease-out), transform 1200ms var(--ease-out);
    pointer-events: none;
}
.breath-core.is-visible {
    opacity: 1;
    transform: scale(1);
}
.breath-core.is-fading {
    opacity: 0;
    transform: scale(1.02);
    transition-duration: 900ms;
}
.brake-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 7.2vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    font-weight: 400;
}
.brake-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
    max-width: 280px;
}

.brake-outcome {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    animation: fade-in-up var(--dur-slow) var(--ease);
}
.brake-outcome.is-hidden { display: none; }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.outcome-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: var(--s-3);
}
.outcome-options {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}
.outcome-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-align: left;
    transition: all var(--dur) var(--ease);
}
.outcome-btn:hover, .outcome-btn:active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.outcome-label {
    font-size: 17px;
    font-weight: 600;
}
.outcome-sub {
    font-size: 13px;
    color: var(--text-muted);
}
.outcome-hint {
    font-size: 13px;
    color: var(--text-dim);
    text-align: center;
    margin: calc(-1 * var(--s-2)) 0 var(--s-5);
    font-style: italic;
    font-family: var(--font-serif);
}

/* --- Brake resolve step transitions --- */
.brake-step {
    animation: fade-in-up var(--dur-slow) var(--ease-out);
}
.brake-step.is-hidden { display: none; }
.brake-step.is-leaving {
    opacity: 0;
    transform: translateY(-12px);
    transition: all 260ms var(--ease);
}
.brake-step.is-entering {
    opacity: 0;
    transform: translateY(12px);
}

/* --- Context grid: 2×3 tap cards --- */
.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
}
.context-btn {
    padding: var(--s-5) var(--s-3);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-align: center;
    transition: all var(--dur) var(--ease);
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.context-btn:hover, .context-btn:active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.context-btn.is-selected {
    background: var(--accent-soft);
    border-color: var(--accent);
    transform: scale(0.97);
}
.context-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
}

/* --- Optional note field (standalone step in v2.5.1) --- */
.note-details {
    margin-bottom: var(--s-4);
}
.note-summary {
    list-style: none;
    cursor: pointer;
    padding: var(--s-3) var(--s-4);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    border-radius: var(--r-md);
    transition: color var(--dur) var(--ease);
}
.note-summary::-webkit-details-marker { display: none; }
.note-summary:hover { color: var(--accent); }
.note-details[open] .note-summary {
    color: var(--text);
    margin-bottom: var(--s-2);
}
.note-field {
    width: 100%;
    min-height: 120px;
    padding: var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    margin-bottom: var(--s-4);
}
.note-field:focus {
    outline: none;
    border-color: var(--accent);
}
.note-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
}
.note-actions .btn-primary {
    min-width: 180px;
}

/* --- Skip link --- */
.context-skip {
    text-align: center;
}
.link-btn {
    background: none;
    border: 0;
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: var(--s-3);
    cursor: pointer;
    transition: color var(--dur) var(--ease);
}
.link-btn:hover { color: var(--text-muted); }

/* --- „Noch einmal" — stiller Ausgang nach dem Outcome-Screen --- */
.outcome-again {
    margin-top: var(--s-5);
    text-align: center;
}
.again-link {
    display: inline-block;
    padding: var(--s-3) var(--s-4);
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.01em;
    border-bottom: 1px solid transparent;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.again-link:hover,
.again-link:active {
    color: var(--text-muted);
    border-bottom-color: var(--border-strong);
}

/* ============================================================
   ALTERNATIVE / INSTEAD LIST
   ============================================================ */
.page {
    max-width: 560px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + var(--s-5)) var(--s-5) var(--s-7);
}
.page-head {
    margin-bottom: var(--s-6);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}
.page-head h1 {
    font-size: 32px;
    letter-spacing: -0.03em;
}
.page-sub {
    color: var(--text-muted);
}
.page-back {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--s-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.page-back:hover { color: var(--text); }

.alt-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}
.alt-card {
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: background var(--dur);
}
.alt-card.is-active {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-card) 100%);
}
.alt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s-3);
    margin-bottom: var(--s-2);
}
.alt-header h2 {
    font-size: 18px;
    font-weight: 600;
}
.alt-badge {
    padding: 4px 10px;
    background: var(--accent);
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
}
.alt-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--s-4);
}
.alt-actions {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}
.alt-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    padding: var(--s-5);
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-lg);
    color: var(--text-muted);
    transition: all var(--dur);
}
.alt-add:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.alt-add span:first-child {
    font-size: 24px;
    line-height: 1;
}
.alt-header h3 {
    font-size: 18px;
    font-weight: 600;
}

/* v2.5.1 — Historische Standard-Alternativen (Archiv) */
.alt-history {
    margin-top: var(--s-4);
}
.alt-history-summary {
    list-style: none;
    cursor: pointer;
    padding: var(--s-3) var(--s-4);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    border-radius: var(--r-md);
    transition: color var(--dur) var(--ease);
    letter-spacing: 0.01em;
}
.alt-history-summary::-webkit-details-marker { display: none; }
.alt-history-summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform var(--dur) var(--ease);
}
.alt-history[open] .alt-history-summary::before {
    content: '▾ ';
}
.alt-history-summary:hover { color: var(--text); }
.alt-history-hint {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin: var(--s-2) 0 var(--s-3);
}
.alt-history .alt-card {
    margin-top: var(--s-3);
    opacity: 0.75;
    transition: opacity var(--dur);
}
.alt-history .alt-card:hover {
    opacity: 1;
}
.alt-card.is-history {
    border-style: dashed;
}

/* v2.5 — Alternativen: Section-Header */
.alt-section {
    margin-bottom: var(--s-7);
}
.alt-section-title {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: var(--s-3);
}
.alt-section-sub {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: var(--s-4);
    line-height: 1.5;
    max-width: 480px;
}

/* v2.5 — Context-Slots als kompaktes Grid */
.alt-slots {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}
@media (min-width: 480px) {
    .alt-slots { grid-template-columns: 1fr 1fr; }
}
.alt-slot-card {
    padding: var(--s-4) var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.alt-slot-head {
    margin-bottom: var(--s-2);
}
.alt-slot-context {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}
.alt-slot-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: var(--s-2);
}
.alt-slot-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--s-3);
    line-height: 1.4;
}
.alt-slot-actions {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}
.alt-slot-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--s-2);
    padding: var(--s-5);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-lg);
    transition: all var(--dur);
    min-height: 96px;
}
.alt-slot-empty:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.alt-slot-empty .alt-slot-context {
    color: var(--text-muted);
}
.alt-slot-empty:hover .alt-slot-context {
    color: var(--accent);
}
.alt-slot-add {
    font-size: 14px;
    color: var(--text-dim);
}

/* v2.5 — Context-Pills auf Today unter dem Brems-Button */
.today-contexts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-2);
    max-width: 340px;
    margin: var(--s-3) auto 0;
}
.ctx-pill {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all var(--dur) var(--ease);
    letter-spacing: 0.01em;
}
.ctx-pill:hover,
.ctx-pill:active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ============================================================
   WEEK / STORY
   ============================================================ */
body.week { background: #0a0a0a; overflow: hidden; }
body.week .main { padding-bottom: 0; }
body.week .tabbar { display: none; }

.story {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    overflow: hidden;
}
.story-progress {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 16px);
    left: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    z-index: 20;
}
.seg {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.seg.is-done { background: var(--accent); }
.seg.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    animation: seg-fill 5s linear forwards;
}
@keyframes seg-fill { to { transform: scaleX(1); } }

.story-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 36px);
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 22px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms var(--ease);
    padding: var(--s-6) var(--s-5);
}
.slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.slide-inner {
    max-width: 480px;
    width: 100%;
    text-align: center;
}
.slide-eyebrow {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    margin-bottom: var(--s-5);
}
.slide-headline {
    font-size: clamp(48px, 13vw, 88px);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.035em;
    margin-bottom: var(--s-5);
}
.slide-headline-sm {
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: var(--s-4);
}
.slide-headline-sm.serif {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.015em;
}
.slide-sub {
    font-size: 16px;
    color: var(--text-muted);
}
.slide-signature {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--text-dim);
    font-style: italic;
    letter-spacing: 0.02em;
    margin-top: var(--s-7);
}

.slide-num .big-number {
    font-size: clamp(140px, 32vw, 220px);
    font-weight: 200;
    line-height: 1;
    letter-spacing: -0.05em;
    margin: var(--s-5) 0;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    text-shadow: 0 0 60px rgba(127,176,105,0.3);
}

.slide-bars .bars {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    height: 240px;
    margin: var(--s-6) 0 var(--s-4);
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
    height: 100%;
}
.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, #4a7a41 100%);
    border-radius: 6px 6px 0 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    min-height: 4px;
    transition: height 600ms var(--ease-out);
}
.bar-num {
    font-size: 11px;
    font-weight: 600;
    color: #0a0a0a;
}
.bar-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.outro-actions { margin-top: var(--s-7); }

.story-tap {
    position: absolute;
    top: 0; bottom: 0;
    width: 40%;
    background: none;
    z-index: 15;
}
.story-tap-left { left: 0; }
.story-tap-right { right: 0; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-section {
    padding: var(--s-5) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--s-5);
}
.settings-section h2 {
    font-size: 18px;
    margin-bottom: var(--s-2);
}
.settings-muted {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--s-4);
}
.settings-muted code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 12px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
}
.settings-dim {
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.status-ok {
    color: var(--accent);
    font-weight: 500;
}
.status-off {
    color: var(--text-muted);
    font-weight: 500;
}
.danger-zone { border-top-color: rgba(200,102,102,0.2); }
.danger-zone h2 { color: var(--danger); }
.version-line {
    margin-top: var(--s-7);
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* ============================================================
   TABBAR
   ============================================================ */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    z-index: 50;
}
.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: var(--r-md);
    transition: color var(--dur);
}
.tab svg {
    width: 24px;
    height: 24px;
}
.tab.active {
    color: var(--accent);
}
.tab:not(.active):hover {
    color: var(--text-muted);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .breath-ring { animation: none; opacity: 0.5; }
    .brake-ring, .brake-ring-2 { display: none; }
}

/* ============================================================
   SITE FOOTER
   Sits inside .main so it respects tabbar padding on is-auth.
   Hidden on immersive views (.week, .brake) via server-side skip.
   ============================================================ */
.site-footer {
    margin-top: var(--s-8);
    padding: var(--s-6) var(--s-5) var(--s-6);
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
}
.site-footer .footer-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 var(--s-3);
    letter-spacing: 0.005em;
}
.site-footer .footer-meta {
    margin: 0;
    letter-spacing: 0.02em;
}
.site-footer .footer-sep {
    display: inline-block;
    margin: 0 var(--s-2);
    color: var(--border-strong);
}

/* Landing has its own bottom flourish — tighten footer there */
body.landing .site-footer {
    margin-top: var(--s-6);
    border-top-color: transparent;
}

/* ============================================================
   WEEK STORY — Context slide
   ============================================================ */
.slide-context .ctx-bars {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    width: 100%;
    max-width: 360px;
    margin: var(--s-5) auto var(--s-4);
}
.ctx-row {
    display: grid;
    grid-template-columns: 120px 1fr 32px;
    align-items: center;
    gap: var(--s-3);
}
.ctx-label {
    font-size: 14px;
    color: var(--text-muted);
    text-align: right;
    letter-spacing: -0.005em;
}
.ctx-track {
    height: 10px;
    background: var(--bg-card);
    border-radius: 999px;
    overflow: hidden;
}
.ctx-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
    transition: width 800ms var(--ease-out);
}
.ctx-count {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* ===== Legal pages v2.6 ===== */
.page-legal { max-width: 720px; margin: 0 auto; padding: var(--s-5) var(--s-4); }
.page-legal .page-head { margin-bottom: var(--s-6); }
.page-legal .page-head h1 { font-size: 28px; }

.legal-body.prose {
    line-height: 1.7;
    color: var(--text-muted);
}
.legal-body.prose h2 {
    font-size: 18px;
    color: var(--text);
    margin: var(--s-6) 0 var(--s-3);
}
.legal-body.prose h3 {
    font-size: 15px;
    color: var(--text);
    margin: var(--s-5) 0 var(--s-2);
}
.legal-body.prose p {
    margin-bottom: var(--s-4);
}
.legal-body.prose ul,
.legal-body.prose ol {
    margin: var(--s-3) 0 var(--s-4) var(--s-5);
    list-style: disc;
}
.legal-body.prose ol { list-style: decimal; }
.legal-body.prose li { margin-bottom: var(--s-2); }
.legal-body.prose a { color: var(--accent); text-decoration: underline; }

.legal-updated {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: var(--s-6);
}

.legal-nav {
    margin-top: var(--s-5);
    padding-top: var(--s-4);
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-dim);
}
.legal-nav a { color: var(--text-muted); }
.legal-nav a:hover { color: var(--accent); }
.legal-sep { margin: 0 var(--s-2); }

/* ===== Footer legal links v2.6 ===== */
.footer-legal {
    margin-top: var(--s-2);
    font-size: 13px;
    color: var(--text-dim);
}
.footer-legal a { color: var(--text-dim); }
.footer-legal a:hover { color: var(--accent); }

/* ===== Toolbar ===== */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--s-2) var(--s-4);
    padding-top: calc(var(--s-2) + env(safe-area-inset-top));
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; }
.toolbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 44px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    touch-action: manipulation;
}
.toolbar-link:hover, .toolbar-link:active {
    color: var(--text);
    border-color: var(--border-strong);
}
.toolbar-link svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.toolbar-link .icon-sun { display: none; }
[data-theme="light"] .toolbar-link .icon-moon { display: none; }
[data-theme="light"] .toolbar-link .icon-sun { display: block; }
.toolbar-form { margin: 0; }

@media (max-width: 480px) {
    .toolbar-link span { display: none; }
    .toolbar-link { padding: 10px; min-width: 44px; justify-content: center; }
}
