:root{
  --bg:#080a0f;--surface:#10141c;--surface2:#151b25;--surface3:#1d2633;--border:#273244;
  --text:#e8eef7;--muted:#91a0b5;--dim:#536176;--accent:#00e5ff;--kick:#53fc18;--twitch:#9146ff;--youtube:#ef4444;
  --good:#10b981;--warn:#f59e0b;--bad:#ef4444;--purple:#7c3aed;--radius:16px;--shadow:0 18px 55px rgba(0,0,0,.35)
}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top left,rgba(0,229,255,.10),transparent 34%),radial-gradient(circle at bottom right,rgba(124,58,237,.12),transparent 32%),var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif;min-height:100vh}.app{display:flex;min-height:100vh}.sidebar{width:292px;background:rgba(16,20,28,.88);border-right:1px solid var(--border);padding:18px;position:fixed;inset:0 auto 0 0;backdrop-filter:blur(14px);overflow:auto}.brand{display:flex;gap:12px;align-items:center;margin-bottom:22px}.logo{width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,var(--kick),var(--accent));box-shadow:0 0 26px rgba(83,252,24,.24)}.brand h1{font-size:18px;margin:0;letter-spacing:-.02em}.brand small{color:var(--muted)}.nav-title{font-size:11px;text-transform:uppercase;color:var(--dim);letter-spacing:.16em;margin:20px 10px 8px}.nav a{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--muted);padding:11px 12px;border-radius:12px;margin:2px 0;font-weight:700;font-size:14px}.nav a:hover,.nav a.active{background:rgba(0,229,255,.08);color:var(--accent)}.main{margin-left:292px;flex:1;min-width:0}.topbar{height:66px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:rgba(8,10,15,.65);backdrop-filter:blur(14px);position:sticky;top:0;z-index:2}.topbar h2{margin:0;font-size:18px}.userbar{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px}.content{padding:28px;max-width:1440px}.grid{display:grid;gap:18px}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:linear-gradient(180deg,rgba(21,27,37,.96),rgba(16,20,28,.96));border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}.card h3{margin:0 0 12px;font-size:16px}.card p{color:var(--muted);line-height:1.55}.stat{font-size:32px;font-weight:900;letter-spacing:-.04em}.label{color:var(--muted);font-size:13px}.pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--border);border-radius:999px;padding:5px 10px;color:var(--muted);font-size:12px;font-weight:800}.pill.good{color:var(--good);border-color:rgba(16,185,129,.35)}.pill.warn{color:var(--warn);border-color:rgba(245,158,11,.35)}.pill.bad{color:var(--bad);border-color:rgba(239,68,68,.35)}.pill.kick{color:var(--kick);border-color:rgba(83,252,24,.35)}.pill.twitch{color:var(--twitch);border-color:rgba(145,70,255,.35)}.pill.youtube{color:var(--youtube);border-color:rgba(239,68,68,.42);background:rgba(239,68,68,.08)}button,.btn{border:0;border-radius:12px;padding:10px 14px;background:var(--surface3);color:var(--text);font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:8px}button.primary,.btn.primary{background:linear-gradient(135deg,var(--accent),#4f46e5);color:#001018}button.kick,.btn.kick{background:var(--kick);color:#07130a}button.twitch,.btn.twitch{background:var(--twitch);color:#fff}button.youtube,.btn.youtube{background:var(--youtube);color:#fff}button.danger{background:var(--bad)}button.ghost,.btn.ghost{background:transparent;border:1px solid var(--border);color:var(--muted)}button:disabled{opacity:.45;cursor:not-allowed}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.form{display:grid;gap:14px}.field{display:grid;gap:7px}.field label{color:var(--muted);font-weight:800;font-size:13px}input,textarea,select{width:100%;border:1px solid var(--border);background:#0c1017;color:var(--text);border-radius:12px;padding:11px 12px;font:inherit}textarea{min-height:110px;resize:vertical}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.table{width:100%;border-collapse:separate;border-spacing:0 8px}.table th{text-align:left;color:var(--dim);font-size:12px;text-transform:uppercase;letter-spacing:.12em;padding:0 12px}.table td{background:rgba(16,20,28,.72);border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px;color:var(--muted)}.table td:first-child{border-left:1px solid var(--border);border-radius:12px 0 0 12px;color:var(--text);font-weight:800}.table td:last-child{border-right:1px solid var(--border);border-radius:0 12px 12px 0}.notice{border:1px solid rgba(0,229,255,.28);background:rgba(0,229,255,.06);border-radius:var(--radius);padding:14px;color:var(--muted);line-height:1.55}.error{border-color:rgba(239,68,68,.38);background:rgba(239,68,68,.08)}.success{border-color:rgba(16,185,129,.38);background:rgba(16,185,129,.08)}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:28px}.login-card{width:min(520px,100%)}.hidden{display:none!important}.mono{font-family:JetBrains Mono,Consolas,monospace}.mt{margin-top:18px}.subtle{color:var(--muted)}.split{display:flex;justify-content:space-between;align-items:center;gap:16px}.tabs{display:flex;gap:8px;margin-bottom:18px}.tabs a{color:var(--muted);text-decoration:none;border:1px solid var(--border);padding:9px 12px;border-radius:12px;font-weight:800}.tabs a.active{color:var(--accent);border-color:rgba(0,229,255,.42);background:rgba(0,229,255,.08)}@media(max-width:900px){.sidebar{position:static;width:100%;height:auto}.app{display:block}.main{margin-left:0}.grid.cols-4,.grid.cols-3,.grid.cols-2,.row{grid-template-columns:1fr}.topbar{position:static}}
.secret-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.big-toggle{display:flex;align-items:center;gap:12px;border:1px solid var(--border);background:#0c1017;border-radius:14px;padding:13px 14px;font-weight:900;color:var(--muted)}.big-toggle input{width:20px;height:20px;accent-color:var(--kick)}.big-toggle.on{border-color:rgba(16,185,129,.5);background:rgba(16,185,129,.08);color:var(--good)}.big-toggle span{display:block}
.your-chats-title{margin-top:8px;color:var(--dim)}
.channel-nav-group{margin:9px 0 14px;padding:10px;border:1px solid rgba(39,50,68,.74);border-radius:18px;background:linear-gradient(180deg,rgba(18,24,34,.74),rgba(8,13,20,.56));box-shadow:0 12px 30px rgba(0,0,0,.16)}
.channel-nav-group.open{border-color:rgba(0,229,255,.20);background:linear-gradient(180deg,rgba(13,34,43,.72),rgba(8,13,20,.58))}
.channel-nav-head{display:flex;align-items:center;gap:9px;padding:3px 5px 9px;border-bottom:1px solid rgba(39,50,68,.55);margin-bottom:6px}
.channel-dot{width:9px;height:9px;border-radius:999px;background:var(--accent);box-shadow:0 0 14px rgba(0,229,255,.45);flex:0 0 auto}
.channel-dot.kick{background:var(--kick);box-shadow:0 0 14px rgba(83,252,24,.45)}
.channel-dot.twitch{background:var(--twitch);box-shadow:0 0 14px rgba(145,70,255,.45)}
.channel-dot.youtube{background:var(--youtube);box-shadow:0 0 14px rgba(239,68,68,.45)}
.channel-nav-name{font-size:13px;text-transform:uppercase;letter-spacing:.10em;color:var(--dim);font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav a.channel-sub{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:850;margin:4px 0;padding:10px 10px;color:var(--muted);background:transparent;border-radius:13px;line-height:1.15}
.nav a.channel-sub span:first-child{width:18px;text-align:center;opacity:.9}
.nav a.channel-sub:hover{background:rgba(0,229,255,.07);color:var(--text)}
.nav a.channel-sub.active{background:linear-gradient(135deg,rgba(0,229,255,.18),rgba(83,252,24,.10));color:var(--accent);box-shadow:inset 0 0 0 1px rgba(0,229,255,.12)}
.channel-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.channel-page-title{display:grid;gap:6px}.channel-page-title h3{margin:0;font-size:22px}.always-on{border-color:rgba(83,252,24,.32);background:rgba(83,252,24,.06)}
.chat-stream{display:grid;gap:8px;max-height:calc(100vh - 260px);overflow:auto;padding-right:4px;scroll-behavior:smooth}.chat-line{display:grid;grid-template-columns:150px 240px minmax(0,1fr);gap:12px;align-items:start;padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:rgba(16,20,28,.72)}.chat-line .time{color:var(--dim);font-size:12px}.chat-line .user{color:var(--text);font-weight:900}.chat-line .msg{color:var(--muted);overflow-wrap:anywhere}
@media(max-width:900px){.chat-line{grid-template-columns:1fr}.channel-page-head{display:block}.sidebar{max-height:none}.channel-nav-group{margin-right:0}.chat-stream{max-height:none}}
.mb{margin-bottom:18px}
.filtered-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,.8fr);gap:18px;align-items:start}
.filtered-text-stream{max-height:calc(100vh - 260px);overflow:auto;padding-right:4px}
.emote-stream{display:grid;gap:8px;max-height:calc(100vh - 260px);overflow:auto;padding-right:4px}
.emote-line{display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;align-items:start;padding:10px 11px;border:1px solid var(--border);border-radius:13px;background:rgba(16,20,28,.72);color:var(--muted)}
.emote-line b{color:var(--text)}.emote-line small{color:var(--dim)}.emote-msg{font-family:JetBrains Mono,Consolas,monospace;overflow-wrap:anywhere;color:var(--kick)}
@media(max-width:1000px){.filtered-grid{grid-template-columns:1fr}.filtered-text-stream,.emote-stream{max-height:none}}

.debug-card summary{cursor:pointer;font-weight:900;color:var(--muted)}
.debug-card[open] summary{margin-bottom:12px;color:var(--accent)}

.kick-emote{height:28px;width:auto;max-width:42px;vertical-align:middle;margin:0 2px;border-radius:5px;object-fit:contain}
.kick-emote.big{height:38px;max-width:58px;margin:2px 4px 2px 0}
.emote-fallback{color:var(--kick);font-weight:900}
.msg .kick-emote{position:relative;top:-1px}
.pill.dmm{color:#ff4d4d;border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.10)}
.user-link{all:unset;cursor:pointer;color:var(--text);font-weight:950;border-radius:8px;padding:2px 3px;margin:-2px -3px;display:inline-flex;align-items:center;gap:6px}
.user-link:hover{color:var(--accent);background:rgba(0,229,255,.08)}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:50;display:grid;place-items:center;padding:24px;backdrop-filter:blur(10px)}
.modal-card{width:min(980px,96vw);max-height:92vh;overflow:auto;background:linear-gradient(180deg,rgba(21,27,37,.98),rgba(9,13,20,.98));border:1px solid var(--border);border-radius:22px;padding:20px;box-shadow:0 28px 90px rgba(0,0,0,.6)}
.user-profile-card h3{margin:0 0 10px}.profile-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.75fr);gap:14px}.inner-card{box-shadow:none}.profile-message-list{display:grid;gap:8px;max-height:380px;overflow:auto;padding-right:4px}.profile-message{border:1px solid var(--border);border-radius:13px;background:rgba(16,20,28,.72);padding:10px 12px;color:var(--muted);display:grid;gap:6px}.profile-message small{color:var(--dim);margin-right:8px}
@media(max-width:900px){.profile-grid{grid-template-columns:1fr}.modal-backdrop{padding:10px}.modal-card{width:100%;max-height:95vh}}
.quick-action-popover{position:fixed;z-index:70;width:282px;max-height:calc(100vh - 24px);overflow:auto;background:linear-gradient(180deg,rgba(21,27,37,.99),rgba(9,13,20,.99));border:1px solid var(--border);border-radius:18px;padding:12px;box-shadow:0 24px 90px rgba(0,0,0,.62)}
.quick-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.quick-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quick-grid button{padding:9px 10px;border-radius:11px;font-size:12px;justify-content:center}.quick-grid .wide{grid-column:1/-1}.tiny{padding:4px 8px!important;border-radius:9px!important}.mini{padding:6px 8px!important;font-size:12px!important}.notice.compact{padding:9px 10px;font-size:12px;border-radius:12px;margin-bottom:9px}.notice.warn{border-color:rgba(245,158,11,.38);background:rgba(245,158,11,.08)}

/* Step 2.1 moderator quick actions */
.quick-action-popover{width:386px}
.quick-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.quick-grid.three button{min-height:48px;white-space:normal;line-height:1.15}
.quick-grid.three .wide{grid-column:1/-1}
.quick-controls{display:grid;gap:9px;margin-top:10px}
.compact-field{gap:5px}.compact-field label{font-size:11px}.compact-field input,.compact-field select{padding:8px 10px;border-radius:10px;font-size:13px}
.quick-hint{font-size:12px;color:var(--muted);margin-top:8px;border:1px solid rgba(239,68,68,.28);background:rgba(239,68,68,.06);border-radius:11px;padding:8px 10px}
button.full,.btn.full{width:100%;justify-content:center;margin-top:10px}
@media(max-width:520px){.quick-action-popover{width:calc(100vw - 24px);left:12px!important;top:12px!important}.quick-grid.three{grid-template-columns:1fr}}

/* Step 2.3 UI cleanup */
.content{max-width:none;width:100%;padding:28px 34px}.page-wide .content{max-width:none;width:100%}
.clean-head{margin-bottom:16px}.title-inline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.title-inline h3{font-size:23px;letter-spacing:-.02em}.title-inline .pill.kick{background:rgba(83,252,24,.10);box-shadow:0 0 20px rgba(83,252,24,.08)}
.chat-card-wide,.queue-card-wide{width:min(100%,1780px)}.live-wide-stream{max-height:calc(100vh - 235px)}.chat-card-wide .chat-line{grid-template-columns:155px 190px minmax(0,1fr)}
.debug-card{width:min(100%,1120px);opacity:.92}.compact-admin-row{grid-template-columns:minmax(260px,480px) auto}.filter-note{width:min(100%,1780px)}.filtered-wide-grid{width:min(100%,1780px);grid-template-columns:minmax(0,1.95fr) minmax(360px,.78fr)}
button.color-cyan,.btn.color-cyan{border-color:rgba(0,229,255,.34);color:var(--accent);background:rgba(0,229,255,.07)}button.color-blue,.btn.color-blue{background:linear-gradient(135deg,#2563eb,#0891b2);color:#eaf9ff}button.color-orange,.btn.color-orange{background:linear-gradient(135deg,#f97316,#f59e0b);color:#201002}button.color-yellow,.btn.color-yellow{background:linear-gradient(135deg,#f59e0b,#fde047);color:#231500}button.color-purple,.btn.color-purple{background:linear-gradient(135deg,#7c3aed,#4f46e5);color:#f4efff}button.danger.dmm-action{background:linear-gradient(135deg,#ef4444,#991b1b);box-shadow:0 0 22px rgba(239,68,68,.16)}
.queue-list{display:grid;gap:10px}.queue-item{display:grid;grid-template-columns:minmax(0,1fr) 430px;gap:14px;align-items:stretch;border:1px solid var(--border);border-radius:16px;background:rgba(16,20,28,.72);padding:13px}.queue-main{display:grid;gap:8px;min-width:0}.queue-user{font-weight:950}.queue-user small{color:var(--dim);font-weight:700;margin-left:8px}.queue-msg{font-size:15px;color:var(--text);overflow-wrap:anywhere}.queue-meta{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.queue-reason{font-size:13px;color:var(--muted);line-height:1.45}.queue-action-panel{display:grid;align-content:start;gap:8px}.queue-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.queue-action-grid button{justify-content:center;padding:8px 9px;font-size:12px;min-height:38px;line-height:1.1}.queue-action-grid .dmm-action{grid-column:auto}.queue-action-controls{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px}.queue-action-controls input,.queue-action-controls select{padding:8px 9px;border-radius:10px;font-size:13px}
@media(max-width:1260px){.queue-item{grid-template-columns:1fr}.queue-action-panel{max-width:620px}.filtered-wide-grid{grid-template-columns:1fr}.compact-admin-row{grid-template-columns:1fr}}
.settings-layout{display:grid;grid-template-columns:minmax(360px,.85fr) minmax(520px,1.15fr);gap:18px;width:min(100%,1780px)}.settings-wide-grid{width:min(100%,1780px)}.settings-card{box-shadow:0 18px 50px rgba(0,0,0,.24)}.settings-meta{display:flex;gap:9px;flex-wrap:wrap;color:var(--muted)}.settings-meta p{margin:4px 0}.settings-actions{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;gap:10px;align-items:end}.threshold-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.switch-grid{display:grid;gap:10px}.switch-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 58px;align-items:center;gap:14px;border:1px solid rgba(239,68,68,.32);background:linear-gradient(135deg,rgba(239,68,68,.08),rgba(16,20,28,.74));border-radius:16px;padding:13px 14px;color:var(--muted);cursor:pointer;transition:.18s ease}.switch-row b{display:block;color:var(--text);font-size:14px}.switch-row small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:1.35}.switch-row input{position:absolute;opacity:0;pointer-events:none}.switch-row i{width:58px;height:30px;border-radius:999px;background:rgba(239,68,68,.28);border:1px solid rgba(239,68,68,.45);position:relative;transition:.18s ease}.switch-row i:before{content:'';position:absolute;width:22px;height:22px;border-radius:999px;background:#ff7b7b;left:4px;top:3px;box-shadow:0 3px 10px rgba(0,0,0,.32);transition:.18s ease}.switch-row.on{border-color:rgba(16,185,129,.45);background:linear-gradient(135deg,rgba(16,185,129,.10),rgba(16,20,28,.74))}.switch-row.on i{background:rgba(16,185,129,.24);border-color:rgba(16,185,129,.58)}.switch-row.on i:before{left:30px;background:#34d399}.switch-row.slim{margin-bottom:12px}.dmm-card{border-color:rgba(239,68,68,.24);background:linear-gradient(180deg,rgba(32,18,24,.92),rgba(16,20,28,.96))}.sticky-save{position:sticky;bottom:18px;display:flex;justify-content:flex-end;width:min(100%,1780px);margin-top:18px;z-index:3}.big-save{font-size:15px;padding:13px 20px;box-shadow:0 16px 40px rgba(0,229,255,.16)}
@media(max-width:1100px){.settings-layout,.settings-actions{grid-template-columns:1fr}.threshold-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.threshold-grid{grid-template-columns:1fr}.queue-action-grid{grid-template-columns:1fr 1fr}.queue-action-controls{grid-template-columns:1fr}.content{padding:18px}.chat-card-wide .chat-line{grid-template-columns:1fr}}
/* Step 3.0 queue workflow */
.queue-pro-card{padding:20px}.no-top{margin-top:-6px}.queue-summary{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.queue-filter-bar{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0 18px}.queue-filter{background:rgba(21,27,37,.92);border:1px solid var(--border);color:var(--muted);padding:9px 12px}.queue-filter.active{background:linear-gradient(135deg,rgba(0,229,255,.20),rgba(83,252,24,.10));border-color:rgba(0,229,255,.38);color:var(--accent)}.queue-list.pro{display:grid;gap:14px}.queue-item.pro{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px;align-items:stretch;border:1px solid var(--border);border-radius:20px;background:linear-gradient(180deg,rgba(18,24,34,.94),rgba(11,15,22,.94));padding:14px;box-shadow:0 18px 40px rgba(0,0,0,.25)}.queue-item.pro.is-dmm{border-color:rgba(239,68,68,.34);box-shadow:0 18px 40px rgba(239,68,68,.08)}.queue-item.pro.is-general{border-color:rgba(245,158,11,.18)}.queue-topline{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:10px}.queue-pills{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.queue-user{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.queue-user .user-link{font-size:15px;padding:7px 10px;background:rgba(0,229,255,.08);border:1px solid rgba(0,229,255,.20);color:var(--accent)}.queue-msg{font-size:16px;line-height:1.48;background:rgba(8,10,15,.45);border:1px solid rgba(39,50,68,.72);border-radius:16px;padding:12px 13px;overflow-wrap:anywhere}.queue-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;color:var(--dim);font-size:12px;margin-top:10px}.queue-reason{margin-top:10px;color:var(--muted);line-height:1.45}.queue-action-panel.compact{background:rgba(8,10,15,.36);border:1px solid rgba(39,50,68,.78);border-radius:17px;padding:12px;display:flex;flex-direction:column;gap:10px}.queue-action-grid.compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.queue-action-grid.compact button{padding:8px 7px;font-size:12px;justify-content:center;min-height:36px}.queue-action-grid.compact .dmm-action{grid-column:1/-1;background:linear-gradient(135deg,#ef4444,#7f1d1d)}.queue-action-controls.compact{display:grid;grid-template-columns:95px minmax(0,1fr);gap:8px}.queue-action-controls.compact select,.queue-action-controls.compact input{padding:9px 10px;font-size:13px}.queue-secondary-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.queue-secondary-actions button:first-child{grid-column:1/-1}.mini{font-size:12px;padding:8px 9px;justify-content:center}.color-blue{background:linear-gradient(135deg,#2563eb,#0891b2)!important;color:white}.color-cyan{border-color:rgba(0,229,255,.35)!important;color:var(--accent)!important}.color-orange{background:linear-gradient(135deg,#f59e0b,#ea580c)!important;color:#150a02}.color-yellow{background:linear-gradient(135deg,#facc15,#f97316)!important;color:#120b02}.color-purple{background:linear-gradient(135deg,#7c3aed,#4f46e5)!important;color:white}.pill.dmm{color:#ff6b6b;border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.08)}
@media(max-width:1180px){.queue-item.pro{grid-template-columns:1fr}.queue-pills{justify-content:flex-start}.queue-action-panel.compact{max-width:none}}
/* Step 4.0 AI policy/prompt UI */
.ai-card{border-color:rgba(245,158,11,.20);background:linear-gradient(180deg,rgba(32,24,14,.92),rgba(16,20,28,.96))}
.prompt-box{min-height:170px;font-family:JetBrains Mono,Consolas,monospace;font-size:12px;line-height:1.45}.prompt-box.tall{min-height:260px}
.prompt-preview{white-space:pre-wrap;max-height:360px;overflow:auto;border:1px solid var(--border);background:#090d13;border-radius:14px;padding:13px;color:var(--muted);font-family:JetBrains Mono,Consolas,monospace;font-size:12px;line-height:1.45}
/* Step 4.2: connected-account mentions + filtered phrase counters */
.mention-self{display:inline-block;padding:1px 6px;border-radius:999px;background:rgba(0,255,130,.18);border:1px solid rgba(0,255,130,.45);color:#74ffb5;font-weight:900;box-shadow:0 0 14px rgba(0,255,130,.14)}
.filtered-counter-bar{width:min(100%,1780px);display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 14px 0}
.filtered-counter-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.035));font-size:13px;color:var(--text)}
.filtered-counter-chip b{color:#fff}.filtered-counter-chip .count{background:rgba(0,255,130,.16);border:1px solid rgba(0,255,130,.28);color:#7effb8;border-radius:999px;padding:2px 8px;font-weight:900}

/* Step 4.3: remove top bar, move user controls to bottom-left, fullscreen chat pages */
.sidebar{display:flex;flex-direction:column;padding:0;overflow:hidden}.sidebar-scroll{padding:18px;overflow:auto;min-height:0;flex:1}.sidebar-userbar{border-top:1px solid var(--border);padding:14px 16px;background:rgba(8,10,15,.48);display:grid;gap:10px}.sidebar-user-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:13px;min-width:0}.sidebar-user-meta [data-user-name]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.logout-btn{width:100%;justify-content:center}.main{min-height:100vh}.content{padding-top:22px}.topbar{display:none!important}
.chat-fullscreen{height:100vh;overflow:hidden}.chat-fullscreen .app{height:100vh;min-height:100vh}.chat-fullscreen .main{height:100vh;overflow:hidden}.chat-fullscreen .content{height:100vh;overflow:hidden;padding:18px 28px 18px 32px;display:flex;flex-direction:column}.chat-fullscreen .channel-page-head{flex:0 0 auto;margin-bottom:10px}.chat-fullscreen #msg{flex:0 0 auto}.chat-fullscreen .chat-card-wide{flex:1;min-height:0;margin-top:0;display:flex;flex-direction:column}.chat-fullscreen .chat-card-wide .split{flex:0 0 auto}.chat-fullscreen .chat-card-wide .chat-stream{flex:1;max-height:none;min-height:0}.chat-fullscreen .debug-card{flex:0 0 auto;margin-top:10px}.chat-fullscreen .filtered-counter-bar,.chat-fullscreen .filtered-hidden-pill{flex:0 0 auto}.chat-fullscreen .filtered-grid{flex:1;min-height:0}.chat-fullscreen .filtered-grid .card{min-height:0;display:flex;flex-direction:column}.chat-fullscreen .filtered-grid .card>.split{flex:0 0 auto}.chat-fullscreen .filtered-text-stream,.chat-fullscreen .emote-stream{flex:1;max-height:none;min-height:0}.chat-fullscreen .filter-note{display:none!important}.filtered-hidden-pill{margin:0 0 10px 0;width:max-content}.filtered-counter-bar{margin-bottom:10px}.chat-fullscreen .card{padding:15px}.chat-fullscreen .card h3{margin-bottom:8px}.chat-fullscreen .chat-line{padding:9px 11px}.chat-fullscreen .emote-line{padding:8px 10px}.chat-fullscreen .channel-page-title h3{font-size:20px}
@media(max-width:900px){.sidebar{position:static;width:100%;height:auto}.sidebar-scroll{max-height:none}.chat-fullscreen{height:auto;overflow:auto}.chat-fullscreen .main,.chat-fullscreen .content{height:auto;overflow:visible}.chat-fullscreen .filtered-grid,.chat-fullscreen .chat-card-wide{min-height:420px}.sidebar-userbar{position:static}}

/* Step 4.4: viewport-fit chat pages + Kick-style collapsible sidebar */
html,body{height:100%}
.sidebar-top{display:flex;align-items:center;gap:10px;margin-bottom:16px}.sidebar-toggle{width:38px;height:38px;flex:0 0 38px;border-radius:12px;padding:0;justify-content:center;background:rgba(8,10,15,.74);border:1px solid rgba(39,50,68,.9);font-size:20px;line-height:1}.toggle-closed{display:none}.nav-icon{width:20px;min-width:20px;text-align:center;display:inline-flex;justify-content:center;align-items:center}.nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand{min-width:0;margin-bottom:0}.brand-text{min-width:0}.sidebar-collapsed .sidebar{width:82px}.sidebar-collapsed .main{margin-left:82px}.sidebar-collapsed .sidebar-scroll{padding:12px 10px}.sidebar-collapsed .sidebar-top{flex-direction:column;align-items:center;gap:10px}.sidebar-collapsed .brand{justify-content:center}.sidebar-collapsed .brand-text{display:none}.sidebar-collapsed .logo{width:38px;height:38px;border-radius:14px}.sidebar-collapsed .nav-title{display:none}.sidebar-collapsed .nav a{justify-content:center;padding:12px 8px}.sidebar-collapsed .nav-label,.sidebar-collapsed .channel-nav-name,.sidebar-collapsed .sidebar-user-meta [data-user-name],.sidebar-collapsed .sidebar-user-meta .pill,.sidebar-collapsed .channel-sub span:nth-child(2){display:none!important}.sidebar-collapsed .channel-nav-group{padding:7px 5px;border-radius:18px;margin:8px 0;background:rgba(8,10,15,.32)}.sidebar-collapsed .channel-nav-head{justify-content:center;border-bottom:1px solid rgba(39,50,68,.4);padding:4px 0 8px;margin-bottom:5px}.sidebar-collapsed .channel-dot{width:12px;height:12px}.sidebar-collapsed .nav a.channel-sub{justify-content:center;padding:11px 8px;margin:3px 0}.sidebar-collapsed .nav a.channel-sub span:first-child{width:auto;font-size:17px}.sidebar-collapsed .sidebar-userbar{padding:12px 10px}.sidebar-collapsed .sidebar-user-meta{justify-content:center}.sidebar-collapsed .logout-btn{padding:10px 8px}.sidebar-collapsed .toggle-open{display:none}.sidebar-collapsed .toggle-closed{display:inline}

/* true no-page-scroll chat workspace */
.chat-fullscreen .content{max-width:none;width:100%;padding:12px 18px 12px 20px;gap:0}.chat-fullscreen .channel-page-head{margin-bottom:8px}.chat-fullscreen .channel-page-title h3{font-size:22px;line-height:1.1}.chat-fullscreen .title-inline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.chat-fullscreen .filtered-counter-bar{margin:0 0 8px 0;min-height:34px;gap:8px}.chat-fullscreen .filtered-counter-chip{padding:7px 11px}.filtered-counter-chip.dmm-notice{border-color:rgba(239,68,68,.55);background:rgba(239,68,68,.08);color:#ff8b8b}.filtered-counter-chip.dmm-notice .count{background:rgba(239,68,68,.16);border-color:rgba(239,68,68,.35);color:#ff8b8b}.chat-fullscreen .filtered-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,420px);gap:12px;overflow:hidden}.chat-fullscreen .filtered-grid .card{height:100%;overflow:hidden;padding:12px}.chat-fullscreen .chat-card-wide{overflow:hidden;padding:12px}.chat-fullscreen .chat-card-wide .chat-stream,.chat-fullscreen .filtered-text-stream,.chat-fullscreen .emote-stream{height:100%;overflow-y:auto;overflow-x:hidden}.chat-fullscreen .debug-card{max-height:120px;overflow:auto}.chat-fullscreen .chat-line{grid-template-columns:132px 170px minmax(0,1fr);padding:7px 9px;border-radius:11px;gap:9px;font-size:13px}.chat-fullscreen .chat-line .time{font-size:11px}.chat-fullscreen .emote-line{grid-template-columns:96px minmax(0,1fr);padding:7px 9px;border-radius:11px;font-size:13px}.chat-fullscreen .kick-emote.big{height:30px;max-width:48px}.chat-fullscreen .kick-emote{height:23px;max-width:36px}.chat-fullscreen .card h3{font-size:15px}.chat-fullscreen .pill{padding:4px 9px;font-size:11px}.chat-fullscreen button,.chat-fullscreen .btn{padding:8px 10px;border-radius:10px}.chat-fullscreen #msg{display:none}.filtered-hidden-pill{display:none!important}
@media(max-width:1100px){.chat-fullscreen .filtered-grid{grid-template-columns:1fr}.chat-fullscreen .filtered-grid .card{min-height:0}.chat-fullscreen .emote-stream{max-height:24vh}}
@media(max-width:900px){.sidebar-collapsed .sidebar{width:100%}.sidebar-collapsed .main{margin-left:0}.sidebar-collapsed .brand-text,.sidebar-collapsed .nav-label,.sidebar-collapsed .channel-sub span:nth-child(2){display:inline!important}.sidebar-collapsed .nav a{justify-content:flex-start}.chat-fullscreen .content{height:auto;overflow:visible}.chat-fullscreen .filtered-grid{overflow:visible}.chat-fullscreen .chat-card-wide .chat-stream,.chat-fullscreen .filtered-text-stream,.chat-fullscreen .emote-stream{height:auto;max-height:70vh}}


/* Step 4.5: filtered chat emote layout modes */
.chat-fullscreen .filtered-counter-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;max-width:none;min-width:0}
.emote-layout-controls{margin-left:auto;display:inline-flex;align-items:center;gap:7px;padding:5px 6px;border:1px solid rgba(39,50,68,.85);border-radius:999px;background:rgba(8,10,15,.72);box-shadow:0 8px 26px rgba(0,0,0,.20);white-space:nowrap;max-width:100%}
.emote-layout-label{font-size:11px;font-weight:900;color:var(--muted);padding:0 5px;max-width:120px;overflow:hidden;text-overflow:ellipsis}
.emote-layout-btn{width:31px;height:31px;padding:0!important;border-radius:999px!important;display:inline-flex;align-items:center;justify-content:center;background:rgba(21,27,37,.86)!important;border:1px solid rgba(39,50,68,.95)!important;color:var(--muted)!important;font-size:14px;line-height:1}
.emote-layout-btn:hover,.emote-layout-btn.active{border-color:rgba(83,252,24,.55)!important;color:var(--kick)!important;background:rgba(83,252,24,.11)!important;box-shadow:0 0 16px rgba(83,252,24,.10)}
/* emote layout grid overrides moved to Step 4.14 block above */
.filtered-grid.emotes-compact .filtered-emote-card{max-width:260px}
.filtered-grid.emotes-compact .filtered-emote-card .split h3{font-size:13px}
.filtered-grid.emotes-compact .emote-line{grid-template-columns:1fr auto;gap:8px;padding:6px 8px;font-size:12px;align-items:center}
.filtered-grid.emotes-compact .emote-line small{display:none}
.filtered-grid.emotes-compact .emote-msg{display:flex;justify-content:flex-end;align-items:center;min-width:40px}
.filtered-grid.emotes-compact .kick-emote.big{height:24px;max-width:34px;margin:0}
.filtered-grid.emotes-compact .user-link{max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}
@media(max-width:1000px){.emote-layout-controls{margin-left:0}.filtered-grid.emotes-compact{grid-template-columns:1fr!important}.filtered-grid.emotes-compact .filtered-emote-card{max-width:none}}

/* Step 4.6: badges, timestamps, cleaner counters, scrollbars and branded logo */
.logo-img{background-image:url('/assets/img/rbb-logo.svg')!important;background-size:cover!important;background-position:center!important;background-color:transparent!important;box-shadow:0 0 28px rgba(83,252,24,.30),0 0 0 1px rgba(83,252,24,.20) inset}
.user-with-badges{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%}.user-badges{display:inline-flex;gap:3px;align-items:center;flex-wrap:wrap}.kick-badge{min-width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;font-size:10px;line-height:1;font-weight:950;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#dce7f5;box-shadow:0 3px 10px rgba(0,0,0,.18)}.kick-badge .badge-count{margin-left:3px;font-size:9px}.badge-verified{background:rgba(83,252,24,.13);border-color:rgba(83,252,24,.42);color:var(--kick)}.badge-mod{background:rgba(0,229,255,.12);border-color:rgba(0,229,255,.38);color:var(--accent)}.badge-sub{background:rgba(245,158,11,.13);border-color:rgba(245,158,11,.38);color:#ffd166}.badge-gifted{background:rgba(236,72,153,.13);border-color:rgba(236,72,153,.38);color:#ff86c8}.badge-level{background:rgba(124,58,237,.14);border-color:rgba(124,58,237,.42);color:#c4b5fd;font-size:9px}.badge-owner{background:rgba(83,252,24,.16);border-color:rgba(83,252,24,.42);color:#b7ff92}.badge-vip,.badge-founder{background:rgba(168,85,247,.14);border-color:rgba(168,85,247,.38);color:#e9d5ff}
.timestamps-off .chat-line{grid-template-columns:0 170px minmax(0,1fr)!important}.timestamps-off .chat-line .time{display:none!important}.chat-toolbar{margin-left:auto;display:inline-flex;align-items:center;gap:7px;min-width:0}.chat-tool-btn{height:31px;padding:0 10px!important;border-radius:999px!important;border:1px solid rgba(39,50,68,.95)!important;background:rgba(21,27,37,.86)!important;color:var(--muted)!important;font-size:11px!important;font-weight:950!important;white-space:nowrap}.chat-tool-btn:hover,.chat-tool-btn.active{border-color:rgba(0,229,255,.55)!important;color:var(--accent)!important;background:rgba(0,229,255,.10)!important}
.filtered-counter-chip.ai-notice{border-color:rgba(245,158,11,.50);background:rgba(245,158,11,.08);color:#ffc266}.filtered-counter-chip.ai-notice .count{background:rgba(245,158,11,.16);border-color:rgba(245,158,11,.35);color:#ffd28a}.filtered-counter-bar:empty{display:none!important}.counter-label{font-weight:850;white-space:nowrap}.filtered-counter-chip{white-space:nowrap}.emote-layout-controls{flex:0 0 auto}.chat-fullscreen .filtered-counter-bar{align-content:center}
/* Make scrollbars fit the dark UI instead of white browser defaults */
*{scrollbar-width:thin;scrollbar-color:rgba(0,229,255,.45) rgba(8,12,18,.45)}
*::-webkit-scrollbar{width:10px;height:10px}*::-webkit-scrollbar-track{background:rgba(8,12,18,.55);border-radius:999px;border:1px solid rgba(39,50,68,.28)}*::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(0,229,255,.55),rgba(83,252,24,.42));border:2px solid rgba(8,12,18,.85);border-radius:999px;min-height:44px}*::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,rgba(0,229,255,.78),rgba(83,252,24,.62))}*::-webkit-scrollbar-corner{background:transparent}
/* Compact emote mode should stay readable and not blow up the layout */
.filtered-grid.emotes-compact .emote-line{min-height:38px}.filtered-grid.emotes-compact .user-with-badges{max-width:130px;overflow:hidden}.filtered-grid.emotes-compact .user-badges{display:inline-flex!important;gap:2px!important}.filtered-grid.emotes-compact .kick-badge-img img{width:14px!important;height:14px!important}.filtered-grid.emotes-compact .kick-badge-img .badge-count{font-size:7px!important;min-width:11px!important;height:11px!important;padding:0 2px!important}.filtered-grid.emotes-compact .filtered-emote-card .split{gap:8px}.filtered-grid.emotes-compact #emoteCount{padding:3px 8px;font-size:10px}.filtered-grid.emotes-compact .emote-stream{padding-right:2px}.filtered-grid.emotes-hidden + .emote-layout-controls{margin-left:auto}
.sidebar-collapsed .logo-img{width:42px;height:42px;border-radius:16px}.sidebar-collapsed .sidebar-toggle{background:rgba(8,10,15,.9)}
@media(max-width:1100px){.timestamps-off .chat-line{grid-template-columns:0 155px minmax(0,1fr)!important}.chat-toolbar{width:100%;justify-content:flex-end}.emote-layout-controls{margin-left:0}.filtered-counter-bar{justify-content:flex-start}}

/* Step 4.7: responsive chat priority + timestamp layout fix */
/* Keep chat grid cells stable when timestamps are toggled off; otherwise CSS grid auto-placement shifts username/message into each other. */
.chat-line > .time{grid-column:1;grid-row:1;min-width:0}
.chat-line > .user{grid-column:2;grid-row:1;min-width:0;overflow:visible}
.chat-line > .msg{grid-column:3;grid-row:1;min-width:0;overflow-wrap:anywhere;word-break:break-word}
.timestamps-off .chat-line{grid-template-columns:0 minmax(118px,165px) minmax(0,1fr)!important}
.timestamps-off .chat-line > .time{display:block!important;visibility:hidden!important;overflow:hidden!important;width:0!important;min-width:0!important;height:0!important;padding:0!important;margin:0!important}
.timestamps-off .emote-line small{display:none!important}
.timestamps-off .emote-line{align-items:center}

/* Better readable chat rows at normal widths */
.chat-fullscreen .chat-line{min-height:38px;align-items:start}
.chat-fullscreen .chat-line .user{line-height:1.25}.chat-fullscreen .chat-line .msg{line-height:1.35}
.chat-fullscreen .user-with-badges{max-width:100%;overflow:hidden}.chat-fullscreen .user-link{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* When the screen gets narrow, the chat always wins. The sidebar stays icon-only instead of becoming a huge top block. */
@media(max-width:900px){
  body.chat-fullscreen .app{display:flex!important;height:100vh!important;min-height:100vh!important;overflow:hidden!important}
  body.chat-fullscreen .sidebar{position:fixed!important;inset:0 auto 0 0!important;width:66px!important;height:100vh!important;z-index:20!important;padding:0!important;overflow:hidden!important}
  body.chat-fullscreen .sidebar-scroll{padding:8px 7px!important;overflow:auto!important;min-height:0!important;flex:1!important}
  body.chat-fullscreen .main{margin-left:66px!important;width:calc(100vw - 66px)!important;height:100vh!important;overflow:hidden!important;min-width:0!important}
  body.chat-fullscreen .content{height:100vh!important;overflow:hidden!important;padding:8px 8px 8px 10px!important;max-width:none!important;width:100%!important}
  body.chat-fullscreen .brand-text,
  body.chat-fullscreen .nav-title,
  body.chat-fullscreen .nav-label,
  body.chat-fullscreen .channel-nav-name,
  body.chat-fullscreen .channel-sub span:nth-child(2),
  body.chat-fullscreen .sidebar-user-meta [data-user-name],
  body.chat-fullscreen .sidebar-user-meta .pill{display:none!important}
  body.chat-fullscreen .sidebar-top{flex-direction:column!important;align-items:center!important;gap:8px!important;margin-bottom:8px!important}
  body.chat-fullscreen .sidebar-toggle{width:38px!important;height:38px!important;display:inline-flex!important}
  body.chat-fullscreen .brand{justify-content:center!important;margin:0!important}
  body.chat-fullscreen .logo{width:40px!important;height:40px!important;border-radius:15px!important}
  body.chat-fullscreen .nav a{justify-content:center!important;padding:10px 7px!important;margin:3px 0!important}
  body.chat-fullscreen .nav-icon{width:22px!important;min-width:22px!important;font-size:16px!important}
  body.chat-fullscreen .channel-nav-group{padding:7px 5px!important;border-radius:18px!important;margin:8px 0!important;background:rgba(8,10,15,.38)!important}
  body.chat-fullscreen .channel-nav-head{justify-content:center!important;padding:4px 0 8px!important;margin-bottom:5px!important;border-bottom:1px solid rgba(39,50,68,.4)!important}
  body.chat-fullscreen .channel-dot{width:12px!important;height:12px!important}
  body.chat-fullscreen .nav a.channel-sub{justify-content:center!important;padding:10px 6px!important}
  body.chat-fullscreen .sidebar-userbar{padding:8px 7px!important}
  body.chat-fullscreen .logout-btn{padding:9px 6px!important;justify-content:center!important}
  body.chat-fullscreen .toggle-open{display:none!important}
  body.chat-fullscreen .toggle-closed{display:inline!important}
}

/* Medium/narrow: stop the emote panel from becoming a useless tiny column; prioritize clean chat. */
@media(max-width:820px){
  body.chat-fullscreen .channel-page-title h3{font-size:17px!important;line-height:1.1!important}
  body.chat-fullscreen .filtered-counter-bar{gap:5px!important;margin-bottom:6px!important;min-height:30px!important}
  body.chat-fullscreen .filtered-counter-chip{padding:5px 8px!important;font-size:11px!important}
  body.chat-fullscreen .counter-label{display:none!important}
  body.chat-fullscreen .chat-toolbar{margin-left:auto!important;width:auto!important}
  body.chat-fullscreen .chat-tool-btn{height:28px!important;padding:0 8px!important;font-size:10px!important}
  body.chat-fullscreen .emote-layout-controls{padding:4px!important;gap:4px!important}
  body.chat-fullscreen .emote-layout-label{display:none!important}
  body.chat-fullscreen .emote-layout-btn{width:27px!important;height:27px!important;font-size:12px!important}
  body.chat-fullscreen .filtered-grid{grid-template-columns:1fr!important;gap:8px!important;overflow:hidden!important}
  body.chat-fullscreen .filtered-emote-card{display:none!important}
  body.chat-fullscreen .filtered-text-card{width:100%!important;min-width:0!important}
  body.chat-fullscreen .filtered-text-stream{height:100%!important;max-height:none!important}
  body.chat-fullscreen .chat-line{grid-template-columns:minmax(92px,32%) minmax(0,1fr)!important;gap:7px!important;padding:7px 8px!important;font-size:12px!important;border-radius:10px!important;min-height:36px!important}
  body.chat-fullscreen .chat-line > .time{display:none!important}
  body.chat-fullscreen .chat-line > .user{grid-column:1!important;grid-row:1!important}
  body.chat-fullscreen .chat-line > .msg{grid-column:2!important;grid-row:1!important}
  body.chat-fullscreen .card{padding:10px!important;border-radius:14px!important}
  body.chat-fullscreen .card h3{font-size:13px!important}
}

/* Very narrow: make the text chat a true single-panel mobile-style chat. */
@media(max-width:520px){
  body.chat-fullscreen .sidebar{width:54px!important}
  body.chat-fullscreen .main{margin-left:54px!important;width:calc(100vw - 54px)!important}
  body.chat-fullscreen .content{padding:6px!important}
  body.chat-fullscreen .channel-page-head{margin-bottom:5px!important}
  body.chat-fullscreen .title-inline{gap:6px!important}
  body.chat-fullscreen .platformPill,.chat-fullscreen #platformPill .pill{font-size:9px!important;padding:3px 6px!important}
  body.chat-fullscreen .filtered-counter-bar{align-items:center!important;gap:4px!important;flex-wrap:nowrap!important;overflow:hidden!important}
  body.chat-fullscreen .filtered-counter-chip{font-size:10px!important;padding:4px 7px!important;min-width:0!important}
  body.chat-fullscreen .filtered-counter-chip b{max-width:72px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.chat-fullscreen .chat-toolbar{flex:0 0 auto!important}
  body.chat-fullscreen .chat-line{grid-template-columns:1fr!important;gap:3px!important;padding:7px 8px!important}
  body.chat-fullscreen .chat-line > .user{grid-column:1!important;grid-row:1!important;font-size:12px!important}
  body.chat-fullscreen .chat-line > .msg{grid-column:1!important;grid-row:2!important;font-size:12px!important}
  body.chat-fullscreen .quick-action-popover{max-width:calc(100vw - 70px)!important}
}


/* Step 4.8: stable wrapping rows, better responsive chat and badge polish */
.chat-fullscreen .chat-line,
.chat-line{
  height:auto!important;
  min-height:auto!important;
  grid-auto-rows:auto!important;
  align-items:start!important;
  overflow:visible!important;
  contain:none!important;
}
.chat-line > .time,
.chat-line > .user,
.chat-line > .msg{
  min-height:0!important;
  align-self:start!important;
}
.chat-line > .msg{
  white-space:pre-wrap!important;
  overflow:visible!important;
  line-height:1.38!important;
  display:block!important;
  padding-top:0!important;
}
.chat-line > .user{
  line-height:1.22!important;
  display:block!important;
  padding-top:0!important;
}
.chat-line .user-with-badges{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.chat-line .user-link{
  flex-shrink:1!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.chat-line .pill{
  vertical-align:middle!important;
  margin-left:4px!important;
}
/* Timestamp off should be a normal two-column grid, not a hidden 0-width column. */
body.timestamps-off .chat-line{
  grid-template-columns:minmax(130px,210px) minmax(0,1fr)!important;
  gap:10px!important;
}
body.timestamps-off .chat-line > .time{
  display:none!important;
}
body.timestamps-off .chat-line > .user{
  grid-column:1!important;
  grid-row:1!important;
}
body.timestamps-off .chat-line > .msg{
  grid-column:2!important;
  grid-row:1!important;
}
body.timestamps-off .emote-line small{display:none!important}
/* Make badge tooltips/readability nicer. */
.kick-badge{cursor:help;user-select:none}.kick-badge.badge-gifted .badge-count,.kick-badge.badge-level .badge-count{font-weight:950}
.badge-staff{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.35);color:#fff}.badge-og{background:rgba(34,197,94,.14);border-color:rgba(34,197,94,.42);color:#a7f3d0}
/* Gift/pinned/top-gifter placeholders for future bars should not affect layout until data exists. */
.special-chat-bar:empty,.top-gifter-bar:empty,.pinned-message-bar:empty{display:none!important}
/* At narrower widths chat gets priority; emote panel only remains if there is enough room. */
@media(max-width:760px){
  body.chat-fullscreen .filtered-grid{grid-template-columns:1fr!important}
  body.chat-fullscreen .filtered-emote-card{display:none!important}
  body.chat-fullscreen .chat-line,
  body.timestamps-off .chat-line{
    grid-template-columns:minmax(95px,35%) minmax(0,1fr)!important;
    gap:7px!important;
  }
  body.chat-fullscreen .chat-line > .time{display:none!important}
  body.chat-fullscreen .chat-line > .user{grid-column:1!important;grid-row:1!important}
  body.chat-fullscreen .chat-line > .msg{grid-column:2!important;grid-row:1!important}
}
@media(max-width:520px){
  body.chat-fullscreen .chat-line,
  body.timestamps-off .chat-line{
    grid-template-columns:1fr!important;
    gap:4px!important;
  }
  body.chat-fullscreen .chat-line > .user,
  body.timestamps-off .chat-line > .user{grid-column:1!important;grid-row:1!important}
  body.chat-fullscreen .chat-line > .msg,
  body.timestamps-off .chat-line > .msg{grid-column:1!important;grid-row:2!important}
  body.chat-fullscreen .chat-line{padding:8px 9px!important}
}

/* Step 4.9: tighter chat fit, compact emote rows, stronger badge rendering */
/* ============================================================
   Step 4.14: Filtered chat — clean responsive layout
   Priority: text chat always visible. Emote panel is secondary.
   Badges always visible except at very narrow widths (<480px).
   ============================================================ */

/* --- Fullscreen filtered grid: side-by-side text + emotes --- */
.chat-fullscreen .filtered-grid.filtered-wide-grid{
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(300px,400px);
  grid-template-rows: 1fr;
  gap:12px;
  height:calc(100vh - 128px);
  min-height:0;
  overflow:hidden;
  align-items:stretch;
}
.chat-fullscreen .filtered-grid.filtered-wide-grid > .card{
  min-height:0;
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.chat-fullscreen .filtered-text-stream,
.chat-fullscreen .emote-stream{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
}

/* --- Chat line inside filtered chat --- */
.chat-fullscreen .chat-line{
  padding:8px 12px;
  border-radius:13px;
  font-size:13px;
  grid-template-columns:132px 230px minmax(0,1fr);
  gap:10px;
}
.chat-fullscreen .chat-line .time{font-size:11px}
body.timestamps-off.chat-fullscreen .chat-line{
  grid-template-columns:minmax(140px,230px) minmax(0,1fr);
  gap:12px;
}
.chat-fullscreen .chat-line > .msg{
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.35;
}
.chat-fullscreen .chat-line > .user{ overflow:hidden; }
.chat-fullscreen .user-with-badges{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:0;
  overflow:visible;
  flex-wrap:nowrap;
}
.chat-fullscreen .user-link{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex-shrink:1;
  min-width:0;
}

/* --- Badges always visible in filtered chat --- */
.chat-fullscreen .user-badges{
  display:inline-flex !important;
  gap:3px;
  align-items:center;
  flex:0 0 auto;
}
.chat-fullscreen .kick-badge-img img{width:18px;height:18px}

/* --- Emote lines --- */
.chat-fullscreen .emote-line{
  min-height:44px;
  max-height:58px;
  overflow:hidden;
  padding:8px 10px;
  align-items:center;
}
.chat-fullscreen .emote-line .user-with-badges{ max-width:150px; overflow:visible; }
.chat-fullscreen .emote-msg{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  line-height:1;
}
.chat-fullscreen .kick-emote.big{height:30px;max-width:38px;margin:0 2px;vertical-align:middle}
.chat-fullscreen .kick-emote{height:23px;max-width:32px}
.filtered-grid.emotes-compact .emote-line{min-height:38px;max-height:42px;padding:6px 9px}
.filtered-grid.emotes-compact .kick-emote.big{height:26px;max-width:32px}
.filtered-grid.emotes-compact .emote-stream{font-size:12px}

/* emote layout overrides */
.filtered-grid.emotes-hidden{ grid-template-columns:minmax(0,1fr) !important; }
.filtered-grid.emotes-compact{ grid-template-columns:minmax(0,1fr) minmax(160px,220px) !important; }
.filtered-grid.emotes-full{ grid-template-columns:minmax(0,1fr) minmax(300px,400px); }

/* --- Breakpoint: medium (1100px) — text chat full width, emotes below as short strip --- */
@media(max-width:1100px){
  .chat-fullscreen .filtered-grid.filtered-wide-grid{
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height:calc(100vh - 118px);
  }
  .chat-fullscreen .filtered-text-card{
    order:1;
    min-height:0;
  }
  .chat-fullscreen .filtered-emote-card{
    order:2;
    max-height:22vh;
    min-height:0;
  }
  .chat-fullscreen .emote-stream{
    max-height:calc(22vh - 48px);
  }
  body.timestamps-off.chat-fullscreen .chat-line{
    grid-template-columns:minmax(120px,30%) minmax(0,1fr);
  }
  /* Badges still visible at medium width */
  .chat-fullscreen .user-badges{ display:inline-flex !important; }
}

/* --- Breakpoint: small (760px) — text chat takes all space, emotes hidden --- */
@media(max-width:760px){
  .chat-fullscreen .filtered-grid.filtered-wide-grid{
    grid-template-columns:1fr;
    grid-template-rows:1fr;
    height:calc(100vh - 104px);
  }
  .chat-fullscreen .filtered-emote-card{ display:none !important; }
  .chat-fullscreen .filtered-text-card{ order:1; }
  .chat-fullscreen .filtered-text-stream{
    height:100%;
    max-height:none;
  }
  body.timestamps-off.chat-fullscreen .chat-line{
    grid-template-columns:minmax(90px,32%) minmax(0,1fr);
    gap:7px;
  }
  /* Badges still visible on small screens */
  .chat-fullscreen .user-badges{ display:inline-flex !important; }
}

/* --- Breakpoint: very narrow (480px) — timestamps off, minimal layout --- */
@media(max-width:480px){
  body.timestamps-off.chat-fullscreen .chat-line{
    grid-template-columns:minmax(80px,40%) minmax(0,1fr);
    gap:6px;
  }
  /* At very narrow widths hide badges to save space */
  .chat-fullscreen .user-badges{ display:none !important; }
}
@media(max-width:380px){
  body.timestamps-off.chat-fullscreen .chat-line{
    grid-template-columns:1fr;
  }
}

/* Step 4.10: local image badge assets instead of text-only badge pills. */
.user-badges{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  min-width:0;
}
.kick-badge-img{
  display:inline-flex;
  align-items:center;
  gap:2px;
  flex:0 0 auto;
  cursor:help;
  vertical-align:middle;
}
.kick-badge-img img{
  width:20px;
  height:20px;
  display:block;
  object-fit:contain;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));
}
.kick-badge-img .badge-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:14px;
  height:14px;
  padding:0 3px;
  border-radius:999px;
  background:#0b1220;
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  font-size:8px;
  line-height:1;
  font-weight:950;
  text-align:center;
  box-shadow:0 2px 7px rgba(0,0,0,.4);
  flex:0 0 auto;
}
.kick-badge-img.badge-level .badge-count{background:#f97316;color:#111827;border-color:#fed7aa;}
.kick-badge-img.badge-gifted .badge-count{background:#ec4899;color:#fff;border-color:#fbcfe8;}
.kick-badge-img.badge-sub .badge-count{background:#f59e0b;color:#111827;border-color:#fde68a;}
.chat-fullscreen .user-with-badges{gap:7px!important}
.chat-fullscreen .user-badges{gap:5px!important}
.chat-fullscreen .kick-badge-img img{width:18px;height:18px}
/* emotes-compact badges: small but visible — see rule above */
@media (max-width: 900px){
  body.chat-fullscreen .kick-badge-img, body.chat-fullscreen .kick-badge-img img{width:16px;height:16px}
  body.chat-fullscreen .user-badges{gap:3px!important}
  body.chat-fullscreen .kick-badge-img .badge-count{font-size:7px;height:12px;line-height:1;min-width:12px}
}

/* Step 4.12: badge reliability polish. */
.kick-badge-img.text-fallback{
  width:20px;
  height:20px;
  border-radius:999px;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.18);
  color:#e5edf8;
  font-size:8px;
  font-weight:950;
  line-height:20px;
  text-align:center;
  overflow:hidden;
}
.chat-line .user-badges{max-width:none;overflow:visible}
.chat-line .user-with-badges{white-space:nowrap;flex-wrap:nowrap;align-items:center}
.filtered-grid.emotes-full .emote-line .user-badges{max-width:none;overflow:visible}
.filtered-grid.emotes-compact .emote-line{grid-template-columns:minmax(82px,112px) minmax(0,1fr)!important}

/* ============================================================
   Step 4.17: Chat bubble, pinned messages, viewer count,
              special events (gifted subs, Kickz), top gifters
   ============================================================ */

/* --- Viewer count badge --- */
.viewer-count-badge{
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 10px;border-radius:999px;
  background:rgba(0,229,255,.10);border:1px solid rgba(0,229,255,.28);
  color:var(--accent);font-size:13px;font-weight:900;
  cursor:default;user-select:none;
}
.viewer-count-badge.hidden{display:none!important}

/* --- Pinned message bar --- */
.pinned-message-bar{
  display:flex;align-items:center;gap:10px;
  padding:10px 16px;margin:0 0 8px 0;
  background:linear-gradient(135deg,rgba(245,158,11,.16),rgba(245,158,11,.07));
  border:1px solid rgba(245,158,11,.40);border-radius:14px;
  color:var(--text);font-size:13px;
  width:min(100%,1780px);
}
.pinned-message-bar.hidden{display:none!important}
.pinned-icon{font-size:16px;flex:0 0 auto}
.pinned-user{font-weight:900;color:#fde68a;flex:0 0 auto}
.pinned-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.pinned-unpin-btn{flex:0 0 auto;padding:4px 8px!important;font-size:12px!important;opacity:.7}
.pinned-unpin-btn:hover{opacity:1}

/* --- Special event lines (gifted sub, Kickz) --- */
.event-line{background:rgba(16,20,28,.5)!important}
.event-gifted-sub{border-color:rgba(236,72,153,.38)!important;background:linear-gradient(135deg,rgba(236,72,153,.10),rgba(16,20,28,.60))!important}
.event-kickz{border-color:rgba(245,158,11,.38)!important;background:linear-gradient(135deg,rgba(245,158,11,.10),rgba(16,20,28,.60))!important}
.event-icon{font-size:16px;margin-right:4px}
.event-user{font-weight:900;color:var(--text)}
.event-msg{font-size:13px;color:var(--muted)}
.event-msg b{color:var(--text)}

/* --- Pin button on chat lines --- */
.chat-line-actions{display:flex;align-items:center;gap:4px;opacity:0;transition:opacity .15s}
.chat-line:hover .chat-line-actions{opacity:1}
.pin-btn{padding:3px 6px!important;font-size:12px!important;border-radius:8px!important;line-height:1!important}
.chat-line{grid-template-columns:150px 240px minmax(0,1fr) 30px!important}
.chat-fullscreen .chat-line{grid-template-columns:132px 230px minmax(0,1fr) 30px!important}
body.timestamps-off .chat-line{grid-template-columns:0 minmax(130px,210px) minmax(0,1fr) 30px!important}
body.timestamps-off.chat-fullscreen .chat-line{grid-template-columns:minmax(140px,230px) minmax(0,1fr) 30px!important}

/* --- Top gifters panel --- */
.top-gifter-panel{
  position:fixed;top:80px;right:24px;z-index:200;
  width:280px;
  background:linear-gradient(180deg,rgba(18,24,34,.98),rgba(11,15,22,.98));
  border:1px solid rgba(0,229,255,.28);border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  padding:0;overflow:hidden;
}
.top-gifter-panel.hidden{display:none!important}
.top-gifter-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px 10px;border-bottom:1px solid rgba(39,50,68,.6);
  font-weight:900;font-size:15px;color:var(--text);
}
.top-gifter-list{padding:8px 0;max-height:360px;overflow-y:auto}
.top-gifter-row{
  display:grid;grid-template-columns:32px 1fr auto;
  align-items:center;gap:8px;padding:8px 16px;
  transition:background .12s;
}
.top-gifter-row:hover{background:rgba(255,255,255,.05)}
.tg-rank{font-size:18px;text-align:center}
.tg-name{font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-gifts{color:var(--accent);font-size:12px;font-weight:900;white-space:nowrap}

/* --- Chat input bar --- */
.chat-input-bar{
  position:fixed;bottom:0;left:292px;right:0;
  z-index:100;
  background:linear-gradient(0deg,rgba(8,12,18,.98) 80%,rgba(8,12,18,.0));
  padding:8px 20px 12px;
  border-top:1px solid rgba(39,50,68,.5);
}
.sidebar-collapsed .chat-input-bar{left:82px}
body.chat-fullscreen .chat-input-bar{left:66px}
.chat-input-bar.hidden{display:none!important}
.chat-input-row{
  display:flex;align-items:center;gap:8px;
  max-width:1400px;margin:0 auto;
}
.chat-emote-btn{
  flex:0 0 auto;width:36px;height:36px;padding:0!important;
  font-size:20px;border-radius:50%!important;
  background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.14)!important;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .15s;
}
.chat-emote-btn:hover{background:rgba(0,229,255,.15)!important;border-color:rgba(0,229,255,.35)!important}
.chat-input-field{
  flex:1;min-width:0;height:36px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(39,50,68,.9);border-radius:999px;
  color:var(--text);font-size:14px;padding:0 16px;
  outline:none;transition:border-color .15s;
}
.chat-input-field:focus{border-color:rgba(0,229,255,.5);background:rgba(255,255,255,.09)}
.chat-char-count{font-size:11px;color:var(--dim);white-space:nowrap;flex:0 0 auto}
.chat-send-btn{flex:0 0 auto;height:36px;padding:0 18px!important;border-radius:999px!important;white-space:nowrap}
.chat-send-status{text-align:center;font-size:12px;color:var(--dim);min-height:16px;margin-top:4px;max-width:1400px;margin-left:auto;margin-right:auto}

/* Account for chat input bar height in fullscreen */
body.chat-fullscreen .filtered-grid.filtered-wide-grid,
body.chat-fullscreen .chat-card-wide .chat-stream,
body.chat-fullscreen .filtered-text-stream,
body.chat-fullscreen .emote-stream{
  padding-bottom:70px;
}

/* --- Emote picker panel --- */
.emote-picker-panel{
  position:absolute;bottom:calc(100% + 4px);left:20px;
  width:min(460px,calc(100vw - 40px));
  max-height:300px;
  background:rgba(13,18,26,.98);border:1px solid rgba(39,50,68,.9);
  border-radius:16px;box-shadow:0 -8px 40px rgba(0,0,0,.5);
  overflow:hidden;display:flex;flex-direction:column;z-index:200;
}
.emote-picker-panel.hidden{display:none!important}
.emote-picker-search{padding:8px 10px;border-bottom:1px solid rgba(39,50,68,.5)}
.emote-picker-search input{
  width:100%;background:rgba(255,255,255,.07);border:1px solid rgba(39,50,68,.8);
  border-radius:8px;padding:6px 10px;color:var(--text);font-size:13px;outline:none;
}
.emote-section-label{padding:6px 10px 2px;font-size:11px;font-weight:900;color:var(--dim);text-transform:uppercase;letter-spacing:.06em}
.emote-picker-grid{
  display:flex;flex-wrap:wrap;gap:2px;padding:4px 8px 8px;
  overflow-y:auto;max-height:200px;
}
.emote-pick-btn{
  width:36px;height:36px;padding:2px;border-radius:8px;
  background:transparent;border:1px solid transparent;
  cursor:pointer;transition:background .12s,border-color .12s;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;color:var(--muted);
}
.emote-pick-btn:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.18)}
.emote-pick-btn img{width:28px;height:28px;object-fit:contain}

/* Sidebar collapsed: chat bar stretches full width */

@media(max-width:760px){
  .chat-input-bar{left:0;padding:6px 10px 8px}
  .top-gifter-panel{right:8px;width:260px}
}

body.pin-disabled .pin-btn{display:none!important}

/* Step 4.21: channel access table + chat input should never cover the sidebar */
.access-table td{vertical-align:middle}
.mini-check{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:800;white-space:nowrap}
.mini-check input{width:auto;margin:0}
body.chat-fullscreen .chat-input-bar{left:292px!important}
body.sidebar-collapsed.chat-fullscreen .chat-input-bar{left:82px!important}
@media(max-width:900px){body.chat-fullscreen .chat-input-bar{left:66px!important}}
@media(max-width:520px){body.chat-fullscreen .chat-input-bar{left:54px!important;padding:6px 8px 8px!important}.chat-send-btn{padding:0 12px!important}.chat-char-count{display:none!important}}

/* Step 4.23: global settings + events foundation */
.inner-card{box-shadow:none;background:rgba(8,10,15,.34)}
.event-admin-card,.event-settings-item{border-color:rgba(0,229,255,.16)}
.event-admin-card h3 a{color:var(--text);text-decoration:none}.event-admin-card h3 a:hover{color:var(--accent)}
.switch-row.slim{margin:10px 0}.settings-wide-grid .field textarea{min-height:92px}
#eventNav .channel-nav-group{border-color:rgba(124,58,237,.24)}
#eventNav .channel-dot{background:var(--purple);box-shadow:0 0 14px rgba(124,58,237,.45)}

/* Step 4.24: per-channel bot commands */
.command-edit-grid .span-2{grid-column:span 2}
#channelCommands .table input{min-width:0;padding:8px 10px;border-radius:9px;font-size:13px}
#channelCommands .table td{vertical-align:middle}
@media(max-width:900px){.command-edit-grid .span-2{grid-column:auto}}

.disabled-event-sub{display:flex;align-items:center;gap:10px;color:var(--dim);padding:9px 12px;border-radius:12px;font-size:13px;font-weight:800;opacity:.75;cursor:default}
.sidebar-collapsed .disabled-event-sub span:nth-child(2){display:none!important}


/* Step 4.33: cleaner channel settings */
.settings-layout-clean{align-items:start}.compact-title-row h3{margin-bottom:0}.mini-btn{padding:7px 10px!important;border-radius:10px!important;font-size:12px!important;white-space:nowrap}.status-clean-card{min-height:0}.channel-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.status-kv{border:1px solid rgba(39,50,68,.58);background:rgba(8,12,18,.34);border-radius:12px;padding:8px 10px;min-width:0}.status-kv span{display:block;color:var(--dim);font-size:10px;text-transform:uppercase;letter-spacing:.10em;font-weight:900;margin-bottom:4px}.status-kv b{display:block;color:var(--text);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-pill-line{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.status-pill-line small{color:var(--dim);font-size:11px}.compact-status-tools{display:grid;grid-template-columns:auto minmax(160px,1fr) auto;gap:8px;align-items:center}.compact-status-tools input{padding:8px 10px;font-size:12px}.compact-switch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-switch-grid .switch-row{padding:10px 12px;border-radius:14px}.compact-switch-grid .switch-row small{font-size:11px}.access-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.access-search-results{display:grid;gap:8px;margin-top:10px}.access-search-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(39,50,68,.58);background:rgba(8,12,18,.35);border-radius:12px;padding:9px 10px}.access-search-item small{color:var(--dim)}.compact-note{margin:2px 0 0!important;font-size:12px!important;line-height:1.35!important}.compact-panel{border:1px solid rgba(39,50,68,.58);border-radius:14px;padding:12px;background:rgba(8,12,18,.30)}.inner-card{box-shadow:none;background:rgba(8,12,18,.22);border-color:rgba(39,50,68,.58)}.ai-settings-card .settings-wide-grid{width:100%}.phrase-counter-compact h3{margin:0}.access-table .mini-check{white-space:nowrap}.access-table td{vertical-align:middle}@media(max-width:1100px){.compact-switch-grid{grid-template-columns:1fr}.compact-status-tools,.access-search-row{grid-template-columns:1fr}.channel-status-grid{grid-template-columns:1fr}}

/* Step 4.34: event settings top + Deadmanmode event editor */
.event-settings-top{border-color:rgba(124,58,237,.28);background:linear-gradient(180deg,rgba(24,20,38,.96),rgba(16,20,28,.96))}
.dmm-team-card textarea{min-height:72px}
.dmm-card .prompt-box{min-height:150px}
.dmm-card{border-color:rgba(239,68,68,.28);box-shadow:0 18px 50px rgba(239,68,68,.06)}

/* Step 4.36 admin sidebar/chat stream helpers */
.admin-global-nav .channel-sub { font-weight: 800; }
.nav-empty-note { padding: 6px 12px 12px; font-size: 12px; color: var(--muted); }
.mini-switch { padding: 4px 6px; gap: 6px; min-height: 0; justify-content: flex-start; }
.mini-switch span { font-size: 11px; color: var(--muted); font-weight: 800; }
.mini-switch i { transform: scale(.75); transform-origin: left center; }
.table td .mini-switch { margin: 0; }

/* Step 4.37: global all-chat view + safer channel nav preferences */
.all-chat-stream .chat-line{grid-template-columns:150px minmax(260px, 360px) 1fr;}
.all-channel-pill{display:inline-flex;align-items:center;justify-content:center;max-width:118px;margin-right:6px;padding:2px 7px;border-radius:999px;background:rgba(0,229,255,.10);border:1px solid rgba(0,229,255,.18);color:var(--accent);font-size:10px;font-weight:900;text-transform:lowercase;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:980px){.all-chat-stream .chat-line{grid-template-columns:88px 1fr}.all-chat-stream .msg{grid-column:2}.all-channel-pill{max-width:90px}}

/* Step 4.38: switch state visual fallback for dynamic toggles */
.switch-row:has(input[type="checkbox"]:checked){border-color:rgba(16,185,129,.45);background:linear-gradient(135deg,rgba(16,185,129,.10),rgba(16,20,28,.74))}
.switch-row:has(input[type="checkbox"]:checked) i{background:rgba(16,185,129,.24);border-color:rgba(16,185,129,.58)}
.switch-row:has(input[type="checkbox"]:checked) i:before{left:30px;background:#34d399}
.mini-switch:has(input[type="checkbox"]:checked),.mini-switch.on{border-color:rgba(16,185,129,.50)!important;background:linear-gradient(135deg,rgba(16,185,129,.12),rgba(16,20,28,.78))!important;color:var(--good)!important}
.mini-switch:has(input[type="checkbox"]:checked) i,.mini-switch.on i{background:rgba(16,185,129,.25)!important;border-color:rgba(16,185,129,.60)!important}
.mini-switch:has(input[type="checkbox"]:checked) i:before,.mini-switch.on i:before{left:30px!important;background:#34d399!important}
.danger-link{color:#f87171!important;border-color:rgba(239,68,68,.35)!important}
.admin-create-panel{display:grid;gap:10px;margin-top:10px;padding:12px;border:1px solid rgba(39,50,68,.55);border-radius:14px;background:rgba(8,12,18,.30)}
.dashboard-skeleton .stat{font-size:22px;color:var(--muted)}
.loading-line{height:14px;border-radius:999px;background:linear-gradient(90deg,rgba(255,255,255,.05),rgba(255,255,255,.11),rgba(255,255,255,.05));margin:9px 0;animation:rbbPulse 1.2s ease-in-out infinite}
@keyframes rbbPulse{0%,100%{opacity:.45}50%{opacity:1}}

/* ============================================================
   Dry-run / simulation mode toggle (queue page)
   ============================================================ */
.dry-run-off{
  background:rgba(239,68,68,.12)!important;
  border:1px solid rgba(239,68,68,.35)!important;
  color:#f87171!important;
  font-weight:900!important;
  font-size:13px!important;
  padding:8px 14px!important;
  border-radius:10px!important;
  transition:all .15s;
}
.dry-run-off:hover{
  background:rgba(239,68,68,.22)!important;
  border-color:rgba(239,68,68,.6)!important;
}
.dry-run-on{
  background:rgba(251,191,36,.15)!important;
  border:2px solid rgba(251,191,36,.7)!important;
  color:#fbbf24!important;
  font-weight:900!important;
  font-size:13px!important;
  padding:8px 14px!important;
  border-radius:10px!important;
  box-shadow:0 0 16px rgba(251,191,36,.2);
  animation:dryRunPulse 2s ease-in-out infinite;
}
@keyframes dryRunPulse{
  0%,100%{box-shadow:0 0 12px rgba(251,191,36,.15)}
  50%{box-shadow:0 0 22px rgba(251,191,36,.35)}
}
.dry-run-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 16px;
  margin:8px 0 4px;
  background:linear-gradient(135deg,rgba(251,191,36,.12),rgba(251,191,36,.06));
  border:1px solid rgba(251,191,36,.45);
  border-radius:12px;
  font-size:13px;
  color:#fde68a;
}
.dry-run-banner.hidden{display:none!important}
.dry-run-banner span:first-child{font-size:18px;flex:0 0 auto}

.queue-dmm-settings{margin-top:10px;padding:10px 12px;border:1px solid rgba(239,68,68,.28);border-radius:14px;background:rgba(239,68,68,.07);color:var(--muted);font-size:12px;line-height:1.45}.queue-dmm-settings>div{margin-top:5px}.queue-dmm-settings>div:first-child{margin-top:0}.queue-dmm-settings summary{cursor:pointer;color:#ff8a8a;font-weight:800}.queue-dmm-settings details{margin-top:6px}

/* V1.42 channel navigation cleanup */
.channel-sub-child{padding-left:28px!important;font-size:13px!important;opacity:.92}
.channel-sub-child span:first-child{opacity:.65}
.embed-page{background:transparent;min-height:100vh}
.embed-page .channel-page-head{margin-top:0}
.embed-frame{width:100%;border:0;min-height:calc(100vh - 170px);display:block;border-radius:18px;background:rgba(8,12,18,.35)}
.channel-tabbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.channel-tabbar .btn.active{color:var(--accent);border-color:rgba(0,229,255,.42);background:rgba(0,229,255,.08)}
.bot-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:14px}
@media(max-width:1100px){.bot-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.bot-overview-grid{grid-template-columns:1fr}}


/* Step 4.43: embedded chat layout polish for combined Chat page */
body.chat-embed-mode{
  height:auto !important;
  overflow:auto !important;
}
body.chat-embed-mode .app{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
}
body.chat-embed-mode .sidebar,
body.chat-embed-mode .sidebar-userbar{
  display:none !important;
}
body.chat-embed-mode .main{
  margin-left:0 !important;
  width:100% !important;
  height:auto !important;
  min-width:0 !important;
  overflow:visible !important;
}
body.chat-embed-mode .content{
  height:auto !important;
  overflow:visible !important;
  padding:0 !important;
  max-width:none !important;
  width:100% !important;
}
body.chat-embed-mode .channel-page-head{
  display:none !important;
}
body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .chat-card-wide,
body.chat-embed-mode .filtered-grid.filtered-wide-grid,
body.chat-embed-mode .filtered-counter-bar{
  width:100% !important;
  max-width:none !important;
}
body.chat-embed-mode .chat-card-wide,
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  margin-top:0 !important;
}
body.chat-embed-mode .chat-card-wide .chat-stream,
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  padding-bottom:14px !important;
}
body.chat-embed-mode .chat-input-bar{
  position:relative !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  margin-top:12px !important;
  padding:8px 0 0 !important;
  border-top:0 !important;
  background:none !important;
  z-index:auto !important;
}
body.chat-embed-mode .chat-input-row,
body.chat-embed-mode .chat-send-status{
  max-width:none !important;
}
body.chat-embed-mode .emote-picker-panel{
  left:0 !important;
  width:min(460px, calc(100vw - 24px)) !important;
}
body.chat-embed-mode .chat-fullscreen-spacer{ display:none !important; }

/* Better use of horizontal space on live chat */
body.chat-embed-mode .chat-card-wide .chat-line,
body.chat-embed-mode.chat-fullscreen .chat-card-wide .chat-line{
  grid-template-columns:118px 220px minmax(0,1fr) 30px !important;
}
body.chat-embed-mode.timestamps-off .chat-line,
body.chat-embed-mode.timestamps-off.chat-fullscreen .chat-line{
  grid-template-columns:minmax(180px,250px) minmax(0,1fr) 30px !important;
}

/* Filtered chat: give the emote panel a bit more room and prevent overlap */
body.chat-fullscreen .filtered-grid.filtered-wide-grid,
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  grid-template-columns:minmax(0,1fr) minmax(340px,460px);
}
body.chat-fullscreen .filtered-emote-card,
body.chat-embed-mode .filtered-emote-card{
  min-width:0;
}
body.chat-fullscreen .emote-line,
body.chat-embed-mode .emote-line{
  grid-template-columns:minmax(150px,190px) minmax(0,1fr);
  gap:12px;
  min-height:50px;
  max-height:none;
  align-items:center;
}
body.chat-fullscreen .emote-line > div:first-child,
body.chat-embed-mode .emote-line > div:first-child{
  min-width:0;
  overflow:hidden;
}
body.chat-fullscreen .emote-line .user-with-badges,
body.chat-embed-mode .emote-line .user-with-badges{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  max-width:100%;
  flex-wrap:nowrap;
}
body.chat-fullscreen .emote-line .user-badges,
body.chat-embed-mode .emote-line .user-badges{
  flex:0 0 auto;
  max-width:none;
}
body.chat-fullscreen .emote-line .user-link,
body.chat-embed-mode .emote-line .user-link{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.chat-fullscreen .emote-msg,
body.chat-embed-mode .emote-msg{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:4px;
  white-space:normal;
  overflow:visible;
  min-width:0;
}
.filtered-grid.emotes-compact .emote-line{
  grid-template-columns:minmax(120px,150px) minmax(0,1fr) !important;
  min-height:42px;
  max-height:none;
}
.filtered-grid.emotes-compact .filtered-emote-card{
  max-width:300px;
}
@media (max-width: 1200px){
  body.chat-fullscreen .filtered-grid.filtered-wide-grid,
  body.chat-embed-mode .filtered-grid.filtered-wide-grid{
    grid-template-columns:minmax(0,1fr) minmax(280px,360px);
  }
  body.chat-fullscreen .emote-line,
  body.chat-embed-mode .emote-line{
    grid-template-columns:minmax(135px,170px) minmax(0,1fr);
  }
}
@media (max-width: 900px){
  body.chat-embed-mode .chat-input-bar{padding-top:6px !important;}
  body.chat-fullscreen .filtered-grid.filtered-wide-grid,
  body.chat-embed-mode .filtered-grid.filtered-wide-grid{
    grid-template-columns:1fr !important;
  }
  body.chat-fullscreen .filtered-emote-card,
  body.chat-embed-mode .filtered-emote-card{
    max-height:26vh;
  }
}


/* Step 4.44: live/filtered chat polish */
.live-counter-bar{margin:0 0 8px 0;min-height:34px}
.filtered-counter-chip.queue-notice{border-color:rgba(0,229,255,.42);background:rgba(0,229,255,.09);color:#8ef3ff}
.filtered-counter-chip.queue-notice .count{background:rgba(0,229,255,.16);border-color:rgba(0,229,255,.32);color:#b8f7ff}

/* Embed pages inside combined Channel Chat should keep a fixed chat viewport with input below it. */
body.chat-embed-mode{
  height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .app{
  display:flex !important;
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .main{
  margin-left:0 !important;
  width:100% !important;
  height:100vh !important;
  min-width:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .content{
  display:flex !important;
  flex-direction:column !important;
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:0 !important;
  max-width:none !important;
  width:100% !important;
}
body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .filtered-counter-bar,
body.chat-embed-mode .chat-card-wide,
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  width:100% !important;
  max-width:none !important;
}
body.chat-embed-mode .chat-card-wide{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body.chat-embed-mode .chat-card-wide .split{flex:0 0 auto}
body.chat-embed-mode .chat-card-wide .chat-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  height:auto !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-bottom:10px !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  overflow:hidden !important;
  grid-template-columns:minmax(0,1fr) minmax(320px,420px) !important;
}
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-bottom:10px !important;
}
body.chat-embed-mode .chat-input-bar{
  position:relative !important;
  flex:0 0 auto !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  margin-top:10px !important;
  padding:8px 0 0 !important;
  border-top:1px solid rgba(39,50,68,.5) !important;
  background:linear-gradient(180deg,rgba(8,12,18,.0),rgba(8,12,18,.98) 40%) !important;
  z-index:auto !important;
}
body.chat-embed-mode .chat-input-row,
body.chat-embed-mode .chat-send-status{max-width:none !important}
body.chat-embed-mode .emote-picker-panel{left:0 !important}
body.chat-embed-mode .chat-card-wide .chat-line{grid-template-columns:120px 210px minmax(0,1fr) 30px !important}
body.chat-embed-mode.timestamps-off .chat-line{grid-template-columns:minmax(180px,250px) minmax(0,1fr) 30px !important}

/* Compact emote mode: show username + one emote clearly. */
.filtered-grid.emotes-compact{grid-template-columns:minmax(0,1fr) minmax(210px,280px) !important}
.filtered-grid.emotes-compact .filtered-emote-card{max-width:none}
.filtered-grid.emotes-compact .emote-line{
  grid-template-columns:minmax(130px,1fr) auto !important;
  gap:10px !important;
  min-height:44px !important;
  max-height:none !important;
  align-items:center !important;
}
.filtered-grid.emotes-compact .emote-line > div:first-child{min-width:0;overflow:hidden}
.filtered-grid.emotes-compact .emote-msg{
  justify-content:flex-start !important;
  min-width:28px !important;
  overflow:visible !important;
  white-space:nowrap !important;
}
.filtered-grid.emotes-compact .user-with-badges{max-width:100% !important;overflow:visible !important}
.filtered-grid.emotes-compact .user-link{max-width:none !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important}
.filtered-grid.emotes-compact .kick-emote.big{height:24px !important;max-width:30px !important;margin:0 !important}

/* Full emote mode: leave room for badges + name + up to four emotes. */
body.chat-fullscreen .emote-line,
body.chat-embed-mode .emote-line{
  grid-template-columns:minmax(150px,190px) minmax(0,1fr);
  gap:12px;
  min-height:50px;
}
body.chat-fullscreen .emote-line > div:first-child,
body.chat-embed-mode .emote-line > div:first-child{min-width:0;overflow:hidden}
body.chat-fullscreen .emote-msg,
body.chat-embed-mode .emote-msg{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:4px;
  white-space:normal;
  overflow:visible;
}
@media(max-width:1100px){
  body.chat-embed-mode .filtered-grid.filtered-wide-grid{grid-template-columns:1fr !important;grid-template-rows:1fr auto !important}
  body.chat-embed-mode .filtered-emote-card{max-height:25vh !important}
}


/* Step 4.45: hard reset for combined Chat iframe layout
   - parent iframe fills remaining space
   - inner live/filtered pages keep real scrollbars
   - chat bubble is fixed at the bottom of the iframe and never steals the scroll area
*/
body.chat-fullscreen .embed-frame{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  overflow:hidden !important;
}
body.chat-embed-mode{
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .app{
  display:flex !important;
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .sidebar,
body.chat-embed-mode .sidebar-userbar,
body.chat-embed-mode .channel-page-head{
  display:none !important;
}
body.chat-embed-mode .main{
  margin-left:0 !important;
  width:100% !important;
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .content{
  display:flex !important;
  flex-direction:column !important;
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
}
body.chat-embed-mode #msg{display:none !important;}
body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .filtered-counter-bar,
body.chat-embed-mode .chat-card-wide,
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  width:100% !important;
  max-width:none !important;
  flex:0 0 auto;
}
body.chat-embed-mode .pinned-message-bar.hidden,
body.chat-embed-mode .filtered-counter-bar.hidden{display:none !important;}

/* Live chat: one fixed viewport + visible scrollbar */
body.chat-embed-mode .chat-card-wide{
  flex:1 1 auto !important;
  min-height:0 !important;
  margin:0 0 72px 0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body.chat-embed-mode .chat-card-wide .split{flex:0 0 auto !important;}
body.chat-embed-mode .chat-card-wide .chat-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  padding-bottom:10px !important;
  scroll-behavior:smooth;
}

/* Filtered chat: text/emote cards always get their own scrollbars */
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  margin:0 0 72px 0 !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(330px,430px) !important;
  grid-template-rows:minmax(0,1fr) !important;
  gap:12px !important;
  align-items:stretch !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card{
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card > .split{flex:0 0 auto !important;}
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  padding-bottom:10px !important;
}

/* Hide emote chat must make normal filtered chat full width */
body.chat-embed-mode .filtered-grid.emotes-hidden,
body.chat-fullscreen .filtered-grid.emotes-hidden{
  grid-template-columns:minmax(0,1fr) !important;
}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-emote-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-emote-card{
  display:none !important;
}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-text-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-text-card{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:none !important;
}

/* The send bubble is outside the scroll area, at the bottom of the iframe. */
body.chat-embed-mode .chat-input-bar{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:auto !important;
  margin:0 !important;
  padding:8px 14px 10px !important;
  border-top:1px solid rgba(39,50,68,.65) !important;
  background:linear-gradient(0deg,rgba(8,12,18,.99) 72%,rgba(8,12,18,.0)) !important;
  z-index:500 !important;
}
body.chat-embed-mode .chat-input-bar.hidden{display:none !important;}
body.chat-embed-mode .chat-input-row,
body.chat-embed-mode .chat-send-status{
  max-width:none !important;
}
body.chat-embed-mode .emote-picker-panel{
  left:14px !important;
  bottom:calc(100% + 6px) !important;
}

/* Compact emote mode: username + one emote, still scrollable. */
body.chat-embed-mode .filtered-grid.emotes-compact,
body.chat-fullscreen .filtered-grid.emotes-compact{
  grid-template-columns:minmax(0,1fr) minmax(230px,310px) !important;
}
.filtered-grid.emotes-compact .emote-line{
  grid-template-columns:minmax(150px,1fr) auto !important;
  min-height:44px !important;
  max-height:none !important;
  gap:10px !important;
  align-items:center !important;
}
.filtered-grid.emotes-compact .emote-line > div:first-child{
  min-width:0 !important;
  overflow:hidden !important;
}
.filtered-grid.emotes-compact .user-with-badges{
  max-width:100% !important;
  overflow:visible !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:5px !important;
  flex-wrap:nowrap !important;
}
.filtered-grid.emotes-compact .user-link{
  min-width:0 !important;
  max-width:none !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.filtered-grid.emotes-compact .emote-msg{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow:visible !important;
  white-space:nowrap !important;
}
.filtered-grid.emotes-compact .kick-emote.big{
  height:26px !important;
  max-width:34px !important;
  margin:0 !important;
}

/* Full emote mode: enough room for badges + name + max 4 emotes. */
body.chat-embed-mode .emote-line,
body.chat-fullscreen .emote-line{
  grid-template-columns:minmax(160px,210px) minmax(0,1fr) !important;
  gap:12px !important;
  min-height:50px !important;
  max-height:none !important;
  align-items:center !important;
}
body.chat-embed-mode .emote-line > div:first-child,
body.chat-fullscreen .emote-line > div:first-child{
  min-width:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .emote-msg,
body.chat-fullscreen .emote-msg{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:wrap !important;
  gap:4px !important;
  white-space:normal !important;
  overflow:visible !important;
  min-width:0 !important;
}
@media(max-width:1100px){
  body.chat-embed-mode .filtered-grid.filtered-wide-grid{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) auto !important;
  }
  body.chat-embed-mode .filtered-emote-card{max-height:26vh !important;}
}


/* Step 4.46: final chat scroll + bubble positioning fix
   The send bubble is a real row BELOW the chat, never an overlay.
   Scroll-wheel is kept on the message containers.
*/
body.chat-fullscreen .embed-frame{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  overflow:hidden !important;
}
body.chat-embed-mode{
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .app,
body.chat-embed-mode .main,
body.chat-embed-mode .content{
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .content{
  display:flex !important;
  flex-direction:column !important;
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
}
body.chat-embed-mode .sidebar,
body.chat-embed-mode .sidebar-userbar,
body.chat-embed-mode .channel-page-head,
body.chat-embed-mode #msg{display:none !important}
body.chat-embed-mode .main{margin-left:0 !important;width:100% !important}

body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .filtered-counter-bar{
  flex:0 0 auto !important;
  width:100% !important;
  max-width:none !important;
  margin-bottom:8px !important;
}
body.chat-embed-mode .pinned-message-bar.hidden,
body.chat-embed-mode .filtered-counter-bar.hidden{display:none !important}

/* Live chat viewport */
body.chat-embed-mode .chat-card-wide{
  flex:1 1 auto !important;
  min-height:0 !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body.chat-embed-mode .chat-card-wide .split{flex:0 0 auto !important}
body.chat-embed-mode .chat-card-wide .chat-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  padding-bottom:10px !important;
  scrollbar-width:auto !important;
}

/* Filtered chat viewport */
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important;
  grid-template-rows:minmax(0,1fr) !important;
  gap:12px !important;
  align-items:stretch !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card{
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card > .split{flex:0 0 auto !important}
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  padding-bottom:10px !important;
  scrollbar-width:auto !important;
}

/* Send bubble below chat with real space between chat and input. */
body.chat-embed-mode .chat-input-bar{
  position:relative !important;
  flex:0 0 auto !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  margin:16px 0 0 0 !important;
  padding:10px 0 0 0 !important;
  border-top:1px solid rgba(39,50,68,.65) !important;
  background:rgba(8,12,18,.98) !important;
  z-index:auto !important;
}
body.chat-embed-mode .chat-input-row,
body.chat-embed-mode .chat-send-status{max-width:none !important}
body.chat-embed-mode .emote-picker-panel{left:0 !important;bottom:calc(100% + 8px) !important}

/* Hide emote chat means text chat becomes full width. */
body.chat-embed-mode .filtered-grid.emotes-hidden,
body.chat-fullscreen .filtered-grid.emotes-hidden{grid-template-columns:minmax(0,1fr) !important}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-emote-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-emote-card{display:none !important}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-text-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-text-card{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:none !important;
}

/* Compact mode: only readable username + one emote. */
body.chat-embed-mode .filtered-grid.emotes-compact,
body.chat-fullscreen .filtered-grid.emotes-compact{grid-template-columns:minmax(0,1fr) minmax(260px,340px) !important}
.filtered-grid.emotes-compact .emote-line{
  grid-template-columns:minmax(150px,1fr) 34px !important;
  gap:10px !important;
  min-height:44px !important;
  max-height:none !important;
  align-items:center !important;
}
.filtered-grid.emotes-compact .emote-line > div:first-child{min-width:0 !important;overflow:hidden !important}
.filtered-grid.emotes-compact .user-with-badges{max-width:100% !important;display:inline-flex !important;align-items:center !important;gap:5px !important;flex-wrap:nowrap !important;overflow:visible !important}
.filtered-grid.emotes-compact .user-link{min-width:0 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important}
.filtered-grid.emotes-compact .emote-msg{display:flex !important;align-items:center !important;justify-content:flex-start !important;white-space:nowrap !important;overflow:hidden !important}
.filtered-grid.emotes-compact .kick-emote.big{height:26px !important;max-width:32px !important;margin:0 !important}

/* Full mode: four emotes next to each other, compact row. */
body.chat-embed-mode .filtered-grid.emotes-full,
body.chat-fullscreen .filtered-grid.emotes-full{grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important}
.filtered-grid.emotes-full .emote-line,
body.chat-embed-mode .filtered-grid.emotes-full .emote-line{
  grid-template-columns:minmax(150px,175px) minmax(140px,1fr) !important;
  gap:12px !important;
  min-height:50px !important;
  max-height:none !important;
  align-items:center !important;
}
.filtered-grid.emotes-full .emote-msg,
body.chat-embed-mode .filtered-grid.emotes-full .emote-msg{
  display:grid !important;
  grid-template-columns:repeat(4, 32px) !important;
  grid-auto-rows:32px !important;
  gap:4px !important;
  align-items:center !important;
  justify-content:start !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  min-width:0 !important;
}
.filtered-grid.emotes-full .kick-emote.big{height:30px !important;max-width:32px !important;margin:0 !important}

@media(max-width:1100px){
  body.chat-embed-mode .filtered-grid.filtered-wide-grid,
  body.chat-embed-mode .filtered-grid.emotes-full,
  body.chat-embed-mode .filtered-grid.emotes-compact{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) auto !important;
  }
  body.chat-embed-mode .filtered-emote-card{max-height:28vh !important}
}


/* ============================================================
   Step 4.47: real chat layout fix
   Goal:
   - create dedicated bottom space for chat bubble
   - chat bubble is UNDER chat, not inside/over it
   - live chat, filtered chat and emote chat have real working scroll areas
   - hide emotes makes text chat full width
   - full emote mode shows max 4 emotes in one compact row
   ============================================================ */
body.chat-fullscreen .embed-frame{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  border:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode,
body.chat-embed-mode html{
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.chat-embed-mode .app,
body.chat-embed-mode .main{
  height:100vh !important;
  min-height:0 !important;
  width:100% !important;
  margin-left:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .sidebar,
body.chat-embed-mode .sidebar-userbar,
body.chat-embed-mode .channel-page-head,
body.chat-embed-mode #msg{
  display:none !important;
}
body.chat-embed-mode .content{
  height:100vh !important;
  min-height:0 !important;
  width:100% !important;
  max-width:none !important;
  overflow:hidden !important;
  padding:0 !important;
  display:grid !important;
  grid-template-rows:auto auto minmax(0,1fr) auto !important;
  row-gap:12px !important;
}
body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .filtered-counter-bar{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
body.chat-embed-mode .pinned-message-bar.hidden,
body.chat-embed-mode .filtered-counter-bar.hidden{
  display:none !important;
}

/* Live chat card: intentionally a little shorter because input has its own row below. */
body.chat-embed-mode .chat-card-wide{
  grid-row:auto !important;
  width:100% !important;
  max-width:none !important;
  min-height:0 !important;
  height:100% !important;
  margin:0 !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
body.chat-embed-mode .chat-card-wide .split{
  flex:0 0 auto !important;
}
body.chat-embed-mode .chat-card-wide .chat-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  pointer-events:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-width:auto !important;
  padding-bottom:14px !important;
  scroll-behavior:smooth !important;
}
body.chat-embed-mode .chat-card-wide .chat-line{
  grid-template-columns:120px 220px minmax(0,1fr) 30px !important;
}
body.chat-embed-mode.timestamps-off .chat-card-wide .chat-line{
  grid-template-columns:minmax(190px,260px) minmax(0,1fr) 30px !important;
}

/* Filtered chat: text and emote columns both get their own real scrollbars. */
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  grid-row:auto !important;
  width:100% !important;
  max-width:none !important;
  min-height:0 !important;
  height:100% !important;
  margin:0 !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important;
  grid-template-rows:minmax(0,1fr) !important;
  gap:12px !important;
  align-items:stretch !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card{
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card > .split{
  flex:0 0 auto !important;
}
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  pointer-events:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-width:auto !important;
  padding-bottom:14px !important;
}

/* Chat bubble: real bottom row UNDER the chat, with clear spacing. */
body.chat-embed-mode .chat-input-bar{
  grid-row:auto !important;
  position:relative !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  margin:8px 0 0 0 !important;
  padding:14px 0 0 0 !important;
  border-top:1px solid rgba(39,50,68,.72) !important;
  background:transparent !important;
  z-index:auto !important;
  flex:0 0 auto !important;
}
body.chat-embed-mode .chat-input-row,
body.chat-embed-mode .chat-send-status{
  max-width:none !important;
}
body.chat-embed-mode .emote-picker-panel{
  left:0 !important;
  bottom:calc(100% + 8px) !important;
}

/* Hide emote chat: text chat becomes the entire width. */
body.chat-embed-mode .filtered-grid.emotes-hidden,
body.chat-fullscreen .filtered-grid.emotes-hidden{
  grid-template-columns:minmax(0,1fr) !important;
}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-emote-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-emote-card{
  display:none !important;
}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-text-card,
body.chat-fullscreen .filtered-grid.emotes-hidden .filtered-text-card{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:none !important;
}

/* Compact emote mode: username + one emote, readable, with scrollbar. */
body.chat-embed-mode .filtered-grid.emotes-compact,
body.chat-fullscreen .filtered-grid.emotes-compact{
  grid-template-columns:minmax(0,1fr) minmax(280px,360px) !important;
}
.filtered-grid.emotes-compact .emote-line{
  grid-template-columns:minmax(170px,1fr) 36px !important;
  gap:10px !important;
  min-height:44px !important;
  max-height:none !important;
  align-items:center !important;
}
.filtered-grid.emotes-compact .emote-line > div:first-child{
  min-width:0 !important;
  overflow:hidden !important;
}
.filtered-grid.emotes-compact .user-with-badges{
  max-width:100% !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:5px !important;
  flex-wrap:nowrap !important;
  overflow:visible !important;
}
.filtered-grid.emotes-compact .user-link{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.filtered-grid.emotes-compact .emote-msg{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  white-space:nowrap !important;
  overflow:hidden !important;
}
.filtered-grid.emotes-compact .kick-emote.big{
  height:26px !important;
  max-width:32px !important;
  margin:0 !important;
}

/* Full emote mode: four emotes side-by-side in one compact row. */
body.chat-embed-mode .filtered-grid.emotes-full,
body.chat-fullscreen .filtered-grid.emotes-full{
  grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important;
}
.filtered-grid.emotes-full .emote-line,
body.chat-embed-mode .filtered-grid.emotes-full .emote-line{
  grid-template-columns:minmax(165px,190px) minmax(144px,1fr) !important;
  gap:12px !important;
  min-height:50px !important;
  max-height:none !important;
  align-items:center !important;
}
.filtered-grid.emotes-full .emote-msg,
body.chat-embed-mode .filtered-grid.emotes-full .emote-msg{
  display:grid !important;
  grid-template-columns:repeat(4, 34px) !important;
  grid-auto-rows:34px !important;
  gap:4px !important;
  align-items:center !important;
  justify-content:start !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  min-width:0 !important;
}
.filtered-grid.emotes-full .kick-emote.big{
  height:31px !important;
  max-width:34px !important;
  margin:0 !important;
}
@media(max-width:1100px){
  body.chat-embed-mode .filtered-grid.filtered-wide-grid,
  body.chat-embed-mode .filtered-grid.emotes-full,
  body.chat-embed-mode .filtered-grid.emotes-compact{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) auto !important;
  }
  body.chat-embed-mode .filtered-emote-card{
    max-height:28vh !important;
  }
}


/* ============================================================
   V1.48 CHANNEL CHAT LAYOUT — final clean ownership
   channel-chat.html owns the send bubble. Embedded live/filtered
   pages only render scrollable chat content.
   ============================================================ */
body.channel-chat-shell .content{
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-rows:auto auto minmax(0,1fr) auto !important;
  row-gap:10px !important;
  padding-bottom:10px !important;
}
body.channel-chat-shell .channel-page-head{margin:0 !important;}
body.channel-chat-shell .channel-tabbar{margin:0 !important;flex:0 0 auto !important;}
body.channel-chat-shell .channel-chat-frame,
body.channel-chat-shell .embed-frame{
  grid-row:3 !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  border:0 !important;
  border-radius:18px !important;
  background:rgba(8,12,18,.35) !important;
  overflow:hidden !important;
  display:block !important;
}
body.channel-chat-shell .channel-chat-input-bar{
  grid-row:4 !important;
  position:relative !important;
  width:100% !important;
  min-height:62px !important;
  margin:0 !important;
  padding:12px 14px 0 !important;
  border-top:1px solid rgba(39,50,68,.72) !important;
  background:linear-gradient(180deg,rgba(8,12,18,.0),rgba(8,12,18,.98) 28%) !important;
  z-index:5 !important;
}
body.channel-chat-shell .channel-chat-input-bar.hidden{display:none !important;}
body.channel-chat-shell .channel-chat-input-bar .chat-input-row,
body.channel-chat-shell .channel-chat-input-bar .chat-send-status{max-width:none !important;}
body.channel-chat-shell .channel-chat-input-bar .emote-picker-panel{
  left:14px !important;
  bottom:calc(100% + 8px) !important;
}

/* Embedded iframe content: no own send bubble; all space goes to the chat scroll areas. */
body.chat-embed-mode,
body.chat-embed-mode .app,
body.chat-embed-mode .main,
body.chat-embed-mode .content{
  height:100vh !important;
  min-height:0 !important;
  overflow:hidden !important;
}
body.chat-embed-mode .app{display:block !important;}
body.chat-embed-mode .main{margin-left:0 !important;width:100% !important;}
body.chat-embed-mode .content{
  display:grid !important;
  grid-template-rows:auto auto minmax(0,1fr) !important;
  row-gap:8px !important;
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
}
body.chat-embed-mode .sidebar,
body.chat-embed-mode .sidebar-userbar,
body.chat-embed-mode .channel-page-head,
body.chat-embed-mode #msg,
body.chat-embed-mode #chatInputBar{
  display:none !important;
}
body.chat-embed-mode .pinned-message-bar,
body.chat-embed-mode .filtered-counter-bar{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
body.chat-embed-mode .pinned-message-bar.hidden,
body.chat-embed-mode .filtered-counter-bar.hidden{display:none !important;}

/* Live chat iframe: card fills the frame, messages are the only vertical scroller. */
body.chat-embed-mode .chat-card-wide{
  grid-row:3 !important;
  width:100% !important;
  max-width:none !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body.chat-embed-mode .chat-card-wide .split{flex:0 0 auto !important;}
body.chat-embed-mode .chat-card-wide .chat-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:0 !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-width:auto !important;
  padding-bottom:12px !important;
}
body.chat-embed-mode .chat-card-wide .chat-line{
  min-width:900px !important;
  grid-template-columns:120px 220px minmax(0,1fr) 30px !important;
}
body.chat-embed-mode.timestamps-off .chat-card-wide .chat-line{
  grid-template-columns:minmax(190px,260px) minmax(0,1fr) 30px !important;
}

/* Filtered iframe: text and emote cards each have real scrollbars, vertical + horizontal. */
body.chat-embed-mode .filtered-grid.filtered-wide-grid{
  grid-row:3 !important;
  width:100% !important;
  max-width:none !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important;
  grid-template-rows:minmax(0,1fr) !important;
  gap:12px !important;
  overflow:hidden !important;
  align-items:stretch !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card{
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
body.chat-embed-mode .filtered-grid.filtered-wide-grid > .card > .split{flex:0 0 auto !important;}
body.chat-embed-mode .filtered-text-stream,
body.chat-embed-mode .emote-stream{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:0 !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-width:auto !important;
  padding-bottom:12px !important;
}
body.chat-embed-mode .filtered-text-stream .chat-line{min-width:900px !important;}

/* Hide emote chat gives all available width to filtered text chat. */
body.chat-embed-mode .filtered-grid.emotes-hidden{
  grid-template-columns:minmax(0,1fr) !important;
}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-emote-card{display:none !important;}
body.chat-embed-mode .filtered-grid.emotes-hidden .filtered-text-card{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:none !important;
}

/* Compact emote mode: username + one emote. */
body.chat-embed-mode .filtered-grid.emotes-compact{grid-template-columns:minmax(0,1fr) minmax(300px,380px) !important;}
body.chat-embed-mode .filtered-grid.emotes-compact .emote-line{
  min-width:280px !important;
  grid-template-columns:minmax(190px,1fr) 36px !important;
  min-height:44px !important;
  gap:10px !important;
  align-items:center !important;
}
body.chat-embed-mode .filtered-grid.emotes-compact .emote-line > div:first-child{min-width:0 !important;overflow:hidden !important;}
body.chat-embed-mode .filtered-grid.emotes-compact .user-with-badges{max-width:100% !important;display:inline-flex !important;align-items:center !important;gap:5px !important;flex-wrap:nowrap !important;overflow:visible !important;}
body.chat-embed-mode .filtered-grid.emotes-compact .user-link{min-width:0 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
body.chat-embed-mode .filtered-grid.emotes-compact .emote-msg{display:flex !important;align-items:center !important;justify-content:flex-start !important;overflow:hidden !important;white-space:nowrap !important;}
body.chat-embed-mode .filtered-grid.emotes-compact .kick-emote.big{height:26px !important;max-width:32px !important;margin:0 !important;}

/* Full emote mode: max four emotes in one row. */
body.chat-embed-mode .filtered-grid.emotes-full{grid-template-columns:minmax(0,1fr) minmax(420px,520px) !important;}
body.chat-embed-mode .filtered-grid.emotes-full .emote-line{
  min-width:400px !important;
  grid-template-columns:minmax(170px,195px) 152px !important;
  min-height:50px !important;
  gap:12px !important;
  align-items:center !important;
}
body.chat-embed-mode .filtered-grid.emotes-full .emote-msg{
  display:grid !important;
  grid-template-columns:repeat(4, 34px) !important;
  grid-auto-rows:34px !important;
  gap:4px !important;
  align-items:center !important;
  justify-content:start !important;
  overflow:hidden !important;
  white-space:nowrap !important;
}
body.chat-embed-mode .filtered-grid.emotes-full .kick-emote.big{height:31px !important;max-width:34px !important;margin:0 !important;}
@media(max-width:1100px){
  body.chat-embed-mode .filtered-grid.filtered-wide-grid,
  body.chat-embed-mode .filtered-grid.emotes-full,
  body.chat-embed-mode .filtered-grid.emotes-compact{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) auto !important;
  }
  body.chat-embed-mode .filtered-emote-card{max-height:28vh !important;}
}


/* V1.51 filtered-chat controls: emotes-in-chat mode */
.filtered-grid.emotes-inline,
body.chat-embed-mode .filtered-grid.emotes-inline,
body.chat-fullscreen .filtered-grid.emotes-inline{
  grid-template-columns:minmax(0,1fr) !important;
}
.filtered-grid.emotes-inline .filtered-emote-card,
body.chat-embed-mode .filtered-grid.emotes-inline .filtered-emote-card,
body.chat-fullscreen .filtered-grid.emotes-inline .filtered-emote-card{
  display:none !important;
}
.filtered-grid.emotes-inline .filtered-text-card,
body.chat-embed-mode .filtered-grid.emotes-inline .filtered-text-card,
body.chat-fullscreen .filtered-grid.emotes-inline .filtered-text-card{
  width:100% !important;
  min-width:0 !important;
}
.emote-layout-controls{flex-wrap:wrap;max-width:100%;}
.emote-layout-btn[data-mode="inline"]{width:auto !important;min-width:34px;padding:0 9px !important;}
body.chat-fullscreen .emote-layout-btn[data-mode="inline"]{width:auto !important;min-width:30px;padding:0 7px !important;}
.filtered-text-card .split .actions{margin-left:auto;}


/* V1.51 smart auto-scroll jump button for normal chat streams */
.filtered-text-card,.chat-card-wide{position:relative !important;}
.jump-latest-btn{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:25;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:34px;
  padding:8px 13px !important;
  border-radius:999px !important;
  border:1px solid rgba(0,229,255,.42) !important;
  background:linear-gradient(135deg,rgba(0,229,255,.22),rgba(124,58,237,.18)) !important;
  color:#dffbff !important;
  font-weight:950 !important;
  font-size:12px !important;
  box-shadow:0 12px 30px rgba(0,0,0,.42);
  cursor:pointer;
}
.jump-latest-btn.hidden{display:none !important;}
.jump-latest-btn:hover{transform:translateY(-1px);border-color:rgba(0,229,255,.72) !important;}
body.chat-embed-mode .jump-latest-btn{right:16px;bottom:16px;}

/* V1.52 advanced command editor */
.command-create-card textarea,
.command-card textarea{resize:vertical;min-height:58px;font-family:inherit;line-height:1.35}
.command-card{border:1px solid rgba(39,50,68,.72);border-radius:16px;background:rgba(8,12,18,.34);padding:13px;margin:10px 0;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.command-card-main{display:grid;grid-template-columns:minmax(120px,170px) minmax(260px,1fr) 100px minmax(130px,180px) auto;gap:10px;align-items:end}
.command-name-field input{font-weight:900}.command-status-box{display:grid;gap:5px;color:var(--dim);font-size:12px;align-self:stretch;align-content:center}.command-row-actions{align-self:center;justify-content:flex-end;flex-wrap:nowrap}.command-advanced-panel{border:1px solid rgba(0,229,255,.18);background:rgba(0,229,255,.045);border-radius:14px;padding:12px;margin-top:12px}.command-advanced-panel.hidden{display:none!important}.command-window-grid small{display:block;color:var(--dim);font-size:11px;margin-top:5px}.command-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.58);display:flex;align-items:center;justify-content:center;z-index:1000;padding:18px}.command-modal-backdrop.hidden{display:none!important}.command-modal{width:min(620px,100%);background:linear-gradient(180deg,rgba(18,24,34,.98),rgba(11,15,22,.98));border:1px solid rgba(0,229,255,.28);border-radius:20px;padding:18px;box-shadow:0 26px 90px rgba(0,0,0,.55)}.command-ts-preview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid rgba(39,50,68,.72);border-radius:14px;padding:12px;background:rgba(8,12,18,.44)}.command-ts-preview code{background:rgba(0,0,0,.32);padding:6px 8px;border-radius:8px;color:#dbeafe;font-size:15px}.command-edit-grid textarea{width:100%}@media(max-width:1250px){.command-card-main{grid-template-columns:minmax(110px,160px) minmax(220px,1fr) 90px}.command-status-box,.command-row-actions{grid-column:span 3}.command-row-actions{justify-content:flex-start}}@media(max-width:760px){.command-card-main{grid-template-columns:1fr}.command-status-box,.command-row-actions{grid-column:auto}.command-row-actions{flex-wrap:wrap}.command-window-grid{grid-template-columns:1fr!important}}

.btn.youtube{background:#ef4444;color:white;border-color:#ef4444}
.btn.youtube:hover{filter:brightness(1.08)}

/* V1.78 multi-platform channel controls */
.platform-filter-bar,.platform-status-tabs{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 12px}
.platform-filter-bar.hidden,.platform-status-tabs.hidden{display:none!important}
.platform-filter-btn,.platform-status-tab{border:1px solid var(--border);background:rgba(21,27,37,.88);color:var(--muted);border-radius:999px;padding:8px 12px;font-size:12px;font-weight:850;cursor:pointer}
.platform-filter-btn.active,.platform-status-tab.active{background:linear-gradient(135deg,rgba(0,229,255,.18),rgba(83,252,24,.08));border-color:rgba(0,229,255,.42);color:var(--accent)}
.platform-filter-btn.disabled,.platform-status-tab.disabled{opacity:.45;cursor:not-allowed}
.channel-platform-status-note{font-size:12px;color:var(--muted);margin-top:8px}
.chat-line .platform-mini-pill,.emote-line .platform-mini-pill{font-size:9px;padding:2px 5px;margin-left:4px;vertical-align:middle}

/* V1.81 workspace-first navigation */
.workspace-platforms{display:block;margin-top:3px;font-size:10px;line-height:1.25;color:var(--dim);font-weight:700}
.platform-mini{display:inline-flex;align-items:center;margin:2px 3px 0 0;padding:2px 6px;border-radius:999px;border:1px solid rgba(148,163,184,.24);background:rgba(148,163,184,.08);font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.platform-mini.kick{border-color:rgba(83,252,24,.35);background:rgba(83,252,24,.08);color:#b9ffb1}
.platform-mini.twitch{border-color:rgba(168,85,247,.40);background:rgba(168,85,247,.11);color:#e9d5ff}
.platform-mini.youtube{border-color:rgba(239,68,68,.38);background:rgba(239,68,68,.10);color:#fecaca}
.channel-dot.multi{background:linear-gradient(135deg,#53fc18,#9146ff 55%,#ef4444)!important;box-shadow:0 0 0 3px rgba(0,229,255,.08)}
.workspace-channel-list{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.workspace-name-cell b{font-size:14px}.workspace-name-cell small{color:var(--dim)}

.nav-subtitle{font-size:10px;text-transform:uppercase;color:var(--dim);letter-spacing:.13em;margin:10px 10px 4px;opacity:.82}
.sidebar-collapsed .nav-subtitle{display:none}


/* V1.92b command UX upgrade */
.cmd-tabs{display:flex;gap:8px;margin:10px 0 0;flex-wrap:wrap}.cmd-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cmd-toolbar input{min-width:260px;flex:1}.clean-command-editor .span-4{grid-column:span 4}.cmd-platform-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;border:1px solid rgba(39,50,68,.6);border-radius:16px;padding:12px;background:rgba(8,12,18,.24)}.platform-checks{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.actions.compact{gap:6px;flex-wrap:wrap}.command-list-head,.command-list-row{display:grid;grid-template-columns:minmax(120px,1fr) 115px 140px minmax(190px,1.2fr) 120px 90px minmax(230px,auto);gap:10px;align-items:center}.command-list-head{color:var(--dim);text-transform:uppercase;font-size:11px;font-weight:900;letter-spacing:.09em;border-bottom:1px solid rgba(39,50,68,.7);padding:10px 8px}.command-list-row{padding:11px 8px;border-bottom:1px solid rgba(39,50,68,.44);min-height:54px}.command-list-row:hover{background:rgba(0,229,255,.035)}.command-name{font-weight:950;color:var(--cyan);text-align:left}.linklike{border:0;background:none;padding:0;cursor:pointer}.pill.muted{opacity:.55;border-color:rgba(148,163,184,.25);color:#94a3b8}.pill.bad{color:#fecaca;border-color:rgba(248,113,113,.45);background:rgba(127,29,29,.22)}.command-test-card input,.command-test-card select{width:100%}.help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.help-box{border:1px solid rgba(39,50,68,.72);border-radius:16px;background:rgba(8,12,18,.34);padding:14px}.help-box h4{margin:0 0 8px}.help-box p{color:var(--muted);font-size:13px;line-height:1.45}.help-box code{display:inline-block;max-width:100%;white-space:normal;background:rgba(0,0,0,.35);padding:7px 9px;border-radius:10px;color:#dbeafe}.hidden{display:none!important}@media(max-width:1180px){.command-list-head{display:none}.command-list-row{grid-template-columns:1fr 1fr}.command-list-row span:last-child{grid-column:span 2}.clean-command-editor .span-4{grid-column:span 2}}@media(max-width:760px){.cmd-platform-row{grid-template-columns:1fr}.clean-command-editor .span-4{grid-column:auto}.command-list-row{grid-template-columns:1fr}.command-list-row span:last-child{grid-column:auto}}

/* V1.93 command emote recorder UI */
.emote-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.emote-card{border:1px solid rgba(39,50,68,.72);border-radius:16px;background:rgba(8,12,18,.38);padding:12px;display:grid;gap:7px;align-content:start;min-height:170px;cursor:pointer;transition:.12s ease}
.emote-card:hover{border-color:rgba(0,229,255,.42);background:rgba(0,229,255,.05);transform:translateY(-1px)}
.emote-card img{width:54px;height:54px;object-fit:contain;image-rendering:auto;justify-self:center;background:rgba(0,0,0,.24);border-radius:12px;padding:4px}
.emote-card b{font-size:13px;line-height:1.2;text-align:center;word-break:break-word}
.emote-card small{color:var(--dim);font-size:11px;text-align:center;line-height:1.25}
.emote-noimg{width:54px;height:54px;border-radius:12px;background:rgba(15,23,42,.75);display:grid;place-items:center;justify-self:center;font-weight:900;color:var(--cyan);text-transform:uppercase}
.emote-card-actions{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:auto}
.mini-btn{font-size:11px;padding:5px 8px;border-radius:9px}
.emote-recording-row{line-height:1.7}
.command-emotes-card .grid,.command-emote-library-card .grid{align-items:end}
@media(max-width:760px){.emote-library-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}.emote-card{min-height:150px}}

/* V1.93 giveaway bot */
.giveaway-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:14px;margin-top:14px}.giveaway-counter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.giveaway-counter-grid>div{border:1px solid var(--border);border-radius:14px;background:rgba(8,12,18,.38);padding:12px}.giveaway-counter-grid span{display:block;color:var(--dim);font-size:12px}.giveaway-counter-grid b{display:block;font-size:28px;color:var(--cyan,#00e5ff);line-height:1.1}.copy-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.giveaway-list-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.giveaway-list-row small{color:var(--dim)}.giveaway-wheel-wrap{position:relative;width:min(520px,100%);height:252px;margin-inline:auto;overflow:hidden;border:1px solid rgba(122,162,200,.28);border-radius:16px;background:linear-gradient(180deg,rgba(25,30,38,.96),rgba(11,14,20,.96));box-shadow:inset 0 0 45px rgba(255,255,255,.035),0 18px 60px rgba(0,0,0,.25)}.giveaway-wheel-wrap:before,.giveaway-wheel-wrap:after{content:"";position:absolute;left:0;right:0;height:70px;z-index:3;pointer-events:none}.giveaway-wheel-wrap:before{top:0;background:linear-gradient(180deg,rgba(14,18,26,1),rgba(14,18,26,0))}.giveaway-wheel-wrap:after{bottom:0;background:linear-gradient(0deg,rgba(14,18,26,1),rgba(14,18,26,0))}.giveaway-wheel-lines{position:absolute;left:0;right:0;top:101px;height:50px;border-top:3px solid #35e251;border-bottom:3px solid #35e251;z-index:4;box-shadow:0 0 20px rgba(53,226,81,.22);pointer-events:none}.giveaway-wheel-names{position:absolute;left:0;right:0;top:0;will-change:transform}.giveaway-name-row{height:50px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:900;color:#d9e4ef;letter-spacing:.2px;text-shadow:0 1px 2px rgba(0,0,0,.6);opacity:.72}.giveaway-name-row.winner{color:#fff;font-size:19px;opacity:1;text-shadow:0 0 14px rgba(53,226,81,.45),0 1px 2px rgba(0,0,0,.8)}.giveaway-name-row.muted{color:var(--dim);font-weight:800}.giveaway-bubbles{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.giveaway-bubble{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(122,162,200,.24);border-radius:999px;background:rgba(8,12,18,.42);padding:7px 10px;color:#dbe8f7;font-weight:800;font-size:13px}.giveaway-bubble small{font-size:10px;color:var(--dim);font-weight:700}.giveaway-bubble.kick{border-color:rgba(83,226,90,.35)}.giveaway-bubble.twitch{border-color:rgba(158,105,255,.42)}.giveaway-bubble.youtube{border-color:rgba(255,80,80,.42)}.giveaway-overlay-body{margin:0;background:transparent!important;overflow:hidden}.giveaway-overlay{width:100vw;height:100vh;display:grid;grid-template-rows:auto minmax(220px,1fr) auto auto;gap:16px;place-items:center;padding:30px;box-sizing:border-box;color:#fff;font-family:Inter,system-ui,Segoe UI,sans-serif}.giveaway-overlay-head{text-align:center}.giveaway-overlay-head h1{font-size:44px;margin:0 0 8px;text-shadow:0 3px 18px rgba(0,0,0,.65)}.keyword-pill{display:inline-flex;border:1px solid rgba(53,226,81,.55);background:rgba(6,12,8,.72);border-radius:999px;padding:10px 18px;font-weight:950;letter-spacing:.5px;text-transform:uppercase}.overlay-wheel{width:min(640px,92vw);height:330px}.overlay-wheel .giveaway-wheel-lines{top:133px;height:64px}.overlay-wheel .giveaway-name-row{height:64px;font-size:23px}.overlay-wheel .giveaway-name-row.winner{font-size:30px}.giveaway-overlay-counts{display:flex;gap:14px;font-size:22px;font-weight:950;text-shadow:0 2px 10px rgba(0,0,0,.6)}.overlay-bubbles{max-width:92vw;justify-content:center}.overlay-bubbles .giveaway-bubble{background:rgba(8,12,18,.72)}@media(max-width:900px){.giveaway-grid{grid-template-columns:1fr}.giveaway-counter-grid{grid-template-columns:repeat(2,1fr)}}
/* V1.93b giveaway confirmation improvements */
.giveaway-confirm-box{border:1px solid rgba(122,162,200,.22);border-radius:14px;background:rgba(8,12,18,.32);padding:12px;display:grid;grid-template-columns:auto minmax(160px,240px);gap:10px;align-items:end}.giveaway-confirm-box small{grid-column:1/-1}.giveaway-stats-card .actions.compact{flex-wrap:wrap}.giveaway-list-row .pill.danger,.pill.danger{border-color:rgba(255,80,80,.45);color:#ff7e7e;background:rgba(255,60,60,.08)}@media(max-width:760px){.giveaway-confirm-box{grid-template-columns:1fr}}

/* V1.93d Odablock-style Kick giveaway page */
.oda-giveaway-page .main-content{background:radial-gradient(circle at 50% 0%,rgba(0,231,1,.07),transparent 34%),radial-gradient(circle at 80% 20%,rgba(0,229,255,.05),transparent 30%)}
.oda-giveaway-shell{display:grid;gap:16px;margin-top:14px}.oda-giveaway-head .title-inline{gap:10px}.oda-hero{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr);gap:18px;padding:22px;background:linear-gradient(135deg,rgba(15,22,31,.96),rgba(8,12,18,.96));border-color:rgba(0,231,1,.22);box-shadow:0 18px 70px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04)}.oda-kicker{text-transform:uppercase;letter-spacing:.16em;font-size:11px;font-weight:950;color:#00e701;margin-bottom:6px}.oda-hero h1{font-size:34px;line-height:1.05;margin:0 0 8px;color:#fff}.oda-hero p{color:var(--muted);max-width:720px;margin:0 0 16px}.oda-keyword-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.oda-keyword-input{font-size:18px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;background:#070b10;border:1px solid rgba(0,231,1,.28);box-shadow:0 0 0 1px rgba(0,231,1,.05),inset 0 0 22px rgba(0,231,1,.025)}.oda-big-btn{font-size:16px;font-weight:950;padding-inline:22px}.oda-inline-hints{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.oda-inline-hints span{border:1px solid rgba(122,162,200,.22);border-radius:999px;padding:6px 9px;color:var(--dim);font-size:12px;font-weight:800;background:rgba(8,12,18,.36)}.oda-hero-stats{display:grid;grid-template-columns:1fr;gap:10px}.oda-stat{border:1px solid rgba(122,162,200,.22);border-radius:16px;background:rgba(8,12,18,.42);padding:14px}.oda-stat span{display:block;color:var(--dim);font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:900}.oda-stat b{display:block;font-size:29px;color:#fff;line-height:1.05;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.oda-main-grid{display:grid;grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr);gap:16px}.oda-panel{min-height:360px}.oda-entrant-list{height:340px;overflow:auto;border:1px solid rgba(122,162,200,.18);border-radius:16px;background:rgba(4,7,11,.35);padding:10px;margin-top:12px}.oda-entrant-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:9px 10px;border-radius:12px;border:1px solid transparent}.oda-entrant-row:nth-child(odd){background:rgba(255,255,255,.025)}.oda-entrant-row:hover{border-color:rgba(0,231,1,.22);background:rgba(0,231,1,.045)}.oda-entry-index{color:var(--dim);font-size:12px;font-weight:900}.oda-entry-name{font-weight:950;color:#dfefff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oda-sub-badge{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:#00e701;color:#051006;font-weight:1000;font-size:12px;box-shadow:0 0 18px rgba(0,231,1,.25)}.oda-bubbles-title{margin:13px 0 8px;color:var(--dim);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.oda-bubbles{max-height:120px;overflow:auto}.giveaway-bubble.subscriber{background:linear-gradient(135deg,rgba(0,231,1,.16),rgba(8,12,18,.6));border-color:rgba(0,231,1,.45)}.oda-spinner-panel{position:relative}.oda-spinner-wrap{position:relative;height:392px;width:min(620px,100%);margin-inline:auto;overflow:hidden;border-radius:20px;border:1px solid rgba(122,162,200,.28);background:linear-gradient(180deg,rgba(25,30,38,.98),rgba(7,10,15,.98));box-shadow:inset 0 0 60px rgba(255,255,255,.04),0 22px 80px rgba(0,0,0,.28)}.oda-spinner-wrap:before,.oda-spinner-wrap:after{content:"";position:absolute;left:0;right:0;height:112px;z-index:3;pointer-events:none}.oda-spinner-wrap:before{top:0;background:linear-gradient(180deg,rgba(9,13,19,1),rgba(9,13,19,0))}.oda-spinner-wrap:after{bottom:0;background:linear-gradient(0deg,rgba(9,13,19,1),rgba(9,13,19,0))}.oda-spinner-lines{position:absolute;left:0;right:0;top:168px;height:56px;border-top:3px solid #00e701;border-bottom:3px solid #00e701;z-index:4;box-shadow:0 0 25px rgba(0,231,1,.28);pointer-events:none}.oda-spinner-track{position:absolute;left:0;right:0;top:0;will-change:transform}.oda-spinner-row{height:56px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:19px;font-weight:1000;color:#dbe7f6;opacity:.62;text-shadow:0 1px 2px rgba(0,0,0,.75)}.oda-spinner-row.winner{opacity:1;color:#fff;font-size:22px;text-shadow:0 0 18px rgba(0,231,1,.5),0 2px 2px #000}.oda-spinner-row.muted{color:var(--dim);font-size:16px}.oda-winner-actions{justify-content:center}.oda-history-card{min-height:160px}.oda-history-list{display:grid;gap:8px;margin-top:12px}.oda-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;border:1px solid rgba(122,162,200,.18);border-radius:13px;background:rgba(8,12,18,.35);padding:10px 12px}.oda-history-row b{color:#fff}.oda-history-row span{color:#00e701;font-weight:900;text-transform:uppercase}.oda-history-row small{color:var(--dim)}.empty-state{color:var(--dim);font-weight:800;text-align:center;padding:28px 12px}.oda-winner-state b{color:#fff}@media(max-width:1050px){.oda-hero,.oda-main-grid{grid-template-columns:1fr}.oda-hero-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.oda-keyword-row{grid-template-columns:1fr}.oda-hero-stats{grid-template-columns:1fr}.oda-history-row{grid-template-columns:1fr}.oda-spinner-wrap{height:336px}.oda-spinner-lines{top:140px}.oda-spinner-row{height:56px}}
/* V1.93d Odablock-style overlay */
.oda-overlay-body{margin:0;background:transparent!important;overflow:hidden}.oda-overlay{width:100vw;height:100vh;display:grid;grid-template-rows:auto minmax(320px,1fr) auto auto;gap:18px;place-items:center;padding:34px;box-sizing:border-box;color:#fff;font-family:Inter,system-ui,Segoe UI,sans-serif}.oda-overlay-top{text-align:center;text-shadow:0 3px 18px rgba(0,0,0,.8)}.oda-overlay-top h1{font-size:52px;margin:12px 0 4px;line-height:1}.oda-overlay-top p{margin:0;color:#dce9f7;font-weight:900;font-size:20px}.oda-overlay-spinner{width:min(680px,90vw);height:392px;background:linear-gradient(180deg,rgba(18,24,32,.94),rgba(8,12,18,.94));box-shadow:0 30px 100px rgba(0,0,0,.45),inset 0 0 70px rgba(255,255,255,.04)}.oda-overlay-bar{display:flex;gap:18px;align-items:center;justify-content:center;font-size:24px;font-weight:1000;text-shadow:0 3px 15px rgba(0,0,0,.75)}.oda-overlay-bubbles{max-width:92vw;justify-content:center}.oda-overlay-bubbles .giveaway-bubble{background:rgba(8,12,18,.7);backdrop-filter:blur(5px)}

/* V1.97 chat phrase counters */
.chat-tools-row{display:flex;gap:8px;justify-content:flex-end;margin:8px 0}.modal{position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:1000;display:flex;align-items:center;justify-content:center;padding:18px}.modal.hidden{display:none}.modal-card{width:min(720px,96vw);max-height:90vh;overflow:auto;background:#0b111a;border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:0 22px 70px rgba(0,0,0,.55)}

/* V1.99l advanced command time outputs */
.advanced-schedule-rows{display:grid;gap:12px}
.advanced-schedule-row{border:1px solid rgba(39,50,68,.72);border-radius:16px;background:rgba(8,12,18,.36);padding:12px}
.advanced-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.adv-days{margin-top:10px;padding:8px;border-radius:12px;background:rgba(255,255,255,.025);border:1px solid rgba(39,50,68,.45)}
.advanced-schedule-row textarea{width:100%;min-height:72px}
@media(max-width:760px){.advanced-row-head{align-items:flex-start}.advanced-schedule-row .span-2{grid-column:auto}}

/* V2.03 mobile shell: compact header with a full-screen drawer menu. */
@media(max-width:900px){
  body:not(.embed-page):not(.chat-embed-mode) .app{
    display:block!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .sidebar{
    position:fixed!important;
    inset:0 0 auto 0!important;
    width:100%!important;
    height:86px!important;
    max-height:86px!important;
    z-index:90!important;
    padding:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-right:0!important;
    border-bottom:1px solid rgba(39,50,68,.85)!important;
    background:rgba(10,15,24,.96)!important;
    backdrop-filter:blur(18px)!important;
    box-shadow:0 14px 38px rgba(0,0,0,.28)!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .sidebar-scroll{
    padding:14px 18px!important;
    overflow:visible!important;
    min-height:0!important;
    flex:0 0 auto!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .sidebar-top{
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:14px!important;
    margin:0!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .sidebar-toggle{
    width:44px!important;
    height:44px!important;
    flex:0 0 44px!important;
    border-radius:14px!important;
    font-size:24px!important;
    background:rgba(8,12,18,.78)!important;
    color:#eaf2ff!important;
    border:1px solid rgba(122,162,200,.28)!important;
    box-shadow:0 12px 28px rgba(0,0,0,.20)!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .brand{
    display:flex!important;
    justify-content:flex-start!important;
    align-items:center!important;
    min-width:0!important;
    margin:0!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .brand-text{
    display:block!important;
    min-width:0!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .brand h1{
    font-size:18px!important;
    line-height:1.1!important;
    margin:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .brand small{
    display:block!important;
    font-size:13px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .logo,
  body:not(.embed-page):not(.chat-embed-mode) .logo-img{
    width:44px!important;
    height:44px!important;
    flex:0 0 44px!important;
    border-radius:15px!important;
  }
  body:not(.embed-page):not(.chat-embed-mode):not(.mobile-sidebar-open) .sidebar .nav,
  body:not(.embed-page):not(.chat-embed-mode):not(.mobile-sidebar-open) .sidebar-userbar{
    display:none!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .main,
  body:not(.embed-page):not(.chat-embed-mode).sidebar-collapsed .main,
  body:not(.embed-page):not(.chat-embed-mode).chat-fullscreen .main{
    margin-left:0!important;
    width:100%!important;
    min-width:0!important;
    min-height:100dvh!important;
    height:auto!important;
    overflow:visible!important;
    padding-top:86px!important;
  }
  body:not(.embed-page):not(.chat-embed-mode) .content,
  body:not(.embed-page):not(.chat-embed-mode).chat-fullscreen .content{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:18px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode){
    overflow:hidden!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    background:linear-gradient(180deg,rgba(10,15,24,.99),rgba(6,10,16,.99))!important;
    border-bottom:1px solid rgba(0,229,255,.16)!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
    padding:14px 18px 8px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar .nav{
    display:block!important;
    padding-bottom:16px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar-userbar{
    display:grid!important;
    flex:0 0 auto!important;
    padding:12px 18px 16px!important;
    background:rgba(8,12,18,.72)!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav-title,
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav-subtitle{
    display:block!important;
    margin:18px 10px 8px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav a{
    justify-content:flex-start!important;
    padding:12px 13px!important;
    margin:4px 0!important;
    min-height:42px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav-label,
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .channel-nav-name,
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .channel-sub span:nth-child(2),
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar-user-meta [data-user-name],
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .sidebar-user-meta .pill{
    display:inline!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .channel-nav-group{
    padding:10px!important;
    border-radius:18px!important;
    margin:9px 0 14px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .channel-nav-head{
    justify-content:flex-start!important;
    border-bottom:1px solid rgba(39,50,68,.55)!important;
    padding:3px 5px 9px!important;
    margin-bottom:6px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .channel-dot{
    width:9px!important;
    height:9px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav a.channel-sub{
    justify-content:flex-start!important;
    padding:10px 10px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .nav a.channel-sub span:first-child{
    width:18px!important;
    font-size:13px!important;
  }
  body.mobile-sidebar-open:not(.embed-page):not(.chat-embed-mode) .logout-btn{
    width:100%!important;
    justify-content:center!important;
  }
}
@media(max-width:560px){
  body:not(.embed-page):not(.chat-embed-mode) .sidebar{height:82px!important;max-height:82px!important}
  body:not(.embed-page):not(.chat-embed-mode) .sidebar-scroll{padding:12px 16px!important}
  body:not(.embed-page):not(.chat-embed-mode) .sidebar-toggle{width:42px!important;height:42px!important;flex-basis:42px!important}
  body:not(.embed-page):not(.chat-embed-mode) .logo,
  body:not(.embed-page):not(.chat-embed-mode) .logo-img{width:42px!important;height:42px!important;flex-basis:42px!important}
  body:not(.embed-page):not(.chat-embed-mode) .brand h1{font-size:17px!important}
  body:not(.embed-page):not(.chat-embed-mode) .brand small{font-size:12px!important}
  body:not(.embed-page):not(.chat-embed-mode) .main,
  body:not(.embed-page):not(.chat-embed-mode).sidebar-collapsed .main,
  body:not(.embed-page):not(.chat-embed-mode).chat-fullscreen .main{padding-top:82px!important}
  body:not(.embed-page):not(.chat-embed-mode) .content,
  body:not(.embed-page):not(.chat-embed-mode).chat-fullscreen .content{padding:16px!important}
}
.platform-filter-btn.all{border-color:rgba(37,166,255,.55);background:linear-gradient(135deg,rgba(37,166,255,.22),rgba(37,166,255,.10));color:#b9e8ff;box-shadow:0 0 16px rgba(37,166,255,.08)}
.platform-filter-btn.all.active{border-color:rgba(37,166,255,.78);background:linear-gradient(135deg,#25a6ff,#0891b2);color:#06131f;box-shadow:0 0 22px rgba(37,166,255,.20)}
.platform-filter-btn.kick{border-color:rgba(83,252,24,.58);background:linear-gradient(135deg,rgba(83,252,24,.28),rgba(83,252,24,.10));color:#c5ffb0;box-shadow:0 0 16px rgba(83,252,24,.10)}
.platform-filter-btn.kick.active{border-color:rgba(83,252,24,.82);background:linear-gradient(135deg,#53fc18,#2fcf14);color:#071007;box-shadow:0 0 24px rgba(83,252,24,.24)}
.platform-filter-btn.twitch{border-color:rgba(145,71,255,.58);background:linear-gradient(135deg,rgba(145,71,255,.30),rgba(145,71,255,.12));color:#eadfff;box-shadow:0 0 16px rgba(145,71,255,.12)}
.platform-filter-btn.twitch.active{border-color:rgba(145,71,255,.82);background:linear-gradient(135deg,#9147ff,#6d28d9);color:#fff;box-shadow:0 0 24px rgba(145,71,255,.25)}
.platform-filter-btn.youtube{border-color:rgba(239,68,68,.60);background:linear-gradient(135deg,rgba(239,68,68,.30),rgba(239,68,68,.12));color:#ffd2d2;box-shadow:0 0 16px rgba(239,68,68,.12)}
.platform-filter-btn.youtube.active{border-color:rgba(239,68,68,.85);background:linear-gradient(135deg,#ef4444,#b91c1c);color:#fff;box-shadow:0 0 24px rgba(239,68,68,.24)}
.parent-phrase-counter-btn{display:none!important}
body.chat-embed-mode .parent-phrase-counter-btn{display:inline-flex!important}
body.chat-embed-mode .gifter-tool-btn{display:none!important}
#msg{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:120;width:max-content;max-width:calc(100vw - 32px);pointer-events:none}
#msg .notice{display:inline-block;width:auto;margin:0;box-shadow:0 14px 36px rgba(0,0,0,.36)}
