/* bitsbyLG Pet Studio - styles (extracted from index.html) */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        :root {
            --primary: #c9a89a;
            --primary-dark: #a88a7d;
            --dark: #4a5568;
            --light: #f5f1ed;
            --gray: #999;
            --gray-light: #e8e3dd;
            --success: #7bb8a5;
            --shadow: 0 4px 20px rgba(0,0,0,0.08);
            --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f5f1ed 0%, #ede8e3 100%);
            color: var(--dark);
            min-height: 100vh;
        }

        /* ===== HEADER ===== */
        header {
            background: white;
            padding: 15px 30px;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
        }

        .header-logo {
            cursor: pointer;
            text-align: left;
        }

        .header-logo h1 {
            font-family: 'Playfair Display', serif;
            font-size: 2.2rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            color: var(--dark);
            line-height: 1.2;
        }

        header h1 span {
            color: var(--primary);
            font-style: italic;
            font-weight: 400;
        }

        .header-logo p {
            font-family: 'Poppins', sans-serif;
            font-size: 0.85rem;
            color: var(--gray);
            margin-top: 2px;
        }

        .cart-trigger-btn {
            background: var(--light);
            border: 2px solid var(--primary);
            padding: 10px 18px;
            border-radius: 30px;
            cursor: pointer;
            font-family: 'Poppins', sans-serif;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all var(--transition);
            color: var(--dark);
        }

        .cart-trigger-btn:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(201, 168, 154, 0.3);
        }

        .cart-badge {
            background: var(--success);
            color: white;
            font-size: 0.75rem;
            font-weight: 700;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        @media (max-width: 600px) {
            .header-container {
                flex-direction: column;
                text-align: center;
            }
            .header-logo {
                text-align: center;
            }
        }

        /* ===== PROGRESS INDICATOR ===== */
        .progress-tracker {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px 20px 0 20px;
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .progress-step {
            display: flex; align-items: center; gap: 8px;
            font-size: 0.85rem; font-weight: 600; color: var(--gray);
            opacity: 0.6; transition: all var(--transition);
        }

        .progress-step.active { color: var(--primary); opacity: 1; }
        .progress-step.completed { color: var(--success); opacity: 1; }

        .step-number {
            display: inline-flex; align-items: center; justify-content: center;
            width: 24px; height: 24px; border-radius: 50%;
            background: var(--gray-light); font-weight: 700; font-size: 0.8rem; color: var(--dark);
        }

        .progress-step.active .step-number { background: var(--primary); color: white; }
        .progress-step.completed .step-number { background: var(--success); color: white; }

        .step-divider { width: 20px; height: 2px; background: var(--gray-light); margin: 0 5px; }

        /* ===== MAIN CONTAINER ===== */
        .container {
            max-width: 1200px; margin: 0 auto; padding: 20px;
            display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: start;
        }

        @media (max-width: 1024px) { .container { grid-template-columns: 1fr; gap: 20px; } }

        /* ===== STUDIO PANEL ===== */
        .studio-panel {
            background: white; padding: 30px; border-radius: 16px; box-shadow: var(--shadow);
            position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto;
        }
        .studio-panel::-webkit-scrollbar { width: 6px; }
        .studio-panel::-webkit-scrollbar-track { background: var(--gray-light); border-radius: 10px; }
        .studio-panel::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

        .section-title {
            font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700;
            border-left: 4px solid var(--primary); padding-left: 12px; margin: 0 0 20px 0;
            display: flex; align-items: center; gap: 10px; color: var(--dark);
        }

        .section-title .step-badge {
            display: inline-flex; align-items: center; justify-content: center;
            width: 28px; height: 28px; border-radius: 50%;
            background: var(--primary); color: white; font-size: 0.8rem; font-weight: 700;
        }

        /* ===== SHAPE SELECTION ===== */
        .toggle-group {
            display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 30px;
        }

        .toggle-btn {
            background: var(--gray-light); border: 3px solid transparent; padding: 16px 12px;
            border-radius: 10px; cursor: pointer; font-weight: 600; text-align: center;
            transition: all var(--transition); font-size: 0.95rem; display: flex;
            flex-direction: column; align-items: center; gap: 8px; color: var(--dark);
        }

        .toggle-btn:hover { background: #ddd5cd; transform: translateY(-2px); }
        .toggle-btn.active {
            border-color: var(--primary); background: linear-gradient(135deg, #f5ede7 0%, #efe5dd 100%);
            color: var(--primary); box-shadow: 0 0 12px rgba(201, 168, 154, 0.2);
        }
        .shape-icon { font-size: 1.8rem; line-height: 1; }

        /* ===== UPLOAD BOX ===== */
        .upload-box {
            border: 3px dashed var(--gray); padding: 30px 20px; text-align: center;
            border-radius: 12px; margin-bottom: 30px; cursor: pointer; background: #fafaf8;
            transition: all var(--transition); position: relative; overflow: hidden;
        }
        .upload-box:hover {
            border-color: var(--primary); background: linear-gradient(135deg, #f5ede7 0%, #efe5dd 100%);
            transform: scale(1.02);
        }
        .upload-icon { font-size: 2.5rem; margin-bottom: 10px; }
        #uploadPrompt { font-weight: 600; color: var(--dark); margin-bottom: 5px; }
        .upload-hint { font-size: 0.85rem; color: var(--gray); }
        input[type="file"] { display: none; }

        /* ===== CONTROLS ===== */
        .control-group { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid #eee; }
        .control-group:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .control-label {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
            font-weight: 600; font-size: 0.95rem; color: var(--dark);
        }
        .control-value { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
        
        .slider {
            width: 100%; height: 6px; border-radius: 5px; background: linear-gradient(90deg, var(--primary), var(--primary-dark));
            outline: none; -webkit-appearance: none; appearance: none; cursor: pointer;
        }
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
            border-radius: 50%; background: white; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            transition: all var(--transition); border: 3px solid var(--primary);
        }
        .slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 4px 12px rgba(201, 168, 154, 0.4); }

        /* ===== COLOR PICKER ===== */
        .color-input-group { display: flex; gap: 12px; align-items: center; }
        .color-well {
            width: 60px; height: 40px; border: 2px solid var(--gray); border-radius: 8px;
            cursor: pointer; padding: 0; background: none; transition: all var(--transition); flex-shrink: 0;
        }
        .color-display {
            flex: 1; padding: 10px 14px; background: var(--gray-light); border-radius: 8px;
            font-family: 'Courier New', monospace; font-weight: 600; font-size: 0.9rem; color: var(--dark);
        }

        /* ======= BUTTONS ======= */
        .btn {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white; padding: 14px 24px; border: none; border-radius: 10px; font-weight: 700;
            cursor: pointer; transition: all var(--transition); width: 100%; font-size: 1rem;
            text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 4px 15px rgba(201, 168, 154, 0.3);
            margin-top: 20px;
        }
        .btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(201, 168, 154, 0.4); }
        .btn:disabled {
            background: var(--gray);
            cursor: not-allowed;
            box-shadow: none;
            transform: none !important;
        }
        .btn-secondary { background: var(--gray-light); color: var(--dark); box-shadow: none; margin-top: 10px; }
        .btn-secondary:hover { background: #ddd5cd; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

        /* ===== PREVIEW PANEL & MOCKUPS ===== */
        .preview-panel {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            background: linear-gradient(135deg, #e8e3dd 0%, #ddd5cd 100%); border-radius: 16px;
            padding: 30px; min-height: 550px; position: sticky; top: 100px; overflow: hidden;
        }

        .mockup-controls {
            display: flex; flex-direction: column; align-items: center; z-index: 10; width: 100%;
        }

        .mockup-btn-group {
            display: flex; gap: 10px; margin-bottom: 15px;
        }
        
        .mockup-btn {
            background: white; border: 2px solid transparent; padding: 8px 16px;
            border-radius: 20px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
            transition: all var(--transition); color: var(--gray);
        }
        .mockup-btn.active {
            background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(201, 168, 154, 0.4);
        }

        /* Mockup Sizing */
        #mockupScaleContainer {
            width: 100%; max-width: 280px; background: white; padding: 12px 16px;
            border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 20px;
        }

        .mockup-wrapper {
            position: relative; width: 450px; height: 450px;
            display: flex; justify-content: center; align-items: center;
            border-radius: 12px;
        }

        .mockup-bg {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            object-fit: contain; border-radius: 12px; z-index: 1; display: none;
        }

        #canvasContainer {
            position: absolute; z-index: 2; border-radius: 12px; overflow: hidden;
            display: none; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-lg); background: transparent;
            cursor: default;
            touch-action: none;
            user-select: none;
        }

        /* Mockup Base Shadow Styles */
        #canvasContainer.on-bottle {
            box-shadow: -5px 5px 15px rgba(0,0,0,0.2) !important;
            border-radius: 20px;
        }
        #canvasContainer.on-laptop {
            box-shadow: 0px 5px 15px rgba(0,0,0,0.1) !important;
        }

        #placeholder { text-align: center; z-index: 5; }
        #placeholder svg { margin-bottom: 20px; animation: float 3s ease-in-out infinite; }
        @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

        /* ===== TOAST NOTIFICATIONS ===== */
        .toast {
            position: fixed; bottom: 30px; right: 30px; background: var(--success); color: white;
            padding: 16px 24px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 1000;
        }

        /* ===== CART VIEW STYLES ===== */
        #cartView, #checkoutView, #confirmationView {
            max-width: 1000px;
            margin: 40px auto;
            padding: 20px;
        }

        .view-header {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 30px;
        }

        .back-btn {
            background: white;
            border: 2px solid var(--gray-light);
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition);
            color: var(--dark);
            font-family: inherit;
        }
        .back-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: translateX(-3px);
        }

        .view-title {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark);
        }

        .cart-container {
            display: grid;
            grid-template-columns: 1fr 350px;
            gap: 30px;
            align-items: start;
        }
        @media (max-width: 768px) {
            .cart-container { grid-template-columns: 1fr; }
        }

        .cart-items-list {
            background: white;
            border-radius: 16px;
            padding: 20px;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .empty-cart-message {
            text-align: center;
            padding: 40px 20px;
            color: var(--gray);
        }
        .empty-cart-message p {
            margin-bottom: 20px;
            font-size: 1.1rem;
        }

        .cart-item {
            display: flex;
            align-items: center;
            gap: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--gray-light);
        }
        .cart-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .cart-item-thumb {
            width: 90px;
            height: 90px;
            border-radius: 10px;
            border: 1px solid var(--gray-light);
            background: var(--light);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
        }
        .cart-item-thumb img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .cart-item-info {
            flex: 1;
        }
        .cart-item-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--dark);
            text-transform: capitalize;
        }
        .cart-item-specs {
            font-size: 0.85rem;
            color: var(--gray);
            margin-top: 4px;
        }

        .cart-item-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .quantity-controller {
            display: flex;
            align-items: center;
            border: 2px solid var(--gray-light);
            border-radius: 20px;
            overflow: hidden;
            background: var(--light);
        }
        .qty-btn {
            background: none;
            border: none;
            width: 30px;
            height: 30px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition);
        }
        .qty-btn:hover {
            background: var(--gray-light);
        }
        .qty-val {
            width: 30px;
            text-align: center;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .cart-item-price {
            font-weight: 700;
            color: var(--dark);
            font-size: 1.1rem;
            width: 80px;
            text-align: right;
        }

        .cart-item-remove {
            background: none;
            border: none;
            color: #d9534f;
            cursor: pointer;
            font-size: 1.2rem;
            padding: 5px;
            transition: all var(--transition);
        }
        .cart-item-remove:hover {
            color: #c9302c;
            transform: scale(1.1);
        }

        .cart-summary-panel, .checkout-summary-panel {
            background: white;
            border-radius: 16px;
            padding: 30px;
            box-shadow: var(--shadow);
            position: sticky;
            top: 100px;
        }
        .cart-summary-panel h3, .checkout-summary-panel h3 {
            font-family: 'Playfair Display', serif;
            font-size: 1.3rem;
            margin-bottom: 20px;
            border-left: 4px solid var(--primary);
            padding-left: 10px;
            color: var(--dark);
        }

        .summary-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
            font-size: 0.95rem;
            color: var(--dark);
        }
        .total-row {
            border-top: 1px solid var(--gray-light);
            padding-top: 15px;
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--primary-dark);
            margin-bottom: 25px;
        }

        /* ===== CHECKOUT VIEW STYLES ===== */
        .checkout-container {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 30px;
            align-items: start;
        }
        @media (max-width: 768px) {
            .checkout-container { grid-template-columns: 1fr; }
        }

        .checkout-section {
            background: white;
            border-radius: 16px;
            padding: 30px;
            box-shadow: var(--shadow);
            margin-bottom: 25px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .checkout-section h3 {
            font-family: 'Playfair Display', serif;
            font-size: 1.3rem;
            border-left: 4px solid var(--primary);
            padding-left: 10px;
            color: var(--dark);
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .form-group.full-width {
            grid-column: span 2;
        }
        .form-group label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--dark);
        }
        .form-group input {
            padding: 10px 14px;
            border: 2px solid var(--gray-light);
            border-radius: 8px;
            font-family: inherit;
            font-size: 0.95rem;
            transition: all var(--transition);
            outline: none;
            background: white;
        }
        .form-group input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 8px rgba(201, 168, 154, 0.2);
        }

        .card-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }
        .card-input-wrapper input {
            width: 100%;
            padding-right: 80px;
        }
        .card-type-icon {
            position: absolute;
            right: 14px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--primary-dark);
            pointer-events: none;
            font-family: inherit;
        }

        /* ===== CONFIRMATION VIEW STYLES ===== */
        #confirmationView {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: calc(100vh - 200px);
        }
        .confirmation-card {
            background: white;
            border-radius: 16px;
            padding: 40px 30px;
            box-shadow: var(--shadow);
            text-align: center;
            max-width: 500px;
            width: 100%;
        }
        .success-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            animation: bounce 1.2s infinite alternate cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        @keyframes bounce {
            0% { transform: translateY(0); }
            100% { transform: translateY(-12px); }
        }
        .confirmation-card h2 {
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
            color: var(--dark);
            margin-bottom: 15px;
        }
        .confirmation-card p {
            font-size: 0.95rem;
            color: var(--gray);
            line-height: 1.6;
            margin-bottom: 25px;
        }
        .order-details-box {
            background: var(--light);
            border-radius: 10px;
            padding: 18px;
            margin-bottom: 30px;
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .detail-row {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
        }
        .detail-row span {
            color: var(--gray);
        }
        .detail-row strong {
            color: var(--dark);
        }

        /* ===== STICKER SHEET ADVISOR CARD ===== */
        .sheet-advisor-card {
            background: white;
            border-radius: 16px;
            padding: 25px;
            box-shadow: var(--shadow);
            border-top: 5px solid var(--primary);
            margin-bottom: 20px;
        }
        .sheet-advisor-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .sheet-advisor-desc {
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 20px;
            line-height: 1.5;
        }
        .sheets-grid-display {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        .single-sheet-row {
            background: var(--light);
            border: 1px solid var(--gray-light);
            border-radius: 10px;
            padding: 15px;
        }
        .sheet-row-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--dark);
        }
        .sheet-badge-status {
            background: var(--primary);
            color: white;
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .sheet-badge-status.full {
            background: var(--success);
        }
        .sheet-row-body {
            font-size: 0.85rem;
            color: var(--dark);
            line-height: 1.4;
        }
        .sheet-row-body strong {
            color: var(--primary-dark);
            font-weight: 700;
        }
        .sheet-row-upsell {
            margin-top: 10px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #559380;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .savings-badge {
            background: rgba(123, 184, 165, 0.15);
            color: #559380;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 700;
            margin-top: 15px;
            display: inline-block;
        }

        /* ===== EMAIL MODAL OVERLAY ===== */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(4px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .modal-overlay.active {
            opacity: 1;
            pointer-events: all;
        }
        .modal-box {
            background: white;
            border-radius: 16px;
            width: 90%;
            max-width: 500px;
            padding: 30px;
            box-shadow: var(--shadow-lg);
            transform: scale(0.9);
            transition: transform 0.3s ease;
            text-align: center;
            color: var(--dark);
        }
        .modal-overlay.active .modal-box {
            transform: scale(1);
        }
        .modal-header {
            font-family: 'Playfair Display', serif;
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 15px;
            color: var(--dark);
        }
        .modal-body {
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 25px;
            color: #666;
        }
        .modal-body strong {
            color: var(--primary-dark);
            font-weight: 600;
        }
        .design-id-tag {
            display: inline-block;
            background: var(--light);
            border: 1px dashed var(--primary);
            padding: 8px 16px;
            border-radius: 8px;
            font-family: monospace;
            font-weight: 700;
            font-size: 1.25rem;
            color: var(--primary-dark);
            margin: 10px 0;
            letter-spacing: 1px;
        }
        .modal-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .modal-actions .btn-secondary {
            background: transparent;
            border: 2px solid var(--gray-light);
            color: var(--dark);
        }
        .modal-actions .btn-secondary:hover {
            background: var(--light);
            border-color: var(--primary);
        }

        /* ===== MOBILE-ONLY OVERRIDES =====
           Everything below lives inside max-width media queries, so desktop
           rendering is completely unchanged. */
        @media (max-width: 768px) {
            .container { padding: 14px; gap: 16px; }

            /* Un-stick side panels so the page scrolls naturally on small screens */
            .studio-panel {
                position: static;
                max-height: none;
                padding: 20px;
            }
            .preview-panel {
                position: static;
                min-height: 420px;
                padding: 20px 12px;
            }

            #cartView, #checkoutView, #confirmationView {
                margin: 16px auto;
                padding: 12px;
            }

            .view-header { flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
            .view-title { font-size: 1.4rem; }

            .checkout-section { padding: 20px 16px; }
            .cart-summary-panel, .checkout-summary-panel { padding: 20px 16px; }
            .form-grid { grid-template-columns: 1fr; }

            .cart-item { flex-wrap: wrap; row-gap: 12px; }

            .confirmation-card { padding: 28px 18px; }

            .modal-box { width: calc(100vw - 32px); padding: 22px 18px; }

            .toast {
                left: 16px;
                right: 16px;
                bottom: 16px;
                text-align: center;
            }
        }

        @media (max-width: 520px) {
            /* The preview canvas is 450px wide by design; shrink its DISPLAY size
               to fit the phone screen. Drawing resolution is unaffected. */
            .mockup-wrapper {
                width: calc(100vw - 60px);
                height: calc(100vw - 60px);
                max-width: 450px;
                max-height: 450px;
            }
            #previewCanvas {
                width: min(450px, calc(100vw - 72px));
                height: auto;
                display: block;
            }

            .header-logo h1 { font-size: 1.5rem; }
            .toggle-btn { padding: 10px 8px; }
        }

        /* When JS relocates the Refine & Position controls below the preview on
           small screens, they become a direct child of .container — give them the
           same card styling the studio panel provided. Never matches on desktop. */
        .container > #adjustmentControls {
            background: white;
            padding: 20px;
            border-radius: 16px;
            box-shadow: var(--shadow);
        }
