* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #c44569;
    --light-pink: #fff0f5;
    --gradient: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    --shadow: 0 4px 15px rgba(196, 69, 105, 0.2);
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #fff0f5 0%, #ffe4ec 100%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: var(--card-shadow);
}

/* Header */
.header {
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 25px 20px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    padding: 12px 5px;
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

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

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px 3px 0 0;
}

/* Main Content */
.tab-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-panel {
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

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

/* 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;
}

.primary-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 69, 105, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

/* 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;
}

.secondary-btn {
    background: white;
    color: var(--secondary-pink);
    border: 2px solid var(--secondary-pink);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: var(--secondary-pink);
    color: white;
}

/* 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;
}

/* Scanner Section */
.coming-soon-card {
    background: white;
    border-radius: 20px;
    padding: 40px 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.scanner-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

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

.coming-soon-card h3 {
    color: #888;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.coming-soon-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.coming-soon-card > p {
    color: #666;
    margin-bottom: 15px;
}

.feature-list {
    list-style: none;
    text-align: left;
    padding: 0;
}

.feature-list li {
    padding: 12px 15px;
    background: var(--light-pink);
    border-radius: 10px;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #fafafa;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

.footer p {
    color: #888;
    font-size: 0.85rem;
}

/* 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;
}

/* Scanner Blur Overlay */
.scanner-blur-container {
    position: relative;
    min-height: 400px;
}

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

.scanner-preview.blurred {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

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

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

.fake-scanner-ui {
    margin: 20px 0;
}

.scan-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    border: 3px dashed var(--primary-pink);
    border-radius: 20px;
    background: rgba(255, 107, 157, 0.05);
}

.fake-scanner-ui p {
    color: #888;
    font-size: 0.9rem;
}

.coming-soon-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: popupBounce 0.5s ease-out;
}

@keyframes popupBounce {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.popup-content {
    background: white;
    border-radius: 25px;
    padding: 35px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(196, 69, 105, 0.3);
    border: 3px solid var(--primary-pink);
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: rocketFloat 2s ease-in-out infinite;
}

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.popup-content h2 {
    color: var(--secondary-pink);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.popup-content h3 {
    color: #888;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.popup-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 5px;
}

.popup-content p.korean {
    color: #888;
    margin-bottom: 20px;
}

.popup-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Result Animation */
@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes emojiPop {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes textSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.result-card.animated {
    animation: resultReveal 0.6s ease-out;
}

.result-card.animated .result-emoji {
    animation: emojiPop 0.8s ease-out 0.2s both;
}

.result-card.animated .result-type {
    animation: textSlideUp 0.5s ease-out 0.5s both;
}

.result-card.animated .result-type-korean {
    animation: textSlideUp 0.5s ease-out 0.6s both;
}

.result-card.animated .result-description {
    animation: textSlideUp 0.5s ease-out 0.7s both;
}

.result-card.animated .recommended-products {
    animation: textSlideUp 0.5s ease-out 0.9s both;
}

.result-card.animated .secondary-btn {
    animation: textSlideUp 0.5s ease-out 1.1s both;
}

/* Confetti Effect */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-pink);
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Personal Color Test */
.pc-screen.hidden {
    display: none;
}

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

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

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

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

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

/* PC Camera UI (mirrors fs- pattern) */
.pc-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
}

.pc-camera-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

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

.pc-camera-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

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

.pc-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.pc-controls.hidden {
    display: none;
}

/* Draping Comparison UI */
.draping-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.draping-header {
    text-align: center;
    margin-bottom: 16px;
}

.draping-round-label {
    font-weight: 700;
    color: var(--secondary-pink);
    font-size: 1rem;
    margin-bottom: 10px;
}

.draping-header .progress-bar {
    margin-bottom: 12px;
}

.draping-instruction {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.draping-instruction .korean {
    font-size: 0.85rem;
    color: #888;
}

.draping-comparison {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.draping-option {
    flex: 1;
    max-width: 200px;
    background: none;
    border: 3px solid transparent;
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.draping-option:hover {
    transform: translateY(-3px);
    border-color: var(--primary-pink);
    box-shadow: 0 4px 15px rgba(196, 69, 105, 0.25);
}

.draping-option:active {
    transform: scale(0.97);
}

.draping-option.draping-picked {
    animation: drapingPick 0.4s ease-out;
    border-color: var(--primary-pink);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
}

@keyframes drapingPick {
    0% { transform: scale(1); }
    40% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.draping-bg {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.draping-face {
    width: 65%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border: 3px solid rgba(255,255,255,0.7);
}

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

.draping-vs {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--secondary-pink);
    flex-shrink: 0;
}

.draping-label {
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
}

.draping-label .korean {
    font-weight: 400;
    font-size: 0.78rem;
    color: #888;
}

/* Analyzing Screen */
.pc-analyzing-card {
    background: white;
    border-radius: 20px;
    padding: 60px 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.pc-analyzing-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eee;
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: fsSpin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.pc-analyzing-card h3 {
    color: var(--secondary-pink);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.pc-analyzing-card .korean {
    color: #888;
    font-size: 0.9rem;
}

/* Personal Color Analysis — Axis Bars & Skin Swatch */
.pc-skin-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.pc-skin-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.pc-skin-swatch span {
    font-size: 0.8rem;
    color: #777;
}

.pc-axis-section {
    margin: 18px 0;
    padding: 15px;
    background: var(--light-pink);
    border-radius: 14px;
}

.pc-axis-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pc-axis-row:last-child {
    margin-bottom: 0;
}

.pc-axis-label {
    font-size: 0.7rem;
    color: #888;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.pc-axis-bar {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.pc-axis-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.pc-all-types {
    text-align: left;
    margin-top: 25px;
}

.pc-all-types h4 {
    color: var(--secondary-pink);
    margin-bottom: 15px;
    text-align: center;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.swatch-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.swatch-name {
    font-size: 0.75rem;
    color: #555;
    text-align: center;
}

.worst-colors {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(196, 69, 105, 0.1);
}

.worst-colors h4 {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.season-result-badge {
    display: inline-block;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.celeb-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(196, 69, 105, 0.1);
}

.celeb-section h4 {
    color: var(--secondary-pink);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.celeb-item {
    display: inline-block;
    background: var(--light-pink);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #555;
    margin: 4px;
}

/* 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;
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-pink);
}

.footer-copy {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 5px;
}

/* Page Modal */
.page-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-modal.hidden {
    display: none;
}

.page-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.page-modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s;
}

.page-modal-close:hover {
    background: var(--primary-pink);
    color: white;
}

.page-modal-content h2 {
    color: var(--secondary-pink);
    font-size: 1.4rem;
    margin-bottom: 5px;
    padding-right: 40px;
}

.page-modal-content h3 {
    color: var(--secondary-pink);
    font-size: 1.05rem;
    margin: 20px 0 10px;
}

.page-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.page-modal-content p {
    color: #555;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.page-modal-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.page-modal-content li {
    color: #555;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.page-modal-content a {
    color: var(--primary-pink);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

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

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

.contact-item p {
    margin: 0;
}

/* 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;
}

/* Face Shape Detector */
.fs-screen.hidden {
    display: none;
}

.fs-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
}

.fs-camera-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

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

.fs-camera-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

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

.fs-face-guide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.fs-face-oval {
    width: 55%;
    height: 70%;
    border: 2px dashed rgba(255, 107, 157, 0.6);
    border-radius: 50%;
    animation: fsPulse 2s ease-in-out infinite;
}

@keyframes fsPulse {
    0%, 100% { border-color: rgba(255, 107, 157, 0.4); }
    50% { border-color: rgba(255, 107, 157, 0.8); }
}

.fs-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.fs-controls.hidden {
    display: none;
}

.fs-loading {
    text-align: center;
    padding: 20px 0;
}

.fs-loading.hidden {
    display: none;
}

.fs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: fsSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes fsSpin {
    to { transform: rotate(360deg); }
}

.fs-loading p {
    color: #888;
    font-size: 0.9rem;
}

.fs-error {
    color: #d32f2f;
    background: #ffebee;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

.fs-error.hidden {
    display: none;
}

.fs-confidence {
    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;
}

.fs-ref-section {
    text-align: left;
    margin-top: 25px;
}

.fs-ref-section h4 {
    color: var(--secondary-pink);
    margin-bottom: 15px;
    text-align: center;
}

.fs-ref-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fs-ref-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--light-pink);
    border-radius: 12px;
    transition: all 0.2s;
}

.fs-ref-item.fs-ref-active {
    background: linear-gradient(135deg, #fff0f5 0%, #fce4ec 100%);
    border: 2px solid var(--primary-pink);
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

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

.fs-ref-item strong {
    display: block;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
}

.fs-ref-item p {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.fs-result-buttons {
    margin-top: 25px;
}

/* Mobile Optimizations */
@media (max-width: 500px) {
    .app-container {
        box-shadow: none;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .tab-content {
        padding: 15px;
    }

    .quiz-intro-card,
    .coming-soon-card,
    .result-card {
        padding: 30px 20px;
    }

    .procedure-details {
        grid-template-columns: 1fr;
    }

    .analyzer-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .analyzer-tool {
        padding: 22px 14px;
    }

    .fs-camera-card {
        padding: 15px;
    }

    .pc-camera-card {
        padding: 15px;
    }

    .draping-card {
        padding: 15px;
    }

    .draping-option {
        max-width: 160px;
    }

    .draping-vs {
        font-size: 0.9rem;
    }

    .draping-face {
        width: 70%;
    }

    .pc-analyzing-card {
        padding: 40px 20px;
    }
}

/* ========== 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;
}

/* AI Skin Condition Analyzer */
.skin-screen.hidden {
    display: none;
}

.skin-overall {
    text-align: center;
    margin-bottom: 20px;
}

.skin-score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(196, 69, 105, 0.3);
}

.skin-score-number {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.skin-score-circle .skin-score-label {
    font-size: 0.8rem;
    opacity: 0.85;
}

.skin-grade {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skin-grade-excellent { background: #f0fff4; color: #389e0d; }
.skin-grade-good { background: #e6f7ff; color: #1890ff; }
.skin-grade-fair { background: #fffbe6; color: #d48806; }
.skin-grade-care { background: #fff0f0; color: #d32f2f; }

.skin-overall-desc {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 2px;
}

.skin-overall-desc-kr {
    font-size: 0.78rem;
    color: #999;
}

.skin-scores {
    margin-bottom: 20px;
}

.skin-scores h4 {
    font-size: 0.95rem;
    color: var(--secondary-pink);
    margin-bottom: 12px;
}

.skin-score-row {
    margin-bottom: 10px;
}

.skin-score-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.skin-score-kr {
    color: #999;
    font-size: 0.75rem;
}

.skin-score-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
}

.skin-bar-track {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.skin-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.skin-bar-high { background: linear-gradient(90deg, #ff6b6b, #d32f2f); }
.skin-bar-med { background: linear-gradient(90deg, #ffd93d, #f0a500); }
.skin-bar-low { background: linear-gradient(90deg, #6bcb77, #389e0d); }

.skin-recommendations {
    margin-bottom: 16px;
}

.skin-recommendations h4 {
    font-size: 0.95rem;
    color: var(--secondary-pink);
    margin-bottom: 12px;
}

.skin-rec-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.skin-rec-header {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.skin-rec-desc {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.skin-rec-tips {
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.skin-rec-tips strong {
    display: block;
    margin-bottom: 4px;
}

.skin-rec-tips ul {
    padding-left: 18px;
    margin: 0;
}

.skin-rec-tips li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.skin-tip-kr {
    color: #999;
    font-size: 0.75rem;
}

.skin-rec-ingredients {
    font-size: 0.82rem;
}

.skin-rec-ingredients strong {
    display: block;
    margin-bottom: 6px;
}

.skin-ingredient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skin-ing-tag, .skin-ing-tag-found {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.skin-ing-tag {
    background: #f0f0f0;
    color: #666;
}

.skin-ing-tag-found {
    background: var(--light-pink);
    color: var(--secondary-pink);
    border: 1px solid #f0d0dd;
}

/* ========== Responsive Layout — Tablet (768px+) ========== */
@media (min-width: 768px) {

    /* --- Container --- */
    .app-container {
        max-width: 768px;
    }

    /* --- Header --- */
    .header {
        padding: 30px 28px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* --- Tab Navigation --- */
    .tab-btn {
        font-size: 0.85rem;
        padding: 14px 8px;
    }

    /* --- Tab Content --- */
    .tab-content {
        padding: 24px 28px;
    }

    /* --- Section Titles --- */
    .section-title {
        font-size: 1.45rem;
    }

    /* --- Sub-tabs --- */
    .sub-tab-btn {
        font-size: 0.85rem;
    }

    /* --- Multi-column Grids (2-col) --- */
    .clinics-grid,
    .step-list,
    .ingredient-grid,
    .face-shape-grid,
    .mistake-list,
    .skintype-routine-grid,
    .makeup-guide,
    .food-guide,
    .tip-list,
    .skin-recommendations,
    .compat-conflicts {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Procedures grid stays single-column (accordion cards need full width) */
    .procedures-grid {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    /* --- Existing Grids --- */
    .procedure-details {
        grid-template-columns: repeat(3, 1fr);
    }

    .color-palette {
        grid-template-columns: repeat(4, 1fr);
    }

    /* --- Card Max-width Limits --- */
    .quiz-intro-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .result-card {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .question-container {
        max-width: 650px;
        margin-left: auto;
        margin-right: auto;
    }

    .page-modal-content {
        max-width: 650px;
        margin-left: auto;
        margin-right: auto;
    }

    .pc-start-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .coming-soon-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    /* --- Camera / Scan Sections --- */
    .fs-camera-card,
    .pc-camera-card {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .draping-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .ia-scan-area {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .routine-flow {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    /* --- Compatibility Checker Horizontal --- */
    .compat-inputs {
        flex-direction: row;
        align-items: flex-end;
        gap: 12px;
    }

    .compat-input-group {
        flex: 1;
    }

    .compat-vs {
        padding-bottom: 10px;
        flex-shrink: 0;
    }

    /* --- Draping Options --- */
    .draping-option {
        max-width: 200px;
    }

    /* --- Filter / Season Buttons --- */
    .filter-btn,
    .season-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    /* --- Footer --- */
    footer, .app-footer {
        padding: 20px 28px;
    }
}

/* ========== Responsive Layout — Desktop (1024px+) ========== */
@media (min-width: 1024px) {

    /* --- Container --- */
    .app-container {
        max-width: 1100px;
        box-shadow: none;
        background: transparent;
    }

    /* --- Header --- */
    .header {
        padding: 35px 36px;
        border-radius: 0 0 16px 16px;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

    /* --- Tab Navigation --- */
    .tab-nav {
        border-radius: 12px;
        margin: 0 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .tab-btn {
        font-size: 0.9rem;
        padding: 15px 10px;
        flex: none;
        min-width: 120px;
    }

    /* --- Tab Content --- */
    .tab-content {
        padding: 28px 36px;
    }

    /* --- Section Titles --- */
    .section-title {
        font-size: 1.55rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* --- Sub-tabs --- */
    .sub-tab-btn {
        font-size: 0.9rem;
    }

    /* --- Multi-column Grids (2-3 col) --- */
    .clinics-grid,
    .ingredient-grid,
    .face-shape-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .procedures-grid {
        max-width: 800px;
    }

    .step-list,
    .mistake-list,
    .skintype-routine-grid,
    .makeup-guide,
    .food-guide,
    .tip-list,
    .skin-recommendations,
    .compat-conflicts {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* --- Existing Grids --- */
    .procedure-details {
        grid-template-columns: repeat(4, 1fr);
    }

    .color-palette {
        grid-template-columns: repeat(6, 1fr);
    }

    /* --- Card Max-width Limits --- */
    .quiz-intro-card {
        max-width: 650px;
    }

    .result-card {
        max-width: 800px;
    }

    .question-container {
        max-width: 650px;
    }

    .page-modal-content {
        max-width: 750px;
    }

    .pc-start-card {
        max-width: 650px;
    }

    /* --- Draping Options --- */
    .draping-option {
        max-width: 220px;
    }

    /* --- Filter / Season Buttons --- */
    .filter-btn,
    .season-btn {
        padding: 9px 20px;
        font-size: 0.88rem;
    }

    /* --- Footer --- */
    footer, .app-footer {
        padding: 24px 36px;
    }
}

/* ========== SNS Share Buttons ========== */
.share-section {
    border-top: 1px solid #eee;
    margin-top: 24px;
    padding-top: 20px;
    text-align: center;
}

.share-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.share-btn:active {
    transform: scale(0.95);
}

.share-btn-x {
    background: #000;
}

.share-btn-fb {
    background: #1877F2;
}

.share-btn-copy {
    background: #6c757d;
}

.share-btn-native {
    background: var(--primary-pink);
}

/* Share Toast */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.85rem;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.share-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
