:root{
  --bg:#0f1117; --panel:#151821; --muted:#9aa4b2; --text:#f8fafc; --accent:#8b5cf6;
  --ok:#22c55e; --warn:#f59e0b; --danger:#ef4444;
  --role-mod:#60a5fa; --role-vip:#fbbf24; --role-sub:#34d399; --role-none:#4b5563;
  --w: min(1100px, 96vw);
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:14px/1.4 system-ui,Segoe UI,Roboto,Arial}
.setup-guard{max-width:var(--w);margin:16px auto;padding:12px 16px;border-radius:12px;border:1px solid rgba(248,113,113,.4);background:rgba(239,68,68,.12);color:#fecaca;font-size:14px;line-height:1.5}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.status-bar{display:flex;align-items:center;gap:12px;background:var(--panel);border-bottom:1px solid #24283b;padding:10px 16px}
.status-user{display:flex;align-items:center;gap:10px;min-width:0}
.status-avatar{width:36px;height:36px;border-radius:50%;border:1px solid #24283b;background:#121423;color:var(--muted);font-weight:600;display:grid;place-items:center;overflow:hidden;background-size:cover;background-position:center}
.status-info{display:flex;flex-direction:column;line-height:1.2}
.status-name{font-weight:600;white-space:nowrap}
.status-channel{font-size:12px;color:var(--muted);white-space:nowrap}
.status-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.status-action{padding:.35rem .75rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--text);cursor:pointer}
.status-action:hover{background:#1b1f2b}
.status-action.danger{border-color:var(--danger);color:var(--danger)}
.status-action.danger:hover{background:rgba(239,68,68,0.15)}
.wrap{max-width:var(--w);margin:24px auto;padding:0 8px}
.header{display:flex;gap:16px;align-items:center;margin-bottom:16px;position:relative}
.dev-stamp{position:absolute;top:-16px;right:-16px;padding:.45rem 1.5rem;border:2px solid rgba(255,94,135,.65);border-radius:.5rem;background:rgba(255,94,135,.18);color:rgba(255,145,180,.95);font-weight:800;font-size:1.05rem;letter-spacing:.35rem;transform:rotate(-12deg);text-transform:uppercase;pointer-events:none;user-select:none;box-shadow:0 12px 30px rgba(255,94,135,.2)}
.dev-stamp[hidden]{display:none!important}
.brand{font-weight:700;font-size:20px}
.badge{display:inline-block;padding:.15rem .5rem;border-radius:999px;background:var(--panel);border:1px solid #24283b;color:var(--muted);font-size:12px}
.badge.ok{border-color:var(--ok);color:var(--ok)}
.badge.warn{border-color:var(--warn);color:var(--warn)}
.badge.error{border-color:var(--danger);color:var(--danger)}
.grid{display:grid;grid-template-columns:2fr 1fr;gap:16px}
.card{background:var(--panel);border:1px solid #24283b;border-radius:12px;padding:14px}
.card h2{margin:0 0 10px 0;font-size:16px}
.row{display:flex;gap:10px;align-items:center}
.queue{display:flex;flex-direction:column;gap:10px}
.users-controls{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.users-controls input{padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text)}
.users-controls input:focus{outline:2px solid var(--accent);outline-offset:2px}
.users-pagination{display:flex;align-items:center;gap:10px;margin:4px 0 12px 0}
.users-pagination button{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.users-pagination button:hover{background:#24283b}
.users-pagination .muted{min-width:90px;text-align:center}
.users-list{display:flex;flex-direction:column;gap:10px}
.user-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border-radius:10px;border:1px solid #24283b;background:#121423}
.user-row:hover{border-color:var(--accent)}
.user-identity{display:flex;flex-direction:column;gap:6px;min-width:0}
.user-topline{display:flex;align-items:center;gap:8px;min-width:0}
.user-name{font-weight:700;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.user-meta-line{display:flex;flex-wrap:wrap;gap:6px}
.user-meta-chip{padding:2px 6px;border-radius:6px;border:1px solid #24283b;background:#0f1117;color:var(--muted);font-size:12px}
.user-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end}
.user-actions button{padding:.35rem .55rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:700}
.user-actions button:hover{background:#24283b}
.user-role-badge{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;font-size:11px;font-weight:800;color:#0b0d13;border:1px solid #0b0d13}
.user-role-mod{background:var(--role-mod)}
.user-role-vip{background:var(--role-vip)}
.user-role-sub{background:var(--role-sub)}
.user-role-viewer{background:var(--role-none);color:#e5e7eb;border-color:#303443}
.user-row .muted{font-size:12px}
.user-row[hidden]{display:none!important}
.user-row .user-meta-chip{letter-spacing:.01em}
@media (max-width: 640px){
  .user-row{grid-template-columns:minmax(0,1fr);gap:10px}
  .user-actions{justify-content:flex-start;flex-wrap:wrap}
}
.queue-layout{display:flex;flex-direction:column;gap:24px}
.queue-column{flex:1 1 auto;min-width:min(800px,100%);display:flex;flex-direction:column;gap:12px}
.preview-column{flex:1 1 auto}
.preview-card{display:flex;flex-direction:column;gap:14px;background:#151821;border:1px solid #24283b;border-radius:14px;padding:14px}
.section-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-title{margin:0;font-size:16px}
.preview-card .section-title{font-size:16px}
.collapse-toggle{padding:.3rem .65rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--muted);cursor:pointer;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.03em}
.collapse-toggle:hover{background:#1b1f2b;color:var(--text)}
.collapse-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.collapsible-content.collapsed{display:none}
.preview-video{position:relative;width:100%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#05070d}
.preview-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.preview-video.empty iframe{display:none}
.preview-message{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:12px;text-align:center;font-size:13px;color:var(--muted)}
.preview-video:not(.empty) .preview-message{display:none}
.preview-link-group{display:flex;flex-direction:column;gap:6px}
.preview-link-group label{font-weight:600;color:var(--text)}
.preview-link-row{display:flex;gap:8px}
#preview-url{flex:1;padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text);font-family:monospace;font-size:12px}
#preview-url:focus{outline:2px solid var(--accent);outline-offset:2px}
#preview-copy{padding:.45rem .9rem;border-radius:8px;border:1px solid var(--accent);background:rgba(139,92,246,0.1);color:var(--accent);cursor:pointer;font-weight:600}
#preview-copy:disabled{opacity:.5;cursor:not-allowed}
#preview-copy:not(:disabled):hover{background:rgba(139,92,246,0.18)}
.preview-results{display:flex;flex-direction:column;gap:10px}
.preview-results-header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.preview-results-title{font-weight:600}
.preview-status{font-size:12px;color:var(--muted)}
.preview-results-list{display:flex;flex-direction:column;gap:8px}
.preview-empty{padding:12px;border-radius:10px;border:1px dashed #24283b;background:#0f1117;color:var(--muted);font-size:13px;text-align:center}
.preview-result{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:10px;border:1px solid #24283b;background:#0f1117;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease;appearance:none;-webkit-appearance:none}
.preview-result:hover:not(:disabled){border-color:var(--accent)}
.preview-result.active{border-color:var(--accent);box-shadow:0 0 0 1px rgba(139,92,246,0.25) inset}
.preview-result:disabled{opacity:.6;cursor:not-allowed}
.preview-thumb{width:64px;height:48px;border-radius:8px;overflow:hidden;background:#070910;display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--muted)}
.preview-thumb img{width:100%;height:100%;object-fit:cover}
.preview-result-info{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.preview-result-title{font-weight:600;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.preview-result-meta{font-size:12px;color:var(--muted);display:flex;flex-wrap:wrap;gap:6px}
.item{display:grid;grid-template-columns:56px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px;border-radius:10px;border:1px solid #24283b;background:#121423;cursor:pointer}
.item.prio{border-color:var(--accent);box-shadow:0 0 0 1px rgba(139,92,246,0.2) inset}
.item.played{opacity:.6;background:#0f121a}
.item.selected{border-color:var(--accent);box-shadow:0 0 0 1px rgba(139,92,246,0.35) inset}
.thumb{width:56px;height:42px;border-radius:6px;background:#0b0d13;display:grid;place-items:center;color:var(--muted);font-weight:700}
.thumb img{width:100%;height:100%;object-fit:cover;border-radius:6px}
.meta{min-width:150px;text-align:right;color:var(--muted);font-size:12px;display:flex;flex-direction:column;gap:4px;align-items:flex-end}
.meta .badge{margin-left:0}
.meta-time{font-size:12px;color:var(--muted)}
.title{font-weight:600}
.muted{color:var(--muted);font-size:12px}
.ctrl{display:flex;gap:6px}
.ctrl button{padding:.3rem .45rem;border-radius:6px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer}
.ctrl button:hover{background:#24283b}
.badge.accent{border-color:var(--accent);background:rgba(139,92,246,0.15);color:var(--accent)}
.sep{height:1px;background:#24283b;margin:8px 0}
.info p{margin:.25rem 0;color:var(--muted)}
.dev-view{color:var(--muted);line-height:1.6}
.dev-placeholder{margin:0;font-style:italic;opacity:.85}
.tabs{display:flex;gap:8px;margin-bottom:8px}
.tab{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--muted);cursor:pointer}
.tab.active{color:var(--text);border-color:var(--accent)}
.playlist-form{display:flex;flex-direction:column;gap:16px;margin-bottom:16px;padding:16px;border-radius:12px;border:1px solid #24283b;background:#121423}
.playlist-mode{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:10px}
.playlist-mode-legend{font-weight:700;text-transform:uppercase;letter-spacing:.05em;font-size:12px;color:var(--muted)}
.playlist-mode-options{display:flex;flex-wrap:wrap;gap:12px}
.playlist-mode-option{position:relative;flex:1 1 200px;display:flex;flex-direction:column;gap:6px;padding:12px 14px 12px 44px;border-radius:10px;border:1px solid #24283b;background:#0f1117;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease}
.playlist-mode-option:hover{border-color:var(--accent)}
.playlist-mode-option input{position:absolute;top:16px;left:16px;accent-color:var(--accent);margin:0}
.playlist-mode-option .playlist-mode-label{font-weight:600;color:var(--text)}
.playlist-mode-option .playlist-mode-hint{font-size:12px;color:var(--muted)}
.playlist-mode-option.active{border-color:var(--accent);box-shadow:0 0 0 1px rgba(139,92,246,0.25)}
.playlist-mode-option.active .playlist-mode-label{color:var(--accent)}
.playlist-mode-option.active .playlist-mode-hint{color:var(--text)}
.playlist-form-section{display:flex;flex-direction:column;gap:12px}
.playlist-form-section[hidden]{display:none}
.playlist-form-row{display:flex;flex-direction:column;gap:6px}
.playlist-form-row label{font-weight:600;color:var(--text)}
.playlist-form-row input,.playlist-form-row select{padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text)}
.playlist-form-row input:focus,.playlist-form-row select:focus{outline:2px solid var(--accent);outline-offset:2px}
.playlist-form-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.playlist-form button[type="submit"]{padding:.45rem .9rem;border-radius:8px;border:1px solid var(--accent);background:rgba(139,92,246,0.18);color:var(--accent);cursor:pointer;font-weight:600}
.playlist-form button[type="submit"]:hover{background:rgba(139,92,246,0.26)}
.playlist-form.loading button[type="submit"]{opacity:.6;cursor:wait}
.playlist-form-hint{margin:4px 0 0 0}
.playlist-status{font-size:12px}
.playlist-status.error,.muted.error{color:var(--danger)}
.playlists-list{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.playlist-card{border:1px solid #24283b;border-radius:12px;padding:14px;background:#121423;display:flex;flex-direction:column;gap:12px}
.playlist-card.loading{opacity:.6}
.playlist-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.playlist-header-info{display:flex;flex-direction:column;gap:6px}
.playlist-header-info h3{margin:0;font-size:15px}
.playlist-meta{font-size:12px}
.playlist-meta-link a{font-size:12px}
.playlist-toggle{padding:.35rem .75rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.03em}
.playlist-toggle:hover{background:#24283b}
.playlist-manage{border-top:1px solid #1f2330;padding-top:12px;display:flex;flex-direction:column;gap:10px}
.playlist-manage-actions{display:flex;flex-wrap:wrap;gap:8px}
.playlist-manage-actions button{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.playlist-manage-actions button:hover{background:#24283b}
.playlist-details-form{display:flex;flex-direction:column;gap:12px}
.playlist-details-grid{display:flex;flex-wrap:wrap;gap:12px}
.playlist-field{flex:1 1 200px;display:flex;flex-direction:column;gap:6px}
.playlist-field label{font-size:13px;font-weight:600;color:var(--muted)}
.playlist-field input,.playlist-field select{padding:.4rem .6rem;border-radius:8px;border:1px solid #24283b;background:#151824;color:var(--text);font-size:13px}
.playlist-field input:disabled{opacity:.6;cursor:not-allowed}
.playlist-field-hint{margin:0;font-size:12px;color:var(--muted)}
.playlist-details-actions{display:flex;gap:8px}
.playlist-details-actions button{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.playlist-details-actions button:hover{background:#24283b}
.playlist-manual-hint{margin:0;font-size:11px;color:var(--muted)}
.playlist-keywords-form{display:flex;flex-direction:column;gap:8px}
.playlist-keywords-form label{font-weight:600;color:var(--text);font-size:13px}
.playlist-keywords-form input{padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text)}
.playlist-keywords-form input:focus{outline:2px solid var(--accent);outline-offset:2px}
.playlist-keywords-form.loading{opacity:.7}
.app-footer{max-width:var(--w);margin:24px auto 40px;padding:12px 16px;text-align:center;font-size:12px;color:var(--muted);letter-spacing:.05em}
.app-footer[hidden]{display:none!important}
.playlist-keywords-actions{display:flex;gap:8px;flex-wrap:wrap}
.playlist-keywords-actions button{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.playlist-keywords-actions button:hover{background:#24283b}
.playlist-keywords-actions button.danger{border-color:var(--danger);color:var(--danger)}
.playlist-keywords-actions button.danger:hover{background:rgba(239,68,68,0.18)}
.playlist-keywords-hint{margin:0;font-size:11px;line-height:1.4}
.playlist-items{display:flex;flex-direction:column;gap:8px}
.playlist-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px;border-radius:10px;border:1px solid #24283b;background:#0f1117}
.playlist-item-info{display:flex;flex-direction:column;gap:4px;min-width:0}
.playlist-item-title{font-weight:600}
.playlist-item-meta{font-size:12px;color:var(--muted)}
.playlist-item-actions{display:flex;gap:8px}
.playlist-item-actions button{padding:.35rem .65rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.playlist-item-actions button:hover{background:#24283b}
.playlist-item-actions button.accent{border-color:var(--accent);background:rgba(139,92,246,0.15);color:var(--accent)}
.playlist-item-actions button.accent:hover{background:rgba(139,92,246,0.24)}
.playlist-item-actions button.danger{border-color:var(--danger);color:var(--danger)}
.playlist-item-actions button.danger:hover{background:rgba(239,68,68,0.18)}
.playlist-loading{font-size:12px;color:var(--muted)}
.toast-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;gap:10px;max-width:320px;z-index:2000;pointer-events:none}
.toast{padding:10px 14px;border-radius:10px;border:1px solid #24283b;background:#121423;color:var(--text);box-shadow:0 12px 36px rgba(5,7,13,0.55);font-size:13px;pointer-events:auto;animation:toast-slide .25s ease}
.toast.success{border-color:var(--ok);color:var(--ok)}
.toast.error{border-color:var(--danger);color:var(--danger)}
@keyframes toast-slide{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.playlist-picker{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,9,14,0.75);z-index:1900;padding:16px}
.playlist-picker[hidden]{display:none!important}
.playlist-picker-dialog{display:flex;flex-direction:column;gap:16px;padding:20px;border-radius:16px;border:1px solid #24283b;background:#151821;box-shadow:0 18px 50px rgba(8,9,14,0.65);max-width:360px;width:100%}
.playlist-picker-label{display:flex;flex-direction:column;gap:6px;font-weight:600;color:var(--text)}
.playlist-picker-label select{padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text)}
.playlist-picker-label select:focus{outline:2px solid var(--accent);outline-offset:2px}
.playlist-picker-actions{display:flex;justify-content:flex-end;gap:8px}
.playlist-picker-actions button{padding:.4rem .8rem;border-radius:8px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-weight:600}
.playlist-picker-actions button:hover{background:#24283b}
.playlist-picker-actions .accent{border-color:var(--accent);background:rgba(139,92,246,0.18);color:var(--accent)}
.playlist-picker-actions .accent:hover{background:rgba(139,92,246,0.26)}
.streams{display:flex;flex-direction:column;gap:6px;max-height:300px;overflow:auto}
.stream{padding:8px;border-radius:8px;border:1px solid #24283b;background:#121423;cursor:pointer}
.stream.active{border-color:var(--accent)}
.footer{margin-top:10px;color:var(--muted);font-size:12px}
.landing{display:flex;flex-direction:column;align-items:center;gap:16px;margin:80px auto;text-align:center;position:relative}
.landing h1{margin:0 0 20px;font-size:32px}
.landing button{padding:.5rem 1rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--text);cursor:pointer}
.login-scope-blurb{display:flex;flex-direction:column;gap:6px;max-width:520px;text-align:left;border:1px solid #24283b;border-radius:12px;background:#10121c;padding:12px}
.login-scope-title{font-weight:700;font-size:14px;color:var(--text)}
.login-scope-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--text)}
.login-scope-note{margin:0;font-size:12px;color:var(--muted)}
.channel-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.overlay-builder{display:flex;flex-wrap:wrap;gap:20px;margin-top:16px}
.overlay-controls{flex:1 1 260px;display:flex;flex-direction:column;gap:16px}
.overlay-family-tabs{display:flex;gap:8px;flex-wrap:wrap}
.overlay-family-tab{padding:.4rem .8rem;border-radius:999px;border:1px solid #24283b;background:#121423;color:var(--muted);cursor:pointer;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;transition:all .15s ease}
.overlay-family-tab:hover{background:#1b1f2b;color:var(--text)}
.overlay-family-tab.active{border-color:var(--accent);color:var(--text);background:rgba(139,92,246,0.16);box-shadow:0 0 0 1px rgba(139,92,246,0.18)}
.overlay-section{display:flex;flex-direction:column;gap:12px;padding:12px;border-radius:12px;border:1px solid #1f2330;background:#121423}
.overlay-section[hidden]{display:none}
.overlay-section-intro{margin:0;font-size:12px;color:var(--muted)}
.overlay-controls label{display:flex;flex-direction:column;gap:6px;font-weight:600;color:var(--text)}
.overlay-controls select{padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--text)}
.overlay-link-group{display:flex;flex-direction:column;gap:6px}
.overlay-link-row{display:flex;gap:8px}
#overlay-url{flex:1;padding:.45rem .6rem;border-radius:8px;border:1px solid #24283b;background:#0f1117;color:var(--text);font-family:monospace;font-size:12px}
#overlay-url:focus{outline:2px solid var(--accent);outline-offset:2px}
#overlay-copy{padding:.45rem .9rem;border-radius:8px;border:1px solid var(--accent);background:rgba(139,92,246,0.1);color:var(--accent);cursor:pointer;font-weight:600}
#overlay-copy:hover{background:rgba(139,92,246,0.18)}
.overlay-dimensions{font-size:12px;margin-top:2px}
.overlay-preview{flex:1 1 360px;min-width:280px;display:flex;align-items:center;justify-content:center}
.overlay-preview-frame{position:relative;width:100%;display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;background:linear-gradient(45deg,#1e1f2a,#0d0e15);padding:16px;border-radius:16px;border:1px solid #24283b;box-shadow:0 24px 50px rgba(8,9,14,0.6)}
.overlay-preview iframe{width:100%;border:0;border-radius:12px;background:transparent;box-shadow:0 10px 30px rgba(8,9,14,0.55);aspect-ratio:4/3;min-height:200px}
.overlay-preview-hints{display:flex;flex-direction:column;gap:4px;width:100%}
.overlay-preview-hint{text-align:center;font-size:12px}
.overlay-warning{padding:.6rem .75rem;border-radius:10px;border:1px solid rgba(239,68,68,0.4);background:rgba(239,68,68,0.08);color:#fca5a5;font-size:13px}
.events-header{display:flex;align-items:center;gap:16px;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}
.events-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-left:auto}
.event-status{font-size:12px;color:var(--muted);font-weight:600}
.event-status.ok{color:var(--ok)}
.event-status.warn{color:var(--warn)}
.event-status.error{color:var(--danger)}
.event-autoscroll{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.event-autoscroll input{accent-color:var(--accent)}
#event-clear{padding:.35rem .7rem;border-radius:8px;border:1px solid #24283b;background:#121423;color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
#event-clear:hover{background:#1b1f2b}
.event-feed{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;border:1px solid #24283b;background:#0f1117;min-height:240px;max-height:420px;overflow:auto;font-family:"SFMono-Regular","Consolas","Liberation Mono",monospace;font-size:12px;line-height:1.5}
.event-entry{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:#121423;border:1px solid #1f2330}
.event-entry-meta{font-size:11px;color:var(--muted);letter-spacing:.03em;text-transform:uppercase}
.event-entry-type{color:var(--accent)}
.event-entry-body{margin:0;white-space:pre-wrap;word-break:break-word}
.overlay-hint{margin-top:18px}
.streamerbot-notes,.streamerbot-shortcuts{margin-top:12px;display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;border:1px solid #24283b;background:#121423}
.streamerbot-shortcuts.disabled{opacity:.65}
.streamerbot-notes label{font-weight:700;color:var(--text)}
#streamerbot-notes-field{width:100%;min-height:90px;resize:vertical;padding:.6rem .7rem;border-radius:10px;border:1px solid #24283b;background:#0f1117;color:var(--text);font-size:13px}
#streamerbot-notes-field:focus{outline:2px solid var(--accent);outline-offset:2px}
.streamerbot-shortcut-list{display:flex;flex-direction:column;gap:10px}
.streamerbot-shortcut{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px;border-radius:10px;border:1px solid #24283b;background:#0f1117}
.streamerbot-shortcut-info{display:flex;flex-direction:column;gap:6px;flex:1 1 auto;min-width:0}
.streamerbot-shortcut-title{margin:0;font-size:14px}
.streamerbot-shortcut-desc{margin:0;color:var(--muted);font-size:12px}
.streamerbot-shortcut-url{display:block;padding:.4rem .5rem;border-radius:8px;background:#121423;border:1px dashed #24283b;color:var(--text);font-family:"SFMono-Regular","Consolas","Liberation Mono",monospace;font-size:12px;word-break:break-all}
.streamerbot-shortcut-actions{display:flex;align-items:center;gap:10px}
.streamerbot-copy{padding:.4rem .75rem;border-radius:8px;border:1px solid var(--accent);background:rgba(139,92,246,0.12);color:var(--accent);cursor:pointer;font-weight:600;font-size:12px;white-space:nowrap}
.streamerbot-copy:hover{background:rgba(139,92,246,0.2)}

.settings-list{display:flex;flex-direction:column;gap:14px;margin-top:16px}
.settings-section{display:flex;flex-direction:column;gap:10px}
.settings-group{display:flex;flex-direction:column;gap:12px}
.setting-row{display:flex;flex-wrap:wrap;gap:18px;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;border:1px solid #24283b;background:#121423}
.setting-info{flex:1 1 260px;display:flex;flex-direction:column;gap:6px}
.setting-info h3{margin:0;font-size:15px}
.setting-control{flex:0 0 auto;display:flex;align-items:center;gap:14px}
.setting-control.disabled{opacity:.45;cursor:not-allowed}
.setting-control.loading{opacity:.6}
.scope-warning{color:#f7d046;font-size:12px;margin:0}
.setting-toggle.loading,.setting-number.loading,.setting-text.loading{opacity:.6}
.setting-toggle{display:flex;align-items:center;gap:10px}
.toggle-state{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.toggle-switch{position:relative;display:inline-block;width:46px;height:26px}
.toggle-switch input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;inset:0;border-radius:999px;background:#24283b;transition:background .2s ease}
.toggle-slider::before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:var(--text);transition:transform .2s ease,background .2s ease}
.toggle-switch input:checked+.toggle-slider{background:var(--accent)}
.toggle-switch input:checked+.toggle-slider::before{transform:translateX(20px);background:#fff}
.toggle-switch input:focus-visible+.toggle-slider{box-shadow:0 0 0 3px rgba(139,92,246,0.45)}
.setting-number{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.number-stepper{display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:999px;border:1px solid #24283b;background:#0f1117}
.stepper-btn{width:28px;height:28px;border-radius:50%;border:1px solid #24283b;background:#1a1d29;color:var(--text);font-size:18px;line-height:0;cursor:pointer}
.stepper-btn:hover{background:#24283b}
.number-stepper input{width:68px;text-align:center;border:0;background:transparent;color:var(--text);font-size:14px}
.number-stepper input:focus{outline:none}
.settings-chip{padding:.35rem .7rem;border-radius:999px;border:1px solid #24283b;background:#1a1d29;color:var(--muted);cursor:pointer;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.settings-chip:hover{background:#24283b}
.settings-chip.active{border-color:var(--accent);background:rgba(139,92,246,0.18);color:var(--accent)}
.setting-value-label{font-size:12px;color:var(--muted)}
.setting-text{min-width:220px;max-width:420px}
.setting-input,.setting-textarea{width:100%;padding:.5rem .6rem;border-radius:10px;border:1px solid #24283b;background:#0f1117;color:var(--text)}
.setting-input:focus,.setting-textarea:focus{outline:2px solid var(--accent);outline-offset:2px}
.setting-textarea{min-height:90px;resize:vertical}

.channel-key-card{display:flex;flex-direction:column;gap:10px;margin-top:10px;padding:14px;border-radius:12px;border:1px solid #24283b;background:#121423}
.channel-key-header{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.channel-key-title{margin:0 0 4px;font-size:15px}
.channel-key-info{flex:1 1 320px;display:flex;flex-direction:column;gap:4px}
.channel-key-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.channel-key-actions button{padding:.45rem .8rem;border-radius:10px;border:1px solid #24283b;background:#1a1d29;color:var(--text);cursor:pointer;font-weight:600}
.channel-key-actions button:hover:not(:disabled){background:#24283b}
.channel-key-actions button:disabled{opacity:.5;cursor:not-allowed}
.channel-key-secret{padding:.65rem .8rem;border-radius:10px;border:1px dashed #24283b;background:#0f1117;font-family:monospace;font-size:13px;word-break:break-all}
.channel-key-secret.revealed{border-style:solid;border-color:rgba(139,92,246,0.55);box-shadow:0 0 0 1px rgba(139,92,246,0.18) inset}
.channel-key-status{min-height:14px}
.channel-key-card.loading{opacity:.7}
.channel-key-hint{margin:0}

