/* 
 * VeriSkin UI 2.0 - Obsidian Design System
 * Focus: Premium Dark Mode, Glassmorphism, Fluid Typography
 * Version: 2.0.0 (April 2026)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Public+Sans:wght@300;400;600;700;800&display=swap');

:root {
    /* 🌑 Sophisticated Obsidian Palette */
    --bg-black: #08080C;
    --bg-card: rgba(255, 255, 255, 0.04); 
    --bg-glass: rgba(255, 255, 255, 0.02);
    
    /* ⚪ Minimalist White System */
    --primary: #FFFFFF;
    --primary-light: rgba(255, 255, 255, 0.8);
    --secondary: #A0A0B0;
    --accent-teal: #00D2D3;
    --accent-rose: #F08080;
    
    /* ✨ Refined Borders & Glass */
    --border-glass: rgba(255, 255, 255, 0.15);
    --border-glow: rgba(255, 255, 255, 0.05);
    
    /* 📝 High-End Typography */
    --text-main: #FFFFFF;
    --text-dim: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* 🌊 Effects */
    --shadow-main: 0 15px 45px rgba(0, 0, 0, 0.6);
    --blur-glass: blur(16px);
}

/* 🧱 Utility Classes */
.hidden { display: none !important; pointer-events: none !important; visibility: hidden; }

/* 🛡️ Overlay System (v5.3.1) */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s ease;
}
.modal-overlay.hidden { display: none !important; }

/* ✨ [v16.1.0] Onboarding Specific Theme Background */
#onboarding-overlay {
    background: linear-gradient(rgba(8, 8, 12, 0.75), rgba(8, 8, 12, 0.75)), 
                url('login_bg.jpg') center/cover no-repeat !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* 🏁 Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-black);
    /* 🍎 [Snow White Theme] Warm Wood & Charcoal Gradient */
    background: radial-gradient(circle at top right, #1A1A24, #121218, #0D0D12);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', 'Public Sans', -apple-system, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* 🏔️ Partial Background Ornament (Cottage View) */
.partial-bg-ornament {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px; /* 기존 300px에서 다른 페이지들과 동일한 450px로 확대 */
    height: 450px;
    background-image: url('media/background_cottage_v2.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0; /* body 배경보다는 위, 콘텐츠보다는 아래 */
    opacity: 0.45; /* 가독성을 유지하면서 일관된 투명도 적용 */
    mask-image: radial-gradient(circle at top right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(circle at top right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* 🖼️ Corner Ornament Backgrounds (Mirroring Home Page Design) */
.page-ornament-bg {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px; /* 홈 화면보다 살짝 크게 하여 테마 디테일 강조 */
    height: 450px;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.45;
    mask-image: radial-gradient(circle at top right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(circle at top right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

h1, h2, h3, h4 {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 💎 Glassmorphism Containers */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
}

/* 🔘 Dynamic Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary:active {
    transform: translateY(2px) scale(0.96);
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.2);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

/* 📍 Bottom Navigation - Fairytale Theme */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 480px;
    height: 76px;
    background: rgba(15, 15, 23, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 38px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: var(--transition-smooth);
    width: 65px;
    gap: 4px;
}

.nav-char-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.nav-item.active .nav-char-icon {
    border-color: #FFFFFF;
    border-width: 2.5px;
    transform: scale(1.18);
    box-shadow: 0 0 15px rgba(255,255,255,0.25);
}

.nav-item.active {
    color: var(--primary-light);
}

/* 🍎 [v20.0.1] Professional Icon System (Reverted from Dwarf Theme) */
.icon-snow { background-image: url('media/background_cottage_v2.jpg?v=20260420-v2'); background-position: 63% 25%; background-size: 800%; background-color: #3498DB; }
.icon-doc { background-color: #6366F1; } /* AI Specialist */
.icon-bashful { background-color: #A855F7; } /* Style Advisor */
.icon-dopey { background-color: #00D2D3; } /* Curation Bot */

.nav-item.scan-btn {
    width: 72px;
    height: 72px;
    background: none;
    border: none;
    margin-top: -42px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.nav-item.scan-btn:active {
    transform: scale(0.9) rotate(-5deg);
}

.mirror-icon {
    width: 95%; /* 프레임 최대 확대 */
    height: 95%;
    object-fit: contain;
    transition: 0.5s;
    filter: drop-shadow(0 6px 15px rgba(0,0,0,0.5));
}

.nav-mirror-img {
    width: 98%; /* 프레임 최대 확대 */
    height: 98%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(212, 175, 55, 0.4));
    transition: 0.3s;
}


/* 🪞 Magic Mirror Ornate Frame */
.magic-mirror-container {
    position: relative;
    width: 280px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 140px / 200px;
}

.magic-mirror-frame {
    position: absolute;
    inset: -10px;
    background-image: url('media/mirror_frame.png');
    background-size: 100% 100%;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

.magic-mirror-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 140px / 200px;
    background: #000;
}

/* 👤 Dwarf Theme Sections */
.dwarf-section {
    display: flex;
    gap: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: relative;
    overflow: hidden;
}

.dwarf-icon-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dwarf-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dwarf-content {
    flex: 1;
}

.dwarf-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dwarf-speech {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-main);
    font-style: italic;
}

/* 🧊 Global Feature Locking */
.feat-inactive {
    filter: grayscale(100%) opacity(0.5);
    pointer-events: none;
    position: relative;
}

.feat-inactive::after {
    content: 'Analyzing Data...';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--primary);
    font-weight: 900;
    white-space: nowrap;
}

/* 🏷️ Badge & Pills */
.pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.pill-success { background: rgba(29, 209, 161, 0.15); color: var(--success); border: 1px solid rgba(29, 209, 161, 0.3); }
.pill-primary { background: rgba(142, 68, 173, 0.15); color: var(--primary-light); border: 1px solid rgba(142, 68, 173, 0.3); }

/* 🌊 Micro Animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(142, 68, 173, 0); }
    100% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0); }
}

.active-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes shutter-guide {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 40px #00E676; }
}

.trust-badge-mini {
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(0, 210, 211, 0.15);
    color: var(--secondary);
    border-radius: 6px;
    border: 1px solid rgba(0, 210, 211, 0.3);
    margin-left: 6px;
    font-weight: 800;
}

.trust-pill {
    background: rgba(0, 210, 211, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(0, 210, 211, 0.2);
}

/* 📑 Tabs System */
.tab-bar {
    display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto;
    padding-bottom: 0; scrollbar-width: none; -ms-overflow-style: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-item {
    flex: 0 0 auto; padding: 10px 18px; border-radius: 12px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer;
    transition: var(--transition-smooth); display: flex; align-items: center; gap: 6px;
}
.tab-item i { font-size: 14px; }
.tab-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border-color: transparent; box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.tab-content { display: none; animation: fadeIn 0.4s ease-out; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 📉 Detailed Metric List */
.data-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.data-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(255,255,255,0.03); border-radius: 12px;
}
.data-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.data-value { font-size: 14px; color: var(--text-main); font-weight: 700; text-align: right; }

/* 🩺 Dossier Elements */
.dossier-card { line-height: 1.7; font-size: 14px; margin-bottom: 24px; padding: 22px; border-radius: 20px; border: 1px solid var(--border-glass); background: var(--bg-glass); }
.dossier-card h5 { font-size: 15px; color: var(--secondary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dossier-text { color: var(--text-main); opacity: 0.9; }

/* 🎨 Color & Style Components */
.palette-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.color-swatch { height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); position: relative; }
.color-name { font-size: 10px; text-align: center; margin-top: 4px; color: var(--text-dim); }

/* 🧴 Routine Steps */
.routine-container { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.routine-step { 
    display: flex; gap: 16px; padding: 18px; background: rgba(142, 68, 173, 0.05); 
    border-radius: 18px; border: 1px solid rgba(142, 68, 173, 0.1);
}
.step-num { 
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary); 
    color: white; display: flex; align-items: center; justify-content: center; 
    font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.step-content h6 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--primary-light); }
.step-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ⚠️ Risk Badges */
.badge-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.risk-badge { 
    padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 700;
    background: rgba(255, 107, 107, 0.1); color: var(--danger); border: 1px solid rgba(255, 107, 107, 0.2);
}

/* 🛡️ [v1.2] SNS Auth Buttons */
.btn-sns { 
    width: 100%; padding: 14px; border-radius: 14px; border: none; 
    font-weight: 700; font-size: 14px; display: flex; align-items: center; 
    justify-content: center; gap: 10px; margin-bottom: 12px; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-sns:active { transform: scale(0.96); }
.btn-sns.google { background: white; color: #000; }
.btn-sns.apple { background: #000; color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-sns.facebook { background: #1877F2; color: white; }

.auth-divider { 
    display: flex; align-items: center; gap: 10px; color: var(--text-muted); 
    font-size: 11px; font-weight: 800; text-transform: uppercase; margin: 20px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1); }

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.onboarding-card { animation: fadeInCard 0.6s var(--transition-bounce) forwards; }

/* 📱 Responsive Adjustments */
@media screen and (max-width: 380px) {
    .bottom-nav { width: calc(100% - 20px); }
    .nav-item { width: 50px; }
    .metrics-grid { grid-template-columns: 1fr; }
}

/* 👥 Social & Skin-Fluencer UI */
.social-feed { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.product-mini-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 22px;
    padding: 16px;
    transition: var(--transition-smooth);
}
.social-card { 
    background: var(--bg-glass); border: 1px solid var(--border-glass); 
    border-radius: 24px; overflow: hidden; position: relative;
    transition: var(--transition-smooth);
}
.social-card-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.social-user { display: flex; align-items: center; gap: 12px; }
.social-avatar { 
    width: 40px; height: 40px; border-radius: 50%; 
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: 2px solid var(--border-glass); font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.social-username { font-size: 14px; font-weight: 700; color: var(--text-main); }
.social-rank { font-size: 11px; color: var(--primary-light); font-weight: 600; }

.btn-follow { 
    padding: 6px 14px; border-radius: 10px; font-size: 12px; font-weight: 700;
    background: var(--primary); color: white; border: none; cursor: pointer;
}
.btn-follow.following { background: rgba(255,255,255,0.1); color: var(--text-dim); }

.social-card-body { padding: 16px; }
.social-stats { display: flex; gap: 16px; margin-bottom: 12px; }
.stat-pill { 
    font-size: 12px; padding: 4px 10px; border-radius: 8px; 
    background: rgba(142, 68, 173, 0.1); color: var(--primary-light); font-weight: 700;
}
.social-content { font-size: 13px; line-height: 1.6; color: var(--text-dim); margin-bottom: 12px; }

.social-routine-preview { 
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none;
}
.mini-routine-item { 
    flex: 0 0 auto; width: 80px; height: 80px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; font-size: 10px; font-weight: 600; color: var(--text-muted);
}
.mini-routine-item i { font-size: 16px; color: var(--secondary); }

.social-actions { 
    display: flex; padding: 12px 16px; gap: 20px; 
    border-top: 1px solid rgba(255,255,255,0.05);
}
.action-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.action-item i { font-size: 18px; }
.action-item.active i { color: var(--primary-light); }

/* 🏅 Influencer Badge */
.influencer-badge { 
    font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #FFD700; color: #000; font-weight: 900;
    vertical-align: middle; margin-left: 4px;
}

/* 🏆 Influencer Components (Global) */
.influencer-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 30px; scrollbar-width: none; }
.influencer-scroll::-webkit-scrollbar { display: none; }
.influencer-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; width: 70px; cursor: pointer; }
.avatar-ring { 
    width: 64px; height: 64px; border-radius: 50%; padding: 3px; 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    margin-bottom: 8px; transition: var(--transition-smooth);
}
.avatar-ring:active { transform: scale(0.92); }
.avatar-inner { 
    width: 100%; height: 100%; border-radius: 50%; background: #222; 
    border: 2px solid #111; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.inf-name { font-size: 11px; font-weight: 700; color: var(--text-main); text-align: center; }

/* 👤 [v1.1] Profile Modal & Onboarding UI */
.modal-overlay { 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: none !important; 
    -webkit-backdrop-filter: none !important;
    z-index: 1000000 !important; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease;
    pointer-events: all !important;
}
.modal-overlay.hidden { 
    display: none !important;
    opacity: 0; 
    pointer-events: none !important; 
    visibility: hidden;
}

.onboarding-card { 
    width: 90%; 
    max-width: 400px; 
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 100%) !important; 
    border: 1px solid var(--border-glass); 
    border-radius: 32px; 
    padding: 30px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10000;
}
.onboarding-step { display: none; }
.onboarding-step.active { display: block; animation: fadeIn 0.4s ease-out; }

.toggle-group { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; margin-top: 10px; }
.toggle-btn { 
    flex: 1; min-width: 60px; padding: 12px; border-radius: 14px; 
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%) !important; 
    border: 1px solid var(--border-glass); 
    color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
    outline: none;
}
.toggle-btn.active { 
    background: var(--primary); color: white !important; border-color: transparent;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.4);
}

/* 🎨 Fitzpatrick Skin Type Colors */
.fitz-btn { min-width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; }
.fitz-btn.t1 { background: #FDF5E6; color: #333; }
.fitz-btn.t2 { background: #F3E5AB; color: #333; }
.fitz-btn.t3 { background: #E2BC8A; color: #333; }
.fitz-btn.t4 { background: #B88358; color: #FFF; }
.fitz-btn.t5 { background: #7C4F2F; color: #FFF; }
.fitz-btn.t6 { background: #3F1F17; color: #FFF; }

.fitz-btn.active {
    border: 3px solid var(--secondary) !important;
    transform: scale(1.1);
    z-index: 2;
}

.profile-input { 
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass); 
    border-radius: 14px; padding: 14px; color: white; margin-bottom: 22px; font-family: inherit; margin-top: 8px;
    outline: none;
}
.profile-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.08); }

.input-label { 
    font-size: 11px; font-weight: 800; color: var(--text-muted); 
    text-transform: uppercase; letter-spacing: 1px; margin-top: 16px;
    display: block;
}

/* 🌙 Digital Routine Builder UI (v2.2) */
.routine-nav {
    display: flex; gap: 10px; margin: 20px 0;
    padding: 6px; background: rgba(255,255,255,0.03); 
    border-radius: 16px; border: 1px solid var(--border-glass);
}
.routine-nav-btn {
    flex: 1; padding: 12px; border-radius: 12px; border: none;
    background: transparent; color: var(--text-dim);
    font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.routine-nav-btn.active {
    background: var(--bg-deep); color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.routine-nav-btn.active i { color: var(--secondary); }
.routine-nav-btn.active.pm i { color: var(--accent); }

/* Enhanced Routine Cards */
.product-card { position: relative; }
.step-badge {
    position: absolute; top: -8px; left: -8px; 
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--secondary); color: #000;
    font-size: 11px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 210, 211, 0.4);
    z-index: 10;
}
.pm-mode .step-badge { background: var(--accent); }

.usage-tip-box {
    margin-top: 12px; padding: 10px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
}
.usage-tip-input {
    width: 100%; background: transparent; border: none;
    color: var(--text-main); font-size: 11px; font-family: inherit;
    outline: none; resize: none; min-height: 38px;
}
.usage-tip-input::placeholder { color: var(--text-muted); font-style: italic; }

.sequence-controls {
    display: flex; justify-content: center; gap: 15px; margin-top: 8px;
    padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.05);
}
.btn-seq {
    background: transparent; border: none; color: var(--text-muted);
    font-size: 16px; cursor: pointer; transition: all 0.2s;
}
.btn-seq:hover { color: var(--text-main); }
.btn-seq:active { transform: scale(1.2); }

.routine-empty-state {
    grid-column: span 3; padding: 60px 20px; text-align: center;
    color: var(--text-dim); font-size: 13px; line-height: 1.6;
}

/* 📈 Routine Efficacy Dashboard (v2.3) */
.efficacy-card {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1), rgba(0, 210, 211, 0.05));
    border: 1px solid var(--border-glow);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.efficacy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.efficacy-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.efficacy-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eff-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.eff-val {
    font-size: 16px;
    font-weight: 900;
}

.eff-val.plus { color: var(--success); }
.eff-val.minus { color: var(--danger); }

.proven-badge {
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    animation: badge-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% { transform: scale(0); rotate: -20deg; }
    100% { transform: scale(1); rotate: 0deg; }
}

.tracking-badge {
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--secondary);
    font-size: 10px;
    font-weight: 800;
    border: 1px solid var(--secondary);
}

.efficacy-empty {
    text-align: center;
    padding: 20px 0;
}

.efficacy-empty p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-weight: 700;
    cursor: pointer;
}

/* 📸 Visual Journey Gallery (v2.4) */
.visual-journey {
    margin-bottom: 32px;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.view-all {
    font-size: 11px;
    font-weight: 800;
    color: var(--secondary);
    cursor: pointer;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 15px;
}

.photo-card {
    aspect-ratio: 3/4;
    border-radius: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}

.photo-card:active { transform: scale(0.95); }

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 🗑️ [v15.9.26] Remove Button for Gallery */
.btn-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    border: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.photo-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.empty-gallery {
    width: 100%;
    padding: 30px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed var(--border-glass);
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 📸 Before/After Comparison Tool (v2.4) */
.compare-card {
    width: 90%;
    max-width: 400px;
    background: var(--bg-deep);
    border-radius: 32px;
    padding: 24px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.compare-header h3 { font-size: 18px; font-weight: 800; }

.comparison-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
}

.compare-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.compare-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-img .label {
    position: absolute;
    top: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    color: white;
    font-size: 10px;
    font-weight: 800;
    z-index: 10;
}

.compare-img.baseline .label { left: 15px; }
.compare-img.current .label { right: 15px; }

.compare-img.current {
    clip-path: inset(0 0 0 50%); /* 시작 시 절반만 노출 */
}

/* Slider Handle */
.compare-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    z-index: 20;
    cursor: ew-resize;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.compare-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delta-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.compare-delta-item {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 14px;
    text-align: center;
}

/* 🛒 [v12.5.0] Premium Product Detail Modal (Bottom Sheet) */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 500px;
    height: 85vh;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 32px 32px 0 0;
    border: 1px solid var(--border-glass);
    border-bottom: none;
    z-index: 2001;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-modal-overlay.active .modal-bottom-sheet {
    transform: translate(-50%, 0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 100px;
    scrollbar-width: none;
}
.modal-body::-webkit-scrollbar { display: none; }

/* 🖼️ Product Detail Elements */
.detail-image-container {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #000;
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-header {
    margin-bottom: 24px;
}

.detail-brand {
    font-size: 13px;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.detail-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
}

.detail-price {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-teal);
}

/* 🧬 AI Synergy Zone */
.ai-synergy-card {
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.15), rgba(142, 68, 173, 0.1));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 210, 211, 0.3);
    position: relative;
    overflow: hidden;
}

.ai-synergy-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow { from { rotate: 0deg; } to { rotate: 360deg; } }

.synergy-label {
    font-size: 11px;
    font-weight: 900;
    color: var(--accent-teal);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.synergy-reason {
    font-size: 14px;
    line-height: 1.6;
    color: #FFF;
    font-weight: 500;
}

.product-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 30px;
}
.product-desc h3 {
    font-size: 16px;
    color: var(--primary);
    margin: 20px 0 10px;
}

/* 🛍️ Bottom Action Floating Bar */
.modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px 30px;
    background: linear-gradient(to top, #0A0A0F 80%, transparent);
    z-index: 10;
}

.btn-buy-now {
    width: 100%;
    background: var(--accent-teal);
    color: #000;
    border: none;
    border-radius: 18px;
    padding: 18px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 210, 211, 0.4);
    transition: var(--transition-smooth);
}

.btn-buy-now:active {
    transform: scale(0.96);
    background: #00b8b9;
}

/* 🦴 Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.03) 25%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 🧬 [v26.6.6] Header Icon Layout Preservation Rules (Fixes CDN lag distortion) */
.avatar-container {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    flex-shrink: 0 !important;
    border-radius: 9999px !important;
}

.settings-btn, .crown-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-shrink: 0 !important;
    border-radius: 9999px !important;
}

/* 🧬 [v26.6.6] Header Layout Protection (Prevents Tailwind CDN loading delay distortion) */
.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

.header-left-group {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-shrink: 0 !important;
    min-width: 180px !important;
}

.header-right-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
