.youtube-results{position:fixed;inset:auto;box-sizing:border-box;z-index:10000;max-height:320px;overflow:auto;margin:0;box-shadow:0 12px 32px #0008;overscroll-behavior:contain;padding:6px;border:1px solid var(--border2);border-radius:10px;background:var(--surface2);text-align:left}
.youtube-results[hidden]{display:none}.youtube-results p{font:12px/1.5 system-ui;color:var(--text2);margin:6px;overflow-wrap:anywhere}
.youtube-results button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:0;background:transparent;color:var(--text);text-align:left;cursor:pointer;font:12px/1.4 system-ui}
.youtube-results button:hover,.youtube-results button:focus-visible{background:var(--adim);outline-offset:-2px}.youtube-results img{width:64px;height:48px;object-fit:cover;flex-shrink:0}.youtube-results span{min-width:0}.youtube-results strong,.youtube-results small{display:block;overflow-wrap:anywhere}.youtube-results small{color:var(--text2);margin-top:3px}
.feature-new{display:inline-block;vertical-align:middle;margin-right:6px;padding:2px 5px;border:1px solid #e8bf6960;border-radius:3px;background:#e8bf6918;color:#e8bf69;font:700 9px/1.3 system-ui;letter-spacing:.5px}

.toast{max-width:calc(100vw - 24px);white-space:normal;overflow-wrap:anywhere;text-align:center}

/* A dedicated video stage leaves the Now Playing sidebar intact. */
.youtube-stage[hidden]{display:none!important}
.youtube-stage{flex:1;min-width:200px;min-height:0;padding:16px;display:flex;flex-direction:column;justify-content:center;background:#100e20}
.youtube-viewport{width:100%;height:auto;aspect-ratio:16/9;min-width:200px;min-height:200px;max-height:calc(100% - 38px);background:#000}
#room .youtube-viewport #yt-player{position:static;display:block;width:100%;height:100%;min-width:200px;min-height:200px;border:0;opacity:1;visibility:visible}
.youtube-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:6px 0;color:#c8bed8;font:11px/1.5 Inter,system-ui,sans-serif}
.youtube-caption button{flex:none;padding:7px 10px;min-height:32px;border:1px solid #ff8bd860;background:#f45bc418;color:#ffb3e8;font:600 11px/1.4 Inter,system-ui,sans-serif;cursor:pointer}
.youtube-caption button[hidden]{display:none}
/* Keep both surfaces visible: video above, visualizer filling the stage below. */
@media(min-width:701px){
 #room.youtube-active>.main{display:grid;grid-template-columns:300px minmax(200px,1fr) clamp(250px,27vw,300px);grid-template-rows:auto minmax(80px,1fr);grid-template-areas:"controls video chat" "controls visualizer chat"}
 #room.youtube-active .np-panel{grid-area:controls;width:auto}
 #room.youtube-active .rpanel{grid-area:chat;width:auto;border-left:1px solid var(--border)}
 #room.youtube-active .youtube-stage{grid-area:video;align-items:center;padding:12px 16px 0}
 #room.youtube-active .youtube-viewport{height:200px;max-height:none;max-width:356px;flex:none}
 #room.youtube-active .youtube-caption{width:100%;max-width:356px}
 #room.youtube-active .viswrap{grid-area:visualizer;display:flex;min-height:80px;border-right:0;border-top:1px solid var(--border);background:transparent}
}
@media(min-width:701px) and (max-width:1000px){
 #room.youtube-active>.main{grid-template-columns:240px minmax(200px,1fr) 220px}
 #room.youtube-active .np-panel{width:240px;min-width:240px}
 #room.youtube-active .rpanel{width:220px;min-width:220px}
 #room.youtube-active .youtube-stage{padding:8px}
}
@media(min-width:701px) and (max-height:650px){
 #room.youtube-active>.qpanel{height:64px;min-height:64px}
 #room.youtube-active>.main{grid-template-columns:240px minmax(200px,1.35fr) minmax(60px,1fr) 220px;grid-template-rows:minmax(238px,1fr);grid-template-areas:"controls video visualizer chat"}
 #room.youtube-active .np-panel{width:240px;min-width:240px}
 #room.youtube-active .rpanel{width:220px;min-width:220px}
 #room.youtube-active .youtube-stage{padding:0}
 #room.youtube-active .youtube-viewport{height:200px}
 #room.youtube-active .viswrap{border-top:0;border-left:1px solid var(--border)}
 #room.youtube-active .np-panel{overflow-y:auto}
}
@media(max-width:700px){
 #room.youtube-active>.youtube-stage{order:1;flex:0 0 auto;padding:8px 12px 0;min-height:246px;align-items:center}
 #room.youtube-active .youtube-viewport{height:200px;max-height:none;flex:none;max-width:240px}
 #room.youtube-active .youtube-caption{width:100%;max-width:240px}
 #room.youtube-active>.viswrap{display:flex;order:2;flex:1 1 auto;min-height:48px;height:auto;border-top:1px solid var(--border)}
 #room.youtube-active>.main{order:3;flex:0 0 auto}
 #room.youtube-active>.mob-tabs{order:4}
 #room.youtube-active .visidle{font-size:7px;letter-spacing:2px;bottom:6px}
 #room.youtube-active #room-sheet[open]:not(:modal){inset:var(--youtube-sheet-top) 0 76px;height:auto;max-height:none;width:100%;z-index:20;box-shadow:0 -5px 20px #0005}
}

@media(min-width:701px) and (max-width:740px) and (max-height:650px){
 #room.youtube-active>.main{grid-template-columns:220px minmax(200px,1fr) minmax(60px,1fr) 200px}
 #room.youtube-active .np-panel{width:220px;min-width:220px}
 #room.youtube-active .rpanel{width:200px;min-width:200px}
}

/* Let the animation float on the room background, without a separate glow box. */
#room.youtube-active .viswrap{background:transparent;border:0;box-shadow:none}
#room.youtube-active .viswrap::before{display:none}
#room.youtube-active .viswrap #vis{width:100%;height:100%;max-width:100%;max-height:100%;aspect-ratio:auto;object-fit:fill}

.youtube-account-hint{margin:6px 0 0;color:#b8b3ce;font:11px/1.5 Inter,system-ui,sans-serif}
