
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { background: #f8fafc; font-family: 'Segoe UI', sans-serif; min-height: 100vh; }

        .header {
            background: white; border-bottom: 1px solid #e2e8f0;
            padding: 1rem 1.5rem; display: flex; align-items: center; gap: 0.8rem;
        }
        .header-logo { font-weight: 800; font-size: 1.1rem; color: #0f172a; }
        .header-logo span { color: #6366f1; }
        .header-sub { font-size: 0.8rem; color: #64748b; }

        .container { max-width: 480px; margin: 0 auto; padding: 1.5rem; }

        .card {
            background: white; border-radius: 16px; padding: 1.4rem;
            margin-bottom: 1rem; border: 1px solid #e2e8f0;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        }
        .card-label {
            font-size: 0.7rem; font-weight: 700; color: #94a3b8;
            text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem;
        }

        .upload-zone {
            border: 2px dashed #cbd5e1; border-radius: 12px; padding: 1.5rem;
            text-align: center; cursor: pointer; transition: all 0.2s; display: block;
        }
        .upload-zone:hover, .upload-zone.has-image { border-color: #6366f1; background: #f5f3ff; }
        .upload-zone img { max-height: 140px; border-radius: 8px; margin-bottom: 0.5rem; }
        .upload-icon { font-size: 2rem; margin-bottom: 0.4rem; }
        .upload-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
        .upload-hint { font-size: 0.75rem; color: #94a3b8; margin-top: 0.2rem; }
        input[type="file"] { display: none; }

        .dims-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
        .dims-grid.tres { grid-template-columns: 1fr 1fr 1fr; }
        .field label { display: block; font-size: 0.72rem; font-weight: 700; color: #64748b; margin-bottom: 0.4rem; text-transform: uppercase; }
        .field input {
            width: 100%; border: 1px solid #e2e8f0; border-radius: 8px;
            padding: 0.6rem 0.8rem; font-size: 0.9rem; outline: none; font-family: inherit;
        }
        .field input:focus { border-color: #6366f1; }

        .field-full { grid-column: 1 / -1; }
        .field-full input { font-family: monospace; }

        .btn-generar {
            width: 100%; background: #6366f1; color: white; border: none;
            border-radius: 12px; padding: 1rem; font-size: 1rem; font-weight: 700;
            cursor: pointer; margin-top: 0.5rem; transition: background 0.2s;
            display: flex; align-items: center; justify-content: center; gap: 0.5rem;
        }
        .btn-generar:hover { background: #4f46e5; }
        .btn-generar:disabled { background: #94a3b8; cursor: not-allowed; }

        .progress {
            text-align: center; padding: 1.5rem; color: #6366f1;
            font-size: 0.9rem; font-weight: 600; display: none;
        }
        .progress.show { display: block; }
        .spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #6366f1;
            border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite;
            vertical-align: middle; margin-right: 6px; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Resultado */
        .resultado { display: none; }
        .resultado.show { display: block; }

        model-viewer#visorAR {
            width: 100%; height: 320px; border-radius: 16px;
            background: #1e293b; display: block; margin-bottom: 1rem;
        }

        .btn-ar {
            width: 100%; background: #0f172a; color: white; border: none;
            border-radius: 12px; padding: 0.9rem; font-size: 0.95rem; font-weight: 700;
            cursor: pointer; margin-bottom: 0.8rem; display: flex;
            align-items: center; justify-content: center; gap: 0.5rem;
        }
        .btn-whatsapp {
            width: 100%; background: #25d366; color: white; border: none;
            border-radius: 12px; padding: 0.9rem; font-size: 0.95rem; font-weight: 700;
            cursor: pointer; margin-bottom: 0.8rem; display: flex;
            align-items: center; justify-content: center; gap: 0.5rem;
            text-decoration: none;
        }
        .btn-nueva {
            width: 100%; background: #f1f5f9; color: #475569; border: none;
            border-radius: 12px; padding: 0.8rem; font-size: 0.85rem; font-weight: 600;
            cursor: pointer;
        }

        /* Google login */
        .login-overlay {
            position: fixed; inset: 0; background: rgba(15,23,42,0.7);
            display: flex; align-items: center; justify-content: center;
            z-index: 100; backdrop-filter: blur(4px);
        }
        .login-box {
            background: white; border-radius: 20px; padding: 2rem 1.8rem;
            max-width: 340px; width: 90%; text-align: center;
        }
        .login-logo { font-size: 2rem; font-weight: 800; color: #0f172a; margin-bottom: 0.3rem; }
        .login-logo span { color: #6366f1; }
        .login-title { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 0.4rem; }
        .login-sub { font-size: 0.8rem; color: #64748b; margin-bottom: 1.4rem; }

        /* Usuario logueado (header) */
        .user-pill {
            display: flex; align-items: center; gap: 0.5rem;
            background: #f1f5f9; border-radius: 20px; padding: 0.3rem 0.8rem 0.3rem 0.3rem;
            margin-left: auto;
        }
        .user-pill img { width: 28px; height: 28px; border-radius: 50%; }
        .user-pill span { font-size: 0.75rem; font-weight: 600; color: #1e293b; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

        .info-modelo {
            background: #f8fafc; border-radius: 10px; padding: 0.8rem 1rem;
            font-size: 0.78rem; color: #64748b; margin-bottom: 1rem;
            white-space: pre-line; line-height: 1.6;
        }
    