        :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;
        }

        /* Restored storyboard.lol backup layout: desktop sidebar, hero intro, feature rows, category tabs. */
        @media (min-width: 1001px) {
            body {
                padding-left: 246px;
            }
            .topbar {
                min-height: 64px;
                padding-left: clamp(24px, 4vw, 52px);
                padding-right: clamp(24px, 4vw, 52px);
            }
            .topbar .brand {
                display: none;
            }
        }
        .sbl-sidebar {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            z-index: 1100;
            width: 246px;
            padding: 18px 14px;
            display: flex;
            flex-direction: column;
            gap: 18px;
            border-right: 1px solid rgba(255,255,255,.08);
            background: rgba(4,5,8,.94);
            backdrop-filter: blur(20px) saturate(1.2);
        }
        .sbl-sidebar-brand {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 0 8px 10px;
            color: #f7f8ff;
            font-size: 1.04rem;
            font-weight: 950;
        }
        .sbl-sidebar-brand .brand-mark {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            font-size: .95rem;
        }
        .sbl-sidebar-nav,
        .sbl-sidebar-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .sbl-sidebar-nav a,
        .sbl-side-item {
            min-height: 38px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0 10px;
            border-radius: 8px;
            color: rgba(245,247,251,.68);
            font-size: .86rem;
            font-weight: 820;
            transition: color .16s ease, background .16s ease;
        }
        .sbl-sidebar-nav a:hover,
        .sbl-sidebar-nav a:focus-visible,
        .sbl-side-item:hover,
        .sbl-side-item:focus-visible {
            color: #fff;
            background: rgba(255,255,255,.06);
            outline: none;
        }
        .sbl-side-ic {
            width: 18px;
            text-align: center;
            color: rgba(97,218,251,.78);
            font-size: .9rem;
        }
        .sbl-sidebar-heading {
            padding: 0 10px 6px;
            color: rgba(167,173,189,.7);
            font-size: .68rem;
            font-weight: 950;
            letter-spacing: .11em;
            text-transform: uppercase;
        }
        .sbl-sidebar-foot {
            margin-top: auto;
            padding: 12px 10px 0;
            border-top: 1px solid rgba(255,255,255,.07);
        }
        .sbl-foot-links {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 12px;
            color: rgba(245,247,251,.52);
            font-size: .76rem;
            font-weight: 800;
        }
        .sbl-foot-copy {
            margin-top: 10px;
            color: rgba(245,247,251,.35);
            font-size: .72rem;
            font-weight: 800;
        }
        .sbl-hero-head {
            max-width: 1040px;
            margin: 0 auto;
            padding: 34px 22px 10px;
        }
        .sbl-llm-console {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
            align-items: center;
            gap: 24px;
            padding: 24px;
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 14px;
            background:
                linear-gradient(135deg, rgba(97,218,251,.09), transparent 38%),
                linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.026));
            box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 26px 80px rgba(0,0,0,.22);
        }
        .sbl-llm-copy {
            min-width: 0;
            text-align: left;
        }
        .sbl-hero-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: rgba(97,218,251,.92);
            font-size: .72rem;
            font-weight: 950;
            letter-spacing: .16em;
            text-transform: uppercase;
        }
        .sbl-hero-title {
            max-width: 620px;
            margin: 12px 0 0;
            color: #fff;
            font-size: clamp(2.1rem, 4.8vw, 4.6rem);
            font-weight: 950;
            line-height: .96;
            letter-spacing: 0;
        }
        .sbl-hero-title span {
            color: #61dafb;
            text-shadow: 0 0 30px rgba(97,218,251,.28);
        }
        .sbl-hero-lede {
            max-width: 600px;
            margin: 16px 0 0;
            color: rgba(245,247,251,.72);
            font-size: clamp(.98rem, 1.35vw, 1.08rem);
            line-height: 1.55;
        }
        .sbl-hero-lede b {
            color: #fff;
            font-weight: 800;
        }
        .sbl-llm-picker {
            display: grid;
            grid-template-columns: 1fr;
            gap: 9px;
        }
        .sbl-llm-choice {
            min-height: 74px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 14px 16px;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 10px;
            color: rgba(245,247,251,.78);
            background: rgba(255,255,255,.055);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 38px rgba(0,0,0,.16);
            cursor: pointer;
            text-align: left;
            transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
        }
        .sbl-llm-choice::before {
            content: '';
            width: 10px;
            height: 10px;
            flex: 0 0 auto;
            border-radius: 999px;
            background: rgba(245,247,251,.34);
            box-shadow: 0 0 0 5px rgba(255,255,255,.035);
        }
        .sbl-llm-name {
            flex: 1 1 auto;
            color: #fff;
            font-size: 1.15rem;
            font-weight: 950;
            line-height: 1;
        }
        .sbl-llm-choice small {
            flex: 0 0 auto;
            color: rgba(245,247,251,.58);
            font-size: .78rem;
            font-weight: 800;
            line-height: 1.3;
        }
        .sbl-llm-choice:hover,
        .sbl-llm-choice:focus-visible {
            transform: translateY(-2px);
            border-color: rgba(97,218,251,.42);
            background: rgba(255,255,255,.085);
            outline: none;
        }
        .sbl-llm-choice.active {
            border-color: transparent;
            color: #061018;
            background: linear-gradient(135deg, #61dafb, #5ee6a8);
            box-shadow: 0 18px 48px rgba(97,218,251,.2);
        }
        .sbl-llm-choice.active::before {
            background: #041018;
            box-shadow: 0 0 0 5px rgba(4,16,24,.16);
        }
        .sbl-llm-choice.active .sbl-llm-name,
        .sbl-llm-choice.active small {
            color: #041018;
        }
        .sbl-hero-cta {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 18px;
        }
        .sbl-hero-btn {
            min-height: 42px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 16px;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 10px;
            color: #f5f7fb;
            background: rgba(255,255,255,.06);
            font-size: .9rem;
            font-weight: 900;
            transition: transform .16s ease, border-color .16s ease, background .16s ease;
        }
        .sbl-hero-btn:hover,
        .sbl-hero-btn:focus-visible {
            transform: translateY(-1px);
            border-color: rgba(255,255,255,.22);
            background: rgba(255,255,255,.11);
            outline: none;
        }
        .sbl-hero-btn.primary {
            border-color: transparent;
            color: #041018;
            background: linear-gradient(135deg, #61dafb, #5ee6a8);
        }
        .sbl-hero-btn.ghost {
            color: rgba(245,247,251,.64);
            background: transparent;
        }
        .broadcast-hero .mode-tabs .sbl-cat-tab {
            min-height: 42px;
            padding: 0 14px;
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 10px;
            color: rgba(245,247,251,.62);
            background: rgba(255,255,255,.035);
            font-size: .86rem;
            font-weight: 900;
            cursor: pointer;
        }
        .broadcast-hero .mode-tabs .sbl-cat-tab:hover,
        .broadcast-hero .mode-tabs .sbl-cat-tab:focus-visible {
            color: #fff;
            border-color: rgba(97,218,251,.32);
            outline: none;
        }
        .broadcast-hero .mode-tabs .sbl-cat-tab.active {
            color: #071018;
            border-color: transparent;
            background: linear-gradient(135deg, #61dafb, #5ee6a8);
        }
        .sbl-pick-theme {
            border-color: rgba(97,218,251,.65) !important;
            box-shadow: 0 0 0 3px rgba(97,218,251,.16) !important;
        }
        @media (max-width: 1000px) {
            body {
                padding-left: 0;
            }
            .sbl-sidebar {
                display: none;
            }
        }
        @media (max-width: 820px) {
            .sbl-hero-head {
                padding: 22px 0 10px;
            }
            .sbl-llm-console {
                grid-template-columns: 1fr;
                gap: 18px;
                padding: 18px;
            }
            .sbl-llm-copy {
                text-align: center;
            }
            .sbl-hero-title {
                max-width: 100%;
                font-size: clamp(2rem, 10vw, 3.45rem);
            }
            .sbl-hero-lede {
                margin-left: auto;
                margin-right: auto;
            }
            .sbl-llm-picker {
                gap: 9px;
            }
            .sbl-llm-choice {
                min-height: 66px;
            }
            .sbl-hero-cta {
                justify-content: stretch;
            }
            .sbl-hero-btn {
                flex: 1 1 calc(50% - 10px);
            }
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            min-height: 100vh;
            padding-bottom: 212px;
            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 {
            position: sticky;
            top: 0;
            z-index: 1000;
            min-height: 66px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: clamp(22px, 3.5vw, 56px);
            padding: 0 clamp(22px, 5vw, 68px);
            border-bottom: 0;
            background:
                radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 34rem),
                linear-gradient(180deg, rgba(9,11,18,.70), rgba(9,11,18,.24) 72%, rgba(9,11,18,0));
            backdrop-filter: blur(14px) saturate(1.14);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
        }
        .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 900;
            letter-spacing: 0;
            font-size: 1.08rem;
        }
        .brand-channel {
            display: flex;
            align-items: center;
            gap: 0;
            min-width: 0;
            flex: 0 0 auto;
        }
        .brand-mark {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: grid;
            place-items: center;
            color: #071018;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            font-weight: 900;
        }
        .header-channel-claim {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }
        .header-channel-claim[hidden] {
            display: none !important;
        }
        .topbar .header-claim {
            display: inline-flex;
            align-items: baseline;
            gap: 0;
            margin: 0;
            min-width: 0;
            font-family: Inter, system-ui, sans-serif;
            font-size: clamp(1rem, 1.8vw, 1.35rem);
            line-height: 1;
            letter-spacing: 0;
            white-space: nowrap;
            text-transform: none;
        }
        .topbar .header-claim .hero-claim-prefix {
            display: inline;
            color: #f6b21a;
            font-size: inherit;
            font-style: normal;
            margin-left: 2px;
            text-shadow: 0 0 18px rgba(245,158,11,.28);
        }
        .topbar .header-claim .hero-claim-input {
            width: 10ch;
            min-width: 7ch;
            max-width: 18ch;
            height: auto;
            padding: 0;
            border: 0;
            border-radius: 0;
            color: #57e889;
            background: transparent;
            font: inherit;
            font-weight: 950;
            box-shadow: none;
            text-shadow: 0 0 18px rgba(94,230,168,.2);
        }
        .topbar .header-claim .hero-claim-input:focus {
            outline: none;
            box-shadow: inset 0 -2px 0 rgba(97,218,251,.6);
        }
        .topbar .header-claim .hero-claim-status {
            margin-left: 8px;
            font-size: .68rem;
            letter-spacing: .08em;
            text-transform: uppercase;
            white-space: nowrap;
        }
        .header-claim-tag {
            display: none;
        }
        .topbar .hero-claim-btn,
        .topbar .hero-claim-open {
            min-height: 30px;
            height: 30px;
            padding: 0 10px;
            border-radius: 8px;
            font-size: .74rem;
            font-weight: 900;
            white-space: nowrap;
        }
        .home-primary-nav {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            margin-left: 0;
            margin-right: auto;
            min-width: 0;
        }
        .home-nav-menu {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .home-nav-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 66px;
            padding: 0 10px;
            border-radius: 0;
            border: 0;
            color: rgba(245,247,251,.68);
            background: transparent;
            font-size: .9rem;
            font-weight: 850;
            font-family: inherit;
            text-decoration: none;
            white-space: nowrap;
            cursor: pointer;
            transition: color .16s ease;
        }
        .home-nav-link:hover,
        .home-nav-link:focus-visible,
        .home-nav-menu:hover > .home-nav-link,
        .home-nav-menu:focus-within > .home-nav-link {
            color: #fff;
            background: transparent;
            outline: none;
        }
        .home-mega-menu {
            position: fixed;
            left: 246px;
            right: 0;
            top: 64px;
            z-index: 1200;
            min-height: 260px;
            display: grid;
            grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
            gap: 28px;
            padding: 28px clamp(28px, 5vw, 76px);
            border-top: 1px solid rgba(255,255,255,.07);
            border-bottom: 1px solid rgba(255,255,255,.08);
            background: linear-gradient(180deg, rgba(7,8,12,.98), rgba(11,12,18,.97));
            box-shadow: 0 28px 70px rgba(0,0,0,.42);
            opacity: 0;
            transform: translateY(-8px);
            visibility: hidden;
            pointer-events: none;
            transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
        }
        .home-mega-menu:not(.home-mega-tools) {
            grid-template-columns: 1fr;
            min-height: 220px;
        }
        .home-nav-menu:hover .home-mega-menu,
        .home-nav-menu.open .home-mega-menu,
        .home-nav-menu:focus-within .home-mega-menu {
            opacity: 1;
            transform: translateY(0);
            visibility: visible;
            pointer-events: auto;
        }
        .home-mega-feature {
            min-height: 188px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            gap: 12px;
            padding: 18px;
            border: 1px solid rgba(97,218,251,.16);
            border-radius: 10px;
            background:
                linear-gradient(135deg, rgba(97,218,251,.18), transparent 46%),
                linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
        }
        .home-mega-feature strong {
            color: #fff;
            font-size: 1.08rem;
            font-weight: 950;
        }
        .home-mega-feature span {
            color: rgba(245,247,251,.64);
            font-size: .86rem;
            line-height: 1.45;
            font-weight: 750;
        }
        .home-mega-feature a {
            width: max-content;
            min-height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 13px;
            border-radius: 8px;
            color: #041018;
            background: linear-gradient(135deg, #61dafb, #5ee6a8);
            font-size: .82rem;
            font-weight: 950;
        }
        .home-mega-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 24px clamp(28px, 4vw, 58px);
            align-content: start;
        }
        .home-mega-grid.compact {
            grid-template-columns: repeat(3, minmax(170px, 1fr));
        }
        .home-mega-resources .home-mega-grid.compact {
            grid-template-columns: repeat(2, minmax(200px, 320px));
        }
        .home-mega-create .home-mega-grid.compact {
            grid-template-columns: repeat(3, minmax(180px, 1fr));
        }
        .home-mega-col {
            display: grid;
            gap: 2px;
            align-content: start;
        }
        .home-mega-heading {
            margin-bottom: 8px;
            color: rgba(97,218,251,.9);
            font-size: .72rem;
            font-weight: 950;
            letter-spacing: .12em;
            text-transform: uppercase;
        }
        .home-mega-col a {
            min-height: 38px;
            display: flex;
            align-items: center;
            padding: 0 10px;
            border-radius: 8px;
            color: rgba(245,247,251,.78);
            font-size: .94rem;
            font-weight: 850;
        }
        .home-mega-col a:hover,
        .home-mega-col a:focus-visible {
            color: #fff;
            background: rgba(255,255,255,.06);
            outline: none;
        }
        .home-nav-chevron {
            display: inline-block;
            transform: translateY(-1px);
            color: rgba(245,247,251,.48);
            font-size: .82rem;
            font-weight: 700;
        }
        .home-nav-toggle {
            display: none;
            width: 42px;
            height: 42px;
            margin-left: auto;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 5px;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 10px;
            background: rgba(255,255,255,.055);
            color: #fff;
            cursor: pointer;
        }
        .home-nav-toggle span,
        .home-nav-toggle::before,
        .home-nav-toggle::after {
            content: '';
            display: block;
            width: 18px;
            height: 2px;
            border-radius: 999px;
            background: currentColor;
            transition: transform .18s ease, opacity .18s ease;
        }
        .topbar.mobile-open .home-nav-toggle::before {
            transform: translateY(7px) rotate(45deg);
        }
        .topbar.mobile-open .home-nav-toggle span {
            opacity: 0;
        }
        .topbar.mobile-open .home-nav-toggle::after {
            transform: translateY(-7px) rotate(-45deg);
        }
        .nav-actions {
            display: flex;
            align-items: center;
            gap: 18px;
            flex: 0 0 auto;
        }
        .nav-actions a,
        .nav-actions button,
        .primary-link {
            height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 0;
            border: 0;
            border-radius: 0;
            font-size: .9rem;
            font-weight: 850;
            color: rgba(245,247,251,.72);
            background: transparent;
            white-space: nowrap;
            transition: color .16s ease, background .16s ease;
        }
        .nav-actions a:hover,
        .nav-actions a:focus-visible,
        .nav-actions button:hover,
        .nav-actions button:focus-visible {
            color: #fff;
            background: transparent;
            outline: none;
        }
        .nav-actions .nav-cta,
        .primary-link {
            border-color: transparent;
            height: 42px;
            padding: 0 20px;
            border-radius: 12px;
            color: #040508;
            background: #fff;
            box-shadow: none;
        }
        .nav-actions .nav-cta:hover,
        .nav-actions .nav-cta:focus-visible {
            color: #040508;
            background: rgba(255,255,255,.88);
        }
        .nav-actions button {
            min-height: 38px;
            appearance: none;
            background: transparent;
            color: rgba(245,247,251,.72);
            cursor: pointer;
        }
        .account-pill {
            min-height: 36px;
            display: inline-flex;
            align-items: center;
            gap: 9px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }
        .account-avatar {
            width: 30px;
            height: 30px;
            border-radius: 999px;
            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.05;
        }
        .account-name {
            max-width: 122px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: .88rem;
            font-weight: 900;
        }
        .account-meta {
            color: var(--muted);
            font-size: .6rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .account-meta.needs-email {
            color: #ffd166;
        }
        .logout-button {
            color: rgba(245,247,251,.58);
        }
        @media (max-width: 980px) {
            .topbar {
                height: auto;
                min-height: 64px;
                padding-top: 10px;
                padding-bottom: 10px;
                align-items: center;
                gap: 10px;
                flex-wrap: wrap;
            }
            .brand-channel {
                width: auto;
                max-width: calc(100% - 56px);
            }
            .home-nav-toggle {
                display: inline-flex;
            }
            .home-primary-nav,
            .topbar .nav-actions {
                display: none;
            }
            .topbar.mobile-open .home-primary-nav,
            .topbar.mobile-open .nav-actions {
                display: grid;
                grid-template-columns: 1fr;
                width: 100%;
                gap: 8px;
                margin-left: 0;
                padding: 10px;
                border: 1px solid rgba(255,255,255,.1);
                background: rgba(10,13,24,.94);
            }
            .topbar.mobile-open .home-primary-nav {
                margin-top: 4px;
                border-radius: 14px 14px 0 0;
                border-bottom: 0;
                padding-bottom: 6px;
            }
            .topbar.mobile-open .nav-actions {
                border-radius: 0 0 14px 14px;
                border-top: 0;
                padding-top: 6px;
            }
            .home-nav-link,
            .nav-actions a,
            .nav-actions button,
            .account-pill {
                width: 100%;
                min-height: 44px;
                justify-content: center;
            }
            .home-nav-menu {
                width: 100%;
                display: grid;
            }
            .home-nav-menu > .home-nav-link {
                justify-content: space-between;
                padding: 0 12px;
            }
            .home-mega-menu {
                position: static;
                left: auto;
                right: auto;
                top: auto;
                min-height: 0;
                display: none;
                grid-template-columns: 1fr;
                gap: 14px;
                width: 100%;
                padding: 12px;
                border: 1px solid rgba(255,255,255,.08);
                border-radius: 12px;
                background: rgba(255,255,255,.035);
                box-shadow: none;
                opacity: 1;
                transform: none;
                visibility: visible;
                pointer-events: auto;
            }
            .home-nav-menu.open .home-mega-menu,
            .home-nav-menu:focus-within .home-mega-menu {
                display: grid;
            }
            .home-mega-grid,
            .home-mega-grid.compact,
            .home-mega-resources .home-mega-grid.compact {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            .home-mega-feature {
                min-height: 0;
            }
            .home-mega-col a {
                min-height: 36px;
                padding: 0 8px;
                font-size: .88rem;
            }
            .account-pill {
                justify-content: flex-start;
            }
        }
        main {
            min-height: calc(100vh - 72px);
            display: grid;
            align-items: start;
            padding: 10px clamp(18px, 5vw, 72px) 38px;
        }
        .shell {
            width: min(1180px, 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: flex;
            align-items: center;
            justify-content: flex-start;
            flex-wrap: wrap;
            gap: 8px;
            min-width: 0;
        }
        .prompt-starters[hidden] {
            display: none !important;
        }
        .prompt-starters-label {
            color: rgba(245,247,251,.58);
            font-size: .72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .04em;
        }
        .prompt-starter-chip,
        .social-format-select {
            min-height: 30px;
            border: 1px solid rgba(97,218,251,.38);
            border-radius: 999px;
            color: #90f7ff;
            background: rgba(10,31,43,.76);
            padding: 0 12px;
            font: 850 .76rem Inter, system-ui, sans-serif;
            white-space: nowrap;
        }
        .prompt-starter-chip {
            cursor: pointer;
        }
        .prompt-starter-chip:hover,
        .prompt-starter-chip.active,
        .social-format-select:focus {
            border-color: rgba(94,230,168,.68);
            color: #dffbff;
            background: rgba(20,56,61,.86);
        }
        .social-format-select {
            max-width: 170px;
            outline: none;
        }
        .selected-reference-preview {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            min-height: 44px;
            width: fit-content;
            max-width: 100%;
            padding: 6px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            color: rgba(223,251,255,.76);
            background: rgba(97,218,251,.07);
            font-size: .76rem;
            font-weight: 800;
        }
        .selected-reference-preview[hidden] {
            display: none !important;
        }
        .selected-video-preview {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            max-width: 100%;
            min-height: 38px;
            margin-top: 8px;
            padding: 6px 8px;
            border: 1px solid rgba(94,230,168,.42);
            border-radius: 8px;
            color: #dffbff;
            background: rgba(20,56,61,.78);
            font: 850 .78rem Inter, system-ui, sans-serif;
        }
        .selected-video-preview[hidden] {
            display: none !important;
        }
        .selected-video-preview span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .selected-video-preview button {
            appearance: none;
            min-width: 26px;
            height: 26px;
            display: inline-grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.16);
            border-radius: 7px;
            color: #fff;
            background: rgba(255,255,255,.08);
            cursor: pointer;
            font-weight: 900;
        }
        .selected-reference-label {
            padding: 0 6px;
            color: rgba(223,251,255,.68);
            font-size: .68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .06em;
        }
        .selected-character-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 34px;
            max-width: 220px;
            padding: 3px 8px 3px 3px;
            border: 1px solid rgba(97,218,251,.32);
            border-radius: 8px;
            color: #eafcff;
            background: rgba(9,15,24,.92);
            font: 850 .76rem Inter, system-ui, sans-serif;
            cursor: pointer;
        }
        .selected-character-chip img {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            object-fit: cover;
            flex: 0 0 auto;
        }
        .selected-character-chip span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .selected-character-chip strong {
            color: rgba(255,255,255,.68);
            font-size: .82rem;
            line-height: 1;
        }
        .selected-character-chip:hover {
            border-color: rgba(94,230,168,.62);
            background: rgba(14,30,34,.94);
        }
        .prompt-bar {
            position: relative;
            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: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.category-next-step {
            border-color: rgba(94,230,168,.95);
            box-shadow:
                0 0 0 3px rgba(94,230,168,.28),
                0 0 44px rgba(94,230,168,.24),
                inset 0 1px 0 rgba(255,255,255,.08);
            animation: categoryNextStepPulse 1.2s ease-in-out 6;
        }
        .prompt-bar.category-next-step::before {
            content: attr(data-next-step-label);
            position: absolute;
            left: 12px;
            top: -34px;
            z-index: 3;
            min-height: 26px;
            display: inline-flex;
            align-items: center;
            padding: 0 12px;
            border: 1px solid rgba(94,230,168,.48);
            border-radius: 999px;
            color: #071018;
            background: linear-gradient(90deg, #67e8f9, #5ee6a8);
            box-shadow: 0 12px 28px rgba(0,0,0,.28);
            font-size: .72rem;
            font-weight: 950;
            white-space: nowrap;
            pointer-events: 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;
        }
        .prompt-input::placeholder {
            color: rgba(245,247,251,.42);
            font-weight: 400;
            font-style: italic;
        }
        .prompt-bar { cursor: text; }
        .prompt-bar.music-video-prompt-active {
            border-color: rgba(97,218,251,.78);
            background:
                linear-gradient(90deg, rgba(97,218,251,.16), rgba(255,255,255,.025) 38%, rgba(245,158,11,.10)),
                #050812;
            box-shadow:
                0 0 0 2px rgba(97,218,251,.24),
                0 0 26px rgba(97,218,251,.16),
                inset 0 1px 0 rgba(255,255,255,.07),
                inset 0 0 0 1px rgba(255,255,255,.04);
            animation: musicPromptBorderPulse 2.1s ease-in-out infinite;
        }
        .prompt-bar.music-video-prompt-active:not(.has-text):not(:focus-within)::after {
            content: "";
            position: absolute;
            left: 20px;
            top: 50%;
            width: 2px;
            height: 22px;
            border-radius: 999px;
            background: #fbbf24;
            box-shadow: 0 0 14px rgba(251,191,36,.78);
            transform: translateY(-50%);
            animation: musicPromptCaretPulse 1.05s steps(2, start) infinite;
            pointer-events: none;
        }
        @keyframes musicPromptBorderPulse {
            0%, 100% {
                box-shadow:
                    0 0 0 2px rgba(97,218,251,.22),
                    0 0 24px rgba(97,218,251,.14),
                    inset 0 1px 0 rgba(255,255,255,.07),
                    inset 0 0 0 1px rgba(255,255,255,.04);
            }
            50% {
                box-shadow:
                    0 0 0 3px rgba(97,218,251,.38),
                    0 0 38px rgba(97,218,251,.28),
                    inset 0 1px 0 rgba(255,255,255,.09),
                    inset 0 0 0 1px rgba(255,255,255,.06);
            }
        }
        @keyframes categoryNextStepPulse {
            0%, 100% {
                box-shadow:
                    0 0 0 3px rgba(94,230,168,.22),
                    0 0 34px rgba(94,230,168,.18),
                    inset 0 1px 0 rgba(255,255,255,.08);
            }
            50% {
                box-shadow:
                    0 0 0 5px rgba(103,232,249,.28),
                    0 0 54px rgba(103,232,249,.26),
                    inset 0 1px 0 rgba(255,255,255,.1);
            }
        }
        @keyframes musicPromptCaretPulse {
            0%, 45% { opacity: 1; }
            46%, 100% { opacity: 0; }
        }
        .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: center;
            justify-content: space-between;
            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: inline-flex;
        }
        .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;
        }
        .prompt-advanced-row {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 6px;
        }
        .prompt-advanced-row[hidden] {
            display: none !important;
        }
        .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;
            flex-wrap: wrap;
            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;
            max-width: 170px;
        }
        .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;
        }
        #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;
        }
        .create-submit-row {
            justify-content: flex-end;
            gap: 8px;
            margin-top: 4px;
        }
        .create-cta-row {
            display: flex;
            gap: 8px;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
        }
        .media-settings-row {
            display: grid;
            grid-template-columns: minmax(420px, 1.25fr) minmax(260px, .9fr);
            gap: 10px;
            align-items: stretch;
            margin-top: 10px;
        }
        .media-settings-row .theme-manifest-field {
            display: none !important;
        }
        .theme-manifest-field,
        .art-style-effect-field {
            order: 2;
            display: grid;
            gap: 6px;
            min-width: 0;
            padding: 9px 12px;
            border: 1px solid rgba(97,218,251,.24);
            border-radius: 8px;
            background: rgba(8,12,20,.68);
        }
        .theme-manifest-field label,
        .art-style-effect-field label {
            color: var(--text);
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 6px;
            font: 900 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .field-title-note {
            color: var(--muted);
            font-size: .72rem;
            font-weight: 800;
            line-height: 1.2;
            text-transform: none;
        }
        .theme-manifest-field select,
        .art-style-effect-field select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            min-height: 38px;
            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,
        .art-style-effect-field small {
            color: var(--muted);
            font-size: .78rem;
            line-height: 1.35;
        }
        .art-style-effect-grid {
            display: grid;
            gap: 6px;
        }
        .art-style-effect-status {
            min-height: 16px;
            color: #67e8f9;
            font-size: .72rem;
            font-weight: 900;
        }
        .source-song-picker {
            order: 1;
            display: none;
            grid-column: auto;
            margin-top: 0;
            padding: 9px 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: 6px;
        }
        .source-song-picker label {
            color: var(--text);
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 6px;
            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: 38px;
            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) auto auto;
            gap: 10px;
            align-items: center;
        }
        .audio-preview-btn,
        .audio-upload-btn {
            min-height: 38px;
            padding: 0 14px;
            border-radius: 8px;
            border: 1px solid rgba(97,218,251,.24);
            color: var(--text);
            background: rgba(97,218,251,.08);
            font-weight: 900;
        }
        .audio-preview-btn:disabled {
            opacity: .45;
            cursor: not-allowed;
        }
        .audio-preview-btn.playing {
            border-color: rgba(245,158,11,.7);
            background: rgba(245,158,11,.16);
        }
        .audio-upload-row {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: max-content;
        }
        .audio-upload-or {
            color: var(--muted);
            font-size: .75rem;
            font-weight: 900;
            text-transform: uppercase;
        }
        .audio-upload-icon {
            margin-right: 6px;
            color: #fbbf24;
        }
        .audio-source-modal-card,
        .import-song-modal-card {
            width: min(620px, 100%);
        }
        .audio-source-modal-card {
            max-height: calc(100vh - 40px);
            overflow: auto;
        }
        .audio-source-choice-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .audio-source-sections {
            display: grid;
            gap: 18px;
        }
        .audio-source-section {
            display: grid;
            gap: 10px;
        }
        .audio-source-section + .audio-source-section {
            padding-top: 16px;
            border-top: 1px solid rgba(97,218,251,.16);
        }
        .audio-source-section h3 {
            margin: 0;
            color: #67e8f9;
            font: 900 .76rem Inter, system-ui, sans-serif;
            letter-spacing: 0;
            text-transform: uppercase;
        }
        .audio-source-choice-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        .audio-source-choice {
            appearance: none;
            min-height: 68px;
            padding: 13px 14px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 5px;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 8px;
            background: rgba(8,12,20,.82);
            color: var(--text);
            font: inherit;
            font-weight: 900;
            text-align: left;
            cursor: pointer;
        }
        .audio-source-choice:hover,
        .audio-source-choice.primary {
            border-color: rgba(94,230,168,.55);
            background: rgba(16,45,52,.86);
        }
        .audio-source-choice.wide {
            width: 100%;
        }
        .audio-source-choice span {
            color: var(--muted);
            font-size: .82rem;
            font-weight: 700;
            line-height: 1.35;
        }
        .import-song-note {
            margin: 0;
            color: var(--muted);
            font-size: .86rem;
            line-height: 1.45;
        }
        .import-song-input {
            width: 100%;
            min-height: 46px;
            box-sizing: border-box;
            padding: 0 14px;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 8px;
            background: #070a12;
            color: var(--text);
            font: 850 .9rem Inter, system-ui, sans-serif;
        }
        .import-song-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        .import-song-status {
            color: #67e8f9;
            font-weight: 900;
        }
        .import-song-error {
            color: #ff8fb0;
            font-weight: 800;
        }
        @media (max-width: 720px) {
            .media-settings-row {
                grid-template-columns: 1fr !important;
            }
            .media-settings-row.prompt-mode {
                grid-template-columns: 1fr !important;
            }
            .media-settings-row > div,
            .source-song-picker,
            .art-style-effect-field,
            #music-theme-field,
            #lyrical-theme-field,
            #prompt-commercial-field,
            #fight-video-model-field {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                grid-column: 1 / -1 !important;
            }
            .audio-source-choice-grid,
            .import-song-actions {
                grid-template-columns: 1fr;
            }
            .source-song-picker .song-source-grid {
                grid-template-columns: 1fr !important;
                align-items: stretch !important;
            }
            .audio-upload-row {
                width: 100% !important;
                min-width: 0 !important;
                align-items: stretch !important;
            }
            .audio-upload-actions {
                width: 100% !important;
                min-width: 0 !important;
                grid-template-columns: 1fr !important;
                gap: 8px !important;
            }
            .audio-preview-btn,
            .audio-upload-btn,
            .audio-create-link {
                width: 100% !important;
                min-width: 0 !important;
            }
        }
        .source-song-picker small {
            color: var(--muted);
            font-size: .78rem;
        }
        .character-picker {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 35;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto;
            grid-template-rows: auto auto;
            align-items: center;
            gap: 10px;
            padding: 10px 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: 170px;
            transition: max-height .32s ease, padding .26s ease, border-color .22s ease, box-shadow .22s ease;
        }
        body.gp-active .character-picker:not(.gallery-expanded):not(.minimized) {
            bottom: 56px;
        }
        .character-picker.gallery-expanded {
            align-items: stretch;
            grid-template-rows: auto minmax(0, 1fr);
            max-height: min(78vh, 760px);
            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:not(.gallery-expanded):not(.minimized) {
            max-height: 132px;
            padding-top: 7px;
            padding-bottom: 7px;
        }
        .character-picker:not(.gallery-expanded):not(.minimized) .character-tile,
        .character-picker:not(.gallery-expanded):not(.minimized) .character-tile.add,
        .character-picker:not(.gallery-expanded):not(.minimized) .character-empty {
            min-height: 104px;
        }
        .character-picker:not(.gallery-expanded):not(.minimized) .character-tile {
            flex-basis: 126px;
        }
        .character-picker:not(.gallery-expanded):not(.minimized) .character-empty {
            flex-basis: 260px;
            padding: 8px 10px;
        }
        .character-picker:not(.gallery-expanded):not(.minimized) .character-tile.add strong {
            font-size: 1.45rem;
        }
        .character-picker:not(.gallery-expanded):not(.minimized) .gallery-expand-button {
            width: 36px;
            min-width: 36px;
            height: 36px;
            min-height: 36px;
        }
        .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;
        }
        .create-song-button,
        .view-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;
        }
        .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);
        }
        .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); }
        .create-song-button[hidden],
        .view-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: 8px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 0 2px 4px;
            scrollbar-width: thin;
            min-width: 0;
            transition: max-height .32s ease;
        }
        .character-picker.gallery-expanded .character-row {
            grid-row: 1 / span 2;
            flex-wrap: wrap;
            align-content: flex-start;
            overflow-x: hidden;
            overflow-y: auto;
            max-height: calc(min(78vh, 760px) - 36px);
            padding-right: 8px;
            scrollbar-gutter: stable;
        }
        .character-tile {
            position: relative;
            flex: 0 0 126px;
            width: 126px;
            min-height: 126px;
            display: grid;
            align-content: end;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 8px;
            padding: 7px;
            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: .74rem;
            font-weight: 900;
        }
        .character-tile.add {
            min-height: 126px;
            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: 1.65rem;
            line-height: 1;
        }
        .character-tile.add em {
            display: block;
            margin-bottom: 5px;
            color: rgba(223,251,255,.68);
            font-style: normal;
            font-size: .62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .07em;
        }
        .character-tile.character-load-more {
            min-height: 126px;
            place-items: center;
            align-content: center;
            text-align: center;
            border-style: dashed;
            color: var(--accent);
            background: rgba(97,218,251,.05);
        }
        .character-tile.character-load-more::after {
            display: none;
        }
        .character-tile.character-load-more strong {
            display: block;
            font-size: 1.55rem;
            line-height: 1;
        }
        .character-tile.character-load-more em {
            display: block;
            margin-bottom: 5px;
            color: rgba(223,251,255,.68);
            font-style: normal;
            font-size: .62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .07em;
        }
        .character-tile.character-load-more:disabled {
            cursor: wait;
            opacity: .72;
        }
        .character-tile.selected {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(97,218,251,.18);
        }
        /* 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 126px;
            width: 126px;
            min-height: 126px;
            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 260px;
            min-height: 126px;
            display: grid;
            place-items: center;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--muted);
            background: rgba(255,255,255,.025);
            font-size: .76rem;
            font-weight: 800;
            text-align: center;
            padding: 10px;
        }
        .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));
            grid-auto-flow: dense;
            gap: 14px;
            margin-top: 22px;
        }
        .my-videos-heading {
            margin-top: 22px;
            color: #fff;
            font-size: 1.05rem;
            font-weight: 950;
            letter-spacing: 0;
        }
        .my-videos-heading[hidden] {
            display: none;
        }
        .my-videos-heading:not([hidden]) + .job-feed {
            margin-top: 12px;
        }
        /* 16:9 cards take two columns so the landscape frame is double the
           width of a portrait card and reads at its natural ratio. dense
           auto-flow lets shorter portrait cards backfill any gaps. */
        .job-card.landscape {
            grid-column: span 2;
        }
        .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;
        }
        .public-video-card .job-video-poster-placeholder {
            position: absolute;
            inset: 0;
            z-index: 0;
            display: block;
            background:
                linear-gradient(110deg, transparent 28%, rgba(255,255,255,.07) 46%, transparent 64%) 0 0 / 220% 100%,
                linear-gradient(145deg, #101827, #080b12 72%);
            animation: publicPosterShimmer 1.4s ease-in-out infinite;
        }
        .public-video-card .job-video-poster.poster-awaiting-load {
            opacity: 0;
        }
        .public-video-card .job-video-poster.poster-ready {
            opacity: 1;
            transition: opacity .18s ease;
        }
        @keyframes publicPosterShimmer {
            to { background-position: -220% 0, 0 0; }
        }
        .job-character-ref-poster {
            position: absolute;
            inset: 0;
            z-index: 1;
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: #05070d;
            pointer-events: none;
        }
        .job-character-ref-poster.single {
            grid-template-columns: 1fr;
        }
        .job-character-ref-poster::after {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(180deg, rgba(3,5,10,.04) 0%, rgba(3,5,10,.34) 58%, rgba(3,5,10,.82) 100%),
                radial-gradient(circle at 50% 44%, rgba(97,218,251,.16), transparent 42%);
        }
        .job-character-ref-slot {
            position: relative;
            min-width: 0;
            overflow: hidden;
        }
        .job-character-ref-slot + .job-character-ref-slot {
            border-left: 1px solid rgba(255,255,255,.12);
        }
        .job-character-ref-slot img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
        }
        .job-character-ref-slot:first-child img {
            object-position: 52% center;
        }
        .job-character-ref-slot:last-child img {
            object-position: 48% center;
        }
        .job-character-ref-poster.single .job-character-ref-slot img {
            object-position: center;
        }
        .job-card-preview {
            position: absolute;
            inset: 0;
            z-index: 2;
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            border: 0;
            opacity: 0;
            pointer-events: none;
            background: #000;
            transition: opacity .18s ease;
        }
        .public-video-card:hover .job-card-preview,
        .public-video-card:focus-visible .job-card-preview {
            opacity: 1;
        }
        .job-media-card.preview-as-poster .job-video-poster {
            opacity: 0;
        }
        .job-media-card.preview-as-poster .job-card-preview {
            opacity: 1;
        }
        .job-media-card.preview-autoplay-ready .job-video-poster {
            opacity: 0;
        }
        .job-media-card.preview-autoplay-ready .job-card-preview {
            opacity: 1;
        }
        .job-card-audio-toggle {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 5;
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,.24);
            background: rgba(16,20,29,.72);
            color: #fff;
            font-size: .9rem;
            line-height: 1;
            text-decoration: none;
            box-shadow: 0 10px 24px rgba(0,0,0,.32);
            backdrop-filter: blur(12px);
            cursor: pointer;
            opacity: .92;
            transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
        }
        .job-card-audio-toggle:hover,
        .job-card-audio-toggle:focus-visible,
        .public-video-card.is-preview-audible .job-card-audio-toggle {
            opacity: 1;
            transform: scale(1.04);
            background: rgba(20,28,38,.86);
            border-color: rgba(255,255,255,.42);
            outline: none;
        }
        .public-video-card.is-preview-audible .job-card-audio-toggle {
            background: rgba(97,218,251,.22);
            border-color: rgba(97,218,251,.58);
        }
        .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-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-tabs {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin: 0 0 16px;
        }
        .public-showcase-tab {
            min-height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 14px;
            border-radius: 999px;
            border: 1px solid rgba(97,218,251,.35);
            background: rgba(97,218,251,.08);
            color: #9ef6ff;
            font-size: .78rem;
            font-weight: 900;
            cursor: pointer;
        }
        .public-showcase-tab.active {
            border-color: rgba(245,158,11,.75);
            background: linear-gradient(180deg, rgba(245,158,11,.24), rgba(245,158,11,.08));
            color: #fff;
            box-shadow: 0 10px 28px rgba(245,158,11,.16);
        }
        .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;
        }
        .public-showcase-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 16px;
            align-items: start;
            grid-auto-flow: dense;
        }
        .public-video-card {
            min-width: 0;
            display: grid;
            gap: 9px;
            border: 0;
            padding: 0;
            background: transparent;
            color: var(--text);
            cursor: pointer;
            text-align: left;
            text-decoration: none;
        }
        .public-theme-card .job-media-card::before {
            opacity: .18;
        }
        .public-theme-card:hover .job-media-card::before,
        .public-theme-card:focus-visible .job-media-card::before {
            opacity: 1;
        }
        .public-video-card.landscape {
            grid-column: span 2;
        }
        .public-video-card .job-media-card {
            box-shadow: 0 18px 45px rgba(0,0,0,.28);
        }
        .public-video-card.landscape .job-media-card {
            min-height: 0;
        }
        .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;
        }
        .public-showcase-empty {
            grid-column: 1 / -1;
            min-height: 120px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(97,218,251,.18);
            border-radius: 8px;
            color: var(--muted);
            background: rgba(255,255,255,.035);
            font: 800 .86rem Inter, system-ui, sans-serif;
        }
        .first-video-card {
            display: grid;
            gap: 8px;
            color: var(--text);
        }
        .first-video-media {
            aspect-ratio: 3 / 4;
            display: grid;
            place-items: center;
            border-radius: 10px;
            border: 1px dashed rgba(97,218,251,.45);
            background:
                radial-gradient(circle at 50% 40%, rgba(97,218,251,.16), transparent 42%),
                linear-gradient(180deg, rgba(15,25,38,.82), rgba(8,12,20,.88));
            box-shadow: 0 20px 48px rgba(0,0,0,.26);
            transition: border-color .16s ease, background .16s ease, transform .16s ease;
        }
        .first-video-media span {
            width: 48px;
            height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            border: 1px solid rgba(97,218,251,.42);
            color: #67e8f9;
            background: rgba(97,218,251,.1);
            font: 950 1.9rem/1 Inter, system-ui, sans-serif;
        }
        .first-video-card:hover .first-video-media,
        .first-video-card:focus-visible .first-video-media {
            border-color: rgba(97,218,251,.82);
            background:
                radial-gradient(circle at 50% 40%, rgba(97,218,251,.24), transparent 42%),
                linear-gradient(180deg, rgba(18,34,50,.9), rgba(8,12,20,.9));
            transform: translateY(-2px);
        }
        .first-video-card:focus-visible {
            outline: none;
        }
        .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(1180px, calc(100vw - 32px));
        }
        .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;
            max-height: min(82vh, 760px);
        }
        .video-player-wrap.landscape .video-player {
            width: 100%;
            height: 100%;
            max-height: none;
            object-fit: contain;
        }
        .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;
        }
        .create-receipt-overlay {
            position: fixed;
            inset: 0;
            z-index: 80;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(3,5,10,.78);
            backdrop-filter: blur(16px);
        }
        .create-receipt-card {
            width: min(620px, 100%);
            overflow: hidden;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 8px;
            background: rgba(10,13,22,.98);
            box-shadow: 0 28px 100px rgba(0,0,0,.55);
        }
        .create-receipt-head {
            display: flex;
            justify-content: space-between;
            gap: 14px;
            padding: 18px 18px 12px;
            border-bottom: 1px solid var(--line);
        }
        .create-receipt-head h2 {
            margin: 0;
            font-size: 1.08rem;
        }
        .create-receipt-head p {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: .84rem;
        }
        .create-receipt-close {
            width: 36px;
            min-height: 36px;
            padding: 0;
            color: var(--text);
            background: rgba(255,255,255,.05);
        }
        .create-receipt-grid {
            display: grid;
            gap: 10px;
            padding: 18px;
        }
        .create-receipt-row {
            display: grid;
            grid-template-columns: 130px minmax(0, 1fr);
            gap: 14px;
            align-items: start;
            padding: 11px 12px;
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 8px;
            background: rgba(255,255,255,.035);
        }
        .create-receipt-row span {
            color: var(--muted);
            font-size: .78rem;
            font-weight: 900;
        }
        .create-receipt-row strong {
            min-width: 0;
            color: var(--text);
            font-size: .9rem;
            font-weight: 900;
            overflow-wrap: anywhere;
        }
        .create-receipt-characters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .create-receipt-character {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            max-width: 100%;
            padding: 5px 8px 5px 5px;
            border: 1px solid rgba(97,218,251,.22);
            border-radius: 8px;
            background: rgba(97,218,251,.08);
            color: var(--text);
            font-size: .78rem;
            font-weight: 900;
        }
        .create-receipt-character img {
            width: 34px;
            height: 34px;
            border-radius: 6px;
            object-fit: cover;
            background: #000;
        }
        .create-receipt-empty {
            display: grid;
            gap: 4px;
            color: var(--muted);
            font-size: .84rem;
            font-weight: 800;
            line-height: 1.4;
        }
        .create-receipt-empty strong {
            color: var(--text);
            font-size: .9rem;
        }
        .create-receipt-empty em {
            color: rgba(235,241,255,.72);
            font-style: normal;
        }
        .create-receipt-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 0 18px 18px;
        }
        .create-receipt-cancel,
        .create-receipt-confirm {
            min-height: 42px;
            padding: 0 16px;
            border-radius: 8px;
            font-weight: 900;
        }
        .create-receipt-cancel {
            border: 1px solid var(--line);
            color: var(--text);
            background: rgba(255,255,255,.05);
        }
        .create-receipt-confirm {
            border: 1px solid rgba(97,218,251,.36);
            color: #051016;
            background: linear-gradient(135deg, #67e8f9, #7ee7d2);
            box-shadow: 0 12px 30px rgba(97,218,251,.18);
        }
        .fight-pro-length-option {
            width: 100%;
            text-align: left;
            cursor: pointer;
        }
        .fight-pro-length-option:hover,
        .fight-pro-length-option:focus-visible {
            border-color: rgba(97,218,251,.48);
            background: rgba(97,218,251,.09);
            outline: none;
        }
        .action-model-card {
            width: min(760px, 100%);
        }
        .action-model-head h2 {
            font-size: 1.22rem;
        }
        .action-model-options {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            padding: 18px;
        }
        .action-model-option {
            position: relative;
            min-height: 172px;
            display: grid;
            align-content: start;
            gap: 10px;
            padding: 18px;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 8px;
            background: rgba(255,255,255,.045);
            color: var(--text);
            text-align: left;
            cursor: pointer;
            transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
        }
        .action-model-option:hover,
        .action-model-option:focus-visible {
            transform: translateY(-1px);
            border-color: rgba(97,218,251,.62);
            background: rgba(97,218,251,.08);
            box-shadow: 0 18px 42px rgba(0,0,0,.24);
            outline: none;
        }
        .action-model-option-default {
            border-color: rgba(94,230,168,.38);
            background: linear-gradient(180deg, rgba(94,230,168,.12), rgba(255,255,255,.035));
        }
        .action-model-option-pro {
            border-color: rgba(255,79,139,.38);
            background: linear-gradient(180deg, rgba(255,79,139,.12), rgba(97,218,251,.045));
        }
        .action-model-kicker {
            width: max-content;
            padding: 5px 9px;
            border-radius: 999px;
            background: rgba(255,255,255,.08);
            color: rgba(245,247,251,.76);
            font-size: .72rem;
            font-weight: 950;
            letter-spacing: .04em;
            text-transform: uppercase;
        }
        .action-model-option strong {
            color: #fff;
            font-size: 1.08rem;
            font-weight: 950;
        }
        .action-model-option small {
            color: rgba(235,241,255,.72);
            font-size: .86rem;
            font-weight: 800;
            line-height: 1.42;
        }
        @media (max-width: 560px) {
            .create-receipt-row {
                grid-template-columns: 1fr;
                gap: 5px;
            }
            .action-model-options {
                grid-template-columns: 1fr;
            }
            .action-model-option {
                min-height: 0;
            }
            .create-receipt-actions {
                flex-direction: column-reverse;
            }
            .create-receipt-cancel,
            .create-receipt-confirm {
                width: 100%;
            }
        }
        .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;
        }
        .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: 1100px) {
            .job-feed {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            .public-showcase-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }
        @media (max-width: 760px) {
            .job-feed {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .public-showcase-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        @media (max-width: 640px) {
            body {
                padding-bottom: 260px;
            }
            .topbar {
                height: auto;
                min-height: 64px;
                padding-top: 10px;
                padding-bottom: 10px;
                align-items: center;
                gap: 10px;
                flex-wrap: wrap;
            }
            .brand-channel {
                width: auto;
                max-width: calc(100% - 56px);
                align-items: flex-start;
                justify-content: space-between;
                gap: 10px;
            }
            .brand {
                min-height: 42px;
                font-size: 1.04rem;
            }
            .brand-mark {
                width: 32px;
                height: 32px;
            }
            .home-nav-toggle {
                display: inline-flex;
            }
            .home-primary-nav,
            .topbar .nav-actions {
                display: none;
            }
            .topbar.mobile-open .home-primary-nav,
            .topbar.mobile-open .nav-actions {
                display: grid;
                grid-template-columns: 1fr;
                width: 100%;
                gap: 8px;
                margin-left: 0;
                padding: 10px;
                border: 1px solid rgba(255,255,255,.1);
                background: rgba(10,13,24,.94);
            }
            .topbar.mobile-open .home-primary-nav {
                margin-top: 4px;
                border-radius: 14px 14px 0 0;
                border-bottom: 0;
                padding-bottom: 6px;
            }
            .topbar.mobile-open .nav-actions {
                border-radius: 0 0 14px 14px;
                border-top: 0;
                padding-top: 6px;
            }
            .home-nav-link,
            .nav-actions a,
            .nav-actions button,
            .account-pill {
                width: 100%;
                min-height: 44px;
                justify-content: center;
            }
            .header-channel-claim {
                justify-content: flex-end;
                flex: 1 1 auto;
            }
            .topbar .header-claim {
                font-size: 1rem;
            }
            .nav-actions {
                justify-content: stretch;
            }
            .nav-actions a,
            .nav-actions button {
                height: 44px;
                padding: 0 12px;
            }
            .account-pill {
                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;
            }
            .public-video-card.landscape {
                grid-column: span 1;
            }
            .public-video-card.landscape .job-media-card {
                min-height: 0;
            }
            .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.add {
                min-height: 140px;
            }
            .character-row {
                display: flex;
            }
            .character-empty {
                flex-basis: 220px;
                min-height: 140px;
            }
            .character-picker:not(.gallery-expanded):not(.minimized) {
                max-height: 124px;
                padding-top: 7px;
                padding-bottom: 7px;
            }
            .character-picker:not(.gallery-expanded):not(.minimized) .character-tile,
            .character-picker:not(.gallery-expanded):not(.minimized) .character-tile.add,
            .character-picker:not(.gallery-expanded):not(.minimized) .character-empty {
                min-height: 100px;
            }
            .character-picker:not(.gallery-expanded):not(.minimized) .character-empty {
                flex-basis: 210px;
            }
            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-options.advanced-mini {
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
            margin: 8px 0 0 !important;
            text-align: center;
        }
        .advanced-options.advanced-mini.open {
            background:
                linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)),
                rgba(6,8,14,.72) !important;
            border: 1px solid rgba(255,255,255,.09) !important;
            border-radius: 12px !important;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 42px rgba(0,0,0,.2) !important;
            padding: 12px !important;
            text-align: left;
        }
        .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-options.advanced-mini.open .advanced-mini-toggle {
            color: rgba(245,247,251,.82);
            background: rgba(255,255,255,.045);
        }
        .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 {
            margin-top: 12px;
            padding: 14px;
            background: rgba(0,0,0,0.24);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            text-align: left;
        }
        /* ===== 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 {
            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; }

        /* ===== Audio upload row ===== */
        .audio-upload-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 8px;
            flex-wrap: wrap;
        }
        .audio-upload-actions {
            display: grid;
            gap: 5px;
            justify-items: stretch;
            min-width: 0;
        }
        .audio-create-link {
            min-height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 7px 14px;
            border: 1px dashed rgba(245,158,11,0.45);
            border-radius: 8px;
            color: #FBBF24;
            background: rgba(245,158,11,0.05);
            font-size: .82rem;
            font-weight: 700;
            text-decoration: none;
            white-space: nowrap;
            transition: background 0.18s, border-color 0.18s;
        }
        .audio-create-link:hover,
        .audio-create-link:focus-visible {
            color: #FBBF24;
            background: rgba(245,158,11,0.12);
            border-color: rgba(245,158,11,0.7);
            outline: none;
        }
        .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;
            gap: 7px;
            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-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;
        }
        .hero-broadcast-strip {
            position: absolute;
            top: 0;
            right: 0;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            min-height: 22px;
            margin: 0;
            z-index: 2;
        }
        .broadcast-hero .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
            font-weight: 700;
            font-size: 0.72rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: var(--accent-amber-bright);
            background: rgba(245,158,11,0.10);
            border: 1px solid rgba(245,158,11,0.35);
            padding: 5px 12px;
            border-radius: 999px;
            margin: 0;
        }
        .eyebrow-dot {
            width: 7px; height: 7px; border-radius: 999px;
            background: var(--live-red);
            box-shadow: 0 0 8px var(--live-red);
            animation: broadcast-pulse 1.4s ease-in-out infinite;
        }
        @keyframes broadcast-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

        /* Color bars decoration top-right of hero */
        .broadcast-bars {
            display: flex;
            gap: 0;
            height: 18px;
            border-radius: 4px;
            overflow: hidden;
            opacity: 0.55;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
        }
        .broadcast-bars span { display: block; width: 14px; height: 100%; }
        .broadcast-bars span:nth-child(1) { background: #ffffff; }
        .broadcast-bars span:nth-child(2) { background: #ffe700; }
        .broadcast-bars span:nth-child(3) { background: #00ffff; }
        .broadcast-bars span:nth-child(4) { background: #00ff00; }
        .broadcast-bars span:nth-child(5) { background: #ff00ff; }
        .broadcast-bars span:nth-child(6) { background: #ff0000; }
        .broadcast-bars span:nth-child(7) { background: #0000ff; }

        /* 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: -8px 0 16px;
            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: 250px; }
        body:has(.character-picker:not(.gallery-expanded):not(.minimized)) { padding-bottom: 172px; }
        /* 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: 130px; }
        body:has(.character-picker.gallery-expanded) { padding-bottom: min(82vh, 800px); }

        /* 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 { 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"] {
            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;
        }

        /* storyboard.lol homepage fit fixes */
        html,
        body {
            max-width: 100%;
            overflow-x: hidden;
        }
        main,
        .shell,
        .broadcast-hero,
        .prompt-panel,
        .public-showcase,
        .job-feed,
        .public-showcase-grid {
            min-width: 0;
            max-width: 100%;
        }
        main {
            width: 100%;
            padding-left: clamp(14px, 4vw, 48px);
            padding-right: clamp(14px, 4vw, 48px);
            overflow-x: clip;
        }
        .shell {
            width: min(1180px, 100%);
        }
        .broadcast-hero .hero-broadcast-strip {
            right: 0;
            max-width: 100%;
            overflow: hidden;
        }
        .hero-claim {
            min-width: 0;
            width: 100%;
            font-size: clamp(2rem, 5vw, 3.9rem);
        }
        .hero-claim-prefix {
            min-width: 0;
            overflow: hidden;
            text-overflow: clip;
        }
        .hero-claim-input {
            min-width: 4ch;
            width: min(13ch, 32vw);
            max-width: 32vw;
        }
        .prompt-panel,
        .prompt-bar,
        .prompt-actions,
        .mode-tabs {
            width: 100%;
            max-width: 100%;
        }
        .prompt-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 10px;
        }
        .prompt-actions .credit-estimate,
        .prompt-actions button[type="submit"] {
            flex: 0 1 auto;
            max-width: 100%;
        }
        .character-picker {
            width: 100%;
            max-width: 100vw;
            overflow-x: hidden;
        }
        .character-picker.gallery-expanded {
            grid-template-columns: minmax(0, 1fr) auto;
        }
        .character-picker.gallery-expanded .character-row {
            grid-column: 1;
            width: 100%;
            max-width: 100%;
            justify-content: flex-start;
        }
        .character-picker.gallery-expanded .character-picker-head,
        .character-picker.gallery-expanded .character-picker-secondary-actions {
            grid-column: 2;
        }
        @media (max-width: 760px) {
            .hero-claim {
                font-size: clamp(1.45rem, 8vw, 2.4rem);
            }
            .hero-claim-input {
                max-width: 34vw;
            }
            .prompt-bar {
                flex-wrap: wrap;
            }
            .prompt-bar .prompt-input {
                flex-basis: 100%;
            }
        }

        /* ===== Storyboard service console homepage ===== */
        .sbl-hero-head {
            max-width: 1120px;
            padding-top: 6px;
            padding-bottom: 2px;
        }
        .sbl-llm-console {
            display: block;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .sbl-llm-copy {
            max-width: 920px;
            margin: 0 auto;
            text-align: center;
        }
        .sbl-hero-kicker {
            justify-content: center;
            color: #61dafb;
            font-size: .76rem;
        }
        .sbl-hero-title {
            max-width: min(1120px, 100%);
            margin: 10px auto 0;
            font-size: 3.82rem;
            line-height: .96;
            text-wrap: normal;
            white-space: nowrap;
        }
        .sbl-hero-title span {
            color: #ff4f8b;
            text-shadow: 0 0 32px rgba(255,79,139,.24);
        }
        .sbl-hero-emoji {
            display: inline-block;
            margin: 0 .035em;
            font-size: .42em;
            line-height: 1;
            vertical-align: .24em;
            text-shadow: none;
        }
        .sbl-hero-lede {
            max-width: 720px;
            margin: 10px auto 0;
            color: rgba(245,247,251,.76);
            font-size: 1rem;
        }
        .sbl-llm-picker {
            width: min(620px, 100%);
            margin: 20px auto 0;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }
        .sbl-llm-choice {
            min-height: 52px;
            padding: 10px 14px;
            border-radius: 999px;
            background: rgba(255,255,255,.065);
        }
        .sbl-llm-choice::before {
            width: 8px;
            height: 8px;
        }
        .sbl-llm-name {
            font-size: .98rem;
        }
        .sbl-llm-choice small {
            font-size: .7rem;
        }
        .sbl-llm-choice.active {
            border-color: rgba(94,230,168,.62);
            background: linear-gradient(135deg, rgba(97,218,251,.22), rgba(94,230,168,.16));
            box-shadow: 0 12px 34px rgba(94,230,168,.12), inset 0 0 0 1px rgba(255,255,255,.08);
        }
        .sbl-llm-choice.active::before {
            background: #5ee6a8;
            box-shadow: 0 0 0 5px rgba(94,230,168,.16);
        }
        .sbl-llm-choice.active .sbl-llm-name {
            color: #eafff8;
        }
        .sbl-llm-choice.active small {
            color: rgba(223,255,247,.78);
        }
        .broadcast-hero {
            width: min(920px, 100%);
            margin: 10px auto 0;
            padding: 0;
            background: transparent;
        }
        .prompt-panel {
            gap: 0;
            overflow: hidden;
            padding: 0;
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 16px;
            background:
                linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)),
                #17181d;
            box-shadow: 0 28px 90px rgba(0,0,0,.36);
        }
        .prompt-panel .mode-tabs-shell {
            position: relative;
            border-bottom: 1px solid rgba(255,255,255,.08);
            background: rgba(7,8,12,.36);
        }
        .prompt-panel .mode-tabs {
            display: flex;
            align-items: center;
            flex-wrap: nowrap;
            gap: 8px;
            width: 100%;
            margin: 0;
            padding: 14px 14px 12px;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-behavior: smooth;
            scrollbar-width: none;
        }
        .prompt-panel .mode-tabs::-webkit-scrollbar {
            display: none;
        }
        .mode-tabs-scroll {
            display: none;
            position: absolute;
            top: 50%;
            z-index: 4;
            width: 34px;
            height: 34px;
            border: 1px solid rgba(96,231,255,.34);
            border-radius: 999px;
            color: #bdf7ff;
            background: rgba(7,10,16,.92);
            box-shadow: 0 10px 26px rgba(0,0,0,.32);
            transform: translateY(-50%);
            font-size: 1.55rem;
            font-weight: 900;
            line-height: 1;
            place-items: center;
        }
        .mode-tabs-scroll-left { left: 7px; }
        .mode-tabs-scroll-right { right: 7px; }
        .mode-tabs-scroll[disabled] {
            opacity: 0;
            pointer-events: none;
        }
        .prompt-panel .mode-tab,
        .prompt-panel .sbl-cat-tab {
            flex: 0 0 auto;
            min-height: 38px;
            padding: 0 14px;
            border: 1px solid rgba(255,255,255,.11);
            border-radius: 999px;
            color: rgba(245,247,251,.76);
            background: rgba(255,255,255,.055);
            box-shadow: none;
            font-size: .84rem;
            font-weight: 900;
            white-space: nowrap;
        }
        .prompt-panel .mode-tab:hover,
        .prompt-panel .mode-tab:focus-visible,
        .prompt-panel .sbl-cat-tab:hover,
        .prompt-panel .sbl-cat-tab:focus-visible {
            color: #fff;
            border-color: rgba(255,255,255,.22);
            background: rgba(255,255,255,.09);
            outline: none;
        }
        .prompt-panel .mode-tab.active,
        .prompt-panel .sbl-cat-tab.active {
            color: #070910;
            border-color: transparent;
            background: #fff;
            box-shadow: 0 12px 30px rgba(255,255,255,.12);
        }
        .prompt-head,
        .selected-reference-preview,
        .selected-video-preview,
        .media-settings-row,
        .character-picker,
        .create-submit-row,
        .advanced-options {
            margin-left: 16px;
            margin-right: 16px;
        }
        .prompt-head {
            padding-top: 12px;
        }
        .prompt-bar {
            position: relative;
            min-height: 76px;
            align-items: center;
            flex-wrap: nowrap;
            margin: 0;
            padding: 14px 16px;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .prompt-bar:focus-within {
            border-color: transparent;
            background: rgba(97,218,251,.035);
            box-shadow: inset 0 0 0 1px rgba(97,218,251,.2);
        }
        .prompt-bar .prompt-input {
            height: 44px;
            padding: 0;
            font-size: 1.05rem;
        }
        .prompt-char-counter {
            position: static;
            margin-left: 8px;
            z-index: 2;
        }
        .prompt-bar-aspect {
            position: static;
            margin-left: 2px;
        }
        .create-submit-row {
            margin-top: 0;
            padding-top: 14px;
            padding-bottom: 16px;
            border-top: 1px solid rgba(255,255,255,.08);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: nowrap;
            gap: 16px;
        }
        .create-submit-row.settings-open {
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 12px 16px;
        }
        .create-submit-row > .sbl-llm-picker {
            flex: 0 1 500px;
            width: auto;
            max-width: 500px;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            margin: 0;
        }
        .create-submit-row .sbl-llm-choice {
            min-height: 44px;
            padding: 7px 10px;
            display: grid;
            grid-template-columns: 8px minmax(0, 1fr);
            grid-template-rows: auto auto;
            align-content: center;
            column-gap: 8px;
            row-gap: 2px;
            overflow: hidden;
        }
        .create-submit-row .sbl-llm-choice::before {
            width: 8px;
            height: 8px;
            grid-row: 1 / span 2;
            align-self: center;
        }
        .create-submit-row .sbl-llm-name,
        .create-submit-row .sbl-llm-choice small {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .create-submit-row .sbl-llm-name {
            font-size: .9rem;
        }
        .create-submit-row .sbl-llm-choice small {
            font-size: .6rem;
            line-height: 1;
        }
        .create-submit-row > .advanced-options.advanced-mini {
            flex: 1 1 auto;
            margin: 0 auto 0 0 !important;
            text-align: left;
        }
        .create-submit-row.settings-open > .advanced-options.advanced-mini {
            order: 5 !important;
            flex: 1 1 100% !important;
            width: 100%;
            margin: 0 !important;
        }
        .create-submit-row.settings-open > .create-cta-row {
            margin-left: auto !important;
        }
        .create-cta-row {
            width: auto;
            flex: 0 0 auto;
            margin-left: auto;
            justify-content: flex-end;
        }
        #vidtv-create-btn {
            min-height: 48px;
            min-width: 190px;
            border-radius: 999px;
            background: linear-gradient(135deg, #ff2f73, #ff6d9d);
            box-shadow: 0 18px 50px rgba(255,47,115,.28);
        }
        #vidtv-create-btn:hover,
        #vidtv-create-btn:focus-visible {
            filter: brightness(1.06);
            transform: translateY(-1px);
        }
        @media (max-width: 1100px) {
            .create-submit-row {
                gap: 12px;
            }
            .create-submit-row > .sbl-llm-picker {
                flex-basis: 300px;
                max-width: 300px;
            }
            .create-submit-row .sbl-llm-choice {
                justify-content: center;
                padding-inline: 10px;
            }
            .create-submit-row .sbl-llm-choice small {
                display: none;
            }
            .create-submit-row > .advanced-options.advanced-mini {
                flex: 0 1 auto;
            }
        }
        @media (max-width: 900px) {
            .sbl-hero-head {
                padding-top: 4px;
            }
            .sbl-hero-title {
                font-size: 2.65rem;
                white-space: normal;
            }
            .sbl-llm-picker {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                max-width: 344px;
                gap: 6px;
                margin-top: 16px;
            }
            .sbl-llm-choice {
                min-height: 52px;
                flex-direction: column;
                justify-content: center;
                gap: 3px;
                padding: 8px 6px;
                text-align: center;
            }
            .sbl-llm-choice::before {
                display: none;
            }
            .sbl-llm-name {
                font-size: .9rem;
            }
            .sbl-llm-choice small {
                font-size: .64rem;
            }
            .prompt-panel .mode-tabs {
                overflow-x: auto;
                flex-wrap: nowrap;
                padding-left: 46px;
                padding-right: 46px;
                scroll-behavior: smooth;
                scroll-padding-inline: 46px;
                scrollbar-width: none;
            }
            .prompt-panel .mode-tabs::-webkit-scrollbar {
                display: none;
            }
            .mode-tabs-scroll {
                display: grid;
            }
            .mode-tabs-shell::before,
            .mode-tabs-shell::after {
                content: "";
                position: absolute;
                top: 0;
                bottom: 0;
                z-index: 3;
                width: 42px;
                pointer-events: none;
            }
            .mode-tabs-shell::before {
                left: 0;
                background: linear-gradient(90deg, rgba(7,8,12,.94), rgba(7,8,12,0));
            }
            .mode-tabs-shell::after {
                right: 0;
                background: linear-gradient(270deg, rgba(7,8,12,.94), rgba(7,8,12,0));
            }
            .create-submit-row > .sbl-llm-picker {
                flex: 1 1 100%;
                width: 100%;
                max-width: 100%;
                order: -2;
            }
            .prompt-bar {
                flex-wrap: wrap;
            }
            .prompt-bar-aspect {
                margin-left: 0;
            }
            .create-cta-row {
                width: 100%;
                flex: 1 1 100%;
                justify-content: stretch;
            }
            .create-submit-row {
                flex-wrap: wrap;
            }
            .create-submit-row > .advanced-options.advanced-mini {
                flex: 1 1 100%;
            }
            .create-cta-row .credit-estimate,
            #vidtv-create-btn {
                flex: 1 1 100%;
            }
        }

        /* ===== Full-width CloneViral-style homepage and template cards ===== */
        @media (min-width: 1001px) {
            body {
                padding-left: 0 !important;
            }
            .topbar {
                padding-left: clamp(22px, 3vw, 44px);
                padding-right: clamp(22px, 3vw, 44px);
            }
            .topbar .brand {
                display: inline-flex !important;
            }
            .home-mega-menu {
                left: 0;
            }
        }
        main {
            padding-left: clamp(16px, 2.6vw, 42px);
            padding-right: clamp(16px, 2.6vw, 42px);
        }
        .shell,
        .sbl-hero-head,
        .broadcast-hero {
            width: min(1228px, 100%);
        }
        .broadcast-hero {
            margin-top: 10px;
        }
        .job-feed,
        .public-showcase {
            width: min(1228px, 100%);
            margin-left: auto;
            margin-right: auto;
        }
        .job-feed,
        .public-showcase-grid {
            grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
            gap: 18px !important;
        }
        .job-card.landscape,
        .public-video-card.landscape {
            grid-column: span 1 !important;
        }
        .job-media-card,
        .job-media-card.landscape,
        .public-video-card.landscape .job-media-card {
            aspect-ratio: 3 / 4;
            min-height: 0;
            border-radius: 10px;
            border-color: rgba(255,255,255,.12);
            box-shadow: 0 20px 48px rgba(0,0,0,.32);
        }
        .public-video-card {
            gap: 8px;
            transition: transform .16s ease;
        }
        .public-video-card:hover,
        .public-video-card:focus-visible {
            transform: translateY(-2px);
            outline: none;
        }
        .public-theme-card.is-selected-theme .job-media-card {
            border-color: rgba(94,230,168,.95);
            box-shadow: 0 0 0 3px rgba(94,230,168,.22), 0 22px 52px rgba(0,0,0,.36);
        }
        .public-theme-card.is-selected-theme .public-video-card-title strong {
            color: #8fffd0;
        }
        .public-theme-card.is-selected-theme .public-video-card-title span {
            color: rgba(223,255,239,.82);
        }
        .public-video-card .job-media-card::before,
        .job-card .job-media-card::before {
            opacity: 0;
            background:
                linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,.68) 100%),
                rgba(0,0,0,.16);
            transition: opacity .18s ease;
        }
        .public-video-card:hover .job-media-card::before,
        .public-video-card:focus-visible .job-media-card::before,
        .job-card:hover .job-media-card::before,
        .job-card:focus-within .job-media-card::before {
            opacity: 1;
        }
        .template-hover-cta,
        .job-card .job-media-card::after {
            position: absolute;
            left: 14px;
            right: 14px;
            bottom: 14px;
            z-index: 4;
            min-height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            color: #070910;
            background: rgba(255,255,255,.96);
            box-shadow: 0 10px 28px rgba(0,0,0,.28);
            font: 950 .82rem Inter, system-ui, sans-serif;
            opacity: 0;
            transform: translateY(8px);
            transition: opacity .16s ease, transform .16s ease;
            pointer-events: none;
        }
        .template-hover-cta {
            white-space: nowrap;
            text-decoration: none;
        }
        .job-card .job-media-card::after {
            content: "Use template";
        }
        .job-feed .job-card .job-media-card::after {
            content: none;
            display: none;
        }
        .public-video-card:hover .template-hover-cta,
        .public-video-card:focus-visible .template-hover-cta,
        .template-hover-cta:focus-visible,
        .job-card:hover .job-media-card::after,
        .job-card:focus-within .job-media-card::after {
            opacity: 1;
            transform: translateY(0);
        }
        .public-video-card:hover .template-hover-cta,
        .public-video-card:focus-visible .template-hover-cta,
        .template-hover-cta:focus-visible {
            pointer-events: auto;
        }
        .public-video-card-title strong,
        .job-title {
            color: #fff;
            font-size: .92rem;
            line-height: 1.25;
        }
        .public-video-card-title span,
        .job-prompt {
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            color: rgba(245,247,251,.68);
            line-height: 1.38;
        }
        @media (max-width: 1180px) {
            .job-feed,
            .public-showcase-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
            }
        }
        @media (max-width: 820px) {
            .job-feed,
            .public-showcase-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
                gap: 14px !important;
            }
        }
        @media (max-width: 460px) {
            .job-feed,
            .public-showcase-grid {
                grid-template-columns: 1fr !important;
            }
        }

        #route-chase-modal {
            z-index: 1000002;
            inset: 0;
            padding: 0;
            overflow: hidden;
            align-items: stretch;
            justify-content: stretch;
            background: #070b12;
            backdrop-filter: none;
        }
        .status-modal.route-chase-card {
            width: 100vw;
            max-width: none;
            height: 100vh;
            height: 100dvh;
            margin: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 0;
            border-radius: 0;
            background: #0a0f19;
        }
        .route-chase-card > .modal-head,
        .magic-pen-card > .modal-head {
            flex: 0 0 auto;
            position: relative;
            z-index: 3;
            padding: 16px max(18px, calc((100vw - 1100px) / 2));
            background: #0a0f19;
            box-shadow: 0 12px 34px rgba(0,0,0,.28);
        }
        .route-chase-card > .modal-head .modal-close,
        .magic-pen-card > .modal-head .modal-close { flex: 0 0 40px; width: 40px; height: 40px; font-size: 1.05rem; }
        .route-chase-body {
            width: min(1100px, 100%);
            min-height: 0;
            margin: 0 auto;
            padding: 22px 24px 48px;
            box-sizing: border-box;
            display: grid;
            gap: 14px;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        .route-chase-anchors {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .route-chase-mode-switch {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            padding: 4px;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 7px;
            background: rgba(7,11,20,.72);
        }
        .route-chase-mode-switch button {
            min-height: 38px;
            border: 1px solid transparent;
            border-radius: 5px;
            background: transparent;
            color: rgba(245,247,251,.68);
            font: inherit;
            font-weight: 800;
            cursor: pointer;
        }
        .route-chase-mode-switch button:hover { color: #fff; }
        .route-chase-mode-switch button.active {
            border-color: #67e8f9;
            background: rgba(34,211,238,.14);
            color: #fff;
        }
        .route-camera-mode-note {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border: 1px solid rgba(255,79,163,.34);
            border-radius: 7px;
            background: rgba(255,79,163,.08);
        }
        .route-camera-mode-note strong {
            flex: 0 0 auto;
            color: #ff8fc7;
        }
        .route-camera-mode-note span {
            color: rgba(245,247,251,.72);
            font-size: .82rem;
            line-height: 1.35;
        }
        .route-chase-anchor {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 9px;
            border: 1px solid rgba(97,218,251,.22);
            border-radius: 7px;
            background: rgba(17,22,35,.86);
            color: inherit;
            font: inherit;
            text-align: left;
            cursor: pointer;
        }
        .route-chase-anchor:hover,
        .route-chase-anchor.choosing {
            border-color: #67e8f9;
            background: rgba(20,34,49,.96);
        }
        .route-rider-anchor { grid-column: 1 / -1; }
        .route-character-picker {
            grid-column: 1 / -1;
            min-width: 0;
            padding: 11px;
            border: 1px solid rgba(103,232,249,.34);
            border-radius: 7px;
            background: rgba(7,11,20,.98);
        }
        .route-character-picker-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 9px;
        }
        .route-character-picker-head strong { color: #fff; }
        .route-character-picker-head span { color: #67e8f9; font-size: .78rem; }
        .route-character-picker-grid {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 92px;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 5px;
            scrollbar-width: thin;
        }
        .route-character-choice {
            width: 92px;
            padding: 5px;
            border: 1px solid rgba(255,255,255,.14);
            border-radius: 7px;
            background: rgba(20,25,39,.94);
            color: #fff;
            cursor: pointer;
        }
        .route-character-choice:hover,
        .route-character-choice.selected { border-color: #67e8f9; }
        .route-character-choice img {
            display: block;
            width: 80px;
            height: 88px;
            border-radius: 5px;
            object-fit: cover;
        }
        .route-character-choice span {
            display: block;
            margin-top: 5px;
            overflow: hidden;
            color: #fff;
            font-size: .7rem;
            line-height: 1.2;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .route-character-empty {
            grid-column: 1 / -1;
            color: rgba(245,247,251,.66);
            font-size: .82rem;
        }
        .route-chase-anchor img,
        .route-anchor-missing {
            width: 58px;
            height: 58px;
            flex: 0 0 58px;
            border-radius: 6px;
            object-fit: cover;
            background: rgba(255,255,255,.06);
        }
        .route-anchor-missing {
            display: grid;
            place-items: center;
            color: #67e8f9;
            font-size: 1.6rem;
            font-weight: 900;
        }
        .route-chase-anchor strong,
        .route-chase-anchor span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .route-chase-anchor strong { color: #fff; }
        .route-chase-anchor span { margin-top: 4px; color: rgba(245,247,251,.64); font-size: .78rem; }
        .route-chase-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .route-world-generator {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(180px, 230px) auto;
            gap: 10px;
            align-items: end;
            padding: 11px;
            border: 1px solid rgba(97,218,251,.22);
            border-radius: 7px;
            background: rgba(17,22,35,.72);
        }
        .route-world-prompt-wrap {
            min-width: 0;
            display: grid;
            gap: 6px;
        }
        .route-world-prompt-wrap label {
            color: #f5f7fb;
            font: 850 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .route-world-prompt-wrap input {
            width: 100%;
            min-height: 42px;
            box-sizing: border-box;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 6px;
            padding: 0 12px;
            color: #fff;
            background: #080c15;
            font: 700 .86rem Inter, system-ui, sans-serif;
            outline: none;
        }
        .route-world-prompt-wrap input:focus {
            border-color: #67e8f9;
            box-shadow: 0 0 0 2px rgba(103,232,249,.12);
        }
        .route-world-prompt-wrap span {
            color: rgba(245,247,251,.55);
            font: 650 .7rem Inter, system-ui, sans-serif;
        }
        .route-world-style-wrap {
            min-width: 0;
            display: grid;
            gap: 6px;
        }
        .route-world-style-wrap label {
            color: #f5f7fb;
            font: 850 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .route-world-style-wrap select {
            width: 100%;
            min-height: 42px;
            box-sizing: border-box;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 6px;
            padding: 0 10px;
            color: #fff;
            background: #080c15;
            font: 750 .8rem Inter, system-ui, sans-serif;
            outline: none;
        }
        .route-world-style-wrap select:focus {
            border-color: #67e8f9;
            box-shadow: 0 0 0 2px rgba(103,232,249,.12);
        }
        .route-world-style-wrap span {
            color: rgba(245,247,251,.55);
            font: 650 .7rem Inter, system-ui, sans-serif;
        }
        .route-action-prompt-wrap {
            min-width: 0;
            display: grid;
            gap: 6px;
            padding: 11px;
            border: 1px solid rgba(255,79,163,.3);
            border-radius: 7px;
            background: rgba(255,79,163,.07);
        }
        .route-action-prompt-wrap[hidden] { display: none; }
        .route-action-prompt-wrap label {
            color: #ffd8eb;
            font: 850 .78rem Inter, system-ui, sans-serif;
            text-transform: uppercase;
        }
        .route-ride-preset-row {
            display: grid;
            grid-template-columns: auto minmax(220px, 1fr);
            align-items: center;
            gap: 10px;
        }
        .route-ride-preset-row select {
            width: 100%;
            min-height: 38px;
            box-sizing: border-box;
            border: 1px solid rgba(255,79,163,.42);
            border-radius: 6px;
            padding: 0 10px;
            color: #fff;
            background: #080c15;
            font: 750 .82rem Inter, system-ui, sans-serif;
            outline: none;
        }
        .route-action-prompt-wrap input {
            width: 100%;
            min-height: 42px;
            box-sizing: border-box;
            border: 1px solid rgba(255,79,163,.42);
            border-radius: 6px;
            padding: 0 12px;
            color: #fff;
            background: #080c15;
            font: 700 .86rem Inter, system-ui, sans-serif;
            outline: none;
        }
        .route-action-prompt-wrap input:focus {
            border-color: #ff83c0;
            box-shadow: 0 0 0 2px rgba(255,79,163,.12);
        }
        .route-action-prompt-wrap span {
            color: rgba(245,247,251,.6);
            font: 650 .7rem Inter, system-ui, sans-serif;
        }
        .route-world-generate {
            min-height: 42px;
            border: 1px solid #67e8f9;
            border-radius: 6px;
            padding: 0 16px;
            color: #071018;
            background: #67e8f9;
            font: 850 .82rem Inter, system-ui, sans-serif;
            cursor: pointer;
            white-space: nowrap;
        }
        .route-world-generate:disabled { cursor: wait; opacity: .65; }
        .route-world-upload,
        .route-tool-button,
        .route-role-switch button,
        .route-cancel-button,
        .route-save-button {
            min-height: 38px;
            border: 1px solid rgba(97,218,251,.3);
            border-radius: 6px;
            padding: 0 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #f5f7fb;
            background: rgba(17,22,35,.92);
            font: 800 .82rem Inter, system-ui, sans-serif;
            cursor: pointer;
        }
        .route-world-upload { color: #071018; background: #67e8f9; border-color: #67e8f9; }
        .route-role-switch { display: inline-flex; gap: 4px; }
        .route-role-switch button.active { box-shadow: 0 0 0 2px rgba(255,255,255,.78) inset; }
        .route-role-switch .route-role-a { color: #ff83c0; border-color: rgba(255,79,163,.5); }
        .route-role-switch .route-role-b { color: #b69cff; border-color: rgba(139,92,246,.6); }
        .route-save-button { color: #071018; background: #67e8f9; border-color: #67e8f9; }
        .route-save-button:disabled { cursor: wait; opacity: .65; }
        .route-canvas-wrap {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            max-height: 58vh;
            overflow: hidden;
            border: 1px solid rgba(97,218,251,.28);
            border-radius: 7px;
            background: #05070d;
        }
        #route-chase-canvas {
            display: block;
            width: 100%;
            height: 100%;
            touch-action: none;
            cursor: crosshair;
        }
        #route-chase-canvas.route-preview-only { cursor: default; }
        .route-role-switch[hidden],
        .route-tool-button[hidden] { display: none; }
        .route-canvas-empty {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 20px;
            text-align: center;
            color: rgba(245,247,251,.62);
            pointer-events: none;
        }
        .route-canvas-empty[hidden] { display: none; }
        .route-chase-help,
        .route-chase-status { margin: 0; color: rgba(245,247,251,.64); font-size: .82rem; line-height: 1.45; }
        .route-chase-status { min-height: 1.2em; color: #67e8f9; }
        .route-chase-status.error { color: #fb7185; }
        .route-chase-actions { justify-content: flex-end; }
        #magic-pen-modal {
            z-index: 10040;
            inset: 0;
            padding: 0;
            overflow: hidden;
            align-items: stretch;
            justify-content: stretch;
            background: #070b12;
            backdrop-filter: none;
        }
        #magic-pen-modal [hidden] { display: none !important; }
        .status-modal.magic-pen-card {
            width: 100vw;
            max-width: none;
            height: 100vh;
            height: 100dvh;
            margin: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 0;
            border-radius: 0;
            background: #0a0f19;
        }
        .magic-pen-body {
            width: min(1100px, 100%);
            min-height: 0;
            margin: 0 auto;
            padding: 22px 24px 48px;
            box-sizing: border-box;
            display: grid;
            gap: 14px;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        .magic-pen-note {
            display: grid;
            gap: 4px;
            padding: 12px 14px;
            border: 1px solid rgba(103,232,249,.28);
            border-radius: 10px;
            background: rgba(34,211,238,.07);
        }
        .magic-pen-note strong { color: #a5f3fc; font-size: .9rem; }
        .magic-pen-note span,
        .magic-pen-help { color: rgba(245,247,251,.66); font-size: .8rem; line-height: 1.45; }
        .magic-pen-character-section { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(236,72,153,.32); border-radius: 10px; background: rgba(236,72,153,.06); }
        .magic-pen-performer-section { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(103,232,249,.32); border-radius: 10px; background: rgba(34,211,238,.06); }
        .magic-pen-performer-grid { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; }
        .magic-pen-performer-upload { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .magic-pen-performer-upload .route-cancel-button { margin: 0; cursor: pointer; }
        .magic-pen-performer-preview { min-height: 0; }
        .magic-pen-performer-preview:empty { display: none; }
        .magic-pen-performer-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(7,11,20,.72); }
        .magic-pen-performer-card img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; }
        .magic-pen-performer-card div { display: grid; gap: 3px; }
        .magic-pen-performer-card strong { color: #a5f3fc; font-size: .82rem; }
        .magic-pen-performer-card span { color: rgba(245,247,251,.66); font-size: .76rem; line-height: 1.35; }
        .magic-pen-character-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
        .magic-pen-character-head > div { display: grid; gap: 3px; }
        .magic-pen-character-head strong { color: #f9a8d4; font-size: .88rem; }
        .magic-pen-character-head span { color: rgba(245,247,251,.64); font-size: .78rem; line-height: 1.35; }
        .magic-pen-character-beats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
        .magic-pen-character-beat { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(7,11,20,.72); }
        .magic-pen-character-beats[data-slot-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        button.magic-pen-character-beat { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
        button.magic-pen-character-beat:hover,
        button.magic-pen-character-beat.active { border-color: #67e8f9; background: rgba(14,116,144,.16); }
        .magic-pen-character-beat img,
        .magic-pen-character-empty { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; background: rgba(255,255,255,.06); }
        .magic-pen-character-empty { display: grid; place-items: center; color: rgba(245,247,251,.4); font-weight: 900; }
        .magic-pen-character-beat div { min-width: 0; display: grid; gap: 2px; }
        .magic-pen-character-beat strong { color: #f9a8d4; font-size: .7rem; text-transform: uppercase; }
        .magic-pen-character-beat span { color: #fff; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .magic-pen-inline-character-picker { min-width: 0; padding: 10px; border: 1px solid rgba(103,232,249,.28); border-radius: 9px; background: rgba(4,8,15,.86); }
        .magic-pen-inline-character-picker[hidden] { display: none; }
        .magic-pen-inline-character-picker .route-character-picker-grid { grid-auto-columns: 96px; }
        .magic-pen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .magic-pen-field { display: grid; gap: 6px; color: #f5f7fb; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }
        .magic-pen-field small { color: rgba(245,247,251,.55); font-weight: 600; text-transform: none; letter-spacing: 0; }
        .magic-pen-field input,
        .magic-pen-field select,
        .magic-pen-field textarea {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(103,232,249,.35);
            border-radius: 8px;
            background: #080d16;
            color: #fff;
            padding: 11px 12px;
            font: inherit;
            font-size: .9rem;
            font-weight: 600;
            line-height: 1.4;
            text-transform: none;
            letter-spacing: 0;
        }
        .magic-pen-field textarea { min-height: 132px; resize: vertical; }
        .magic-pen-field input:focus,
        .magic-pen-field select:focus,
        .magic-pen-field textarea:focus { outline: 2px solid rgba(103,232,249,.35); border-color: #67e8f9; }
        .magic-pen-help { margin: -2px 0 0; }
        .magic-pen-status { min-height: 1.2em; margin: 0; color: #67e8f9; font-size: .82rem; }
        .magic-pen-status.error { color: #fb7185; }
        .magic-pen-actions { justify-content: flex-end; }
        @media (max-width: 620px) {
            #route-chase-modal { padding: 0; align-items: stretch; }
            .status-modal.route-chase-card { width: 100vw; height: 100dvh; margin: 0; }
            .route-chase-card > .modal-head,
            .magic-pen-card > .modal-head { padding: 13px 14px; }
            .route-chase-body,
            .magic-pen-body { padding: 16px 12px 36px; }
            .route-chase-anchors { grid-template-columns: 1fr; }
            .route-chase-mode-switch { grid-template-columns: 1fr; }
            .route-camera-mode-note { align-items: flex-start; flex-direction: column; gap: 5px; }
            .route-chase-anchor img,
            .route-anchor-missing { width: 48px; height: 48px; flex-basis: 48px; }
            .route-world-generator { grid-template-columns: 1fr; }
            .route-ride-preset-row { grid-template-columns: 1fr; }
            .route-world-generate { width: 100%; }
            .route-chase-toolbar > * { flex: 1 1 auto; }
            .route-role-switch { width: 100%; }
            .route-role-switch button { flex: 1; }
            .route-canvas-wrap { max-height: 45vh; }
            .route-chase-actions { display: grid; grid-template-columns: 1fr; }
            #magic-pen-modal { padding: 0; }
            .status-modal.magic-pen-card { width: 100vw; height: 100dvh; margin: 0; }
            .magic-pen-grid { grid-template-columns: 1fr; }
            .magic-pen-performer-grid { grid-template-columns: 1fr; }
            .magic-pen-character-head { align-items: flex-start; flex-direction: column; }
            .magic-pen-character-beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .magic-pen-character-beats[data-slot-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .magic-pen-actions { display: grid; grid-template-columns: 1fr; }
        }
