:root {
    --cream: #FAF7F2;
    --cream-warm: #F5EFE3;
    --charcoal: #2C2C2C;
    --gold: #C9A86A;
    --gold-pale: rgba(201, 168, 106, 0.08);
    --sage: #9BA17B;
    --terracotta: #C57B57;
    --slate: #6B7280;
    --light-gray: #F5F5F5;
    --border: rgba(201, 168, 106, 0.22);
    --border-soft: rgba(44, 44, 44, 0.07);
    --danger: #DC2626;
    --shadow-soft: 0 2px 16px rgba(44, 44, 44, 0.06);
    --shadow-card: 0 1px 3px rgba(44, 44, 44, 0.05), 0 8px 24px rgba(44, 44, 44, 0.04);
    --chat-viewport-height: 100dvh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 1000;
    font-family: 'Crimson Text', serif;
}

.nav-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
}

.nav-actions {
    display: flex;
    gap: 16px;
}

.nav-link {
    background: none;
    border: none;
    color: var(--charcoal);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    font-family: 'Crimson Text', serif;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--gold);
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

.screen.with-nav {
    padding-top: 60px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(250, 247, 242, 0.96);
}

.header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--charcoal);
    text-transform: uppercase;
}

.back-btn, .share-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--slate);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease, transform 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover, .share-btn:hover {
    color: var(--charcoal);
}

.back-btn:active, .share-btn:active {
    transform: scale(0.9);
}

/* Shared divider utility — used by results, auth, etc */
.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 30px auto;
}

/* =============================================
   LANDING PAGE
   ============================================= */

.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Hero --- */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 28px 120px;
    overflow: hidden;
    text-align: center;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.landing-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
}

.landing-blob-spring {
    width: 360px; height: 360px;
    background: #FFB6C1;
    top: -80px; right: -60px;
    animation: landingDrift 12s ease-in-out infinite alternate;
}

.landing-blob-summer {
    width: 280px; height: 280px;
    background: #B0C4DE;
    bottom: 100px; left: -80px;
    animation: landingDrift 15s ease-in-out infinite alternate-reverse;
}

.landing-blob-autumn {
    width: 240px; height: 240px;
    background: #D2691E;
    top: 40%; right: -40px;
    opacity: 0.12;
    animation: landingDrift 18s ease-in-out infinite alternate;
}

.landing-blob-winter {
    width: 200px; height: 200px;
    background: #9370DB;
    bottom: -40px; right: 30%;
    opacity: 0.10;
    animation: landingDrift 20s ease-in-out infinite alternate-reverse;
}

@keyframes landingDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(20px, 30px) scale(1.08); }
}

.landing-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--charcoal);
    margin-bottom: 52px;
    animation: fadeInDown 1s ease-out both;
}

.landing-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 9vw, 4.2rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--charcoal);
    max-width: 520px;
    margin-bottom: 8px;
    animation: fadeInUp 1s ease-out 0.1s both;
}

.landing-headline em {
    font-style: italic;
    color: var(--gold);
}

.landing-subhead {
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 44px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.landing-palette-strip {
    display: flex;
    gap: 0;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 44px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.landing-strip-swatch {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.landing-palette-strip:hover .landing-strip-swatch {
    transform: scaleY(1.4);
}

.landing-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 340px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.landing-cta-subhead {
    font-size: 0.75rem;
    color: var(--slate);
    font-weight: 300;
    letter-spacing: 0.04em;
    text-align: center;
    margin: -4px 0 0;
    font-family: 'Montserrat', sans-serif;
}

.landing-login-btn {
    font-size: 0.75rem;
    color: var(--slate);
    font-weight: 300;
    letter-spacing: 0.06em;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.landing-login-btn:hover { color: var(--charcoal); }

.landing-login-btn span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- How It Works --- */
.landing-how {
    padding: 80px 28px;
    border-top: 1px solid var(--border);
}

.landing-eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    margin-bottom: 12px;
}

.landing-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 400;
    text-align: center;
    color: var(--charcoal);
    margin-bottom: 56px;
    line-height: 1.2;
}

.landing-steps {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
}

.landing-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.landing-step.visible {
    opacity: 1;
    transform: none;
}

.landing-step:last-child { border-bottom: none; }

.landing-step-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
    padding-top: 2px;
}

.landing-step-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 6px;
    line-height: 1.3;
}

.landing-step-content p {
    font-size: 0.82rem;
    color: var(--slate);
    font-weight: 300;
    line-height: 1.7;
}

/* --- Seasons Carousel --- */
.landing-seasons {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.landing-seasons .landing-eyebrow,
.landing-seasons .landing-section-title {
    padding: 0 28px;
    text-align: center;
}

.landing-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    max-width: 600px;
    margin: 0 auto;
}

.landing-carousel-viewport {
    flex: 1;
    overflow: hidden;
}

.landing-carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.landing-carousel-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--charcoal);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.landing-carousel-arrow:hover {
    background: var(--charcoal);
    color: white;
    border-color: var(--charcoal);
}

.landing-season-card {
    flex-shrink: 0;
    /* Width = (viewport - 2*gap) / 3 cards. Viewport ≈ 600-12-12-36-8-36-8 = 488px */
    width: calc((488px - 32px) / 3);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
}

.landing-season-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 72px;
}

.landing-season-swatches div { height: 100%; }

.landing-season-body {
    padding: 12px 14px;
}

.landing-season-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 4px;
    line-height: 1.2;
}

.landing-season-desc {
    font-size: 0.68rem;
    color: var(--slate);
    font-weight: 300;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .landing-carousel-wrapper {
        display: block;
        padding: 12px 0;
        max-width: 100%;
    }

    .landing-carousel-arrow {
        display: none;
    }

    .landing-carousel-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 16px;
        padding: 0 16px 2px;
    }

    .landing-carousel-viewport::-webkit-scrollbar {
        display: none;
    }

    .landing-carousel-track {
        transition: none;
        width: max-content;
        transform: none !important;
        will-change: auto;
        gap: 12px;
        padding-right: 16px;
    }

    .landing-season-card {
        width: min(84vw, 310px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

/* --- Bottom CTA --- */
.landing-bottom-cta {
    padding: 80px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-bottom-cta::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.landing-bottom-cta h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 300;
    color: var(--charcoal);
    line-height: 1.2;
    margin-bottom: 12px;
    max-width: 400px;
}

.landing-bottom-cta h2 em {
    font-style: italic;
    color: var(--gold);
}

.landing-bottom-cta p {
    font-size: 0.82rem;
    color: var(--slate);
    font-weight: 300;
    margin-bottom: 36px;
    max-width: 300px;
    line-height: 1.8;
}

.landing-final-btn {
    max-width: 340px;
}

.btn-primary {
    background: var(--charcoal);
    color: white;
    border: none;
    padding: 18px 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    box-shadow: none;
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    background: white;
    color: var(--charcoal);
    border: 1px solid var(--charcoal);
    padding: 16px 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.btn-secondary:active {
    background: var(--charcoal);
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 16px 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: var(--danger);
}

.btn-danger:active {
    background: var(--danger);
    color: white;
}

.privacy-note {
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--slate);
    font-weight: 300;
}

.inapp-upload-warning {
    margin-top: 10px;
    text-align: center;
    border: 1px solid rgba(201, 168, 106, 0.32);
    background: rgba(201, 168, 106, 0.08);
    padding: 10px 12px;
    border-radius: 2px;
}

.inapp-upload-warning p {
    font-size: 0.68rem;
    color: #8a5a18;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 8px;
}

.inapp-open-browser-btn {
    background: transparent;
    border: 1px solid rgba(138, 90, 24, 0.45);
    color: #8a5a18;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 2px;
}

.inapp-open-browser-btn:hover {
    background: rgba(138, 90, 24, 0.08);
}

/* Auth Screen */
.auth-content {
    padding: 48px 32px 40px;
    max-width: 400px;
    margin: 0 auto;
}

/* Decorative wordmark on auth screen */
#authScreen .auth-content::before {
    content: 'Proper Fit';
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    color: var(--charcoal);
    text-align: center;
    margin-bottom: 8px;
}

#authScreen .auth-content::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 0 auto 40px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
    justify-content: center;
}

.auth-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: var(--charcoal);
    border-bottom-color: var(--gold);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-input {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    transition: all 0.25s ease;
    background: white;
    color: var(--charcoal);
    letter-spacing: 0.02em;
    width: 100%;
    display: block;
}

.auth-input::placeholder {
    color: rgba(107, 114, 128, 0.55);
    font-weight: 300;
}

.auth-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.08);
}

.auth-note {
    margin-top: 24px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--slate);
    text-align: center;
    opacity: 0.7;
}

.auth-note-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-note-link:hover {
    color: var(--charcoal);
}

.auth-link-btn {
    background: transparent;
    border: none;
    color: var(--slate);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 2px 0 0;
    cursor: pointer;
}

.auth-link-btn:hover {
    color: var(--charcoal);
}

.auth-link-secondary {
    margin: 10px auto 0;
    display: block;
    text-align: center;
}

/* Upload Screen */
.upload-content {
    padding: 32px 28px;
    min-height: calc(100vh - 70px);
    max-width: 500px;
    margin: 0 auto;
}

.upload-instructions {
    border-radius: 2px;
    padding: 24px 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
    background: white;
    position: relative;
    overflow: hidden;
}

.upload-instructions::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.upload-instructions h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    color: var(--charcoal);
}

.upload-instructions ul {
    list-style: none;
    padding: 0;
}

.upload-instructions li {
    padding: 7px 0;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--slate);
    position: relative;
    padding-left: 18px;
    letter-spacing: 0.02em;
}

.upload-instructions li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.5rem;
    top: 11px;
}

/* Intent Selector */
.intent-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.intent-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.intent-option:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.intent-option input[type="radio"] {
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--gold);
}

.intent-option input[type="radio"]:checked ~ .intent-content {
    color: var(--charcoal);
}

.intent-option:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.intent-content {
    flex: 1;
}

.intent-title {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--charcoal);
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}

.intent-description {
    font-size: 0.75rem;
    color: var(--slate);
    font-weight: 300;
}

.upload-area {
    position: relative;
    margin-bottom: 24px;
}

.upload-guidance {
    margin: -8px 0 24px;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--slate);
    text-align: center;
    font-weight: 300;
}

.upload-placeholder {
    border: 1px dashed rgba(201, 168, 106, 0.5);
    border-radius: 2px;
    padding: 56px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
    position: relative;
}

.upload-placeholder:hover, .upload-placeholder:active {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.upload-icon {
    display: block;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: 0.8;
}

.upload-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    opacity: 0.8;
}

#imageInput {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Desktop upload input — full-area invisible overlay */
.upload-input-desktop {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Mobile two-button upload row — hidden on desktop */
.upload-mobile-btns {
    display: none;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
}

.upload-mobile-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--charcoal);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-mobile-btn:active {
    background: var(--gold-pale);
    border-color: var(--gold);
}

.upload-mobile-btn-icon {
    width: 28px;
    height: 28px;
    color: var(--charcoal);
    opacity: 0.7;
    flex-shrink: 0;
}

/* On touch devices: desktop input hidden, mobile buttons shown — toggled by JS on init */

/* When mobile buttons are active, placeholder is not a tap target */
.upload-placeholder.is-mobile {
    cursor: default;
    padding: 36px 24px;
}

.image-preview {
    display: none;
    width: 100%;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.image-preview.visible {
    display: block;
}

/* Analysis Screen */
.analysis-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Ambient glow behind spinner */
.analysis-content::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201,168,106,0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    pointer-events: none;
}

.spinner-container {
    margin-bottom: 40px;
    position: relative;
}

.spinner {
    border: 1px solid rgba(201, 168, 106, 0.15);
    border-top: 2px solid var(--gold);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.analysis-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.analysis-subtitle {
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 44px;
    opacity: 0.7;
}

.progress-bar {
    width: 100%;
    max-width: 200px;
    height: 1px;
    background: rgba(201, 168, 106, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gold), rgba(201, 168, 106, 0.6));
    width: 0;
    animation: progress 3s ease-out forwards;
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Results Screen */
.results-content {
    padding: 36px 28px 100px;
    max-width: 540px;
    margin: 0 auto;
}

.season-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    padding-bottom: 0;
}

.season-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 8vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--charcoal);
    margin-bottom: 24px;
    line-height: 1.1;
}

.season-description {
    font-size: 0.88rem;
    line-height: 1.9;
    color: var(--slate);
    font-weight: 300;
    max-width: 360px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
}

.palette-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}

.secondary-palette-section {
    margin-bottom: 40px;
    padding: 28px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
}

.secondary-palette-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.secondary-palette-header {
    margin-bottom: 20px;
}

.secondary-palette-header h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--charcoal);
    margin: 0 0 8px 0;
}

.secondary-palette-header p {
    color: var(--slate);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}

.palette-grid-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 240px;
    margin: 0 auto;
}

.palette-grid-small .color-swatch {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.color-swatch:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.color-swatch:active {
    transform: scale(0.95);
}

.color-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 4px;
    font-size: 0.6rem;
    text-align: center;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 0 0 3px 3px;
}

.color-swatch:active .color-label {
    opacity: 1;
}

.characteristics-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.locked-profile-shell {
    position: relative;
}

.characteristics-list {
    background: white;
    border-radius: 2px;
    padding: 8px 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.characteristics-list::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.locked-profile-shell.is-locked .characteristics-list {
    filter: blur(2.2px);
    opacity: 0.97;
    pointer-events: none;
    user-select: none;
}

.locked-profile-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(248, 243, 236, 0.08) 0%, rgba(248, 243, 236, 0.28) 42%, rgba(248, 243, 236, 0.62) 100%);
}

.locked-profile-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.04) 48%, rgba(255, 255, 255, 0.14) 100%);
    pointer-events: none;
}

.locked-profile-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(201, 168, 106, 0.32);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    padding: 24px 20px;
}

.locked-profile-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.52rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 10px;
    line-height: 1.18;
}

.locked-profile-card p {
    margin-bottom: 18px;
    font-size: 0.82rem;
    line-height: 1.72;
    color: var(--slate);
}

.results-actions-divider {
    width: min(100%, 280px);
    height: 1px;
    margin: 0 auto 18px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.7;
}

.characteristic-item {
    padding: 14px 0;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--charcoal);
    border-bottom: 1px solid var(--border-soft);
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
}

.characteristic-item:last-child {
    border-bottom: none;
}

.characteristic-item::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.5rem;
    top: 18px;
}

/* Upgrade CTA */
.upgrade-cta {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.upgrade-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 36px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.upgrade-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.upgrade-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.upgrade-card p {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--slate);
    margin-bottom: 24px;
    line-height: 1.7;
}

.upgrade-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
    padding: 0;
}

.upgrade-features li {
    padding: 9px 0;
    font-size: 0.83rem;
    color: var(--charcoal);
    border-bottom: 1px solid var(--border-soft);
    font-weight: 300;
}

.upgrade-features li:last-child {
    border-bottom: none;
}

.actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeInUp 0.6s ease-out 0.6s both;
    align-items: center;
}

.actions-section .btn-full {
    width: 100%;
}

.actions-section .btn-small {
    min-width: 190px;
}

.share-palette-btn {
    min-width: 0;
    width: auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (max-width: 768px) {
    .results-content {
        padding: 28px 20px 88px;
    }

    .secondary-palette-section {
        padding: 24px 18px;
    }

    .locked-profile-overlay {
        padding: 14px;
    }

    .locked-profile-card {
        padding: 22px 18px;
    }

    .locked-profile-card h3 {
        font-size: 1.4rem;
    }

    .results-actions-divider {
        margin-bottom: 16px;
    }

    .actions-section .btn-small {
        width: 100%;
        min-width: 0;
    }

    .share-palette-btn {
        width: auto;
    }
}

/* Dashboard Screen */
/* =============================================
   HISTORY FEED (My Looks screen)
   ============================================= */

.history-content {
    padding: 28px 24px;
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* --- Primary CTA hero --- */
.home-cta-block {
    text-align: center;
    padding: 44px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    position: relative;
}

.home-cta-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.9rem, 6.5vw, 2.6rem);
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: 10px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.home-cta-sub {
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--slate);
    margin-bottom: 28px;
    line-height: 1.7;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Pro chat block --- */
.home-chat-block {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 20px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.home-chat-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.home-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-chat-label {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}

.home-chat-open-btn {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    font-weight: 500;
}

.home-chat-open-btn:hover { opacity: 0.6; }

.home-chat-prompts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-chat-prompt {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 10px 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.92rem;
    color: var(--charcoal);
    cursor: pointer;
    text-align: left;
    font-style: italic;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.home-chat-prompt:hover {
    background: var(--gold-pale);
    border-color: var(--gold);
}

/* Compact palette identity strip */
.history-palette-card {
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px 20px 12px;
    margin-bottom: 16px;
    background: white;
    position: relative;
    overflow: hidden;
}

.history-palette-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.history-palette-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    margin-bottom: 10px;
}

.history-palette-label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 3px;
    font-weight: 500;
}

.history-palette-season {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-palette-swatches {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.history-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.history-palette-link {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    cursor: pointer;
    white-space: nowrap;
    padding: 0;
    transition: color 0.2s;
    display: block;
    width: 100%;
    text-align: right;
    padding-top: 4px;
    border-top: 1px solid var(--border-soft);
}

.history-palette-link:hover { color: var(--charcoal); }

/* Usage pill */
.history-usage {
    text-align: center;
    padding: 9px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 20px;
}

.history-usage p {
    font-size: 0.73rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--slate);
}

.history-usage-warning { background: rgba(197, 123, 87, 0.05); border-color: rgba(197,123,87,0.3); }
.history-usage-warning p { color: var(--terracotta); }
.history-usage-upgrade {
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-weight: 500;
}

/* Feed header */
.history-feed-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}

.history-feed-label {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--slate);
    opacity: 0.6;
}

/* Feed */
.history-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px 40px;
    gap: 10px;
}

.history-empty-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

.history-empty-sub {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--slate);
    line-height: 1.75;
    margin-bottom: 20px;
    max-width: 240px;
}

/* History cards */
.history-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInUp 0.35s ease both;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
    border-color: rgba(201, 168, 106, 0.4);
    box-shadow: var(--shadow-card);
}

.history-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.history-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-card-type {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    opacity: 0.7;
}

.history-card-date {
    font-size: 0.6rem;
    color: var(--slate);
    opacity: 0.45;
}

.history-card-date::before {
    content: '·';
    margin-right: 6px;
}

.history-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--charcoal);
    line-height: 1.3;
}

.history-card-explanation {
    font-size: 0.78rem;
    color: var(--slate);
    font-weight: 300;
    line-height: 1.7;
}

.history-card-actions {
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-delete-btn {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    color: var(--slate);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.history-delete-btn:hover { opacity: 0.8; }

/* Verdict badges */
.history-verdict-badge {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.verdict-great      { background: rgba(155,161,123,0.15); color: #4a5828; }
.verdict-good       { background: rgba(201,168,106,0.15); color: #7a5f28; }
.verdict-needs-work { background: rgba(197,123,87,0.13);  color: #8a3f18; }
.verdict-avoid      { background: rgba(220,38,38,0.08);   color: #a01818; }

/* Keep subscription-status for account screen */
.subscription-status { margin-bottom: 20px; }
.status-text { font-size: 1.1rem; font-weight: 500; color: var(--charcoal); margin-bottom: 4px; }
.status-subtext { font-size: 0.9rem; color: var(--slate); }

/* =============================================
   CHAT UPGRADE MODAL
   ============================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 44, 44, 0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#outfitGeneratorModal,
#outfitResultModal {
    align-items: center;
}

#outfitGeneratorModal .modal-sheet,
#outfitResultModal .modal-sheet {
    border-radius: 12px;
    border-top: none;
    animation: fadeIn 0.2s ease;
}

.modal-sheet {
    background: var(--cream);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0;
    padding: 40px 32px 48px;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border-top: 2px solid var(--gold);
}

/* gold accent line is handled by border-top on .modal-sheet */

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--slate);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
    opacity: 0.5;
}

.modal-close:hover { color: var(--charcoal); opacity: 1; }

.modal-icon {
    font-size: 1.8rem;
    margin-bottom: 14px;
    opacity: 0.8;
}

.modal-icon-check {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.2rem;
    color: var(--gold);
}

.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.modal-body {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--slate);
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.modal-prompts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 28px;
}

.modal-prompt-example {
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--charcoal);
    opacity: 0.6;
}

.modal-dismiss {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--slate);
    cursor: pointer;
    margin-top: 16px;
    padding: 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.5;
    display: block;
    width: 100%;
    transition: opacity 0.2s;
}

.modal-dismiss:hover { opacity: 0.9; }

/* Share Palette Modal */
.share-modal-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.share-preview-wrap {
    width: 100%;
    max-width: 280px;
    margin: 16px auto 20px;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border: 1.5px solid var(--border);
}

.share-preview-wrap.is-square {
    aspect-ratio: 1 / 1;
}

.share-preview-wrap.is-story {
    aspect-ratio: 9 / 16;
}

.share-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.share-social-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.share-format-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
    font-size: 0.8rem;
    color: var(--slate);
}

.share-format-row select {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
}

.share-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 6px;
}

.share-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: opacity 0.2s;
    border: 1px solid var(--border);
}

.share-social-btn:hover { opacity: 0.8; }

.share-social-pinterest {
    background: #E60023;
    color: #fff;
    border-color: #E60023;
}

.share-social-instagram {
    background: var(--charcoal);
    color: var(--cream);
    border-color: var(--charcoal);
}

.share-social-hint {
    font-size: 0.68rem;
    color: var(--slate);
    opacity: 0.6;
    margin-top: 10px;
    letter-spacing: 0.02em;
}

#shareCaptionPreview {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 12px;
    line-height: 1.4;
}

/* Account Screen */
.account-content {
    padding: 40px 28px 80px;
    max-width: 520px;
    margin: 0 auto;
}

.account-intro {
    font-size: 0.78rem;
    color: var(--slate);
    font-weight: 300;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

/* Account sections — no floating cards, just clean rows */
.account-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,247,242,0.9));
    border-radius: 2px;
    padding: 22px 24px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 18px rgba(44, 44, 44, 0.04);
}

.account-card:hover {
    border-color: rgba(201, 168, 106, 0.38);
    box-shadow: 0 8px 26px rgba(44, 44, 44, 0.06);
}

.account-card:last-child {
    margin-bottom: 0;
}

.account-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.account-card p {
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: 0;
    letter-spacing: 0.01em;
}

.account-danger-note {
    font-size: 0.72rem !important;
    color: var(--slate) !important;
    margin-bottom: 0 !important;
}

/* When there's a button inside an account card, give it top margin */
.account-card .btn-secondary,
.account-card .btn-danger {
    margin-top: 14px;
    margin-bottom: 0;
}

/* Make the logout/delete cards more compact — no label needed */
.account-card:not(:has(h3)) {
    padding: 8px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.account-delete-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-delete-link {
    border: none;
    background: none;
    color: rgba(220, 38, 38, 0.78);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 0;
}

.account-delete-link:hover {
    color: var(--danger);
}

.modal-overlay-centered {
    align-items: center;
}

.modal-overlay-centered .modal-sheet {
    border-radius: 6px;
    max-width: 520px;
    width: calc(100% - 32px);
    max-height: 88vh;
    border-top-width: 1px;
}

@media (max-width: 768px) {
    .account-delete-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Toasts */
.error-toast, .success-toast {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-size: 0.9rem;
}

.error-toast {
    background: var(--terracotta);
    color: white;
}

.success-toast {
    background: var(--sage);
    color: white;
}

.error-toast.visible, .success-toast.visible {
    transform: translateY(0);
}

/* Comparison Modal — extends base .modal-overlay above */
.modal-content {
    background: white;
    border-radius: 2px;
    max-width: 760px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(44, 44, 44, 0.2);
    border: 1px solid var(--border);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.modal-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    color: var(--charcoal);
    margin: 0 0 12px 0;
    text-align: center;
}

.modal-description {
    color: var(--slate);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 32px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.comparison-column {
    display: flex;
    flex-direction: column;
}

.comparison-column h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--slate);
    margin: 0 0 16px 0;
    text-align: center;
}

.comparison-palette-card {
    background: var(--cream);
    border: 1px solid var(--sand);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.comparison-palette-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--charcoal);
    margin: 0 0 12px 0;
    text-align: center;
}

.comparison-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.comparison-colors > div {
    aspect-ratio: 1;
    border-radius: 2px;
}

.comparison-secondary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--sand);
}

.comparison-secondary p {
    font-size: 0.9rem;
    color: var(--slate);
    margin: 0 0 8px 0;
    text-align: center;
}

.comparison-colors-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.comparison-colors-small > div {
    aspect-ratio: 1;
    border-radius: 2px;
}

/* Comparison modal is centered + scrollable, not a bottom sheet */
#comparisonModal {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 20px;
}

@media (max-width: 768px) {
    #comparisonModal {
        padding: 20px 12px;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 24px;
        max-height: none; /* let the overlay scroll instead */
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    bottom: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 247, 242, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Helper Text */
.help-text {
    font-size: 0.85rem;
    color: var(--slate);
}

.help-text a {
    color: var(--gold);
    text-decoration: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .upload-content {
        max-width: 500px;
        margin: 0 auto;
    }

    .results-content {
        max-width: 540px;
        margin: 0 auto;
    }
    
    .palette-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* === Palette Library === */
.palette-card {
    background: white;
    border-radius: 2px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.palette-library-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 22px 20px 24px;
    background: linear-gradient(180deg, rgba(201, 168, 106, 0.12) 0%, rgba(255, 255, 255, 0.96) 100%);
    border: 1px solid rgba(201, 168, 106, 0.2);
    border-radius: 2px;
    text-align: center;
}

.palette-library-cta-copy {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--charcoal);
}

.palette-library-cta .btn-primary {
    min-width: 220px;
}

.palette-card:hover {
    border-color: rgba(201, 168, 106, 0.4);
}

.palette-card-header {
    width: 100%;
    background: white;
    border: none;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
}

.palette-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--charcoal);
}

.palette-mini-swatches {
    display: flex;
    gap: 5px;
}

.mini-swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.palette-card-body {
    padding: 4px 20px 20px;
}

.palette-desc {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--slate);
    margin: 0 0 18px 0;
    line-height: 1.8;
}

.palette-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--charcoal);
    border-bottom: 1px solid rgba(201, 168, 106, 0.35);
    padding-bottom: 3px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.palette-guide-link::after {
    content: '→';
    font-size: 0.85rem;
    line-height: 1;
}

.palette-guide-link:hover,
.palette-guide-link:focus-visible {
    color: var(--gold);
    border-color: var(--gold);
}

.palette-swatch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.palette-swatch-grid-3up {
    grid-template-columns: repeat(3, 1fr);
}

.palette-characteristics .characteristic-item {
    border-bottom: 1px solid var(--border);
}
.palette-characteristics .characteristic-item:last-child {
    border-bottom: none;
}

/* === Saved Items === */
.saved-item {
    border-top: 1px solid var(--border);
    padding: 14px 0;
}
.saved-item:first-child {
    border-top: none;
    padding-top: 0;
}
.saved-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

/* ============================================================================
   CHAT SCREEN STYLES
   ============================================================================ */

#chat {
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(201, 168, 106, 0.14), transparent 60%),
        radial-gradient(900px 500px at 90% -10%, rgba(44, 44, 44, 0.08), transparent 58%),
        linear-gradient(180deg, #fdfaf4 0%, #f7f1e7 100%);
    padding-top: 0;
    overflow: hidden;
    overscroll-behavior-y: none;
}

.chat-container {
    max-width: 680px;
    margin: 24px auto;
    height: var(--chat-viewport-height);
    min-height: var(--chat-viewport-height);
    display: flex;
    flex-direction: column;
    max-height: calc(var(--chat-viewport-height) - 48px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(201, 168, 106, 0.24);
    border-radius: 24px;
    box-shadow: 0 20px 70px rgba(44, 44, 44, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    overscroll-behavior-y: none;
}

.chat-header {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(201, 168, 106, 0.25);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 237, 0.96));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 72px;
    padding-right: 72px;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.chat-title-section {
    flex: 1;
    text-align: center;
}

.chat-title-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    color: var(--charcoal);
    text-transform: uppercase;
    line-height: 1.05;
}

.chat-subtitle {
    color: var(--slate);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin: 0;
    text-transform: uppercase;
    opacity: 0.78;
}

/* Outfit context banner */
.chat-outfit-context {
    display: flex;
    gap: 14px;
    padding: 14px 24px 16px;
    background: linear-gradient(90deg, rgba(201, 168, 106, 0.08), rgba(255, 255, 255, 0.4));
    border-bottom: 1px solid rgba(201, 168, 106, 0.2);
    align-items: center;
}

.chat-outfit-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(201, 168, 106, 0.3);
}

.chat-outfit-info {
    flex: 1;
}

.chat-outfit-title-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--charcoal);
    display: block;
    margin-bottom: 3px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    padding: 0;
    text-decoration: none;
}

.link-btn:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Messages area */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 30px 24px;
    background:
        radial-gradient(1000px 300px at -20% 0%, rgba(201, 168, 106, 0.06), transparent 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 242, 0.96));
}

.chat-message {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #d6b27a, #c09a5b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    border: 1px solid rgba(201, 168, 106, 0.42);
    box-shadow: 0 4px 14px rgba(201, 168, 106, 0.25);
}

.chat-message.user .chat-message-avatar {
    background: linear-gradient(145deg, #444, #252525);
    border-color: rgba(44, 44, 44, 0.5);
    box-shadow: 0 4px 14px rgba(44, 44, 44, 0.26);
}

.chat-message-content {
    max-width: 72%;
    padding: 14px 18px 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    line-height: 1.72;
    font-size: 0.87rem;
    border: 1px solid rgba(201, 168, 106, 0.26);
    box-shadow: 0 8px 24px rgba(44, 44, 44, 0.08);
}

.chat-message.user .chat-message-content {
    background: linear-gradient(145deg, #2f2f2f, #1f1f1f);
    color: white;
    border-color: rgba(255, 255, 255, 0.08);
    font-weight: 300;
    box-shadow: 0 10px 26px rgba(44, 44, 44, 0.3);
}

.chat-message-content p {
    margin: 0;
}

.chat-message-content p + p {
    margin-top: 8px;
}

/* Typing indicator */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: typing 1.4s infinite;
    opacity: 0.4;
}

.chat-typing span:nth-child(2) { 
    animation-delay: 0.2s; 
}

.chat-typing span:nth-child(3) { 
    animation-delay: 0.4s; 
}

@keyframes typing {
    0%, 60%, 100% { 
        opacity: 0.3; 
        transform: translateY(0);
    }
    30% { 
        opacity: 1; 
        transform: translateY(-4px);
    }
}

/* Input area */
.chat-input-container {
    padding: 16px 24px calc(76px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(201, 168, 106, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 247, 242, 0.92));
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid rgba(201, 168, 106, 0.26);
    border-radius: 16px;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    resize: none;
    max-height: 120px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--charcoal);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 106, 0.1);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--charcoal), #1c1c1c);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.24s ease;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(44, 44, 44, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.chat-send-btn:not(:disabled):hover {
    background: linear-gradient(145deg, var(--gold), #b99453);
    transform: scale(1.05);
    box-shadow: 0 10px 24px rgba(201, 168, 106, 0.35);
}

/* Chat CTA Card (on results screen) */
.chat-cta-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
    margin: 28px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.chat-cta-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.chat-cta-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.chat-cta-content p {
    color: var(--slate);
    margin-bottom: 20px;
    font-size: 0.83rem;
    font-weight: 300;
    line-height: 1.7;
}

/* Upgrade CTA inline */
.upgrade-cta-inline {
    padding: 18px 24px;
    background: var(--cream);
    border-top: 1px solid var(--border);
    text-align: center;
}

.upgrade-cta-inline p {
    margin-bottom: 12px;
    color: var(--charcoal);
    font-size: 0.85rem;
    font-weight: 300;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.75rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-container {
        height: var(--chat-viewport-height);
        min-height: var(--chat-viewport-height);
        max-height: var(--chat-viewport-height);
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .chat-message-content {
        max-width: 82%;
    }
    
    .chat-input-container {
        padding: 12px 16px calc(72px + env(safe-area-inset-bottom));
    }

    .chat-header {
        padding-left: 64px;
        padding-right: 64px;
    }

    .chat-title-section h2 {
        font-size: 1.25rem;
        letter-spacing: 0.06em;
    }

    .chat-subtitle {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }
}

/* ============================================================================
   STYLE PROFILE ONBOARDING
   ============================================================================ */

#styleProfileScreen {
    background: var(--cream);
    padding-top: 0;
}

.onboarding-container {
    max-width: 560px;
    margin: 48px auto;
    padding: 48px 40px;
    background: white;
    border-radius: 2px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.onboarding-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 40px;
}

.onboarding-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    color: var(--charcoal);
}

.onboarding-header p {
    color: var(--slate);
    font-size: 0.82rem;
    font-weight: 300;
    margin-bottom: 28px;
    line-height: 1.7;
}

.onboarding-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.progress-bar {
    width: 100%;
    max-width: 200px;
    height: 1px;
    background: rgba(201, 168, 106, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gold), rgba(201, 168, 106, 0.5));
    transition: width 0.3s ease;
    width: 33%;
}

.progress-text {
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    opacity: 0.6;
}

/* Form sections */
.form-section {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 14px;
}

.form-help {
    color: var(--slate);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    margin: -10px 0 14px 0;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.radio-option:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.radio-option input[type="radio"] {
    cursor: pointer;
    accent-color: var(--gold);
}

.radio-option:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.radio-option span {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--charcoal);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.checkbox-option:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.checkbox-option input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--gold);
}

.checkbox-option:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.checkbox-option span {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--charcoal);
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    resize: vertical;
    min-height: 80px;
    background: white;
    color: var(--charcoal);
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.06);
}

/* Navigation buttons */
.onboarding-nav {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}

.onboarding-nav .btn-secondary {
    flex: 1;
}

.onboarding-nav .btn-primary {
    flex: 2;
}

/* Mobile */
@media (max-width: 768px) {
    .onboarding-container {
        margin: 16px;
        padding: 28px 24px;
    }
    
    .radio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #onboardingComplete {
        font-size: 0.76rem;
        letter-spacing: 0.04em;
        white-space: normal;
        line-height: 1.2;
        padding: 14px 16px;
    }
}


.saved-item-link {
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.95rem;
}
.saved-item-link:hover {
    color: var(--gold);
}
.saved-item-explanation {
    color: var(--slate);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 10px;
}
.saved-item-actions {
    display: flex;
    gap: 10px;
}

.saved-item-verdict {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: white;
}
.verdict-great { background: #2F855A; }   /* green */
.verdict-good  { background: #2B6CB0; }   /* blue */
.verdict-ok    { background: #B7791F; }   /* amber */
.verdict-bad   { background: #C53030; }   /* red */
.verdict-unknown { background: #6B7280; } /* slate */

/* Small secondary button */
.btn-secondary.small {
    padding: 10px 16px;
    font-size: 0.75rem;
    margin-top: 0;
}
/* === ITEM ANALYSIS STYLES === */

/* Analysis Tabs */
.analysis-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.analysis-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.analysis-tab.active {
    color: var(--charcoal);
    border-bottom-color: var(--gold);
}

.analysis-mode {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Verdict Banner */
.verdict-banner {
    text-align: center;
    padding: 36px 28px;
    border-radius: 2px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.verdict-banner.great {
    background: linear-gradient(135deg, rgba(155,161,123,0.15) 0%, rgba(155,161,123,0.05) 100%);
    border: 1px solid rgba(155,161,123,0.3);
    color: var(--charcoal);
}

.verdict-banner.good {
    background: linear-gradient(135deg, rgba(201,168,106,0.12) 0%, rgba(201,168,106,0.04) 100%);
    border: 1px solid rgba(201,168,106,0.3);
    color: var(--charcoal);
}

.verdict-banner.avoid {
    background: linear-gradient(135deg, rgba(197,123,87,0.12) 0%, rgba(197,123,87,0.04) 100%);
    border: 1px solid rgba(197,123,87,0.3);
    color: var(--charcoal);
}

.verdict-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
    opacity: 0.8;
}

.verdict-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Analyzed Item Image */
.analyzed-item-image {
    margin-bottom: 36px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.analyzed-item-image img {
    width: 100%;
    display: block;
}

/* Analysis Sections */
.analysis-section {
    margin-bottom: 16px;
    padding: 24px 28px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.analysis-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.analysis-section p {
    color: var(--slate);
    line-height: 1.85;
    font-size: 0.88rem;
    font-weight: 300;
}

/* Preserve intentional line breaks in analysis copy blocks. */
#colorAnalysisText,
#explanationText,
#stylingTipsText {
    white-space: pre-line;
}

/* Usage Indicator */
.usage-indicator {
    border-radius: 2px;
    padding: 16px 20px;
}

/* Only show border/bg when it has content via JS-added classes */
.usage-indicator.warning {
    background: rgba(197, 123, 87, 0.04);
    border: 1px solid rgba(197, 123, 87, 0.3);
    border-color: rgba(197, 123, 87, 0.3);
}

/* Default non-warning state — only show if text is present via .active class */
.usage-indicator:not(.warning):not(:empty) {
    background: white;
    border: 1px solid var(--border);
}

.usage-indicator p:empty {
    display: none;
}

.usage-indicator:has(p:empty) {
    padding: 0;
}

.usage-indicator p {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--charcoal);
}

/* ========================================
   HAMBURGER MENU & SIDEBAR
   ======================================== */

/* ========================================
   HAMBURGER MENU & SIDEBAR
   ======================================== */

.hamburger-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: opacity 0.2s;
}

.hamburger-btn:hover { opacity: 0.6; }

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--charcoal);
    transition: transform 0.2s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--cream);
    border-right: 1px solid var(--border);
    z-index: 1002;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--charcoal);
    text-transform: uppercase;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--slate);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
    opacity: 0.6;
}

.sidebar-close:hover { color: var(--charcoal); opacity: 1; }

.sidebar-content {
    padding: 32px 0 60px;
}

.sidebar-user {
    text-align: center;
    padding: 0 28px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.sidebar-user-email {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.sidebar-user-tier {
    font-size: 0.62rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-nav-item {
    width: 100%;
    padding: 14px 28px;
    background: none;
    border: none;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.sidebar-nav-item:hover {
    color: var(--gold);
    background: rgba(201, 168, 106, 0.04);
}

.sidebar-nav-item.active {
    color: var(--gold);
}

.sidebar-upgrade-btn {
    margin: 8px 24px !important;
    width: calc(100% - 48px) !important;
    padding: 12px 20px !important;
    border: 1px solid var(--gold) !important;
    border-radius: 2px;
    color: var(--charcoal) !important;
    font-size: 0.68rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar-upgrade-btn:hover {
    background: var(--gold) !important;
    color: white !important;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 28px;
    width: calc(100% - 56px);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 44, 44, 0.35);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}



/* ========================================
   PRICING SCREEN
   ======================================== */

.pricing-content {
    padding: 24px 24px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

.pricing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px 24px 24px;
    position: relative;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pricing-card:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(201, 168, 106, 0.4);
}

.pricing-card-featured {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(201, 168, 106, 0.15);
}

.pricing-card-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.pricing-popular {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: white;
    padding: 4px 18px;
    border-radius: 0 0 6px 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.pricing-tier-badge {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 12px;
}

.pricing-tier-badge.tier-premium {
    color: var(--gold);
}

.pricing-tier-badge.tier-pro {
    color: var(--terracotta);
}

.pricing-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.pricing-tagline {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--slate);
    margin-bottom: 20px;
    line-height: 1.5;
}

.pricing-price {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}

.price-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

.price-period {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--slate);
    letter-spacing: 0.04em;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
    padding: 0;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 0.83rem;
    font-weight: 300;
    line-height: 1.4;
    border-bottom: 1px solid var(--border-soft);
    color: var(--charcoal);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.feature-included::before {
    content: '◆ ';
    color: var(--gold);
    font-size: 0.45rem;
    vertical-align: middle;
    margin-right: 6px;
}

.feature-excluded {
    color: var(--slate);
    opacity: 0.5;
}

.feature-excluded::before {
    content: '— ';
    margin-right: 4px;
    opacity: 0.5;
}

.pricing-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pricing-btn-label {
    display: block;
}

.pricing-btn-subline {
    display: block;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    line-height: 1.3;
}

.pricing-btn-primary {
    background: var(--charcoal);
    color: white;
}

.pricing-btn-primary:hover {
    background: var(--gold);
}

.pricing-btn-secondary {
    background: transparent;
    color: var(--slate);
    border: 1px solid var(--border);
}

.pricing-btn-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Current plan button state */
.pricing-btn-current {
    background: transparent;
    color: var(--slate);
    border: 1px solid var(--border);
    cursor: not-allowed;
    opacity: 0.55;
}

/* Current plan card highlight */
.pricing-card-current {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(201, 168, 106, 0.15);
}

.pricing-card-current::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* Two-column grid when free card is hidden (paying users) */
.pricing-grid-two-col {
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .pricing-grid-two-col {
        grid-template-columns: repeat(2, 1fr);
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Trial banner on pricing screen */
.pricing-trial-banner {
    background: rgba(201, 168, 106, 0.08);
    border: 1px solid rgba(201, 168, 106, 0.35);
    border-radius: 2px;
    padding: 14px 20px;
    margin-bottom: 28px;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--charcoal);
    line-height: 1.6;
    text-align: center;
}

/* Trial banner on dashboard */
.dash-trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(201, 168, 106, 0.08);
    border: 1px solid rgba(201, 168, 106, 0.35);
    border-radius: 2px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--charcoal);
    line-height: 1.5;
}

.dash-trial-banner-cta {
    background: none;
    border: 1px solid rgba(201, 168, 106, 0.6);
    color: var(--gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dash-trial-banner-cta:hover {
    background: rgba(201, 168, 106, 0.1);
}

.pricing-footer {
    text-align: center;
    color: var(--slate);
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.pricing-footer p {
    margin: 4px 0;
}

/* Pro card highlight flash — triggered from JS when arriving from chat upsell */
@keyframes proCardFlash {
    0%   { box-shadow: 0 4px 20px rgba(201, 168, 106, 0); border-color: var(--border); transform: scale(1); }
    25%  { box-shadow: 0 8px 40px rgba(197, 123, 87, 0.35); border-color: var(--terracotta); transform: scale(1.025); }
    55%  { box-shadow: 0 8px 40px rgba(197, 123, 87, 0.2); border-color: var(--terracotta); transform: scale(1.015); }
    100% { box-shadow: 0 4px 20px rgba(201, 168, 106, 0); border-color: var(--border); transform: scale(1); }
}

.pricing-card-pro-flash {
    animation: proCardFlash 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Chat upsell banner at top of pricing screen */
.pricing-chat-upsell-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(197, 123, 87, 0.06);
    border: 1px solid rgba(197, 123, 87, 0.3);
    border-radius: 2px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--charcoal);
    line-height: 1.5;
    animation: fadeInDown 0.4s ease-out;
}

.pricing-chat-upsell-text strong {
    font-weight: 500;
    color: var(--terracotta);
}

.pricing-chat-upsell-anchor {
    background: none;
    border: 1px solid rgba(197, 123, 87, 0.5);
    color: var(--terracotta);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pricing-chat-upsell-anchor:hover {
    background: rgba(197, 123, 87, 0.08);
}

/* Mobile pricing improvements */
@media (max-width: 767px) {
    .pricing-content {
        padding: 20px 16px 80px;
    }

    .pricing-card {
        padding: 24px 20px 20px;
    }

    /* On mobile, give Pro card a subtle terracotta top accent so it reads as distinct */
    #pricingProCard {
        border-top: 2px solid var(--terracotta);
    }

    .pricing-chat-upsell-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pricing-chat-upsell-anchor {
        align-self: flex-start;
    }
}

/* Billing interval toggle — pill segmented control */
.pricing-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.pricing-pill-toggle {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 3px;
    gap: 2px;
}

.pricing-pill-option {
    background: none;
    border: none;
    border-radius: 100px;
    padding: 8px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pricing-pill-option.active {
    background: var(--charcoal);
    color: white;
    font-weight: 500;
}

.pricing-pill-option:not(.active):hover {
    color: var(--charcoal);
}

.pricing-pill-badge {
    background: var(--terracotta);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 100px;
}

/* "Billed annually at X" footnote under price */
.price-billed-annually {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--slate);
    letter-spacing: 0.02em;
    margin-top: 4px;
    opacity: 0.75;
}

/* ========================================
   ABOUT SCREEN
   ======================================== */

.about-content {
    padding: 36px 28px 80px;
    max-width: 600px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-soft);
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.about-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.about-section p {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--slate);
    margin-bottom: 12px;
}

.about-section a {
    color: var(--gold);
    text-decoration: none;
}

.about-section a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.about-steps {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-soft);
}

.about-step:last-child {
    border-bottom: none;
}

.about-step-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--gold);
    flex-shrink: 0;
    line-height: 1;
    width: 28px;
    text-align: right;
    padding-top: 2px;
}

.about-step-content h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.about-step-content p {
    font-size: 0.82rem;
    color: var(--slate);
    margin: 0;
    line-height: 1.75;
    font-weight: 300;
}

/* ============================================================
   WARDROBE FEATURE STYLES
   Append this entire block to the end of styles.css
   ============================================================ */

/* --- Wardrobe Screen Layout --- */

.wardrobe-content {
    padding: 80px 20px 120px;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Tier Banner --- */

.wardrobe-tier-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gold-pale);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.75rem;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

.wardrobe-tier-banner-cta {
    background: none;
    border: 1px solid var(--gold);
    color: var(--charcoal);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
    white-space: nowrap;
    margin-left: 12px;
}

.wardrobe-tier-banner-cta:hover {
    background: var(--gold);
    color: white;
}

/* --- Toolbar (Search + Filter + Add) --- */

.wardrobe-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: stretch;
}

.wardrobe-search-wrap {
    flex: 1;
}

.wardrobe-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--charcoal);
    border-radius: 2px;
    outline: none;
    transition: border-color 0.2s;
}

.wardrobe-search-input::placeholder {
    color: var(--slate);
    font-weight: 300;
}

.wardrobe-search-input:focus {
    border-color: var(--gold);
}

.wardrobe-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1px solid var(--border);
    padding: 10px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--charcoal);
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 0.2s;
    white-space: nowrap;
}

.wardrobe-filter-btn:hover,
.wardrobe-filter-btn.active {
    border-color: var(--gold);
    color: var(--gold);
}

.wardrobe-filter-btn svg {
    opacity: 0.5;
}

.wardrobe-add-btn {
    background: var(--charcoal);
    color: white;
    border: none;
    padding: 10px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 2px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.wardrobe-add-btn:active {
    opacity: 0.85;
}

/* --- Filter Dropdown --- */

.wardrobe-filter-dropdown {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 16px;
}

.wardrobe-filter-group {
    margin-bottom: 14px;
}

.wardrobe-filter-group:last-of-type {
    margin-bottom: 12px;
}

.wardrobe-filter-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 8px;
}

.wardrobe-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wardrobe-filter-chip {
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--charcoal);
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s;
}

.wardrobe-filter-chip:hover {
    border-color: var(--gold);
}

.wardrobe-filter-chip.active {
    background: var(--charcoal);
    color: white;
    border-color: var(--charcoal);
}

.wardrobe-clear-filters {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    color: var(--slate);
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

/* --- Active Filter Chips --- */

.wardrobe-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.wardrobe-active-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-pale);
    border: 1px solid var(--border);
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--charcoal);
    border-radius: 2px;
}

.wardrobe-active-chip-remove {
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--slate);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* --- Item Count --- */

.wardrobe-item-count {
    font-size: 0.72rem;
    color: var(--slate);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

/* --- Grid --- */

.wardrobe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .wardrobe-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Item Card --- */

.wardrobe-card {
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    padding: 14px 12px 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.wardrobe-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-soft);
}

.wardrobe-card-icon {
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.8;
}

.wardrobe-card-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.wardrobe-card-colors {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.wardrobe-card-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--charcoal);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wardrobe-card-meta {
    font-size: 0.62rem;
    color: var(--slate);
    letter-spacing: 0.02em;
}

.wardrobe-card-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border-soft);
}

/* --- Empty State --- */

.wardrobe-empty {
    text-align: center;
    padding: 48px 20px;
}

.wardrobe-empty-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.wardrobe-empty-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.wardrobe-empty-sub {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--slate);
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.wardrobe-empty-hint {
    font-size: 0.72rem;
    color: var(--slate);
    margin-top: 16px;
    font-style: italic;
}

/* --- Generate Outfit CTA --- */

.wardrobe-generate-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--cream) 20%);
    z-index: 10;
}

.wardrobe-generate-cta .btn-primary {
    max-width: 600px;
    margin: 0 auto;
    display: block;
}

/* --- Modal Sheet Override for Wardrobe --- */

.wardrobe-modal-sheet {
    text-align: left;
    max-height: 92vh;
    padding-bottom: 32px;
}

.wardrobe-modal-sheet .modal-title {
    text-align: center;
    margin-bottom: 20px;
}

/* --- Photo Upload Button --- */

.wardrobe-photo-upload {
    text-align: center;
    margin-bottom: 20px;
}

.wardrobe-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px dashed var(--border);
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--charcoal);
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 0.2s;
    width: 100%;
    justify-content: center;
}

.wardrobe-photo-btn:hover {
    border-color: var(--gold);
}

.wardrobe-photo-btn svg {
    opacity: 0.5;
}

.wardrobe-photo-note {
    font-size: 0.65rem;
    color: var(--slate);
    margin-top: 6px;
    font-style: italic;
}

/* --- Detecting State --- */

.wardrobe-detecting {
    text-align: center;
    padding: 24px 0;
}

.wardrobe-detecting-text {
    font-size: 0.82rem;
    color: var(--slate);
}

/* --- Form Fields --- */

.wardrobe-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wardrobe-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wardrobe-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--charcoal);
}

.wardrobe-required {
    color: var(--terracotta);
}

.wardrobe-field-hint {
    font-size: 0.68rem;
    color: var(--terracotta);
    min-height: 1em;
}

.wardrobe-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--charcoal);
    border-radius: 2px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B7280' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    transition: border-color 0.2s;
}

.wardrobe-select:focus {
    border-color: var(--gold);
}

.wardrobe-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--charcoal);
    border-radius: 2px;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.wardrobe-textarea:focus {
    border-color: var(--gold);
}

/* --- Color Picker --- */

.wardrobe-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}

.wardrobe-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    position: relative;
}

.wardrobe-color-swatch:hover {
    transform: scale(1.15);
}

.wardrobe-color-swatch.selected {
    border-color: var(--charcoal);
    transform: scale(1.15);
}

.wardrobe-color-swatch.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* Light colors need dark checkmark */
.wardrobe-color-swatch.selected.light-color::after {
    color: var(--charcoal);
    text-shadow: none;
}

.wardrobe-color-none {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--slate);
    transition: border-color 0.15s;
    background: white;
}

.wardrobe-color-none:hover {
    border-color: var(--gold);
}

.wardrobe-color-none.selected {
    border-color: var(--charcoal);
}

/* --- Optional Fields Toggle --- */

.wardrobe-optional-toggle {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: var(--slate);
    cursor: pointer;
    padding: 8px 0;
    text-align: left;
    transition: color 0.2s;
}

.wardrobe-optional-toggle:hover {
    color: var(--charcoal);
}

.wardrobe-optional-toggle.open {
    color: var(--charcoal);
}

.wardrobe-optional-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Form Actions --- */

.wardrobe-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.wardrobe-form-actions .btn-secondary {
    margin-top: 8px;
    padding: 12px;
    font-size: 0.78rem;
}

/* --- AI confidence indicators --- */

.wardrobe-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    color: var(--sage);
    margin-left: 6px;
}

.wardrobe-ai-badge::before {
    content: '✓';
    font-weight: 700;
}

/* ── M4: Outfit Generator & Insights ─────────────────────── */
/* Append to end of styles.css */

/* Outfit score badge */
.outfit-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}
.outfit-score-badge.score-great {
    background: #E8F5E9;
    color: #2E7D32;
}
.outfit-score-badge.score-good {
    background: #FFF8E1;
    color: #F57F17;
}
.outfit-score-badge.score-low {
    background: #FBE9E7;
    color: #BF360C;
}

/* Outfit result items grid */
.outfit-result-items {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}
.outfit-result-item {
    flex: 0 0 auto;
    width: 90px;
    text-align: center;
}
.outfit-result-item-swatch {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 6px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.outfit-result-item-name {
    font-size: 0.65rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--charcoal);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.outfit-result-item-cat {
    font-size: 0.6rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Outfit result sections */
.outfit-result-section {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--gold-pale, #FAF5EB);
    border-radius: 2px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--charcoal);
}
.outfit-result-section-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate);
    margin-bottom: 4px;
}
.outfit-result-missing {
    background: #FFF8E1;
    border-left: 3px solid var(--gold);
}

/* ── Insights Section ──────────────────────────────────────── */

.wardrobe-insights {
    margin-top: 24px;
    padding-bottom: 20px;
}
.wardrobe-insights-header {
    margin-bottom: 14px;
}
.wardrobe-insights-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--charcoal);
}
.wardrobe-insight-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.wardrobe-insight-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate);
    margin-bottom: 8px;
}
.wardrobe-insight-content {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--charcoal);
}

/* Versatility list */
.insight-versatility-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.insight-versatility-name {
    font-size: 0.8rem;
    color: var(--charcoal);
}
.insight-versatility-count {
    font-size: 0.7rem;
    color: var(--slate);
    font-family: 'Montserrat', sans-serif;
}

/* Composition bars */
.insight-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.insight-bar-label {
    font-size: 0.7rem;
    color: var(--slate);
    min-width: 70px;
    text-transform: capitalize;
}
.insight-bar-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.insight-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gold);
    transition: width 0.3s ease;
}
.insight-bar-count {
    font-size: 0.65rem;
    color: var(--slate);
    min-width: 20px;
    text-align: right;
}

/* Gap suggestions */
.insight-gap-item {
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--charcoal);
    border-bottom: 1px solid var(--border);
}
.insight-gap-item:last-child {
    border-bottom: none;
}
.insight-gap-icon {
    margin-right: 6px;
}
