/* ============================================
   FITFUN - Production Styles
   ============================================ */

/* Google Fonts - Luxury Typography */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&family=Noto+Serif+KR:wght@300;400;500;600;700&display=swap');

/* Design Tokens - Chanel Inspired Minimalist Luxury */
:root {
    /* Primary Colors - Navy & White */
    --primary-navy: #00214f;
    --secondary-white: #FFFFFF;
    --bg-light-grey: #F8F8F8;
    
    /* Legacy Hermès Colors (for gradual transition) */
    --hermes-orange: #D4C4B0;
    --hermes-navy: #00214f;
    --hermes-cream: #E5E8E5;
    
    /* Accent Colors */
    --rose-gold: #B89968;
    --soft-black: #2C2C2C;
    --pure-white: #FFFFFF;
    --border-grey: #D4CFC4;
    
    /* Text Colors */
    --text-primary: #00214f;
    --text-secondary: #7A7A7A;
    
    /* Status Colors */
    --success-green: #4A7C59;
    --gold-accent: #B89968;
    
    /* Legacy Aliases (for gradual migration) */
    --primary-green: var(--hermes-navy);
    --wood-brown: var(--rose-gold);
    --gold: var(--hermes-orange);
    --ivory: var(--hermes-cream);
    --text-dark: var(--soft-black);
    --white: var(--pure-white);
    
    /* Special Accent */
    --chocolate-brown: #3B2414;
    
    /* Responsive Typography Scale - Mobile First (Compact) */
    --font-size-h1: clamp(15px, 3.8vw, 20px);
    --font-size-h2: clamp(14px, 3.5vw, 18px);
    --font-size-h3: clamp(13px, 3.2vw, 16px);
    --font-size-body: clamp(12px, 3vw, 14px);
    --font-size-small: clamp(11px, 2.8vw, 13px);
    --font-size-tiny: clamp(10px, 2.5vw, 11px);
}

/* Mobile-specific title size reduction */
@media (max-width: 480px) {
    h1, .title-h1, [class*="title"] {
        font-size: 15px !important;
    }
    h2, .title-h2 {
        font-size: 14px !important;
    }
    h3, .title-h3 {
        font-size: 13px !important;
    }
    
    /* Modal/Dialog titles */
    .modal-title, .dialog-title, .section-title {
        font-size: 14px !important;
    }
    
    /* Card titles */
    .card-title {
        font-size: 13px !important;
    }
    
    /* Inline style overrides for common large titles */
    [style*="font-size: 24px"], [style*="font-size:24px"] {
        font-size: 16px !important;
    }
    [style*="font-size: 22px"], [style*="font-size:22px"] {
        font-size: 15px !important;
    }
    [style*="font-size: 20px"], [style*="font-size:20px"] {
        font-size: 14px !important;
    }
    [style*="font-size: 18px"], [style*="font-size:18px"] {
        font-size: 13px !important;
    }
}

/* Base Styles - Hermès Elegance */
* {
    font-family: 'Noto Sans KR', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-light-grey);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   DROP ZONES & APP SPECIFIC STYLES
   ============================================ */

.drop-zone {
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #D7D7D2 !important;
    box-shadow: none !important;
    position: relative;
}

.drop-zone::before {
    display: none !important;
}

.drop-zone:hover {
    border: none !important;
    background: #D7D7D2 !important;
    transform: none !important;
    box-shadow: none !important;
}

.drop-zone.drag-over {
    border: none !important;
    background: #D7D7D2 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Override inline styles and Tailwind */
#personDropZone {
    border: none !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #F5F0EA 0%, #E6DFD6 100%) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

#topClothDropZone, #bottomClothDropZone, #dressDropZone {
    border: none !important;
    border-radius: 0 !important;
    background: #D7D7D2 !important;
    box-shadow: none !important;
}

#luxuryBagDropZone {
    border: none !important;
    border-radius: 0 !important;
    background: #D7D7D2 !important;
    box-shadow: none !important;
}

.preview-image {
    border-radius: 0 !important;
}

#personPreview {
    border-radius: 50% !important;
}

.center-drop {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    position: relative;
}

/* 원형 사진: border 없음 */
.center-drop.drop-zone {
    border: none !important;
}

.center-drop.drop-zone::before {
    display: none !important;
}

.center-drop::after {
    display: none; /* 가로선 완전 제거 */
}

.item-drop {
    width: 220px;
    height: 220px;
    border-radius: 20px;
    position: absolute;
}

.camera-btn-container {
    position: relative;
}

.item-drop.top-cloth {
    top: 50%;
    left: -240px;
    transform: translateY(-50%);
}

.item-drop.bottom-cloth {
    top: 50%;
    right: -240px;
    transform: translateY(-50%);
}

.item-drop.dress {
    top: 100%;
    left: 50%;
    transform: translate(-50%, -110px);
    width: 220px;
    height: 220px;
}

/* Clothing Slots Grid - Center alignment */
.clothing-slots-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
}

.clothing-slot-wrapper {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

.clothing-slot {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 16px;
    border: 5px dashed var(--hermes-orange);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clothing-slot:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.center-drop .preview-image {
    border-radius: 50%;
}

.item-drop .preview-image {
    border-radius: 20px;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

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

.glow {
    box-shadow: 0 4px 20px rgba(217, 179, 119, 0.3);
}

/* Cloth type button active state override */
.cloth-type-btn.active.btn-outline {
    background-color: var(--ivory);
    color: var(--primary-green);
    border-color: var(--ivory);
}

.cloth-type-btn.active.btn-primary {
    transform: scale(1.05);
}

.delete-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    transform: none;
    width: 32px;
    height: 32px;
    background: var(--primary-green);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(30, 61, 43, 0.3);
}

.delete-btn:hover {
    background: var(--gold);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(217, 179, 119, 0.4);
}

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

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.delete-btn.show {
    display: flex;
}

.drop-zone:hover .delete-btn.show {
    display: flex;
}

/* Empty State Guide */
.empty-guide {
    background: var(--ivory);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: rgba(30, 61, 43, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-arrow {
    opacity: 0.6;
}

/* ============================================
   CREDITS DISPLAY - Simple & Clean
   ============================================ */
#creditsDisplay {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

#creditsDisplay:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#creditsDisplay p {
    color: var(--text-primary) !important;
    font-size: var(--font-size-small);
}

#creditsDisplay a,
#creditsDisplay button {
    color: var(--primary-navy) !important;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

#creditsDisplay a:hover,
#creditsDisplay button:hover {
    opacity: 0.7;
}

/* ============================================
   BUTTON STYLES - Unified & Enhanced
   ============================================ */

/* Base Button Styles */
.btn, button:not(.unstyled) {
    border-radius: 9999px; /* 알약형 */
    font-weight: 600;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-body);
}

/* Primary Button - Navy & White */
.btn-primary {
    background: var(--primary-navy);
    color: white;
    border: 2px solid var(--primary-navy);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(44, 74, 110, 0.3);
    background: #3A5A82;
}

/* Secondary Button - White & Navy */
.btn-secondary {
    background: white;
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
}

.btn-secondary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(44, 74, 110, 0.2);
    background: rgba(44, 74, 110, 0.05);
}

/* Upload CTA Button */
.upload-cta-btn {
    width: 100%;
    max-width: 360px;
    height: 56px;
    font-size: 1.125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-green) !important;
    color: var(--gold) !important;
    border: 2px solid var(--gold) !important;
}

.upload-cta-btn svg {
    stroke: var(--gold) !important;
}
.micro-copy {
    line-height: 1.4;
}

/* Wood Frame Mirror for Result Image */
.wood-frame-mirror {
    border: 12px solid var(--wood-brown);
    border-radius: 24px;
    box-shadow: 
        inset 0 0 0 3px var(--gold),
        inset 0 0 0 6px var(--primary-green),
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    background: white;
}

.wood-frame-mirror::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 24px;
    border: 3px solid var(--primary-green);
    pointer-events: none;
}

.wood-frame-mirror::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 26px;
    box-shadow: 0 0 0 1px var(--wood-brown);
    pointer-events: none;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    h1 {
        font-size: 2rem !important;
    }
    
    .text-2xl {
        font-size: var(--font-size-body) !important;
    }
    
    #creditsDisplay {
        padding: 1rem !important;
    }
    
    .empty-guide {
        padding: 1.5rem 1rem;
    }
    
    .step-arrow {
        display: none;
    }
    
    .upload-cta-btn {
        max-width: 100%;
        font-size: 1rem;
    }
    
    /* Mobile: Stack buttons vertically */
    .btn-group-center {
        flex-direction: column;
        width: 100%;
        max-width: 360px;
    }
    
    .btn-group-center .btn {
        width: 100%;
    }
    
    /* Credits display mobile */
    #creditsDisplay {
        padding: 1rem !important;
    }
    
    /* Clothing type buttons mobile */
    #clothingTypeSelection .flex {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    #clothingTypeSelection button,
    #clothingTypeSelection a {
        width: 100% !important;
        max-width: 320px !important;
    }
}

/* ============================================
   STATE-BASED BUTTON LAYOUT
   ============================================ */

/* State-based button group layout */
.btn-group-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* Toast animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================
   SAVED FITS (WARDROBE) STYLES
   ============================================ */

/* Grid system */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 1.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

/* Spacing */
.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Text utilities */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.italic {
    font-style: italic;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-center {
    text-align: center;
}

/* Layout */
.max-w-md {
    max-width: 28rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.w-full {
    width: 100%;
}

.min-w-\[200px\] {
    min-width: 200px;
}

/* Position */
.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-2 {
    top: 0.5rem;
}

.right-2 {
    right: 0.5rem;
}

.bottom-6 {
    bottom: 1.5rem;
}

.right-6 {
    right: 1.5rem;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

/* Border */
.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.border-2 {
    border-width: 2px;
}

.overflow-hidden {
    overflow: hidden;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Display utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-80 {
    opacity: 0.8;
}

/* Background colors */
.bg-black {
    background-color: rgba(0, 0, 0, 1);
}

.bg-white {
    background-color: rgba(255, 255, 255, 1);
}

.bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

/* Backdrop blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* ============================================
   INSTAGRAM-STYLE CAMERA BUTTON (SIMPLIFIED & CLEAN)
   ============================================ */

/* Base button styling - clean and minimal */
.insta-camera-btn-outside {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: block; /* PC와 모바일 모두 표시 */
    width: fit-content;
}

.insta-camera-btn-outside:focus {
    outline: none;
}

.insta-camera-btn-outside:focus-visible {
    outline: 2px solid rgba(214, 41, 118, 0.5);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Update gradient to Instagram official colors */
.insta-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        #feda75 0%,   /* Yellow */
        #fa7e1e 25%,  /* Orange */
        #d62976 50%,  /* Pink */
        #962fbf 75%,  /* Purple */
        #4f5bd5 100%  /* Blue */
    );
    padding: 3px; /* Thin ring like Instagram */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(214, 41, 118, 0.3); /* Subtle shadow only */
    transition: transform 0.2s ease;
}

/* Simplified inner with white separator */
.insta-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5D580 0%, #D9B377 50%, #8B6A4A 100%);
    border: 3px solid white; /* Instagram-style white border */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: none; /* Remove complex shadows */
}

/* Remove the glossy overlay - keep it simple */
.insta-inner::before {
    display: none;
}

.insta-inner::after {
    display: none;
}

/* Simplified camera icon - just clean drop shadow */
.camera-icon-3d {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
}

/* Subtle hover - Instagram style */
.insta-camera-btn-outside:hover {
    transform: scale(1.05);
}

.insta-camera-btn-outside:hover .camera-icon-3d {
    transform: scale(1.05);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.insta-camera-btn-outside:hover .insta-ring {
    box-shadow: 0 6px 16px rgba(214, 41, 118, 0.4);
}

/* Active state - simple press effect */
.insta-camera-btn-outside:active {
    transform: scale(0.98);
}

.insta-camera-btn-outside:active .camera-icon-3d {
    transform: scale(0.95);
}

/* Remove pulse animation - too much */
@keyframes pulse-glow {
    /* Keep animation definition but make it very subtle */
    0%, 100% {
        box-shadow: 0 4px 12px rgba(214, 41, 118, 0.3);
    }
    50% {
        box-shadow: 0 5px 14px rgba(214, 41, 118, 0.35);
    }
}

.insta-ring {
    animation: pulse-glow 4s ease-in-out infinite; /* Slower, subtler */
}

/* Mobile - keep it clean */
@media (max-width: 768px) {
    .insta-ring {
        width: 70px;
        height: 70px;
    }
}

/* ============================================
   CLOTH AREA CAMERA BUTTONS
   ============================================ */
.cloth-camera-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
    border: 2px solid white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(214, 41, 118, 0.4);
    transition: all 0.3s ease;
}

.cloth-camera-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(214, 41, 118, 0.6);
}

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

/* Hide when photo is uploaded */
.drop-zone.has-image .cloth-camera-btn {
    display: none;
}

/* ============================================
   LEGACY BUTTON STYLES (DEPRECATED)
   Phase 1에서 새로운 알약형 버튼 스타일로 대체됨
   ============================================ */
/* 
기존 Hermès 사각형 버튼 스타일은 Phase 1에서 제거됨.
새로운 스타일은 340-384라인의 "BUTTON STYLES - Unified & Enhanced" 섹션 참조
*/

/* Navigation button container border */
.nav-credits-row {
    border-top: 4px solid #000000;
    padding-top: 1rem;
    background: transparent !important;
}

/* Large button variant */
.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Cancel button specific styles - ensure visibility */
#cancelStyling {
    background: white !important;
    color: var(--soft-black) !important;
    border: 2px solid var(--border-grey) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

#applyStyling {
    opacity: 1 !important;
    font-weight: 600 !important;
    color: white !important;
}

/* Styling preset buttons - ensure text visibility */
.styling-preset-btn {
    background: white !important;
    color: #8B6A4A !important;
    opacity: 1 !important;
}

.styling-preset-btn * {
    color: #8B6A4A !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.styling-preset-btn .text-sm,
.styling-preset-btn div {
    color: #8B6A4A !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.styling-preset-btn:hover {
    background: rgba(217, 179, 119, 0.1) !important;
    border-color: var(--gold) !important;
}

.styling-preset-btn.selected {
    background: rgba(217, 179, 119, 0.2) !important;
    border-color: var(--gold) !important;
}

/* Bag Upload Box - Always Active (even when resultsSection is disabled) */
#bagUploadBox {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#bagUploadBox * {
    pointer-events: auto !important;
}

/* ============================================
   TYPOGRAPHY - HERMÈS ELEGANCE
   ============================================ */
h1, h2, h3, .heading, .title {
    font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
    font-weight: 600;
    color: var(--hermes-navy);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: 500;
    margin-bottom: 1rem;
}

p, .text-base {
    font-family: 'Montserrat', 'Pretendard', 'Noto Sans KR', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    font-size: var(--font-size-body);
    color: var(--text-primary);
}

.text-sm {
    font-size: var(--font-size-small);
    font-weight: 400;
    opacity: 0.85;
}

.text-lg {
    font-size: 1.125rem;
    font-weight: 400;
}

.text-2xl {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--hermes-navy);
}

/* ============================================
   LUXURY ENHANCEMENTS
   ============================================ */

/* Subtle gold shimmer animation */
@keyframes goldShimmer {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
    }
    50% { 
        filter: brightness(1.1) drop-shadow(0 0 12px rgba(212, 175, 55, 0.5));
    }
}

/* Enhanced heading styles with refined spacing */
h1 {
    font-size: var(--font-size-h1);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

h2 {
    font-size: var(--font-size-h2);
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
}

/* Luxury container spacing */
.container, .max-w-xl, .max-w-2xl {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Enhanced button spacing - REMOVED (Phase 1에서 새 스타일로 대체) */

/* Refined shadows for depth */
.drop-zone {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(255, 102, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.drop-zone:hover {
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(255, 102, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* 🎯 Orbital Layout CSS - Fixed Circular Positions (NO rotation) */
.upload-area-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 480px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
    /* Force centering */
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    /* 모든 orbital 버튼이 보이도록 */
    overflow: visible;
    padding: 60px 0;
}

/* 🔄 Orbital Rotation Wrapper - REMOVED (Jarvis 회전 로직 제거) */

.center-drop {
    position: relative;
    z-index: 10;
}

.clothing-orbit-button {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFFEF9 0%, #F5F1EA 100%);
    border: 2px solid rgba(201, 169, 97, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(201, 169, 97, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: all 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    z-index: 15;
    overflow: hidden;
    
    /* Fixed position transform - NO rotation */
    transform: translate(-50%, -50%) var(--button-position, translate(0, 0)) scale(1);
}

.orbit-preview-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
}

.orbit-placeholder {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* STEP Badge (버튼 위에 표시) - 단순 텍스트 */
.orbit-step-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--primary-navy);
    opacity: 0.6;
    white-space: nowrap;
    z-index: 20;
}

/* filled 상태 (사진 업로드됨)에서 STEP badge 숨김 */
.clothing-orbit-button.filled .orbit-step-badge {
    display: none;
}

.clothing-orbit-button.expanded {
    opacity: 1;
    pointer-events: all;
}

/* 🔒 Locked State (비활성 상태 - 인물 촬영 전) */
/* 🎯 모든 버튼 항상 동일하게 보임 (orbit-locked 비활성화) */
.clothing-orbit-button.orbit-locked {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    filter: none;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F6F4 100%);
}

.clothing-orbit-button.orbit-locked .orbit-step-label,
.clothing-orbit-button.orbit-locked p,
.clothing-orbit-button.orbit-locked span {
    opacity: 1;
}

/* 활성화 상태 (인물 촬영 완료 후) */
.clothing-orbit-button.orbit-unlocked {
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
    filter: none;
    animation: unlockPulse 0.6s ease-out;
}

@keyframes unlockPulse {
    0% {
        transform: translate(-50%, -50%) var(--button-position) scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) var(--button-position) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) var(--button-position) scale(1);
        opacity: 1;
    }
}

/* 🌟 자비스 애니메이션: 중앙 원 그라데이션 라이트 */
@keyframes gradientLight {
    0% {
        box-shadow: 
            0 0 0 0 rgba(44, 74, 110, 0.4),
            0 4px 16px rgba(0, 0, 0, 0.06),
            0 2px 8px rgba(0, 0, 0, 0.03);
    }
    50% {
        box-shadow: 
            0 0 30px 10px rgba(44, 74, 110, 0.3),
            0 0 60px 20px rgba(44, 74, 110, 0.15),
            0 4px 16px rgba(0, 0, 0, 0.08);
    }
    100% {
        box-shadow: 
            0 0 0 0 rgba(44, 74, 110, 0),
            0 4px 16px rgba(0, 0, 0, 0.06),
            0 2px 8px rgba(0, 0, 0, 0.03);
    }
}

.person-activated {
    animation: gradientLight 1.5s ease-out;
}


.clothing-orbit-button.filled {
    opacity: 1;
    pointer-events: all;
    background: linear-gradient(135deg, #D4AF37 0%, #C9A961 100%);
    border: 2px solid rgba(201, 169, 97, 0.4);
    box-shadow: 
        0 6px 20px rgba(201, 169, 97, 0.3),
        0 2px 8px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 🎯 CRITICAL: filled 상태일 때 placeholder 숨기고 이미지 표시 */
.clothing-orbit-button.filled .orbit-placeholder {
    display: none !important;
}

.clothing-orbit-button.filled .orbit-preview-img {
    display: block !important;
}

/* 🎯 Sequential Fitting: 5개 Orbital 버튼 위치 (고정 - NO rotation) */
/* 상의 - 10시 위치 (왼쪽 위) - 중앙 원형 끝에 배치 */
.orbit-top {
    top: 50%;
    left: 50%;
    --button-position: translate(-130px, -130px);
}

.orbit-top:hover {
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(201, 169, 97, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 169, 97, 0.4);
}

.orbit-top.expanded:hover {
    animation-play-state: paused !important;
    transform: translate(-50%, -50%) var(--button-position) scale(1.15) !important;
}

/* 백 - 2시 위치 (오른쪽 위) - 중앙 원형 끝에 배치 */
.orbit-bag {
    top: 50%;
    left: 50%;
    --button-position: translate(130px, -130px);
}

.orbit-bag:hover {
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(201, 169, 97, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 169, 97, 0.4);
}

.orbit-bag.expanded:hover {
    animation-play-state: paused !important;
    transform: translate(-50%, -50%) var(--button-position) scale(1.15) !important;
}

/* 배경 - 4시 위치 (오른쪽 아래) - 중앙 원형 끝에 배치 */
.orbit-background {
    top: 50%;
    left: 50%;
    --button-position: translate(130px, 75px);
}

.orbit-background:hover {
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(201, 169, 97, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 169, 97, 0.4);
}

.orbit-background.expanded:hover {
    animation-play-state: paused !important;
    transform: translate(-50%, -50%) var(--button-position) scale(1.15) !important;
}

/* 하의 - 6시 위치 (아래 중앙) - 중앙 원형 끝에 배치 */
.orbit-bottom {
    top: 50%;
    left: 50%;
    --button-position: translate(0px, 160px);
}

.orbit-bottom:hover {
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(201, 169, 97, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 169, 97, 0.4);
}

.orbit-bottom.expanded:hover {
    animation-play-state: paused !important;
    transform: translate(-50%, -50%) var(--button-position) scale(1.15) !important;
}

/* 원피스 - 8시 위치 (왼쪽 아래) - 중앙 원형 끝에 배치 */
.orbit-dress {
    top: 50%;
    left: 50%;
    --button-position: translate(-130px, 75px);
}

.orbit-dress:hover {
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.18),
        0 4px 12px rgba(255, 102, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.orbit-dress.expanded:hover {
    animation-play-state: paused !important;
    transform: translate(-50%, -50%) var(--button-position) scale(1.15) !important;
}

/* 🎯 STEP 라벨 - 9시 방향 (옷 선택 라벨) */
.orbit-step2-label {
    top: 50%;
    left: 50%;
    --button-position: translate(-180px, -30px);
    pointer-events: none;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

.orbit-step2-label:hover {
    box-shadow: none !important;
    transform: translate(-50%, -50%) var(--button-position) !important;
}

/* 🎯 STEP 라벨 - 3시 방향 (백/배경 선택 라벨) */
.orbit-step3-label {
    top: 50%;
    left: 50%;
    --button-position: translate(180px, -30px);
    pointer-events: none;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

.orbit-step3-label:hover {
    box-shadow: none !important;
    transform: translate(-50%, -50%) var(--button-position) !important;
}

/* DEPRECATED - orbit-right 클래스 (기존 호환성) */
.orbit-right {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translate(110px, 50px) scale(0.3);
}

.orbit-right.expanded,
.orbit-right.filled {
    transform: translate(-50%, -50%) translate(110px, 50px) scale(1);
}

@media (max-width: 768px) {
    .upload-area-container {
        min-height: 380px;
    }
    
    .clothing-orbit-button {
        width: 85px;
        height: 85px;
    }
    
    /* 상의 - 10시 - 중앙 원형 끝에 배치 */
    .orbit-top {
        --button-position: translate(-105px, -105px);
    }
    
    /* 백 - 2시 - 중앙 원형 끝에 배치 */
    .orbit-bag {
        --button-position: translate(105px, -105px);
    }
    
    /* 배경 - 4시 - 중앙 원형 끝에 배치 */
    .orbit-background {
        --button-position: translate(105px, 55px);
    }
    
    /* 하의 - 6시 - 중앙 원형 끝에 배치 */
    .orbit-bottom {
        --button-position: translate(0px, 135px);
    }
    
    /* 원피스 - 8시 - 중앙 원형 끝에 배치 */
    .orbit-dress {
        --button-position: translate(-105px, 55px);
    }
    
    /* STEP 라벨 */
    .orbit-step2-label {
        --button-position: translate(-145px, -25px);
    }
    
    .orbit-step3-label {
        --button-position: translate(145px, -25px);
    }
}

@media (max-width: 400px) {
    .upload-area-container {
        min-height: 350px;
    }
    
    .clothing-orbit-button {
        width: 75px;
        height: 75px;
        font-size: 0.65rem;
    }
    
    /* 상의 - 10시 - 중앙 원형 끝에 배치 */
    .orbit-top {
        --button-position: translate(-90px, -90px);
    }
    
    /* 백 - 2시 - 중앙 원형 끝에 배치 */
    .orbit-bag {
        --button-position: translate(90px, -90px);
    }
    
    /* 배경 - 4시 - 중앙 원형 끝에 배치 */
    .orbit-background {
        --button-position: translate(90px, 48px);
    }
    
    /* 하의 - 6시 - 중앙 원형 끝에 배치 */
    .orbit-bottom {
        --button-position: translate(0px, 115px);
    }
    
    /* 원피스 - 8시 - 중앙 원형 끝에 배치 */
    .orbit-dress {
        --button-position: translate(-90px, 48px);
    }
    
    /* STEP 라벨 */
    .orbit-step2-label {
        --button-position: translate(-125px, -22px);
    }
    
    .orbit-step3-label {
        --button-position: translate(125px, -22px);
    }
}

/* =========================================
   🎯 Orbital Button State Visual Feedback
   단계별 색상 시스템: Green → Blue → Gold
   ========================================= */

/* 🟢 State: READY (준비 완료) - Green */
.clothing-orbit-button.orbit-ready {
    border: 3px solid #4ADE80;
    background: linear-gradient(135deg, #E5E8E5 0%, #D4F0D8 100%);
    box-shadow: 
        0 8px 24px rgba(74, 222, 128, 0.3),
        0 0 20px rgba(74, 222, 128, 0.4),
        0 0 40px rgba(74, 222, 128, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: orbit-pulse 3s ease-in-out infinite;
}

/* 공통 Orbital Pulse 애니메이션 - 제자리에서 scale만 변경 (NO rotation) */
@keyframes orbit-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) var(--button-position) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) var(--button-position) scale(1.05);
    }
}

/* 🔵 State: UPLOADED (아이템 선택됨) - Blue */
.clothing-orbit-button.orbit-uploaded {
    border: 3px solid #3B82F6;
    background: linear-gradient(135deg, #E5E8E5 0%, #DBEAFE 100%);
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.4),
        0 0 20px rgba(59, 130, 246, 0.5),
        0 0 40px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: orbit-pulse 2s ease-in-out infinite;
}

/* 🟡 State: FITTED (피팅 완료) - Gold */
.clothing-orbit-button.orbit-fitted {
    border: 3px solid #D4AF37;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    box-shadow: 
        0 8px 24px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.6),
        0 0 40px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: orbit-pulse 2s ease-in-out infinite;
}

/* ✅ Checkmark Badge (피팅 완료 표시) - Gold */
.orbit-checkmark {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.6),
        0 0 20px rgba(212, 175, 55, 0.4);
    z-index: 20;
    animation: checkmark-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orbit-checkmark::after {
    content: '✓';
    color: white;
    font-size: 18px;
    font-weight: bold;
}

@keyframes checkmark-appear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 🌀 Jarvis Scanning Effect (Optional - 피팅 진행 중) */
.clothing-orbit-button.orbit-processing {
    border: 3px solid #60A5FA;
    animation: jarvis-scan 1.5s linear infinite;
    /* position: absolute는 유지 (부모 클래스에서 상속) */
    overflow: hidden;
}

.clothing-orbit-button.orbit-processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(96, 165, 250, 0.3) 50%, 
        transparent 100%);
    animation: jarvis-sweep 1.5s linear infinite;
    z-index: 1;
}

@keyframes jarvis-scan {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(96, 165, 250, 0.4),
            0 0 20px rgba(96, 165, 250, 0.5),
            0 0 40px rgba(96, 165, 250, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(96, 165, 250, 0.6),
            0 0 30px rgba(96, 165, 250, 0.7),
            0 0 60px rgba(96, 165, 250, 0.4);
    }
}

@keyframes jarvis-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   BUTTON HIGHLIGHT (버튼 강조 효과)
   ============================================ */

/* 골드 펄스 애니메이션 */
@keyframes btn-pulse-gold {
    0%, 100% {
        box-shadow: 
            0 0 0 0 rgba(212, 175, 55, 0.7),
            0 4px 12px rgba(212, 175, 55, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 0 8px rgba(212, 175, 55, 0),
            0 6px 20px rgba(212, 175, 55, 0.6);
        transform: scale(1.02);
    }
}

/* 버튼 강조 클래스 */
.btn-highlight {
    animation: btn-pulse-gold 2s ease-in-out infinite !important;
    border-color: #D4AF37 !important;
    position: relative;
    z-index: 10;
}

/* ============================================
   STYLING MODAL (배경 변경 모달)
   ============================================ */

#stylingModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

#stylingModal > div {
    background: var(--ivory, #f5f5f0);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#stylingModal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green, #2C4A3E);
    margin: 0;
}

#stylingModal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wood-brown, #5D4E37);
    margin-bottom: 12px;
}

#closeStylingModal {
    font-size: 2rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

#closeStylingModal:hover {
    color: #333;
}

#backgroundsGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

#backgroundsGrid .styling-preset-btn {
    aspect-ratio: 1;
    border: 2px solid var(--wood-brown, #5D4E37);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    padding: 0;
}

#backgroundsGrid .styling-preset-btn:hover {
    transform: scale(1.05);
    border-color: var(--gold, #D4AF37);
}

#backgroundsGrid .styling-preset-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   IN-APP BROWSER (라이브커머스 통합)
   ============================================ */

#inAppBrowserModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.in-app-browser-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.in-app-browser-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.in-app-browser-header {
    background: linear-gradient(135deg, #1C3D5A 0%, #2C4A6E 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.in-app-browser-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
    flex: 1;
    text-align: center;
}

.in-app-browser-back-btn,
.in-app-browser-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.in-app-browser-back-btn:hover,
.in-app-browser-close-btn:hover {
    background: rgba(255, 102, 0, 0.9);
    border-color: #FF6600;
}

.in-app-browser-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.in-app-browser-close:hover {
    background: rgba(255, 102, 0, 0.9);
    border-color: #FF6600;
    transform: rotate(90deg);
}

.in-app-browser-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

.in-app-browser-floating-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FF6600 0%, #E65C00 100%);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(255, 102, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.in-app-browser-floating-btn:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(255, 102, 0, 0.5),
        0 6px 16px rgba(0, 0, 0, 0.4);
}

.in-app-browser-floating-btn:active {
    transform: translateX(-50%) translateY(-1px);
}

.floating-btn-icon {
    font-size: 1.3rem;
}

.floating-btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .in-app-browser-header {
        padding: 12px 16px;
    }
    
    .in-app-browser-title {
        font-size: 0.95rem;
    }
    
    .in-app-browser-close {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    .in-app-browser-floating-btn {
        bottom: 20px;
        padding: 16px 32px;
        font-size: 1rem;
    }
}

/* =====================================================
   ORBITAL DELETE BUTTON (Hermès 럭셔리 스타일)
   ===================================================== */
.orbital-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 30;
    
    /* 크기 */
    width: 32px;
    height: 32px;
    
    /* 배경: Hermès Navy 그라데이션 */
    background: linear-gradient(135deg, #1C3D5A 0%, #2C4A6E 100%);
    
    /* 테두리 */
    border: 2.5px solid #FFFFFF;
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    
    /* 텍스트 */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    
    /* 플렉스 중앙 정렬 */
    display: flex; /* 항상 보임 */
    align-items: center;
    justify-content: center;
    
    /* 커서 */
    cursor: pointer;
    
    /* 전환 효과 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 항상 보임 */
    opacity: 1;
}

.orbital-delete-btn:hover {
    /* Hermès Orange로 변경 */
    background: linear-gradient(135deg, #FF6600 0%, #E65C00 100%);
    border-color: #FFD700;
    
    /* 살짝 확대 */
    transform: scale(1.15) rotate(90deg);
    
    /* 그림자 강화 */
    box-shadow: 
        0 6px 20px rgba(255, 102, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.orbital-delete-btn:active {
    transform: scale(1.05) rotate(90deg);
    box-shadow: 
        0 3px 12px rgba(255, 102, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .orbital-delete-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: -6px;
        right: -6px;
    }
}

/* 중앙 인물 사진 삭제 버튼 (원형 바깥 위쪽 정중앙) */
#personDeleteBtn {
    top: -50px !important; /* 원형 완전히 바깥으로 */
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 1.3rem !important;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.3),
        0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.25) !important;
}

#personDeleteBtn:hover {
    transform: translateX(-50%) scale(1.15) rotate(90deg) !important;
}

#personDeleteBtn:active {
    transform: translateX(-50%) scale(1.05) rotate(90deg) !important;
}

@media (max-width: 768px) {
    #personDeleteBtn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.2rem !important;
        top: -45px !important;
    }
}
