/* ===================================================================
   TIỆM ẢNH PHOTOBOOTH ✿ KOREAN STUDIO DESIGN SYSTEM
   Harmonious 2-Column Layout, Diverse Filters & Aesthetic Frames
   =================================================================== */

:root {
    /* Palette: Soft Cream, Strawberry Milk & Blush Pinks */
    --bg-page: #fff8fa;
    --bg-card: #ffffff;
    --bg-card-soft: #fff3f6;
    --bg-pill: #fff0f3;
    --bg-pill-hover: #ffe4ea;

    --pink-primary: #ff6b8b;
    --pink-hover: #ff5277;
    --pink-light: #ffd1dc;
    --pink-soft: #ffeef2;
    --pink-border: #fecdd3;
    --pink-shadow: rgba(255, 107, 139, 0.22);

    --text-main: #3d2f33;      /* Warm cocoa charcoal */
    --text-muted: #857277;     /* Soft warm grey */
    --text-subtle: #b8a9ad;
    --text-white: #ffffff;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-soft: 0 4px 16px rgba(255, 133, 161, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 8px 24px rgba(255, 143, 163, 0.1), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-float: 0 16px 40px rgba(61, 47, 51, 0.12), 0 3px 10px rgba(61, 47, 51, 0.05);

    --font-cute: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-hand: 'Itim', 'Patrick Hand', cursive;
    --font-display: 'Space Grotesk', sans-serif;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-cute);
    background-color: var(--bg-page);
    background-image: radial-gradient(#ffd6e0 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    color: var(--text-main);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fullscreen Flash Effect Overlay */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    transition: opacity 0.08s ease-out;
}

.flash-overlay.flashing {
    opacity: 0.98;
    transition: none;
}

/* Main Layout Structure */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* ===================================================================
   HEADER
   =================================================================== */
.app-header {
    height: 64px;
    min-height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1.5px solid var(--pink-border);
    z-index: 50;
    box-shadow: 0 2px 10px rgba(255, 107, 139, 0.05);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 107, 139, 0.15);
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition: transform 0.25s ease;
}

.brand-avatar:hover .brand-logo-img {
    transform: scale(1.08);
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: -0.2px;
}

.brand-title .heart-deco {
    color: var(--pink-primary);
    font-size: 0.95rem;
    animation: gentlePulse 2.5s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.brand-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Center Stage Navigation Pills */
.header-nav {
    display: inline-flex;
    background: #fff0f3;
    padding: 3px;
    border-radius: var(--radius-full);
    border: 1px solid var(--pink-border);
    gap: 3px;
}

.nav-pill-btn {
    border: none;
    background: transparent;
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-cute);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-pill-btn:hover {
    color: var(--pink-primary);
}

.nav-pill-btn.active {
    background: #ffffff;
    color: var(--pink-primary);
    box-shadow: 0 2px 10px rgba(255, 107, 139, 0.15);
}

/* Header Right Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shots-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #fff0f3;
    border: 1px solid var(--pink-border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
}

.cute-circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--pink-border);
    background: #ffffff;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cute-circle-btn:hover {
    background: #fff0f3;
    color: var(--pink-primary);
    transform: translateY(-1px);
}

/* ===================================================================
   MAIN WORKSPACE SPLIT (UNIFIED 2-COLUMN LAYOUT)
   =================================================================== */
.app-main {
    flex: 1;
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* -------------------------------------------------------------------
   LEFT COLUMN: STAGE SECTION (EXPANSIVE STUDIO WORKSPACE)
   ------------------------------------------------------------------- */
.stage-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12px 20px;
    overflow-y: auto;
}

.stage-center-column {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 0 auto;
}

.stage-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.stage-container.hidden {
    display: none !important;
}

/* Camera Card (Large Immersive Live Photobooth Frame) */
.camera-card {
    position: relative;
    width: 100%;
    height: calc(100vh - 280px);
    min-height: 400px;
    max-height: 560px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: visible;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    transition: all 0.25s ease;
}

/* Live Photobooth Frame (Direct real-time preview of selected frame) */
.camera-live-frame {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 24px 14px 24px;
    background: #ffffff;
    color: var(--text-main);
    box-sizing: border-box;
    position: relative;
    border-radius: var(--radius-lg);
    transition: background 0.25s ease, color 0.25s ease, padding 0.2s ease;
}

/* Live Frame Pattern Themes */
.camera-live-frame.frame-pat-solid {
    /* Background set dynamically via style.background */
}

.camera-live-frame.frame-pat-white {
    background: #ffffff !important;
    color: #4a3e3d !important;
}

.camera-live-frame.frame-pat-gingham-pink {
    background-color: #ffffff !important;
    background-image: linear-gradient(90deg, rgba(255, 107, 139, 0.25) 50%, transparent 50%),
                      linear-gradient(rgba(255, 107, 139, 0.25) 50%, transparent 50%) !important;
    background-size: 24px 24px !important;
    color: #692d42 !important;
}

.camera-live-frame.frame-pat-gingham-blue {
    background-color: #ffffff !important;
    background-image: linear-gradient(90deg, rgba(14, 165, 233, 0.25) 50%, transparent 50%),
                      linear-gradient(rgba(14, 165, 233, 0.25) 50%, transparent 50%) !important;
    background-size: 24px 24px !important;
    color: #1d4e63 !important;
}

.camera-live-frame.frame-pat-polka-pink {
    background-color: #fff0f5 !important;
    background-image: radial-gradient(#ff6b8b 3px, transparent 3px) !important;
    background-size: 20px 20px !important;
    color: #70344d !important;
}

.camera-live-frame.frame-pat-sweet-grad,
.camera-live-frame.frame-pat-gradient-sweet {
    background: linear-gradient(135deg, #ffd1dc 0%, #d5e8f7 100%) !important;
    color: #3d3a4d !important;
}

.camera-live-frame.frame-pat-sunset-grad,
.camera-live-frame.frame-pat-gradient-sunset {
    background: linear-gradient(135deg, #ffc3a0 0%, #ffafbd 100%) !important;
    color: #4a2530 !important;
}

.camera-live-frame.frame-pat-film-strip {
    background: #18181c !important;
    color: #f5f5f7 !important;
}

/* Authentic film sprocket perforations for 35mm film strip frame */
.camera-live-frame.frame-pat-film-strip::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 7px;
    width: 9px;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0.75) 10px, transparent 10px, transparent 20px);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
}

.camera-live-frame.frame-pat-film-strip::after {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 7px;
    width: 9px;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0.75) 10px, transparent 10px, transparent 20px);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
}

.camera-live-frame.frame-pat-kraft,
.camera-live-frame.frame-pat-kraft-paper {
    background-color: #f2e9dc !important;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px) !important;
    background-size: 8px 8px !important;
    color: #44352b !important;
}

/* Pre-attached Cute Sticker Frame Themes */
.camera-live-frame.frame-pat-sticker-bow {
    background-color: #fff0f4 !important;
    background-image: radial-gradient(#ffccd8 2px, transparent 2px),
                      radial-gradient(#ffccd8 2px, #fff0f4 2px) !important;
    background-size: 24px 24px !important;
    background-position: 0 0, 12px 12px !important;
    border: 3.5px solid #ffccd8 !important;
    color: #70244d !important;
}

.camera-live-frame.frame-pat-sticker-bunny {
    background-color: #eef9f5 !important;
    background-image: linear-gradient(45deg, #def4ea 25%, transparent 25%, transparent 75%, #def4ea 75%, #def4ea) !important;
    background-size: 20px 20px !important;
    border: 3.5px solid #bbf0dc !important;
    color: #1d5743 !important;
}

.camera-live-frame.frame-pat-sticker-bear {
    background-color: #fff9e8 !important;
    background-image: radial-gradient(#fde7b6 2px, transparent 2px) !important;
    background-size: 18px 18px !important;
    border: 3.5px solid #fde09e !important;
    color: #614322 !important;
}

.camera-live-frame.frame-pat-sticker-strawberry {
    background-color: #fff0f5 !important;
    background-image: radial-gradient(#ff4d6d 2.5px, transparent 2.5px) !important;
    background-size: 22px 22px !important;
    border: 3.5px solid #ffb3c1 !important;
    color: #802947 !important;
}

.camera-live-frame.frame-pat-sticker-angel {
    background: linear-gradient(135deg, #f5efff 0%, #e8dcff 100%) !important;
    border: 3.5px solid #d8b4fe !important;
    color: #4f2b82 !important;
}

.camera-live-frame.frame-pat-sticker-cat {
    background-color: #fff4ec !important;
    border: 3.5px solid #fed7aa !important;
    color: #693520 !important;
}

.camera-live-frame.frame-pat-sticker-daisy {
    background-color: #eaf5ff !important;
    border: 3.5px solid #bae6fd !important;
    color: #194a6b !important;
}

/* Extra Cute Non-sticker Pattern Frames */
.camera-live-frame.frame-pat-rainbow {
    background: linear-gradient(135deg, #ffd1dc 0%, #fef3c7 35%, #dcfce7 70%, #e0f2fe 100%) !important;
    color: #4a3e3d !important;
}

.camera-live-frame.frame-pat-clouds {
    background-color: #dbeafe !important;
    background-image: radial-gradient(#ffffff 6px, transparent 6px),
                      radial-gradient(#ffffff 9px, transparent 9px) !important;
    background-size: 40px 40px, 60px 60px !important;
    background-position: 0 0, 20px 20px !important;
    color: #1e3a5f !important;
}

.camera-live-frame.frame-pat-leopard-pink {
    background-color: #fff0f5 !important;
    background-image: radial-gradient(#ff85a1 3px, transparent 3px),
                      radial-gradient(#ff4d6d 2px, transparent 2px) !important;
    background-size: 24px 24px, 36px 36px !important;
    background-position: 0 0, 12px 12px !important;
    color: #692d42 !important;
}

/* Outer Pre-attached Stickers Layer */
.frame-outer-stickers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 15;
    overflow: visible;
}

.outer-deco {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
    animation: cuteDecoFloat 3s ease-in-out infinite alternate;
    user-select: none;
}

@keyframes cuteDecoFloat {
    0% { transform: translateY(0) scale(1) rotate(var(--base-rot, 0deg)); }
    100% { transform: translateY(-4px) scale(1.06) rotate(calc(var(--base-rot, 0deg) + 3deg)); }
}

.outer-deco.deco-tl { top: -10px; left: -10px; font-size: 40px; --base-rot: -12deg; }
.outer-deco.deco-tc { top: -16px; left: 50%; transform: translateX(-50%); font-size: 46px; --base-rot: 0deg; }
.outer-deco.deco-tr { top: -10px; right: -10px; font-size: 40px; --base-rot: 12deg; }
.outer-deco.deco-bl { bottom: 48px; left: -10px; font-size: 36px; --base-rot: -8deg; }
.outer-deco.deco-br { bottom: 48px; right: -10px; font-size: 36px; --base-rot: 10deg; }
.outer-deco.deco-ml { top: 48%; left: -12px; font-size: 32px; --base-rot: -15deg; }
.outer-deco.deco-mr { top: 48%; right: -12px; font-size: 32px; --base-rot: 15deg; }

/* Layout Variations on Live Camera */
.camera-live-frame.frame-layout-polaroid {
    padding-bottom: 24px;
}

.camera-live-frame.frame-layout-polaroid .live-slot-wrapper {
    aspect-ratio: 1 / 1;
    max-height: calc(100% - 64px);
    margin: 0 auto;
}

.camera-live-frame.frame-layout-polaroid .camera-frame-footer {
    padding-top: 16px;
    justify-content: center;
    text-align: center;
}

/* Inner Video Slot Container */
.live-slot-wrapper {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #181517;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    transition: border-radius 0.2s ease;
    /* iOS WebKit hardware compositing & border-radius clip fixes */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    isolation: isolate;
}

/* Live Frame Footer */
.camera-frame-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    min-height: 48px;
    color: inherit;
    font-family: var(--font-hand);
}

.frame-footer-texts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.live-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.live-brand-subtitle {
    font-size: 0.82rem;
    opacity: 0.88;
}

.live-brand-date {
    font-size: 0.74rem;
    font-family: var(--font-cute);
    font-weight: 600;
    opacity: 0.78;
}

.frame-footer-deco {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-barcode-stamp {
    display: flex;
    align-items: flex-end;
    height: 24px;
    gap: 2.5px;
    opacity: 0.85;
}

.live-barcode-stamp span {
    display: inline-block;
    background: currentColor;
    width: 2px;
    height: 100%;
}
.live-barcode-stamp span:nth-child(2) { width: 3.5px; }
.live-barcode-stamp span:nth-child(4) { width: 4px; }
.live-barcode-stamp span:nth-child(6) { width: 3px; }

.live-heart-stamp {
    font-size: 1.5rem;
    color: currentColor;
    opacity: 0.9;
}

#webcam {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transform: scaleX(-1) translateZ(0);
    transform: scaleX(-1) translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    transition: filter 0.2s ease;
}

#webcam.unmirrored {
    -webkit-transform: scaleX(1) translateZ(0);
    transform: scaleX(1) translateZ(0);
}

/* Real-time AI Cute Background Canvas */
.camera-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    pointer-events: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: filter 0.2s ease;
}

.camera-bg-canvas.hidden {
    display: none !important;
}

/* iOS Safari Tap to Play Overlay */
.camera-tap-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 240, 245, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 28;
    cursor: pointer;
    text-align: center;
}

.camera-tap-overlay.hidden {
    display: none !important;
}

.tap-card {
    background: #ffffff;
    border: 2px solid var(--pink-primary);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: 0 8px 24px rgba(255, 107, 139, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: tapCardPulse 2s infinite ease-in-out;
}

@keyframes tapCardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tap-icon {
    font-size: 32px;
}

.tap-title {
    font-family: var(--font-cute);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pink-primary);
}

.tap-sub {
    font-family: var(--font-cute);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Rule of thirds grid lines */
.camera-guides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.camera-guides.hidden { display: none; }

/* Camera Permission Guidance Overlay */
.camera-perm-banner {
    position: absolute;
    inset: 0;
    background: rgba(255, 245, 247, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 30;
    text-align: center;
}

.camera-perm-banner.hidden {
    display: none !important;
}

.perm-banner-card {
    background: #ffffff;
    border: 2px solid var(--pink-border);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    max-width: 380px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.perm-icon {
    font-size: 38px;
    line-height: 1;
}

.perm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pink-primary);
    margin: 0;
    line-height: 1.3;
}

.perm-desc {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.45;
    margin: 0;
}

.perm-subtip {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0;
}

.guide-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.45);
}

.guide-line.h-1 { top: 33.33%; left: 0; width: 100%; height: 1.5px; }
.guide-line.h-2 { top: 66.66%; left: 0; width: 100%; height: 1.5px; }
.guide-line.v-1 { left: 33.33%; top: 0; height: 100%; width: 1.5px; }
.guide-line.v-2 { left: 66.66%; top: 0; height: 100%; width: 1.5px; }

/* Giant Countdown Overlay */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 245, 247, 0.35);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.countdown-overlay.hidden { display: none; }

.countdown-number {
    font-size: 110px;
    font-weight: 700;
    font-family: var(--font-hand);
    color: var(--pink-primary);
    text-shadow: 0 4px 20px rgba(255, 107, 139, 0.4), 0 0 35px #ffffff;
    animation: cuteCountBounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
}

@keyframes cuteCountBounce {
    0% { transform: scale(1.35); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    80% { transform: scale(0.96); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0; }
}

/* Burst Progress Indicator */
.burst-progress-container {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid var(--pink-border);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-soft);
    z-index: 15;
}

.burst-progress-container.hidden { display: none; }

.burst-progress-track {
    width: 90px;
    height: 7px;
    background: #ffeef2;
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.burst-progress-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--pink-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.burst-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pink-primary);
}

/* Camera Top Left Active Badges */
.camera-top-left-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.cute-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--pink-border);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pink-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cute-tag:hover {
    transform: translateY(-1.5px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 139, 0.25);
    border-color: var(--pink-primary);
}

.cute-tag.live-frame-tag {
    color: #4a3e3d;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.12);
}

.cute-tag.live-layout-tag {
    color: #0284c7;
    background: rgba(240, 249, 255, 0.96);
    border-color: #bae6fd;
}

/* Camera Quick Floating Tools */
.camera-quick-tools {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.cam-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid var(--pink-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cam-tool-btn:hover {
    background: #fff0f3;
    transform: scale(1.08);
}

.cam-tool-btn.cam-tool-decor {
    background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.4);
    animation: pulseQuickDecor 2.2s infinite ease-in-out;
}

@keyframes pulseQuickDecor {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); box-shadow: 0 6px 18px rgba(255, 77, 109, 0.6); }
}

/* Desktop Defaults for Mobile Decor Elements */
.mobile-drawer-header,
.mobile-sidebar-trigger-wrapper,
.sidebar-backdrop,
.mobile-decor-btn,
.mobile-editor-decor-btn {
    display: none;
}

/* Camera Control Dock (Perfect 100% width matching camera card) */
.camera-control-dock {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.dock-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dock-col.left {
    align-items: flex-start;
}

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

.dock-col.right {
    align-items: flex-end;
}

.dock-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.cute-pills {
    display: inline-flex;
    background: #fff0f3;
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}

.pill-choice {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-cute);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-choice:hover {
    color: var(--pink-primary);
}

.pill-choice.active {
    background: #ffffff;
    color: var(--pink-primary);
    box-shadow: 0 2px 6px rgba(255, 107, 139, 0.16);
}

/* Center Shutter Button */
.cute-shutter-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.shutter-flower {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
    border: 3.5px solid #ffffff;
    box-shadow: 0 6px 22px rgba(255, 107, 139, 0.35), 0 0 0 3.5px var(--pink-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    gap: 2px;
    padding: 6px;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shutter-camera-icon {
    font-size: 24px;
    line-height: 1;
    display: block;
}

.shutter-label {
    font-family: var(--font-cute);
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    text-align: center;
}

.cute-shutter-btn:hover .shutter-flower {
    transform: scale(1.08) rotate(4deg);
    box-shadow: 0 8px 24px rgba(255, 77, 109, 0.4), 0 0 0 4px var(--pink-border);
}

.cute-shutter-btn:active .shutter-flower {
    transform: scale(0.94);
}

.shutter-subtext {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    margin-top: 4px;
}

/* Mini Camera Selector Modal */
.mini-modal {
    position: absolute;
    top: 70px;
    right: 20px;
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-card);
    z-index: 100;
    width: 260px;
}

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

.mini-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.mini-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

/* -------------------------------------------------------------------
   EDITOR VIEW (STAGE VIEW 2)
   ------------------------------------------------------------------- */
.editor-workspace {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
}

.photobooth-preview-wrapper {
    position: relative;
    box-shadow: var(--shadow-float);
    border-radius: var(--radius-sm);
    height: calc(100vh - 220px);
    min-height: 480px;
    max-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#boothCanvas {
    max-height: calc(100vh - 230px);
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    display: block;
}

/* Interactive Sticker Layer */
.sticker-interactive-layer {
    position: absolute;
    pointer-events: auto;
    overflow: visible;
    z-index: 25;
}

.placed-sticker {
    position: absolute;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    transform-origin: center center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    touch-action: none;
    border-radius: 8px;
    padding: 3px;
    transition: outline 0.15s ease, background-color 0.15s ease;
}

.placed-sticker:active {
    cursor: grabbing;
}

.placed-sticker.selected {
    outline: 2.5px dashed #ff4d6d;
    outline-offset: 4px;
    background: rgba(255, 107, 139, 0.12);
}

.sticker-content-text {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    display: inline-block;
}

/* Floating Cute Delete Badge 'X' on Selected Sticker */
.sticker-delete-badge {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: #ff4d6d;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    outline: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.sticker-delete-badge:hover {
    background: #e63956;
    transform: scale(1.18);
}

.sticker-delete-badge:active {
    background: #c92a43;
    transform: scale(0.92);
}

/* Editor Action Dock */
.editor-action-dock {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    gap: 10px;
}

.editor-dock-left, .editor-dock-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.cute-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-cute);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cute-btn.primary {
    background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px var(--pink-shadow);
}

.cute-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px var(--pink-shadow);
}

.cute-btn.secondary {
    background: #fff0f3;
    border: 1px solid var(--pink-border);
    color: var(--text-main);
}

.cute-btn.secondary:hover {
    background: #ffe4ea;
    color: var(--pink-primary);
}

.cute-btn.danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #ef4444;
}

.cute-btn.sm {
    padding: 4px 10px;
    font-size: 0.72rem;
}

.cute-btn.full-width {
    width: 100%;
}

/* -------------------------------------------------------------------
   BOTTOM FILMSTRIP PANEL (MATCHING 100% WIDTH OF STAGE COLUMN)
   ------------------------------------------------------------------- */
.filmstrip-panel {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-soft);
}

.filmstrip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 700;
}

.filmstrip-title {
    color: var(--text-main);
}

.filmstrip-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    min-height: 58px;
}

.filmstrip-empty-placeholder {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 6px;
}

.filmstrip-item {
    position: relative;
    width: 72px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid var(--pink-border);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.filmstrip-item:hover {
    border-color: var(--pink-primary);
    transform: scale(1.05);
}

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

.filmstrip-item .thumb-idx {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--pink-primary);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
}

.filmstrip-item .thumb-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.filmstrip-item:hover .thumb-del {
    display: flex;
}

/* ===================================================================
   RIGHT COLUMN: STUDIO CUSTOMIZATION SIDEBAR
   =================================================================== */
.sidebar-section {
    width: 390px;
    min-width: 390px;
    background: #ffffff;
    border-left: 1.5px solid var(--pink-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -2px 0 12px rgba(255, 107, 139, 0.04);
}

/* 4 Equal Tabs at top */
.sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff8fa;
    border-bottom: 1.5px solid var(--pink-border);
}

.cute-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: all 0.2s ease;
}

.cute-tab .tab-emoji {
    font-size: 1.15rem;
}

.cute-tab .tab-label {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.cute-tab:hover {
    color: var(--pink-primary);
    background: #fff0f3;
}

.cute-tab.active {
    color: var(--pink-primary);
    border-bottom-color: var(--pink-primary);
    background: #ffffff;
}

/* Sidebar Body Content Area */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.tab-panel.active {
    display: flex;
}

/* Common Card */
.cute-card {
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-md);
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 6px rgba(255, 107, 139, 0.03);
}

.card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
}

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

.badge-filter-count {
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: #fff0f3;
    border: 1px solid var(--pink-border);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--pink-primary);
}

.cute-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Filter Category Pills */
.filter-cat-pills {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-cat-pill {
    border: none;
    background: #fff0f3;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-cute);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--pink-border);
    transition: all 0.2s ease;
}

.filter-cat-pill.active {
    background: var(--pink-primary);
    color: #ffffff;
    border-color: var(--pink-primary);
}

/* 16-Filters Grid (4 Columns, compact and aligned) */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 330px;
    overflow-y: auto;
    padding: 2px;
}

.filter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px 3px;
    border-radius: var(--radius-sm);
    background: #fff8fa;
    border: 1.5px solid var(--pink-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-card:hover {
    transform: translateY(-2px);
    border-color: var(--pink-primary);
    background: #ffffff;
}

.filter-card.active {
    border-color: var(--pink-primary);
    background: #fff0f3;
    box-shadow: 0 2px 8px rgba(255, 107, 139, 0.18);
}

.filter-preview {
    width: 100%;
    height: 42px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="%23ff758f"/><stop offset="100%" stop-color="%23ffd1dc"/></linearGradient></defs><rect width="100" height="100" fill="url(%23g)"/><circle cx="50" cy="50" r="24" fill="%23ffffff" opacity="0.9"/></svg>');
}

/* CSS Filter simulations for preview tiles */
.filter-preview.filter-normal { filter: none; }
.filter-preview.filter-haru { filter: contrast(1.06) brightness(1.12) saturate(0.92) hue-rotate(-8deg); }
.filter-preview.filter-rosy { filter: hue-rotate(325deg) saturate(1.28) brightness(1.08); }
.filter-preview.filter-seoul { filter: sepia(0.24) contrast(1.08) brightness(1.05) saturate(1.22); }
.filter-preview.filter-fuji { filter: brightness(1.1) contrast(0.96) saturate(1.15) hue-rotate(5deg); }
.filter-preview.filter-peach { filter: sepia(0.18) hue-rotate(345deg) saturate(1.35) brightness(1.08); }
.filter-preview.filter-matte { filter: contrast(0.92) brightness(1.15) saturate(0.95); }
.filter-preview.filter-dreamy { filter: brightness(1.18) contrast(0.88) saturate(1.12); }
.filter-preview.filter-lavender { filter: hue-rotate(275deg) saturate(1.15) brightness(1.05); }
.filter-preview.filter-kodak { filter: sepia(0.3) contrast(1.15) brightness(1.02) saturate(1.25); }
.filter-preview.filter-y2k { filter: sepia(0.42) contrast(1.22) brightness(0.95) saturate(1.3); }
.filter-preview.filter-moody { filter: contrast(1.18) brightness(0.96) saturate(0.85) sepia(0.15); }
.filter-preview.filter-cyberpunk { filter: contrast(1.3) saturate(1.55) hue-rotate(185deg); }
.filter-preview.filter-classic-bw { filter: grayscale(1) contrast(1.25) brightness(1.06); }
.filter-preview.filter-noir { filter: grayscale(1) contrast(1.55) brightness(0.92); }
.filter-preview.filter-softmono { filter: grayscale(1) contrast(0.95) brightness(1.12); }

.filter-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.filter-card.active .filter-name {
    color: var(--pink-primary);
}

/* ===================================================================
   AI BACKGROUND REMOVAL & CUTE BACKDROPS GRID
   =================================================================== */
.live-backdrop-tag {
    background: #fdf2f8 !important;
    border-color: #f472b6 !important;
    color: #db2777 !important;
}

.badge-ai-ready {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #059669 !important;
}

.badge-ai-loading {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.backdrops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 330px;
    overflow-y: auto;
    padding: 2px;
}

.backdrop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    background: #fff8fa;
    border: 1.5px solid var(--pink-border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.backdrop-card:hover {
    transform: translateY(-2px);
    border-color: var(--pink-primary);
    background: #ffffff;
    box-shadow: 0 4px 12px var(--pink-shadow);
}

.backdrop-card.active {
    background: #ffffff;
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 2.5px rgba(255, 107, 139, 0.25), 0 4px 12px var(--pink-shadow);
    transform: translateY(-2px);
}

.backdrop-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.bg-card-icon {
    font-size: 1.3rem;
}

.backdrop-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.backdrop-card.active .backdrop-name {
    color: var(--pink-primary);
}

/* Backdrop Thumbnails */
.bg-thumb-original {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1.5px dashed #d1d5db;
}
.bg-thumb-sakura {
    background-image: url('/static/booth/image/backgrounds/bg_sakura.jpg');
}
.bg-thumb-cat-cafe {
    background-image: url('/static/booth/image/backgrounds/bg_cat_cafe.jpg');
}
.bg-thumb-strawberry {
    background-image: url('/static/booth/image/backgrounds/bg_strawberry.jpg');
}
.bg-thumb-cloud {
    background-image: url('/static/booth/image/backgrounds/bg_pastel_cloud.jpg');
}
.bg-thumb-blur {
    background: linear-gradient(135deg, #dbeafe 0%, #fce7f3 100%);
}
.bg-thumb-pink {
    background: #ffd8e4;
}
.bg-thumb-sky {
    background: #cce7ff;
}
.bg-thumb-butter {
    background: #fff2c2;
}
.bg-thumb-lilac {
    background: #ebd8ff;
}
.bg-thumb-mint {
    background: #d3f4dd;
}
.bg-thumb-white {
    background: #fdfbfb;
    border: 1px solid #f0e6e8;
}
.bg-thumb-black {
    background: #242426;
}
.bg-thumb-sweet-grad {
    background: linear-gradient(135deg, #ffd1dc 0%, #d5e8f7 100%);
}
.bg-thumb-sunset-grad {
    background: linear-gradient(135deg, #ffc3a0 0%, #ffafbd 100%);
}
.bg-thumb-gingham {
    background-color: #ffffff;
    background-image: linear-gradient(90deg, rgba(255, 107, 139, 0.25) 50%, transparent 50%),
                      linear-gradient(rgba(255, 107, 139, 0.25) 50%, transparent 50%);
    background-size: 14px 14px;
}

/* Sliders */
.slider-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-main);
}

.slider-val {
    color: var(--pink-primary);
    font-weight: 700;
}

.cute-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: #ffe4ea;
    border-radius: var(--radius-full);
    outline: none;
}

.cute-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--pink-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(255, 107, 139, 0.3);
    border: 2px solid #ffffff;
    transition: transform 0.15s ease;
}

.cute-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* -------------------------------------------------------------------
   DIVERSE FRAMES & PATTERNS
   ------------------------------------------------------------------- */
.layout-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cute-layout-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff8fa;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.cute-layout-card:hover {
    border-color: var(--pink-primary);
    background: #ffffff;
}

.cute-layout-card.active {
    border-color: var(--pink-primary);
    background: #fff0f3;
}

.layout-thumb {
    width: 22px;
    height: 32px;
    border: 1px solid var(--pink-primary);
    border-radius: 2px;
    display: flex;
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
}

.layout-thumb.strip-4 { flex-direction: column; }
.layout-thumb.strip-4 span { flex: 1; background: var(--pink-light); border-radius: 1px; }

.layout-thumb.strip-3 { flex-direction: column; }
.layout-thumb.strip-3 span { flex: 1; background: var(--pink-light); border-radius: 1px; }

.layout-thumb.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}
.layout-thumb.grid-4 span { background: var(--pink-light); border-radius: 1px; }

.layout-thumb.polaroid { flex-direction: column; padding: 2px 2px 8px 2px; }
.layout-thumb.polaroid span { flex: 1; background: var(--pink-light); }

.layout-thumb.single { padding: 2px; }
.layout-thumb.single span { flex: 1; background: var(--pink-light); }

.layout-desc {
    display: flex;
    flex-direction: column;
}

.layout-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
}

.layout-tag {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Diverse Frame Pattern Cards */
.palette-subhead {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.patterns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.pattern-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 3px;
    border-radius: var(--radius-sm);
    background: #fff8fa;
    border: 1.5px solid var(--pink-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pattern-card:hover {
    transform: translateY(-1px);
    border-color: var(--pink-primary);
}

.pattern-card.active {
    border-color: var(--pink-primary);
    background: #fff0f3;
    box-shadow: 0 2px 8px rgba(255, 107, 139, 0.16);
}

.pattern-card span {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.pattern-card.active span {
    color: var(--pink-primary);
}

.pattern-preview {
    width: 100%;
    height: 36px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.06);
}

.pattern-preview.pat-white { background: #ffffff; }
.pattern-preview.pat-gingham-pink {
    background-color: #ffffff;
    background-image: linear-gradient(90deg, rgba(255, 107, 139, 0.2) 50%, transparent 50%),
                      linear-gradient(rgba(255, 107, 139, 0.2) 50%, transparent 50%);
    background-size: 10px 10px;
}
.pattern-preview.pat-gingham-blue {
    background-color: #ffffff;
    background-image: linear-gradient(90deg, rgba(14, 165, 233, 0.2) 50%, transparent 50%),
                      linear-gradient(rgba(14, 165, 233, 0.2) 50%, transparent 50%);
    background-size: 10px 10px;
}
.pattern-preview.pat-polka-pink {
    background-color: #fff0f5;
    background-image: radial-gradient(#ff6b8b 1.5px, transparent 1.5px);
    background-size: 8px 8px;
}
.pattern-preview.pat-sweet-grad { background: linear-gradient(135deg, #ffd1dc 0%, #d5e8f7 100%); }
.pattern-preview.pat-sunset-grad { background: linear-gradient(135deg, #ffc3a0 0%, #ffafbd 100%); }
.pattern-preview.pat-film-strip {
    background: #1e1e24;
    background-image: radial-gradient(#ffffff 2px, transparent 2px);
    background-size: 8px 8px;
}
.pattern-preview.pat-kraft { background: #f5efe6; }
.pattern-preview.pat-rainbow { background: linear-gradient(135deg, #ffd1dc, #fef3c7, #dcfce7, #e0f2fe); }
.pattern-preview.pat-clouds {
    background-color: #dbeafe;
    background-image: radial-gradient(#ffffff 3px, transparent 3px);
    background-size: 10px 10px;
}
.pattern-preview.pat-leopard-pink {
    background-color: #fff0f5;
    background-image: radial-gradient(#ff85a1 2px, transparent 2px);
    background-size: 8px 8px;
}

/* Sticker Frames Previews */
.pattern-preview.pat-sticker-bow {
    background: #fff0f4;
    border: 1px dashed #ffb3c1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-bunny {
    background: #eef9f5;
    border: 1px dashed #bbf0dc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-bear {
    background: #fff9e8;
    border: 1px dashed #fde09e;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-strawberry {
    background: #fff0f5;
    border: 1px dashed #ffccd8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-angel {
    background: linear-gradient(135deg, #f5efff, #e8dcff);
    border: 1px dashed #d8b4fe;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-cat {
    background: #fff4ec;
    border: 1px dashed #fed7aa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-preview.pat-sticker-daisy {
    background: #eaf5ff;
    border: 1px dashed #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-mini-deco {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Solid Palette Grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.swatch-btn {
    width: 100%;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--pink-border);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.swatch-btn:hover {
    transform: scale(1.08);
}

.swatch-btn.active {
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 2px #ffffff, 0 2px 6px var(--pink-shadow);
}

.custom-color-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-main);
}

.cute-color-box {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

/* -------------------------------------------------------------------
   STICKERS & TEXT
   ------------------------------------------------------------------- */
.sticker-pills-row {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sticker-cat-pill {
    border: none;
    background: #fff0f3;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-cute);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--pink-border);
    transition: all 0.2s ease;
}

.sticker-cat-pill.active {
    background: var(--pink-primary);
    color: #ffffff;
    border-color: var(--pink-primary);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: 2px;
}

.sticker-item-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background: #fff8fa;
    border: 1px solid var(--pink-border);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sticker-item-btn:hover {
    background: #ffffff;
    transform: scale(1.15);
    border-color: var(--pink-primary);
}

.sticker-edit-card {
    background: #fff5f8;
    border-color: var(--pink-border);
}

.sticker-preview-badge {
    font-size: 1.2rem;
}

/* Form inputs */
.cute-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cute-form-group label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-main);
}

.cute-input, .cute-select {
    width: 100%;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: #fff8fa;
    border: 1.5px solid var(--pink-border);
    color: var(--text-main);
    font-size: 0.78rem;
    font-family: var(--font-cute);
    outline: none;
    transition: all 0.2s ease;
}

.cute-input:focus, .cute-select:focus {
    border-color: var(--pink-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 107, 139, 0.15);
}

.input-with-btn {
    display: flex;
    gap: 6px;
}

.cute-check-row {
    display: flex;
    align-items: center;
}

.cute-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.cute-checkbox input[type="checkbox"] {
    accent-color: var(--pink-primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.cute-link-btn {
    border: none;
    background: transparent;
    font-family: var(--font-cute);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.cute-link-btn.danger {
    color: #ef4444;
}

/* -------------------------------------------------------------------
   MODALS & TOAST NOTIFICATIONS
   ------------------------------------------------------------------- */
.cute-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

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

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 47, 51, 0.35);
    backdrop-filter: blur(5px);
}

.modal-card {
    position: relative;
    width: 90%;
    max-width: 440px;
    background: #ffffff;
    border: 2px solid var(--pink-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    padding: 22px;
    z-index: 10;
    animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-head h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pink-primary);
}

.modal-x {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.m-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.m-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff0f3;
    border: 1.5px solid var(--pink-border);
    color: var(--pink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.m-content strong {
    font-size: 0.82rem;
    color: var(--text-main);
}

.m-content p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 99999;
    pointer-events: none;
}

.toast {
    padding: 9px 16px;
    background: #ffffff;
    border: 1.5px solid var(--pink-border);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-family: var(--font-cute);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: toastBounce 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

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

/* ===================================================================
   MOBILE & TABLET RESPONSIVE OPTIMIZATION
   =================================================================== */
@media (max-width: 900px) {
    .app-header {
        height: 54px;
        padding: 0 12px;
        gap: 8px;
        overflow: hidden;
    }

    .brand-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .brand-title {
        font-size: 1.0rem;
    }

    .brand-subtitle {
        display: none;
    }

    /* CRITICAL FIX: Hide bulky header pills on mobile to eliminate overlap blob */
    .header-nav {
        display: none !important;
    }

    .header-actions {
        gap: 6px;
    }

    .shots-badge {
        padding: 5px 10px;
        font-size: 0.72rem;
        cursor: pointer;
    }

    #toggleFullscreenBtn {
        display: none !important;
    }

    .cute-circle-btn {
        width: 34px;
        height: 34px;
    }

    .mobile-decor-btn {
        display: inline-flex !important;
        width: 34px;
        height: 34px;
        background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
        color: #ffffff;
        border: none;
        box-shadow: 0 2px 8px rgba(255, 77, 109, 0.35);
        font-size: 16px;
    }

    .mobile-editor-decor-btn {
        display: inline-flex !important;
    }

    /* Main Container Flow on Mobile */
    .app-main {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 54px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .stage-section {
        padding: 8px 10px 18px 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: visible; /* Prevents nested momentum scroll locks on iOS Safari */
    }

    .stage-center-column {
        max-width: 100%;
        gap: 10px;
    }

    /* Mobile Camera Card: Fits alongside dock on iOS viewport */
    .camera-card {
        width: 100%;
        height: 48vh;
        height: 48dvh;
        min-height: 290px;
        max-height: 420px;
        border-radius: var(--radius-md);
        border-width: 2px;
        overflow: visible;
    }

    .camera-live-frame {
        padding: 10px 12px 8px 12px !important;
    }

    .camera-frame-footer {
        padding-top: 4px;
        min-height: 32px;
    }

    .live-brand-title {
        font-size: 0.96rem;
    }

    .live-brand-subtitle {
        font-size: 0.68rem;
    }

    .live-barcode-stamp {
        height: 18px;
    }

    .live-heart-stamp {
        font-size: 1.2rem;
    }

    .camera-top-left-badge {
        top: 6px;
        left: 6px;
        gap: 4px;
    }

    .cute-tag {
        padding: 2.5px 7px;
        font-size: 0.66rem;
    }

    .camera-quick-tools {
        top: 6px;
        right: 6px;
        gap: 4px;
    }

    .cam-tool-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Mobile Shutter Dock: Prominent, perfectly placed right below camera */
    .camera-control-dock {
        padding: 6px 10px;
        border-radius: var(--radius-md);
        background: #ffffff;
        box-shadow: 0 4px 14px rgba(255, 107, 139, 0.12);
        gap: 4px;
    }

    .dock-title {
        font-size: 0.65rem;
        font-weight: 700;
    }

    .pill-choice {
        padding: 4px 6px;
        font-size: 0.68rem;
    }

    .shutter-flower {
        width: 58px;
        height: 58px;
        box-shadow: 0 4px 16px rgba(255, 77, 109, 0.4), 0 0 0 3px rgba(255, 107, 139, 0.25);
        animation: pulseShutter 2s infinite ease-in-out;
    }

    @keyframes pulseShutter {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 4px 16px rgba(255, 77, 109, 0.4), 0 0 0 3px rgba(255, 107, 139, 0.25);
        }
        50% {
            transform: scale(1.06);
            box-shadow: 0 6px 20px rgba(255, 77, 109, 0.6), 0 0 0 5px rgba(255, 107, 139, 0.35);
        }
    }

    .shutter-camera-icon {
        font-size: 19px;
    }

    .shutter-label {
        font-size: 0.58rem;
    }

    .shutter-subtext {
        font-size: 0.66rem;
    }

    /* Mobile Filmstrip */
    .filmstrip-panel {
        padding: 8px 10px;
    }

    .filmstrip-item {
        width: 62px;
        height: 46px;
    }

    /* Mobile Decor Header Button */
    .mobile-decor-btn {
        display: inline-flex;
        background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
        color: #ffffff;
        border-color: #ffffff;
        box-shadow: 0 2px 8px rgba(255, 77, 109, 0.35);
        font-size: 16px;
    }

    /* Eye-Catching Mobile Sidebar Opener Banner */
    .mobile-sidebar-trigger-wrapper {
        display: block;
        width: 100%;
        margin-top: 2px;
    }

    .mobile-sidebar-trigger-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 9px 12px;
        background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
        border: 2px solid var(--pink-border);
        border-radius: var(--radius-md);
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(255, 107, 139, 0.18);
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        animation: triggerBounce 3s infinite ease-in-out;
    }

    @keyframes triggerBounce {
        0%, 100% {
            transform: translateY(0);
            box-shadow: 0 4px 14px rgba(255, 107, 139, 0.18);
        }
        50% {
            transform: translateY(-2px);
            box-shadow: 0 6px 18px rgba(255, 107, 139, 0.3);
        }
    }

    .trigger-left {
        display: flex;
        align-items: center;
        gap: 8px;
        text-align: left;
    }

    .trigger-sparkle {
        font-size: 22px;
        line-height: 1;
        animation: rotateSparkle 2.5s infinite ease-in-out;
    }

    @keyframes rotateSparkle {
        0%, 100% { transform: rotate(0deg) scale(1); }
        50% { transform: rotate(15deg) scale(1.15); }
    }

    .trigger-texts {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .trigger-main {
        font-family: var(--font-cute);
        font-weight: 800;
        font-size: 0.88rem;
        color: var(--pink-primary);
    }

    .trigger-sub {
        font-size: 0.66rem;
        color: var(--text-muted);
        font-weight: 600;
    }

    .trigger-right {
        display: flex;
        align-items: center;
    }

    .trigger-badge {
        font-family: var(--font-cute);
        font-size: 0.68rem;
        font-weight: 800;
        background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
        color: #ffffff;
        padding: 4px 10px;
        border-radius: var(--radius-full);
        box-shadow: 0 2px 6px rgba(255, 77, 109, 0.35);
        letter-spacing: 0.4px;
        white-space: nowrap;
    }

    /* Mobile Sidebar Backdrop */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.42);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile Sidebar Drawer (Bottom Sheet) */
    .sidebar-section {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        min-width: 100%;
        height: 52vh;
        height: 52dvh;
        max-height: 440px;
        background: #ffffff;
        border-radius: 22px 22px 0 0;
        border-top: 2.5px solid var(--pink-border);
        box-shadow: 0 -10px 40px rgba(255, 107, 139, 0.25), 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        display: flex;
        flex-direction: column;
        transform: translateY(105%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        overflow: hidden;
    }

    .sidebar-section.mobile-open {
        transform: translateY(0);
    }

    .mobile-drawer-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 14px 6px 14px;
        background: #ffffff;
        border-bottom: 1.5px solid var(--pink-border);
        border-radius: 22px 22px 0 0;
        position: sticky;
        top: 0;
        z-index: 100;
        cursor: pointer;
    }

    .drawer-handle-bar {
        width: 44px;
        height: 5px;
        background: #fbcfe8;
        border-radius: var(--radius-full);
        margin-bottom: 6px;
        cursor: pointer;
    }

    .drawer-header-row {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .drawer-title-group {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        flex: 1;
    }

    .drawer-icon {
        font-size: 18px;
    }

    .drawer-title {
        font-family: var(--font-cute);
        font-size: 0.95rem;
        font-weight: 800;
        color: var(--pink-primary);
        white-space: nowrap;
    }

    .drawer-close-btn {
        background: linear-gradient(135deg, #ff758f 0%, #ff4d6d 100%);
        color: #ffffff;
        border: none;
        padding: 8px 20px;
        border-radius: var(--radius-full);
        font-family: var(--font-cute);
        font-size: 0.85rem;
        font-weight: 800;
        cursor: pointer;
        box-shadow: 0 3px 10px rgba(255, 77, 109, 0.4);
        transition: all 0.2s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        flex-shrink: 0;
        z-index: 101;
    }

    .drawer-close-btn:hover,
    .drawer-close-btn:active {
        background: linear-gradient(135deg, #ff5277 0%, #e63956 100%);
        transform: scale(0.97);
    }

    .sidebar-tabs {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #ffffff;
    }

    .cute-tab {
        padding: 10px 4px;
    }

    .cute-tab .tab-emoji {
        font-size: 1.1rem;
    }

    .cute-tab .tab-label {
        font-size: 0.7rem;
    }

    .sidebar-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 10px;
        gap: 12px;
    }

    /* Mobile Filter Grid */
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .filter-preview {
        height: 58px;
    }

    .filter-name {
        font-size: 0.72rem;
    }

    /* Mobile Patterns Grid */
    .patterns-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .pattern-preview {
        height: 46px;
    }

    /* Mobile Layout Grid */
    .layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .palette-grid {
        gap: 8px;
    }

    .swatch-btn {
        width: 32px;
        height: 32px;
    }

    /* Mobile Sticker Picker */
    .sticker-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .sticker-item-btn {
        height: 48px;
        font-size: 24px;
    }

    /* Mobile Stage 2 (Editor View) */
    .photobooth-preview-wrapper {
        height: auto;
        max-height: 54vh;
        min-height: 280px;
    }

    #boothCanvas {
        max-height: 52vh;
        max-width: 95vw;
    }

    .editor-action-dock {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        padding: 8px 10px;
    }

    .editor-dock-left,
    .editor-dock-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .editor-dock-right .cute-btn.primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 0.95rem;
    }
    .header-nav {
        display: none !important;
    }
    .camera-card {
        height: 48vh;
        height: 48dvh;
        min-height: 280px;
        max-height: 390px;
    }
    .cute-pills {
        padding: 2px;
        gap: 2px;
    }
    .pill-choice {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
    .shutter-flower {
        width: 56px;
        height: 56px;
    }
    .shutter-camera-icon {
        font-size: 18px;
    }
    .shutter-label {
        font-size: 0.56rem;
    }
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .backdrops-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .patterns-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sticker-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Ensure desktop studio layout is always preserved */
@media (min-width: 901px) {
    .sidebar-section {
        position: static !important;
        transform: none !important;
        width: 390px !important;
        min-width: 390px !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        border-radius: 0 !important;
        box-shadow: -2px 0 12px rgba(255, 107, 139, 0.04) !important;
    }
    .mobile-drawer-header,
    .mobile-sidebar-trigger-wrapper,
    .sidebar-backdrop,
    .mobile-decor-btn,
    .mobile-editor-decor-btn {
        display: none !important;
    }
}
