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

        :root {
            /* Void-black canvas — Gen Z research validated */
            --bg: #050505;
            --bg-base: #050505;
            --bg-void: #000000;
            --surface: #0c0c0e;
            --surface-elevated: #111114;
            --surface-hover: #1a1a1d;
            --border: rgba(255,255,255,0.06);
            --border-bold: rgba(255,255,255,0.14);

            --text: #f0f0f0;
            --text-secondary: #888;
            --text-muted: #444;

            /* Amber dominates. Neon green converts. */
            --accent: #eab308;
            --accent-hover: #facc15;
            --accent-glow: rgba(234, 179, 8, 0.15);
            --accent-ring: rgba(234, 179, 8, 0.25);
            --accent-border: rgba(234, 179, 8, 0.35);
            --payment: #ADFF2F;
            --payment-hover: #c1ff45;

            --pill: 9999px;
            --radius: 16px;
            --radius-lg: 24px;

            --ease: 180ms ease;
            --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
            --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
            --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
            --spacing: 8px;

            /* Headlines: bold geometric, no weight-300 nonsense */
            --h1: clamp(2.5rem, 6vw, 4rem);
        }

        html { scroll-behavior: smooth; }

        /* Focus rings — visible keyboard navigation only */
        :focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }
        /* Suppress focus ring on mouse clicks */
        :focus:not(:focus-visible) { outline: none; }
        /* Elements that already have a visible focus treatment */
        .sl-title:focus-visible,
        .bl-ta:focus-visible,
        .upload-note:focus-visible { outline: none; }
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg); color: var(--text); min-height: 100vh;
            font-size: 14px; line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }

        h1, h2, h3, .logo, .logo-text {
            font-family: 'Space Grotesk', 'Inter', sans-serif;
            text-wrap: balance;
        }

        p { text-wrap: pretty; }

        .container { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }
        @media (max-width: 520px) {
            .container { padding: 20px 16px 48px; }
        }

        /* Header */
        .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 56px; }
        .logo { font-size: 20px; font-weight: 700; letter-spacing: -0.06em; color: var(--accent); }
        .header-right { display: flex; align-items: center; gap: 10px; }

        .sign-in {
            color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500;
            padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--pill);
            transition: color var(--ease), border-color var(--ease);
        }
        .sign-in:hover { color: var(--text); border-color: var(--border-hover); }
        .sign-in:active { transform: scale(0.96); }
        
        /* User menu */
        .user-menu { display: none; align-items: center; gap: 12px; }
        .user-menu.active { display: flex; }
        .user-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); object-fit: cover; }
        .user-name { font-size: 13px; font-weight: 500; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .history-link { color: var(--text-secondary); text-decoration: none; font-size: 13px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--pill); }
        .history-link:hover { color: var(--accent); border-color: var(--accent); }
        .logout-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 4px 8px; }
        .logout-btn:hover { color: var(--text); }
        /* Guest state — shown before sign-in */
        .guest-hint {
            background: none !important;
            border: 1px solid var(--border) !important;
            border-radius: var(--pill) !important;
            padding: 6px 14px !important;
            cursor: pointer;
            font-size: 13px !important;
            font-weight: 500 !important;
            color: var(--text-secondary) !important;
            transition: color var(--ease), border-color var(--ease);
        }
        .guest-hint:hover { color: var(--text); border-color: var(--border-hover); }
        .guest-hint:active { transform: scale(0.96); }
        
        /* Paywall modal */
        .modal-overlay {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.8); z-index: 1000;
            align-items: center; justify-content: center;
        }
        .modal-overlay.active { display: flex; }
        .modal {
            background: var(--surface); border: 2px solid var(--border-bold);
            border-radius: var(--radius-lg); padding: 32px; max-width: 420px; width: 90%;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
        }
        .modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--accent); }
        .modal p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
        .modal-actions { display: flex; flex-direction: column; gap: 10px; }
        .btn-primary {
            background: var(--payment); color: #000; border: none; border-radius: 12px;
            padding: 12px 20px; font-weight: 700; cursor: pointer; font-size: 14px;
            transition: background var(--ease), transform var(--ease);
        }
        .btn-primary:hover { background: var(--payment-hover); transform: translateY(-1px); }
        .btn-secondary {
            background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
            border-radius: 12px; padding: 10px 16px; cursor: pointer; font-size: 13px;
        }
        .btn-secondary:hover { color: var(--text); border-color: var(--border-hover); }
        .btn-secondary.full-width, .btn-secondary.btn-full { width: 100%; margin-bottom: 0; }
        .price-tag { font-size: 28px; font-weight: 900; color: var(--payment); margin: 16px 0; }
        .price-tag span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }

        /* Hero — type IS the hero visual */
        .hero { text-align: center; margin-bottom: 32px; }
        .hero h1 {
            font-size: var(--h1); font-weight: 900; letter-spacing: -0.05em;
            line-height: 1.08; margin-bottom: 14px;
        }
        .hero h1 em { font-style: normal; color: var(--accent); }
        .hero p {
            color: var(--text-secondary); font-size: 15px; line-height: 1.7;
            max-width: 460px; margin: 0 auto; font-weight: 400;
        }

        /* ═══════════════════════════════════════════════════════════════════════
           HOW IT WORKS — Flowing River Pipeline
           ═══════════════════════════════════════════════════════════════════════ */
        .how-it-works { margin-bottom: 48px; position: relative; }

        .hiw-river {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: 0;
            max-width: 900px;
            margin: 0 auto;
            padding: 40px 24px 28px;
            position: relative;
        }

        /* Flowing SVG connection behind steps */
        .hiw-flow-svg {
            position: absolute;
            top: 50%;
            left: 0;
            width: 100%;
            height: 200px;
            transform: translateY(-40%);
            pointer-events: none;
            z-index: 0;
            opacity: 0;
            transition: opacity 0.6s var(--ease-expo);
        }
        .hiw-river.animate .hiw-flow-svg { opacity: 1; }

        .hiw-flow-dash {
            stroke-dasharray: 8 16;
            animation: flow-dash 1.2s linear infinite;
            opacity: 0;
            transition: opacity 0.4s ease;
        }
        .hiw-river.animate .hiw-flow-dash { opacity: 0.7; }

        @keyframes flow-dash {
            to { stroke-dashoffset: -24; }
        }

        .hiw-step {
            flex: 1;
            max-width: 240px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            position: relative;
            z-index: 1;
            padding: 0 12px;
        }
        .hiw-step-num {
            width: 32px; height: 32px;
            border-radius: 50%;
            border: 2px solid var(--border-bold);
            display: flex; align-items: center; justify-content: center;
            font-size: 13px; font-weight: 700;
            color: var(--text-muted);
            margin-bottom: 12px;
            transition: border-color 0.4s var(--ease-expo), color 0.4s var(--ease-expo), background 0.4s var(--ease-expo), box-shadow 0.4s var(--ease-expo);
            font-family: 'Space Grotesk', sans-serif;
        }
        .hiw-step-num.active {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(234,179,8,0.1);
            box-shadow: 0 0 16px rgba(234,179,8,0.2);
        }
        .hiw-step-label {
            font-size: 11px; font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 16px;
        }

        /* Cards — larger, more atmospheric */
        .hiw-card-input, .hiw-card-ai, .hiw-card-output {
            width: 100%;
            background: var(--surface-elevated);
            border: 1.5px solid var(--border);
            border-radius: 14px;
            padding: 16px;
            min-height: 160px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            transition: border-color 0.4s var(--ease-expo), box-shadow 0.4s var(--ease-expo);
        }
        .hiw-card-input {
            align-items: stretch;
            justify-content: flex-start;
            gap: 8px;
            padding: 16px;
        }
        .hiw-card-output {
            padding: 5px;
            min-height: auto;
            aspect-ratio: 16/9;
        }

        /* Document frame inside input card */
        .hiw-doc-frame {
            width: 100%;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        /* Scan lines — richer */
        .hiw-scan-lines { width: 100%; }
        .hiw-scan-line {
            height: 6px; border-radius: 3px;
            background: rgba(255,255,255,0.04);
            position: relative; overflow: hidden;
            width: 100%;
            margin-bottom: 6px;
        }
        .hiw-scan-line:nth-child(1) { width: 92%; }
        .hiw-scan-line:nth-child(2) { width: 78%; }
        .hiw-scan-line:nth-child(3) { width: 95%; }
        .hiw-scan-line:nth-child(4) { width: 64%; }
        .hiw-scan-line:nth-child(5) { width: 83%; }
        .hiw-scan-line:nth-child(6) { width: 71%; }
        .hiw-scan-bar {
            position: absolute; inset: 0;
            background: linear-gradient(90deg, transparent, var(--accent), transparent);
            border-radius: 3px;
            width: 0%;
            opacity: 0.6;
            transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .hiw-tags {
            display: flex; flex-wrap: wrap; gap: 5px;
            margin-top: 4px;
        }
        .hiw-tag {
            display: inline-flex; align-items: center; gap: 4px;
            background: rgba(234,179,8,0.1); color: #facc15;
            border: 1px solid rgba(234,179,8,0.3);
            border-radius: 20px; padding: 4px 10px;
            font-size: 10px; font-weight: 500;
            opacity: 0; transform: translateY(6px) scale(0.95);
            transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .hiw-tag.show { opacity: 1; transform: translateY(0) scale(1); }

        /* AI Core — orbiting particles */
        .hiw-core-wrap {
            position: relative;
            width: 72px; height: 72px;
            margin-bottom: 16px;
        }
        .hiw-core {
            position: absolute;
            inset: 14px;
            border-radius: 50%;
            background: radial-gradient(circle at 40% 40%, rgba(234,179,8,0.25), rgba(234,179,8,0.05));
            border: 2px solid rgba(234,179,8,0.3);
            box-shadow: 0 0 20px rgba(234,179,8,0.15);
            transition: all 0.4s var(--ease-expo);
        }
        .hiw-core.pulsing {
            animation: core-pulse 1.4s ease-in-out infinite;
        }
        @keyframes core-pulse {
            0%, 100% { box-shadow: 0 0 20px rgba(234,179,8,0.15); transform: scale(1); }
            50% { box-shadow: 0 0 32px rgba(234,179,8,0.3); transform: scale(1.06); }
        }

        .hiw-orbit {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 1px solid rgba(234,179,8,0.08);
            transition: border-color 0.4s;
        }
        .hiw-orbit.o1 { animation: orbit-spin 3s linear infinite; border-style: dashed; }
        .hiw-orbit.o2 { inset: 6px; animation: orbit-spin 5s linear infinite reverse; border-style: dotted; border-color: rgba(234,179,8,0.06); }
        .hiw-orbit.o3 { inset: 12px; animation: orbit-spin 7s linear infinite; border-style: solid; border-color: rgba(234,179,8,0.04); }

        @keyframes orbit-spin {
            to { transform: rotate(360deg); }
        }

        .hiw-particles {
            position: absolute;
            inset: 0;
            pointer-events: none;
        }
        .hiw-particles span {
            position: absolute;
            width: 3px; height: 3px;
            border-radius: 50%;
            background: var(--accent);
            opacity: 0;
            top: 50%; left: 50%;
        }
        .hiw-core.pulsing ~ .hiw-particles span {
            opacity: 0.7;
            animation: particle-orbit 2s ease-in-out infinite;
        }
        .hiw-particles span:nth-child(1) { animation-delay: 0s; animation-duration: 2.2s; }
        .hiw-particles span:nth-child(2) { animation-delay: -0.4s; animation-duration: 2.8s; }
        .hiw-particles span:nth-child(3) { animation-delay: -0.8s; animation-duration: 2.4s; }
        .hiw-particles span:nth-child(4) { animation-delay: -1.2s; animation-duration: 3.0s; }
        .hiw-particles span:nth-child(5) { animation-delay: -1.6s; animation-duration: 2.6s; }

        @keyframes particle-orbit {
            0%   { transform: rotate(0deg) translateX(30px) rotate(0deg); opacity: 0; }
            15%  { opacity: 0.8; }
            85%  { opacity: 0.8; }
            100% { transform: rotate(360deg) translateX(30px) rotate(-360deg); opacity: 0; }
        }

        .hiw-ai-bar-track {
            width: 75%; height: 3px;
            background: rgba(255,255,255,0.05);
            border-radius: 2px; overflow: hidden;
        }
        .hiw-ai-bar-fill {
            width: 0%; height: 100%;
            background: linear-gradient(90deg, var(--accent), #facc15);
            border-radius: 2px;
            transition: width 0.1s linear;
            box-shadow: 0 0 8px rgba(234,179,8,0.3);
        }

        /* Output — dramatic reveal */
        .hiw-card-output img {
            width: 100%; height: 100%;
            object-fit: cover;
            border-radius: 10px;
            display: block;
            transition: transform 0.6s var(--ease-expo);
        }
        .hiw-card-output.revealed img {
            transform: scale(1.02);
        }
        .hiw-output-badge {
            position: absolute;
            top: 10px; right: 10px;
            background: rgba(0,0,0,0.7);
            backdrop-filter: blur(8px);
            color: var(--accent);
            font-size: 10px; font-weight: 700;
            padding: 3px 10px;
            border-radius: var(--pill);
            opacity: 0;
            transform: translateY(-6px);
            transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            border: 1px solid rgba(234,179,8,0.3);
        }
        .hiw-output-badge.show { opacity: 1; transform: translateY(0); }
        .hiw-output-fade {
            position: absolute; inset: 0;
            background: var(--surface-elevated);
            opacity: 1;
            transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
            border-radius: 14px;
        }
        .hiw-output-fade.revealed { opacity: 0; }

        @media (max-width: 780px) {
            .hiw-river {
                flex-direction: column;
                align-items: center;
                gap: 0;
                padding: 28px 16px;
            }
            .hiw-step { max-width: 300px; width: 100%; padding: 12px 0; }
            .hiw-flow-svg { display: none; }
            .hiw-step-label { margin-bottom: 12px; }
            .hiw-card-input, .hiw-card-ai, .hiw-card-output {
                min-height: 140px;
            }
        }

        /* Unified Input Area — neo-brutalist card */
        .input-area {
            background: var(--surface);
            border: 3px solid var(--border-bold);
            border-radius: var(--radius-lg); padding: 20px; margin-bottom: 28px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
            transition: box-shadow var(--ease), border-color var(--ease);
        }
        .input-area.dragover { border-color: var(--accent); background: #1a1a10; box-shadow: 0 6px 20px rgba(234,179,8,0.15); }
        .input-area:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.35); transform: translate(-1px, -1px); }

        /* Textarea — spans full input area */
        .content-area {
            width: 100%; min-height: 140px; background: transparent; border: none;
            color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.7;
            resize: vertical; outline: none;
            overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
        }
        .content-area::placeholder { color: var(--text-muted); }

        /* Drop zone inside text area — visible when dragging */
        #drop-hint {
            display: none; text-align: center; padding: 32px 0; color: var(--text-secondary);
        }
        .input-area.dragover #drop-hint { display: block; }
        .input-area.dragover .content-area { display: none; }
        .drop-hint-icon { font-size: 28px; margin-bottom: 8px; }
        .drop-hint-text { font-size: 13px; }

        /* Kimi-style input footer — separated zones */
        .input-footer {
            display: flex; flex-direction: column; gap: 8px;
            margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border);
        }

        /* Toolbar row: controls and pills on left, send on right */
        .toolbar-row {
            display: flex; align-items: center; justify-content: space-between;
            gap: 8px;
        }
        .footer-left { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: nowrap; position: relative; }

        /* Attachments row: file chips — only shows when files exist */
        .attachments-row {
            display: none; flex-wrap: wrap; gap: 6px;
            padding: 6px 10px;
            background: rgba(255,255,255,0.02);
            border: 1px dashed var(--border);
            border-radius: 10px;
        }
        .attachments-row.has-files { display: flex; }

        .tool-btn {
            background: none; border: 1px solid var(--border); border-radius: var(--pill);
            color: var(--text-secondary); width: 28px; height: 28px; cursor: pointer;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
            transition: color var(--ease), border-color var(--ease), transform var(--ease);
        }
        .tool-btn:hover { color: var(--accent); border-color: var(--accent); }
        .tool-btn:active { transform: scale(0.9); }
        .tool-btn svg { width: 14px; height: 14px; }

        /* Selected vibe indicator in footer bar */
        .vibe-pill {
            display: none; align-items: center; gap: 5px;
            padding: 3px 10px 3px 8px; background: var(--surface-hover);
            border: 1px solid var(--accent); border-radius: var(--pill);
            color: var(--accent); font-family: inherit; font-size: 11px;
            font-weight: 600; cursor: pointer; transition: background var(--ease), border-color var(--ease); white-space: nowrap;
        }
        .vibe-pill.active { display: flex; }
        .vibe-pill:hover { background: rgba(234, 179, 8, 0.15); border-color: var(--accent-hover); }
        .vibe-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s infinite; }
        .vibe-remove { color: var(--text-muted); font-size: 12px; padding: 0 0 0 2px; line-height: 1; }
        .vibe-remove:hover { color: #ef4444; }

        /* Slide count selector — compact pill like Kimi */
        .slides-pill {
            display: flex; align-items: center; gap: 3px;
            padding: 4px 7px 4px 9px;
            background: transparent; border: 1px solid var(--border);
            border-radius: 999px; color: var(--text-muted);
            font-family: inherit; font-size: 11px; font-weight: 500;
            cursor: pointer; white-space: nowrap;
            transition: border-color var(--ease), color var(--ease);
            position: relative;
        }
        .slides-pill:hover { border-color: var(--border-hover); color: var(--text-secondary); }
        .slides-pill.open { border-color: var(--accent); color: var(--accent); }
        .slides-chevron { width: 11px; height: 11px; flex-shrink: 0; transition: transform 0.15s ease; }
        .slides-pill.open .slides-chevron { transform: rotate(180deg); }

        .slides-menu {
            display: none; position: absolute; top: calc(100% + 6px); left: 0;
            background: #16161a; border: 1px solid var(--border);
            border-radius: 10px; padding: 3px; min-width: 80px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 1000;
        }
        .slides-menu.show { display: block; }
        .slides-option {
            padding: 6px 12px; border-radius: 7px; cursor: pointer;
            font-size: 12px; color: var(--text-secondary);
            transition: background 0.1s ease, color 0.1s ease;
        }
        .slides-option:hover { background: rgba(255,255,255,0.06); color: var(--text); }
        .slides-option.active { color: var(--accent); }


        /* File chips — in dedicated attachments row */
        .file-tags { display: flex; flex-wrap: wrap; gap: 6px; }
        .file-tag {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 4px 6px 4px 10px;
            background: var(--surface-hover);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 11px; color: var(--text-secondary);
            max-width: 200px;
        }
        .file-tag .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .file-tag .file-size { color: var(--text-muted); font-size: 10px; }
        .file-tag button {
            background: none; border: none; color: var(--text-muted);
            cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1;
            border-radius: 4px; transition: color var(--ease);
        }
        .file-tag button:hover { color: #ef4444; }
        .upload-note {
            width: 100%; background: transparent; border: 1px solid var(--border);
            border-radius: var(--radius); padding: 6px 10px; color: var(--text);
            font-family: inherit; font-size: 12px; line-height: 1.55; resize: vertical;
            outline: none; margin-top: 4px;
        }
        .upload-note::placeholder { color: var(--text-muted); }
        .upload-note:focus { border-color: var(--accent); }

        /* Send button — compact, right-aligned in footer */
        .send-btn {
            display: flex; align-items: center; justify-content: center; gap: 5px;
            padding: 7px 16px; background: var(--accent); color: #000;
            border: 2px solid var(--border-bold); border-radius: var(--pill);
            font-family: inherit; font-size: 13px; font-weight: 800;
            cursor: pointer; transition: background var(--ease), transform var(--ease), box-shadow var(--ease); white-space: nowrap;
            box-shadow: 4px 4px 0px 0px var(--border-bold); flex-shrink: 0;
        }
        .send-btn:hover:not(:disabled) { background: var(--accent-hover); transform: translate(-2px, -2px); box-shadow: 6px 6px 0px var(--border-bold); }
        .send-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0px 0px 0px 0px var(--border-bold); }
        .send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }
        @media (max-width: 480px) {
            .input-area { padding: 16px; border-width: 2px; }
            .content-area { min-height: 132px; font-size: 16px; line-height: 1.55; }
            .input-footer { gap: 10px; }
            .toolbar-row { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: stretch; }
            .footer-left { width: 100%; gap: 8px; flex-wrap: wrap; }
            .tool-btn { width: 36px; height: 36px; }
            .vibe-pill, .slides-pill { min-height: 36px; font-size: 13px; padding: 7px 12px; }
            .vibe-pill { max-width: calc(100% - 116px); overflow: hidden; }
            .vibe-pill span:not(.vibe-dot):not(.vibe-remove) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .slides-menu { top: auto; bottom: calc(100% + 6px); }
            .send-btn .sparkle { display: none; }
            .send-btn { width: 100%; min-height: 48px; padding: 12px 16px; font-size: 15px; }
            .attachments-row { padding: 0; background: transparent; border: 0; }
            #input-file-pill { max-width: 100%; min-height: 34px; }
            .file-tag { max-width: 100%; }
        }
        .sparkle { color: #f9db4e; margin-right: 2px; }
        .card-cta { width: 100%; margin-top: 10px; }

        /* Unified CTA */
        .cta-btn {
            width: 100%; height: 50px; background: var(--accent); color: #000;
            border: 2px solid var(--border-bold); border-radius: var(--pill); font-family: inherit; font-size: 15px;
            font-weight: 800; cursor: pointer; transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
            display: flex; align-items: center; justify-content: center; gap: 6px;
            box-shadow: 4px 4px 0px 0px var(--border-bold);
        }
        .cta-btn:hover:not(:disabled) { background: var(--accent-hover); transform: translate(-2px, -2px); box-shadow: 6px 6px 0px 0px var(--border-bold); }
        .cta-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0px 0px 0px 0px var(--border-bold); }
        .cta-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

        /* Divider + Grid */
        .divider { border: none; border-top: 1px solid var(--border); margin: 40px 0 28px; }
        .section-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.04em; margin-bottom: 14px; }

        /* ── Style Picker ─────────────────────────────────── */
        #vibe-picker { margin-top: 4px; }

        .vibe-section { margin-bottom: 24px; }
        .vibe-section-label {
            font-size: 10px; font-weight: 700; color: var(--text-muted);
            letter-spacing: 0.1em; text-transform: uppercase;
            margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
        }
        .vibe-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

        /* 5-col grid — cards sit within each section, not inside #grid */
        .style-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }
        @media (max-width: 900px) { .style-grid { grid-template-columns: repeat(4, 1fr); } }
        @media (max-width: 760px) { .style-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

        /* Card */
        .style-card {
            cursor: pointer;
            display: flex; flex-direction: column; gap: 6px;
        }
        .style-thumb {
            width: 100%; aspect-ratio: 16/9;
            border-radius: 10px; overflow: hidden;
            border: 2px solid transparent;
            background: var(--surface);
            position: relative;
            transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
        }
        .style-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .thumb-placeholder {
            width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
            font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: capitalize;
            background: linear-gradient(135deg, var(--surface-hover), var(--border));
            text-align: center; padding: 4px;
        }

        /* Hover — lift + border only, no dark overlay */
        .style-card:hover .style-thumb {
            border-color: var(--border-bold);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.35);
        }

        /* Selected — amber border + glow */
        .style-card.selected .style-thumb {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(234,179,8,0.15);
            transform: translateY(-2px);
        }

        /* Selected tick — top-LEFT, never overlaps the eye button */
        .style-thumb::after {
            content: '✓';
            position: absolute; top: 5px; left: 6px;
            width: 18px; height: 18px;
            background: var(--accent); color: #000;
            border-radius: 50%; font-size: 10px; font-weight: 900;
            line-height: 18px; text-align: center;
            opacity: 0; transition: opacity 160ms ease;
            pointer-events: none; /* never block clicks */
        }
        .style-card.selected .style-thumb::after { opacity: 1; }

        /* Eye icon — top-right, appears on hover */
        .style-eye {
            position: absolute; top: 5px; right: 6px;
            width: 24px; height: 24px;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
            border-radius: 50%; border: none; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            opacity: 0; transition: opacity 160ms ease;
            color: #fff; z-index: 2;
        }
        .style-eye svg { width: 11px; height: 11px; pointer-events: none; }
        .style-card:hover .style-eye { opacity: 1; }
        .style-card.selected .style-eye { opacity: 0; } /* hidden when selected — tick shows instead */

        /* Name label */
        .style-tag {
            font-size: 11px; font-weight: 500; color: var(--text-secondary);
            text-align: center; line-height: 1.3; transition: color 160ms ease;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .style-card:hover .style-tag { color: var(--text); }
        .style-card.selected .style-tag { color: var(--accent); font-weight: 600; }
        @media (max-width: 480px) {
            .style-thumb { border-radius: 12px; }
            .style-tag { font-size: 14px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
            .vibe-tabs { gap: 4px; overflow-x: auto; padding-bottom: 4px; }
            .vibe-tab { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
        }

        /* Status — generating animation */
        .status {
            display: none; flex-direction: column; gap: 14px; margin-top: 20px;
            padding: 22px 20px 18px;
            background: linear-gradient(135deg, rgba(234,179,8,0.05) 0%, var(--surface) 70%);
            border-radius: var(--radius); border: 1px solid rgba(234,179,8,0.22);
            position: relative; overflow: hidden;
        }
        .status.visible { display: flex; }
        /* Amber sweep across the card */
        .status::before {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent 0%, rgba(234,179,8,0.05) 50%, transparent 100%);
            animation: card-sweep 2.4s ease-in-out infinite;
        }
        @keyframes card-sweep { to { left: 100%; } }
        /* Amber top border line */
        .status::after {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
            background: linear-gradient(90deg, transparent, rgba(234,179,8,0.6), transparent);
            animation: border-pulse 2s ease-in-out infinite;
        }
        @keyframes border-pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
        .status-row { display: flex; align-items: center; gap: 10px; position: relative; }
        .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
            animation: pulse 1.2s ease-in-out infinite; }
        @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(0.75)} }
        .status-text { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
        .status-phases { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
        .status-phase {
            font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
            color: var(--text-muted); padding: 6px 10px; border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
            transition: all 0.2s ease;
        }
        .status-phase.active {
            color: #111; background: var(--accent); border-color: transparent;
            box-shadow: 0 6px 22px rgba(234,179,8,0.22);
        }
        .status-phase.done {
            color: var(--accent); border-color: rgba(234,179,8,0.24); background: rgba(234,179,8,0.1);
        }
        /* Mini slide placeholder grid */
        .status-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; position: relative; }
        .status-slot {
            height: 38px; border-radius: 5px;
            background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07);
            position: relative; overflow: hidden;
            animation: slot-appear 0.35s ease both;
        }
        .status-slot:nth-child(1){animation-delay:.05s}
        .status-slot:nth-child(2){animation-delay:.15s}
        .status-slot:nth-child(3){animation-delay:.25s}
        .status-slot:nth-child(4){animation-delay:.35s}
        .status-slot:nth-child(5){animation-delay:.45s}
        .status-slot:nth-child(6){animation-delay:.55s}
        @keyframes slot-appear { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }
        .status-slot::after {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(234,179,8,0.1), transparent);
            animation: slot-sweep 2.2s ease-in-out infinite;
        }
        .status-slot:nth-child(1)::after{animation-delay:.0s}
        .status-slot:nth-child(2)::after{animation-delay:.25s}
        .status-slot:nth-child(3)::after{animation-delay:.5s}
        .status-slot:nth-child(4)::after{animation-delay:.75s}
        .status-slot:nth-child(5)::after{animation-delay:1.0s}
        .status-slot:nth-child(6)::after{animation-delay:1.25s}
        @keyframes slot-sweep { 0%,100%{left:-100%} 50%{left:100%} }

        .status-compact {
            display: none; align-items: center; flex-direction: row; gap: 8px;
            margin: 0; padding: 5px 12px;
            border-radius: var(--pill); border: 1px solid rgba(234,179,8,0.28);
            background: rgba(234,179,8,0.08); overflow: visible;
            min-height: 30px; white-space: nowrap;
        }
        .status-compact.visible { display: inline-flex; }
        .status-compact::before,
        .status-compact::after { display: none; }
        .status-compact .status-row { gap: 7px; }
        .status-compact .status-text { font-size: 12px; font-weight: 700; color: var(--accent); }
        .status-compact .dot { width: 7px; height: 7px; }
        .status-compact .status-phases { display: none; }

        /* Footer */
        .footer { text-align: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }
        .footer a { color: var(--text-secondary); text-decoration: none; }
        .footer a:hover { color: var(--accent); text-decoration: none; }

        /* Sign-in button — hidden by default; only surfaces as fallback */

        /* ── Style Preview Modal ─────────────── */
        .modal-bg {
            display: none; position: fixed; inset: 0; z-index: 100;
            background: rgba(0,0,0,0.88); align-items: center; justify-content: center;
            cursor: pointer; padding: 20px;
        }
        .modal-bg.visible { display: flex; }
        .modal-inner {
            cursor: default; max-width: min(760px, 94vw); width: 100%;
            background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius-lg); overflow: hidden;
        }
        .modal-hero { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
        .modal-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .modal-footer {
            padding: 14px 16px; display: flex; align-items: center; gap: 12px;
        }
        .modal-thumbs {
            display: flex; gap: 6px; flex: 1; overflow: hidden;
        }
        .modal-thumb {
            flex: 1; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
            cursor: pointer; border: 2px solid transparent; transition: border-color 160ms ease;
        }
        .modal-thumb:hover { border-color: var(--border-bold); }
        .modal-thumb.active { border-color: var(--accent); }
        .modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .modal-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
        .modal-style-name {
            font-size: 13px; font-weight: 700; text-transform: capitalize; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.02em;
        }
        .modal-select-btn {
            font-size: 11px; font-weight: 700; padding: 5px 14px;
            background: var(--accent); color: #000; border: none;
            border-radius: var(--pill); cursor: pointer; white-space: nowrap;
            transition: background var(--ease);
        }
        .modal-select-btn:hover { background: var(--accent-hover); }
        .modal-close {
            position: absolute; top: 14px; right: 14px; background: var(--surface);
            border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px;
            border-radius: var(--pill); cursor: pointer; font-size: 16px;
            display: flex; align-items: center; justify-content: center; z-index: 101;
        }
        @media (max-width: 640px) {
            .modal-bg { padding: 12px; }
            .modal-inner { max-width: 100%; }
            .modal-footer {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            .modal-thumbs {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }
            .modal-meta-right {
                width: 100%;
                align-items: stretch;
            }
            .modal-style-name {
                white-space: normal;
                text-align: left;
            }
            .modal-select-btn {
                width: 100%;
                padding: 10px 14px;
            }
        }

        /* ── Preview Wall ──────────────────────── */
        #preview-wall { display: none; }
        #preview-wall.visible { display: block; }
        .pw-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .pw-header h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
        .pw-count { font-size: 12px; color: var(--text-muted); }
        .slide-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
        .sl-card {
            background: var(--surface);
            border: 2px solid var(--border-bold);
            border-left: 4px solid var(--accent);
            border-radius: var(--radius-lg);
            padding: 12px 14px; position: relative;
            box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        }
        .sl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .sl-badge {
            background: var(--accent); color: #000; font-size: 9px; font-weight: 800;
            padding: 0 6px; border-radius: var(--pill); line-height: 20px; flex-shrink: 0;
        }

        /* Mode indicator badge */
        .fidelity-badge {
            display: none; align-items: center; gap: 6px;
            margin-bottom: 12px; padding: 5px 12px;
            background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--pill); font-size: 11px; font-weight: 600;
            color: var(--text-secondary); width: fit-content;
        }
        .fidelity-badge.visible { display: flex; }
        .fidelity-badge .fi-icon { font-size: 13px; }
        .fidelity-badge .fi-label { color: var(--accent); }

        /* Skeleton shimmer */
        @keyframes shimmer {
            0% { background-position: -400px 0; }
            100% { background-position: 400px 0; }
        }
        .sk-line {
            border-radius: 4px; background: linear-gradient(90deg,
                var(--surface-hover) 25%, var(--border) 50%, var(--surface-hover) 75%);
            background-size: 800px 100%;
            animation: shimmer 1.4s infinite linear;
        }
        .sk-title { height: 16px; width: 60%; margin-bottom: 10px; }
        .sk-bullet { height: 11px; margin-bottom: 6px; }
        .sk-bullet:nth-child(2) { width: 85%; }
        .sk-bullet:nth-child(3) { width: 70%; }
        .sk-bullet:nth-child(4) { width: 75%; }
        .sl-btns { display: flex; gap: 3px; flex-shrink: 0; }
        .sl-btns button {
            width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
            background: var(--surface); color: var(--text-muted); cursor: pointer;
            font-size: 11px; display: flex; align-items: center; justify-content: center;
        }
        .sl-btns button:hover { color: var(--text); border-color: var(--border-hover); }
        .sl-btns button.del:hover { color: #ef4444; border-color: #ef4444; }
        .sl-title {
            width: 100%; background: transparent; border: none; color: var(--text);
            font-family: inherit; font-size: 14px; font-weight: 700; padding-bottom: 4px;
            border-bottom: 1px solid var(--border); margin-bottom: 6px; outline: none;
        }
        .sl-title:focus { border-bottom-color: var(--accent); }
        .sl-bullets { padding-left: 6px; }
        .bl-row { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 3px; }
        .bl-dot { color: var(--accent); font-size: 6px; line-height: 22px;flex-shrink: 0; }
        .bl-ta {
            flex: 1; background: transparent; border: none; color: var(--text);
            font-family: inherit; font-size: 12px; line-height: 1.55; resize: none; overflow: hidden; outline: none;
        }
        .bl-rm {
            width: 14px; height: 14px; border: none; background: none; color: var(--text-muted);
            cursor: pointer; font-size: 10px; display:flex; align-items:center; justify-content:center;
            flex-shrink:0;opacity:0;transition:opacity var(--ease); border-radius:4px;
        }
        .bl-row:hover .bl-rm { opacity:1; }
        .bl-rm:hover { color:#ef4444; }
        .add-bl {
            margin-top:4px;background:none;border:1px dashed var(--border);border-radius:6px;
            color:var(--text-muted);font-family:inherit;font-size:10px;padding:3px 6px;
            cursor:pointer;transition:border-color var(--ease),color var(--ease);width:100%;
        }
        .add-bl:hover { border-color:var(--accent);color:var(--accent); }
        .add-sl-btn {
            width:100%;padding:12px;background:none;border:2px dashed var(--border);
            border-radius:var(--radius);color:var(--text-muted);font-family:inherit;
            font-size:13px;font-weight:600;cursor:pointer;transition:border-color var(--ease),color var(--ease);
        }
        .add-sl-btn:hover { border-color:var(--accent);color:var(--accent); }
        .pw-actions { display:flex; gap:8px; margin-top:12px; }
        .pw-back {
            padding:0 20px;height:46px;background:none;color:var(--text-secondary);
            border:2px solid var(--border-bold);border-radius:var(--pill);font-family:inherit;
            font-size:13px;font-weight:600;cursor:pointer;transition:color var(--ease),border-color var(--ease),transform var(--ease),box-shadow var(--ease);
            box-shadow:0 3px 8px rgba(0,0,0,0.2);
        }
        .pw-back:hover { color:var(--text);border-color:var(--border-hover); }
        .pw-back:active { transform:translate(2px,2px);box-shadow:none; }
        .pw-go {
            flex:1;height:46px;background:var(--accent);color:#000;border:2px solid var(--border-bold);
            border-radius:var(--pill);font-family:inherit;font-size:14px;font-weight:800;
            cursor:pointer;transition:background var(--ease),transform var(--ease),box-shadow var(--ease);
            box-shadow:4px 4px 0px 0px var(--border-bold);
        }
        .pw-go:hover { background:var(--accent-hover);transform:translate(-2px,-2px);box-shadow:6px 6px 0px var(--border-bold); }
        .pw-go:active { transform:translate(2px,2px);box-shadow:0px 0px 0px var(--border-bold); }

.modal-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* Privacy info button inside studio surface */
.studio-surface .privacy-info-btn {
    position: absolute;
    bottom: 10px;
    right: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 160ms var(--ease-expo), border-color 160ms var(--ease-expo), background 160ms var(--ease-expo);
    z-index: 5;
}
.studio-surface .privacy-info-btn:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: rgba(234,179,8,0.06);
}
.privacy-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    transform: translateY(6px);
    background: var(--surface-elevated);
    border: 1px solid var(--border-bold);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 240px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease-expo), transform 200ms var(--ease-expo);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 50;
}
.privacy-tooltip.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.privacy-tooltip p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 4px;
}
.privacy-tooltip a {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.privacy-tooltip a:hover {
    text-decoration: underline;
}

/* ── Utility classes (replacing inline styles) ────────── */
.text-muted-center {
    display: none;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 12px 0 20px;
    line-height: 1.5;
}
.text-muted-center a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.text-muted-center a:hover { color: var(--accent); text-decoration: none; }

.file-size {
    color: var(--text-muted);
    margin: 0 4px;
}

.privacy-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.privacy-link:hover { color: var(--accent); text-decoration: none; }

.file-hidden { display: none; }

/* Auth gate modal */
.auth-modal { max-width: 380px; text-align: center; }
.auth-modal h2 { margin-bottom: 8px; }
.auth-modal .modal p { margin-bottom: 24px; }
.auth-modal .accent-text { color: var(--accent); }

/* Google sign-in button wrapper */
.gsi-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--ease);
}
.gsi-wrapper:hover { background: #f5f5f5; }
.gsi-wrapper img { width: 18px; height: 18px; }

/* Paywall modal */
.paywall-modal { max-width: 380px; text-align: center; }
.paywall-modal h2 { margin-bottom: 8px; }
.paywall-modal .modal p { margin-bottom: 20px; color: var(--text-secondary); }
.paywall-modal .modal-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #000;
    border: none; border-radius: 10px;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    transition: background var(--ease);
}
.paywall-modal .modal-btn:hover { background: var(--accent-hover); }
.paywall-modal .modal-btn.full-width { width: 100%; margin-bottom: 0; }
.paywall-modal .modal-note {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-muted);
}
.paywall-modal .file-list {
    margin-bottom: 20px;
    padding: 14px;
    background: var(--surface-hover);
    border-radius: 10px;
    text-align: left;
    font-size: 12px;
    color: var(--text-secondary);
}
.paywall-modal .file-list .file-name { color: var(--text); }
.paywall-modal .file-list ul {
    margin: 8px 0 0 16px;
    padding: 0;
    list-style: disc;
}

/* Credit pill */
.credit-pill {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: var(--pill);
    white-space: nowrap; cursor: default;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.credit-pill.neutral {
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-secondary);
}
.credit-pill.low {
    background: rgba(234,179,8,0.1); border: 1px solid rgba(234,179,8,0.3);
    color: var(--accent);
}
.credit-pill.empty {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: #f87171; cursor: pointer;
}
.credit-pill.empty:hover {
    background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.5);
}
.credit-pill.guest {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer; font-size: 10px;
}
.credit-pill.guest:hover {
    color: var(--text-secondary); border-color: var(--border-bold);
}

/* Credit checkout overlay */
#credit-checkout-overlay {
    background: rgba(3, 4, 8, 0.56);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
}
.checkout-card {
    background: transparent;
    border: none;
    border-radius: 28px;
    padding: 0;
    width: min(92vw, 620px);
    max-height: min(92vh, 820px);
    overflow: visible;
    position: relative;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}
.checkout-close {
    position: absolute; top: -14px; right: -14px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 999px;
    color: #0f172a;
    font-size: 22px; line-height: 1;
    cursor: pointer; padding: 0;
    display: grid; place-items: center;
    box-shadow: 0 10px 30px rgba(15,23,42,0.18);
    z-index: 2;
}
.checkout-close:hover { background: #fff; color: #000; }
#credit-checkout-container {
    min-height: 400px;
    background: transparent;
    border-radius: 24px;
    overflow: visible;
}
#credit-checkout-container > * {
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15,23,42,0.2);
}

/* Paywall modal inline button */
.paywall-modal-btn {
    display: block; width: 100%; padding: 13px;
    border: none; border-radius: 10px; font-size: 14px;
    font-weight: 700; cursor: pointer; transition: background var(--ease);
}
.paywall-modal-btn.primary {
    background: var(--accent); color: #000;
}
.paywall-modal-btn.primary:hover { background: var(--accent-hover); }

/* Low-balance toast */
.credit-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    padding: 10px 18px; border-radius: var(--pill);
    background: var(--surface); border: 1px solid var(--border);
    font-size: 12px; color: var(--text-secondary);
    z-index: 2000; opacity: 0; transition: opacity 0.3s ease;
    display: flex; align-items: center; gap: 10px;
}
.credit-toast.visible { opacity: 1; }
.credit-toast a {
    color: var(--accent); text-decoration: none; font-weight: 600;
}
.credit-toast a:hover { text-decoration: underline; }

/* Error toast */
.error-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    padding: 12px 20px; border-radius: var(--pill);
    background: var(--surface); border: 1px solid #ef4444;
    font-size: 14px; color: #fef2f2;
    z-index: 2000; opacity: 0; transition: opacity 0.3s ease;
}
.error-toast.visible { opacity: 1; }

/* Payment status toast */
.payment-status-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    padding: 12px 20px; border-radius: var(--pill);
    background: var(--surface); border: 1px solid var(--border);
    font-size: 14px; color: var(--text-secondary);
    z-index: 2000; opacity: 0; transition: opacity 0.3s ease;
    max-width: 90vw; text-align: center;
}
.payment-status-toast.visible { opacity: 1; }
.payment-status-toast a {
    color: var(--accent); text-decoration: none; font-weight: 600;
}
.payment-status-toast a:hover { text-decoration: underline; }

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Pricing Modal ─────────────────────────────── */
.pricing-modal {
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}
.pricing-modal h2 {
    margin-bottom: 6px;
}
.pricing-modal > p {
    margin-bottom: 18px;
}
.pricing-packs {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.pricing-pack {
    background: var(--surface-hover); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px;
    display: flex; align-items: baseline; justify-content: space-between;
    cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.pricing-pack:hover { border-color: var(--accent); background: rgba(234,179,8,0.05); }
.pricing-pack.popular { border-color: var(--accent-border); }
.pricing-pack-info { display: flex; flex-direction: column; gap: 2px; }
.pricing-pack-credits { font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -0.03em; }
.pricing-pack-credits small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.pricing-pack-price { font-size: 14px; color: var(--text-secondary); font-weight: 600; }
.pricing-pack-cta {
    font-size: 13px; font-weight: 700; padding: 8px 18px;
    background: var(--accent); color: #000; border: none; border-radius: var(--pill);
    cursor: pointer; transition: background var(--ease);
}
.pricing-pack-cta:hover { background: var(--accent-hover); }
.pricing-faq {
    border-top: 1px solid var(--border); padding-top: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.pricing-faq .faq-item h3 {
    font-size: 12px; font-weight: 700; margin-bottom: 4px; color: var(--text);
}
.pricing-faq .faq-item p {
    font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0;
}

/* ── Contact Modal ─────────────────────────────── */
.contact-modal { max-width: 420px; }
.contact-subtitle { margin-bottom: 14px; font-size: 13px !important; color: var(--text-secondary) !important; }
.contact-modal > p { color: var(--text-secondary); }
.contact-modal .field { margin-bottom: 14px; }
.contact-modal .field textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--border-bold);
    border-radius: 10px; padding: 12px 14px; color: var(--text);
    font-family: inherit; font-size: 13px; line-height: 1.6;
    outline: none; resize: vertical; min-height: 100px;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.contact-modal .field textarea::placeholder { color: var(--text-muted); }
.contact-modal .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,179,8,0.1); }
.contact-modal .char-count { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.contact-modal .gsi-wrapper { width: 100%; margin-bottom: 16px; }
.contact-status {
    display: none; padding: 10px 14px; border-radius: 10px;
    font-size: 13px; font-weight: 600; margin-top: 10px;
}
.contact-status.visible { display: block; }
.contact-status.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #22c55e; }
.contact-status.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #ef4444; }

/* ── Modal X button (shared) ───────────────────── */
.modal-x-btn {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; color: var(--text-muted);
    font-size: 18px; cursor: pointer; padding: 4px 8px;
    transition: color var(--ease);
}
.modal-x-btn:hover { color: var(--text); }
.pricing-modal, .contact-modal { position: relative; }

@media (max-width: 640px) {
    #credit-checkout-overlay {
        padding: 16px;
    }

    .checkout-card {
        width: 100%;
        max-height: calc(100vh - 32px);
    }

    .checkout-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    #credit-checkout-container {
        border-radius: 20px;
    }

    #credit-checkout-container > * {
        border-radius: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   LANDING PAGE REDESIGN — New sections appended 2026-05-19
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Ambient background ── */
.hero-ambient {
    position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(234,179,8,0.03), transparent);
}

/* ── Hero Gallery — 3D floating slide cards ── */
.hero-gallery {
    position: relative;
    perspective: 2000px;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 0 auto 32px;
    min-height: 220px;
    padding: 20px 0;
}

.hero-card {
    width: 260px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--surface-elevated);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
    transition: transform 400ms var(--ease-expo), filter 400ms var(--ease-expo), box-shadow 400ms var(--ease-expo);
    will-change: transform;
    cursor: pointer;
    flex-shrink: 0;
}

.hero-card img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Card 3D transforms */
.hero-card:nth-child(1) { transform: rotateY(-8deg) rotateX(4deg) translateZ(40px); }
.hero-card:nth-child(2) { transform: rotateY(4deg) rotateX(-2deg) translateZ(20px); }
.hero-card:nth-child(3) { transform: rotateY(12deg) rotateX(6deg) translateZ(60px); }

/* Idle drift */
@keyframes hero-drift-1 {
    0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateZ(40px) translateY(0); }
    50% { transform: rotateY(-8deg) rotateX(4deg) translateZ(40px) translateY(-6px); }
}
@keyframes hero-drift-2 {
    0%, 100% { transform: rotateY(4deg) rotateX(-2deg) translateZ(20px) translateY(0); }
    50% { transform: rotateY(4deg) rotateX(-2deg) translateZ(20px) translateY(-6px); }
}
@keyframes hero-drift-3 {
    0%, 100% { transform: rotateY(12deg) rotateX(6deg) translateZ(60px) translateY(0); }
    50% { transform: rotateY(12deg) rotateX(6deg) translateZ(60px) translateY(-6px); }
}

.hero-card:nth-child(1).drifting { animation: hero-drift-1 8s ease-in-out infinite; animation-delay: 0s; }
.hero-card:nth-child(2).drifting { animation: hero-drift-2 8s ease-in-out infinite; animation-delay: -2.6s; }
.hero-card:nth-child(3).drifting { animation: hero-drift-3 8s ease-in-out infinite; animation-delay: -5.2s; }

/* Hover focus effect */
.hero-gallery:hover .hero-card {
    filter: blur(2px) brightness(0.6);
}
.hero-gallery:hover .hero-card:hover {
    transform: rotateY(0deg) rotateX(0deg) translateZ(90px) scale(1.03);
    filter: blur(0) brightness(1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(234,179,8,0.15);
    z-index: 10;
}

/* Entrance animations */
@keyframes hero-card-enter {
    from { opacity: 0; transform: translateY(60px) rotateY(var(--ry,0deg)) rotateX(var(--rx,0deg)) translateZ(var(--rz,0px)); }
    to { opacity: 1; transform: translateY(0) rotateY(var(--ry,0deg)) rotateX(var(--rx,0deg)) translateZ(var(--rz,0px)); }
}

.hero-card.entering {
    opacity: 0;
    animation: hero-card-enter 800ms var(--ease-expo) forwards;
}
.hero-card:nth-child(1).entering { --ry: -8deg; --rx: 4deg; --rz: 40px; animation-delay: 0ms; }
.hero-card:nth-child(2).entering { --ry: 4deg; --rx: -2deg; --rz: 20px; animation-delay: 120ms; }
.hero-card:nth-child(3).entering { --ry: 12deg; --rx: 6deg; --rz: 60px; animation-delay: 240ms; }

/* ── Headline ── */
.hero-headline {
    text-align: center;
    margin-bottom: 12px;
    position: relative; z-index: 1;
}
.hero-headline h1 {
    font-size: var(--h1); font-weight: 800; letter-spacing: -0.04em;
    line-height: 1.1; margin-bottom: 14px; color: var(--text);
}
.hero-headline h1 .arrow { color: var(--accent); }
.hero-headline h1 .pops { font-style: italic; color: var(--accent); }
.hero-headline p {
    color: var(--text-secondary); font-size: 15px; line-height: 1.7;
    max-width: 420px; margin: 0 auto; font-weight: 400;
}

/* ── Stats ticker ── */
.stats-ticker {
    text-align: center;
    font-size: 12px; color: var(--text-muted); letter-spacing: 0.02em;
    margin-bottom: 32px; position: relative; z-index: 1;
}
.stats-ticker .spark { color: var(--accent); }

/* ── How It Works — visible, enhanced ── */
.how-it-works {
    margin-bottom: 48px;
    position: relative;
}
.hiw-glow-border {
    border-top: 1px solid rgba(234,179,8,0.1);
    border-bottom: 1px solid rgba(234,179,8,0.1);
    padding: 2px 0;
}

/* ── Reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms var(--ease-expo), transform 600ms var(--ease-expo);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 400ms; }

/* ── Command Bar Input ── */
.command-bar {
    max-width: 640px; margin: 0 auto 32px;
    position: relative; z-index: 1;
}
.command-input-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    transition: border-color 200ms var(--ease-expo), box-shadow 200ms var(--ease-expo);
}
.command-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.command-input-wrap.dragover {
    border-color: var(--accent);
    background: rgba(234,179,8,0.04);
}

.command-input {
    flex: 1; background: transparent; border: none;
    color: var(--text); font-family: inherit; font-size: 14px;
    line-height: 1.5; outline: none; resize: none;
    min-height: 20px; max-height: 160px;
    overflow-y: auto;
}
.command-input::placeholder { color: var(--text-muted); }

.command-actions {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.command-clip {
    background: none; border: none; color: var(--text-muted);
    width: 28px; height: 28px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: color 160ms var(--ease-expo), background 160ms var(--ease-expo);
}
.command-clip:hover { color: var(--accent); background: rgba(234,179,8,0.08); }
.command-clip svg { width: 16px; height: 16px; }

.command-send {
    background: var(--accent); color: #000; border: none;
    border-radius: var(--pill); width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; font-weight: 800;
    transition: background 160ms var(--ease-expo), transform 160ms var(--ease-expo);
    flex-shrink: 0;
}
.command-send:hover { background: var(--accent-hover); transform: translateY(-1px); }
.command-send:active { transform: translateY(0); }

/* Drop hint inside command bar */
.command-drop-hint {
    display: none; text-align: center; padding: 12px 0;
    color: var(--accent); font-size: 13px; font-weight: 500;
    width: 100%;
}
.command-input-wrap.dragover .command-input,
.command-input-wrap.dragover .command-actions {
    display: none;
}
.command-input-wrap.dragover .command-drop-hint {
    display: block;
}

/* Quick style picker — landscape tiles like Kimi */
.quick-styles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    justify-content: center;
    margin: 12px auto 40px;
    max-width: 720px;
    padding: 0 16px;
}
.quick-style {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 200ms var(--ease-expo);
}
.quick-style:hover {
    transform: translateY(-2px);
}
.quick-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-elevated);
    border: 1.5px solid var(--border);
    transition: border-color 200ms var(--ease-expo),
                box-shadow 200ms var(--ease-expo);
}
.quick-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.quick-style:hover .quick-preview {
    border-color: var(--border-bold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.quick-style.selected .quick-preview {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234,179,8,0.12);
}
.quick-selected-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transition: opacity 200ms var(--ease-expo);
}
.quick-style.selected .quick-selected-overlay {
    opacity: 1;
}
.quick-selected-overlay svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
}
.quick-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: color 200ms var(--ease-expo);
}
.quick-style:hover .quick-label {
    color: var(--text);
}
.quick-style.selected .quick-label {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 640px) {
    .quick-styles {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 400px;
    }
}

/* ── Categorized Style Grid ── */
.vibe-section { margin-bottom: 28px; }
.vibe-section-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.vibe-section-label::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Footer Closing CTA ── */
.footer-cta {
    text-align: center; padding: 48px 24px;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    margin: 48px 0 32px;
    border: 1px solid var(--border);
}
.footer-cta h3 {
    font-size: 20px; font-weight: 700; color: var(--text);
    margin-bottom: 8px; letter-spacing: -0.02em;
}
.footer-cta p {
    font-size: 14px; color: var(--text-secondary);
    margin-bottom: 20px;
}
.footer-cta .cta-btn-inline {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 24px; background: var(--accent); color: #000;
    border: none; border-radius: var(--pill); font-family: inherit;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background 160ms var(--ease-expo), transform 160ms var(--ease-expo), box-shadow 160ms var(--ease-expo);
    box-shadow: 0 4px 12px rgba(234,179,8,0.2);
}
.footer-cta .cta-btn-inline:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234,179,8,0.25);
}

/* ── Mobile carousel ── */
@media (max-width: 767px) {
    .hero-gallery {
        gap: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 20px 24px;
    }
    .hero-gallery::-webkit-scrollbar { display: none; }
    .hero-card {
        width: 78vw; max-width: 300px;
        scroll-snap-align: center;
        flex-shrink: 0;
        transform: none !important;
        animation: none !important;
    }
    .hero-card:not(:first-child) { margin-left: 16px; }
    .hero-gallery:hover .hero-card { filter: none; }
    .hero-gallery:hover .hero-card:hover { transform: none; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }

    .command-input-wrap { padding: 10px 12px; }
    .spotlight-chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .spotlight-chip { flex-shrink: 0; }
}

@media (max-width: 480px) {
    .hero-headline h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
    .stats-ticker { font-size: 11px; }
}

/* Hide old hero */
.hero.old-hero { display: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .reveal,
    .spotlight-chip,
    .command-input-wrap,
    .footer-cta .cta-btn-inline {
        transition: none !important;
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   DECK STUDIO INPUT — Split Surface
   ═══════════════════════════════════════════════════════════════════════ */

.studio-wrap {
    max-width: 680px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.studio-surface {
    background: var(--surface);
    border: 1.5px solid var(--border-bold);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    transition: border-color 300ms var(--ease-expo),
                box-shadow 300ms var(--ease-expo),
                transform 300ms var(--ease-expo);
    position: relative;
    overflow: hidden;
}

.studio-surface:hover {
    border-color: rgba(255,255,255,0.12);
}

.studio-surface:focus-within {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-ring),
                0 16px 48px rgba(0,0,0,0.45);
    transform: translateY(-2px);
}

.studio-surface.dragover {
    border-color: var(--accent);
    background: rgba(234,179,8,0.03);
}

/* Text zone */
.studio-text {
    width: 100%;
    min-height: 80px;
    max-height: 240px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.65;
    outline: none;
    resize: none;
    overflow-y: auto;
    transition: min-height 350ms var(--ease-expo);
    padding: 4px 0;
}

.studio-text::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.studio-surface:focus-within .studio-text {
    min-height: 120px;
}

/* Drop hint inside studio */
.studio-surface #drop-hint {
    display: none;
    text-align: center;
    padding: 20px 0;
    color: var(--accent);
}
.studio-surface.dragover .studio-text { display: none; }
.studio-surface.dragover #drop-hint { display: block; }

/* The Split — amber hinge line */
.studio-split {
    height: 0;
    margin: 8px -22px 0;
    background: linear-gradient(90deg, transparent 0%, var(--accent-border) 20%, var(--accent) 50%, var(--accent-border) 80%, transparent 100%);
    opacity: 0;
    transform: scaleX(0);
    transition: height 250ms var(--ease-expo),
                opacity 250ms var(--ease-expo),
                transform 350ms var(--ease-expo);
    flex-shrink: 0;
}

.studio-surface:focus-within .studio-split {
    height: 1.5px;
    opacity: 1;
    transform: scaleX(1);
}

/* Footer zone */
.studio-footer {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.96);
    transform-origin: top center;
    transition: opacity 350ms var(--ease-expo),
                transform 350ms var(--ease-expo);
    pointer-events: none;
    position: relative;
}

.studio-surface:focus-within .studio-footer,
.studio-surface.dragover .studio-footer,
.studio-surface:has(.attachments-row.has-files) .studio-footer {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

/* Also show footer when textarea has content */
.studio-surface:has(.studio-text:not(:placeholder-shown)) .studio-footer {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

.studio-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
}

.studio-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    position: relative;
}

/* Generate button — the hero action */
.studio-generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--pill);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 200ms var(--ease-expo),
                transform 200ms var(--ease-expo),
                box-shadow 200ms var(--ease-expo);
    box-shadow: 0 4px 14px rgba(234,179,8,0.25);
}

.studio-generate:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(234,179,8,0.35);
}

.studio-generate:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(234,179,8,0.2);
}

.studio-generate:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.studio-gen-icon {
    color: rgba(0,0,0,0.5);
    font-size: 12px;
}

/* Drop hint inside studio */
.studio-surface .drop-hint-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--accent);
}
.studio-surface .drop-hint-icon svg {
    width: 28px; height: 28px;
    stroke: var(--accent);
}
.studio-surface .drop-hint-text {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

/* Hide old input-area and command-bar styles */
.command-bar { display: none; }
.input-area { display: none; }

/* Keep old selectors for any lingering references but hide them */
#input-area.studio-surface { display: block; }

/* ═══════════════════════════════════════════════════════════════════════
   REDESIGN V2 — Compact Header, Input Bar, Category Tabs, Style Grid
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Header V2 ── */
.header-v2 { margin-bottom: 32px; padding: 8px 0; }
.header-left { display: flex; align-items: center; gap: 12px; }

/* ── Hero Headline V2 ── */
.hero-headline-v2 { text-align: left; margin-bottom: 8px; }
.hero-headline-v2 h1 {
    font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em;
    line-height: 1.12; margin-bottom: 14px; color: var(--text); max-width: 720px;
}
.hero-headline-v2 h1 .arrow { color: var(--text-secondary); }
.hero-headline-v2 h1 .pops { color: var(--accent); }
.hero-headline-v2 p {
    color: var(--text-secondary); font-size: 15px; line-height: 1.7;
    max-width: 520px; margin: 0 0 14px; font-weight: 400;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.04);
    padding: 5px 12px; border-radius: var(--pill); border: 1px solid var(--border);
}
.hero-badge-dot { color: var(--accent); }

/* ── How It Works V2 ── */
.hiw-v2 { margin: 48px 0; }
.hiw-v2-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px;
}
.hiw-v2-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 760px) { .hiw-v2-grid { grid-template-columns: 1fr; } }

.hiw-v2-card {
    background: var(--surface-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color 200ms ease, transform 200ms ease;
}
.hiw-v2-card:hover { border-color: var(--border-bold); transform: translateY(-2px); }
.hiw-v2-title {
    font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
    color: var(--text); text-align: center;
}
.hiw-v2-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }

.hiw-v2-chips {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%;
}
.hiw-v2-chip {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.03); border-radius: 10px; padding: 12px 4px;
    font-size: 10px; color: var(--text-secondary); text-align: center;
}
.hiw-v2-chip svg {
    width: 18px; height: 18px; stroke: var(--text-muted); opacity: 0.7;
}

.hiw-v2-brain { width: 80px; height: 68px; }
.hiw-v2-brain-svg { width: 100%; height: 100%; }
.hiw-v2-bars { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.hiw-v2-bar {
    height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(234,179,8,0.2) 100%);
}
.hiw-v2-bar:nth-child(2) { background: linear-gradient(90deg, #3b82f6 0%, rgba(59,130,246,0.2) 100%); }
.hiw-v2-bar:nth-child(3) { background: linear-gradient(90deg, #22c55e 0%, rgba(34,197,94,0.2) 100%); }

.hiw-v2-deck-preview {
    position: relative; width: 100%; aspect-ratio: 16/10;
    border-radius: 10px; overflow: hidden; background: var(--surface);
    border: 1px solid var(--border);
}
.hiw-v2-deck-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hiw-v2-deck-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    color: #fff; font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: var(--pill);
}

/* ── Input Bar V2 ── */
.input-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px;
}
.input-bar-v2 {
    background: var(--surface-elevated); border: 1.5px solid var(--border-bold);
    border-radius: var(--radius-lg); padding: 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color 300ms var(--ease-expo), box-shadow 300ms var(--ease-expo);
    position: relative; z-index: 10; margin-bottom: 32px;
}
.input-bar-v2:focus-within {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-ring), 0 16px 48px rgba(0,0,0,0.45);
}
.input-bar-v2.dragover {
    border-color: var(--accent); background: rgba(234,179,8,0.03);
}

.input-bar-main {
    display: flex; align-items: flex-start; gap: 12px;
}
.input-bar-left {
    flex: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0;
}
.input-file-pill {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #3b5bdb, #5c7cfa);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 6px 10px 6px 12px; border-radius: 8px; white-space: nowrap; flex-shrink: 0;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.input-file-pill-x {
    background: rgba(255,255,255,0.2); border: none; color: #fff;
    width: 18px; height: 18px; border-radius: 50%;
    font-size: 12px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; margin-left: 2px;
    transition: background 150ms ease;
}
.input-file-pill-x:hover { background: rgba(255,255,255,0.35); }
.input-bar-text {
    flex: 1; background: transparent; border: none; color: var(--text);
    font-family: inherit; font-size: 15px; line-height: 1.5;
    outline: none; resize: none; overflow: hidden; min-height: 72px; max-height: 160px;
    padding: 6px 0;
}
.input-bar-text::placeholder { color: var(--text-muted); opacity: 0.7; }

.input-bar-right {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.input-attach-btn {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 180ms ease;
}
.input-attach-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); border-color: var(--border-bold); }
.input-attach-btn svg { width: 16px; height: 16px; }

.input-bar-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-top: 8px; border-top: 1px solid var(--border);
}
.input-bar-tools {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.input-tool-btn {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 180ms ease;
}
.input-tool-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.input-tool-btn svg { width: 14px; height: 14px; }

.input-vibe-pill, .input-slides-pill {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: var(--pill); padding: 4px 12px;
    font-size: 12px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; transition: all 180ms ease; user-select: none;
    position: relative;
}
.input-vibe-pill:hover, .input-slides-pill:hover {
    border-color: var(--border-bold); color: var(--text);
}
.input-slides-pill.open { border-color: var(--accent); color: var(--accent); }
.input-slides-pill.open .slides-chevron { transform: rotate(180deg); }
.input-vibe-pill .vibe-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block;
}

.input-generate-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--accent); color: #000; border: none;
    border-radius: 12px; padding: 10px 20px;
    font-family: inherit; font-size: 13px; font-weight: 800;
    cursor: pointer; white-space: nowrap;
    transition: background 200ms var(--ease-expo), transform 200ms var(--ease-expo), box-shadow 200ms var(--ease-expo);
    box-shadow: 0 4px 14px rgba(234,179,8,0.25);
}
.input-generate-btn:hover:not(:disabled) {
    background: var(--accent-hover); transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(234,179,8,0.35);
}
.input-generate-btn:active:not(:disabled) { transform: translateY(0); }
.input-generate-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.input-generate-btn svg { stroke: #000; }

.input-drop-hint {
    display: none; text-align: center; padding: 20px 0; color: var(--accent);
}
.input-bar-v2.dragover .input-bar-main,
.input-bar-v2.dragover .input-bar-footer { display: none; }
.input-bar-v2.dragover .input-drop-hint { display: block; }

/* ── Category Tabs ── */
.style-section-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px;
}
.cat-tabs {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.cat-tab {
    background: none; border: none; color: var(--text-secondary);
    font-family: inherit; font-size: 13px; font-weight: 500;
    padding: 6px 14px; border-radius: var(--pill); cursor: pointer;
    transition: all 180ms ease; white-space: nowrap;
}
.cat-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.cat-tab.active { color: var(--text); background: rgba(255,255,255,0.06); font-weight: 600; }

/* ── Style Grid V2 ── */
#vibe-picker { margin-bottom: 48px; }
.style-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 900px) { .style-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 600px) { .style-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.style-card {
    cursor: pointer; display: flex; flex-direction: column; gap: 8px;
}
.style-thumb {
    width: 100%; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden;
    border: 2px solid transparent; background: var(--surface);
    position: relative; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.style-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-card:hover .style-thumb {
    border-color: var(--border-bold); transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.style-card.selected .style-thumb {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234,179,8,0.15);
    transform: translateY(-2px);
}
/* Selected checkmark overlay */
.style-thumb::after {
    content: '✓'; position: absolute; top: 8px; left: 8px;
    width: 20px; height: 20px; background: var(--accent); color: #000;
    border-radius: 50%; font-size: 11px; font-weight: 900;
    line-height: 20px; text-align: center; opacity: 0;
    transition: opacity 160ms ease; pointer-events: none;
}
.style-card.selected .style-thumb::after { opacity: 1; }

.style-eye {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); border-radius: 50%; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 160ms ease; color: #fff; z-index: 2;
}
.style-eye svg { width: 12px; height: 12px; pointer-events: none; }
.style-card:hover .style-eye { opacity: 1; }
.style-card.selected .style-eye { opacity: 0; }

.style-tag {
    font-size: 12px; font-weight: 500; color: var(--text-secondary);
    text-align: center; line-height: 1.3; transition: color 160ms ease;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.style-card:hover .style-tag { color: var(--text); }
.style-card.selected .style-tag { color: var(--accent); font-weight: 600; }

/* ── Mobile V2 ── */
@media (max-width: 760px) {
    .hero-headline-v2 h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .input-bar-v2 { padding: 12px 14px; border-radius: var(--radius); }
    .input-generate-btn { padding: 8px 14px; font-size: 12px; }
    .input-bar-footer { flex-wrap: wrap; }
    .cat-tabs { gap: 4px; }
    .cat-tab { padding: 5px 10px; font-size: 12px; }
    .header-v2 { margin-bottom: 20px; }
}
@media (max-width: 520px) {
    .input-bar-v2 { padding: 16px; border-radius: 20px; gap: 12px; }
    .input-bar-main { flex-direction: column; gap: 10px; }
    .input-bar-left { width: 100%; flex-direction: column; gap: 8px; }
    .input-file-pill { max-width: 100%; min-height: 34px; padding: 6px 8px 6px 10px; font-size: 11px; }
    .input-file-pill-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .input-bar-text { width: 100%; min-height: 104px; font-size: 16px; line-height: 1.55; padding: 2px 0; }
    .input-bar-right { position: absolute; right: 16px; top: 58px; }
    .input-attach-btn { width: 44px; height: 44px; border-radius: 14px; }
    .input-bar-footer { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
    .input-bar-tools { gap: 8px; flex-wrap: nowrap; min-width: 0; }
    .input-tool-btn { width: 36px; height: 36px; flex: 0 0 auto; }
    .input-vibe-pill, .input-slides-pill { min-height: 36px; padding: 7px 12px; font-size: 13px; }
    .input-vibe-pill { min-width: 0; max-width: 48vw; }
    .input-vibe-pill span:not(.vibe-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .input-slides-pill { flex: 0 0 auto; }
    .input-generate-btn { width: 100%; justify-content: center; min-height: 50px; padding: 12px 16px; font-size: 15px; border-radius: 16px; }
    .cat-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 12px; }
    .cat-tab { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
    .style-grid { gap: 14px; }
    .style-thumb { border-radius: 14px; }
    .style-tag { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .hiw-v2-grid { grid-template-columns: 1fr; }
}
