:root {
    --fq-orange: #E04000;
    --fq-orange-light: #FF8533;
    --fq-orange-dark: #E04000;
    --fq-bg: #F7F8FA;
    --fq-surface: #FFFFFF;
    --fq-text: #1A1A1A;
    --fq-text-secondary: #666666;
    --fq-text-muted: #888888;
    --fq-border: #E8E8E8;
    --fq-input-bg: #F7F8FA;
    --fq-shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --fq-shadow-md: 0 1px 3px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.06);
    --fq-shadow-orange: 0 4px 16px rgba(255,92,0,0.27);
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: var(--fq-bg) !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Shell */
.app-shell {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 90px;
    position: relative;
    background: var(--fq-bg) !important;
}

.page {
    padding: 24px 20px;
    background: var(--fq-bg) !important;
}

.side-nav {
    display: none;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    color: #9ca3af;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.tab.active {
    color: var(--fq-orange);
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.nav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border: 2px solid #ffffff;
}

.nav-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Desktop */
@media (min-width: 768px) {
    .app-shell {
        max-width: 100%;
        width: 100%;
        padding-bottom: 0;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        margin: 0;
        background: var(--fq-bg);
    }

    .side-nav {
        display: flex;
        flex-direction: column;
        width: 220px;
        flex-shrink: 0;
        height: 100vh;
        position: sticky;
        top: 0;
        background: #ffffff;
        border-right: 1px solid #eeeeee;
        padding: 24px 12px;
        gap: 4px;
        z-index: 100;
        overflow-y: auto;
    }

    .side-nav-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 8px 24px;
        border-bottom: 1px solid #f0eeeb;
        margin-bottom: 8px;
    }

    .side-nav-brand-icon {
        width: 28px;
        height: 28px;
        color: #3d7c4f;
        flex-shrink: 0;
    }

    .side-nav-brand-name {
        font-size: 1.1rem;
        font-weight: 800;
        color: #1a1a1a;
        letter-spacing: -0.02em;
    }

    .side-nav-items {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .side-nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        border: 0;
        border-radius: 12px;
        padding: 12px 14px;
        background: transparent;
        color: #bbbbbb;
        cursor: pointer;
        font-size: 0.95rem;
        font-weight: 500;
        text-align: left;
        transition: background 0.15s, color 0.15s;
        width: 100%;
    }

    .side-nav-item:hover {
        background: #f5f5f3;
        color: #555555;
    }

    .side-nav-item.active {
        background: #fff1eb;
        color: var(--fq-orange);
    }

    .side-nav-item.active .side-nav-icon {
        color: var(--fq-orange);
        stroke: var(--fq-orange);
    }

    .side-nav-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .side-nav-label {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .page {
        flex: 1;
        padding: 40px 60px;
        margin: 0;
        max-width: none;
        overflow-y: auto;
        background: var(--fq-bg);
    }

    .bottom-nav {
        display: none;
    }
}
/* ── Onboarding (redesign) ── */
:root {
    --ob-surface: #f5f4f1;
    --ob-card: #ffffff;
    --ob-card-alt: #edf3ea;
    --ob-border: #d7e1d4;
    --ob-border-strong: #2d5a34;
    --ob-text: #27462d;
    --ob-text-muted: #677a6f;
    --ob-green: #2d5a34;
    --ob-green-soft: #e4efe2;
    --ob-dot: #d8eadc;
    --ob-orange: #f4a640;
    --ob-orange-strong: #ed9728;
    --ob-shadow: 0 12px 28px rgba(66, 85, 56, 0.08);
    --ob-shadow-soft: 0 8px 20px rgba(66, 85, 56, 0.05);
}

.ob-screen {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: min(100%, 390px);
    margin: 0 auto;
    background: var(--ob-surface);
    color: var(--ob-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ob-screen--welcome,
.ob-screen--complete {
    justify-content: space-between;
}

.ob-welcome-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 24px 16px 32px;
}

.ob-welcome-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ob-brand-lockup {
    width: min(100%, 336px);
    display: block;
    margin: 0 auto;
}

.ob-welcome-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-welcome-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ob-welcome-title h1 {
    margin: 0;
    font-size: 2.15rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: var(--ob-text);
}

.ob-inline-icon-shell {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--ob-green-soft);
    color: var(--ob-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ob-inline-icon {
    width: 18px;
    height: 18px;
}

.ob-welcome-copy p {
    margin: 0;
    max-width: 30ch;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ob-text-muted);
}

.ob-step-head {
    padding: 18px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ob-progress-track {
    width: 100%;
    height: 4px;
    background: #e4e9e1;
    border-radius: 999px;
    overflow: hidden;
}

.ob-progress-fill {
    height: 100%;
    background: var(--ob-green);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.ob-step-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ob-text-muted);
}

.ob-step-head h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 800;
    color: var(--ob-text);
}

.ob-step-head p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ob-text-muted);
}

.ob-content {
    flex: 1;
    padding: 14px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ob-option-card {
    min-height: 88px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ob-card);
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--ob-text);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--ob-shadow-soft);
    transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ob-option-card:hover,
.ob-chip:hover,
.ob-nav-btn:hover,
.ob-cta-btn:hover,
.ob-edit-link:hover {
    transform: translateY(-1px);
}

.ob-option-card.selected {
    background: #f8fbf7;
    border-color: var(--ob-border-strong);
    box-shadow: inset 0 0 0 1px var(--ob-border-strong);
}

.ob-option-card--wide {
    grid-column: 1 / -1;
    min-height: 56px;
    flex-direction: row;
    gap: 10px;
}

.ob-option-label {
    line-height: 1.25;
}

.ob-icon-shell {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--ob-card-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ob-green);
    flex-shrink: 0;
}

.ob-choice-icon {
    width: 20px;
    height: 20px;
}

.ob-option-card.selected .ob-icon-shell {
    background: var(--ob-green-soft);
}

.ob-chip-wrap,
.ob-badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ob-chip,
.ob-badge {
    min-height: 40px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ob-card);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ob-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--ob-shadow-soft);
    transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ob-chip.selected,
.ob-badge.selected {
    background: #eff6ec;
    border-color: var(--ob-border-strong);
    color: var(--ob-text);
    box-shadow: none;
}

.ob-chip--text {
    gap: 0;
}

.ob-chip-icon {
    width: 18px;
    height: 18px;
    color: var(--ob-green);
    opacity: 0.75;
    flex-shrink: 0;
}

.ob-chip.selected .ob-chip-icon {
    opacity: 1;
}

.ob-info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #eaf4e7;
    border-radius: 16px;
    color: var(--ob-text-muted);
    font-size: 0.83rem;
    line-height: 1.5;
}

.ob-info-note-icon {
    width: 18px;
    height: 18px;
    color: var(--ob-green);
    flex-shrink: 0;
    margin-top: 1px;
}

.ob-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 32px;
}

.ob-nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #e4e7df;
    border-radius: 50%;
    background: var(--ob-card);
    color: var(--ob-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--ob-shadow-soft);
    transition: transform 0.15s, box-shadow 0.15s;
}

.ob-nav-btn--next {
    background: linear-gradient(180deg, var(--ob-orange) 0%, var(--ob-orange-strong) 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(239, 155, 45, 0.32);
}

.ob-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ob-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ob-dots--welcome {
    justify-content: flex-start;
}

.ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ob-dot);
    transition: width 0.2s ease;
}

.ob-dot.active {
    width: 24px;
    background: var(--ob-green);
}

.ob-cta-btn {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ob-orange) 0%, var(--ob-orange-strong) 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(239, 155, 45, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.ob-cta-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ob-complete-top {
    padding: 28px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.ob-brand-icon {
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.ob-complete-top h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: var(--ob-text);
}

.ob-complete-top p {
    margin: 0;
    max-width: 28ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ob-text-muted);
}

.ob-complete-body {
    flex: 1;
    padding: 24px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-complete-body h2 {
    margin: 0 0 2px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ob-text);
}

.ob-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ob-card);
    border-radius: 18px;
    box-shadow: var(--ob-shadow);
}

.ob-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--ob-card-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ob-green);
    flex-shrink: 0;
}

.ob-summary-glyph {
    width: 20px;
    height: 20px;
}

.ob-summary-copy {
    min-width: 0;
}

.ob-summary-label {
    margin: 0 0 2px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ob-text-muted);
}

.ob-summary-value {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ob-text);
}

.ob-complete-footer {
    padding: 18px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-edit-link {
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--ob-green);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, color 0.15s;
}

@media (min-width: 768px) {
    .ob-screen {
        margin: 24px auto;
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 24px 56px rgba(36, 52, 29, 0.12);
    }
}
/* Legacy classes kept for compatibility */
.member-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.member-chip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e5e5e5; border-radius: 24px; padding: 6px 14px 6px 6px; font-size: 14px; }
.member-avatar { width: 32px; height: 32px; border-radius: 50%; background: #2d5016; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.member-avatar-sm { width: 24px; height: 24px; border-radius: 50%; background: #2d5016; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.member-section { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.member-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--fq-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--fq-orange-dark);
}

.btn-secondary {
    padding: 14px 20px;
    background: #fff;
    color: #555;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.btn-secondary:hover {
    border-color: #bbb;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FF5C00;
    z-index: 9999;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
    border-radius: 50%;
    background: white;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.splash-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: splash-spin 1s linear infinite;
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

/*@media (min-width: 1200px) {
    .page {
        padding: 6px 8px;
        max-width: 1400px;
        margin: 0 auto;
    }
}*/


