/* css/components.css — Quiz, procedures, clinics, skincare, ingredients */

/* Quiz Styles */
.quiz-screen.hidden {
    display: none;
}

.quiz-intro-card {
    background: white;
    border-radius: 20px;
    padding: 40px 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.quiz-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.quiz-intro-card h2 {
    color: var(--secondary-pink);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.quiz-intro-card h3 {
    color: #888;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.quiz-intro-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.quiz-intro-card p.korean {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 25px;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

/* Question Container */
.question-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.question-text-korean {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 20px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: var(--light-pink);
    border: 2px solid transparent;
    padding: 15px 18px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.option-btn:hover {
    border-color: var(--primary-pink);
    transform: translateX(5px);
}

.option-btn .english {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 3px;
}

.option-btn .korean {
    display: block;
    color: #888;
    font-size: 0.85rem;
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.result-emoji {
    font-size: 5rem;
    margin-bottom: 15px;
}

.result-type {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-pink);
    margin-bottom: 5px;
}

.result-type-korean {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 10px;
}

.season-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.season-tip {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 12px 15px;
    border-radius: 10px;
    color: #2e7d32;
    font-size: 0.9rem;
    margin: 15px 0;
    border-left: 4px solid #4caf50;
}

.result-description {
    background: var(--light-pink);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.result-description h4 {
    color: var(--secondary-pink);
    margin-bottom: 10px;
    font-size: 1rem;
}

.result-description p {
    color: #666;
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.result-description ul {
    list-style: none;
    padding: 0;
}

.result-description li {
    padding: 8px 0;
    color: #555;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(196, 69, 105, 0.1);
}

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

.recommended-products {
    text-align: left;
    margin-bottom: 25px;
}

.recommended-products h4 {
    color: var(--secondary-pink);
    margin-bottom: 15px;
    font-size: 1rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light-pink);
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.product-emoji {
    font-size: 2rem;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.product-brand {
    color: #888;
    font-size: 0.8rem;
}

.product-arrow {
    color: var(--primary-pink);
    font-size: 1.2rem;
}

/* Procedures Section */
.section-title {
    text-align: center;
    color: var(--secondary-pink);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.section-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.procedures-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.procedures-guide-popup h2 {
    color: var(--secondary-pink);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.procedures-guide-subtitle {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.procedure-card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-pink);
    cursor: pointer;
    transition: all 0.3s ease;
}

.procedure-card:hover {
    box-shadow: 0 8px 30px rgba(196, 69, 105, 0.18);
}

.procedure-card-top {
    background: linear-gradient(135deg, #fffbf0 0%, #fff5f8 50%, #fff 100%);
    border-left: 4px solid #d4a843;
    box-shadow: 0 4px 20px rgba(180, 142, 58, 0.15), 0 0 0 1px rgba(212, 168, 67, 0.18);
    position: relative;
}

.procedure-card-top::before {
    content: '👑';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(180, 142, 58, 0.4));
}

.procedure-card-top .procedure-rank {
    background: linear-gradient(135deg, #d4a843 0%, #f0c860 40%, #b8912a 100%);
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(180, 142, 58, 0.35);
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

.procedure-card-top .procedure-title {
    font-size: 1.2rem;
    color: #8b6914;
}

.procedure-card-top .procedure-tags .tag:first-child {
    background: linear-gradient(135deg, #fdf6e3, #fef9ed);
    color: #a07d1c;
    border: 1px solid #e8d48b;
}

.procedure-card-top:hover {
    box-shadow: 0 10px 35px rgba(180, 142, 58, 0.22), 0 0 0 1px rgba(212, 168, 67, 0.25);
}

.procedure-card .procedure-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.procedure-card.open .procedure-body {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
}

.procedure-card .procedure-chevron {
    font-size: 0.7rem;
    color: #aaa;
    transition: transform 0.3s ease;
    display: inline-block;
}

.procedure-card.open .procedure-chevron {
    transform: rotate(180deg);
    color: var(--primary-pink);
}

.procedure-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.procedure-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.procedure-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-pink);
}

.procedure-title-korean {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
}

.procedure-rank {
    background: var(--gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.procedure-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    padding-top: 0;
}

.procedure-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    background: var(--light-pink);
    padding: 10px 12px;
    border-radius: 10px;
}

.detail-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.detail-value-sub {
    font-size: 0.75rem;
    color: #888;
}

.procedure-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: #f0f0f0;
    color: #666;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
}

/* Feature/Placeholder Cards */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    text-align: center;
    margin-bottom: 15px;
}

.placeholder-card {
    position: relative;
    border: 2px dashed #ddd;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--secondary-pink);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-korean {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.feature-desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.coming-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.subsection-title {
    color: var(--secondary-pink);
    font-size: 1rem;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Sub Tab Navigation */
.sub-tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 12px;
}

.sub-tab-btn {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sub-tab-btn.active {
    background: white;
    color: var(--secondary-pink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sub-tab-btn:hover:not(.active) {
    color: var(--primary-pink);
}

.sub-tab-panel {
    animation: fadeIn 0.3s ease;
}

.sub-tab-panel.hidden {
    display: none;
}

/* Clinic Section */

.clinic-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.filter-btn:hover:not(.active) {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
}

.clinics-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.clinic-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid #667eea;
}

.clinic-header {
    margin-bottom: 8px;
}

.clinic-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.clinic-name-kr {
    font-size: 0.85rem;
    color: #888;
}

.clinic-location {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
}

.clinic-rating {
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.clinic-rating .stars {
    color: #ffc107;
}

.clinic-rating .review-count {
    color: #888;
    font-size: 0.75rem;
}

.clinic-rating .review-link {
    color: #667eea;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s;
}

.clinic-rating .review-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.english-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.clinic-popular {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 6px;
}

.clinic-price {
    font-size: 0.85rem;
    color: #4caf50;
    font-weight: 600;
    margin-bottom: 10px;
}

.clinic-maps {
    display: flex;
    gap: 8px;
}

.map-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.map-btn:hover {
    opacity: 0.85;
}

.google-btn {
    background: #4285f4;
    color: white;
}

.naver-btn {
    background: #03c75a;
    color: white;
}

/* Season Selection */
.season-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.season-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 35px;
    border: 3px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-pink);
}

.season-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.summer-btn:hover {
    border-color: #ff9500;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.winter-btn:hover {
    border-color: #00bcd4;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.season-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.season-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.season-korean {
    font-size: 0.9rem;
    color: #888;
}

.back-btn {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Content Cards (Educational Content — Accordion) */
.content-card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-pink);
    cursor: pointer;
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 8px 30px rgba(196, 69, 105, 0.18);
}

.content-card h3 {
    color: var(--secondary-pink);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.content-subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-chevron {
    font-size: 0.7rem;
    color: #aaa;
    transition: transform 0.3s ease;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 10px;
}

.content-card.open .content-chevron {
    transform: rotate(180deg);
    color: var(--primary-pink);
}

.content-card-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.content-card.open .content-card-body {
    max-height: 8000px;
    opacity: 1;
    margin-top: 15px;
}

.content-text {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* 10-Step Routine */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: var(--light-pink);
    border-radius: 12px;
}

.step-num {
    background: var(--gradient);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-info {
    flex: 1;
}

.step-info strong {
    color: #333;
    font-size: 0.9rem;
}

.step-kr {
    color: #888;
    font-size: 0.8rem;
    margin-left: 6px;
}

.step-info p {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 4px;
}

/* Ingredient Grid */
.ingredient-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ingredient-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: var(--light-pink);
    border-radius: 12px;
}

.ingredient-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.ingredient-item strong {
    color: #333;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.ingredient-item p {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Tip List */
.tip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    padding: 12px 15px;
    background: var(--light-pink);
    border-radius: 12px;
    color: #555;
    font-size: 0.88rem;
    line-height: 1.6;
}

.tip-item strong {
    color: #333;
}

/* Face Shape Grid */
.face-shape-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.face-shape-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: var(--light-pink);
    border-radius: 12px;
}

.face-shape-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.face-shape-item strong {
    color: #333;
    font-size: 0.9rem;
}

.face-shape-item p {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 2px;
}

/* Makeup Guide */
.makeup-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.makeup-season {
    padding: 12px 15px;
    background: var(--light-pink);
    border-radius: 12px;
}

.makeup-season strong {
    color: var(--secondary-pink);
    font-size: 0.9rem;
}

.makeup-season p {
    color: #555;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 4px;
}

/* Food Guide */
.food-guide {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.food-section h4 {
    color: var(--secondary-pink);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.food-good, .food-bad {
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.food-good {
    background: #e8f5e9;
    color: #2e7d32;
}

.food-bad {
    background: #fce4ec;
    color: #c62828;
}

/* Skincare Routine Order Guide */
.routine-tab-nav {
    display: flex;
    gap: 0;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 4px;
    margin: 16px 0 12px;
}

.routine-tab-btn {
    flex: 1;
    padding: 11px 10px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.routine-tab-btn.active {
    background: white;
    color: var(--secondary-pink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.routine-tab-panel {
    animation: fadeIn 0.3s ease;
}

.routine-tab-panel.hidden {
    display: none;
}

.routine-tab-desc {
    color: #555;
    font-size: 0.84rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.routine-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 15px 0;
}

.routine-flow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    position: relative;
    transition: transform 0.2s ease;
}

.routine-flow-step:hover {
    transform: scale(1.02);
}

.routine-flow-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.routine-flow-info {
    flex: 1;
}

.routine-flow-info strong {
    font-size: 0.88rem;
    display: block;
}

.routine-flow-info .routine-kr {
    color: #888;
    font-size: 0.78rem;
}

.routine-flow-info p {
    color: #666;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 2px;
}

.routine-flow-time {
    font-size: 0.7rem;
    color: white;
    background: var(--gradient);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.routine-flow-arrow {
    display: flex;
    justify-content: center;
    padding: 2px 0;
    color: #ccc;
    font-size: 0.9rem;
}

.routine-water {
    background: linear-gradient(135deg, #e3f2fd, #e8f5e9);
}

.routine-water strong { color: #1565c0; }

.routine-oil {
    background: linear-gradient(135deg, #fff3e0, #fce4ec);
}

.routine-oil strong { color: #e65100; }

.routine-sun {
    background: linear-gradient(135deg, #fffde7, #fff9c4);
}

.routine-sun strong { color: #f57f17; }

.texture-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.texture-bar-bg {
    background: linear-gradient(90deg, #bbdefb 0%, #e1bee7 50%, #ffcc80 100%);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 15px 0;
}

.texture-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.texture-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.texture-label-left { color: #1565c0; }
.texture-label-right { color: #e65100; }

.texture-bar-arrow {
    color: #666;
    font-size: 1.2rem;
    font-weight: bold;
}

.routine-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 18px 0 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.routine-morning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57f17;
}

.routine-evening {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    color: #283593;
}

.mistake-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mistake-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 15px;
    background: #fff3e0;
    border-radius: 12px;
    border-left: 3px solid #ff9800;
}

.mistake-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mistake-item strong {
    color: #e65100;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 2px;
}

.mistake-item p {
    color: #555;
    font-size: 0.8rem;
    line-height: 1.5;
}

.skintype-routine-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skintype-routine-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--light-pink);
}

.skintype-routine-card strong {
    color: var(--secondary-pink);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.skintype-routine-card p {
    color: #555;
    font-size: 0.82rem;
    line-height: 1.6;
}

.routine-key-principle {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 12px 0;
    text-align: center;
}

.routine-key-principle .principle-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 6px;
}

.routine-key-principle .principle-text {
    color: var(--secondary-pink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
}

.routine-key-principle .principle-text-kr {
    color: #888;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* Sub-Accordions (nested inside content cards) */
.sub-accordion {
    background: #f9f9fb;
    border-radius: 12px;
    margin-top: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.sub-accordion:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sub-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

.sub-accordion-icon {
    font-size: 1.1rem;
    color: #aaa;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
}

.sub-accordion.open .sub-accordion-icon {
    transform: rotate(45deg);
    color: var(--primary-pink);
}

.sub-accordion-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 16px;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease;
}

.sub-accordion.open .sub-accordion-body {
    max-height: 2000px;
    opacity: 1;
    padding: 0 16px 14px;
}

/* Ingredient Analyzer */
.analyzer-tool {
    background: white;
    border-radius: 16px;
    padding: 28px 20px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--light-pink);
}

.analyzer-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.analyzer-title {
    color: var(--secondary-pink);
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.analyzer-title-kr {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.analyzer-desc {
    color: #666;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.analyzer-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    line-height: 1.5;
    color: #333;
}

.analyzer-textarea:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.analyzer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.analyzer-buttons .secondary-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.analyzer-btn {
    padding: 10px 22px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.analyzer-clear-btn {
    background: transparent;
    border: 2px solid #ddd;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.analyzer-clear-btn:hover {
    border-color: #bbb;
    color: #666;
}

.analyzer-results {
    text-align: left;
    margin-top: 20px;
}

.analyzer-results:empty {
    display: none;
}

.analyzer-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.analyzer-stat {
    background: #f8f8fa;
    border-radius: 10px;
    padding: 12px 6px;
    text-align: center;
}

.analyzer-stat-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary-pink);
}

.analyzer-stat-label {
    display: block;
    font-size: 0.68rem;
    color: #888;
    margin-top: 2px;
}

.analyzer-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.analyzer-row {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.analyzer-row:last-child {
    border-bottom: none;
}

.analyzer-row-active {
    background: #f0faf4;
    border-radius: 8px;
    padding: 10px 10px;
    margin-bottom: 4px;
    border-bottom: none;
}

.analyzer-row-warn {
    background: #fff8f0;
    border-radius: 8px;
    padding: 10px 10px;
    margin-bottom: 4px;
    border-bottom: none;
}

.analyzer-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.rating-great { background: #d4edda; color: #155724; }
.rating-good { background: #d1ecf1; color: #0c5460; }
.rating-average { background: #fff3cd; color: #856404; }
.rating-poor { background: #fde2cc; color: #984c0c; }
.rating-bad { background: #f8d7da; color: #721c24; }

.analyzer-row-info {
    flex: 1;
    min-width: 0;
}

.analyzer-row-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #333;
}

.analyzer-row-name-kr {
    font-size: 0.78rem;
    color: #aaa;
    margin-left: 4px;
}

.analyzer-row-meta {
    font-size: 0.72rem;
    color: #999;
    margin-top: 1px;
}

.analyzer-row-desc {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.4;
    margin-top: 3px;
}

.analyzer-unknown-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.analyzer-unknown-tag {
    background: #f0f0f0;
    color: #888;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Product Compatibility Checker */
.compat-inputs {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}

.compat-input-group {
    display: flex;
    flex-direction: column;
}

.compat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-pink);
    margin-bottom: 4px;
}

.compat-vs {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #ccc;
    padding: 4px 0;
}

.compat-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.compat-summary-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.compat-summary strong {
    font-size: 0.88rem;
}

.compat-summary-kr {
    font-size: 0.78rem;
    color: #888;
}

.compat-summary-bad {
    background: #fff0f0;
    border: 1px solid #ffcccc;
}

.compat-summary-warn {
    background: #fffbe6;
    border: 1px solid #ffe58f;
}

.compat-summary-good {
    background: #f0fff4;
    border: 1px solid #b7eb8f;
}

.compat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.compat-stat {
    font-size: 0.75rem;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 20px;
    color: #666;
}

.compat-stat-high { background: #fff0f0; color: #d32f2f; }
.compat-stat-med { background: #fffbe6; color: #d48806; }
.compat-stat-low { background: #f0fff4; color: #389e0d; }

.compat-active-warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.compat-active-warning strong {
    display: block;
    margin-bottom: 4px;
}

.compat-conflicts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compat-conflict-card {
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #eee;
}

.compat-card-high {
    background: #fff5f5;
    border-color: #ffcccc;
}

.compat-card-medium {
    background: #fffde6;
    border-color: #ffe58f;
}

.compat-card-low {
    background: #f6ffed;
    border-color: #b7eb8f;
}

.compat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.compat-severity {
    font-size: 0.72rem;
    font-weight: 600;
}

.compat-card-header strong {
    font-size: 0.88rem;
}

.compat-card-msg {
    font-size: 0.82rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 2px;
}

.compat-card-msg-kr {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 6px;
}

.compat-card-tip {
    font-size: 0.8rem;
    color: #555;
    background: rgba(255,255,255,0.6);
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1.4;
}

/* ========== Ingredient Label Scanner (inline) ========== */
.ia-scan-area {
    margin-top: 16px;
}

.ia-scan-area.hidden {
    display: none;
}

.ia-camera-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ia-camera-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-camera-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-scan-guide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ia-scan-frame {
    width: 85%;
    height: 50%;
    border: 2.5px dashed rgba(255, 107, 157, 0.8);
    border-radius: 12px;
    animation: ia-pulse 2s ease-in-out infinite;
}

@keyframes ia-pulse {
    0%, 100% { border-color: rgba(255, 107, 157, 0.8); box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.2); }
    50% { border-color: rgba(255, 107, 157, 1); box-shadow: 0 0 20px 4px rgba(255, 107, 157, 0.15); }
}

.ia-scan-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.5;
}

/* Inline scan progress */
.ia-scan-progress {
    margin-top: 16px;
    text-align: center;
}

.ia-scan-progress.hidden {
    display: none;
}

.ia-progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.ia-progress-bar .progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ia-scan-status-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

.analyzer-scan-btn {
    background: var(--light-pink);
    color: var(--secondary-pink);
    border: 1px solid #f0d0dd;
}

.analyzer-scan-btn:hover {
    background: #ffe4ec;
}
