/* Separate the room controls from playback presentation, without reloading media. */
body .display-controls.viewtools{display:flex;flex-wrap:wrap;gap:12px;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;z-index:21}
body.far-view .display-controls.viewtools{padding:0;gap:12px;border:0;background:none;box-shadow:none;backdrop-filter:none}
.view-group{display:flex;align-items:center;justify-content:center;gap:4px;padding:6px;border:1px solid #c59a6155;border-radius:9px;background:#24190fe8;box-shadow:0 6px 20px #0005;backdrop-filter:blur(10px)}
body .display-controls.viewtools button{font-size:12px;line-height:1.4;padding:9px 10px;white-space:nowrap;min-height:38px}
.view-group button[aria-pressed=true]{box-shadow:inset 0 0 0 1px #dfb77d;color:#fff0cd}
.display-wrap:fullscreen .room-view-group{display:none}
body.youtube-size:not(.details-open) .display-wrap{--view-width:min(960px,88vw,calc((100dvh - 300px) * 16 / 9));position:fixed;left:calc((100vw - var(--view-width)) / 2);top:120px;width:var(--view-width);height:auto;min-height:200px;max-height:none;aspect-ratio:16/9;transform:none;z-index:12}
body.youtube-size:not(.details-open) .screen{aspect-ratio:16/9;height:100%;border:0}
body.audio-listening:not(.details-open) .display-wrap{--view-width:min(360px,94vw);position:fixed;left:calc((100vw - var(--view-width)) / 2);top:150px;width:var(--view-width);height:203px;min-height:200px;max-height:none;aspect-ratio:auto;transform:none;z-index:12}
body.audio-listening:not(.details-open) .screen{border:0;min-height:200px}
.listening-note{font-size:12px;line-height:1.7;text-align:center;margin:6px 0 0;padding:8px 10px;background:#21170ee8;border:1px solid #c59a6140;border-radius:5px;color:#ead4ae}
.choose-audio-file{display:block;margin:6px auto;padding:5px 10px;font-size:11px;background:#24190fe8}
.local-audio-controls{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;background:radial-gradient(ellipse at top,#49311d,#16120f);color:#ead4ae}
.local-audio-controls>span{font-size:34px;color:#d4a96b}.local-audio-controls strong{font-size:15px;font-weight:400}.local-audio-controls button{padding:6px 18px}
.local-audio-controls label{display:flex;align-items:center;gap:12px;font-size:11px}.local-audio-controls input{accent-color:#d6b67b;width:150px}
body.local-audio:not(.details-open) #video{visibility:hidden;pointer-events:none}
body.local-audio .screen-vignette{display:none}
body.details-open .local-audio-controls,body.details-open .listening-note{display:none}
body.youtube-size .display-controls.viewtools,body.audio-listening .display-controls.viewtools{position:fixed;left:50%;bottom:20px;width:max-content;max-width:96vw;transform:translateX(-50%);margin:0}
body.youtube-size:not(.details-open) .display-wrap,body.audio-listening:not(.details-open) .display-wrap{transform:none;transition:none}
body.youtube-size .record-stack{opacity:.2;pointer-events:none}
body.remote-open .display-controls.viewtools{bottom:calc(var(--remote-height,170px) + 16px)}
body.remote-open.far-view .record-stack{bottom:auto;max-height:calc(100dvh - var(--remote-height,170px) - 230px);overflow:auto}
@media(max-width:1150px) and (min-width:721px){
  body.far-view .display-controls.viewtools{left:15px;max-width:calc(100vw - 215px);transform:none;gap:6px}
  body .display-controls.viewtools button{font-size:11px;padding:8px}
}
@media(max-width:720px){
  body .display-controls.viewtools,body.far-view .display-controls.viewtools{gap:6px;flex-direction:column;width:92%;max-width:92%;padding:0}
  .view-group{width:100%;gap:4px;padding:4px}
  body .display-controls.viewtools button{flex:1;font-size:11px;padding:7px 5px;min-height:36px;white-space:normal}
  .lounge-actions{bottom:166px}.remote-toggle{bottom:114px}
  body.far-view .record-stack{bottom:218px}
  body.youtube-size:not(.details-open) .display-wrap{top:120px;left:3%;width:94%;height:calc(94vw * .5625);min-height:200px;translate:none}
  body.audio-listening:not(.details-open) .display-wrap{top:120px;left:3%;width:94%;height:203px;translate:none}
  body.youtube-size .display-controls.viewtools,body.audio-listening .display-controls.viewtools{position:fixed;left:4%;transform:none;top:auto;bottom:10px;width:92%;max-width:92%}
  body.remote-open.far-view:not(.details-open) .display-wrap{top:112px;left:3%;width:94%;height:200px;min-height:200px;max-height:none;margin:0}
  body.remote-open .display-controls.viewtools{bottom:calc(var(--remote-height,226px) + 56px)}
  body.remote-open .lounge-actions,body.remote-open.far-view .record-stack{display:none}
}
/* On short screens keep a readable player and let its controls scroll above the remote. */
@media(max-height:780px) and (max-width:720px){
  body.remote-open.far-view{overflow:auto}
  body.remote-open.far-view .room{position:relative;min-height:calc(650px + var(--remote-height,226px))}
  body.remote-open.far-view:not(.details-open) .display-wrap{position:absolute;top:112px}
  body.remote-open.far-view .display-controls.viewtools{position:absolute;left:0;top:calc(100% + 150px);bottom:auto;width:100%;max-width:100%;transform:none;margin:0}
  body.remote-open.far-view .remote-toggle{bottom:calc(var(--remote-height,226px) + 10px)}
}
/* Fullscreen keeps the chosen presentation, with controls in normal flow. */
body #displayWrap:fullscreen{position:fixed;inset:0;left:0;top:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;translate:none;transform:none;aspect-ratio:auto}
body #displayWrap:fullscreen .display-controls.viewtools{position:relative;inset:auto;transform:none;translate:none;width:100%;max-width:none;flex-direction:row}
body #displayWrap:fullscreen .screen{min-height:0;aspect-ratio:auto}
body.audio-listening #displayWrap:fullscreen .screen{flex:none;width:min(360px,100%);height:203px;min-height:200px;margin:auto auto 0}
body.audio-listening #displayWrap:fullscreen .display-label,body.audio-listening #displayWrap:fullscreen .listening-note{align-self:center}
body.audio-listening #displayWrap:fullscreen .display-controls{margin-top:auto}
