        :root {
            color-scheme: dark;
            --bg: #070910;
            --panel: #10131d;
            --line: rgba(255,255,255,.11);
            --text: #f5f7fb;
            --muted: #a7adbd;
            --accent: #61dafb;
            --accent-2: #ff4f8b;
            --ok: #5ee6a8;
            --character-picker-clearance: 280px;
            --character-picker-expanded-clearance: min(58vh, 590px);
            --character-picker-minimized-clearance: 112px;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            min-height: 100vh;
            padding-bottom: var(--character-picker-clearance);
            font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background:
                radial-gradient(circle at 18% 18%, rgba(97,218,251,.14), transparent 28rem),
                radial-gradient(circle at 82% 10%, rgba(255,79,139,.12), transparent 24rem),
                linear-gradient(180deg, #090b13 0%, var(--bg) 58%, #05060b 100%);
            color: var(--text);
        }
        a { color: inherit; text-decoration: none; }
        .topbar {
            height: 72px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 clamp(18px, 4vw, 52px);
            border-bottom: 1px solid var(--line);
            background: rgba(7,9,16,.74);
            backdrop-filter: blur(18px);
        }
        .brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 900;
            letter-spacing: 0;
            font-size: 1.18rem;
        }
        .brand::before {
            content: "";
            display: block;
            width: min(270px, 56vw);
            height: 34px;
            background: url('/assets/brand/aimusicvideo-wordmark-header-transparent.png') left center / contain no-repeat;
        }
        .brand > span {
            display: none !important;
        }
        .brand-mark {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            display: grid;
            place-items: center;
            color: #071018;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            font-weight: 900;
        }
        .brand-mark {
            display: none !important;
        }
        /* Category grid under the hero */
        .category-grid-section {
            margin: 18px auto 8px;
            padding: 0 clamp(16px, 4vw, 40px);
        }
        .category-grid-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }
        .category-grid-title {
            font-size: 1.15rem;
            font-weight: 800;
            color: #fff;
            margin: 0;
        }
        .category-grid-all {
            color: rgba(103,232,249,0.9);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 700;
            white-space: nowrap;
        }
        .category-grid-all:hover { color: #fff; }
        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 12px;
        }
        .category-card {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 16px 16px 14px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.035);
            text-decoration: none;
            transition: border-color 0.18s, background 0.18s, transform 0.18s;
        }
        .category-card:hover {
            border-color: rgba(103,232,249,0.45);
            background: rgba(255,255,255,0.06);
            transform: translateY(-2px);
        }
        .category-card-name {
            color: #fff;
            font-weight: 700;
            font-size: 0.95rem;
            line-height: 1.25;
        }
        .category-card-count {
            color: rgba(255,255,255,0.5);
            font-size: 0.8rem;
        }
        .advanced-checkbox {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            cursor: pointer;
            font-weight: 600;
            color: rgba(255,255,255,0.85);
        }
        .advanced-checkbox input { margin-top: 3px; flex: 0 0 auto; }
        .advanced-checkbox small {
            display: block;
            font-weight: 400;
            color: rgba(255,255,255,0.5);
            font-size: 0.72rem;
            line-height: 1.35;
            margin-top: 2px;
        }
        .nav-primary {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        .nav-primary a {
            color: rgba(255,255,255,0.78);
            text-decoration: none;
            font-weight: 700;
            font-size: 0.92rem;
            transition: color 0.18s;
        }
        .nav-primary a:hover { color: #fff; }
        @media (max-width: 680px) { .nav-primary { display: none; } }
        .nav-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .nav-actions a,
        .nav-actions button,
        .primary-link {
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 16px;
            border: 1px solid var(--line);
            border-radius: 8px;
            font-size: .9rem;
            font-weight: 800;
            color: var(--text);
            background: rgba(255,255,255,.04);
        }
        .nav-actions .nav-cta,
        .primary-link {
            border-color: transparent;
            color: #071018;
            background: var(--accent);
        }
        .nav-actions button {
            min-height: 40px;
            appearance: none;
            background: rgba(255,255,255,.04);
            color: var(--text);
        }
        .account-pill {
            min-height: 40px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 5px 12px 5px 6px;
            border: 1px solid rgba(97,218,251,.26);
            border-radius: 8px;
            background: rgba(97,218,251,.08);
        }
        .account-avatar {
            width: 28px;
            height: 28px;
            border-radius: 7px;
            display: grid;
            place-items: center;
            color: #071018;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            font-size: .78rem;
            font-weight: 900;
        }
        .account-copy {
            display: grid;
            gap: 1px;
            line-height: 1.1;
        }
        .account-name {
            max-width: 170px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: .88rem;
            font-weight: 900;
        }
        .account-meta {
            color: var(--muted);
            font-size: .68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .account-meta.needs-email {
            color: #ffd166;
        }
        .logout-button {
            border-color: rgba(255,79,139,.3);
            color: #ffd8e5;
        }
        main {
            /* Subtract the topbar (72px) AND the fixed bottom dock space that
               body already reserves via padding-bottom (212px). Without this
               subtraction, main's min-height stacks on top of the body padding
               and forces ~140px+ of empty scroll below the content. */
            min-height: calc(100vh - 72px);
            display: grid;
            /* Content row (.shell) absorbs any surplus height; footer pins to the
               bottom row. Without this, grid align-content:start packs both rows
               at the top and dumps the leftover min-height *below* the footer. */
            align-items: start;
            padding: 10px clamp(16px, 3vw, 40px) 38px;
        }
        .shell {
            width: min(1160px, 100%);
            margin: 0 auto;
        }
        .eyebrow {
            color: var(--accent);
            font-weight: 900;
            font-size: .82rem;
            text-transform: uppercase;
            letter-spacing: .08em;
            margin-bottom: 10px;
        }
        h1 {
            margin: 0;
            max-width: 620px;
            font-size: clamp(2rem, 4.4vw, 4rem);
            line-height: 1;
            letter-spacing: 0;
        }
        .subcopy {
            max-width: 620px;
            margin: 14px 0 20px;
            color: var(--muted);
            font-size: clamp(.94rem, 1.4vw, 1.05rem);
            line-height: 1.5;
        }
        .prompt-panel {
            display: grid;
            gap: 12px;
            padding: 16px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(16,19,29,.82);
            box-shadow: 0 24px 80px rgba(0,0,0,.28);
        }
        label {
            color: var(--text);
            font-size: .9rem;
            font-weight: 900;
        }
        .prompt-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }
        .prompt-starters {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        /* SEO category landing pages (/category/:slug) */
        .seo-category-nav {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin: 0 auto 14px;
            max-width: 760px;
        }
        .seo-category-nav-label {
            color: rgba(255,255,255,0.5);
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .seo-category-chip {
            display: inline-flex;
            align-items: center;
            padding: 6px 14px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.16);
            background: rgba(255,255,255,0.04);
            color: rgba(255,255,255,0.82);
            font-size: 0.82rem;
            text-decoration: none;
            transition: background 0.18s, border-color 0.18s, color 0.18s;
        }
        .seo-category-chip:hover {
            background: rgba(255,255,255,0.09);
            color: #fff;
        }
        .seo-category-chip.active {
            background: linear-gradient(90deg, rgba(103,232,249,0.22), rgba(167,139,250,0.22));
            border-color: rgba(103,232,249,0.5);
            color: #fff;
        }
        .seo-category-intro {
            max-width: 640px;
            margin: 10px auto 0;
            text-align: center;
            color: rgba(255,255,255,0.62);
            font-size: 0.95rem;
            line-height: 1.5;
        }
        .prompt-starters.prompt-only-hidden { display: none; }
        .prompt-starters-label {
            color: rgba(255,255,255,0.45);
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .prompt-starter-chip {
            appearance: none;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            min-height: 30px;
            padding: 0 11px;
            border-radius: 999px;
            border: 1px solid rgba(97,218,251,0.32);
            background: rgba(97,218,251,0.08);
            color: #6cf2ff;
            font-weight: 800;
            font-size: 0.78rem;
            cursor: pointer;
            transition: background 0.16s, border-color 0.16s;
        }
        .prompt-starter-chip:hover {
            background: rgba(97,218,251,0.16);
            border-color: rgba(97,218,251,0.6);
        }
        .social-format-select {
            appearance: none;
            min-height: 30px;
            max-width: 130px;
            padding: 0 28px 0 11px;
            border-radius: 999px;
            border: 1px solid rgba(97,218,251,0.32);
            background: rgba(8,12,20,0.72);
            color: #dffcff;
            font-size: 0.78rem;
            font-weight: 800;
            cursor: pointer;
            background-image:
                linear-gradient(45deg, transparent 50%, #6cf2ff 50%),
                linear-gradient(135deg, #6cf2ff 50%, transparent 50%);
            background-position:
                calc(100% - 15px) 12px,
                calc(100% - 10px) 12px;
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
        }
        .social-format-select:focus {
            outline: none;
            border-color: rgba(97,218,251,0.72);
            box-shadow: 0 0 0 2px rgba(97,218,251,0.15);
        }
        .prompt-starter-url {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin: 8px 0 0;
            padding: 10px 12px;
            border: 1px solid rgba(97,218,251,0.28);
            border-radius: 8px;
            background: rgba(8,12,20,0.6);
        }
        .prompt-starter-url[hidden] { display: none; }
        .prompt-starter-input {
            flex: 1;
            min-width: 220px;
            min-height: 38px;
            padding: 0 12px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.14);
            background: #060a16;
            color: #fff;
            font-size: 0.88rem;
        }
        .prompt-starter-go {
            appearance: none;
            min-height: 38px;
            padding: 0 16px;
            border-radius: 8px;
            border: 1px solid rgba(97,218,251,0.5);
            background: linear-gradient(135deg, rgba(97,218,251,0.22), rgba(97,218,251,0.1));
            color: #fff;
            font-weight: 800;
            cursor: pointer;
        }
        .prompt-starter-go:disabled { opacity: 0.6; cursor: not-allowed; }
        .prompt-starter-cancel {
            appearance: none;
            min-height: 38px;
            width: 38px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.05);
            color: rgba(255,255,255,0.7);
            cursor: pointer;
        }
        .prompt-starter-status {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.6);
        }
        .prompt-starter-status.err { color: #ff6b6b; }
        #vidtv-prompt-form.audio-mode .prompt-starters,
        #vidtv-prompt-form.audio-mode .prompt-starter-url {
            display: none;
        }
        .prompt-bar {
            position: relative;
            overflow: hidden;
            min-height: 58px;
            border: 1px solid rgba(245,158,11,0.55);
            border-radius: 8px;
            background:
                linear-gradient(90deg, rgba(245,158,11,.10), rgba(255,255,255,.025) 38%, rgba(255,79,139,.045)),
                #050812;
            padding: 8px;
            box-shadow:
                0 0 0 2px rgba(245,158,11,0.22),
                inset 0 1px 0 rgba(255,255,255,.06),
                inset 0 0 0 1px rgba(255,255,255,.035),
                0 10px 26px rgba(0,0,0,.22);
            transition: box-shadow 0.18s, border-color 0.18s;
        }
        .prompt-bar > * {
            position: relative;
            z-index: 1;
        }
        .prompt-bar:focus-within {
            border-color: rgba(245,158,11,0.85);
            box-shadow:
                0 0 0 3px rgba(245,158,11,0.4),
                inset 0 1px 0 rgba(255,255,255,.06),
                inset 0 0 0 1px rgba(255,255,255,.035),
                0 10px 26px rgba(0,0,0,.22);
        }
        .prompt-bar:focus-within {
            border-color: rgba(97,218,251,.85);
            background:
                linear-gradient(90deg, rgba(97,218,251,.2), rgba(255,255,255,.035) 38%, rgba(255,79,139,.055)),
                #060a16;
            box-shadow:
                0 0 0 3px rgba(97,218,251,.14),
                0 14px 34px rgba(0,0,0,.3),
                inset 0 1px 0 rgba(255,255,255,.08);
        }
        .prompt-bar.prompt-login-highlight {
            border-color: rgba(34,211,238,0.95) !important;
            background:
                linear-gradient(90deg, rgba(34,211,238,.22), rgba(255,255,255,.035) 40%, rgba(255,79,139,.14)),
                #060a16 !important;
            box-shadow:
                0 0 0 3px rgba(34,211,238,0.18),
                0 0 34px rgba(34,211,238,0.34),
                0 0 54px rgba(255,79,139,0.22),
                inset 0 1px 0 rgba(255,255,255,.10) !important;
            animation: prompt-login-pulse 2.6s ease-in-out 0s 2;
        }
        .prompt-bar.prompt-login-highlight::before {
            content: "";
            position: absolute;
            inset: -2px;
            border-radius: inherit;
            pointer-events: none;
            background: linear-gradient(105deg, transparent 0%, rgba(34,211,238,0) 24%, rgba(34,211,238,.55) 45%, rgba(255,79,139,.45) 58%, rgba(245,158,11,.45) 68%, transparent 82%);
            transform: translateX(-120%);
            animation: prompt-login-scan 2.6s ease-in-out 0s 2;
        }
        .prompt-panel.prompt-login-arrival {
            border-color: rgba(34,211,238,0.42) !important;
            box-shadow:
                0 0 0 1px rgba(34,211,238,0.24),
                0 24px 78px rgba(0,0,0,0.58),
                0 0 64px rgba(34,211,238,0.16) !important;
        }
        @keyframes prompt-login-scan {
            0% { transform: translateX(-120%); opacity: 0; }
            18% { opacity: 1; }
            78% { opacity: 1; }
            100% { transform: translateX(120%); opacity: 0; }
        }
        @keyframes prompt-login-pulse {
            0%, 100% {
                box-shadow:
                    0 0 0 3px rgba(34,211,238,0.18),
                    0 0 34px rgba(34,211,238,0.34),
                    0 0 54px rgba(255,79,139,0.22),
                    inset 0 1px 0 rgba(255,255,255,.10);
            }
            50% {
                box-shadow:
                    0 0 0 5px rgba(34,211,238,0.24),
                    0 0 54px rgba(34,211,238,0.46),
                    0 0 76px rgba(255,79,139,0.34),
                    inset 0 1px 0 rgba(255,255,255,.12);
            }
        }
        @media (prefers-reduced-motion: reduce) {
            .prompt-bar.prompt-login-highlight,
            .prompt-bar.prompt-login-highlight::before {
                animation: none;
            }
        }
        .prompt-input {
            width: 100%;
            min-width: 0;
            height: 40px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--text);
            padding: 0 8px;
            font: 500 .98rem/1 Inter, system-ui, sans-serif;
            outline: none;
            caret-color: var(--accent-amber-bright, #FBBF24);
            cursor: text;
        }
        .selected-reference-preview {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin: -2px 0 8px;
            padding: 9px 10px;
            border: 1px solid rgba(103,232,249,0.28);
            border-radius: 8px;
            background: linear-gradient(135deg, rgba(8,18,30,0.78), rgba(24,14,36,0.58));
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 28px rgba(0,0,0,0.18);
        }
        .selected-reference-preview[hidden] {
            display: none;
        }
        .selected-reference-title {
            flex: 0 0 auto;
            color: rgba(236,244,255,0.74);
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .selected-reference-list {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1 1 auto;
            min-width: 0;
            overflow-x: auto;
            scrollbar-width: thin;
        }
        .selected-reference-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
            min-width: 0;
            max-width: 260px;
            padding: 5px 7px 5px 5px;
            border: 1px solid rgba(103,232,249,0.24);
            border-radius: 8px;
            background: rgba(2,8,18,0.64);
            color: rgba(255,255,255,0.9);
        }
        .selected-reference-pill img {
            width: 34px;
            height: 34px;
            border-radius: 6px;
            object-fit: cover;
            background: rgba(255,255,255,0.08);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
        }
        .selected-reference-pill strong {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.8rem;
            line-height: 1.1;
        }
        .selected-reference-pill span {
            display: block;
            color: rgba(255,255,255,0.52);
            font-size: 0.68rem;
            line-height: 1.1;
        }
        .selected-reference-remove {
            width: 24px;
            height: 24px;
            flex: 0 0 auto;
            border: 1px solid rgba(255,255,255,0.14);
            border-radius: 7px;
            background: rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.72);
            font-size: 0.78rem;
            font-weight: 900;
            line-height: 1;
            cursor: pointer;
        }
        .selected-reference-remove:hover {
            border-color: rgba(255,79,139,0.5);
            color: #ff9fbd;
            background: rgba(255,79,139,0.14);
        }
        @media (max-width: 640px) {
            .selected-reference-preview {
                align-items: flex-start;
                flex-direction: column;
                gap: 7px;
            }
            .selected-reference-list {
                width: 100%;
            }
            .selected-reference-pill {
                max-width: 220px;
            }
        }
        .prompt-location-highlight {
            position: absolute !important;
            z-index: 1;
            display: none;
            overflow: hidden;
            pointer-events: none;
            box-sizing: border-box;
            padding: 0 8px;
            color: var(--text);
            font: 500 .98rem/40px Inter, system-ui, sans-serif;
            white-space: pre;
        }
        .prompt-location-highlight [data-location-highlight-text] {
            display: inline-block;
            min-width: 100%;
            transform: translateX(calc(var(--prompt-scroll-x, 0px) * -1));
        }
        .prompt-bar.has-location-highlight .prompt-location-highlight {
            display: block;
        }
        .prompt-location-highlight mark {
            color: #67e8f9;
            background: linear-gradient(180deg, rgba(103,232,249,0) 45%, rgba(103,232,249,0.28) 45%, rgba(103,232,249,0.28) 88%, rgba(103,232,249,0) 88%);
            border-radius: 4px;
            padding: 0 1px;
            text-shadow: 0 0 14px rgba(103,232,249,0.5);
        }
        .prompt-bar.has-location-highlight .prompt-input {
            color: transparent;
            caret-color: var(--accent-amber-bright, #FBBF24);
            position: relative;
            z-index: 2;
        }
        .prompt-bar.has-location-highlight .prompt-input::selection {
            color: transparent;
            background: rgba(103,232,249,0.24);
        }
        .prompt-bar.location-highlight-flash {
            border-color: rgba(103,232,249,0.9);
            box-shadow:
                0 0 0 3px rgba(103,232,249,0.22),
                0 0 34px rgba(103,232,249,0.28),
                inset 0 1px 0 rgba(255,255,255,.08);
        }
        .prompt-input::placeholder {
            color: rgba(245,247,251,.42);
            font-weight: 400;
            font-style: italic;
        }
        .prompt-bar { cursor: text; }
        .prompt-char-counter {
            flex: 0 0 auto;
            font-size: 0.7rem;
            font-weight: 700;
            color: rgba(255,255,255,0.4);
            padding: 0 10px 0 4px;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.02em;
            white-space: nowrap;
            user-select: none;
        }
        .prompt-char-counter.warn { color: #FBBF24; }
        .prompt-char-counter.over { color: #ff8da6; }
        .smart-location-chip {
            display: none;
            align-items: stretch;
            justify-content: flex-start;
            flex-direction: column;
            gap: 10px;
            width: fit-content;
            max-width: 100%;
            margin-top: -4px;
            padding: 7px 9px 7px 10px;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 8px;
            background: rgba(97,218,251,.08);
            color: #dffbff;
            font-size: .76rem;
            font-weight: 850;
            line-height: 1.25;
        }
        .smart-location-chip.visible {
            display: flex;
        }
        .smart-location-chip-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }
        .smart-location-chip span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .smart-location-chip button {
            appearance: none;
            width: 22px;
            height: 22px;
            display: inline-grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 7px;
            color: rgba(255,255,255,.78);
            background: rgba(255,255,255,.06);
            cursor: pointer;
            font-weight: 900;
        }
        .smart-location-suggestions {
            display: grid;
            gap: 6px;
            min-width: min(520px, calc(100vw - 48px));
        }
        .smart-location-suggestions:empty { display: none; }
        .smart-location-suggestions-title {
            color: rgba(223,251,255,.72);
            font-size: .68rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }
        .smart-location-suggestions button {
            width: 100%;
            height: auto;
            min-height: 38px;
            padding: 7px 9px;
            display: grid;
            place-items: initial;
            gap: 2px;
            text-align: left;
            border-radius: 8px;
            border-color: rgba(97,218,251,.24);
            background: rgba(5,12,24,.72);
        }
        .smart-location-suggestions button:hover {
            border-color: rgba(97,218,251,.55);
            background: rgba(97,218,251,.12);
        }
        .smart-location-suggestions strong {
            color: #fff;
            font-size: .77rem;
            line-height: 1.15;
        }
        .smart-location-suggestions small {
            color: rgba(223,251,255,.64);
            font-size: .68rem;
            line-height: 1.2;
        }
        .prompt-advanced-row {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 6px;
        }
        .prompt-advanced-row.prompt-only-hidden {
            display: none;
        }
        /* On the Prompt tab, sit in the left column of the settings row (where
           Audio Source is for music video) so both tabs are 2-column/proportional. */
        .media-settings-row .prompt-advanced-row {
            order: 1;
            margin-top: 0;
            align-content: flex-start;
            padding: 12px;
            border: 1px solid rgba(255,255,255,0.10);
            border-radius: 8px;
            background: rgba(8,12,20,.5);
        }
        .prompt-adv-btn {
            appearance: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 11px;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 999px;
            background: rgba(255,255,255,.04);
            color: rgba(255,255,255,.82);
            font-size: .76rem;
            font-weight: 800;
            cursor: pointer;
            transition: background .15s, border-color .15s, color .15s;
        }
        .prompt-adv-btn:hover {
            background: rgba(124,58,237,.14);
            border-color: rgba(124,58,237,.42);
            color: #fff;
        }
        .prompt-adv-icon { font-size: .92rem; line-height: 1; }
        .prompt-date-popover {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            z-index: 12;
            display: none;
            gap: 6px;
            padding: 8px;
            background: #16161c;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 10px;
            box-shadow: 0 16px 40px rgba(0,0,0,.5);
        }
        .prompt-date-popover.open { display: inline-flex; align-items: center; }
        .prompt-date-input {
            background: #0e0e14;
            color: #fff;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 6px;
            padding: 6px 8px;
            font-size: .82rem;
            font-family: inherit;
        }
        .prompt-date-apply,
        .prompt-date-cancel {
            appearance: none;
            border: 0;
            border-radius: 6px;
            padding: 6px 11px;
            font-size: .76rem;
            font-weight: 900;
            cursor: pointer;
        }
        .prompt-date-apply { background: linear-gradient(135deg,#7c3aed,#22d3ee); color: #0a0a12; }
        .prompt-date-cancel { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
        .prompt-voice-lang-popover {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            z-index: 12;
            display: none;
            gap: 8px;
            padding: 10px;
            background: #16161c;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 10px;
            box-shadow: 0 16px 40px rgba(0,0,0,.5);
        }
        .prompt-voice-lang-popover.open { display: inline-flex; align-items: center; }
        .prompt-voice-lang-popover label {
            display: inline-flex;
            flex-direction: column;
            gap: 4px;
            font-size: .72rem;
            font-weight: 800;
            color: rgba(255,255,255,.65);
        }
        .prompt-voice-lang-popover select {
            background: #0e0e14;
            color: #fff;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 6px;
            padding: 6px 8px;
            font-size: .82rem;
            font-family: inherit;
            font-weight: 700;
        }
        .event-date-chip {
            display: none;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: fit-content;
            max-width: 100%;
            margin-top: 6px;
            padding: 7px 9px 7px 10px;
            border: 1px solid rgba(236,72,153,.32);
            border-radius: 8px;
            background: rgba(236,72,153,.08);
            color: #fce7f3;
            font-size: .76rem;
            font-weight: 850;
            line-height: 1.25;
        }
        .event-date-chip.visible { display: inline-flex; }
        .event-date-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .event-date-chip button {
            appearance: none;
            width: 22px;
            height: 22px;
            display: inline-grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 7px;
            color: rgba(255,255,255,.78);
            background: rgba(255,255,255,.06);
            cursor: pointer;
            font-weight: 900;
        }
        .custom-dialog-panel {
            display: none;
            margin-top: 8px;
            padding: 12px;
            border: 1px solid rgba(124,58,237,.28);
            border-radius: 12px;
            background: linear-gradient(135deg,rgba(124,58,237,.06),rgba(34,211,238,.04));
            box-shadow: 0 10px 28px rgba(0,0,0,.18);
        }
        .custom-dialog-panel.open { display: block; }
        .custom-dialog-head {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }
        .custom-dialog-title {
            flex: 1 1 auto;
            color: #fff;
            font-size: .85rem;
            font-weight: 900;
            letter-spacing: .01em;
        }
        .custom-dialog-lang {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: .72rem;
            font-weight: 800;
            color: rgba(255,255,255,.68);
        }
        .custom-dialog-lang select {
            background: #0e0e14;
            color: #fff;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 6px;
            padding: 4px 6px;
            font-size: .76rem;
            font-family: inherit;
            font-weight: 800;
        }
        .custom-dialog-close {
            appearance: none;
            width: 24px;
            height: 24px;
            display: inline-grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 7px;
            color: rgba(255,255,255,.78);
            background: rgba(255,255,255,.06);
            cursor: pointer;
            font-weight: 900;
        }
        .custom-dialog-text {
            width: 100%;
            min-height: 84px;
            box-sizing: border-box;
            padding: 10px 12px;
            background: #0e0e14;
            color: #fff;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 8px;
            font-family: inherit;
            font-size: .85rem;
            line-height: 1.45;
            resize: vertical;
        }
        .custom-dialog-text:focus {
            outline: none;
            border-color: rgba(124,58,237,.6);
        }
        .custom-dialog-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            font-size: .72rem;
            color: rgba(255,255,255,.6);
        }
        .custom-dialog-clear {
            appearance: none;
            border: 0;
            border-radius: 6px;
            padding: 5px 10px;
            font-size: .72rem;
            font-weight: 800;
            color: rgba(255,255,255,.7);
            background: rgba(255,255,255,.06);
            cursor: pointer;
        }
        .custom-dialog-clear:hover { background: rgba(255,255,255,.12); color: #fff; }
        .credit-estimate {
            min-width: 130px;
            min-height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 12px;
            border: 1px solid rgba(97,218,251,.32);
            border-radius: 8px;
            color: #dffbff;
            background:
                linear-gradient(135deg, rgba(97,218,251,.16), rgba(94,230,168,.10)),
                rgba(8,11,19,.92);
            font-size: .76rem;
            font-weight: 900;
            white-space: nowrap;
            box-shadow: inset 0 0 18px rgba(97,218,251,.06);
        }
        .credit-estimate strong {
            color: var(--text);
            font-size: .86rem;
        }
        .credit-estimate .credit-label {
            color: rgba(223,251,255,.7);
            text-transform: uppercase;
            letter-spacing: .06em;
            font-size: .64rem;
        }
        .credit-estimate .credit-meta {
            color: rgba(223,251,255,.64);
            font-size: .7rem;
        }
        .credit-estimate.warning {
            border-color: rgba(255,80,140,.38);
            color: #ffb8cc;
            background: rgba(255,80,140,.08);
        }
        /* CTA-pair variant - sits next to the Create Video button and matches
           its height so they read as a pair of buttons. Non-interactive. */
        .credit-estimate.cta-pair {
            min-height: 46px;
            padding: 0 18px;
            border-radius: 8px;
            font-size: 0.86rem;
            min-width: 110px;
            box-shadow: none;
            cursor: default;
        }
        .credit-estimate.cta-pair strong {
            font-size: 0.92rem;
            font-weight: 900;
        }
        .create-credit-confirm-modal {
            position: fixed;
            inset: 0;
            z-index: 1000000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 22px;
            background: rgba(0,0,0,.72);
            backdrop-filter: blur(18px);
        }
        .create-credit-confirm-modal.open { display: flex; }
        .create-credit-confirm-shell {
            position: relative;
            width: min(540px, 94vw);
            display: grid;
            gap: 14px;
            padding: 24px;
            border-radius: 16px;
            background: linear-gradient(145deg, rgba(18,20,30,.98), rgba(8,11,18,.98));
            border: 1px solid rgba(80,241,255,.2);
            box-shadow: 0 30px 90px rgba(0,0,0,.62), inset 0 0 0 1px rgba(255,179,0,.08);
        }
        .create-credit-confirm-close {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 34px;
            height: 34px;
            border: 0;
            border-radius: 999px;
            background: rgba(255,255,255,.08);
            color: #fff;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
        }
        .create-credit-confirm-kicker {
            width: max-content;
            max-width: calc(100% - 44px);
            padding: 5px 9px;
            border-radius: 999px;
            background: rgba(80,241,255,.12);
            border: 1px solid rgba(80,241,255,.22);
            color: #6ff7ff;
            font-size: .72rem;
            font-weight: 1000;
            text-transform: uppercase;
            letter-spacing: .06em;
        }
        .create-credit-confirm-shell h3 {
            margin: 0;
            color: #fff;
            font-size: 1.35rem;
            line-height: 1.1;
            font-weight: 1000;
        }
        .create-credit-confirm-refs {
            display: grid;
            gap: 8px;
            padding: 10px;
            border-radius: 14px;
            background: rgba(80,241,255,.07);
            border: 1px solid rgba(80,241,255,.16);
        }
        .create-credit-confirm-refs[hidden] { display: none; }
        .create-credit-confirm-refs-title {
            color: rgba(255,255,255,.62);
            font-size: .72rem;
            font-weight: 1000;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .create-credit-confirm-refs-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-height: 240px;
            overflow: auto;
        }
        .create-credit-confirm-ref {
            display: grid;
            grid-template-columns: 96px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            min-width: min(260px, 100%);
            max-width: 100%;
            padding: 8px 12px 8px 8px;
            border-radius: 14px;
            background: rgba(255,255,255,.06);
            border: 1px solid rgba(255,255,255,.1);
        }
        .create-credit-confirm-ref img {
            width: 96px;
            height: 96px;
            border-radius: 12px;
            object-fit: cover;
            background: rgba(255,255,255,.08);
        }
        .create-credit-confirm-ref span {
            min-width: 0;
            color: #fff;
            font-size: .86rem;
            line-height: 1.1;
            font-weight: 950;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .create-credit-confirm-grid { display: grid; gap: 8px; }
        .create-credit-confirm-row {
            display: grid;
            grid-template-columns: 82px minmax(0, 1fr);
            gap: 10px;
            align-items: start;
            padding: 11px 12px;
            border-radius: 12px;
            background: rgba(255,255,255,.045);
            border: 1px solid rgba(255,255,255,.08);
        }
        .create-credit-confirm-row span {
            color: rgba(255,255,255,.52);
            font-size: .72rem;
            font-weight: 1000;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .create-credit-confirm-row strong {
            min-width: 0;
            color: #fff;
            font-size: .9rem;
            line-height: 1.35;
            font-weight: 850;
            overflow-wrap: anywhere;
        }
        .create-credit-confirm-row.prompt strong {
            max-height: 98px;
            overflow: auto;
            padding-right: 4px;
        }
        .create-credit-confirm-note {
            margin: 0;
            color: rgba(255,255,255,.64);
            font-size: .86rem;
            line-height: 1.45;
        }
        .create-credit-confirm-actions {
            display: grid;
            grid-template-columns: 1fr 1.15fr;
            gap: 10px;
            margin-top: 2px;
        }
        .create-credit-confirm-actions button {
            min-height: 44px;
            border-radius: 12px;
            font-weight: 1000;
            cursor: pointer;
        }
        .create-credit-confirm-secondary {
            border: 1px solid rgba(255,255,255,.14);
            background: rgba(255,255,255,.06);
            color: rgba(255,255,255,.82);
        }
        .create-credit-confirm-primary {
            border: 0;
            background: linear-gradient(135deg, #ffb300, #ff7a00);
            color: #07070b;
            box-shadow: 0 12px 32px rgba(255,179,0,.24);
        }
        .owner-delete-confirm-modal .create-credit-confirm-primary {
            color: #fff;
            background: linear-gradient(135deg, #ff4f8b, #dc2626);
            box-shadow: 0 12px 32px rgba(220,38,38,.24);
        }
        .owner-delete-confirm-modal .create-credit-confirm-kicker {
            color: #ffb8cc;
            background: rgba(255,79,139,.12);
            border-color: rgba(255,79,139,.34);
        }
        @media (max-width: 520px) {
            .create-credit-confirm-shell { padding: 20px; }
            .create-credit-confirm-row,
            .create-credit-confirm-actions { grid-template-columns: 1fr; }
        }
        #vidtv-prompt-form button[type="submit"].is-reserving {
            opacity: 0.72;
            filter: saturate(0.75);
            cursor: wait;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 18px rgba(97,218,251,.18);
        }
        .character-add-choice-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .character-add-choice {
            appearance: none;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 8px;
            min-height: 118px;
            padding: 18px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 8px;
            text-align: left;
            color: #f7fbff;
            background: rgba(10,15,27,.9);
            cursor: pointer;
            font: inherit;
            box-shadow: inset 0 0 22px rgba(97,218,251,.05);
        }
        .character-add-choice:hover {
            border-color: rgba(94,230,168,.55);
            background: rgba(13,26,35,.96);
        }
        .character-add-choice strong {
            font-size: 1rem;
            font-weight: 900;
        }
        .character-add-choice span,
        .character-add-status {
            color: rgba(226,238,255,.68);
            font-size: .84rem;
            line-height: 1.35;
        }
        .character-add-status {
            min-height: 20px;
            margin-top: 12px;
        }
        .form-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }
        .media-settings-row {
            display: grid;
            grid-template-columns: minmax(185px, .85fr) minmax(185px, .85fr) minmax(240px, 1fr);
            gap: 12px;
            align-items: stretch;
            margin-top: 8px;
        }
        .media-settings-row .theme-manifest-field {
            order: 1;
        }
        .media-settings-row .source-song-picker {
            order: 3;
        }
        .media-settings-row .art-style-effect-field {
            order: 2;
        }
        .theme-manifest-field {
            display: grid;
            gap: 8px;
            margin-top: 6px;
            padding: 12px;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            border: 1px solid rgba(103,232,249,.26);
            border-radius: 8px;
            background: rgba(8,12,20,.68);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
        }
        .theme-manifest-field label {
            color: var(--text);
            font: 900 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .theme-manifest-field select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            min-height: 42px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            background: #070a12;
            color: var(--text);
            padding: 0 12px;
            font: 850 .92rem Inter, system-ui, sans-serif;
        }
        .theme-manifest-field small {
            color: var(--muted);
            font-size: .78rem;
        }
        .art-style-effect-field {
            display: grid;
            gap: 8px;
            margin-top: 6px;
            padding: 12px;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            border: 1px solid rgba(97,218,251,.26);
            border-radius: 8px;
            background:
                linear-gradient(135deg, rgba(97,218,251,.08), rgba(168,85,247,.055)),
                rgba(8,12,20,.72);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
        }
        .art-style-effect-field[hidden] {
            display: none;
        }
        .art-style-effect-field:focus-within {
            border-color: rgba(97,218,251,.64);
            box-shadow:
                0 0 0 3px rgba(97,218,251,.12),
                inset 0 1px 0 rgba(255,255,255,.065);
        }
        .art-style-effect-field label {
            color: var(--text);
            font: 900 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .art-style-effect-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) max-content;
            align-items: center;
            gap: 10px;
        }
        .art-style-effect-field select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            min-height: 42px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            background: #070a12;
            color: var(--text);
            padding: 0 12px;
            font: 850 .92rem Inter, system-ui, sans-serif;
        }
        .art-style-effect-status {
            min-width: 108px;
            color: rgba(103,232,249,.86);
            font: 900 .72rem Inter, system-ui, sans-serif;
            text-align: right;
            white-space: nowrap;
        }
        .art-style-effect-status.busy::before {
            content: "";
            display: inline-block;
            width: 10px;
            height: 10px;
            margin-right: 7px;
            border-radius: 999px;
            border: 2px solid rgba(103,232,249,.28);
            border-top-color: rgba(103,232,249,.95);
            vertical-align: -1px;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .art-style-effect-field small {
            color: var(--muted);
            font-size: .78rem;
        }
        .media-settings-row .theme-manifest-field,
        .media-settings-row .art-style-effect-field,
        .media-settings-row .source-song-picker {
            margin-top: 0;
        }
        @media (max-width: 720px) {
            .media-settings-row {
                grid-template-columns: 1fr;
            }
            .art-style-effect-grid {
                grid-template-columns: 1fr;
            }
            .art-style-effect-status {
                min-width: 0;
                text-align: left;
            }
        }
        .source-song-picker {
            display: none;
            margin-top: 12px;
            padding: 12px;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            border: 1px solid rgba(245,158,11,0.55);
            border-radius: 8px;
            background: rgba(8,12,20,.68);
            box-shadow: 0 0 0 2px rgba(245,158,11,0.22);
            transition: box-shadow 0.18s, border-color 0.18s;
        }
        .source-song-picker:focus-within {
            border-color: rgba(245,158,11,0.85);
            box-shadow: 0 0 0 3px rgba(245,158,11,0.4);
        }
        .source-song-picker.visible {
            display: grid;
            gap: 8px;
        }
        .source-song-picker label {
            color: var(--text);
            font: 900 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .source-song-picker select,
        .source-song-picker input[type="file"] {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            min-height: 42px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            background: #070a12;
            color: var(--text);
            padding: 0 12px;
            font: 850 .92rem Inter, system-ui, sans-serif;
        }
        .source-song-picker input[type="file"] {
            padding: 10px 12px;
            cursor: pointer;
        }
        .source-song-picker .song-source-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) max-content max-content;
            align-items: center;
            gap: 10px;
        }
        @media (max-width: 720px) {
            .source-song-picker .song-source-grid {
                grid-template-columns: 1fr;
            }
        }
        .source-song-picker small {
            color: var(--muted);
            font-size: .78rem;
        }
        .homepage-audio-provider {
            display: none;
            margin-top: 12px;
            padding: 12px;
            border: 1px solid rgba(97,218,251,.26);
            border-radius: 8px;
            background: rgba(8,12,20,.68);
        }
        .homepage-audio-provider.visible {
            display: grid;
            gap: 8px;
        }
        .homepage-audio-provider label {
            color: var(--text);
            font: 900 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .homepage-audio-models {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .homepage-audio-model {
            min-height: 38px;
            padding: 0 14px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,.12);
            background: rgba(255,255,255,.045);
            color: rgba(255,255,255,.78);
            font-weight: 900;
            cursor: pointer;
        }
        .homepage-audio-model.active {
            border-color: rgba(97,218,251,.62);
            background: linear-gradient(135deg, rgba(97,218,251,.18), rgba(245,158,11,.14));
            color: #fff;
            box-shadow: 0 0 0 1px rgba(97,218,251,.18), inset 0 -12px 18px -16px rgba(245,158,11,.8);
        }
        .prompt-bar-audio-links {
            display: none;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        #vidtv-prompt-form.audio-mode .prompt-bar-audio-links {
            display: inline-flex;
        }
        .prompt-bar-audio-link {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            min-height: 30px;
            padding: 0 10px;
            border-radius: 7px;
            border: 1px solid rgba(245,158,11,0.5);
            background: rgba(245,158,11,0.12);
            color: #fbbf24;
            font-weight: 800;
            font-size: .76rem;
            white-space: nowrap;
            text-decoration: none;
        }
        .prompt-bar-audio-link:hover {
            background: rgba(245,158,11,0.2);
            border-color: rgba(245,158,11,0.8);
        }
        #vidtv-prompt-form.audio-mode .prompt-bar,
        #vidtv-prompt-form.audio-mode .prompt-bar:focus-within {
            border-color: rgba(245,158,11,0.85);
            background:
                linear-gradient(90deg, rgba(245,158,11,.18), rgba(255,255,255,.03) 40%, rgba(245,158,11,.08)),
                #0a0805;
            box-shadow: 0 0 0 3px rgba(245,158,11,0.28), 0 12px 30px rgba(0,0,0,.28);
        }
        #vidtv-prompt-form.audio-mode .aspect-picker {
            display: none;
        }
        /* Keep the audio bar the same height as the music-video/prompt bar even
           though the aspect pills are hidden. */
        #vidtv-prompt-form.audio-mode .prompt-bar {
            min-height: 64px;
        }
        .character-picker {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 35;
            display: grid;
            /* Middle column is `auto` (not minmax(120px,...)) so it collapses to
               zero when the secondary-action buttons are hidden - that reclaims
               ~120px for the character row so one more tile fits before the
               expand arrow instead of sitting as dead space. */
            grid-template-columns: minmax(0, 1fr) auto auto;
            grid-template-rows: auto auto;
            align-items: center;
            gap: 14px;
            padding: 14px clamp(18px, 5vw, 72px);
            border-top: 1px solid rgba(97,218,251,.22);
            background:
                radial-gradient(circle at 78% 0%, rgba(255,79,139,.12), transparent 20rem),
                linear-gradient(180deg, rgba(12,15,25,.92), rgba(6,8,14,.98));
            box-shadow: 0 -18px 60px rgba(0,0,0,.48);
            backdrop-filter: blur(18px);
            max-height: 220px;
            transition: max-height .32s ease, padding .26s ease, border-color .22s ease, box-shadow .22s ease;
        }
        .character-picker.gallery-expanded {
            align-items: stretch;
            grid-template-rows: auto minmax(0, 1fr);
            max-height: min(82vh, 880px);
            padding-top: 18px;
            padding-bottom: 18px;
            border-top-color: rgba(97,218,251,.45);
            box-shadow: 0 -28px 90px rgba(0,0,0,.62);
        }
        .character-picker.minimized {
            left: auto;
            right: clamp(14px, 3vw, 28px);
            bottom: 14px;
            width: min(250px, calc(100vw - 28px));
            grid-template-columns: 1fr auto;
            padding: 10px 12px;
            border: 1px solid rgba(97,218,251,.25);
            border-radius: 999px;
            box-shadow: 0 18px 60px rgba(0,0,0,.5);
        }
        .character-picker.minimized .character-row,
        .character-picker.minimized .character-picker-head {
            display: none;
        }
        .character-picker-head {
            grid-column: 3;
            grid-row: 1;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            min-width: 0;
        }
        .character-picker-title {
            display: none;
        }
        .character-picker-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .text-button {
            min-height: 34px;
            padding: 0 11px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            background: rgba(255,255,255,.04);
            font: 900 .78rem Inter, system-ui, sans-serif;
            white-space: nowrap;
        }
        /* Round expand button stays in column 3 row 2 of the outer picker grid */
        .gallery-expand-button {
            justify-self: center;
            align-self: center;
            width: 40px;
            min-width: 40px;
            height: 40px;
            min-height: 40px;
            padding: 0;
            border-radius: 999px;
            color: #071018;
            background: linear-gradient(180deg, var(--accent), #5ee6a8);
            border: 1px solid transparent;
            font: 950 1rem Inter, system-ui, sans-serif;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 26px rgba(97,218,251,.22);
        }
        /* Secondary actions sit in column 2 of the outer picker grid as a
           clean vertical stack - no overlap, no grid leakage from children. */
        .character-picker-secondary-actions {
            grid-column: 2;
            grid-row: 1 / span 2;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-self: center;
            justify-content: center;
            min-width: 140px;
            max-width: 170px;
        }
        /* When both action buttons are hidden, collapse the container entirely
           so its column takes no width and the character row gains the space. */
        .character-picker-secondary-actions:not(:has(> :not([hidden]))) {
            display: none;
            min-width: 0;
        }
        .create-song-button,
        .view-character-button,
        .delete-character-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-width: 0;
            min-height: 36px;
            padding: 0 14px;
            border-radius: 8px;
            text-decoration: none;
            font: 800 .78rem Inter, system-ui, sans-serif;
            line-height: 1.1;
            text-align: center;
            white-space: nowrap;
            transition: filter .15s, border-color .15s, transform .1s;
            cursor: pointer;
        }
        .theme-song-action {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 28px;
            gap: 7px;
            align-items: center;
            width: 100%;
        }
        .theme-song-action[hidden] {
            display: none !important;
        }
        .create-song-button {
            color: #110a1f;
            background: linear-gradient(180deg, #FBBF24, #F59E0B);
            border: 1px solid transparent;
            box-shadow: 0 4px 14px rgba(245,158,11,.28);
        }
        .view-character-button {
            color: #eafcff;
            background: rgba(255,255,255,.05);
            border: 1px solid rgba(97,218,251,.28);
        }
        .delete-character-button {
            color: #ffd5e6;
            background: rgba(74,14,38,.34);
            border: 1px solid rgba(255,110,165,.42);
        }
        .theme-song-help {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            border-radius: 999px;
            border: 1px solid rgba(97,218,251,.38);
            color: #7cf7ff;
            background: rgba(7,18,31,.82);
            box-shadow: 0 8px 22px rgba(0,0,0,.28);
            font: 950 .84rem Inter, system-ui, sans-serif;
            cursor: help;
        }
        .theme-song-help:hover,
        .theme-song-help:focus-visible {
            border-color: rgba(97,218,251,.78);
            background: rgba(14,37,55,.95);
            outline: none;
        }
        .theme-song-help-tooltip {
            position: absolute;
            right: 0;
            bottom: calc(100% + 10px);
            z-index: 20;
            width: min(300px, 78vw);
            padding: 11px 12px;
            border-radius: 10px;
            border: 1px solid rgba(97,218,251,.36);
            color: rgba(255,255,255,.92);
            background: rgba(7,10,18,.96);
            box-shadow: 0 16px 38px rgba(0,0,0,.45);
            font: 700 .78rem/1.35 Inter, system-ui, sans-serif;
            text-align: left;
            pointer-events: none;
            opacity: 0;
            transform: translateY(5px);
            transition: opacity .14s ease, transform .14s ease;
        }
        .theme-song-help-tooltip::after {
            content: "";
            position: absolute;
            right: 10px;
            top: 100%;
            border: 6px solid transparent;
            border-top-color: rgba(7,10,18,.96);
        }
        .theme-song-help:hover .theme-song-help-tooltip,
        .theme-song-help:focus-visible .theme-song-help-tooltip {
            opacity: 1;
            transform: translateY(0);
        }
        .create-song-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
        .view-character-button:hover { background: rgba(97,218,251,.12); border-color: rgba(97,218,251,.5); }
        .delete-character-button:hover { background: rgba(104,20,53,.58); border-color: rgba(255,110,165,.72); }
        .create-song-button[hidden],
        .view-character-button[hidden],
        .delete-character-button[hidden] {
            display: none !important;
        }
        .create-song-button.loading {
            pointer-events: none;
            opacity: .7;
        }
        .gallery-expand-button:hover {
            filter: brightness(1.08);
        }
        .character-row {
            grid-column: 1;
            grid-row: 1 / span 2;
            display: flex;
            gap: 9px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 2px 2px 6px;
            scrollbar-width: thin;
            min-width: 0;
            /* Reserve the tile-row height so JS-injected character tiles don't
               shove the prompt form down on load (CLS fix). Overridden by
               display:none in the minimized state, so no empty gap there. */
            min-height: 172px;
            transition: max-height .32s ease;
        }
        .character-picker.gallery-expanded .character-row {
            /* Span the full panel width so the vertical scrollbar sits at the
               far-right edge (to the right of the floated arrow) instead of
               floating in the middle with dead space beside it. */
            grid-column: 1 / -1;
            grid-row: 1 / span 2;
            flex-wrap: wrap;
            align-content: flex-start;
            overflow-x: hidden;
            overflow-y: auto;
            max-height: calc(min(82vh, 880px) - 36px);
            padding-right: 8px;
        }
        /* Float the collapse arrow at the top-right, just left of the row's
           scrollbar, instead of reserving its own grid column. */
        .character-picker.gallery-expanded .character-picker-head {
            position: absolute;
            top: 14px;
            right: 18px;
            z-index: 6;
        }
        .character-tile-shell {
            position: relative;
            flex: 0 0 140px;
            width: 140px;
            min-height: 164px;
        }
        .character-tile-shell .character-tile {
            width: 100%;
            height: 100%;
            min-height: inherit;
        }
        .character-tile {
            position: relative;
            flex: 0 0 140px;
            width: 140px;
            min-height: 164px;
            display: grid;
            align-content: end;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 8px;
            padding: 8px;
            color: var(--text);
            background: #080b13;
            text-align: left;
        }
        .character-tile img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: .9;
        }
        .character-tile::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 38%, rgba(0,0,0,.78));
        }
        .character-tile span {
            position: relative;
            z-index: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: .78rem;
            font-weight: 900;
        }
        .character-tile.add {
            min-height: 164px;
            place-items: center;
            align-content: center;
            text-align: center;
            border-style: dashed;
            color: var(--accent);
            background: rgba(97,218,251,.06);
        }
        .character-tile.add::after {
            display: none;
        }
        .character-tile.add strong {
            display: block;
            font-size: 2rem;
            line-height: 1;
        }
        .character-tile.add em {
            display: block;
            margin-bottom: 7px;
            color: rgba(223,251,255,.68);
            font-style: normal;
            font-size: .68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .07em;
        }
        .character-tile.selected {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(97,218,251,.18);
        }
        .character-delete-button {
            position: absolute;
            top: 7px;
            right: 7px;
            z-index: 3;
            width: 28px;
            min-height: 28px;
            padding: 0;
            border-radius: 999px;
            border: 1px solid rgba(255,110,165,.48);
            color: #ffd5e6;
            background: rgba(18,8,16,.78);
            box-shadow: 0 8px 18px rgba(0,0,0,.34);
            font: 950 .82rem/1 Inter, system-ui, sans-serif;
            opacity: 0;
            transform: translateY(-2px);
            transition: opacity .14s ease, transform .14s ease, background .14s ease, border-color .14s ease;
        }
        .character-tile-shell:hover .character-delete-button,
        .character-delete-button:focus-visible {
            opacity: 1;
            transform: translateY(0);
        }
        .character-delete-button:hover,
        .character-delete-button:focus-visible {
            border-color: rgba(255,110,165,.88);
            background: rgba(87,17,45,.92);
            outline: none;
        }
        /* Ghost tile that appears while z-image-turbo is generating an
           auto-character for the current prompt. Glows + spins until real
           image arrives, then this node is replaced by the real tile. */
        .character-tile.pending-z-image {
            flex: 0 0 140px;
            width: 140px;
            min-height: 164px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 10px;
            text-align: center;
            border-radius: 8px;
            border: 1px solid rgba(245,158,11,0.6);
            background:
                linear-gradient(135deg, rgba(245,158,11,0.18), rgba(108,242,255,0.06)),
                #080b13;
            color: rgba(255,255,255,0.85);
            position: relative;
            overflow: hidden;
            animation: pendingZImagePulse 1.6s ease-in-out infinite;
        }
        .character-tile.pending-z-image::before {
            content: 'AUTO';
            position: absolute; top: 8px; left: 8px;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.16em;
            color: #FBBF24;
            background: rgba(0,0,0,0.6);
            padding: 2px 6px;
            border-radius: 4px;
        }
        .pending-z-image-spinner {
            width: 36px; height: 36px;
            border: 3px solid rgba(245,158,11,0.22);
            border-top-color: #FBBF24;
            border-radius: 999px;
            animation: pendingZImageSpin 0.85s linear infinite;
        }
        .pending-z-image-label {
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 1.25;
            color: rgba(255,255,255,0.9);
        }
        .pending-z-image-sub {
            font-size: 0.62rem;
            color: rgba(255,255,255,0.55);
            margin-top: -2px;
        }
        @keyframes pendingZImagePulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.5); border-color: rgba(245,158,11,0.45); }
            50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); border-color: rgba(245,158,11,1); }
        }
        @keyframes pendingZImageSpin { to { transform: rotate(360deg); } }
        .character-empty {
            flex: 0 0 280px;
            min-height: 164px;
            display: grid;
            place-items: center;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--muted);
            background: rgba(255,255,255,.025);
            font-size: .8rem;
            font-weight: 800;
            text-align: center;
            padding: 12px;
        }
        .advanced-options {
            display: grid;
            gap: 0;
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 8px;
            background: rgba(255,255,255,.025);
        }
        .advanced-options-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 12px;
        }
        .advanced-options-title {
            color: var(--text);
            font-size: .86rem;
            font-weight: 900;
        }
        .advanced-options-note {
            color: var(--muted);
            font-size: .76rem;
            font-weight: 800;
        }
        .advanced-grid {
            display: none;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            padding: 0 12px 12px;
        }
        @media (max-width: 760px) {
            .advanced-grid {
                grid-template-columns: 1fr;
            }
        }
        .advanced-options.open .advanced-grid {
            display: grid;
        }
        .advanced-field {
            display: grid;
            gap: 6px;
        }
        .advanced-field label {
            color: var(--muted);
            font-size: .72rem;
            text-transform: uppercase;
            letter-spacing: .06em;
        }
        .advanced-field select {
            width: 100%;
            min-height: 40px;
            border: 1px solid rgba(255,255,255,.13);
            border-radius: 8px;
            background: #080b13;
            color: var(--text);
            padding: 0 10px;
            font: 850 .86rem Inter, system-ui, sans-serif;
            outline: none;
        }
        .advanced-field.locked-field {
            opacity: .48;
        }
        .advanced-field.locked-field::after {
            content: "N/A for One-Shot MV";
            color: var(--muted);
            font-size: .7rem;
            font-weight: 800;
        }
        .advanced-options.locked {
            opacity: .72;
        }
        .advanced-toggle {
            min-height: 30px;
            padding: 0 10px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            background: rgba(255,255,255,.04);
            font: 900 .74rem Inter, system-ui, sans-serif;
        }
        .hint {
            color: var(--muted);
            font-size: .88rem;
        }
        button {
            min-height: 46px;
            border: 0;
            border-radius: 8px;
            padding: 0 22px;
            cursor: pointer;
            color: #071018;
            background: linear-gradient(135deg, var(--accent), #8af5d0);
            font: 900 .96rem Inter, system-ui, sans-serif;
        }
        .job-feed {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            align-items: start;
            gap: 18px;
            margin-top: 22px;
        }
        /* Uniform square media tiles (matches the category page) so every card is
           the same size and rows line up — no more masonry mosaic. Title + action
           buttons (Edit Song / Open Storyboard / Delete) stay below each tile. */
        .job-feed .job-media-card {
            aspect-ratio: 1 / 1;
            max-height: none;
        }
        .job-feed .job-video,
        .job-feed .job-media-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .job-library-tabs {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 18px;
            padding: 4px;
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 8px;
            background: rgba(5,10,20,.56);
        }
        .job-library-tabs[hidden] {
            display: none;
        }
        .job-library-tab {
            min-height: 32px;
            border: 0;
            border-radius: 6px;
            padding: 0 12px;
            background: transparent;
            color: rgba(245,247,251,.64);
            font: 850 .78rem Inter, system-ui, sans-serif;
            cursor: pointer;
            transition: background .16s ease, color .16s ease, box-shadow .16s ease;
        }
        .job-library-tab span {
            margin-left: 5px;
            color: rgba(97,218,251,.78);
            font-weight: 950;
        }
        .job-library-tab:hover {
            color: #fff;
            background: rgba(255,255,255,.06);
        }
        .job-library-tab.active {
            color: #071018;
            background: linear-gradient(135deg, #61dafb, #8af5d0);
            box-shadow: 0 0 18px rgba(97,218,251,.24);
        }
        .job-library-tab.active span {
            color: rgba(7,16,24,.72);
        }
        .job-card[hidden] {
            display: none !important;
        }
        /* Uniform grid: landscape cards no longer span 2 columns — every card is
           one column so the layout is a clean 4-up grid, not a masonry mosaic. */
        .job-card.landscape {
            grid-column: span 1;
        }
        .job-card {
            min-width: 0;
            margin: 0;
            gap: 10px;
            border: 0;
            padding: 0;
            background: transparent;
            cursor: pointer;
            transition: transform .18s ease;
        }
        .job-card > * + * {
            margin-top: 10px;
        }
        .job-card:hover {
            transform: translateY(-1px);
        }
        .job-card-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .job-title {
            margin: 0;
            font-size: .96rem;
            font-weight: 900;
        }
        .job-prompt {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: .82rem;
            line-height: 1.45;
        }
        .job-badge {
            flex-shrink: 0;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 999px;
            padding: 6px 10px;
            color: var(--accent);
            background: rgba(97,218,251,.08);
            font-size: .72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .job-card.failed .job-badge {
            border-color: rgba(255,79,139,.36);
            color: #ff9fbd;
            background: rgba(255,79,139,.09);
        }
        .job-card.completed .job-badge {
            border-color: rgba(94,230,168,.4);
            color: var(--ok);
            background: rgba(94,230,168,.09);
        }
        .progress-track {
            overflow: hidden;
            height: 8px;
            border-radius: 999px;
            background: rgba(255,255,255,.08);
        }
        .progress-fill {
            width: 0;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--accent), var(--ok));
            transition: width .25s ease;
        }
        .modal-percent-summary {
            display: grid;
            gap: 12px;
            place-items: center;
            min-height: 220px;
            padding: 22px;
            border: 1px solid rgba(97,218,251,.18);
            border-radius: 8px;
            background:
                radial-gradient(circle at 50% 44%, rgba(111,238,214,.12), transparent 8rem),
                rgba(10,13,21,.7);
            text-align: center;
        }
        .modal-percent-ring {
            width: 118px;
            height: 118px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            color: #eafaff;
            font-size: 1.65rem;
            font-weight: 950;
            background:
                radial-gradient(circle at center, rgba(8,10,17,.96) 56%, transparent 58%),
                conic-gradient(from 180deg, var(--accent) var(--progress, 0%), rgba(255,255,255,.08) 0);
            box-shadow: 0 0 34px rgba(97,218,251,.2);
        }
        .modal-percent-summary strong {
            color: #f7fbff;
            font-size: 1rem;
        }
        .modal-percent-summary span {
            display: block;
            color: var(--muted);
            margin-top: 4px;
            font-size: .92rem;
        }
        /* Stage-specific animation that shows up while scenes are rendering.
           Sits below the percent ring inside the modal body. */
        .modal-stage-gif {
            margin-top: 14px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            animation: stageGifIn 0.4s ease;
        }
        .modal-stage-gif img {
            max-width: 220px;
            width: 100%;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.08);
            box-shadow: 0 6px 24px rgba(0,0,0,0.4);
            display: block;
        }
        .modal-stage-gif-caption {
            color: rgba(255,255,255,0.55);
            font-size: 0.78rem;
            font-style: italic;
            text-align: center;
        }
        @keyframes stageGifIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .modal-actions {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 12px;
        }
        .cancel-process-button {
            border: 1px solid rgba(255,79,139,.42);
            border-radius: 8px;
            padding: 10px 14px;
            color: #ffd7e4;
            background: rgba(255,79,139,.12);
            font-weight: 900;
            cursor: pointer;
        }
        .cancel-process-button:hover {
            border-color: rgba(255,79,139,.7);
            background: rgba(255,79,139,.2);
        }
        .cancel-process-button[hidden] {
            display: none;
        }
        .job-actions {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 7px;
            align-items: center;
        }
        .job-card.landscape .job-actions,
        .job-card.landscape .job-progress-panel {
            width: 100%;
        }
        .job-media-card {
            position: relative;
            width: 100%;
            aspect-ratio: 9 / 16;
            overflow: hidden;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            background:
                radial-gradient(circle at 50% 22%, rgba(97,218,251,.12), transparent 34%),
                linear-gradient(180deg, rgba(16,19,29,.94), rgba(5,7,13,.98));
            box-shadow: 0 18px 55px rgba(0,0,0,.34);
        }
        .job-media-card::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            background:
                radial-gradient(circle at 18% 18%, rgba(97,218,251,.18), transparent 34%),
                radial-gradient(circle at 78% 72%, rgba(255,79,139,.14), transparent 30%),
                linear-gradient(180deg, transparent 24%, rgba(3,5,10,.46) 62%, rgba(3,5,10,.92));
            opacity: 0;
            transition: opacity .2s ease;
        }
        .job-media-card.has-progress::before {
            opacity: 1;
        }
        .job-media-card.landscape {
            aspect-ratio: 16 / 9;
            width: 100%;
        }
        .job-title-card {
            position: absolute;
            inset: 0;
            z-index: 2;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 14px 14px 18px;
            pointer-events: none;
        }
        .job-title-card-top {
            display: grid;
            gap: 5px;
        }
        .job-title-card-bottom {
            display: grid;
            gap: 4px;
            padding-bottom: 10px;
        }
        .job-title-copy {
            min-width: 0;
            display: grid;
            gap: 4px;
        }
        .job-title-card h3 {
            margin: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: .9rem;
            font-weight: 900;
            letter-spacing: 0;
        }
        .job-title-card p {
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            color: rgba(245,247,251,.72);
            font-size: .76rem;
            line-height: 1.35;
        }
        .job-title-status {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 48px;
            height: 48px;
            margin: -24px 0 0 -24px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            border: 0;
            color: #eafaff;
            font-size: .7rem;
            font-weight: 950;
            letter-spacing: 0;
            background:
                radial-gradient(circle at center, rgba(7,9,16,.97) 54%, transparent 57%),
                conic-gradient(from 180deg, var(--accent) var(--progress, 0%), rgba(255,255,255,.09) 0);
            box-shadow: 0 0 24px rgba(97,218,251,.18), inset 0 0 18px rgba(255,255,255,.035);
        }
        .job-title-status::after {
            content: "";
            position: absolute;
            inset: -3px;
            border-radius: inherit;
            border: 2px solid transparent;
            border-top-color: rgba(97,218,251,.95);
            border-right-color: rgba(94,230,168,.78);
            filter: drop-shadow(0 0 9px rgba(97,218,251,.36));
            animation: silky-spin 1.05s linear infinite;
        }
        .job-card.completed .job-title-status {
            color: var(--ok);
        }
        .job-card.completed .job-title-status::after {
            animation: none;
            border-color: rgba(94,230,168,.48);
        }
        .job-card.failed .job-title-status {
            color: #ff9fbd;
        }
        .job-card.failed .job-title-status::after {
            animation: none;
            border-color: rgba(255,79,139,.45);
        }
        .job-card-progress {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 4px;
            display: block;
        }
        .job-card-progress-row {
            display: none;
        }
        .job-card-progress-row span:last-child {
            color: var(--accent);
        }
        .job-card-progress .progress-track {
            height: 100%;
            border-radius: 0;
            background: rgba(255,255,255,.1);
            box-shadow: none;
        }
        .job-card-progress .progress-fill {
            position: relative;
            overflow: hidden;
            border-radius: 0;
            transition: width .6s cubic-bezier(.22,1,.36,1);
        }
        .job-card-progress .progress-fill::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
            transform: translateX(-100%);
            animation: progress-shine 1.55s ease-in-out infinite;
        }
        @keyframes progress-shine {
            to { transform: translateX(100%); }
        }
        @keyframes silky-spin {
            to { transform: rotate(360deg); }
        }
        .job-step-rail {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
        }
        .job-step-chip {
            min-width: 0;
            border: 1px solid rgba(255,255,255,.11);
            border-radius: 8px;
            padding: 7px 8px;
            background: rgba(8,11,19,.52);
            backdrop-filter: blur(10px);
        }
        .job-step-chip strong,
        .job-step-chip span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .job-step-chip strong {
            color: rgba(245,247,251,.9);
            font-size: .66rem;
            font-weight: 900;
        }
        .job-step-chip span {
            margin-top: 2px;
            color: rgba(167,173,189,.86);
            font-size: .64rem;
            font-weight: 800;
        }
        .job-step-chip.running {
            border-color: rgba(97,218,251,.34);
            background: rgba(97,218,251,.1);
        }
        .job-step-chip.done {
            border-color: rgba(94,230,168,.34);
            background: rgba(94,230,168,.1);
        }
        .job-step-chip.failed {
            border-color: rgba(255,79,139,.36);
            background: rgba(255,79,139,.1);
        }
        .job-progress-panel {
            width: min(360px, 100%);
            display: grid;
            gap: 7px;
            padding: 10px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(8,11,19,.72);
        }
        .job-media-title {
            font-size: .92rem;
            font-weight: 900;
            color: var(--text);
        }
        .job-media-message {
            color: var(--muted);
            font-size: .78rem;
            line-height: 1.35;
        }
        .job-step-summary {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .job-step-pill {
            min-height: 36px;
            display: grid;
            gap: 2px;
            align-content: center;
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 7px 9px;
            background: rgba(255,255,255,.055);
        }
        .job-step-pill strong {
            font-size: .73rem;
            font-weight: 900;
            color: var(--text);
        }
        .job-step-pill span {
            font-size: .72rem;
            font-weight: 800;
            color: var(--muted);
        }
        .job-step-pill.running {
            border-color: rgba(97,218,251,.32);
            background: rgba(97,218,251,.08);
        }
        .job-step-pill.done {
            border-color: rgba(94,230,168,.34);
            background: rgba(94,230,168,.08);
        }
        .job-step-pill.failed {
            border-color: rgba(255,79,139,.36);
            background: rgba(255,79,139,.08);
        }
        .job-actions a,
        .job-actions button {
            min-height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 8px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            background: rgba(255,255,255,.04);
            font: 900 .68rem Inter, system-ui, sans-serif;
            line-height: 1.05;
            text-align: center;
        }
        .job-actions a:hover,
        .job-actions button:hover {
            border-color: rgba(97,218,251,.36);
            background: rgba(97,218,251,.08);
        }
        .job-video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            border: 0;
            border-radius: 0;
            background: #000;
        }
        .job-video-poster {
            position: absolute;
            inset: 0;
            z-index: 1;
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            border: 0;
            pointer-events: none;
            background: #000;
        }
        .job-hover-title {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 3;
            padding: 12px 14px 28px;
            background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,0) 100%);
            color: #fff;
            font: 800 .82rem Inter, system-ui, sans-serif;
            line-height: 1.25;
            opacity: 0;
            transform: translateY(-6px);
            transition: opacity .18s ease, transform .18s ease;
            pointer-events: none;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .job-media-card:hover .job-hover-title {
            opacity: 1;
            transform: translateY(0);
        }
        .username-strip {
            margin: 18px auto 0;
            max-width: 760px;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 12px 16px;
            background: linear-gradient(135deg, rgba(183,140,255,0.10), rgba(108,242,255,0.06));
            backdrop-filter: blur(8px);
        }
        .username-strip-inner {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            align-items: center;
        }
        .username-strip-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
        .username-strip-copy strong { font-weight: 800; font-size: 0.85rem; }
        .username-strip-handle { font-weight: 900; color: #b78cff; font-size: 0.95rem; }
        .username-strip-copy small { color: rgba(255,255,255,0.55); font-size: 0.75rem; flex-basis: 100%; }
        /* ===== Welcome claim modal (first-login) ===== */
        .welcome-claim-card {
            max-width: 520px;
            padding: 32px 32px 26px;
            border-radius: 16px;
            background: linear-gradient(180deg, #14182a, #0a0c18);
            border: 1px solid rgba(255,255,255,0.08);
            box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) inset;
            position: relative;
        }
        .welcome-claim-close {
            position: absolute; top: 14px; right: 14px;
            width: 34px; height: 34px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.7);
            border-radius: 8px;
            font-size: 18px; line-height: 1;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }
        .welcome-claim-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
        .welcome-claim-eyebrow {
            display: inline-flex; align-items: center; gap: 8px;
            color: #FBBF24;
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 700;
            font-size: 0.72rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            margin-bottom: 16px;
        }
        .welcome-claim-dot {
            width: 6px; height: 6px;
            border-radius: 999px;
            background: #FBBF24;
            box-shadow: 0 0 8px #FBBF24;
            animation: welcome-pulse 1.6s ease-in-out infinite;
        }
        @keyframes welcome-pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.45; transform: scale(0.85); }
        }
        #welcome-claim-title {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 900;
            font-size: 1.7rem;
            letter-spacing: -0.02em;
            margin: 0 0 6px;
            color: #fff;
        }
        .welcome-claim-sub {
            margin: 0 0 20px;
            color: rgba(255,255,255,0.55);
            font-size: 0.92rem;
            line-height: 1.45;
        }
        .welcome-claim-preview {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 900;
            font-size: clamp(1.4rem, 4vw, 2rem);
            letter-spacing: -0.02em;
            padding: 18px 22px;
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(108,242,255,0.05));
            border: 1px solid rgba(245,158,11,0.25);
            color: #FBBF24;
            text-align: center;
            margin-bottom: 24px;
            word-break: break-all;
            line-height: 1.1;
            transition: color 0.15s, border-color 0.15s, background 0.15s;
        }
        .welcome-claim-preview.invalid {
            color: #ff8da6;
            border-color: rgba(255,141,166,0.4);
            background: rgba(255,141,166,0.06);
        }
        .welcome-claim-form {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        .welcome-claim-label {
            color: rgba(255,255,255,0.75);
            font-size: 0.82rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 8px;
        }
        .welcome-claim-inputrow {
            display: flex;
            align-items: stretch;
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 10px;
            overflow: hidden;
            transition: border-color 0.18s, box-shadow 0.18s;
        }
        .welcome-claim-inputrow:focus-within {
            border-color: rgba(245,158,11,0.7);
            box-shadow: 0 0 0 3px rgba(245,158,11,0.18);
        }
        .welcome-claim-inputrow.ok {
            border-color: rgba(74,222,128,0.7);
            box-shadow: 0 0 0 3px rgba(74,222,128,0.18);
        }
        .welcome-claim-inputrow.err {
            border-color: rgba(255,141,166,0.7);
            box-shadow: 0 0 0 3px rgba(255,141,166,0.18);
        }
        .welcome-claim-prefix {
            display: flex; align-items: center;
            padding: 0 14px;
            color: rgba(255,255,255,0.55);
            font-weight: 700;
            font-size: 0.98rem;
            background: rgba(255,255,255,0.03);
            border-right: 1px solid rgba(255,255,255,0.06);
        }
        #welcome-claim-input {
            flex: 1; min-width: 0;
            background: transparent;
            border: 0; outline: none;
            color: #fff;
            font: 700 1.05rem Inter, system-ui, sans-serif;
            padding: 14px 16px;
            text-transform: lowercase;
            caret-color: #FBBF24;
        }
        #welcome-claim-input::placeholder { color: rgba(255,255,255,0.3); font-style: italic; font-weight: 500; }
        .welcome-claim-hint {
            display: block;
            margin: 8px 2px 0;
            color: rgba(255,255,255,0.42);
            font-size: 0.76rem;
        }
        .welcome-claim-msg {
            min-height: 18px;
            margin-top: 10px;
            font-size: 0.82rem;
            color: rgba(255,255,255,0.6);
        }
        .welcome-claim-msg.err { color: #ff8da6; }
        .welcome-claim-msg.ok { color: #4ade80; }
        .welcome-claim-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-top: 18px;
        }
        .welcome-claim-skip {
            background: transparent;
            color: rgba(255,255,255,0.55);
            border: 0;
            padding: 8px 4px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
        }
        .welcome-claim-skip:hover { color: rgba(255,255,255,0.85); }
        .welcome-claim-submit {
            background: linear-gradient(180deg, #FBBF24, #F59E0B);
            color: #110a1f;
            border: 0;
            padding: 12px 22px;
            border-radius: 10px;
            font-weight: 800;
            font-size: 0.92rem;
            cursor: pointer;
            box-shadow: 0 0 24px rgba(245,158,11,0.45);
            transition: transform 0.1s, box-shadow 0.18s;
        }
        .welcome-claim-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 28px rgba(245,158,11,0.55); }
        .welcome-claim-submit:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
        @media (max-width: 520px) {
            .welcome-claim-card { padding: 24px 22px 22px; max-width: calc(100% - 24px); }
            #welcome-claim-title { font-size: 1.4rem; }
            .welcome-claim-actions { flex-direction: column-reverse; align-items: stretch; }
            .welcome-claim-skip { text-align: center; padding: 12px 4px; }
        }
        .username-strip-form { display: flex; align-items: center; gap: 6px; }
        .username-strip-prefix { color: rgba(255,255,255,0.55); font-size: 0.82rem; font-weight: 600; }
        .username-strip-form input {
            background: rgba(0,0,0,0.35); color: #fff; border: 1px solid rgba(255,255,255,0.10);
            border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 600; width: 140px;
        }
        .username-strip-form input:focus { outline: none; border-color: #b78cff; box-shadow: 0 0 0 2px rgba(183,140,255,0.25); }
        .username-strip-form input.ok { border-color: #4ade80; }
        .username-strip-form input.err { border-color: #ff6b8a; }
        .username-strip-form button {
            background: #b78cff; color: #110a1f; border: 0; padding: 8px 14px;
            border-radius: 8px; font-weight: 800; cursor: pointer; font-size: 0.85rem;
        }
        .username-strip-form button:disabled { opacity: 0.45; cursor: not-allowed; }
        .username-strip-link { font-weight: 700; font-size: 0.85rem; color: #6cf2ff; }
        .username-strip-msg { grid-column: 1 / -1; font-size: 0.78rem; color: rgba(255,255,255,0.6); min-height: 14px; }
        .username-strip-msg.err { color: #ff8da6; }
        .username-strip-msg.ok { color: #4ade80; }
        @media (max-width: 640px) {
            .username-strip-inner { grid-template-columns: 1fr; }
            .username-strip-form { width: 100%; }
            .username-strip-form input { flex: 1; width: auto; }
        }
        .live-channels {
            margin: 36px auto 0;
            max-width: 1100px;
            padding: 0 12px;
        }
        .live-channels[hidden] { display: none; }
        .live-channels-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 14px;
            margin-top: 16px;
        }
        .live-channel-card {
            display: block;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 12px;
            text-decoration: none;
            color: inherit;
            transition: border-color .2s, transform .2s;
        }
        .live-channel-card:hover { border-color: rgba(183,140,255,0.5); transform: translateY(-2px); }
        .live-channel-card .row { display: flex; align-items: center; gap: 10px; }
        .live-channel-card .avatar {
            width: 40px; height: 40px; border-radius: 999px; background: #2a2440;
            overflow: hidden; flex: 0 0 auto;
        }
        .live-channel-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
        .live-channel-card .handle { font-weight: 800; font-size: 0.9rem; }
        .live-channel-card .meta { color: rgba(255,255,255,0.55); font-size: 0.72rem; margin-top: 2px; }
        .live-channel-card .badge {
            display: inline-flex; align-items: center; gap: 4px;
            font-size: 0.62rem; font-weight: 900; letter-spacing: 0.06em;
            text-transform: uppercase; color: #fff;
            background: #ff4f6f; padding: 2px 7px; border-radius: 6px;
            margin-left: auto;
        }
        .live-channel-card .badge::before {
            content: ''; width: 5px; height: 5px; border-radius: 999px; background: #fff;
            animation: live-pulse 1.4s ease-in-out infinite;
        }
        @keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
        .public-showcase {
            display: none;
            margin-top: 34px;
            padding-top: 26px;
            border-top: 1px solid var(--line);
        }
        .public-showcase.visible {
            display: block;
        }
        .public-showcase-head {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 14px;
        }
        .public-showcase-copy {
            display: grid;
            gap: 5px;
        }
        .public-showcase-kicker {
            color: var(--accent);
            font-size: .76rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }
        .public-showcase h2 {
            margin: 0;
            color: var(--text);
            font-size: clamp(1.2rem, 2.2vw, 1.7rem);
            font-weight: 900;
            letter-spacing: 0;
        }
        .public-showcase p {
            margin: 0;
            max-width: 620px;
            color: var(--muted);
            font-size: .9rem;
            line-height: 1.45;
        }
        .public-showcase-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 16px;
        }
        .public-showcase-tab {
            min-height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 15px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 999px;
            background: rgba(255,255,255,0.045);
            color: rgba(245,247,251,0.64);
            font: 900 .78rem Inter, system-ui, sans-serif;
            cursor: pointer;
            transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
        }
        .public-showcase-tab:hover {
            color: var(--text);
            border-color: rgba(97,218,251,.32);
            background: rgba(97,218,251,.08);
        }
        .public-showcase-tab.active {
            color: #10131d;
            border-color: rgba(97,218,251,.75);
            background: linear-gradient(135deg, var(--accent), #67e8f9);
            box-shadow: 0 12px 28px rgba(97,218,251,.18);
        }
        .public-showcase-empty {
            grid-column: 1 / -1;
            min-height: 130px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px dashed rgba(255,255,255,0.14);
            border-radius: 14px;
            color: rgba(245,247,251,0.58);
            font-weight: 850;
            text-align: center;
            padding: 24px;
            background: rgba(255,255,255,0.025);
        }
        .public-showcase-link {
            flex-shrink: 0;
            min-height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 13px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            color: var(--text);
            background: rgba(97,218,251,.07);
            font-size: .78rem;
            font-weight: 900;
        }
        .public-showcase-loadmore-row {
            display: flex;
            justify-content: center;
            margin-top: 22px;
        }
        .public-showcase-loadmore-row[hidden] { display: none; }
        .public-showcase-loadmore {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 44px;
            padding: 0 28px;
            border-radius: 10px;
            border: 1px solid rgba(245,158,11,0.45);
            background: linear-gradient(180deg, rgba(245,158,11,0.18), rgba(245,158,11,0.06));
            color: #FBBF24;
            font-weight: 800;
            font-size: 0.9rem;
            cursor: pointer;
            transition: background 0.18s, border-color 0.18s, transform 0.1s;
        }
        .public-showcase-loadmore:hover {
            background: linear-gradient(180deg, rgba(245,158,11,0.28), rgba(245,158,11,0.1));
            border-color: rgba(245,158,11,0.75);
            transform: translateY(-1px);
        }
        .public-showcase-loadmore:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        /* Uniform 4-column grid (matches the category page). Every card is the
           same 1:1 tile regardless of source aspect — the media fills it via
           object-fit: cover — so 9:16 and 16:9 both look consistent and more
           cards fit per row. */
        .public-showcase-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            align-items: start;
            gap: 18px;
        }
        .public-showcase-grid .public-video-card,
        .public-showcase-grid .public-video-card.landscape {
            grid-row: span 1;
            grid-column: span 1;
        }
        .homepage-audio-gallery {
            display: block;
            max-width: 1100px;
            margin: 42px auto 0;
            padding: 26px 12px 6px;
            border-top: 1px solid var(--line);
        }
        .homepage-audio-gallery[hidden] {
            display: none;
        }
        .homepage-audio-gallery-head {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 16px;
        }
        .homepage-audio-gallery-kicker {
            color: var(--accent-amber-bright);
            font-size: .76rem;
            font-weight: 950;
            letter-spacing: .16em;
            text-transform: uppercase;
        }
        .homepage-audio-gallery h2 {
            margin: 5px 0 0;
            color: var(--text);
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-size: clamp(1.25rem, 2.2vw, 1.85rem);
            line-height: 1.05;
            font-weight: 950;
            letter-spacing: 0;
        }
        .homepage-audio-gallery p {
            max-width: 520px;
            margin: 0;
            color: var(--muted);
            font-size: .88rem;
            line-height: 1.45;
        }
        .homepage-audio-gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
        }
        .homepage-audio-column {
            min-width: 0;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            background:
                linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
                rgba(8,11,19,0.76);
            box-shadow: 0 18px 42px rgba(0,0,0,0.24);
        }
        .homepage-audio-column-head {
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 58px;
            padding: 0 14px;
            border-bottom: 1px solid rgba(255,255,255,0.065);
        }
        .homepage-audio-provider-mark {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            flex: 0 0 34px;
            border-radius: 8px;
            color: #071018;
            background: linear-gradient(135deg, #7cf7ff, #FBBF24);
            font-size: .68rem;
            font-weight: 1000;
            letter-spacing: .02em;
        }
        .homepage-audio-column-title {
            display: grid;
            gap: 2px;
            min-width: 0;
        }
        .homepage-audio-column-title strong {
            color: var(--text);
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-size: .98rem;
            font-weight: 950;
        }
        .homepage-audio-column-title span {
            color: rgba(245,247,251,0.46);
            font-size: .72rem;
            font-weight: 800;
        }
        .homepage-audio-list {
            display: grid;
            gap: 0;
            max-height: 520px;
            overflow: auto;
            padding: 8px 10px 10px;
            scrollbar-width: thin;
            scrollbar-color: rgba(97,218,251,0.35) transparent;
        }
        .homepage-audio-card {
            display: grid;
            grid-template-columns: 48px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            min-height: 68px;
            padding: 8px 4px;
            border-bottom: 1px solid rgba(255,255,255,0.045);
        }
        .homepage-audio-card:last-child {
            border-bottom: 0;
        }
        .homepage-audio-cover,
        .homepage-audio-cover-fallback {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            object-fit: cover;
            background: rgba(97,218,251,0.12);
        }
        .homepage-audio-cover-fallback {
            display: none;
            align-items: center;
            justify-content: center;
            color: #7cf7ff;
            font-size: .66rem;
            font-weight: 1000;
        }
        .homepage-audio-card.no-cover .homepage-audio-cover {
            display: none;
        }
        .homepage-audio-card.no-cover .homepage-audio-cover-fallback {
            display: flex;
        }
        .homepage-audio-meta {
            min-width: 0;
            display: grid;
            gap: 3px;
        }
        .homepage-audio-title {
            overflow: hidden;
            color: var(--text);
            text-overflow: ellipsis;
            white-space: nowrap;
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-size: .86rem;
            font-weight: 900;
            text-decoration: none;
            transition: color .16s ease, text-shadow .16s ease;
        }
        .homepage-audio-title:hover,
        .homepage-audio-title:focus-visible {
            color: #7cf7ff;
            text-shadow: 0 0 14px rgba(124,247,255,0.34);
            outline: none;
        }
        .homepage-audio-sub {
            overflow: hidden;
            color: rgba(245,247,251,0.48);
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: .72rem;
            font-weight: 750;
        }
        .homepage-audio-empty {
            padding: 22px 10px;
            color: rgba(245,247,251,0.46);
            font-size: .82rem;
            font-weight: 800;
        }
        @media (max-width: 980px) {
            .homepage-audio-gallery-head {
                align-items: flex-start;
                flex-direction: column;
            }
            .homepage-audio-gallery-grid {
                grid-template-columns: 1fr;
            }
            .homepage-audio-list {
                max-height: none;
            }
        }
        @media (max-width: 560px) {
            .homepage-audio-card {
                grid-template-columns: 44px minmax(0, 1fr);
            }
        }
        .public-video-card {
            min-width: 0;
            display: grid;
            gap: 9px;
            border: 0;
            padding: 0;
            background: transparent;
            color: var(--text);
            cursor: pointer;
            text-align: left;
        }
        /* Uniform square tile; media (portrait or landscape) fills it. */
        .public-video-card .job-media-card {
            aspect-ratio: 1 / 1;
            max-height: none;
            overflow: hidden;
            box-shadow: 0 18px 45px rgba(0,0,0,.28);
        }
        .public-video-card .job-video,
        .public-video-card .job-media-card img,
        .public-video-card.landscape .job-media-card {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .public-video-card.landscape .job-media-card {
            aspect-ratio: 1 / 1;
            max-height: none;
        }
        .public-video-card-title {
            min-width: 0;
            display: grid;
            gap: 3px;
        }
        .public-video-card-title strong,
        .public-video-card-title span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .public-video-card-title strong {
            font-size: .86rem;
            font-weight: 900;
        }
        .public-video-card-title span {
            color: var(--muted);
            font-size: .72rem;
            font-weight: 800;
        }
        .modal-backdrop {
            position: fixed;
            inset: 0;
            z-index: 40;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(3,5,10,.74);
            backdrop-filter: blur(18px);
        }
        .modal-backdrop.visible {
            display: flex;
        }
        .status-modal {
            width: min(560px, 100%);
            border: 1px solid rgba(97,218,251,.22);
            border-radius: 8px;
            background: rgba(10,13,22,.97);
            box-shadow: 0 28px 100px rgba(0,0,0,.5);
        }
        .gallery-modal-card {
            width: min(860px, 100%);
        }
        .video-modal-card {
            width: min(920px, 96vw);
        }
        .video-modal-card.portrait {
            width: min(430px, calc(100vw - 32px));
        }
        .video-modal-card.landscape {
            width: min(920px, 96vw);
        }
        .video-modal-body {
            gap: 12px;
        }
        .video-player-wrap {
            width: 100%;
            display: grid;
            place-items: center;
            overflow: hidden;
            border: 1px solid rgba(97,218,251,.22);
            border-radius: 8px;
            background: #000;
        }
        .video-player-wrap.portrait {
            width: min(100%, 390px);
            aspect-ratio: 9 / 16;
            max-height: min(78vh, 760px);
            margin: 0 auto;
        }
        .video-player-wrap.landscape {
            aspect-ratio: 16 / 9;
        }
        .video-player {
            width: 100%;
            height: 100%;
            max-height: min(78vh, 760px);
            display: block;
            object-fit: contain;
            background: #000;
        }
        .video-player-wrap.portrait .video-player {
            width: 100%;
            max-width: none;
            aspect-ratio: auto;
            object-fit: cover;
        }
        .video-source-frame {
            width: min(100%, 390px);
            margin: 0 auto;
            padding: 10px;
            border: 1px solid rgba(97,218,251,.18);
            border-radius: 8px;
            background: rgba(255,255,255,.035);
        }
        .video-source-frame[hidden] {
            display: none;
        }
        .video-source-label {
            margin: 0 0 8px;
            color: var(--muted);
            font: 800 .72rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .video-source-frame img {
            width: 100%;
            max-height: 220px;
            display: block;
            object-fit: contain;
            border-radius: 6px;
            background: #000;
        }
        .video-modal-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .video-modal-actions a {
            min-height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 13px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            background: rgba(255,255,255,.04);
            font-size: .82rem;
            font-weight: 900;
        }
        .modal-head {
            display: flex;
            justify-content: space-between;
            gap: 14px;
            padding: 18px 18px 12px;
            border-bottom: 1px solid var(--line);
        }
        .modal-head h2 {
            margin: 0;
            font-size: 1.05rem;
        }
        .modal-head p {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: .84rem;
            line-height: 1.45;
        }
        .modal-close {
            width: 36px;
            min-height: 36px;
            padding: 0;
            color: var(--text);
            background: rgba(255,255,255,.05);
        }
        .modal-body {
            display: grid;
            gap: 14px;
            padding: 18px;
        }
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
            gap: 10px;
            max-height: min(62vh, 620px);
            overflow: auto;
            padding-right: 4px;
        }
        .gallery-grid .character-tile-shell {
            width: 100%;
            min-height: 154px;
        }
        .gallery-grid .character-tile {
            flex-basis: auto;
            width: 100%;
        }
        .step-list {
            display: grid;
            gap: 10px;
        }
        .step-item {
            display: grid;
            grid-template-columns: 28px 1fr;
            gap: 10px;
            align-items: start;
            padding: 10px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(255,255,255,.03);
        }
        .step-dot {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            color: var(--muted);
            background: rgba(255,255,255,.06);
            font-size: .72rem;
            font-weight: 900;
        }
        .step-item.running .step-dot {
            color: #071018;
            background: var(--accent);
        }
        .step-item.done .step-dot {
            color: #071018;
            background: var(--ok);
        }
        .step-item.failed .step-dot {
            color: #fff;
            background: var(--accent-2);
        }
        .step-label {
            font-weight: 900;
            font-size: .9rem;
        }
        .step-detail {
            margin-top: 3px;
            color: var(--muted);
            font-size: .8rem;
            line-height: 1.4;
        }
        .step-count {
            margin-top: 4px;
            color: var(--accent);
            font-size: .72rem;
            font-weight: 900;
        }
        .toast {
            position: fixed;
            right: 18px;
            bottom: 18px;
            max-width: 360px;
            padding: 14px 16px;
            border: 1px solid rgba(94,230,168,.45);
            border-radius: 8px;
            background: rgba(7, 16, 18, .94);
            color: var(--text);
            box-shadow: 0 18px 50px rgba(0,0,0,.36);
            transform: translateY(18px);
            opacity: 0;
            pointer-events: none;
            transition: opacity .18s ease, transform .18s ease;
        }
        .toast.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .toast strong {
            display: block;
            margin-bottom: 4px;
            color: var(--ok);
        }
        @media (max-width: 980px) {
            .job-feed {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            /* 2 columns on tablet (matches category page). */
            .public-showcase-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        @media (max-width: 760px) {
            .job-feed {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            /* 2 columns down to small tablets/large phones. */
            .public-showcase-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .public-showcase-grid .public-video-card:not(.landscape),
            .public-showcase-grid .public-video-card.landscape {
                grid-row: span 1;
            }
        }
        @media (max-width: 640px) {
            body {
                padding-bottom: 0;
            }
            .topbar {
                height: auto;
                padding-top: 14px;
                padding-bottom: 14px;
                align-items: flex-start;
                gap: 12px;
            }
            .nav-actions {
                flex-wrap: wrap;
                justify-content: flex-end;
            }
            .nav-actions a,
            .nav-actions button {
                height: 36px;
                padding: 0 12px;
                width: auto;
            }
            .account-pill {
                width: 100%;
                justify-content: flex-start;
            }
            .account-name {
                max-width: 220px;
            }
            .job-card-header {
                display: grid;
            }
            .job-feed {
                grid-template-columns: minmax(0, 1fr);
            }
            /* On mobile single-column the span:2 would push landscape off
               the grid - force back to 1 column. */
            .job-card.landscape {
                grid-column: span 1;
            }
            .public-showcase-head {
                display: grid;
                align-items: start;
            }
            .public-showcase-grid {
                grid-template-columns: 1fr;
            }
            .job-actions {
                grid-template-columns: 1fr;
            }
            main {
                align-items: start;
                padding-top: 58px;
            }
            .form-row {
                align-items: stretch;
            }
            .credit-estimate {
                min-width: 112px;
            }
            .character-picker-head {
                align-items: center;
                justify-content: flex-end;
            }
            .character-picker {
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-rows: auto auto;
                gap: 8px;
                padding: 10px 14px;
            }
            .character-picker.minimized {
                left: auto;
                right: 10px;
                bottom: 10px;
                width: min(230px, calc(100vw - 20px));
                grid-template-columns: 1fr auto;
                padding: 9px 10px;
                border-radius: 999px;
            }
            .character-picker-head {
                grid-column: 2;
                grid-row: 1;
            }
            .character-picker.minimized .character-picker-head {
                display: none;
            }
            .character-toggle-button {
                grid-column: 2;
                grid-row: 2;
            }
            .character-picker button {
                width: auto;
            }
            .character-row {
                grid-column: 1;
                grid-row: 1 / span 2;
                min-width: 0;
            }
            .character-tile {
                flex-basis: 118px;
                width: 118px;
                min-height: 140px;
            }
            .character-tile-shell {
                flex-basis: 118px;
                width: 118px;
                min-height: 140px;
            }
            .character-tile.add {
                min-height: 140px;
            }
            .character-row {
                display: flex;
            }
            .character-empty {
                flex-basis: 220px;
                min-height: 140px;
            }
            button {
                width: 100%;
            }
            .nav-actions button {
                width: auto;
            }
        }
        /* Constrain the song-modal iframe to the stage area and kill the
           internal scroll bar that appears when /song/<uuid> is loaded
           inside the modal phone. */
        .home-song-modal-stage,
        .home-song-modal-phone {
            overflow: hidden !important;
        }
        .home-song-modal-phone iframe[data-home-song-frame] {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            border: 0;
            background: #000;
            overflow: hidden;
        }

        /* ===== Advanced (mini link) ===== */
        .advanced-anchor {
            position: relative;
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
        }
        .advanced-options.advanced-mini {
            position: relative;
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
            margin: 0 !important;
            text-align: center;
        }
        .advanced-options.advanced-mini.open {
            z-index: 100002;
            opacity: 1;
        }
        .advanced-mini-toggle {
            background: transparent;
            border: 0;
            padding: 6px 10px;
            color: rgba(255,255,255,0.55);
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            border-radius: 6px;
            transition: color 0.18s, background 0.18s;
        }
        .advanced-mini-toggle:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.04); }
        .advanced-mini-chevron { transition: transform 0.2s; display: inline-block; font-size: 0.7rem; }
        .advanced-options.advanced-mini.open .advanced-mini-chevron { transform: rotate(180deg); }
        .advanced-mini-hidden { display: none; }
        .advanced-options.advanced-mini .advanced-grid {
            position: fixed;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            z-index: 100002;
            width: min(680px, calc(100vw - 32px));
            max-height: min(82vh, 600px);
            overflow: auto;
            margin: 0;
            padding: 20px;
            background: #0b0e16;
            border: 1px solid rgba(255,255,255,0.16);
            border-radius: 14px;
            text-align: left;
            box-shadow: 0 30px 90px rgba(0,0,0,.7), 0 0 0 1px rgba(103,232,249,0.08) inset;
        }
        .advanced-popover-backdrop {
            position: fixed;
            inset: 0;
            z-index: 100001;
            background: rgba(0,0,0,0.34);
            backdrop-filter: blur(3px);
            -webkit-backdrop-filter: blur(3px);
        }
        @media (max-width: 760px) {
            .advanced-anchor {
                order: 3;
                width: 100%;
                justify-content: flex-start;
            }
            .advanced-options.advanced-mini .advanced-grid {
                left: 50%;
                right: auto;
                top: 50%;
                transform: translate(-50%, -50%);
                width: calc(100vw - 24px);
                grid-template-columns: 1fr;
            }
        }
        /* ===== Aspect ratio pill selector ===== */
        /* Make the prompt input bar a flex row so the picker floats right */
        .prompt-bar {
            display: flex !important;
            align-items: center;
            gap: 10px;
        }
        .prompt-bar .prompt-input {
            flex: 1 1 auto;
            min-width: 0;
        }
        .prompt-bar-aspect {
            flex: 0 0 auto;
            margin-right: 4px;
        }
        .aspect-picker {
            display: inline-flex;
            gap: 4px;
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 3px;
        }
        .aspect-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            border: 0;
            background: transparent;
            color: rgba(255,255,255,0.55);
            font-weight: 700;
            font-size: 0.74rem;
            letter-spacing: 0.04em;
            border-radius: 7px;
            cursor: pointer;
            transition: background 0.18s, color 0.18s;
        }
        .aspect-pill:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.04); }
        .aspect-pill.active {
            background: linear-gradient(180deg, rgba(245,158,11,0.18), rgba(245,158,11,0.08));
            color: #FBBF24;
            box-shadow: inset 0 0 0 1px rgba(245,158,11,0.45);
        }
        .aspect-shape {
            display: inline-block;
            border: 1.5px solid currentColor;
            border-radius: 2px;
            opacity: 0.85;
        }
        .aspect-shape.vertical {
            width: 9px;
            height: 14px;
        }
        .aspect-shape.horizontal {
            width: 16px;
            height: 9px;
        }
        .aspect-label {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 700;
        }
        /* Hide the old aspect-ratio field in Advanced since the pill picker
           replaces it. Keep the <select> in the DOM so existing JS can still
           read its .value. */
        .advanced-field:has(#aspect-ratio) { display: none; }
        #aspect-ratio { display: none; }

        /* ===== Mode tabs (Prompt | Music video) ===== */
        .mode-tabs {
            display: inline-flex;
            gap: 10px;
            background: transparent;
            border: 0;
            border-radius: 0;
            padding: 0;
            margin-bottom: 14px;
        }
        .mode-tab {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.04);
            color: rgba(255,255,255,0.6);
            font-weight: 700;
            font-size: 0.88rem;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
        }
        .mode-tab:hover {
            color: rgba(255,255,255,0.95);
            border-color: rgba(255,255,255,0.25);
            background: rgba(255,255,255,0.07);
        }
        .mode-tab.active {
            background: linear-gradient(180deg, #FBBF24, #F59E0B);
            color: #110a1f;
            border-color: transparent;
            box-shadow: 0 0 22px rgba(245,158,11,0.45);
        }
        .mode-tab.locked {
            opacity: 0.5;
            border-color: rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            box-shadow: none;
        }
        .mode-tab.locked::after {
            content: 'Paid';
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 18px;
            padding: 0 6px;
            border-radius: 999px;
            color: #110a1f;
            background: rgba(251,191,36,0.9);
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .mode-tab .mode-tab-icon { font-size: 1rem; opacity: 0.85; }
        .mode-tab.active .mode-tab-icon { opacity: 1; }
        .mode-tab-badge {
            position: absolute;
            top: -12px;
            right: -8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 18px;
            padding: 0 7px;
            border: 1px solid rgba(97,218,251,.55);
            border-radius: 999px;
            color: #071018;
            background: linear-gradient(180deg, #7cf7ff, #61dafb);
            box-shadow: 0 0 16px rgba(97,218,251,.42);
            font-size: .62rem;
            font-weight: 950;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: .04em;
            pointer-events: none;
        }

        /* ===== Audio upload row ===== */
        .audio-upload-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 0;
            flex-wrap: wrap;
        }
        .audio-upload-or {
            color: rgba(255,255,255,0.45);
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }
        .audio-upload-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 42px;
            padding: 7px 14px;
            border: 1px dashed rgba(245,158,11,0.45);
            border-radius: 8px;
            cursor: pointer;
            color: #FBBF24;
            font-weight: 700;
            font-size: 0.82rem;
            background: rgba(245,158,11,0.05);
            transition: background 0.18s, border-color 0.18s;
        }
        .audio-upload-btn:hover { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.7); }
        .audio-upload-icon { font-size: 0.95rem; }
        .audio-preview-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 42px;
            padding: 7px 14px;
            border: 1px solid rgba(97,218,251,0.35);
            border-radius: 8px;
            cursor: pointer;
            color: #7cf7ff;
            font-weight: 800;
            font-size: 0.82rem;
            background: rgba(97,218,251,0.08);
            transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
            white-space: nowrap;
        }
        .audio-preview-btn:hover:not(:disabled) {
            background: rgba(97,218,251,0.14);
            border-color: rgba(97,218,251,0.62);
            box-shadow: 0 0 16px rgba(97,218,251,0.18);
        }
        .audio-preview-btn.playing {
            color: #110a1f;
            border-color: transparent;
            background: linear-gradient(180deg, #7cf7ff, #37d7f2);
            box-shadow: 0 0 18px rgba(97,218,251,0.36);
        }
        .audio-preview-btn:disabled {
            cursor: not-allowed;
            opacity: 0.45;
            box-shadow: none;
        }
        .audio-upload-clear {
            background: rgba(255,79,139,0.12);
            color: #ff9fbd;
            border: 1px solid rgba(255,79,139,0.42);
            border-radius: 8px;
            padding: 5px 10px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
        }

        /* When a mode button controls the LLM, dim the advanced selector so
           users see it's been auto-set. */
        #llm-provider.mode-locked {
            opacity: 0.45;
            pointer-events: none;
            transition: opacity 0.25s;
        }
        /* Video model is mode-locked but still browseable - user can pull down
           to view all options. The current pick stays bright white, the rest
           shade. We DON'T dim the whole <select> with opacity (that would also
           fade the active label); instead we shade only the disabled <option>s. */
        #video-model.mode-locked {
            cursor: not-allowed;
            color: #fff;
        }
        #video-model.mode-locked option {
            color: #fff;
            background: #050812;
        }
        #video-model.mode-locked option:disabled {
            color: rgba(255,255,255,0.3);
        }

        /* ===== Broadcast theme (z.ai-inspired hero) ===== */
        :root {
            --accent-amber: #F59E0B;
            --accent-amber-bright: #FBBF24;
            --accent-cyan: #06B6D4;
            --live-red: #EF4444;
        }
        body::before {
            content: '';
            position: fixed; inset: 0;
            pointer-events: none; z-index: 1;
            background:
                radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245,158,11,0.10), transparent 60%),
                radial-gradient(ellipse 60% 40% at 90% 30%, rgba(6,182,212,0.07), transparent 70%);
        }
        body::after {
            content: '';
            position: fixed; inset: 0;
            pointer-events: none; z-index: 2;
            background: repeating-linear-gradient(
                0deg,
                rgba(255,255,255,0.025) 0px,
                rgba(255,255,255,0.025) 1px,
                transparent 1px,
                transparent 3px
            );
            mix-blend-mode: overlay;
            opacity: 0.55;
        }
        main, nav, .shell { position: relative; z-index: 3; }
        .broadcast-hero {
            position: relative;
            padding-top: 0;
        }

        /* Homepage footer (with bottom padding so the GP bar doesn't cover it) */
        .hero-footer {
            max-width: 1100px;
            margin: 56px auto 0;
            padding: 24px 12px 40px;
            border-top: 1px solid rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.5);
            font-size: 0.82rem;
            text-align: center;
            position: relative;
            z-index: 4;
        }
        .hero-footer-row {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 18px;
            margin-bottom: 14px;
        }
        .hero-footer-row a {
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-weight: 600;
        }
        .hero-footer-row a:hover { color: #fff; }
        .hero-footer-bottom {
            color: rgba(255,255,255,0.35);
            font-size: 0.78rem;
        }

        /* Small credits note under the hero claim row */
        .hero-credits-note {
            margin: 4px 0 18px;
            font-size: 0.82rem;
            color: rgba(255,255,255,0.5);
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }
        .hero-credits-note strong { color: rgba(255,255,255,0.9); font-weight: 700; }
        .hero-credits-note a {
            color: #6cf2ff;
            font-weight: 700;
            text-decoration: none;
        }
        .hero-credits-note a:hover { text-decoration: underline; }

        /* Page bottom padding so the GP bar doesn't cover the last content */
        /* Bottom padding accounts for both the fixed character picker (~240px)
           and the GP audio bar (~80px) so the footer scrolls fully into view
           instead of getting trapped underneath. */
        body { padding-bottom: var(--character-picker-clearance); }
        /* When the character picker is minimized (collapsed pill), we don't
           need nearly as much room - just enough for the GP bar. */
        body:has(.character-picker.minimized) { padding-bottom: var(--character-picker-minimized-clearance); }
        body:has(.character-picker.gallery-expanded) { padding-bottom: var(--character-picker-expanded-clearance); }

        /* Compact hero - the URL IS the headline. Type your handle directly. */
        .hero-claim {
            display: flex;
            align-items: baseline;
            flex-wrap: nowrap;
            gap: 0;
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 900;
            letter-spacing: -0.025em;
            line-height: 1.05;
            font-size: clamp(1.7rem, 5.6vw, 4.2rem);
            margin: 0 0 10px;
            white-space: nowrap;
            max-width: 100%;
            overflow: hidden;
        }
        .hero-claim-prefix {
            background: linear-gradient(180deg, #FBBF24, #F59E0B);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 32px rgba(245,158,11,0.35);
            display: inline-block;
        }
        .hero-claim-input {
            background: transparent;
            border: 0;
            border-bottom: 3px dashed rgba(255,255,255,0.25);
            color: #fff;
            font: inherit;
            padding: 0 4px 4px;
            margin: 0;
            outline: none;
            width: 13ch;
            min-width: 13ch;
            max-width: 100%;
            flex: 0 1 auto;
            transition: border-color 0.18s, width 0.18s, color 0.18s;
            text-transform: lowercase;
        }
        .hero-claim-input.typing {
            color: rgba(255,255,255,0.55);
            font-style: italic;
            caret-color: transparent;
        }
        .hero-claim-input.typing.real {
            color: rgba(108,242,255,0.92);
            font-style: normal;
        }
        .hero-claim-input:focus {
            border-bottom-color: rgba(245,158,11,0.85);
        }
        .hero-claim-input.ok {
            border-bottom-color: #4ade80;
            color: #4ade80;
        }
        .hero-claim-input.err {
            border-bottom-color: #ff6b8a;
            color: #ff8da6;
        }
        .hero-claim-input::placeholder {
            color: rgba(255,255,255,0.35);
            font-style: italic;
        }
        .hero-claim-status {
            display: inline-block;
            margin-left: 14px;
            font-size: 0.42em; /* relative to the hero font-size for proper scaling */
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            line-height: 1;
            vertical-align: middle;
            opacity: 0;
            transition: opacity 0.2s, color 0.2s;
            color: rgba(255,255,255,0.6);
        }
        .hero-claim-status.visible { opacity: 1; }
        .hero-claim-status.ok { color: #4ade80; }
        .hero-claim-status.err { color: #ff8da6; }
        .hero-claim-sub {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin: 0 0 16px;
        }
        .hero-claim-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 18px;
            background: linear-gradient(180deg, #FBBF24, #F59E0B);
            color: #110a1f;
            border: 0;
            border-radius: 10px;
            font-weight: 800;
            font-size: 0.88rem;
            cursor: pointer;
            box-shadow: 0 0 24px rgba(245,158,11,0.45);
        }
        .hero-claim-btn[hidden] { display: none !important; }
        .hero-claim-open {
            color: #6cf2ff;
            font-weight: 800;
            text-decoration: none;
            font-size: 0.88rem;
        }
        .hero-claim-open[hidden] { display: none !important; }
        /* The old standalone strip is redundant once the hero owns the claim
           flow. Hide it on the homepage. */
        #username-strip,
        .username-strip,
        #welcome-claim-modal,
        .welcome-claim-card,
        .hero-claim,
        #hero-claim,
        .hero-claim-sub,
        #hero-claim-tag,
        #hero-claim-open,
        #hero-claim-btn,
        #live-channels,
        .live-channels {
            display: none !important;
        }
        /* Old single hero-title styles (still used elsewhere) */
        #home-title.hero-title-legacy {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 900;
            letter-spacing: -0.025em;
            line-height: 1.02;
            font-size: clamp(2.3rem, 6vw, 4.6rem);
            margin-top: 18px;
        }
        .hero-accent {
            background: linear-gradient(180deg, var(--accent-amber-bright), var(--accent-amber));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 32px rgba(245,158,11,0.35);
        }
        .hero-line2 {
            display: inline-block;
            color: rgba(255,255,255,0.85);
            font-weight: 700;
        }
        .subcopy-handle {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 700;
            color: var(--accent-amber-bright);
            background: rgba(245,158,11,0.10);
            padding: 2px 8px;
            border-radius: 6px;
        }

        /* Restyle the prompt panel as a broadcast console */
        .prompt-panel {
            border: 1px solid rgba(245,158,11,0.18) !important;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px rgba(0,0,0,0.55) !important;
        }
        .prompt-input:focus {
            box-shadow: 0 0 0 2px rgba(245,158,11,0.35) !important;
        }
        /* "Create Video" submit gets the amber glow */
        .prompt-actions button[type="submit"],
        .prompt-bar + .prompt-actions button[type="submit"],
        .prompt-panel .form-row button[type="submit"] {
            background: linear-gradient(180deg, var(--accent-amber-bright), var(--accent-amber)) !important;
            color: #110a1f !important;
            box-shadow: 0 0 24px rgba(245,158,11,0.45) !important;
            text-shadow: none !important;
        }

        /* Public showcase / Live Channels headings get Space Grotesk display */
        .public-showcase h2, #live-channels h2 {
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 900;
            letter-spacing: -0.015em;
        }
        .public-showcase-kicker {
            color: var(--accent-amber-bright) !important;
            letter-spacing: 0.16em !important;
        }

        /* Legacy sections from the older homepage live after the footer in the
           DOM. Their scripts can flip inline display back on, so keep them
           hard-disabled here to prevent scrollable blank space under footer. */
        #commercial-showcase,
        #submitted-songs {
            display: none !important;
            height: 0 !important;
            min-height: 0 !important;
            max-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            overflow: hidden !important;
        }
