/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #FAF8F6;
    color: #2c2420;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.2rem;
}

.section {
    min-height: 100vh;
    min-height: 100dvh;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 0;
}

.section.active {
    display: flex;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    color: #1a1714;
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #1a1714;
    color: #FAF8F6;
    border: none;
    padding: 0.95rem 2.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.btn-primary:active {
    opacity: 0.85;
}

.btn-secondary {
    background: transparent;
    color: #1a1714;
    border: 1px solid #1a1714;
    padding: 0.85rem 2rem;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.btn-secondary:active {
    background: #1a1714;
    color: #FAF8F6;
}

/* ===== SURVEY ===== */
.survey-layout {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.survey-left { min-width: 0; order: 2; }
.survey-right { order: 1; }

.survey-header { margin-bottom: 1.2rem; }

.survey-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: #E8E4E0;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #1a1714;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 10%;
}

.progress-text {
    font-size: 0.68rem;
    color: #A89B93;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.question-container {
    background: white;
    border: 1px solid #E8E4E0;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
}

.question h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
    color: #1a1714;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid #E8E4E0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
    color: #4a3f39;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    background: white;
}

.option:active { background: #FAF5F2; }

.option.selected {
    border-color: #1a1714;
    background: #FAF8F6;
    color: #1a1714;
    font-weight: 500;
}

.option input[type="radio"] { display: none; }

.option-dot {
    width: 14px;
    height: 14px;
    border: 1.5px solid #C4B8B0;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.option.selected .option-dot {
    border-color: #1a1714;
    border-width: 2px;
}

.option.selected .option-dot::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: #1a1714;
    border-radius: 50%;
}

.survey-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.survey-nav .btn-primary { flex: 1; text-align: center; }

/* ===== BODY VISUALIZER ===== */
.body-visualizer {
    background: white;
    border: 1px solid #E8E4E0;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.body-canvas { width: 100px; }
.body-canvas svg { width: 100%; height: auto; display: block; }
#bodyShape { transition: d 0.5s ease; }

/* ===== PHILOSOPHY BOX ===== */
.philosophy-box {
    border: 1px solid #E8E4E0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.philosophy-box h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8C6B5A;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.philosophy-box p {
    font-size: 0.82rem;
    color: #5a4f49;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.philosophy-box p:last-child { margin-bottom: 0; }
.philosophy-box.compact { padding: 1.2rem; margin-bottom: 1.5rem; }

/* ===== RESULTS ===== */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E8E4E0;
}

.results-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.result-subtitle {
    font-size: 0.85rem;
    color: #8C6B5A;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.result-subtitle span { font-weight: 600; }

.result-description {
    font-size: 0.85rem;
    color: #6b5e57;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    border: 1px solid #E8E4E0;
    padding: 1.5rem;
}

.result-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1714;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-subtitle {
    font-size: 0.8rem;
    color: #A89B93;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.result-card ul { list-style: none; }

.result-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F0EBE7;
    font-size: 0.82rem;
    color: #3d3530;
    line-height: 1.5;
}

.result-card ul li:last-child { border-bottom: none; }

/* Color Palette */
.color-palette {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.color-swatch .color-name {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.58rem;
    color: #A89B93;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.color-tips {
    font-size: 0.8rem;
    color: #5a4f49;
    line-height: 1.7;
}

/* Occasion Tabs */
.occasion-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #E8E4E0;
}

.tab {
    padding: 0.6rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    color: #A89B93;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tab.active {
    border-bottom-color: #1a1714;
    color: #1a1714;
}

/* Outfit Grid */
.outfit-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.outfit-item {
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #F0EBE7;
    text-align: left;
}

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

.outfit-item .outfit-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.outfit-item h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1714;
    margin-bottom: 0.1rem;
}

.outfit-item p {
    font-size: 0.72rem;
    color: #A89B93;
}

/* Keywords */
.keywords-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.keyword-tag {
    background: #FAF8F6;
    border: 1px solid #E8E4E0;
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    color: #3d3530;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    user-select: all;
    letter-spacing: 0.01em;
}

.keyword-tag:active { background: #E8E4E0; }

/* Results Footer */
.results-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #E8E4E0;
}

.results-footer .btn-primary,
.results-footer .btn-secondary { width: 100%; }

/* ===== FOCUS SELECTOR ===== */
.focus-selector { width: 100%; }

.selector-intro {
    font-size: 0.8rem;
    color: #6b5e57;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.body-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.body-area-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid #E8E4E0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    background: white;
}

.body-area-btn:active { transform: scale(0.95); }
.body-area-btn.area-focus { border-color: #5a8a6b; background: #F2F8F4; }
.body-area-btn.area-defocus { border-color: #8C6B5A; background: #FAF5F2; }

.area-icon { font-size: 0.8rem; }
.area-name { font-weight: 500; color: #1a1714; font-size: 0.75rem; }

.dynamic-advice {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.advice-block {
    padding: 1rem;
    border: 1px solid #E8E4E0;
}

.advice-block h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #1a1714;
}

.advice-block ul { list-style: none; padding: 0; }
.advice-block ul li { padding: 0.25rem 0; font-size: 0.78rem; color: #5a4f49; line-height: 1.5; }

.focus-block { background: #F7FBF8; border-color: #D4E8DA; }
.defocus-block { background: #FDFAF8; border-color: #EDE0D4; }

.advice-note {
    font-size: 0.72rem;
    color: #A89B93;
    font-style: italic;
    margin-top: 0.5rem;
}

.area-header {
    font-weight: 600 !important;
    color: #8C6B5A !important;
    padding-top: 0.8rem !important;
    border-bottom: none !important;
    font-size: 0.8rem !important;
}

.note {
    font-style: italic;
    color: #A89B93 !important;
    font-size: 0.75rem !important;
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
    .container { padding: 2.5rem; }
    .section { padding: 2.5rem 0; align-items: center; }

    .survey-layout {
        display: grid;
        grid-template-columns: 1fr 240px;
        gap: 3rem;
        align-items: start;
    }
    .survey-left { order: 1; }
    .survey-right { order: 2; }
    .survey-header h2 { font-size: 1.8rem; }
    .question-container { padding: 2rem; }
    .question h3 { font-size: 1.15rem; }
    .option { padding: 0.9rem 1.2rem; font-size: 0.85rem; }

    .body-visualizer { position: sticky; top: 2rem; padding: 2.5rem 2rem; }
    .body-canvas { width: 140px; }

    .results-header h2 { font-size: 2.2rem; }
    .results-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }
    .result-card { padding: 2rem; }
    .result-card.full-width { grid-column: 1 / -1; }

    .outfit-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
    .outfit-item { border-bottom: none; border-right: 1px solid #F0EBE7; padding: 1rem; flex-direction: column; text-align: center; }
    .outfit-item:last-child { border-right: none; }

    .dynamic-advice {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .results-footer { flex-direction: row; justify-content: center; gap: 1rem; }
    .results-footer .btn-primary, .results-footer .btn-secondary { width: auto; }

    .btn-primary:hover { background: #3d3530; }
    .btn-secondary:hover { background: #1a1714; color: #FAF8F6; }
    .option:hover { border-color: #1a1714; }
    .body-area-btn:hover { border-color: #1a1714; }
    .tab:hover { color: #1a1714; }
    .color-swatch:hover { transform: scale(1.12); }
    .keyword-tag:hover { background: #E8E4E0; border-color: #C4B8B0; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.section.active .container { animation: fadeInUp 0.35s ease-out; }

/* ===== SAFE AREA ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .survey-nav { padding-bottom: env(safe-area-inset-bottom); }
    .results-footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ===== SHAPE PICKER ===== */
.options-shapes {
    gap: 0.5rem;
}

.option-shape {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid #E8E4E0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.option-shape:active { background: #FAF5F2; }

.option-shape.selected {
    border-color: #1a1714;
    background: #FAF8F6;
}

.option-shape input[type="radio"] { display: none; }

.shape-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 2.2rem;
    text-align: center;
}

.shape-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shape-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1714;
}

.shape-desc {
    font-size: 0.72rem;
    color: #A89B93;
    line-height: 1.4;
}

.option-shape.selected .shape-name {
    color: #1a1714;
}

.option-shape.selected .shape-desc {
    color: #5a4f49;
}
