        :root, :root[data-theme="charcoal-coral"] { color-scheme: dark; --bg: #111214; --surface: #191b1e; --surface-2: #212327; --border: #26292d; --text: #ececed; --muted: #9a9ea6; --accent: #ff5a4f; --accent-hover: #ff746b; --accent-fg: #1a0605; --accent-soft: #2a1716; --accent-border: rgba(255,90,79,0.55); }
        :root[data-theme="charcoal-crimson"] { --accent: #f43f5e; --accent-hover: #fb7185; --accent-fg: #ffffff; --accent-soft: rgba(244,63,94,0.16); --accent-border: rgba(244,63,94,0.55); }
        :root[data-theme="charcoal-amber"] { --accent: #f59e0b; --accent-hover: #fbbf24; --accent-fg: #140d04; --accent-soft: rgba(245,158,11,0.16); --accent-border: rgba(245,158,11,0.55); }
        :root[data-theme="charcoal-lime"] { --accent: #84cc16; --accent-hover: #a3e635; --accent-fg: #080c09; --accent-soft: rgba(132,204,22,0.16); --accent-border: rgba(132,204,22,0.55); }
        :root[data-theme="charcoal-emerald"] { --accent: #10b981; --accent-hover: #34d399; --accent-fg: #04130d; --accent-soft: rgba(16,185,129,0.16); --accent-border: rgba(16,185,129,0.55); }
        :root[data-theme="charcoal-cyan"] { --accent: #06b6d4; --accent-hover: #22d3ee; --accent-fg: #041318; --accent-soft: rgba(6,182,212,0.16); --accent-border: rgba(6,182,212,0.55); }
        :root[data-theme="charcoal-indigo"] { --accent: #6366f1; --accent-hover: #818cf8; --accent-fg: #ffffff; --accent-soft: rgba(99,102,241,0.18); --accent-border: rgba(99,102,241,0.55); }
        :root[data-theme="charcoal-violet"] { --accent: #a855f7; --accent-hover: #c084fc; --accent-fg: #ffffff; --accent-soft: rgba(168,85,247,0.18); --accent-border: rgba(168,85,247,0.55); }
        * { box-sizing: border-box; }
        body {
            margin: 0; min-height: 100vh; min-height: 100dvh;
            background: var(--bg); color: var(--text);
            font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            display: grid; place-items: center; padding: 20px;
        }
        .auth-card {
            width: min(410px, 100%);
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 16px; padding: 28px 24px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.55);
            display: flex; flex-direction: column; gap: 18px;
        }
        .auth-logo-wrap { display: flex; justify-content: center; color: var(--accent); }
        .auth-logo-svg { height: 34px; width: auto; display: block; }
        .auth-logo-svg .fil0, .auth-logo-svg path { fill: currentColor !important; }
        .auth-tabs {
            display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
            padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
        }
        .auth-tab {
            padding: 8px; border-radius: 7px; border: 0; background: transparent;
            color: var(--muted); font-size: 0.84rem; font-weight: 700; cursor: pointer;
            transition: background 0.15s ease, color 0.15s ease;
        }
        .auth-tab.is-active { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-border); }
        .auth-form { display: flex; flex-direction: column; gap: 12px; }
        .auth-form[hidden] { display: none; }
        .auth-field { display: flex; flex-direction: column; gap: 5px; }
        .auth-field label { font-size: 0.76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
        .auth-field input {
            height: 40px; padding: 0 12px; border-radius: 9px;
            background: var(--surface-2); border: 1px solid var(--border);
            color: var(--text); font-size: 0.9rem; outline: none;
        }
        .auth-field input:focus { border-color: var(--accent); }
        .auth-field input[data-tv-guard="1"] { caret-color: transparent; cursor: pointer; }
        .auth-field input[data-tv-guard="1"]:focus,
        .auth-field input:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 2px;
            border-color: var(--accent);
            box-shadow: 0 0 0 5px rgba(255, 90, 79, 0.35);
        }
        .auth-btn {
            margin-top: 4px; height: 42px; border-radius: 10px; border: 0;
            background: var(--accent); color: var(--accent-fg);
            font-size: 0.92rem; font-weight: 700; cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            transition: background 0.15s ease;
        }
        .auth-btn:hover { background: var(--accent-hover); }
        .auth-btn:disabled { opacity: 0.6; cursor: wait; }
        .auth-err {
            padding: 9px 12px; border-radius: 9px; font-size: 0.84rem; font-weight: 600;
            background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5;
        }
        .auth-err[hidden], .auth-card[hidden], .vs-prof-gate[hidden] { display: none; }
        .vs-auth-back {
            align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
            padding: 0; border: 0; background: none; color: var(--muted);
            font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
            transition: color 0.15s ease;
        }
        .vs-auth-back:hover { color: var(--text); }

        /* Netflix-style "Who's watching?" Profile Picker */
        .vs-prof-gate {
            width: min(860px, 100%);
            display: flex; flex-direction: column; align-items: center; text-align: center;
            gap: 28px; padding: 16px 8px;
            animation: vs-prof-in 0.24s cubic-bezier(.2, .7, .2, 1);
        }
        @keyframes vs-prof-in {
            from { opacity: 0; transform: translateY(10px) scale(0.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .vs-prof-logo {
            min-height: 54px; display: flex; align-items: center; justify-content: center;
            color: var(--text); opacity: 0.96;
            transition: opacity 0.14s ease, transform 0.14s ease;
        }
        .vs-prof-logo.is-swapping { opacity: 0; transform: scale(0.96); }
        .vs-prof-logo-svg {
            height: 46px; width: auto; max-width: min(82vw, 340px);
            display: block; object-fit: contain;
        }
        .vs-prof-title {
            margin: 0; font-size: clamp(1.85rem, 4.2vw, 3rem);
            font-weight: 600; letter-spacing: -0.02em; color: #fff; line-height: 1.15;
        }
        .vs-prof-err { width: min(420px, 100%); text-align: center; }
        .vs-prof-grid {
            display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center;
            gap: clamp(18px, 3.2vw, 32px); width: 100%;
        }
        .vs-prof-tile {
            position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
            width: 142px; padding: 0; border: 0; background: none; color: var(--muted);
            font: inherit; cursor: pointer; outline: none;
            transition: color 0.18s ease, transform 0.18s ease, opacity 0.2s ease;
        }
        .vs-prof-tile.is-removing { opacity: 0; transform: scale(0.86); pointer-events: none; }
        .vs-prof-tile.is-busy { opacity: 0.65; pointer-events: none; }
        .vs-prof-art {
            position: relative; width: 136px; height: 136px; border-radius: 12px; overflow: hidden;
            display: grid; place-items: center;
            background: linear-gradient(145deg, var(--pcol, #ff5a4f), color-mix(in srgb, var(--pcol, #ff5a4f) 52%, #000));
            border: 3px solid transparent;
            box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
            transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        }
        .vs-prof-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .vs-prof-initial {
            font-size: 3.1rem; font-weight: 800; color: #fff; line-height: 1;
            text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
        }
        .vs-prof-tile:hover .vs-prof-art,
        .vs-prof-tile:focus-visible .vs-prof-art {
            border-color: #fff; transform: scale(1.05);
            box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62);
        }
        .vs-prof-tile:hover,
        .vs-prof-tile:focus-visible { color: #fff; }
        .vs-prof-tile.is-current .vs-prof-art { border-color: rgba(255, 255, 255, 0.42); }
        .vs-prof-name {
            display: inline-flex; align-items: center; justify-content: center; gap: 6px;
            max-width: 100%; font-size: 1rem; font-weight: 600;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .vs-prof-dot {
            width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
            background: var(--accent); box-shadow: 0 0 8px var(--accent);
        }

        /* Add Profile Tile (only shown while managing profiles) */
        .vs-prof-add[hidden] { display: none !important; }
        .vs-prof-gate.is-managing .vs-prof-add:not([hidden]) {
            animation: vs-prof-in 0.2s cubic-bezier(.2, .7, .2, 1);
        }
        .vs-prof-add-art {
            background: transparent; border-color: transparent; box-shadow: none;
        }
        .vs-prof-add-circle {
            width: 82px; height: 82px; border-radius: 50%;
            display: grid; place-items: center; font-size: 2.35rem;
            background: rgba(255, 255, 255, 0.14); color: #111214;
            transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }
        .vs-prof-add-circle i { color: #111214; }
        .vs-prof-add:hover .vs-prof-add-art,
        .vs-prof-add:focus-visible .vs-prof-add-art {
            border-color: transparent; background: rgba(255, 255, 255, 0.08);
            box-shadow: none;
        }
        .vs-prof-add:hover .vs-prof-add-circle,
        .vs-prof-add:focus-visible .vs-prof-add-circle {
            background: #fff; transform: scale(1.06);
        }

        /* Manage Profiles Mode */
        .vs-prof-del-overlay {
            position: absolute; inset: 0; display: grid; place-items: center;
            background: rgba(0, 0, 0, 0.56); color: #fff; font-size: 1.55rem;
            opacity: 0; pointer-events: none; transition: opacity 0.18s ease, background 0.18s ease;
        }
        .vs-prof-gate.is-managing .vs-prof-tile:not(.vs-prof-add) .vs-prof-del-overlay { opacity: 1; }
        .vs-prof-gate.is-managing .vs-prof-tile:not(.vs-prof-add):hover .vs-prof-del-overlay {
            background: rgba(220, 38, 38, 0.68);
        }
        .vs-prof-gate.is-managing .vs-prof-tile:not(.vs-prof-add):hover .vs-prof-art {
            border-color: #ef4444;
        }

        .vs-prof-foot {
            display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
            margin-top: 8px;
        }
        .vs-prof-manage-btn, .vs-prof-cancel-btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            min-height: 40px; padding: 0 22px; border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.28); background: transparent;
            color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 600;
            letter-spacing: 0.04em; text-decoration: none; cursor: pointer;
            transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
        }
        .vs-prof-manage-btn:hover, .vs-prof-cancel-btn:hover {
            border-color: #fff; color: #fff;
        }
        .vs-prof-tile:focus-visible { outline: none; }
        .vs-prof-tile:focus-visible .vs-prof-art,
        .vs-prof-tile.is-current:focus-visible .vs-prof-art {
            border-color: #fff;
            box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(255, 90, 79, 0.5), 0 18px 40px rgba(0, 0, 0, 0.55);
            transform: scale(1.06);
        }
        .vs-prof-tile:focus-visible .vs-prof-name { color: #fff; }
        .vs-prof-manage-btn:focus-visible, .vs-prof-cancel-btn:focus-visible,
        .vs-auth-back:focus-visible, .auth-tab:focus-visible, .auth-btn:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 3px;
            box-shadow: 0 0 0 5px rgba(255, 90, 79, 0.35);
            color: #fff;
        }
        .vs-prof-gate.is-managing .vs-prof-manage-btn {
            background: #fff; border-color: #fff; color: #111214; font-weight: 800;
        }

        /* Remove Profile Confirmation Modal */
        .vs-prof-modal-backdrop {
            position: fixed; inset: 0; z-index: 120;
            display: grid; place-items: center; padding: 20px;
            background: rgba(0, 0, 0, 0.72);
            -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
            animation: vs-prof-in 0.16s cubic-bezier(.2, .7, .2, 1);
        }
        .vs-prof-modal-backdrop[hidden] { display: none !important; }
        .vs-prof-modal {
            width: min(380px, 100%);
            background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 18px; padding: 26px 24px 22px;
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
            display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
        }
        .vs-prof-modal-avatar {
            width: 68px; height: 68px; border-radius: 14px; overflow: hidden;
            display: grid; place-items: center; margin-bottom: 2px;
            background: linear-gradient(145deg, var(--pcol, #ff5a4f), color-mix(in srgb, var(--pcol, #ff5a4f) 52%, #000));
            box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
        }
        .vs-prof-modal-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .vs-prof-modal-avatar span { font-size: 1.85rem; font-weight: 800; color: #fff; line-height: 1; }
        .vs-prof-modal-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: #fff; }
        .vs-prof-modal-msg { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
        .vs-prof-modal-msg strong { color: #fff; font-weight: 700; }
        .vs-prof-modal-actions {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
            width: 100%; margin-top: 8px;
        }
        .vs-prof-modal-btn {
            height: 44px; padding: 0 16px; border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2); background: var(--surface-2);
            color: var(--text); font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
        }
        .vs-prof-modal-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); }
        .vs-prof-modal-btn:active { transform: scale(0.97); }
        .vs-prof-modal-btn:disabled { opacity: 0.55; cursor: wait; }
        .vs-prof-modal-btn.is-danger {
            background: #ef4444; border-color: #ef4444; color: #fff;
        }
        .vs-prof-modal-btn.is-danger:hover { background: #dc2626; border-color: #dc2626; }
        .vs-prof-modal-btn:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 3px;
            box-shadow: 0 0 0 5px rgba(255, 90, 79, 0.4);
        }

        @media (max-width: 600px) {
            .vs-prof-gate { gap: 22px; }
            .vs-prof-grid { gap: 18px 16px; }
            .vs-prof-tile { width: 112px; gap: 9px; }
            .vs-prof-art { width: 104px; height: 104px; border-radius: 12px; }
            .vs-prof-initial { font-size: 2.35rem; }
            .vs-prof-add-circle { width: 68px; height: 68px; font-size: 1.9rem; }
            .vs-prof-name { font-size: 0.9rem; }
        }
