:root{color-scheme:dark;--bg:#171b22;--surface:#202630;--line:#343e4c;--text:#e8edf5;--muted:#a1adbe;--accent:#86acff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,-apple-system,"Microsoft YaHei UI",sans-serif}button,input{font:inherit}button{border:1px solid transparent;border-radius:4px;color:inherit;background:transparent;padding:7px 10px;cursor:pointer;touch-action:manipulation}button:hover{background:#2c3643}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button:disabled{opacity:.45;cursor:default}.primary{background:#426ed5;color:white}.primary:hover{background:#507ee7}input:not([type=checkbox]):not([type=range]){background:var(--bg);border:1px solid var(--line);border-radius:4px;color:inherit;padding:9px 10px;min-width:0}input[type=checkbox],input[type=range]{accent-color:var(--accent)}input[type=checkbox]{width:16px;height:16px;vertical-align:-3px;margin-right:7px}header{height:52px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:0 max(16px,env(safe-area-inset-left))}header strong{font-size:15px}#connection{margin-left:auto;font-size:12px;color:var(--muted)}main{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;max-width:1400px;margin:auto;padding:24px}#picture{position:relative;background:#090b0f;aspect-ratio:16/9;overflow:hidden;border-radius:4px}video{width:100%;height:100%;display:block;object-fit:contain}#cover{position:absolute;inset:0;background:#171b22e8;display:grid;place-items:center}#cover[hidden]{display:none}#joinForm{width:min(320px,90%)}h1,h2,p{margin:0}#joinForm h1{font-size:19px;font-weight:600;margin-bottom:8px}#joinForm p{color:var(--muted);font-size:13px;margin-bottom:18px}#joinForm label{display:block;font-size:12px;margin-bottom:5px}#nickname{width:100%;margin-bottom:12px}#joinButton{width:100%}#joinHint{margin-top:12px;font-size:12px}.timeline{display:flex;align-items:center;gap:12px;margin-top:12px;font-size:12px;font-variant-numeric:tabular-nums}#seek{flex:1;min-width:0;height:24px;cursor:pointer;margin:0}.controls{display:flex;align-items:center;gap:3px;margin-top:3px}button svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.6;vertical-align:middle}#play svg{fill:currentColor;stroke:none}#play span{margin-left:5px}.spacer{flex:1}.controls label{white-space:nowrap;font-size:12px;margin-right:5px}.under{display:flex;gap:12px;justify-content:space-between;border-top:1px solid var(--line);padding-top:14px;margin-top:9px}.under h1{font-size:14px;font-weight:500;overflow-wrap:anywhere}.under p{font-size:12px;margin-top:5px;color:var(--muted)}.ready{flex-shrink:0;font-size:13px;padding-top:2px}.muted{color:var(--muted)}aside{display:flex;flex-direction:column;min-height:450px;max-height:calc(100dvh - 124px);border-left:1px solid var(--line);padding-left:24px}.asideHead{display:flex;align-items:center;justify-content:space-between}h2{font-size:13px;font-weight:500}.asideHead button{font-size:20px;padding:0 8px}#members{list-style:none;padding:0;margin:9px 0 18px;max-height:100px;overflow:auto;font-size:12px}#members li{display:flex;gap:8px;justify-content:space-between;margin:6px 0}#members li span:last-child{color:var(--muted)}#members .prepared span:last-child{color:var(--accent)}.chatTitle{padding-top:13px;border-top:1px solid var(--line)}#messages{list-style:none;padding:0;margin:12px 0;overflow:auto;flex:1;min-height:140px}#messages li{margin-bottom:16px;overflow-wrap:anywhere}#messages small{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}#messages p{font-size:13px}#chatForm{display:flex;gap:6px}#chat{flex:1;width:0}#send{background:#293240;font-size:13px}.tip{font-size:12px;margin-top:9px}footer{color:var(--muted);font-size:12px;text-align:center;padding:0 16px 18px}.quiet{color:var(--accent);font-size:12px;padding-left:0;margin-top:5px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#danmaku{position:absolute;inset:0;pointer-events:none;overflow:hidden}.comment{position:absolute;left:100%;white-space:nowrap;font-size:17px;color:#edf3ff;text-shadow:0 1px 2px #000;animation:danmaku 8s linear forwards}@keyframes danmaku{to{transform:translateX(var(--travel))}}@media(prefers-reduced-motion:reduce){.comment{display:none}}@media(max-width:800px){main{grid-template-columns:1fr;padding:14px;gap:20px}aside{padding-left:0;border-left:0;max-height:440px;min-height:340px}header{height:48px}.under{flex-direction:column;gap:10px}.ready{align-self:flex-start}.controls{gap:0}.controls button{padding:8px}#pip{display:none}footer{padding-bottom:max(18px,env(safe-area-inset-bottom))}}@media(max-width:360px){.controls #back span,#play span{display:none}header .muted{font-size:12px}}#picture:fullscreen{border-radius:0;aspect-ratio:auto;background:black}#picture:fullscreen video{object-fit:contain}

@media(max-width:800px){#nickname,#chat{font-size:16px}.controls button{min-width:38px;min-height:40px}}
#messages:empty:before{content:"房间消息会显示在这里";color:var(--muted);font-size:12px}

/* Fluent appearance: device-local preference; does not change media or room. */
:root,:root[data-theme=light]{color-scheme:light;--bg:#F6F7F9;--surface:#FFFFFF;--line:#E1E5EB;--text:#202124;--muted:#636B77;--accent:#2563EB;--selected:#EAF1FF;--hover:#EFF2F7;--on-accent:#FFFFFF}
:root[data-theme=dark]{color-scheme:dark;--bg:#161A20;--surface:#20262F;--line:#343C47;--text:#E7EBF2;--muted:#A6AFBD;--accent:#7EA6FF;--selected:#26344A;--hover:#2A3443;--on-accent:#151A23}
header{background:var(--surface);flex-wrap:wrap;height:auto;min-height:48px;padding-top:6px;padding-bottom:6px}
button:hover,.fileButton:hover{background:var(--hover)}.primary,.primary:hover{background:var(--accent);color:var(--on-accent)}#send{background:var(--selected);color:var(--text)}
#cover{background:var(--surface)}#messages p{font-size:14px}#messages small,.tip,footer{font-size:12px}
.appearance-control{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-left:8px}
.appearance-control select{font:inherit;min-height:28px;padding:3px 6px;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--text)}
.appearance-control select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:600px){header>.muted{display:none}.appearance-control{font-size:0;margin-left:2px}.appearance-control select{font-size:12px}.controls{flex-wrap:wrap}.under{gap:12px}}
@media(pointer:coarse){.controls button,.appearance-control select{min-height:44px}.appearance-control select{font-size:16px}}

/* Approved Warm Companion: matte / centered transport / room tabs. */
:root,:root[data-theme=light]{color-scheme:light;--bg:#F5F2ED;--surface:#FCFBF8;--raised:#FFFFFF;--line:#DDD6CD;--text:#302B27;--muted:#776B60;--accent:#9F513C;--selected:#EEE3DA;--hover:#F0EBE4;--on-accent:#FFFFFF;--success:#477253;--track:#DED7CE;--edge:rgba(255,255,255,.65)}
:root[data-theme=dark]{color-scheme:dark;--bg:#1B1816;--surface:#29231F;--raised:#302922;--line:#494036;--text:#F1EAE2;--muted:#BAAFA3;--accent:#E6AF91;--selected:#413027;--hover:#352D27;--on-accent:#2C1C13;--success:#A5C69D;--track:#574B40;--edge:rgba(255,255,255,.055)}
body{font-family:"Segoe UI Variable","Segoe UI","Microsoft YaHei UI",system-ui,-apple-system,"PingFang SC",sans-serif;background:var(--bg)}
header{background:var(--surface);min-height:44px;padding:6px max(16px,env(safe-area-inset-left));gap:8px;box-shadow:inset 0 1px 0 var(--edge)}
header strong{font-size:14px}header>img{width:22px;height:22px}header>.muted{display:none}#connection{margin-left:auto}header button{padding:4px 7px;min-height:30px}header button .wt-icon{width:16px;height:16px}
main{gap:14px;padding:18px 20px;grid-template-columns:minmax(0,1fr) 260px;max-width:1480px}main>.screen{min-width:0}
button{border-radius:5px}button:hover{background:var(--hover)}button:disabled{opacity:.5}.primary,.primary:hover{background:var(--accent);color:var(--on-accent)}
.wt-icon{width:18px;height:18px;stroke:currentColor;stroke-width:1.7;fill:none;flex:none}
#picture{background:#141211;border-radius:3px}#cover{background:var(--surface)}#joinForm{width:min(320px,90%)}#joinForm h1{font-size:18px}#joinButton{min-height:36px}
#picture[data-joining=true]{min-height:320px}#sourcePanel{margin-top:8px}#sourcePanel p{font-size:12px}
.timeline{margin-top:8px;gap:8px}.timeline>span{min-width:35px;font-size:12px}.timeline>span:last-child{text-align:right}
input[type=range]{--range-fill:0%;appearance:none;background:transparent;min-width:0;height:24px;margin:0;accent-color:var(--accent)}
input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:2px;background:linear-gradient(to right,var(--accent) 0,var(--accent) var(--range-fill),var(--track) var(--range-fill),var(--track) 100%)}
input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;border-radius:50%;margin-top:-4.5px;border:0;background:var(--accent)}
input[type=range]::-moz-range-track{height:3px;background:var(--track);border:0}input[type=range]::-moz-range-progress{height:3px;background:var(--accent)}input[type=range]::-moz-range-thumb{height:12px;width:12px;border:0;border-radius:50%;background:var(--accent)}
.controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;min-height:38px}.controls>div{display:flex;align-items:center;gap:3px;min-width:0}.controls button{padding:5px 7px;min-height:32px;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:5px}
.controls .transport-center{justify-content:center;grid-column:2}.controls .volume-right{justify-content:flex-end;grid-column:3}.controls .control-left{grid-column:1;font-size:12px;color:var(--muted)}
#volume{width:64px}#play span{margin:0;font-size:12px}#play svg{width:18px;height:18px}#back span,#forward span{font-size:11px;white-space:nowrap}#back .wt-icon,#forward .wt-icon{width:16px;height:16px}
.under{border:0;padding:5px 0 0;margin-top:8px}.under h1{font-size:15px;font-weight:600}.under p{font-size:12px}#status{margin-top:5px}.under .ready{font-size:12px}#network{overflow-wrap:anywhere}
aside{padding:0;border:1px solid var(--line);border-radius:5px;background:var(--raised);min-height:340px;max-height:calc(100dvh - 96px);box-shadow:inset 0 1px 0 var(--edge)}
.asideHead{padding:8px 12px;border-bottom:1px solid var(--line);min-height:38px}.asideHead h2{font-size:13px;font-weight:600}.asideHead button{padding:3px 6px;font-size:14px}
.room-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}.room-tabs button{border-radius:0;border-bottom:2px solid transparent;min-height:34px;padding:5px 8px;font-size:12px;color:var(--muted)}.room-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent);background:var(--selected)}
.room-pane{display:flex;flex-direction:column;min-height:0;flex:1;padding:12px}.room-pane[hidden]{display:none}.room-pane h2{font-size:12px;color:var(--muted)}#members{max-height:none;margin:6px 0;padding:0;font-size:13px}#members li{min-height:36px;align-items:center;margin:0;border-bottom:1px solid var(--line)}#members .prepared span:last-child{color:var(--success)}#members li span:last-child{font-size:12px}
#messages{margin:0 0 12px;min-height:160px}#messages p{font-size:14px}#messages li{margin-bottom:14px}#chatForm{margin-top:auto}#chat{font-size:14px;padding:7px 8px;min-height:34px;background:var(--surface)}#send{background:transparent;padding:5px 8px;min-width:32px}#send:hover{background:var(--hover)}#send .wt-icon{width:18px;height:18px}.tip{font-size:12px;padding:0 12px 12px;margin-top:0}
:root[data-room-visible=false] main{grid-template-columns:minmax(0,1fr)}:root[data-room-visible=false] main>aside{display:none}
.appearance-control{margin-left:3px;gap:5px}.appearance-control select{min-height:28px;font-size:12px;border-radius:5px;background:var(--surface);padding:3px 5px}
.network-dialog{width:380px;max-width:calc(100% - 32px);border:1px solid var(--line);border-radius:5px;padding:16px;background:var(--surface);color:var(--text)}.network-dialog::backdrop{background:rgba(35,25,18,.18)}.network-dialog h2{font-size:15px;margin-bottom:12px}.network-dialog .dialog-actions{display:flex;justify-content:flex-end;margin-top:16px}footer{font-size:12px}
@media(max-width:800px){main{grid-template-columns:minmax(0,1fr);padding:12px;gap:14px}aside{max-height:400px;min-height:280px}.under{flex-direction:column;gap:7px}header{gap:6px;padding-left:12px;padding-right:12px}header .appearance-control{font-size:0}.appearance-control select{font-size:12px}.controls .control-left{display:none}.controls{grid-template-columns:auto minmax(0,1fr);gap:4px}.controls .transport-center{grid-column:1}.controls .volume-right{grid-column:2}.controls label{font-size:12px;margin-right:0}#volume{display:none}#nickname,#chat{font-size:16px}.controls button{min-width:36px;min-height:40px;padding:6px}#picture[data-joining=true]{aspect-ratio:auto;min-height:330px}#joinForm{width:min(320px,calc(100% - 32px))}}
@media(max-width:460px){header .appearance-control label{display:none}header #roomToggle span{display:none}header #connection{font-size:11px}.controls #back span,.controls #forward span,#play span{display:none}.controls{gap:2px}.volume-right label{font-size:0}.volume-right label input{margin-right:0}.appearance-control select{max-width:76px}header>.appearance-control{font-size:0;margin-left:0}header #networkDetails{padding:3px}}
@media(pointer:coarse){.controls button,.appearance-control select{min-height:44px}.controls button{min-width:44px}#seek{height:30px}.appearance-control select{font-size:16px}#chat{min-height:42px}#send{min-width:44px;min-height:44px}}
@media(forced-colors:active){:root{--bg:Canvas;--surface:Canvas;--raised:Canvas;--line:CanvasText;--text:CanvasText;--muted:CanvasText;--accent:Highlight;--selected:Highlight;--hover:Canvas;--on-accent:HighlightText;--success:CanvasText;--track:CanvasText}}

#forward .wt-icon{transform:scaleX(-1)}

:root[data-theme=dark]{--bg:#161616;--surface:#222;--raised:#2a2a2a;--line:#414141;--text:#f1eeeb;--muted:#b8b2ad;--selected:#39332f;--hover:#333;--track:#555}
main{gap:0;align-items:start;grid-template-columns:minmax(0,1fr) 260px;padding:14px;max-width:1480px}.screen{position:relative}#picture{position:relative;aspect-ratio:16/9;border-radius:10px 0 0 10px;overflow:hidden;min-height:0}#picture video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;max-height:none}#picture[data-joining=true]{min-height:320px}
#immersive-hud{position:absolute;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;gap:10px;pointer-events:none;z-index:3}#video-info,#live-network,#floating-controls{background:color-mix(in srgb,var(--surface) 82%,transparent);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:10px;color:var(--text)}#video-info{padding:9px 11px;max-width:48%}#title{font-size:13px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#live-network{pointer-events:auto;font-size:12px;padding:7px 9px;max-width:55%;height:fit-content;line-height:1.6}#live-network[data-health=offline],#live-network[data-health=buffering]{border-color:var(--accent)}
#floating-controls{position:absolute;bottom:14px;left:5%;width:90%;padding:8px 12px;z-index:4}.timeline{margin:0}.controls{margin-top:5px;gap:7px}.controls .control-left{display:none}.controls{grid-template-columns:1fr auto 1fr}.transport-center{grid-column:2}.volume-right{grid-column:3}.playback-status{position:absolute;top:74px;left:16px;max-width:80%;padding:5px 8px;font-size:12px;color:white;background:#161616aa;border-radius:5px;z-index:3;pointer-events:none}
#immersive-hud,#floating-controls,.playback-status{transition:opacity .15s,visibility .15s}#picture[data-controls=hidden] #immersive-hud,#picture[data-controls=hidden] #floating-controls,#picture[data-controls=hidden] .playback-status{opacity:0;visibility:hidden;pointer-events:none}
main>aside{min-height:0;max-height:none;display:flex;flex-direction:column;border-radius:0 10px 10px 0;border:1px solid var(--line);overflow:auto;background:var(--surface);padding:0} .asideHead{padding:9px 10px 3px 4px;display:flex;align-items:flex-start;gap:5px}.asideHead h2{font-size:14px}.asideHead #roomToggle{flex:none;width:28px;padding:4px}#room-information{flex:1;min-width:0}#room-information summary{cursor:pointer}#room-information summary h2{display:inline}#room-information p{font-size:12px}.room-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:7px;background:var(--bg);margin:3px 10px 8px;padding:3px;gap:3px}.room-tabs button{border:1px solid transparent;border-radius:4px}.room-tabs button[aria-selected=true]{border-color:var(--line);background:var(--raised);color:var(--text);font-weight:600}#room-invitation{padding:0 12px 8px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;font-size:12px;color:var(--muted)}#room-invitation button{font-size:12px;padding:3px 0;color:var(--accent)}.room-pane{flex:1;min-height:0}aside>.ready{padding:9px 12px;border-top:1px solid var(--line)}aside>.tip{display:none}#room-rail{display:none;border:1px solid var(--line);height:40px;padding:4px}html[data-room-visible=false] main{grid-template-columns:minmax(0,1fr) 30px}html[data-room-visible=false] #room-rail{display:block}html[data-room-visible=false] #picture{border-radius:10px}#sourcePanel:has(#localSourceLabel[hidden]):has(#loadOnline[hidden]){display:none}footer{font-size:11px}
@media(max-width:800px){main{grid-template-columns:minmax(0,1fr);position:relative;padding:8px}main>aside{position:absolute;right:8px;top:8px;width:min(260px,80%);z-index:7}#picture{border-radius:8px}#immersive-hud{top:8px;left:8px;right:8px}#live-network{font-size:10px;max-width:60%}#video-info{max-width:38%;padding:6px}#title{font-size:11px}#floating-controls{bottom:8px;left:2%;width:96%;padding:5px 7px}.volume-right input,.volume-right label,.transport-center button span{display:none}.controls{display:flex;justify-content:space-between}.transport-center{gap:4px}.playback-status{top:60px;font-size:11px}.room-pane{min-height:90px}header{padding:5px 10px}}
@media(prefers-reduced-motion:reduce){#immersive-hud,#floating-controls,.playback-status{transition:none}}
#picture:fullscreen{border-radius:0;width:100%;height:100%;aspect-ratio:auto}#picture:fullscreen video{object-fit:contain}
.controls .control-left{display:flex;align-items:center;min-width:0}#video-playlist-button{font-size:12px;white-space:nowrap}#video-playlist{position:absolute;left:0;bottom:calc(100% + 8px);width:min(340px,100%);max-height:min(320px,calc(56vw - 170px));overflow:auto;padding:10px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(22px);border:1px solid var(--line);border-radius:9px;color:var(--text)}#video-playlist strong{font-size:14px}#video-playlist ol{list-style:none;padding:0;margin:8px 0}#video-playlist li button{font-size:14px;display:block;width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:9px 8px}#video-playlist li button[aria-current=true]{background:var(--selected);color:var(--accent)}
@media(max-width:800px){#video-playlist{max-height:calc(56vw - 75px);padding:6px}#video-playlist li button{padding:6px}.controls .control-left{max-width:82px}#video-playlist-button{padding:3px;font-size:11px}}
/* Joining is a separate readable state; video overlays cannot intercept the form. */
:root[data-theme=light]{color-scheme:only light}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{min-width:0}main,.screen,#picture,#cover,#joinForm{min-width:0;max-width:100%}
:root[data-joining=true] main{display:block;width:100%;max-width:680px;padding:18px}
:root[data-joining=true] #picture{aspect-ratio:auto!important;width:100%;height:auto;min-height:0;border-radius:10px;background:var(--surface)}
:root[data-joining=true] #cover{position:relative;inset:auto;display:block;padding:28px 20px;border:1px solid var(--line);border-radius:10px}
:root[data-joining=true] #joinForm{display:block;box-sizing:border-box;width:100%;max-width:360px;margin:0 auto}
:root[data-joining=true] #joinForm h1{font-size:21px;line-height:1.4;margin:0 0 10px}:root[data-joining=true] #joinForm p{font-size:14px;line-height:1.65;margin:0 0 20px;overflow-wrap:anywhere}:root[data-joining=true] #joinForm label{font-size:14px;margin-bottom:8px}#nickname{box-sizing:border-box;max-width:100%;font-size:16px;min-height:44px}#joinButton{width:100%;min-height:44px;font-size:15px}#joinHint{margin-top:14px!important;margin-bottom:0!important;min-height:24px}
:root[data-joining=true] #immersive-hud,:root[data-joining=true] #floating-controls,:root[data-joining=true] .playback-status,:root[data-joining=true] main>aside,:root[data-joining=true] #room-rail,:root[data-joining=true] #sourcePanel,:root[data-joining=true] footer{display:none!important}
@media(max-width:800px){:root[data-room-visible=false] main{grid-template-columns:minmax(0,1fr)}main>aside{position:static;width:100%;height:auto!important;min-height:250px;max-height:52dvh;border-radius:9px;margin-top:10px}#room-rail{width:100%;min-height:36px;margin-top:10px}#picture[data-joining=true]{min-height:0!important;aspect-ratio:auto!important}:root[data-joining=true] main{padding:12px}:root[data-joining=true] #cover{padding:24px 18px}.screen{width:100%;min-width:0}.controls{min-width:0;flex-wrap:wrap}.controls>*{min-width:0}.volume-right{gap:0}.volume-right button{min-width:32px;padding:5px}#immersive-hud{max-width:calc(100% - 16px)}.playback-status{max-width:calc(100% - 32px);overflow-wrap:anywhere}#room-chat-pane{min-height:180px}#messages{min-height:80px}}
/* Small screens reserve distinct space for feedback instead of stacking overlays. */
[hidden]{display:none!important}
:root[data-theme=dark]{color-scheme:dark}
header .appearance-control select{max-width:112px;font-size:13px;min-height:32px;padding:4px 7px}
.playback-status{position:static;max-width:100%;margin:6px 0 0;padding:4px 2px;background:transparent;color:var(--muted);font-size:12px;line-height:1.5;min-height:18px;overflow-wrap:anywhere}
:root[data-joining=true] .playback-status{display:none!important}
#video-info{min-width:0;flex:1}#live-network{min-width:0}
#room-information summary{list-style:none}#room-information summary::-webkit-details-marker{display:none}
@media(max-width:1000px) and (pointer:coarse), (max-width:800px){
 main,html[data-room-visible=false] main{grid-template-columns:minmax(0,1fr);padding:8px;display:grid}
 main>aside{position:static;width:100%;height:auto!important;min-height:230px;max-height:52dvh;margin-top:8px;border-radius:8px}
 #room-rail{width:100%;margin-top:8px;height:36px}
 #picture{border-radius:8px}
 #immersive-hud{top:6px;left:8px;right:8px;gap:2px;display:flex;flex-direction:column;align-items:flex-start}
 #video-info,#live-network{max-width:100%;background:#181818b8;color:#fff;border:0;border-radius:4px;padding:3px 6px;backdrop-filter:blur(12px);font-size:11px;line-height:1.35}
 #video-info{max-width:85%}#title{font-size:12px;font-weight:500}
 #live-network{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-align:left}
 #floating-controls{left:6px;right:6px;bottom:6px;width:auto;padding:3px 6px;border-radius:6px;background:#181818b8;color:#fff;border:1px solid #ffffff25}
 #floating-controls .timeline{font-size:10px;gap:6px;height:20px}
 #floating-controls .controls{display:flex;flex-wrap:nowrap;justify-content:space-between;gap:2px;margin-top:0}
 #floating-controls .controls button{min-height:32px;min-width:30px;padding:4px}
 #floating-controls .controls svg{width:18px;height:18px}
 #floating-controls .volume-right input,#floating-controls .volume-right label,#floating-controls #pip,.transport-center button span{display:none}
 #video-playlist-button{font-size:12px;padding:3px}#video-playlist{max-height:min(240px,55dvh);bottom:calc(100% + 5px)}
 .transport-center{gap:0}.volume-right{gap:0}
}
@media(orientation:landscape) and (max-height:550px) and (max-width:1100px){
 header{height:40px;min-height:40px}main{padding:6px}
 .screen{width:min(100%,calc((100dvh - 84px) * var(--media-ratio,1.77778)));margin-inline:auto}
 main>aside{max-height:75dvh}
 #immersive-hud{flex-direction:row;justify-content:space-between;align-items:flex-start}
 #video-info{max-width:40%}#live-network{max-width:58%}
 :root[data-joining=true] .screen{width:100%}
}

/* Operate surfaces: retain the warm palette, with contextual density. */
:root{--player-surface:#211e1bf5;--player-text:#fffaf5;--player-muted:#d8cec5;--player-accent:#efb89a;--player-track:#85796e}
::selection{background:var(--selected);color:var(--text)}
input,textarea{caret-color:var(--accent)}
button:disabled{cursor:default}
button:focus-visible,input:focus-visible,summary:focus-visible,.fileButton:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button,input,summary{scroll-margin:16px}
input::placeholder{color:var(--muted);opacity:1}
input[aria-invalid=true]{border-color:var(--accent)}
header{gap:10px;min-height:46px;padding-block:6px}
header .appearance-control{margin-inline-start:auto}
header button{min-width:28px}
.appearance-control select{cursor:pointer}
main{gap:16px;padding:18px 20px}
:root[data-joining=true] main{max-width:600px;margin-block:24px}
:root[data-joining=true] #picture,:root[data-joining=true] #cover{border-radius:5px}
:root[data-joining=true] #cover{padding:28px 24px}
#joinForm h1{font-size:20px;font-weight:600}
#joinForm p,#joinHint{line-height:1.65}
#joinHint{overflow-wrap:anywhere}
#nickname{line-height:1.5}
#picture{border-radius:5px}
#immersive-hud{left:12px;top:12px;right:12px;align-items:flex-start;pointer-events:none}
#video-info{flex:none;width:auto;max-width:min(70%,52ch);padding:6px 9px;border:0;border-radius:4px;background:var(--player-surface);color:var(--player-text);backdrop-filter:none}
#title{font-size:13px;font-weight:500;line-height:1.5;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#floating-controls{--accent:var(--player-accent);--text:var(--player-text);--muted:var(--player-muted);--track:var(--player-track);--hover:#ffffff18;--selected:#4b382c;left:12px;right:12px;bottom:12px;width:auto;padding:6px 9px;border:1px solid #ffffff26;border-radius:5px;background:var(--player-surface);color:var(--player-text);backdrop-filter:none}
#floating-controls button:hover:enabled{background:var(--hover)}
#floating-controls button:focus-visible,#floating-controls input:focus-visible{outline-color:var(--player-accent)}
#floating-controls .controls button{min-height:32px;font-size:12px}
#floating-controls .wt-icon{width:18px;height:18px}
#floating-controls .timeline{margin-top:0;font-variant-numeric:tabular-nums}
#floating-controls .timeline>span{font-size:12px}
#video-playlist{background:var(--player-surface);color:var(--player-text);border:1px solid #ffffff26;border-radius:5px;backdrop-filter:none;max-height:min(300px,50dvh);padding:10px}
#video-playlist li button{line-height:1.5;min-height:36px}
#playback-feedback{display:flex;align-items:flex-start;gap:12px;margin-top:10px}
#playback-feedback .playback-status{flex:1;min-width:0;margin:0;font-size:13px;line-height:1.6;padding:2px 0}
#playback-feedback #live-network{flex:none;max-width:none;font-size:12px;padding:2px 6px;min-height:28px;border:0;background:transparent;color:var(--muted);backdrop-filter:none;white-space:nowrap;line-height:1.5}
#playback-feedback #live-network:hover{background:var(--hover)}
:root[data-joining=true] #playback-feedback{display:none}
aside{border-radius:5px;box-shadow:none}
.asideHead{padding:8px 12px;gap:6px}
.asideHead h2{font-size:14px;font-weight:600}
.asideHead button{min-height:28px;min-width:28px}
#room-information summary{min-height:28px;display:flex;align-items:center}
#room-information p{font-size:13px;line-height:1.6}
#room-invitation{padding:8px 12px 12px;gap:6px;font-size:12px}
#room-invitation button{padding:3px 5px;margin-inline-start:-5px;line-height:1.5;min-height:28px}
.room-tabs{margin:0;padding:0;gap:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.room-tabs button{font-size:13px;min-height:36px;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--muted)}
.room-tabs button[aria-selected=true]{border-bottom-color:var(--accent);background:transparent;color:var(--accent);font-weight:600}
.room-pane{padding:14px 12px}
#messages{margin:0 0 14px;scrollbar-width:thin;scrollbar-color:var(--muted) transparent}
#messages p{font-size:14px;line-height:1.65}
#messages small{line-height:1.5}
#messages:empty:before{font-size:13px}
#members{font-size:14px;scrollbar-width:thin;scrollbar-color:var(--muted) transparent}
#members li{min-height:38px;gap:12px}
#members li span:first-child{min-width:0;overflow-wrap:anywhere}
#members li span:last-child{flex:none}
#chat{font-size:14px;line-height:1.5;min-height:36px}
#send{min-height:36px;min-width:36px}
aside>.ready{display:flex;align-items:center;min-height:42px;font-size:13px;padding:8px 12px}
#room-rail{display:none;align-items:center;justify-content:center;gap:7px;border-radius:5px}
html[data-room-visible=false] #room-rail{display:inline-flex}
#room-rail span{display:none}
#room-rail .wt-icon{width:18px;height:18px}
html[data-room-visible=false] #picture{border-radius:5px}
#retry{min-height:32px;padding:5px 8px;font-size:13px}
.network-dialog{max-width:calc(100% - 32px);border-radius:5px;padding:20px}
.network-dialog p{font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.network-dialog::backdrop{background:#211e1b66}
.fileButton{display:inline-flex;align-items:center;min-height:32px}
@media(max-width:800px){
 header{gap:7px;padding-inline:12px}
 header .appearance-control select{font-size:13px;max-width:104px}
 main{padding:12px;gap:12px}
 :root[data-joining=true] main{margin-block:8px;padding:12px}
 :root[data-joining=true] #cover{padding:24px 18px}
 #immersive-hud{top:8px;left:8px;right:8px}
 #video-info{max-width:85%;padding:4px 7px}
 #floating-controls{left:6px;right:6px;bottom:6px;padding:4px 6px}
 #floating-controls .timeline>span{font-size:11px}
 #playback-feedback{flex-wrap:wrap;column-gap:10px;row-gap:2px;margin-top:8px}
 #playback-feedback .playback-status{flex-basis:100%;font-size:13px}
 #playback-feedback #live-network{padding-inline:0}
 main>aside{border-radius:5px;margin-top:0;max-height:58dvh;min-height:260px}
 #room-rail{margin-top:0;min-height:40px;justify-content:flex-start;padding:8px 12px}
 #room-rail span{display:inline}
 #chat,#nickname{font-size:16px}
 #sourcePanel p{font-size:13px}
}
@media(pointer:coarse){
 #floating-controls .controls button,.controls button{min-width:44px;min-height:44px;padding:5px}
 #floating-controls .timeline{height:32px}
 #seek{height:32px}
 header button,header .appearance-control select,.asideHead button,#room-invitation button,.room-tabs button,#room-rail,#retry,.fileButton{min-height:44px}
 header button,.asideHead button{min-width:44px}
 #chat,#send{min-height:44px}#send{min-width:44px}
 header .appearance-control select{font-size:16px;max-width:112px}
 aside>.ready{min-height:44px}
}
@media(orientation:landscape) and (max-height:550px) and (max-width:1100px){
 header{min-height:42px;height:auto}
 #floating-controls .timeline{height:24px}
 .screen{width:min(100%,calc((100dvh - 108px) * var(--media-ratio,1.77778)))}
 :root[data-joining=true] .screen{width:100%}
}
@media(prefers-reduced-motion:reduce){#immersive-hud,#floating-controls,.playback-status{transition:none}}
@media(forced-colors:active){
 #floating-controls,#video-info,#video-playlist{background:Canvas;color:CanvasText;border:1px solid CanvasText;--accent:Highlight;--text:CanvasText;--muted:CanvasText;--track:CanvasText}
 #floating-controls button:focus-visible,#floating-controls input:focus-visible{outline-color:Highlight}
 .room-tabs button[aria-selected=true]{color:Highlight;border-bottom-color:Highlight}
}

/* One room panel; readiness precedes member/chat content. */
main>aside{display:flex;flex-direction:column;min-height:440px;overflow:hidden;border-radius:8px}
main>aside>.asideHead,main>aside>.room-tabs,main>aside>#shared-presence{flex:none}
main>aside>.room-pane{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 12px 12px}
main>aside>#room-chat-pane{display:flex;flex-direction:column}
main>aside>#room-chat-pane[hidden]{display:none}
.room-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0 12px 8px;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.room-tabs button{min-height:38px;border:0;border-bottom:2px solid transparent;border-radius:0;font-size:13px;background:transparent}
.room-tabs button[aria-selected=true]{border-color:var(--accent);background:transparent;color:var(--text)}
#room-information>p,#room-information>button,#room-invitation{font-size:12px;line-height:1.6}
#room-invitation{padding:8px 0 0;margin-top:8px;border-top:1px solid var(--line);overflow-wrap:anywhere}
#room-invitation button{padding:4px 0;min-height:28px}
#shared-presence{padding:10px 12px 12px;border-bottom:1px solid var(--line);margin-bottom:8px;min-width:0}
#shared-actions{display:flex;align-items:center;gap:8px;min-width:0}
#shared-actions button{font:inherit;min-height:36px;font-size:13px;border-radius:5px;padding:7px 10px}
#shared-start,#shared-allow{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0}
#shared-start svg{width:16px;height:16px;flex:none}
#shared-actions .primary:disabled{background:var(--selected);color:var(--text);opacity:1}
#shared-away{flex:none;color:var(--muted)}
#shared-state{font-size:12px;line-height:1.6;margin:7px 0 0;color:var(--muted);overflow-wrap:anywhere}
.ready[hidden]{display:none!important}
#members{max-height:none;margin:0;padding:0;font-size:13px;overflow:visible}
#members li{margin:0;padding:10px 0;border-bottom:1px solid var(--line);align-items:center}
#members li span:first-child{min-width:0;overflow-wrap:anywhere}
#members li span:last-child{flex:none}
.room-pane #messages{min-height:96px;margin:0 0 8px;flex:1;overflow:auto}
#shared-reactions{display:flex;gap:6px;margin:4px 0 8px;flex:none}
#shared-reactions button,#shared-recovery button{font:inherit;font-size:12px;min-height:32px;padding:5px 8px;border-radius:4px}
#chatForm{flex:none;margin:0}
#shared-source-options{font-size:13px;line-height:1.6;margin:0}
#shared-source-options h3{font-size:13px;font-weight:600;margin:4px 0 8px}
#shared-recovery{padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
#shared-recovery p{margin:0 0 8px;color:var(--muted);font-size:12px}
#shared-source-options #sourcePanel{padding:0;margin:0;gap:8px}
#shared-source-options .fileButton{display:inline-flex;padding:7px 10px;font-size:13px}
#shared-source-options #sourceState{font-size:12px;line-height:1.6;margin-top:6px}
#shared-presence[hidden],#shared-reactions[hidden],#shared-source-options[hidden]{display:none!important}
@media(max-width:800px),(max-width:1000px) and (pointer:coarse){
 main>aside{min-height:0;height:auto!important;max-height:none;border-radius:8px;overflow:hidden;margin-top:8px}
 main>aside>.room-pane{flex:none;min-height:0;max-height:none;padding:4px 12px 12px;overflow:visible}
 main>aside>#room-chat-pane #messages{min-height:140px;max-height:280px;overflow:auto}
 main>aside>#room-members-pane #members{max-height:280px;overflow:auto}
 .room-tabs button{min-height:44px;font-size:14px}
 .screen>#shared-presence{margin:8px 0 0;padding:0;border:0}
 #shared-actions button{min-height:44px;font-size:14px}
 #shared-state{font-size:12px;margin-top:6px}
 #shared-reactions button,#shared-recovery button{min-height:40px;font-size:13px}
 .asideHead{padding:10px 12px 8px 4px}
 #room-chat-pane #chatForm input{font-size:16px;min-height:42px}
}
@media(forced-colors:active){#shared-actions .primary{border:1px solid ButtonText}#shared-actions .primary:disabled{color:GrayText}}

/* Translucent material is confined to the controls over the movie. */
.player-glass{position:relative;overflow:hidden;aspect-ratio:16/9;isolation:isolate;background:#141311}
.player-glass #video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;max-height:none}
.player-glass #video-info,.player-glass #live-network,.player-glass #floating-controls,.player-glass #video-playlist,#player-state{--text:#fff7f2;--muted:#ded7d1;--line:#ffffff55;--accent:#edbc9e;--track:#ffffff45;color:var(--text);background:rgba(40,38,35,.83);border:1px solid #ffffff40;backdrop-filter:blur(20px) saturate(120%);-webkit-backdrop-filter:blur(20px) saturate(120%);border-radius:8px}
.player-glass #immersive-hud{position:absolute;inset:14px 14px auto;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;pointer-events:none;z-index:3}
.player-glass #video-info{min-width:0;max-width:calc(100% - 252px);padding:9px 11px}.player-glass #title{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0;color:#fff7f2}
.player-glass #live-network{flex:none;min-width:214px;max-width:49%;padding:6px 10px;text-align:left;pointer-events:auto;line-height:1.65;margin-left:auto;font-size:12px;font-weight:400}
#live-network .network-line{display:block;white-space:nowrap}#live-network .network-line::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#ffa79b;vertical-align:2px;margin-right:6px}#live-network[data-health=connected] .network-line::before{background:#8de1aa}#live-network .network-detail{display:block;font-size:11px;color:#ded7d1;white-space:nowrap}
.player-glass #floating-controls{position:absolute;inset:auto 16px 14px;width:auto;padding:8px 12px;z-index:4}.player-glass #floating-controls .timeline{margin:0}.player-glass #floating-controls .controls{margin-top:5px}.player-glass #floating-controls button{color:#fff7f2}.player-glass #floating-controls input{accent-color:#edbc9e}
#player-loading{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;pointer-events:none;color:#fff7f2;text-align:center;line-height:1.5}#player-loading[data-cover=true]{background:#181716}#player-loading strong{font-size:14px;font-weight:500;text-shadow:0 1px 4px #000}#player-loading>span:last-child{font-size:12px;color:#ded7d1;text-shadow:0 1px 4px #000}.player-spinner{width:34px;height:34px;border:2px solid #ffffff40;border-top-color:#fff7f2;border-right-color:#fff7f2;border-radius:50%;animation:player-spin 1.1s linear infinite;margin-bottom:8px}
#player-state{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:88px;height:88px;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;pointer-events:none;border-radius:12px}#player-state svg{width:32px;height:32px;stroke:#fff7f2;stroke-width:1.8}#player-state>span{font-size:11px;color:#fff7f2}
#player-loading[hidden],#player-state[hidden],.player-spinner[hidden]{display:none!important}.player-glass[data-media-pending=true] #video{visibility:hidden}.player-glass[data-media-pending=true] #immersive-hud,.player-glass[data-media-pending=true] #floating-controls{visibility:hidden;pointer-events:none}
.player-glass #immersive-hud,.player-glass #floating-controls{transition:opacity .15s,visibility .15s}.player-glass[data-controls=hidden] #immersive-hud,.player-glass[data-controls=hidden] #floating-controls{opacity:0;visibility:hidden;pointer-events:none}
#live-network:focus-visible,.player-glass #floating-controls button:focus-visible{outline:2px solid #edbc9e;outline-offset:3px}
@keyframes player-spin{to{transform:rotate(360deg)}}
@media(max-width:800px){.player-glass #immersive-hud{inset:8px 8px auto;gap:8px}.player-glass #video-info{padding:6px;max-width:calc(100% - 185px)}.player-glass #title{font-size:11px}.player-glass #live-network{min-width:174px;max-width:58%;font-size:11px;padding:5px 7px}#live-network .network-detail{font-size:10px}.player-glass #floating-controls{inset:auto 8px 8px;padding:5px 7px}#player-state{width:68px;height:68px}#player-state svg{width:27px;height:27px}#player-loading{gap:4px}#player-loading strong{font-size:13px}#player-loading>span:last-child{font-size:11px}.player-spinner{width:27px;height:27px}}
@media(prefers-reduced-motion:reduce){.player-spinner{animation:none}.player-glass #immersive-hud,.player-glass #floating-controls{transition:none}}
@media(prefers-reduced-transparency:reduce){.player-glass #video-info,.player-glass #live-network,.player-glass #floating-controls,.player-glass #video-playlist,#player-state{background:#282623;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(forced-colors:active){.player-glass #video-info,.player-glass #live-network,.player-glass #floating-controls,.player-glass #video-playlist,#player-state{background:Canvas;color:CanvasText;border-color:CanvasText;backdrop-filter:none}#player-state svg{stroke:CanvasText}.player-spinner{border-color:GrayText;border-top-color:CanvasText}#live-network .network-line::before{background:CanvasText}}
:root[data-joining=true] #player-loading,:root[data-joining=true] #player-state,#picture[data-joining=true] #player-loading,#picture[data-joining=true] #player-state{display:none!important}

/* Refined controls: one circular action, stable buffering, no mouse focus residue. */
#player-state{width:64px;height:64px;min-width:0;min-height:0;padding:0;gap:0;border-radius:50%;background:rgba(28,27,26,.7);border-color:#ffffff60;cursor:pointer;pointer-events:auto;line-height:1}
#player-state svg{width:26px;height:26px;stroke-width:2}#player-state[data-state=paused] svg{margin-left:2px}#player-state>span{display:none}#player-state:hover{background:rgba(65,62,58,.8)}#player-state:active{background:rgba(82,78,72,.85)}#player-state:focus-visible{outline:2px solid #edbc9e;outline-offset:4px}
#player-loading progress{width:216px;height:4px;border:0;border-radius:2px;overflow:hidden;accent-color:#ffe3cc;margin-top:10px;background:#ffffff45}#player-loading progress::-webkit-progress-bar{background:#ffffff45;border-radius:2px}#player-loading progress::-webkit-progress-value{background:#ffe3cc;border-radius:2px}#player-loading progress[hidden]{display:none}#player-loading>span:last-of-type{font-size:12px;color:#ded7d1;text-shadow:0 1px 4px #000}
.player-glass[data-media-pending=true] #immersive-hud,.player-glass[data-media-pending=true] #floating-controls{opacity:0;visibility:hidden;pointer-events:none;transition:none}
main>aside{border-radius:10px!important;overflow-y:auto;overflow-x:hidden}button:focus:not(:focus-visible){outline:none;box-shadow:none}
#picture.player-glass:fullscreen{inset:0;padding:0;border:0;border-radius:0;aspect-ratio:auto;width:100vw;height:100dvh;max-width:none;max-height:none}#picture.player-glass:fullscreen video{object-fit:contain}
@media(max-width:800px){#player-state{width:56px;height:56px}#player-state svg{width:24px;height:24px}}
@media(prefers-reduced-transparency:reduce){#player-state{background:#282623}}
@media(forced-colors:active){#player-state{background:Canvas;color:CanvasText;border-color:CanvasText}}

#player-loading[data-cover=false]{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(280px,calc(100% - 24px));min-height:156px;padding:20px;background:rgba(24,23,22,.76);border-radius:10px;backdrop-filter:blur(16px)}

/* Player layout owns one coherent responsive composition, after legacy layers. */
#video-viewport{position:absolute;inset:0;min-width:0;overflow:hidden;background:#000}
.player-tools{display:flex;align-items:center;gap:8px;margin-top:6px;min-width:0;font-size:12px}
.player-tools button,.player-tools select{min-height:28px;font-size:12px;padding:3px 7px;border-radius:4px}
.player-tools select{color:inherit;background:#282623;border:1px solid #ffffff40;cursor:pointer}
.speed-label{display:inline-flex;align-items:center;margin:0}
#movie-info-button{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
#movie-info-button svg{width:16px;height:16px}
#forward svg{transform:scaleX(-1)}
header{min-height:48px;height:auto;padding-top:max(5px,env(safe-area-inset-top));padding-bottom:5px;gap:8px}
header .appearance-control{margin-left:auto;font-size:0}header .appearance-control select{font-size:12px;max-width:112px}
#networkDetails{min-width:0}#connection{white-space:nowrap}
.player-glass .controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}
.player-glass .control-left{min-width:0;max-width:none}
.player-glass .transport-center{justify-self:center;display:flex;align-items:center}
.player-glass .volume-right{justify-self:end;min-width:0;display:flex;align-items:center;gap:3px}
.player-glass .volume-right label{display:none}
.player-glass #pip:disabled{display:none}
.player-glass #video-playlist{max-height:min(320px,50dvh)}
#picture[data-fullscreen=true],#picture.page-fullscreen{display:block;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;aspect-ratio:auto!important;padding:0;border:0;border-radius:0;background:#000}
#picture.page-fullscreen{position:fixed;z-index:1000}
html[data-page-fullscreen=true]{overflow:hidden}html[data-page-fullscreen=true] body{overflow:hidden}
#picture[data-fullscreen=true] #video-viewport{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto}
#picture[data-fullscreen=true] #immersive-hud{position:absolute;inset:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) auto calc(12px + env(safe-area-inset-left));display:flex;max-width:none;gap:12px}
#picture[data-fullscreen=true] #floating-controls{position:absolute;inset:auto calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));width:auto;max-width:none;margin:0;padding:8px 12px;color:#fff7f2;background:rgba(40,38,35,.83);border:1px solid #ffffff40;border-radius:8px;backdrop-filter:blur(20px)}
#picture[data-fullscreen=true] #video-info{flex:1;max-width:calc(100% - 230px);min-width:0}
#picture[data-fullscreen=true] #live-network{max-width:210px;min-width:0}
@media(max-width:1000px){.player-glass #volume{display:none}.player-glass #pip{display:none}}
@media(max-width:800px){
 main{gap:12px;padding:12px}.screen{min-width:0}main>aside{max-height:65dvh}
 header{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:5px}
 header strong{font-size:14px}#networkDetails{padding:4px 2px}#connection{font-size:11px;margin-left:0}
 header .appearance-control select{max-width:100px;font-size:12px;min-height:32px}#roomToggle{min-width:32px;padding:4px}#roomToggle span{display:none}
 /* The film, its heading and its controls have distinct space in portrait. */
 .player-glass .controls{gap:4px;margin-top:3px!important;flex-wrap:nowrap;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
 .player-glass #floating-controls .timeline{gap:8px;font-size:12px;min-height:32px}
 .player-glass #floating-controls .controls button{width:38px;height:40px;min-width:0;min-height:40px;padding:8px}
 .player-glass #floating-controls #video-playlist-button{width:auto;max-width:100%;padding:6px 0;font-size:12px;white-space:nowrap}
 .player-glass .transport-center{gap:2px}.player-glass .volume-right{gap:0}
 .player-glass #pip,.player-glass #volume{display:none}
 .player-glass #play span,.player-glass #back span,.player-glass #forward span{display:none}
 .player-glass #floating-controls .player-tools button,.player-glass #floating-controls .player-tools select{min-height:36px;font-size:12px}
 .player-tools{gap:6px;margin-top:2px}
 #player-loading{padding:12px}#player-loading[data-cover=false]{min-height:112px;padding:12px;width:min(260px,calc(100% - 24px))}.player-spinner{width:25px;height:25px;margin-bottom:3px}
 #video-playlist{left:0;bottom:calc(100% + 6px);width:min(340px,100%);max-height:45dvh;background:var(--surface)!important;color:var(--text)!important}
 #picture[data-fullscreen=true] #live-network .network-detail{display:none}
 #picture[data-fullscreen=true] #video-info{max-width:calc(100% - 155px);padding:5px 7px}
 #picture[data-fullscreen=true] #live-network{max-width:150px;min-width:0;font-size:11px;padding:5px 7px}
 #picture[data-fullscreen=true] .network-line{white-space:normal}#picture[data-fullscreen=true] #title{font-size:11px}
}
@media(max-width:360px){main{padding:8px}#picture.player-glass:not([data-fullscreen=true]) #immersive-hud{padding:7px 8px;gap:6px}#video-playlist-button{font-size:11px!important}.player-glass #floating-controls .controls button{width:34px;padding:7px}.player-glass .transport-center{gap:0}#movie-info-button span{font-size:11px}#room-control-policy{max-width:106px}}
@media(pointer:coarse){.player-glass #seek{height:36px}.player-glass #floating-controls .controls button{min-height:44px}.player-tools select,.player-tools button{min-height:40px}}
/* Join remains a form; it must never inherit the playing composition. */
:root[data-joining=true] #video-viewport{display:none}
:root[data-joining=true] #picture.player-glass{display:block;overflow:visible}
:root[data-joining=true] #picture.player-glass>#cover{position:relative;inset:auto;height:auto;max-height:none;overflow:visible}
:root[data-joining=true] .player-tools{display:none}

/* Movie-first controls: a timeline and one row of common actions. */
.player-glass #floating-controls{padding:4px 10px 6px;background:rgba(27,25,23,.72);border-color:#ffffff26;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.player-glass #floating-controls .timeline{min-height:28px;font-size:12px;gap:10px;font-variant-numeric:tabular-nums}
.player-glass #seek{height:28px;margin:0}
.player-glass #floating-controls .controls{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:40px;margin-top:0!important}
.player-glass #floating-controls .control-left{display:none}
.player-glass .transport-center,.player-glass .volume-right{display:flex;align-items:center;gap:4px;min-width:0}
.player-glass #floating-controls .controls button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;min-height:40px;padding:8px;border:0;border-radius:4px;background:transparent;color:inherit;touch-action:manipulation}
.player-glass #floating-controls .controls button:hover{background:#ffffff12}
.player-glass #floating-controls .controls button:active{background:#ffffff24}
.player-glass #floating-controls .controls button svg{width:20px;height:20px;flex:none}
.player-glass #floating-controls #play svg{width:22px;height:22px}
.player-glass #floating-controls #play span{display:none}
.player-glass #floating-controls #back span,.player-glass #floating-controls #forward span{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-42%);font-size:8px;line-height:1;font-weight:600;pointer-events:none}
.player-glass #floating-controls #video-playlist-button{display:inline-flex;align-items:center;gap:7px;width:auto;max-width:160px;padding:8px;font-size:12px;white-space:nowrap}
#player-options[hidden]{display:none!important}
#player-options{position:absolute;right:0;bottom:calc(100% + 8px);display:flex;flex-direction:column;align-items:stretch;gap:8px;width:min(248px,100%);max-height:min(360px,calc(100dvh - 132px));overflow:auto;overscroll-behavior:contain;padding:12px;margin:0;color:#fff7f2;background:rgba(30,28,26,.96);border:1px solid #ffffff30;border-radius:6px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);scrollbar-width:thin;scrollbar-color:#93877d #282623;z-index:2}
#player-options .speed-label{display:flex;align-items:center;justify-content:space-between;gap:12px;color:inherit;font-size:13px}
#player-options #room-speed{width:78px;min-height:36px;border:1px solid #ffffff30;background:#ffffff09;color:inherit;font-size:13px}
#player-options #player-audio-options{display:flex;align-items:center;gap:8px;min-height:36px;font-size:13px}
#player-audio-options>span{flex:none}
#player-options #volume{display:block;width:0;min-width:0;flex:1;height:32px;margin:0}
#player-options #mute{display:inline-flex;align-items:center;justify-content:center;width:32px;height:36px;min-width:32px;min-height:36px;padding:6px;background:transparent;border:0;color:inherit}
#player-options #mute svg{width:18px;height:18px}
#player-options #movie-info-button,#player-options #pip{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:36px;width:100%;padding:6px 0;border:0;background:transparent;color:inherit;font-size:13px}
#player-options #pip:disabled{display:none}
#player-options #movie-info-button svg,#player-options #pip svg{width:17px;height:17px}
#player-options button:focus-visible,#player-options select:focus-visible,#player-more:focus-visible{outline:2px solid #edbc9e;outline-offset:2px}
#floating-controls:has(#player-options:not([hidden])){opacity:1!important;visibility:visible!important;pointer-events:auto!important}
.player-glass #player-state{width:48px;height:48px;min-width:48px;min-height:48px;border-color:#ffffff40;background:rgba(24,23,22,.54);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);transition:opacity .15s,visibility .15s}
.player-glass #player-state svg{width:23px;height:23px}
.player-glass[data-controls=hidden] #player-state:not(:focus-visible){opacity:0;visibility:hidden;pointer-events:none}
#picture[data-fullscreen=true] #floating-controls{padding:4px 10px 6px;background:rgba(27,25,23,.72);border-color:#ffffff26;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
#picture.player-glass #immersive-hud{flex-direction:row;flex-wrap:nowrap}
#picture.player-glass #live-network{color:#fff7f2}
#picture[data-fullscreen=true] #immersive-hud{align-items:flex-start;gap:16px}
#picture[data-fullscreen=true] #video-info{max-width:min(60ch,calc(100% - 190px));padding:6px 8px;background:rgba(24,23,22,.7);border:0;border-radius:4px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
#picture[data-fullscreen=true] #title{font-size:12px;font-weight:500;line-height:1.5}
#picture[data-fullscreen=true] #live-network{min-width:0;max-width:180px;padding:6px 8px;background:rgba(24,23,22,.7);border:0;border-radius:4px;font-size:12px;line-height:1.5;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
#picture[data-fullscreen=true] #live-network .network-line{white-space:nowrap}
#picture[data-fullscreen=true] #live-network .network-detail{display:none}
@media(max-width:800px),(pointer:coarse){
 .player-glass #floating-controls #video-playlist-button{width:40px;max-width:40px;padding:8px}
 .player-glass #video-playlist-button>span{display:none}
 .player-glass #floating-controls .controls button{min-height:44px;height:44px}
 #picture[data-fullscreen=true] #video-info{max-width:calc(100% - 164px);padding:5px 7px}
 #picture[data-fullscreen=true] #live-network{max-width:152px;font-size:11px;padding:5px 7px}
 #picture[data-fullscreen=true] #immersive-hud{gap:10px}
}
@media(max-width:360px){.player-glass #floating-controls .controls{gap:8px}.player-glass .transport-center,.player-glass .volume-right{gap:2px}.player-glass #floating-controls .controls button{width:38px;min-width:38px}.player-glass #floating-controls #video-playlist-button{width:38px;max-width:38px}}

@media(prefers-reduced-motion:reduce){.player-glass #player-state{transition:none}}
@media(prefers-reduced-transparency:reduce){#player-options,#picture.player-glass #floating-controls,#picture.player-glass #player-state,#picture[data-fullscreen=true] #video-info,#picture[data-fullscreen=true] #live-network{background:#282623;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(forced-colors:active){#player-options,#picture.player-glass #floating-controls,#picture.player-glass #player-state,#picture.player-glass #live-network,#picture[data-fullscreen=true] #video-info{background:Canvas;color:CanvasText;border-color:CanvasText}}
@media(prefers-reduced-transparency:reduce){#picture[data-fullscreen=true] #floating-controls{background:#282623;backdrop-filter:none}}
@media(forced-colors:active){.player-tools select,#picture[data-fullscreen=true] #floating-controls{background:Canvas;color:CanvasText;border-color:CanvasText}}

/* The video and its buffering layer are one lower stacking context. Menus
   belong above it even when their backdrop-filter creates another context. */
#video-viewport{isolation:isolate;z-index:0}
#picture.player-glass[data-media-pending=true][data-controls=visible] #floating-controls{opacity:1;visibility:visible;pointer-events:auto}
#player-options{z-index:2}
#player-options{max-height:min(340px,calc(100dvh - 112px));overflow-y:auto;overscroll-behavior:contain}

#video-viewport{touch-action:none}
#player-brightness-shade{position:absolute;inset:0;pointer-events:none;background:#000;opacity:0;z-index:1}
#player-gesture-hint{position:absolute;z-index:4;top:40%;left:50%;transform:translate(-50%,-50%);max-width:85%;padding:8px 14px;border-radius:10px;background:#151a20c9;color:#fff;font-size:13px;line-height:1.5;text-align:center;backdrop-filter:blur(16px);pointer-events:none}
#player-screen-lock{display:none;position:absolute;left:calc(12px + env(safe-area-inset-left));top:50%;z-index:12;border:0;border-radius:6px;background:#151a20b3;color:#fff;padding:7px 10px;font-size:12px}
#picture[data-fullscreen=true] #player-screen-lock{display:block}
#picture[data-locked=true] #floating-controls,#picture[data-locked=true] #immersive-hud{visibility:hidden!important;pointer-events:none!important}
#web-release-notice{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;font-size:12px;background:var(--surface,#faf9f7);color:var(--text,#292622);border-bottom:1px solid var(--line,#ddd5ce)}
#web-release-notice[hidden],#player-gesture-hint[hidden]{display:none}
#web-release-notice button{font-size:12px;padding:4px 8px;white-space:nowrap}

/* A: one responsive room composition, using the current native AppTheme palette. */
:root[data-room-layout=A]{--bg:#EEF1F5;--surface:#FFFFFF;--raised:#FFFFFF80;--line:#5A6D8029;--text:#202A33;--muted:#435560;--accent:#086760;--on-accent:#FFFFFF;--selected:#E1EEEC;--hover:#FFFFFF48;--success:#216441;--danger:#B3261E;--track:#80938F;--edge:#FFFFFF55;--ambient-start:#C1DED9;--ambient-middle:#CFD9EF;--ambient-end:#E7D7CA;--sheet:#EEF2F4;--player-accent:#70C7BD;--player-text:#FFFFFF;--player-muted:#E0E9ED;--player-track:#FFFFFF70;--room-viewport-height:100dvh;--room-dialog-viewport-height:min(100dvh,var(--room-viewport-height));color-scheme:light}
:root[data-room-layout=A][data-theme=dark]{--bg:#12171C;--surface:#1E252C;--raised:#1E252C80;--line:#8DA6BF40;--text:#E9EEF2;--muted:#BBC6CF;--accent:#70C7BD;--on-accent:#102825;--selected:#253C3E;--hover:#FFFFFF0D;--success:#87CAA6;--danger:#F2AAA5;--track:#829995;--edge:#FFFFFF0A;--ambient-start:#153536;--ambient-middle:#252B43;--ambient-end:#382E37;--sheet:#1E252C;color-scheme:dark}
html[data-room-layout=A]{scroll-padding-block:12px}html[data-room-layout=A] body{margin:0;min-height:100dvh;background:linear-gradient(135deg,var(--ambient-start),var(--ambient-middle) 63%,var(--ambient-end));background-attachment:fixed;color:var(--text);font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;font-size:14px}
html[data-room-layout=A] *{box-sizing:border-box}html[data-room-layout=A] [hidden]{display:none!important}html[data-room-layout=A] button,html[data-room-layout=A] input,html[data-room-layout=A] select{font:inherit}html[data-room-layout=A] button{color:inherit;border-radius:10px;box-shadow:none}html[data-room-layout=A] button:focus-visible,html[data-room-layout=A] input:focus-visible,html[data-room-layout=A] select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}html[data-room-layout=A] .wt-icon{width:22px;height:22px;stroke-width:1.7}
html[data-room-layout=A] body>header{background:transparent;box-shadow:none;border:0;padding:12px 20px;min-height:48px}html[data-room-layout=A][data-joining=false] body>header{display:none}html[data-room-layout=A] main{max-width:1440px;width:100%;height:var(--room-viewport-height);min-height:540px;margin:0 auto;padding:32px;display:grid;grid-template-columns:minmax(0,1fr) clamp(288px,25vw,340px);gap:0;align-items:stretch}
html[data-room-layout=A] main>.screen{display:flex;flex-direction:column;min-width:0;overflow:visible;border-radius:16px 0 0 16px}html[data-room-layout=A] main>aside{display:flex!important;flex-direction:column;min-width:0;min-height:0;height:auto!important;max-height:none;padding:0;position:relative;inset:auto;border:0;border-left:1px solid var(--line);border-radius:0 16px 16px 0!important;background:var(--raised);overflow:hidden;box-shadow:none}
html[data-room-layout=A] #picture:not([data-fullscreen=true]):not(.page-fullscreen){position:relative;width:100%;padding:0;aspect-ratio:16/9!important;height:auto;min-height:0;max-height:calc(var(--room-viewport-height) - 276px);margin:0;flex:none;background:#000;border:0;border-radius:16px 0 0 0;overflow:hidden;box-shadow:none}
html[data-room-layout=A] #video-viewport{inset:0;width:100%;height:100%;background:#000}html[data-room-layout=A] #video{width:100%;height:100%;margin:0;object-fit:contain}html[data-room-layout=A] #immersive-hud{display:none}html[data-room-layout=A] #video-info{display:contents}html[data-room-layout=A] #playback-feedback,html[data-room-layout=A] .asideHead,html[data-room-layout=A] #room-rail,html[data-room-layout=A] #roomToggle,html[data-room-layout=A] .tip,html[data-room-layout=A] #sourceFooter{display:none!important}
html[data-room-layout=A] #room-context{min-width:0;flex:1;padding:24px 24px 20px;background:var(--raised);border-radius:0 0 0 16px}html[data-room-layout=A] #room-film{display:flex;align-items:center;gap:14px;min-width:0}html[data-room-layout=A] #title{margin:0;min-width:0;flex:1;font-size:20px;line-height:1.4;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none;color:var(--text)}
html[data-room-layout=A] #room-queue-home{display:flex;flex:none}html[data-room-layout=A] #video-playlist-button{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;width:40px;height:40px;min-height:40px;padding:8px;color:var(--text);font-size:0;border-radius:10px}html[data-room-layout=A] #video-playlist-button:hover:enabled{background:var(--hover)}html[data-room-layout=A] #room-media-state{font-size:13px;color:var(--muted);line-height:1.5;margin:4px 0 16px;overflow-wrap:anywhere}
html[data-room-layout=A] #room-context-row{display:flex;align-items:center;justify-content:space-between;gap:18px}html[data-room-layout=A] #room-identity{min-width:0}html[data-room-layout=A] #room-name{font-size:14px;font-weight:550;line-height:1.5;margin:0 0 4px;overflow-wrap:anywhere}
html[data-room-layout=A] #room-connection-point{display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;position:static;inset:auto;width:auto;max-width:100%;height:auto;min-height:28px;padding:2px 0;margin:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;color:var(--muted);border-radius:6px;pointer-events:auto;font-size:13px;line-height:1.4;white-space:normal;overflow:visible;text-shadow:none}html[data-room-layout=A] #room-connection-point .connection-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--success)}html[data-room-layout=A] #room-connection-point[data-health=offline] .connection-dot{background:var(--danger)}
html[data-room-layout=A] #room-invitation{border:0;margin:0;padding:0;display:block;flex:none;max-width:50%;font-size:13px}html[data-room-layout=A] #room-invitation>span{display:none}html[data-room-layout=A] #room-invitation .room-invite-button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:9px 13px;border:0;border-radius:12px;background:var(--accent);color:var(--on-accent);font-size:13px;line-height:1.4;overflow-wrap:anywhere}html[data-room-layout=A] #room-invitation .wt-icon{width:19px;height:19px}
html[data-room-layout=A] #shared-presence{padding:0;margin:12px 0 0;border:0}html[data-room-layout=A] #shared-state{font-size:12px;line-height:1.6;color:var(--muted);margin:0;overflow-wrap:anywhere}html[data-room-layout=A] #shared-start,html[data-room-layout=A] #shared-away{display:none!important}html[data-room-layout=A] #shared-actions{margin:0;gap:0}html[data-room-layout=A] #shared-allow:not([hidden]){min-height:36px;flex:none;margin-bottom:8px;padding:6px 10px;font-size:13px;border-radius:10px}
html[data-room-layout=A] .room-tabs{display:flex;align-items:center;grid-template-columns:none;gap:24px;padding:0 22px;margin:0;border:0;border-bottom:1px solid var(--line);height:60px;background:transparent;flex:none}html[data-room-layout=A] .room-tabs>[role=tab]{height:100%;min-height:44px;min-width:28px;padding:0;border:0;position:relative;color:var(--muted);font-size:14px;background:transparent;font-weight:400;border-radius:0}html[data-room-layout=A] .room-tabs>[aria-selected=true]{font-weight:600;color:var(--accent)}html[data-room-layout=A] .room-tabs>[aria-selected=true]:after{content:"";position:absolute;width:24px;height:2px;left:0;bottom:0;background:var(--accent);border-radius:2px}html[data-room-layout=A] #room-more{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:8px;margin-left:auto;border:0;background:transparent;color:var(--muted)}html[data-room-layout=A] #room-settings-tab{display:none!important}
html[data-room-layout=A] main>aside>.room-pane{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 22px 16px}html[data-room-layout=A] #room-chat-pane{padding:0;display:flex;flex-direction:column;overflow:hidden}html[data-room-layout=A] #messages{flex:1;min-height:120px;max-height:none;padding:24px 22px 10px;margin:0;overflow:auto;list-style:none;scrollbar-width:thin}html[data-room-layout=A] #messages li{margin:0 0 22px;padding:0;max-width:100%;border:0;background:transparent;color:var(--text);line-height:1.5}html[data-room-layout=A] #messages small{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-bottom:6px}html[data-room-layout=A] #messages p{display:inline-block;margin:0;padding:10px 12px;border-radius:3px 12px 12px 12px;background:var(--raised);font-size:14px;line-height:1.6;max-width:100%;overflow-wrap:anywhere}html[data-room-layout=A] #shared-reactions{display:none}
html[data-room-layout=A] #chatForm{flex:none;display:flex;align-items:center;gap:8px;margin:0;padding:12px 16px 16px;border:0;border-top:1px solid var(--line);background:transparent}html[data-room-layout=A] #chat{width:100%;min-width:0;min-height:40px;height:40px;border:0;border-radius:10px;background:var(--raised);padding:10px 12px;font-size:14px;color:var(--text);box-shadow:none}html[data-room-layout=A] #send{padding:8px;width:40px;min-width:40px;min-height:40px;flex:none;background:transparent;color:var(--accent);border:0}html[data-room-layout=A] #chat::placeholder{color:var(--muted);opacity:1}
html[data-room-layout=A] #members{list-style:none;margin:0;padding:0;max-height:none;overflow:visible}html[data-room-layout=A] #members li{display:flex;align-items:center;gap:10px;padding:14px 0;min-height:60px;margin:0;border:0;border-bottom:1px solid var(--line);font-size:14px;color:var(--text)}html[data-room-layout=A] #members .member-avatar{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;background:var(--raised);font-size:13px;color:var(--muted)}html[data-room-layout=A] #members li>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}html[data-room-layout=A] #members li>span:last-child{max-width:48%;font-size:12px;color:var(--muted);white-space:normal;text-align:right;overflow-wrap:anywhere}
html[data-room-layout=A] #room-player-top{position:absolute;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));display:flex;align-items:center;gap:5px;z-index:8;pointer-events:none;transition:opacity .18s ease,visibility .18s ease}html[data-room-layout=A] #room-player-top button{pointer-events:auto;display:flex;align-items:center;justify-content:center;flex:none;min-width:40px;width:40px;min-height:40px;height:40px;margin:0;padding:8px;border:0;border-radius:10px;background:#00000024;color:#FFFFFF;text-shadow:none}html[data-room-layout=A] .room-spacer{flex:1}html[data-room-layout=A] #room-player-top button:hover{background:#FFFFFF25}html[data-room-layout=A] #picture[data-controls=hidden] #room-player-top{opacity:0;visibility:hidden;pointer-events:none}html[data-room-layout=A] #picture[data-locked=true] #room-player-top{display:none}
html[data-room-layout=A] #floating-controls{--accent:#70C7BD;--text:#FFFFFF;--muted:#E0E9ED;--track:#FFFFFF70;--hover:#FFFFFF20;--selected:#253C3E;position:absolute;left:12px;right:12px;bottom:8px;width:auto;max-width:none;margin:0;padding:6px 8px;border:0;border-radius:10px;background:#00000045;box-shadow:none;backdrop-filter:none;color:#FFFFFF;z-index:9}
html[data-room-layout=A] .player-glass .timeline{margin:0;gap:8px;min-height:24px}html[data-room-layout=A] .player-glass .timeline>span{font-size:11px;min-width:34px;color:#FFFFFF}html[data-room-layout=A] #seek{height:24px;min-width:40px}html[data-room-layout=A] .player-glass .controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;min-height:36px}html[data-room-layout=A] .player-glass .transport-center{display:flex;align-items:center;gap:4px;justify-content:flex-start}html[data-room-layout=A] .player-glass .volume-right{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-left:auto}html[data-room-layout=A] .control-left{display:none}html[data-room-layout=A] #floating-controls .controls button{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:0;min-width:36px;min-height:36px;padding:6px;color:#FFFFFF;background:transparent;border-radius:8px}html[data-room-layout=A] #floating-controls .controls #play{min-width:40px}html[data-room-layout=A] #play>span{display:none}html[data-room-layout=A] #floating-controls .wt-icon{width:21px;height:21px}html[data-room-layout=A] #player-screen-lock:not(:focus-visible){display:none}html[data-room-layout=A] #picture[data-locked=true] #player-screen-lock{display:flex!important;z-index:40;background:#18252BE6;color:#FFFFFF}html[data-room-layout=A] #player-loading progress{accent-color:#70C7BD}html[data-room-layout=A] #player-loading progress::-webkit-progress-value{background:#70C7BD}
html[data-room-layout=A] #player-options{position:fixed;z-index:1300;right:24px;bottom:24px;left:auto;top:auto;display:flex;flex-direction:column;align-items:stretch;gap:16px;width:min(360px,calc(100vw - 32px));max-height:calc(var(--room-viewport-height) - 48px);overflow:auto;margin:0;padding:22px;background:var(--sheet);color:var(--text);border:1px solid var(--line);border-radius:18px;backdrop-filter:none;white-space:normal;box-shadow:none;font-size:14px}html[data-room-layout=A] #player-options button,html[data-room-layout=A] #player-options select{min-height:36px;color:var(--text);font-size:13px;background:transparent;border:0;border-radius:8px}html[data-room-layout=A] #room-control-policy{display:none}html[data-room-layout=A] #room-speed-options{border:0;margin:0;padding:0;min-width:0}html[data-room-layout=A] #room-speed-options legend{padding:0;margin-bottom:12px;color:var(--text);font-size:13px}html[data-room-layout=A] .room-speed-select{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}html[data-room-layout=A] .room-speed-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}html[data-room-layout=A] .room-speed-choices button{width:100%;padding:7px 3px!important;font-size:13px}html[data-room-layout=A] .room-speed-choices [aria-pressed=true]{background:var(--selected)!important;color:var(--accent)!important;font-weight:600}
html[data-room-layout=A] .room-range-field{display:flex!important;align-items:center;gap:10px;margin:0;width:100%;font-size:13px}html[data-room-layout=A] .room-range-field>span{min-width:60px}html[data-room-layout=A] .room-range-field input[type=range]{flex:1;width:100%;min-width:40px;height:32px;accent-color:var(--accent)}html[data-room-layout=A] .room-range-field output{min-width:38px;text-align:right;font-variant-numeric:tabular-nums;font-size:12px}html[data-room-layout=A] #player-options #mute{padding:5px;min-width:30px;min-height:32px;color:var(--muted)}html[data-room-layout=A] #player-options #volume{width:auto}html[data-room-layout=A] .room-select-field,html[data-room-layout=A] .room-field-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;font-size:14px;min-height:36px}html[data-room-layout=A] .room-field-toggle input{accent-color:var(--accent);width:18px;height:18px;min-height:0;flex:none}html[data-room-layout=A] #player-options>button{display:flex;align-items:center;gap:10px;justify-content:flex-start;padding:6px 0;background:transparent}html[data-room-layout=A] #player-options>button .wt-icon{color:var(--muted)}html[data-room-layout=A] #player-options #pip{display:flex}html[data-room-layout=A] #player-options #pip:disabled{display:none}
html[data-room-layout=A] #video-playlist{max-height:min(360px,60dvh);background:var(--sheet);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:none;backdrop-filter:none}html[data-room-layout=A] #video-playlist button{color:var(--text);min-height:36px;background:transparent}html[data-room-layout=A] #video-playlist [aria-current=true]{background:var(--selected);color:var(--accent)}
html[data-room-layout=A] .room-sheet{padding:24px;margin:auto;border:1px solid var(--line);border-radius:18px;background:var(--sheet);color:var(--text);width:min(420px,calc(100vw - 32px));max-width:none;max-height:calc(var(--room-dialog-viewport-height) - 48px);overflow:auto;box-shadow:none;overscroll-behavior:contain;font-size:14px}html[data-room-layout=A] .room-sheet::backdrop{background:#101C2638;backdrop-filter:none}html[data-room-layout=A] .room-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}html[data-room-layout=A] .room-sheet h2{font-size:18px;font-weight:600;margin:0;line-height:1.4}html[data-room-layout=A] .room-sheet-head button{display:flex;align-items:center;justify-content:center;width:36px;min-height:36px;padding:7px;border:0;background:transparent;color:var(--muted)}html[data-room-layout=A] .room-menu-items{display:flex;flex-direction:column;gap:2px}html[data-room-layout=A] .room-menu-items button{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:10px 0;border:0;background:transparent;text-align:left;font-size:14px}html[data-room-layout=A] .room-menu-items .wt-icon{color:var(--muted)}
html[data-room-layout=A] .room-sheet form{display:flex;flex-direction:column;gap:12px;margin:0}html[data-room-layout=A] .room-sheet form+form{margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}html[data-room-layout=A] .room-sheet input[type=text],html[data-room-layout=A] .room-sheet input:not([type]){width:100%;min-height:42px;border:1px solid var(--line);border-radius:10px;padding:9px 12px;background:var(--raised);color:var(--text);font-size:16px}html[data-room-layout=A] .room-sheet form>p{font-size:12px;color:var(--muted);margin:0;min-height:18px;line-height:1.5}html[data-room-layout=A] .room-sheet form>button{align-self:flex-end;min-height:38px;padding:8px 14px;background:var(--accent);color:var(--on-accent);border:0;border-radius:10px;font-size:13px}html[data-room-layout=A] .room-sheet .appearance-control{display:flex;align-items:center;justify-content:space-between;margin:0 0 24px;gap:16px;font-size:14px}html[data-room-layout=A] .room-sheet select{padding:8px;max-width:100%;min-height:36px;background:var(--raised);color:var(--text);border:1px solid var(--line);border-radius:8px;font-size:14px}
html[data-room-layout=A] #room-connection{padding:0;overflow:hidden;width:min(440px,calc(100vw - 32px));max-height:calc(var(--room-dialog-viewport-height) - 48px)}html[data-room-layout=A] #room-connection[open]{display:flex;flex-direction:column}html[data-room-layout=A] #room-connection>.room-sheet-head{flex:none;padding:18px 22px 14px;margin:0;border-bottom:1px solid var(--line)}html[data-room-layout=A] #room-info-content{padding:18px 22px;overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;scrollbar-color:var(--track) transparent}html[data-room-layout=A] #room-info-name{margin:0 0 18px;overflow-wrap:anywhere;font-size:14px;line-height:1.6;font-weight:550}html[data-room-layout=A] #room-info-error{margin:0 0 18px;color:var(--danger);font-size:14px;line-height:1.6;overflow-wrap:anywhere}html[data-room-layout=A] #room-connection-metrics{display:block;margin:0;font-size:14px;line-height:1.6;font-variant-numeric:tabular-nums}html[data-room-layout=A] #room-connection .room-info-grid{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:16px;row-gap:10px;margin:0;padding:0}html[data-room-layout=A] #room-connection .room-info-grid[hidden]{display:none}html[data-room-layout=A] #room-connection .room-info-grid+ .room-info-grid{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}html[data-room-layout=A] #room-connection-metrics dt{color:var(--muted);font-size:13px}html[data-room-layout=A] #room-connection-metrics dd{margin:0;overflow-wrap:anywhere;color:var(--text)}html[data-room-layout=A] #room-info-advanced{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}html[data-room-layout=A] #room-info-advanced summary{min-height:36px;padding:6px 0;cursor:pointer;font-size:13px;color:var(--text)}html[data-room-layout=A] #room-info-advanced summary::marker{color:var(--muted)}html[data-room-layout=A] #room-info-advanced[open]>.room-info-grid{margin-top:8px}html[data-room-layout=A] #room-connection #room-settings-pane{display:block;flex:none;padding:12px 22px 16px;border-top:1px solid var(--line);overflow:visible}html[data-room-layout=A] #room-connection #shared-source-options{padding:0;margin:0}html[data-room-layout=A] #room-connection #shared-recovery{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0}html[data-room-layout=A] #room-connection #shared-recovery button{min-height:40px;padding:8px 12px;margin:0;background:var(--raised);color:var(--text);border:0;border-radius:8px;font-size:13px}html[data-room-layout=A] #room-connection #sourcePanel{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:0;margin:8px 0 0}html[data-room-layout=A] #room-connection #sourcePanel button,html[data-room-layout=A] #room-connection #sourcePanel .fileButton{padding:8px 12px;min-height:40px;background:transparent;color:var(--text);font-size:13px;border:0;border-radius:8px}html[data-room-layout=A] #room-connection #room-settings-pane p,html[data-room-layout=A] #room-connection #sourceState,html[data-room-layout=A] #room-connection #sourceFooter{display:none!important}html[data-room-layout=A] #network{font-size:12px;line-height:1.6;overflow-wrap:anywhere;color:var(--muted)}html[data-room-layout=A] #room-library-sheet>button{display:flex;align-items:center;gap:10px;min-height:44px;width:100%;padding:10px 0;border:0;background:transparent;text-align:left;font-size:14px}html[data-room-layout=A] #room-library-title{margin:0 0 18px;overflow-wrap:anywhere;font-weight:550}
@media(max-width:900px){html[data-room-layout=A] #room-connection{width:100%;margin:auto 0 0;max-height:calc(var(--room-dialog-viewport-height) - 20px)}html[data-room-layout=A] #room-info-content{padding:16px 20px}html[data-room-layout=A] #room-connection>.room-sheet-head{padding:18px 20px 12px}html[data-room-layout=A] #room-connection #room-settings-pane{padding:12px 20px max(16px,env(safe-area-inset-bottom))}}@media(max-height:500px) and (orientation:landscape){html[data-room-layout=A] #room-connection{width:min(440px,calc(100vw - 24px));margin:auto;max-height:calc(var(--room-dialog-viewport-height) - 16px)}}
html[data-room-layout=A] #room-connection.room-info-online-unneeded #loadOnline{display:none!important}
html[data-room-layout=A][data-joining=true] main{display:block;max-width:520px;min-height:0;height:auto;margin:24px auto;padding:0 20px}html[data-room-layout=A][data-joining=true] main>aside,html[data-room-layout=A][data-joining=true] #room-context,html[data-room-layout=A][data-joining=true] #room-player-top{display:none!important}html[data-room-layout=A][data-joining=true] #picture:not([data-fullscreen=true]){max-height:none;aspect-ratio:auto!important;min-height:360px;border-radius:16px;background:var(--raised);overflow:visible}html[data-room-layout=A] #cover{position:relative;inset:auto;min-height:360px;width:100%;padding:28px 24px;border-radius:16px;background:var(--raised);color:var(--text)}html[data-room-layout=A] #joinForm{max-width:100%;width:100%;padding:0}html[data-room-layout=A] #joinForm h1{font-size:20px}html[data-room-layout=A] #joinForm input{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:10px;font-size:16px;min-height:44px;padding:10px 12px}html[data-room-layout=A] #joinButton{min-height:44px;border:0;border-radius:12px;background:var(--accent);color:var(--on-accent)}
@media(min-width:901px) and (max-width:1150px){html[data-room-layout=A] main{padding:24px;height:var(--room-viewport-height);grid-template-columns:minmax(0,1fr) 288px}html[data-room-layout=A] #room-context{padding:20px}html[data-room-layout=A] #title{font-size:19px}}
@media(max-width:900px){html[data-room-layout=A] main{display:flex;flex-direction:column;height:var(--room-viewport-height);min-height:0;margin:0;padding:0;width:100%;max-width:none}html[data-room-layout=A] main>.screen{flex:none;border-radius:0}html[data-room-layout=A] #picture:not([data-fullscreen=true]):not(.page-fullscreen){border-radius:0;max-height:calc(var(--room-viewport-height) - 260px);aspect-ratio:16/9!important}html[data-room-layout=A] #room-context{border-radius:16px 16px 0 0;padding:20px;background:var(--raised);min-height:0}html[data-room-layout=A] #title{font-size:20px}html[data-room-layout=A] #room-name{font-size:13px}html[data-room-layout=A] #room-media-state{margin-bottom:14px}html[data-room-layout=A] #shared-presence{margin-top:12px}html[data-room-layout=A] main>aside{flex:1;min-height:260px;height:auto!important;max-height:none;border:0;border-radius:0!important;overflow:hidden;margin:0}html[data-room-layout=A] .room-tabs{height:54px;padding:0 20px;margin:0;gap:24px}html[data-room-layout=A] main>aside>.room-pane{flex:1;min-height:0;padding:16px 20px;max-height:none;overflow:auto}html[data-room-layout=A] main>aside>#room-chat-pane{padding:0;min-height:220px;overflow:hidden}html[data-room-layout=A] #room-chat-pane #messages{min-height:120px;max-height:none;overflow:auto;padding:20px 20px 10px;margin:0;flex:1}html[data-room-layout=A] #room-members-pane #members{max-height:none}html[data-room-layout=A] #chatForm{padding:12px 16px max(14px,env(safe-area-inset-bottom));gap:6px}html[data-room-layout=A] #chat{font-size:16px;min-height:42px;height:42px}html[data-room-layout=A] #room-player-top button{min-height:40px;min-width:40px}html[data-room-layout=A] #room-film #video-playlist-button{min-height:40px;width:40px}html[data-room-layout=A] #floating-controls{left:8px;right:8px;bottom:6px;padding:4px 6px}html[data-room-layout=A] .player-glass .controls{min-height:36px}html[data-room-layout=A] #player-options{left:0;right:0;bottom:0;width:100%;max-height:calc(var(--room-viewport-height) - 24px);padding:24px 22px max(24px,env(safe-area-inset-bottom));border:0;border-radius:18px 18px 0 0}html[data-room-layout=A] .room-sheet{margin:auto 0 0;width:100%;max-height:calc(var(--room-dialog-viewport-height) - 24px);padding:24px 22px max(24px,env(safe-area-inset-bottom));border:0;border-radius:18px 18px 0 0}html[data-room-layout=A] #video-playlist{width:100%;max-height:52dvh}
html[data-room-layout=A][data-joining=true] main{height:auto;padding:0 20px;margin:16px auto}html[data-room-layout=A][data-joining=true] #picture:not([data-fullscreen=true]){max-height:none}}
@media(max-width:360px){html[data-room-layout=A] #room-context{padding:16px}html[data-room-layout=A] #title{font-size:18px}html[data-room-layout=A] #room-context-row{gap:10px}html[data-room-layout=A] #room-invitation .room-invite-button{padding:9px 10px;font-size:12px}html[data-room-layout=A] #room-invitation .wt-icon{width:17px;height:17px}html[data-room-layout=A] #floating-controls .controls button{min-width:32px;min-height:36px;padding:5px}html[data-room-layout=A] .player-glass .transport-center{gap:0}html[data-room-layout=A] #room-media-state{font-size:12px}}
@media(max-height:500px) and (orientation:landscape){html[data-room-layout=A] main{display:grid;grid-template-columns:minmax(0,1fr) 280px;height:var(--room-viewport-height);padding:0;min-height:0}html[data-room-layout=A] main>.screen{min-height:0;overflow:hidden}html[data-room-layout=A] #picture:not([data-fullscreen=true]):not(.page-fullscreen){height:var(--room-viewport-height);max-height:none;aspect-ratio:auto!important;border-radius:0}html[data-room-layout=A] #room-context{display:none}html[data-room-layout=A] main>aside{min-height:0;border-left:1px solid var(--line)}html[data-room-layout=A] main>aside>#room-chat-pane{min-height:0}html[data-room-layout=A] #room-chat-pane #messages{min-height:0;padding:12px 16px}html[data-room-layout=A] #messages li{margin-bottom:14px}html[data-room-layout=A] .room-tabs{height:48px;padding-inline:16px}html[data-room-layout=A] #chatForm{padding:8px 12px}html[data-room-layout=A] .room-sheet{max-height:calc(var(--room-dialog-viewport-height) - 16px);margin:auto;width:min(420px,calc(100vw - 24px));border-radius:14px}html[data-room-layout=A] #player-options{width:360px;left:auto;max-height:calc(var(--room-viewport-height) - 16px);border-radius:14px;bottom:8px;right:8px}}
html[data-room-layout=A] #room-emoji-button{display:flex;align-items:center;justify-content:center;flex:none;min-width:36px;width:36px;min-height:40px;padding:7px;color:var(--muted);background:transparent;border:0}html[data-room-layout=A] #room-emoji-picker{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:10px 16px;background:var(--raised);border-top:1px solid var(--line);flex:none}html[data-room-layout=A] #room-emoji-picker button{padding:6px 0;min-height:36px;font-size:20px;border:0;background:transparent}html[data-room-layout=A] #room-join-link input[type=url]{width:100%;font-size:16px;min-height:44px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--raised);color:var(--text)}html[data-room-layout=A] #room-invitation-entry{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:transparent;border:0;color:var(--accent);min-height:40px;margin-top:8px}
html[data-room-layout=A] #room-library-sheet>[role=tabpanel]{min-height:150px}html[data-room-layout=A] #room-library-sheet>[role=tabpanel]>button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 0;border:0;background:transparent;text-align:left}html[data-room-layout=A] #room-app-navigation{display:flex;align-items:center;justify-content:space-around;gap:16px;padding:14px 0 0;margin-top:24px;border-top:1px solid var(--line)}html[data-room-layout=A] #room-app-navigation button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 10px;min-width:60px;min-height:54px;font-size:12px;background:transparent;border:0;color:var(--muted)}html[data-room-layout=A] #room-app-navigation [aria-selected=true]{color:var(--accent)}html[data-room-layout=A] #room-app-current-room{margin:0 0 18px;font-weight:550;overflow-wrap:anywhere}
html[data-room-layout=A] #members li>.member-status{font-size:12px;color:var(--muted);max-width:45%;flex:none;text-align:right;overflow-wrap:anywhere}html[data-room-layout=A] .room-member-more{display:flex;align-items:center;justify-content:center;min-height:36px;width:32px;min-width:32px;flex:none;margin-left:2px;padding:6px;border:0;background:transparent;color:var(--muted)}html[data-room-layout=A] .room-member-more .wt-icon{width:20px;height:20px}html[data-room-layout=A] .room-member-more:hover{background:var(--hover)}html[data-room-layout=A] .room-member-identity{display:flex;align-items:center;gap:12px;margin-bottom:12px;min-width:0}html[data-room-layout=A] .room-member-identity .member-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--raised);color:var(--muted);font-size:14px;flex:none}html[data-room-layout=A] .room-member-identity strong{font-size:16px;overflow-wrap:anywhere}html[data-room-layout=A] #room-member-manager>p{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 24px}html[data-room-layout=A] .room-remove-action{display:block;width:100%;min-height:40px;padding:8px 0;color:var(--danger);border:0;background:transparent;text-align:left;font-size:14px}html[data-room-layout=A] #room-member-remove-confirm>p{font-size:14px;line-height:1.6;overflow-wrap:anywhere;margin:0 0 18px}html[data-room-layout=A] #room-member-remove-result{font-size:12px!important;color:var(--muted);min-height:18px}html[data-room-layout=A] .room-remove-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}html[data-room-layout=A] .room-remove-actions>button{min-height:40px;padding:8px 14px;border:0;font-size:14px;background:var(--raised)}html[data-room-layout=A] .room-remove-actions>.room-remove-confirm{background:var(--danger);color:#FFFFFF}html[data-room-layout=A][data-theme=dark] .room-remove-actions>.room-remove-confirm{color:#12171C}html[data-room-layout=A] #joinForm[data-removed=true]>label,html[data-room-layout=A] #joinForm[data-removed=true]>#nickname,html[data-room-layout=A] #joinForm[data-removed=true]>#joinButton,html[data-room-layout=A] #joinForm[data-removed=true]>p:not(#joinHint){display:none}html[data-room-layout=A] #joinForm[data-removed=true]>h1{margin-bottom:16px}html[data-room-layout=A] #joinForm[data-removed=true] #room-invitation-entry{margin-top:16px}
html[data-room-layout=A][data-reduce-motion=true] *,html[data-room-layout=A][data-reduce-motion=true] *:before,html[data-room-layout=A][data-reduce-motion=true] *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){html[data-room-layout=A] *,html[data-room-layout=A] *:before,html[data-room-layout=A] *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){html[data-room-layout=A] body{background:Canvas;color:CanvasText}html[data-room-layout=A] .room-invite-button,html[data-room-layout=A] .room-sheet{border:1px solid ButtonText}html[data-room-layout=A] #room-connection-point .connection-dot{background:ButtonText}html[data-room-layout=A] .room-tabs>[aria-selected=true]:after{background:Highlight}}

/* Avatar controls inherit the approved room sheet, palette and hit targets. */
html[data-room-layout=A] #room-profile-avatar{border:0;margin:4px 0 0;padding:0;min-width:0}
html[data-room-layout=A] #room-profile-avatar legend{font-size:14px;padding:0;margin:0 0 8px;color:var(--text)}
html[data-room-layout=A] .room-avatar-modes{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:10px}
html[data-room-layout=A] .room-avatar-modes label{display:inline-flex;align-items:center;gap:6px;min-height:30px;margin:0;font-size:13px;cursor:pointer}
html[data-room-layout=A] #room-profile-avatar input[type=radio]{appearance:auto;accent-color:var(--accent);width:16px;height:16px;min-width:16px;min-height:0;padding:0;margin:0;border:0;background:transparent}
html[data-room-layout=A] .room-avatar-row{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;gap:12px}
html[data-room-layout=A] #room-avatar-preview{display:block;width:48px;height:48px;flex:none;border-radius:50%;overflow:hidden;background:var(--raised)}
html[data-room-layout=A] #room-avatar-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:4px;padding:2px;max-height:144px;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--muted) transparent}
html[data-room-layout=A] #room-avatar-choices button{display:grid;place-items:center;justify-self:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:4px;border:1px solid transparent;border-radius:50%;background:transparent}
html[data-room-layout=A] #room-avatar-choices button[aria-pressed=true]{border-color:var(--accent);background:var(--hover)}
html[data-room-layout=A] #room-avatar-choices img{width:34px;height:34px;display:block;border-radius:50%;object-fit:cover}
html[data-room-layout=A] #room-avatar-upload{justify-self:start;min-height:40px;padding:8px 4px;background:transparent;color:var(--accent);border:0;font-size:13px}
html[data-room-layout=A] #room-profile-result{font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
html[data-room-layout=A] #room-profile-result:empty{display:none}
html[data-room-layout=A] .room-profile-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:4px}
html[data-room-layout=A] .room-profile-actions>button{font-size:14px;min-height:40px;padding:8px 12px;border:0;background:transparent}
html[data-room-layout=A] .room-profile-actions>.primary{color:var(--on-accent);background:var(--accent)}
html[data-room-layout=A] .room-profile-entry{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 0;border:0;background:transparent;text-align:left;font-size:14px}
html[data-room-layout=A] .room-profile-entry .wt-icon{width:20px;height:20px}
html[data-room-layout=A] #join-profile-open{display:inline-flex;width:auto;min-height:40px;margin-top:8px;color:var(--accent);font-size:14px}
html[data-room-layout=A] #room-avatar-preview img,html[data-room-layout=A] .member-avatar img,html[data-room-layout=A] .room-chat-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
html[data-room-layout=A] #members .member-avatar,html[data-room-layout=A] .room-member-identity .member-avatar{overflow:hidden}
html[data-room-layout=A] #messages li.room-avatar-chat{display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:9px;align-items:start}
html[data-room-layout=A] #messages .room-chat-avatar{grid-column:1;grid-row:1 / span 2;display:block;width:30px;height:30px;border-radius:50%;overflow:hidden;background:var(--raised)}
html[data-room-layout=A] #messages .room-avatar-chat small{grid-column:2;min-width:0;overflow-wrap:anywhere}
html[data-room-layout=A] #messages .room-avatar-chat p{grid-column:2;justify-self:start;min-width:0}
@media(max-width:360px){html[data-room-layout=A] .room-avatar-row{gap:8px}}
@media(forced-colors:active){html[data-room-layout=A] #room-avatar-choices button[aria-pressed=true]{outline:2px solid Highlight;outline-offset:-2px}}

/* This is an external-picture capability, shared by every platform entry. */
html[data-quark-entry=true] #joinForm{display:none!important}
html[data-quark-entry=true] #picture,html[data-quark-entry=true] #cover{min-height:0!important;aspect-ratio:auto!important;max-height:none!important}
html[data-quark-entry=true] #room-player-top,html[data-quark-entry=true] #floating-controls,html[data-quark-entry=true] #video-viewport,html[data-quark-entry=true] #quark-picture-status{display:none!important}
html[data-quark-entry=true] main{height:auto!important;min-height:0!important;margin:16px auto!important;padding:0 16px!important;max-width:520px!important}
#quark-entry{width:100%;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
#quark-entry h1{font-size:20px;font-weight:600;margin:0 0 20px}
#quark-entry ol{margin:0 0 24px;padding-left:22px}#quark-entry li+li{margin-top:12px}
#quark-entry a.quark-bookmark{display:inline-block;padding:8px 14px;margin-right:12px;color:var(--accent);border:1px solid var(--line);border-radius:8px;font-weight:600;text-decoration:none}
#quark-entry button{min-height:40px;padding:8px 12px;font-size:14px;border:0;background:var(--accent);color:var(--on-accent)}
#quark-entry form{display:flex;flex-direction:column;gap:10px;margin:0}
#quark-entry input{width:100%;min-height:42px;padding:8px 10px;font-size:16px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px}
#quark-entry form>button{align-self:flex-end}#quark-entry form>p:empty{display:none}
#quark-entry-source{margin:0 0 20px;color:var(--muted);font-size:13px;line-height:1.6}
#quark-entry #quark-create-options{margin-top:22px;padding-top:12px;border-top:1px solid var(--line)}
#quark-create-options summary{cursor:pointer;padding:6px 0;min-height:36px}#quark-create-options form{margin-top:12px}
#quark-create-result,#quark-bookmark-result,#quark-entry #room-invitation-error{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
html[data-quark-sync=true]{--player-text:var(--text);--player-muted:var(--muted);--player-accent:var(--accent);--player-track:var(--track)}
html[data-quark-sync=true] body{background:var(--surface)}
html[data-quark-sync=true]:not([data-quark-entry=true])[data-joining=false] main{display:flex!important;flex-direction:column;height:100dvh!important;max-width:none;margin:0;padding:0;gap:0}
html[data-quark-sync=true] main>.screen{flex:none;width:100%;max-width:none;margin:0;min-width:0;border-radius:0;overflow:visible}
html[data-room-layout=A][data-quark-sync=true] #picture:not([data-fullscreen=true]):not(.page-fullscreen){display:flex;flex-direction:column;height:auto!important;min-height:0!important;aspect-ratio:auto!important;max-height:none!important;border-radius:0;background:var(--surface);overflow:visible}
html[data-quark-sync=true] #video-viewport,html[data-quark-sync=true] #immersive-hud,html[data-quark-sync=true] #player-audio-options,html[data-quark-sync=true] .quark-picture-only,html[data-quark-sync=true] #pip,html[data-quark-sync=true] #fullscreen,html[data-quark-sync=true] #room-reload,html[data-quark-sync=true] #player-screen-lock,html[data-quark-sync=true] #player-gesture-zone,html[data-quark-sync=true] #player-brightness-shade,html[data-quark-sync=true] #room-library-source,html[data-quark-sync=true] #room-settings-pane,html[data-quark-sync=true] #sourcePanel{display:none!important}
html[data-quark-sync=true] #quark-picture-status{display:none}
html[data-quark-sync=true] #room-player-top{display:none!important}
html[data-quark-sync=true] #room-player-top button{min-height:32px;min-width:32px;width:32px;height:32px;color:var(--muted)}
html[data-quark-sync=true] #floating-controls{--accent:inherit;--text:inherit;--muted:inherit;--track:inherit;--hover:inherit;--selected:inherit;--line:inherit;position:static;order:2;margin:0;padding:8px 10px;transform:none;opacity:1!important;visibility:visible!important;pointer-events:auto!important;background:transparent;border:0;box-shadow:none;border-radius:0;width:auto;backdrop-filter:none;color:var(--text)}
html[data-quark-sync=true] #floating-controls .timeline{margin:0 0 4px}
html[data-quark-sync=true] #floating-controls .controls{min-height:36px}html[data-quark-sync=true] #floating-controls button{color:var(--text)}
html[data-quark-sync=true] #floating-controls .controls button{color:var(--text)}html[data-quark-sync=true] #floating-controls input{accent-color:var(--accent)}
html[data-quark-sync=true] .player-glass .timeline>span{color:var(--muted)}
html[data-quark-sync=true] #room-context{padding:12px 14px;border-radius:0;min-height:0;border-top:1px solid var(--line)}
html[data-quark-sync=true] #title{font-size:14px;line-height:1.5}html[data-quark-sync=true] #room-media-state{font-size:12px;margin:4px 0 8px}
html[data-quark-sync=true] #room-film #video-playlist-button{min-height:32px;height:32px;width:32px}
html[data-quark-sync=true] #room-context-row{gap:8px}html[data-quark-sync=true] #room-name{font-size:12px}
html[data-quark-sync=true] #room-invitation .room-invite-button{min-height:34px;padding:6px 8px;font-size:12px}
html[data-quark-sync=true] #shared-presence{font-size:12px;margin-top:6px}
html[data-quark-sync=true] main>aside{flex:1!important;height:auto!important;min-height:160px!important;border-radius:0!important;border:0;border-top:1px solid var(--line);margin:0}
html[data-quark-sync=true] .room-tabs{height:44px;padding:0 14px}
html[data-quark-sync=true] main>aside>#room-chat-pane{min-height:0!important;padding:0}
html[data-quark-sync=true] #room-chat-pane #messages{min-height:30px;padding:12px 14px 6px}
html[data-quark-sync=true] #chatForm{padding:8px 10px;gap:4px}html[data-quark-sync=true] #chat{height:38px;min-height:38px;font-size:16px}
html[data-quark-sync=true] .room-sheet,html[data-quark-sync=true] #player-options{max-height:calc(100dvh - 16px)}
html[data-quark-sync=true][data-joining=true] #cover{padding:20px 16px;min-height:0}
html[data-quark-sync=true][data-joining=true] main{padding:0!important;margin:0!important}
#quark-connect-help{display:inline-block;min-height:40px;padding:8px 12px;color:var(--accent)}#quark-connect-help[hidden]{display:none}
html[data-room-layout=A] #joinForm[data-quark-required=true]>label,html[data-room-layout=A] #joinForm[data-quark-required=true]>#nickname,html[data-room-layout=A] #joinForm[data-quark-required=true]>#joinButton,html[data-room-layout=A] #joinForm[data-quark-required=true]>p:not(#joinHint){display:none}
#quark-required-guide{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}#quark-required-guide[hidden]{display:none}#quark-required-guide button{min-height:40px;padding:8px 12px;font-size:14px}
@media(max-height:400px){html[data-quark-sync=true] #room-context{padding:8px 12px}html[data-quark-sync=true] #room-context-row,html[data-quark-sync=true] #shared-presence{display:none!important}html[data-quark-sync=true] #room-media-state{margin:2px 0 0}html[data-quark-sync=true] main>aside{min-height:0!important}html[data-quark-sync=true] #room-chat-pane #messages{min-height:0;padding-block:6px}html[data-quark-sync=true] #floating-controls{padding:4px 10px}}
@media(max-height:280px){html[data-quark-sync=true] #room-context{display:none}html[data-quark-sync=true] .room-tabs{height:38px}html[data-quark-sync=true] #room-chat-pane #messages{padding-block:0}html[data-quark-sync=true] #floating-controls .timeline{min-height:24px;margin:0}html[data-quark-sync=true] #floating-controls .controls button{min-height:36px;height:36px}html[data-quark-sync=true][data-quark-typing=true] #picture{display:none!important}}

/* TV authorization uses the room's existing surfaces and controls. */
#quark-tv-panel{min-width:0;margin-top:20px;padding-top:18px;border-top:1px solid var(--line);overflow-wrap:anywhere}
#quark-tv-panel h2{font-size:16px;font-weight:600;line-height:1.5;margin:0 0 10px}
#quark-tv-status{font-size:14px;line-height:1.6;margin:0 0 14px;color:var(--text)}
#quark-tv-status[data-error=true]{color:var(--danger)}
#quark-tv-qr{display:block;max-width:100%;height:auto;margin:0 auto 16px;background:#fff;border-radius:4px}
#quark-tv-notice{margin:0 0 16px;font-size:13px;line-height:1.65;color:var(--muted)}
#quark-tv-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#quark-tv-actions button,#quark-tv-account{min-height:40px;padding:8px 12px;border:0;border-radius:8px;font-size:14px;background:var(--raised);color:var(--text)}
#quark-tv-actions #quark-tv-start{background:var(--accent);color:var(--on-accent)}
#quark-tv-actions button:disabled{opacity:.5;cursor:default}
#quark-tv-actions button:hover:not(:disabled),#quark-tv-account:hover{filter:brightness(.96)}
#quark-tv-dialog{width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
#quark-tv-dialog #quark-tv-panel{margin:0;padding:0;border:0}
html[data-quark-tv=true] #localSourceLabel,html[data-quark-tv=true] #loadOnline,html[data-quark-tv=true] #sourcePanel,html[data-quark-tv=true] #shared-route{display:none!important}
@media(max-width:400px){#quark-tv-panel{margin-top:16px;padding-top:16px}#quark-tv-dialog{padding:18px}#quark-tv-qr{width:164px}}
