/* Dedicated broadcast toolbar. Keep channel navigation calm and video prominent. */
.broadcast-viewer{border-top:3px solid #ff5039;background:#0b0c0e}
.broadcast-viewer .stream-viewer-head{display:grid;grid-template-columns:88px auto minmax(0,1fr) auto 40px;align-items:center;gap:14px;min-height:72px;padding:9px 16px;background:repeating-linear-gradient(115deg,transparent 0 62px,#ff503905 63px 65px),linear-gradient(110deg,#281b17,#121315 70%);border-bottom:1px solid #654334;box-shadow:0 4px 20px #0005}
.broadcast-viewer .stream-viewer-head h2{display:flex;flex-direction:column;gap:5px;margin:0;padding:0 0 0 11px;border:0;border-left:3px solid #ff5039;font:italic 400 23px/1 var(--display);letter-spacing:.045em;color:#f2f3f4;flex:none}
.broadcast-viewer .stream-viewer-head h2::after{content:'LIVE';color:#ff725e;font:700 10px/1 Arial,sans-serif;letter-spacing:.2em}
.broadcast-viewer .stream-viewer-head>.stream-viewer-position{display:flex;gap:0;flex:none;width:auto;max-width:190px;min-width:0;overflow:hidden}
.broadcast-viewer .stream-viewer-position strong{font:700 13px/1.3 Arial,sans-serif;max-width:130px}
.broadcast-viewer .stream-viewer-position small{padding:0;border:0;border-radius:0;background:none;color:#c6ad94;font:700 12px/1.3 Arial,sans-serif;white-space:nowrap}
.broadcast-viewer .stream-viewer-head[data-tabs="false"] .stream-viewer-position{gap:10px}
.broadcast-viewer .stream-viewer-head>.stream-tab-shell{display:flex;grid-column:3;order:0;flex:none;align-self:stretch;align-items:center;min-width:0;width:100%;padding:0;border:0;background:none;overflow:hidden}
.broadcast-viewer .stream-viewer-head>.stream-tab-shell[hidden]{display:none}
.broadcast-viewer .stream-viewer-head[data-tabs="false"]{grid-template-columns:88px minmax(0,1fr) auto 40px}
.broadcast-viewer .stream-watch-tabs{display:flex;align-items:center;gap:5px;min-width:0;width:100%;max-width:100%;padding:3px 0 5px;background:none;scrollbar-width:none;overscroll-behavior-x:contain}
.broadcast-viewer .stream-watch-tabs::-webkit-scrollbar{height:0}
.broadcast-viewer .stream-watch-tab{display:flex;align-items:center;flex:0 0 auto;min-width:115px;max-width:210px;height:42px;margin:0;padding:0;border:1px solid #514238;border-radius:0;background:#201d1b;box-shadow:none;position:relative;transition:background .15s}
.broadcast-viewer .stream-watch-tab:hover{background:#35251e;border-color:#ad7257}
.broadcast-viewer .stream-watch-tab[data-active="true"],.broadcast-viewer .stream-watch-tab[data-active="true"]:hover{background:#f1e4cc;border-color:#ff7254;box-shadow:inset 3px 0 #ff5039}
.broadcast-viewer .stream-watch-tab[data-active="true"]::after{content:'';position:absolute;left:15px;right:15px;bottom:-5px;height:2px;background:#ff5039;border-radius:0}
.broadcast-viewer .stream-viewer-head .stream-channel-tab{display:flex;align-items:center;min-height:42px;padding:10px 13px;gap:0;border:0;background:transparent;font-family:Arial,sans-serif;flex:1;min-width:0}
.broadcast-viewer .stream-tab-number{display:none}
.broadcast-viewer .stream-tab-copy{min-width:0}
.broadcast-viewer .stream-viewer-head .stream-tab-copy strong{color:#ebddc9;font:700 14px/1.3 Arial,sans-serif;white-space:nowrap}
.broadcast-viewer .stream-watch-tab:hover .stream-tab-copy strong{color:#fff}
.broadcast-viewer .stream-watch-tab[data-active="true"] .stream-tab-copy strong{color:#181c23}
.broadcast-viewer .stream-viewer-head .stream-watch-tab>button:last-child{width:22px;height:22px;min-height:0;padding:0;margin:0 7px 0 -4px;border:0;border-radius:0;background:none;color:#b3977e;font:20px/1 Arial,sans-serif;opacity:0;transition:opacity .15s,background .15s}
.broadcast-viewer .stream-watch-tab:hover>button:last-child,.broadcast-viewer .stream-watch-tab:focus-within>button:last-child{opacity:1}
.broadcast-viewer .stream-viewer-head .stream-watch-tab>button:last-child:hover{background:#6b3426;color:white}
.broadcast-viewer .stream-viewer-head .stream-watch-tab[data-active="true"]>button:last-child:hover{background:#dec8a4;color:#171a21}
.broadcast-viewer .stream-queue-navigation{display:none}
.broadcast-viewer .stream-viewer-head>.stream-viewer-modes{display:flex;align-items:center;gap:3px;flex:none;order:0;flex-basis:auto;margin:0;padding:3px;border:1px solid #604637;border-radius:0;background:#191613}
.broadcast-viewer .stream-viewer-head .stream-viewer-modes button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 11px;border:0;border-radius:0;background:none;color:#cbb6a0;box-shadow:none;font:700 14px/1.2 Arial,sans-serif;white-space:nowrap}
.broadcast-viewer .stream-viewer-modes button:first-child::before{content:'';width:12px;height:10px;border:1px solid currentColor;border-top-width:3px;border-radius:0}
.broadcast-viewer .stream-viewer-modes button:nth-child(2)::before{content:'';width:12px;height:12px;background:linear-gradient(currentColor,currentColor) left top/5px 5px,linear-gradient(currentColor,currentColor) right top/5px 5px,linear-gradient(currentColor,currentColor) left bottom/5px 5px,linear-gradient(currentColor,currentColor) right bottom/5px 5px;background-repeat:no-repeat}
.broadcast-viewer .stream-viewer-head .stream-viewer-modes button[aria-pressed="true"]{background:#ff5039;color:#1b100b;box-shadow:none}
.broadcast-viewer .stream-viewer-head .stream-viewer-modes button:hover:not(:disabled){background:#503022;color:#fff}
.broadcast-viewer .stream-viewer-head .stream-viewer-modes button:disabled{opacity:.45;cursor:not-allowed}
.broadcast-viewer .stream-viewer-head .stream-viewer-close{width:40px;height:40px;min-height:40px;margin:0;padding:0;border:1px solid #a1573d;border-radius:0;background:#2e1e18;color:#f1dec5;font:27px/1 Arial,sans-serif}
.broadcast-viewer .stream-viewer-head .stream-viewer-close:hover{background:#6a2820;border-color:#ff5039;color:#fff}
.broadcast-viewer .stream-player-panels{border-top:0}
@media(hover:none){.broadcast-viewer .stream-viewer-head .stream-watch-tab>button:last-child{opacity:1}}
@media(max-width:1000px){.broadcast-viewer .stream-viewer-head{grid-template-columns:80px auto minmax(0,1fr) auto 38px;gap:8px;padding:8px 10px;min-height:68px}.broadcast-viewer .stream-viewer-head .stream-viewer-modes button{font-size:13px;padding:8px}.broadcast-viewer .stream-watch-tab{min-width:110px;max-width:175px}}
@media(max-width:760px){.broadcast-viewer .stream-viewer-head{grid-template-columns:76px minmax(0,1fr) auto 36px;gap:8px}.broadcast-viewer .stream-viewer-head>.stream-tab-shell{grid-row:2;grid-column:1/-1;min-height:48px}.broadcast-viewer .stream-viewer-head>.stream-viewer-position{width:auto;max-width:none}.broadcast-viewer .stream-viewer-head h2{font-size:14px}.broadcast-viewer .stream-viewer-head .stream-viewer-modes button{font-size:12px;padding:7px}.broadcast-viewer .stream-viewer-modes button::before{display:none}.broadcast-viewer .stream-viewer-head .stream-viewer-close{width:36px;height:36px;min-height:36px}.broadcast-viewer .stream-viewer-head .stream-tab-copy strong{font-size:13px}}
@media(prefers-reduced-motion:reduce){.broadcast-viewer .stream-watch-tab,.broadcast-viewer .stream-watch-tab>button:last-child{transition:none}}

/* One consistent height for channel cards, scroll arrows and mode controls. */
.broadcast-viewer{--watch-control-height:44px}
.broadcast-viewer .stream-viewer-head>.stream-tab-shell{gap:7px;align-items:center}
.broadcast-viewer .stream-viewer-head .stream-watch-tabs{height:var(--watch-control-height);padding:0;align-items:center}
.broadcast-viewer .stream-viewer-head .stream-watch-tab{height:var(--watch-control-height);min-height:var(--watch-control-height);box-sizing:border-box;flex-shrink:0}
.broadcast-viewer .stream-viewer-head .stream-channel-tab{height:100%;min-height:0;padding:0 12px;box-sizing:border-box;align-items:center}
.broadcast-viewer .stream-viewer-head>.stream-viewer-modes{height:var(--watch-control-height);padding:0;border:0;background:none;gap:4px;box-sizing:border-box}
.broadcast-viewer .stream-viewer-head .stream-viewer-modes button{height:var(--watch-control-height);min-height:var(--watch-control-height);box-sizing:border-box;padding:0 12px;border:1px solid #604637;align-items:center}
.broadcast-viewer .stream-viewer-head .stream-viewer-close{height:var(--watch-control-height);min-height:var(--watch-control-height)}
.broadcast-viewer .stream-viewer-head .stream-tab-arrow{display:grid;place-items:center;flex:0 0 36px;width:36px;height:var(--watch-control-height);min-height:var(--watch-control-height);padding:0;margin:0;border:1px solid #81553e;border-radius:0;background:linear-gradient(135deg,#33241d,#1b1918);box-sizing:border-box}
.broadcast-viewer .stream-tab-arrow::before{content:'';width:8px;height:8px;border:solid #f1dec4;border-width:0 2px 2px 0;transform:rotate(135deg);margin-left:4px}
.broadcast-viewer .stream-tab-arrow-right::before{transform:rotate(-45deg);margin-left:-4px}
.broadcast-viewer .stream-viewer-head .stream-tab-arrow:hover{background:#5b3021;border-color:#ff7254}
.broadcast-viewer .stream-viewer-head .stream-tab-arrow:focus-visible{outline:2px solid #f1e4cc;outline-offset:2px}

.broadcast-viewer .stream-bindings-panel{position:fixed;right:16px;top:82px;z-index:10;width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 100px);overflow:auto;box-sizing:border-box;padding:18px;background:#171514;border:1px solid #936044;border-top:3px solid #ff5039;box-shadow:0 16px 70px #000c}
.broadcast-viewer .stream-bindings-panel[hidden]{display:none}
.stream-bindings-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.stream-bindings-head h3{margin:0;color:#f1e4cc;font:800 18px/1.3 Arial,sans-serif;text-transform:uppercase}
.broadcast-viewer .stream-bindings-head button{font-size:23px;line-height:1;width:32px;height:32px;padding:0}
.stream-bindings-panel>p{font:400 12px/1.6 Arial,sans-serif;color:#cbb6a1;margin:12px 0}
.stream-bindings-list{display:grid;gap:6px}.stream-binding-row{display:grid;grid-template-columns:minmax(0,1fr) 128px 58px;gap:7px;align-items:center;padding:8px 0;border-top:1px solid #4b382b}
.stream-binding-row strong{font:700 13px/1.3 Arial,sans-serif;color:#eee0c9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.broadcast-viewer .stream-binding-row button{font:700 11px/1.2 Arial,sans-serif;padding:8px 5px;min-height:34px}
.broadcast-viewer .stream-binding-assign{border-color:#a97854;color:#f1e4cc}.broadcast-viewer .stream-binding-assign[aria-pressed="true"]{background:#ff5039;color:#1d100b;border-color:#ff5039}
.stream-bindings-panel .stream-bindings-status{color:#ffb797;min-height:20px;margin-bottom:0}
.broadcast-viewer .stream-tab-key{font:700 10px/1 Arial,sans-serif;padding:4px;border:1px solid #9b7555;background:#191410;color:#f1c8a2;margin-left:6px;white-space:nowrap}
.broadcast-viewer .stream-bindings-toggle[aria-expanded="true"]{outline:1px solid #ff5039}
@media(max-width:760px){.broadcast-viewer .stream-bindings-panel{top:140px;max-height:calc(100dvh - 156px)}.stream-binding-row{grid-template-columns:minmax(0,1fr) 110px 48px}}

/* Bind editor: channel tiles and readable keycaps in front of channel names. */
.broadcast-viewer .stream-bindings-panel{width:min(500px,calc(100% - 32px));padding:20px;background:repeating-linear-gradient(115deg,transparent 0 58px,#ff503905 59px 61px),#171513;border-color:#8f5a3e;border-top:3px solid #ff5039}
.stream-bindings-head{padding-bottom:14px;border-bottom:1px solid #654332}.stream-bindings-head h3{flex:1;font:italic 400 32px/1 var(--display);letter-spacing:.04em}
.stream-bindings-counter{font:700 12px/1 Arial,sans-serif;padding:7px 9px;background:#241c17;border:1px solid #765136;color:#e0b998;font-variant-numeric:tabular-nums}
.stream-bindings-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.stream-binding-row{grid-template-columns:minmax(0,1fr) 24px;gap:10px;padding:12px;border:1px solid #5d4433;background:linear-gradient(135deg,#2a211b,#181717);min-width:0;align-items:center}
.stream-binding-row[data-assigned="true"]{border-left:3px solid #ff7254}
.stream-binding-row[data-recording="true"]{border-color:#ff5039;box-shadow:inset 0 0 0 1px #ff5039}
.stream-binding-row strong{font-size:14px;color:#f4e5cd}
.broadcast-viewer .stream-binding-row .stream-binding-remove{width:24px;height:24px;min-height:24px;padding:0;border:0;background:transparent;font:23px/1 Arial,sans-serif;color:#d3a282}
.broadcast-viewer .stream-binding-row .stream-binding-assign{grid-column:1/-1;display:flex;justify-content:flex-start;gap:12px;align-items:center;min-height:62px;padding:10px;border:1px dashed #8c6445;background:#111213;color:#dfc7a9}
.stream-binding-key{display:grid;place-items:center;min-width:40px;height:36px;padding:0 6px;box-sizing:border-box;border:1px solid #a98966;border-bottom-width:4px;background:#f1e4cc;color:#28170e;font:800 17px/1 Arial,sans-serif}
.stream-binding-assign>span{font:800 10px/1.3 Arial,sans-serif;letter-spacing:.06em}
.broadcast-viewer .stream-binding-row .stream-binding-assign[aria-pressed="true"]{border-style:solid;border-color:#ff5039;background:#48251a;color:#fff0d8}
.stream-binding-assign[aria-pressed="true"] .stream-binding-key{background:#ff5039;border-color:#ff9a7b;color:#1d100b}
.broadcast-viewer .stream-viewer-head .stream-channel-tab{gap:9px}
.broadcast-viewer .stream-tab-key{display:grid;place-items:center;min-width:24px;height:26px;padding:0 5px;margin:0;border:1px solid #c0976b;border-bottom-width:3px;background:#2f2319;color:#f4d1a6;font:800 12px/1 Arial,sans-serif;box-sizing:border-box}
.broadcast-viewer .stream-watch-tab[data-active="true"] .stream-tab-key{border-color:#9d432b;background:#ff5039;color:#1b110c}
@media(max-width:420px){.stream-bindings-list{grid-template-columns:minmax(0,1fr)}.broadcast-viewer .stream-bindings-panel{padding:14px}}
