@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 380 700;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 380 700;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/jbmono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/jbmono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #0a0c10;
    --bg-raised: #11141a;
    --bg-sunken: #07090c;
    --panel: #151922;
    --panel-border: #262c38;
    --panel-border-soft: #1d222b;
    --hover: #1a1f29;
    --text: #e2e5ea;
    --text-dim: #9aa3b2;
    --text-faint: #616b7a;
    --accent: #7c6cf0;
    --accent-strong: #9686ff;
    --accent-soft: rgba(124, 108, 240, 0.16);
    --green: #3ecf8e;
    --green-soft: rgba(62, 207, 142, 0.14);
    --red: #f2626b;
    --red-soft: rgba(242, 98, 107, 0.14);
    --amber: #e0a855;
    --amber-soft: rgba(224, 168, 85, 0.14);
    --radius: 10px;
    --radius-sm: 7px;
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.55);
    --sidebar-w: 232px;
    --header-h: 56px;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
::selection { background: var(--accent-soft); }

.muted { color: var(--text-dim); }
.dim { color: var(--text-faint); }


/* ---- dashboard shell ---- */

#app-shell { display: flex; min-height: 100dvh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background: var(--bg-raised);
    border-right: 1px solid var(--panel-border-soft);
    z-index: 40;
    transition: transform .2s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; flex-shrink: 0; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #45c9c0);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.brand-name { font-weight: 640; font-size: 14.5px; letter-spacing: -0.01em; }

.workspace-switch { padding: 0 14px 12px; flex-shrink: 0; }
/* Same small-caps caption idiom as .nav-group-heading below, so a sighted
   user reads this as "this control picks something" the instant they see
   it, without needing to open the select first -- the sidebar had no visible
   indication the dropdown was a workspace switcher at all before this. */
.workspace-switch-label {
    display: block;
    margin: 0 0 6px 2px;
    font-size: 10.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
}
.workspace-switch select {
    width: 100%;
    background: var(--bg-sunken);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 7px 8px;
    font-size: 12.5px;
    font-weight: 560;
}

/* min-height:0 is load bearing here, not decorative: this is a flex COLUMN
   child (.sidebar) with flex:1 and its own overflow-y:auto. A flex item's
   default min-height is auto (its content's own height), which wins over
   flex:1 and blocks shrinking -- without this the nav's content (now
   several headed groups plus "+more" affordances, not one flat list) can
   grow taller than the fixed-height sidebar around it instead of scrolling
   inside it, pushing the sign-out button off screen. Same bug class as a
   grid/flex child growing past its container on wide content; this is the
   tall-content version of it. */
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 10px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 520;
    margin-bottom: 2px;
    cursor: pointer;
}
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; }
/* the label is a flex item next to a fixed-size icon; without min-width:0 a
   longer label than today's set (or a translated one) would push outside
   the fixed sidebar width instead of truncating. */
.nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-mode { padding: 2px 14px 12px; flex-shrink: 0; }
.sidebar-mode-hint { margin: 6px 2px 0; font-size: 11px; line-height: 1.45; color: var(--text-faint); }

.nav-group { margin-top: 14px; }
.nav-group:first-of-type { margin-top: 6px; }
.nav-group-heading {
    margin: 0 0 4px;
    padding: 0 10px;
    font-size: 10.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
}
.nav-group-list { list-style: none; margin: 0; padding: 0; }
.nav-group-list li { margin: 0; }
/* Workspace administration is deliberately quieter than the rest of the
   sidebar: it is still one click away (never hidden further than any other
   section), just visually de-emphasised so it doesn't compete with the four
   tabs that actually get a stream on the air. */
.nav-group-workspace { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--panel-border-soft); }
.nav-group-workspace .nav-group-heading { color: var(--text-faint); opacity: 0.85; }
.nav-group-workspace .nav-link { font-size: 13px; opacity: 0.92; }

.nav-more {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 10px;
    margin-top: 1px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 560;
    cursor: pointer;
    text-align: left;
}
.nav-more:hover { background: var(--hover); color: var(--text-dim); }
.nav-more:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--panel-border-soft); flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 6px 6px 10px; font-size: 13px; }
.user-avatar {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }

.content-col { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.mobile-bar {
    display: none;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
    padding: 0 16px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--panel-border-soft);
    position: sticky;
    top: 0;
    z-index: 30;
}
.icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 18px; height: 18px; }
.mobile-bar-title { font-weight: 620; font-size: 14.5px; }

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 35; }

#panes { padding: 26px 30px 60px; max-width: 1180px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 0 18px;
    margin: -6px 0 20px;
}
.page-header h1 { font-size: 19px; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .content-col { margin-left: 0; }
    .mobile-bar { display: flex; }
    #panes { padding: 18px 16px 50px; }
}


/* ---- buttons, forms ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    color: var(--text);
    font-weight: 560;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
    white-space: nowrap;
    /* several buttons in this product are anchors (the landing page's "Get
       started", the register and verify pages' "Sign In" / "Continue"), and
       `a { color: inherit }` above leaves the browser's own underline in
       place. A button that is underlined reads as a link that failed to be
       styled, so the reset belongs on .btn itself rather than on each anchor
       that happens to use it. */
    text-decoration: none;
}
.btn:hover { background: var(--hover); border-color: #333a47; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-danger { background: transparent; border-color: rgba(242, 98, 107, 0.35); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { background: transparent; border-color: var(--panel-border); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-link-style { background: none; border: none; padding: 0; color: var(--accent-strong); cursor: pointer; font: inherit; text-decoration: none; }
.btn-link-style:hover { text-decoration: underline; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
/* same grid min-width:auto trap as .card-grid above -- a long help string
   or an unbroken token (a stream key, a URL) inside a label can otherwise
   force a form column wider than the card holding it. */
.form-grid > label { min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
label > span { font-weight: 570; color: var(--text); }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea {
    background: var(--bg-sunken);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: var(--text);
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="checkbox"] { width: auto; }
input[type="range"] { padding: 0; }

@media (max-width: 480px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span2 { grid-column: auto; }
}


/* ---- cards, stats ---- */

.card { background: var(--panel); border: 1px solid var(--panel-border-soft); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.card-grid > .card + .card { margin-top: 0; }
/* Grid items default to min-width:auto (their own content's min-content
   size), which wins over the track's minmax(200px,1fr) and can force the
   whole grid wider than its container -- the standard cause of "a div
   growing when it shouldn't". A long unbroken VOD title in the control
   room's now-playing card was exactly this: minmax(200px,1fr) promised a
   200px floor, but the title's own content forced the track wider. */
.card-grid > * { min-width: 0; }
.brand-kind-grid > * { min-width: 0; }
.stat-card { padding: 16px 18px; }
.stat-label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 650; }
.stat-value { font-size: 25px; font-weight: 700; margin-top: 8px; letter-spacing: -0.01em; }
.stat-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.section-title { font-size: 13px; font-weight: 650; margin: 0 0 12px; color: var(--text); }


/* ---- tables ---- */

.tbl-wrap { overflow-x: auto; border: 1px solid var(--panel-border-soft); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    padding: 11px 14px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--panel-border-soft);
    white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--panel-border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--hover); }
td.empty, td.err { text-align: center; padding: 34px 14px; color: var(--text-faint); }
td.err { color: var(--red); }
.row-unplayable { background: rgba(242, 98, 107, 0.05); }
.unsupported-reason { font-size: 11.5px; color: var(--red); margin-top: 3px; }


/* ---- badges ---- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 620;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ready { background: var(--green-soft); color: var(--green); }
.badge-downloading { background: var(--accent-soft); color: var(--accent-strong); }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-failed { background: var(--red-soft); color: var(--red); }
.badge-deleted { background: rgba(255,255,255,0.05); color: var(--text-faint); }
.badge-owner { background: rgba(124, 108, 240, 0.15); color: #b7a3ff; }
.badge-member { background: var(--accent-soft); color: var(--accent-strong); }
.badge-unplayable { background: var(--red-soft); color: var(--red); }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-past_due { background: var(--amber-soft); color: var(--amber); }
.badge-canceled { background: rgba(255,255,255,0.05); color: var(--text-faint); }


/* ---- progress ---- */

.progress-track { height: 6px; border-radius: 3px; background: var(--bg-sunken); border: 1px solid var(--panel-border-soft); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.progress-fill-done { background: var(--green); }
.progress-fill-failed { background: var(--red); }
.progress-label { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.storage-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--bg-sunken); border: 1px solid var(--panel-border-soft); }
.storage-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }


/* ---- actions ---- */

.act { background: none; border: none; color: var(--accent-strong); cursor: pointer; font-size: 12.5px; font-weight: 560; padding: 4px 6px; }
.act:hover { text-decoration: underline; }
.act-danger { color: var(--red); }


/* ---- empty / loading ---- */

.empty-state { text-align: center; padding: 46px 24px; }
.empty-state h2 { font-size: 16px; margin-bottom: 8px; }
.empty-state p { color: var(--text-dim); font-size: 13px; max-width: 420px; margin: 0 auto; }
.empty-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; }

.skeleton {
    background: linear-gradient(90deg, var(--panel) 25%, var(--hover) 37%, var(--panel) 63%);
    background-size: 400% 100%;
    animation: skeleton-wave 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-wave { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-row { height: 16px; margin: 6px 0; }
.skeleton-card { height: 96px; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }


/* ---- modal ---- */

#modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px;
    background: rgba(4, 5, 7, 0.65);
    z-index: 100;
    overflow-y: auto;
}
#modal.open { display: flex; }
#modal-box { background: var(--bg-raised); border: 1px solid var(--panel-border); border-radius: var(--radius); width: min(560px, 100%); box-shadow: var(--shadow-modal); }
#modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--panel-border-soft); }
#modal-title { font-size: 15px; }
#modal-close { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; }
#modal-close:hover { color: var(--text); }
#modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
#modal-foot { padding: 14px 20px 20px; display: flex; gap: 10px; }


/* ---- toasts ---- */

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    border: 1px solid var(--panel-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    font-size: 12.5px;
    animation: toast-in .16s ease;
}
.toast-out { opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.toast-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-icon svg { width: 100%; height: 100%; }
.toast-success .toast-icon { color: var(--green); }
.toast-error .toast-icon { color: var(--red); }
.toast-info .toast-icon { color: var(--accent-strong); }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 14px; padding: 0 0 0 4px; line-height: 1; }
.toast-close:hover { color: var(--text); }

.field-error { color: var(--red); font-size: 12.5px; }
.field-success { color: var(--green); font-size: 12.5px; }


/* ---- auth pages ---- */

.center-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(124,108,240,0.09), transparent),
        radial-gradient(700px 400px at 100% 100%, rgba(69,201,192,0.06), transparent),
        var(--bg);
}
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--panel-border-soft); border-radius: 14px; padding: 34px 30px; }
.login-eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); font-weight: 650; margin-bottom: 6px; }
.login-heading { font-size: 22px; margin-bottom: 22px; }
.login-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.login-btn {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 620;
    cursor: pointer;
}
.login-btn:hover { background: var(--accent-strong); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-footer { text-align: center; margin-top: 14px; font-size: 12.5px; }
.login-footer a, .login-link { color: var(--accent-strong); text-decoration: none; }
.login-footer a:hover, .login-link:hover { text-decoration: underline; }
#error, #lockout { display: none; margin-top: 10px; font-size: 12.5px; }
#error { color: var(--red); }
#lockout { color: var(--amber); }

.login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--panel-border-soft); }

.btn-twitch {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #6441a5;
    background: #6441a5;
    color: #fff;
    font-weight: 620;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-twitch:hover { background: #7d5bbe; }
.btn-twitch svg { width: 16px; height: 16px; fill: currentColor; }


/* ---- player pane ---- */

.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .player-layout { grid-template-columns: 1fr; } }
.player-picker { display: flex; flex-direction: column; gap: 10px; }
.player-side { display: flex; flex-direction: column; gap: 14px; }
.player-title { font-size: 16px; font-weight: 640; margin-top: 14px; }
.player-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }


/* ---- v1.1: toggle switch ---- */

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12.5px; color: var(--text-dim); }
.switch input { position: absolute; opacity: 0; width: 40px; height: 22px; margin: 0; cursor: pointer; }
.switch-track {
    width: 38px; height: 21px; border-radius: 999px; background: var(--bg-sunken);
    border: 1px solid var(--panel-border); position: relative; flex-shrink: 0; transition: background .15s ease, border-color .15s ease;
}
.switch-track::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
    background: var(--text-dim); transition: transform .15s ease, background .15s ease;
}
.switch input:checked + .switch-track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(17px); background: var(--accent-strong); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { font-weight: 570; color: var(--text); }


/* ---- v1.1: verdict / health banners ---- */

.verdict-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid transparent; }
.verdict-banner .verdict-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.verdict-clear { background: var(--green-soft); border-color: rgba(62,207,142,0.3); color: var(--green); }
.verdict-warn  { background: var(--amber-soft); border-color: rgba(224,168,85,0.35); color: var(--amber); }
.verdict-block { background: var(--red-soft); border-color: var(--red); color: var(--red); font-weight: 650; }
.verdict-block strong { color: var(--red); }

.health-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--panel-border-soft); background: var(--bg-raised); }
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.health-up { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.health-degraded { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.health-down { background: var(--text-faint); box-shadow: 0 0 0 3px rgba(255,255,255,0.05); }
.health-text { font-size: 12.5px; }
.health-text strong { display: block; font-size: 13.5px; margin-bottom: 2px; }


/* ---- v1.1: control room ---- */

.now-playing-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* a VOD title is arbitrary streamer-chosen text and can be one long
   unbroken token; overflow-wrap lets it break rather than push the grid
   track wider (see .card-grid > * above for the mechanism this guards
   against). */
.now-playing-title { font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.now-playing-meta { font-size: 12.5px; color: var(--text-dim); overflow-wrap: anywhere; }
.now-playing-idle { text-align: center; padding: 20px 10px; color: var(--text-dim); font-size: 13px; }
.control-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* baseline alignment put the pill-shaped badge visibly off the number's
   baseline -- a badge has vertical padding and a border, so it does not sit
   on a text baseline the way a bare digit does. center reads as one aligned
   unit instead of two mismatched rows. */
.viewer-stat { display: flex; align-items: center; gap: 8px; }
.viewer-stat .stat-value { font-size: 22px; }


/* ---- v1.1: reorderable lists (queue, group air order) ---- */

.reorder-list { display: flex; flex-direction: column; gap: 6px; }
.reorder-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--radius-sm);
    background: var(--bg-raised); border: 1px solid var(--panel-border-soft); font-size: 12.5px;
}
.reorder-item.dragging { opacity: 0.5; }
.reorder-item.drag-over { border-color: var(--accent); }
.reorder-handle { cursor: grab; color: var(--text-faint); flex-shrink: 0; touch-action: none; background: none; border: none; padding: 2px; display: flex; }
.reorder-handle:active { cursor: grabbing; }
.reorder-handle svg { width: 15px; height: 15px; }
.reorder-body { flex: 1; min-width: 0; }
.reorder-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reorder-sub { color: var(--text-faint); font-size: 11px; margin-top: 1px; }


/* ---- v1.1: schedule / dayparts ---- */

.daypart-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypart-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-dim); }
.daypart-day input { width: auto; }
@media (max-width: 640px) { .daypart-grid { grid-template-columns: repeat(4, 1fr); } }
.daypart-card { border: 1px solid var(--panel-border-soft); border-radius: var(--radius-sm); padding: 14px; background: var(--bg-raised); }
.daypart-card + .daypart-card { margin-top: 10px; }
.daypart-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-soft); color: var(--accent-strong); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; }
.tag-chip button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; font-size: 12px; line-height: 1; }


/* ---- v1.1: chapters ---- */

.chapter-panel { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.chapter-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; font-size: 12.5px; background: none; text-align: left; width: 100%; }
.chapter-item:hover { background: var(--hover); }
.chapter-item.chapter-active { background: var(--accent-soft); border-color: var(--accent); }
.chapter-kind-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chapter-kind-game { background: var(--accent-strong); }
.chapter-kind-break { background: var(--text-faint); }
.chapter-kind-highlight { background: var(--amber); }
.chapter-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.chapter-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-edit-btn { flex-shrink: 0; background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 2px; }
.chapter-edit-btn:hover { color: var(--accent-strong); }


/* ---- v1.1: guardrails ---- */

.guardrail-list { display: flex; flex-direction: column; gap: 8px; }
.guardrail-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--panel-border-soft); }
.guardrail-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.guardrail-pass .guardrail-icon { color: var(--green); }
.guardrail-fail .guardrail-icon { color: var(--red); }
.guardrail-label { font-weight: 600; font-size: 13px; }
.guardrail-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; }


/* ---- v1.1: branded media ---- */

.brand-kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.brand-kind-card { display: flex; flex-direction: column; gap: 10px; }
.brand-kind-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.brand-preview { border-radius: var(--radius-sm); background: var(--bg-sunken); border: 1px solid var(--panel-border-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 90px; }
.brand-preview img, .brand-preview video { max-width: 100%; max-height: 140px; display: block; }
.brand-preview audio { width: 100%; margin: 10px; }
.brand-preview-empty { color: var(--text-faint); font-size: 12px; padding: 24px 10px; text-align: center; }
.brand-asset-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 0; border-top: 1px solid var(--panel-border-soft); }
.brand-asset-row:first-child { border-top: none; }
.brand-asset-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }


/* ---- v1.1: seats / team ---- */

.seats-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 14px; }


/* ---- v1.1: pricing breakdown ---- */

.pricing-rows { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.pricing-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--panel-border-soft); font-size: 13px; }
.pricing-row:last-child { border-bottom: none; padding-top: 12px; font-weight: 650; font-size: 14px; }


/* ---- get started checklist ---- */

.getstarted-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.getstarted-steps { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }

.getstarted-step { display: flex; gap: 14px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--panel-border-soft); border-radius: var(--radius); }
.getstarted-step-marker { flex-shrink: 0; width: 26px; height: 26px; margin-top: 1px; }
.step-icon { width: 26px; height: 26px; color: var(--text-faint); }
.getstarted-step-done .step-icon { color: var(--green); }
.getstarted-step-in_progress .step-icon { color: var(--accent-strong); }
.getstarted-step-blocked .step-icon { color: var(--text-faint); opacity: 0.6; }
@media (prefers-reduced-motion: no-preference) {
    .step-icon-spin { animation: getstarted-spin 1.6s linear infinite; transform-origin: 50% 50%; }
}
@keyframes getstarted-spin { to { transform: rotate(360deg); } }

/* min-width:0 on the flex body is the same fix as .reorder-body elsewhere in
   this file: without it a long detail sentence (a channel display name, an
   unsupported-reason string) can force the card wider than its container
   instead of wrapping inside it. */
.getstarted-step-body { flex: 1; min-width: 0; }
.getstarted-step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.getstarted-step-num { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.getstarted-step-title { font-size: 15px; margin: 0; }
.getstarted-step-why { margin: 6px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.getstarted-step-detail { margin: 8px 0 12px; font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.getstarted-step-done { border-color: rgba(62, 207, 142, 0.28); }
.getstarted-step-blocked { opacity: 0.75; }
.pricing-row .dim { font-size: 11.5px; }
