:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;letter-spacing:0;color:#efefef;background:#141516;color-scheme:dark}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button,.button{border:1px solid #454649;border-radius:6px;background:#26282b;color:#eee;padding:9px 14px;text-decoration:none;line-height:1.4}html:not([data-input="touch"]) button:hover:not(:disabled),html:not([data-input="touch"]) .button:hover{background:#373a3e}button:disabled,input:disabled,select:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #9fd7ff;outline-offset:3px}a{color:#c4e3ff}.primary{background:#3d6556;border-color:#577d6e}html:not([data-input="touch"]) .primary:hover:not(:disabled){background:#527d6c}
.site-header{min-height:68px;border-bottom:1px solid #343638;display:flex;align-items:center;gap:12px;padding:14px max(16px,calc((100% - 960px)/2));flex-wrap:wrap}.brand{font-size:23px;font-weight:700;color:#efefef;text-decoration:none}.badge{font-size:11px;font-weight:700;color:#f0c876;border:1px solid #6b592e;border-radius:4px;padding:4px 6px;white-space:nowrap}#connection{margin-left:auto;font-size:12px;color:#bbb;overflow-wrap:anywhere}#reconnect{font-size:12px}
main{max-width:992px;padding:20px 16px 28px;margin:auto;min-height:60vh}.login{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:28px 0;flex-wrap:wrap}.login h1{margin:0}.server-picker{display:flex;align-items:center;gap:10px;margin-bottom:14px}.server-picker label{font-size:13px;flex-shrink:0}.select-frame{display:flex;flex:1;min-width:0;background:#26282b;border:1px solid #62676e;border-radius:6px;padding-right:14px}.select-frame select{width:100%;min-width:0;border:0;background:transparent;color:#eee;padding:10px}.select-frame:focus-within{outline:2px solid #9fd7ff;outline-offset:3px}.select-frame select:focus-visible{outline:0}#refresh{flex-shrink:0}
#notice{color:#c9d8e3;font-size:14px;line-height:1.5;margin:0 0 16px;overflow-wrap:anywhere}#notice:empty{display:none}#notice.error{color:#ffb1a8}.broadcast{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:2px 0 14px;flex-wrap:wrap}.broadcast-detail{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.broadcast-detail span{overflow-wrap:anywhere}#host{font-weight:600;font-size:14px}#channel{color:#a9abad;font-size:12px}.broadcast-actions{display:flex;gap:8px;flex-wrap:wrap}.broadcast-actions button{font-size:13px;min-height:40px}
#notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);max-height:30vh;overflow:auto;padding:10px 14px;border:1px solid #454649;border-radius:6px;background:#242629;box-shadow:0 4px 16px #0005;z-index:30;pointer-events:none;margin:0}
#logout{font-size:12px;white-space:nowrap}
.video-surface{position:relative;width:100%;aspect-ratio:16/9;min-height:200px;background:#080909;overflow:hidden;border-radius:6px}#youtube-mount,#youtube-mount iframe{width:100%;height:100%;min-height:200px;border:0}#youtube-mount{position:absolute;inset:0}#youtube-mount iframe{display:block}#viewer-placeholder{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;overflow:hidden}#artwork{width:100%;height:100%;object-fit:contain}#viewer-state{position:absolute;bottom:12px;left:12px;right:12px;width:fit-content;max-width:calc(100% - 24px);background:#141516e8;border:1px solid #555;padding:7px 10px;border-radius:4px;font-size:13px;overflow-wrap:anywhere}.now-playing{display:flex;align-items:center;gap:16px;margin-top:18px;font-size:12px;color:#ccc}#phase{color:#a3d9b8}h1{font-size:24px;line-height:1.35;overflow-wrap:anywhere;margin:8px 0}h2{font-size:17px;margin:0}.metadata{display:flex;gap:8px 20px;flex-wrap:wrap;color:#aeb1b5;font-size:13px;margin:8px 0 14px;line-height:1.5}.metadata span{overflow-wrap:anywhere}.position{display:flex;align-items:center;gap:16px}progress{flex:1;min-width:0;height:4px;border:0;accent-color:#c3ddd2}progress::-webkit-progress-bar{background:#393b3e}progress::-webkit-progress-value{background:#c3ddd2}#time{font-size:12px;color:#aaa;font-variant-numeric:tabular-nums;flex-shrink:0}.transport{display:flex;justify-content:center;align-items:center;gap:12px;margin:18px 0 20px}.icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex-shrink:0;padding:10px;border:1px solid transparent;border-radius:6px;background:transparent}.icon img{display:block;width:100%;height:100%;object-fit:contain}.icon.primary{background:#3d6556;border-color:#577d6e}.icon[aria-pressed="true"]{background:#3d6556;border-color:#577d6e}.recovery{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #49433b}.recovery p{margin:0;color:#efcba0;font-size:13px;line-height:1.5}.recovery button{flex-shrink:0}
.request-form{padding:16px 0;border-top:1px solid #343638;border-bottom:1px solid #343638}.request-form label{display:block;font-size:13px;margin-bottom:8px}.request-input{display:flex;gap:8px}.request-input input{flex:1;min-width:0;width:100%;padding:10px 12px;border:1px solid #62676e;border-radius:6px;background:#1e2022;color:#eee}.request-input input::placeholder{color:#a3a7ab}.queue{margin-top:22px}.queue-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#queue-count{color:#bbb;font-size:13px}ol{list-style:none;counter-reset:video;margin:14px 0 0;padding:0}li{counter-increment:video;display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:12px;padding:13px 0;border-top:1px solid #2c2e30;align-items:center}li:before{content:counter(video);color:#84888c;font-size:12px}li strong{font-size:14px;font-weight:500;display:block;overflow-wrap:anywhere}li small{font-size:12px;color:#9b9fa3;display:block;margin-top:4px;overflow-wrap:anywhere}li time{font-size:12px;color:#aaa;font-variant-numeric:tabular-nums}#empty,#queue-more{color:#999;font-size:13px;line-height:1.5}
footer{border-top:1px solid #343638;max-width:960px;margin:auto;padding:18px 0;display:flex;justify-content:space-between;gap:16px;color:#aaa;font-size:12px}footer span{overflow-wrap:anywhere}footer a{flex-shrink:0}dialog{max-width:440px;width:calc(100% - 32px);background:#242629;color:#eee;border:1px solid #505357;border-radius:8px;padding:24px}dialog::backdrop{background:#0009}dialog p{font-size:14px;line-height:1.65;color:#ccc;overflow-wrap:anywhere}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}[hidden]{display:none!important}
@media(max-width:650px){h1{font-size:21px}.transport{gap:6px}footer{margin:0 16px}.broadcast{flex-wrap:nowrap;align-items:center;gap:8px}.broadcast-detail{flex:1 1 0}.broadcast-actions{flex:0 0 auto;gap:6px}.broadcast-actions button{padding:8px 10px;white-space:nowrap}.site-header{gap:10px}.video-surface{border-radius:4px}}
@media(max-width:360px){.transport{gap:3px}.icon{width:42px;height:44px;padding:10px}.metadata{gap:4px 14px}.position{gap:10px}}
#video-stage{position:relative}
body.video-only{overflow:hidden;background:#000}
body.video-only>.site-header,body.video-only>footer,body.video-only main>:not(#workspace),body.video-only #workspace>:not(.player),body.video-only .player>:not(#video-stage){display:none!important}
body.video-only main{max-width:none;min-height:0;margin:0;padding:0}
body.video-only #video-stage{position:fixed;inset:0;z-index:10;width:100%;height:100%;background:#000}
body.video-only .video-surface{height:100%;min-height:0;aspect-ratio:auto;border-radius:0;background:#000}
body.video-only #youtube-mount,body.video-only #youtube-mount iframe{min-height:0}
body.video-only .recovery{position:absolute;bottom:16px;left:16px;right:16px;max-width:680px;margin:auto;padding:12px 16px;border:1px solid #49433b;border-radius:6px;background:#141516f2}
body.video-only #stage-status{position:absolute;top:16px;left:50%;transform:translateX(-50%);max-width:70%;margin:0;padding:8px 12px;border-radius:4px;background:#141516e8;color:#efcba0;font-size:13px;overflow-wrap:anywhere}
.transport #toggle{border-radius:50%}
.stage-fullscreen{position:absolute;right:8px;bottom:8px;z-index:2;background:#141516d9;color:white}
.stage-fullscreen svg{width:24px;height:24px;flex-shrink:0}
body.video-only .stage-fullscreen{opacity:0;transition:opacity .15s}
body.video-only #video-stage.show-exit>.stage-fullscreen,html[data-input="keyboard"] body.video-only .stage-fullscreen:focus-visible{opacity:1}
html:not([data-input="touch"]) body.video-only .stage-fullscreen:hover{opacity:1}
.position input[type=range]{flex:1;min-width:0;width:100%;height:24px;margin:0;cursor:pointer;accent-color:#c3ddd2}
.position input[type=range]:disabled{opacity:1;cursor:default}
.time-label{display:inline-flex;align-items:center;white-space:nowrap;gap:4px}
#live-edge{font:inherit;font-weight:600;color:#c3ddd2;background:transparent;border:0;padding:0 4px;min-height:32px}
#live-edge:disabled{color:#aeb1b5}
#live-edge[hidden]{display:none}
#progress{appearance:none;background:transparent;border:0;padding:0}
#progress::-webkit-slider-runnable-track{height:3px;border-radius:2px;background:linear-gradient(to right,#c3ddd2 var(--progress-fill,0%),#393b3e var(--progress-fill,0%))}
#progress::-webkit-slider-thumb{appearance:none;width:14px;height:14px;margin-top:-5.5px;border:0;border-radius:50%;background:#c3ddd2}
#progress::-moz-range-track{height:3px;border:0;border-radius:2px;background:#393b3e}
#progress::-moz-range-progress{height:3px;border-radius:2px;background:#c3ddd2}
#progress::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:#c3ddd2}
.request-form{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;border:0;padding:0;margin-top:24px}
.request-form label{margin:0;white-space:nowrap}
#request-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap;color:#cacaca}
#request-status:empty{display:none}
@media(max-width:380px){.request-form{gap:8px}.request-form label,.request-input{grid-column:1/-1}}
.keys{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-top:1px solid #343638}.keys label{font-size:14px}.keys p{font-size:12px;color:#aeb1b5;margin:5px 0 0}.keys input{appearance:none;width:40px;height:24px;background:#444;border-radius:20px;position:relative;flex-shrink:0;cursor:pointer}.keys input:before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#eee}.keys input:checked{background:#4b8066}.keys input:checked:before{left:19px}

/* Compact account header; touch gestures must not become page scrolling. */
#progress{touch-action:none}
header{padding:14px max(16px,calc((100% - 960px)/2));gap:12px;flex-wrap:wrap}
header .keys{display:flex;align-items:center;gap:8px;margin:0;padding:0;border:0}
header .keys label{font-size:13px;white-space:nowrap}
header .keys input{margin:0}
header .keys p{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
header .account{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;min-width:0}
header strong{font-size:23px}
html[data-input="touch"] button,html[data-input="touch"] a,html[data-input="touch"] input{-webkit-tap-highlight-color:transparent}
html[data-input="touch"] button:focus,html[data-input="touch"] a:focus{outline:none}
header #connection{margin-left:0;font-size:12px;max-width:240px;overflow-wrap:anywhere}
.queue{margin-top:20px;padding-top:0;border-top:0}
footer{flex-wrap:nowrap;gap:16px}footer span{min-width:0}footer a{flex-shrink:0;margin-left:auto}
header,header.site-header{min-height:60px;align-items:center;padding:10px max(16px,calc((100% - 960px)/2));gap:8px 10px;line-height:20px}
header .brand,header strong{display:inline-flex;align-items:center;font-size:23px;line-height:28px}
header .badge{line-height:16px;padding:3px 6px}
header .brand{border:1px solid #577d6e;border-radius:4px;color:#a3d9b8;background:#1d2b25;padding:1px 7px;font-size:20px;line-height:28px;text-decoration:none;white-space:nowrap;flex-shrink:0}
header .keys label,header #connection{line-height:20px}
header button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 10px;font-size:12px;line-height:20px}
/* Inset visual surfaces preserve the existing hit areas. */
header #logout{position:relative;isolation:isolate;height:34px;min-height:34px;border:0;background:transparent;padding:6px 10px}
header #logout::before{content:"";position:absolute;z-index:-1;inset:2px 0;border:1px solid #454649;border-radius:6px;background:#26282b;pointer-events:none}html:not([data-input="touch"]) header #logout:hover:not(:disabled){background:transparent}html:not([data-input="touch"]) header #logout:hover:not(:disabled)::before{background:#373a3e}
.server-picker .select-frame{position:relative;height:42px;background:transparent;border:0}
.server-picker .select-frame::before{content:"";position:absolute;inset:4px 0;border:1px solid #62676e;border-radius:6px;background:#26282b;pointer-events:none}
.server-picker .select-frame select{position:relative;z-index:1;height:42px;background:transparent;padding-top:10px;padding-bottom:10px}
.server-picker #refresh,.server-picker #server-refresh{position:relative;display:inline-flex;align-items:center;justify-content:center;align-self:center;flex:0 0 42px;width:42px;height:42px;min-width:42px;padding:10px;border:0;border-radius:6px;background:transparent;color:#eee}
.server-picker #refresh::before,.server-picker #server-refresh::before{content:"";position:absolute;inset:4px;border:1px solid #454649;border-radius:6px;background:#26282b;pointer-events:none}html:not([data-input="touch"]) .server-picker #refresh:hover:not(:disabled),html:not([data-input="touch"]) .server-picker #server-refresh:hover:not(:disabled){background:transparent}html:not([data-input="touch"]) .server-picker #refresh:hover:not(:disabled)::before,html:not([data-input="touch"]) .server-picker #server-refresh:hover:not(:disabled)::before{background:#373a3e}
.server-picker #refresh svg,.server-picker #server-refresh svg{position:relative;display:block;width:18px;height:18px;flex-shrink:0}
@media(max-width:650px){header,header.site-header{padding:10px 16px;gap:8px 10px}header .account{flex:1 1 0;max-width:calc(100% - 164px)}header #connection{margin-left:0;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header #logout{flex-shrink:0}}
@media(hover:none){
  button,a,input[type=range]{-webkit-tap-highlight-color:transparent}
}

/* Shared transport and request-field sizing with the music controller. */
.transport{gap:16px}
.transport .icon{flex:0 0 40px;width:40px;height:44px;padding:8px;border:0}
.transport #toggle{flex:0 0 52px;width:52px;height:52px;padding:14px;border-radius:50%}
.request-input{gap:12px}
.request-input input{height:44px;padding:10px 12px;background:#26282b}
@media(max-width:380px){.transport{gap:4px}.transport .icon{flex-basis:38px;width:38px}.request-input{gap:8px}}

/* Match compact controls while retaining the broadcast buttons' 40px hit area. */
.broadcast-actions button{position:relative;isolation:isolate;height:40px;min-height:40px;border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;padding-top:1px;padding-bottom:1px}
.broadcast-actions button::before{content:"";position:absolute;z-index:-1;inset:3px 0;border:1px solid #454649;border-radius:6px;background:#26282b;pointer-events:none}
.broadcast-actions button.primary::before{background:#3d6556;border-color:#577d6e}html:not([data-input="touch"]) .broadcast-actions button:hover:not(:disabled){background:transparent}html:not([data-input="touch"]) .broadcast-actions button:hover:not(:disabled)::before{background:#373a3e}html:not([data-input="touch"]) .broadcast-actions button.primary:hover:not(:disabled)::before{background:#527d6c}

/* Balanced text padding keeps box dimensions and hit areas unchanged. */
.login-link{display:inline-flex;align-items:center;justify-content:center;line-height:21px;padding:9px 14px;border:1px solid #577d6e;border-radius:6px;background:#3d6556;color:#eee;text-decoration:none;white-space:nowrap}html:not([data-input="touch"]) .login-link:hover{background:#527d6c}

/* Touch feedback lasts only for the active gesture, never for lingering focus. */
html[data-input="touch"] button[data-touch-pressed]:not(:disabled),html[data-input="touch"] .button[data-touch-pressed]{background:#373a3e}
html[data-input="touch"] .primary[data-touch-pressed]:not(:disabled){background:#527d6c}
html[data-input="touch"] header #logout[data-touch-pressed]:not(:disabled){background:transparent}
html[data-input="touch"] header #logout[data-touch-pressed]:not(:disabled)::before{background:#373a3e}
html[data-input="touch"] .server-picker #refresh[data-touch-pressed]:not(:disabled),html[data-input="touch"] .server-picker #server-refresh[data-touch-pressed]:not(:disabled){background:transparent}
html[data-input="touch"] .server-picker #refresh[data-touch-pressed]:not(:disabled)::before,html[data-input="touch"] .server-picker #server-refresh[data-touch-pressed]:not(:disabled)::before{background:#373a3e}
html[data-input="touch"] .broadcast-actions button[data-touch-pressed]:not(:disabled){background:transparent}
html[data-input="touch"] .broadcast-actions button[data-touch-pressed]:not(:disabled)::before{background:#373a3e}
html[data-input="touch"] .broadcast-actions button.primary[data-touch-pressed]:not(:disabled)::before{background:#527d6c}
html[data-input="touch"] .login-link[data-touch-pressed]{background:#527d6c}
