/* Immersive player: the canvas fills the viewport, controls overlay the picture. */
#player-dialog{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:#000;color:#fff;overflow:hidden;outline:none;overscroll-behavior:contain;touch-action:manipulation}
#player-dialog::backdrop{background:#000;backdrop-filter:none}
#player-dialog[open]{display:block}
#player-dialog #video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.watch-chrome{position:absolute;z-index:3;left:0;right:0;transition:opacity .24s ease,visibility .24s ease;opacity:1;visibility:visible}
.watch-top{top:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:calc(25px + env(safe-area-inset-top)) max(3.4vw,env(safe-area-inset-left),20px) 65px;background:linear-gradient(#000b,transparent)}
.watch-series{font-size:13px;font-weight:700;letter-spacing:3px;position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap}
.watch-private{font-size:9px;letter-spacing:2px;color:#bdbdbd}
.watch-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;min-width:48px;height:48px;padding:8px;color:#fff;background:none;border:0;border-radius:4px;transition:transform .15s,color .15s;touch-action:manipulation}
.watch-button svg{display:block;width:30px;height:30px}
.watch-button:hover:not(:disabled){transform:scale(1.12);color:var(--green)}
.watch-button:focus-visible{outline:2px solid #fff;outline-offset:2px;background:#fff2}
.watch-button:disabled{opacity:.28}
.watch-back{gap:13px;padding-left:0;min-width:48px;font-size:13px;font-weight:500}
.watch-back svg{width:28px}
.watch-bottom{bottom:0;padding:75px max(3.4vw,env(safe-area-inset-right),20px) calc(23px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#000c 42%,#000e)}
.watch-seek-row{display:flex;align-items:center;gap:22px;margin-bottom:12px}
#remaining-time{font-size:12px;font-variant-numeric:tabular-nums;min-width:50px;text-align:right;color:#ededed}
#seek{--played:0%;width:100%;min-width:0;appearance:none;-webkit-appearance:none;height:22px;cursor:pointer;background:transparent;margin:0;border-radius:0;accent-color:var(--green)}
#seek::-webkit-slider-runnable-track{height:4px;background:linear-gradient(to right,var(--green) var(--played),#ffffff4d var(--played));border-radius:2px;transition:height .15s}
#seek::-moz-range-track{height:4px;background:#ffffff4d;border-radius:2px}
#seek::-moz-range-progress{height:4px;background:var(--green)}
#seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:12px;height:12px;border:0;border-radius:50%;background:var(--green);margin-top:-4px;box-shadow:0 0 0 3px #0002}
#seek::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:var(--green)}
#seek:hover::-webkit-slider-runnable-track{height:6px}#seek:hover::-webkit-slider-thumb{margin-top:-3px}
#seek:focus-visible{outline:2px solid #fff;outline-offset:4px}
.watch-toolbar{display:flex;align-items:center;gap:22px;min-width:0}
.watch-playback,.watch-options{display:flex;align-items:center;gap:10px;flex-shrink:0}
.watch-main svg{width:36px;height:36px}
.icon-pause,.icon-muted{display:none}
#toggle-play[data-playing=true] .icon-pause,#mute[data-muted=true] .icon-muted{display:block}
#toggle-play[data-playing=true] .icon-play,#mute[data-muted=true] .icon-volume{display:none}
.watch-skip>span{position:absolute;top:18px;font-size:9px;font-weight:700}
.watch-volume{display:flex;align-items:center;gap:7px}
#volume{width:64px;accent-color:#fff;cursor:pointer;height:28px;margin:0}
.watch-heading{display:flex;align-items:baseline;gap:12px;min-width:0;flex:1;justify-content:center}
.watch-heading>span{font-size:15px;font-weight:650;white-space:nowrap}
#player-dialog #player-title{font-size:13px;letter-spacing:0;font-weight:400;color:#c9c9c9;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.watch-autoplay{display:flex;align-items:center;gap:7px;cursor:pointer;color:#bcbcbc;font-size:11px;margin-right:8px;min-height:44px}
.watch-autoplay input{accent-color:var(--green);margin:0;width:15px;height:15px}
.watch-loading{position:absolute;inset:0;display:grid;place-content:center;padding:25px;text-align:center;color:#c5c5c5;font-size:14px;z-index:1;background:#000}
.watch-spinner{position:absolute;z-index:2;left:calc(50% - 20px);top:calc(50% - 20px);width:40px;height:40px;border:3px solid #ffffff25;border-top-color:var(--green);border-radius:50%;animation:watch-spin .8s linear infinite;pointer-events:none}
@keyframes watch-spin{to{transform:rotate(360deg)}}
#player-dialog.controls-hidden{cursor:none}
#player-dialog.controls-hidden .watch-chrome{opacity:0;visibility:hidden;pointer-events:none}
#player-dialog:fullscreen{width:100%;height:100%;max-width:none;max-height:none}
@media(max-width:1050px){.watch-toolbar{gap:12px}.watch-playback,.watch-options{gap:4px}.watch-heading{flex-direction:column;gap:2px;align-items:center}.watch-autoplay span{display:none}#volume{width:45px}}
@media(max-width:650px){.watch-top{padding-top:calc(12px + env(safe-area-inset-top));padding-bottom:45px}.watch-private,.watch-back span,.watch-volume #volume{display:none}.watch-series{font-size:10px;letter-spacing:2px}.watch-bottom{padding-top:60px;padding-bottom:calc(13px + env(safe-area-inset-bottom))}.watch-toolbar{gap:5px;flex-wrap:wrap}.watch-button{width:44px;min-width:44px;height:44px;padding:7px}.watch-button svg{width:27px;height:27px}.watch-main svg{width:32px;height:32px}.watch-playback{gap:1px;flex:1}.watch-options{gap:0}.watch-autoplay{display:none}.watch-episode{width:40px;min-width:40px}.watch-heading{order:-1;flex-basis:100%;flex-direction:row;justify-content:flex-start;gap:9px;margin-bottom:5px}.watch-heading>span{font-size:12px}#player-dialog #player-title{font-size:11px}.watch-seek-row{gap:12px;margin-bottom:7px}#remaining-time{font-size:10px;min-width:42px}.watch-skip>span{top:16px}}
@media(max-height:500px) and (orientation:landscape){.watch-top{padding-top:8px;padding-bottom:32px}.watch-bottom{padding-top:40px;padding-bottom:8px}.watch-heading{order:initial;flex-basis:auto;margin:0}.watch-seek-row{margin-bottom:2px}.watch-autoplay{display:none}}
@media(prefers-reduced-motion:reduce){.watch-chrome,.watch-button{transition:none}.watch-spinner{animation:none}}
#watch-stage{position:absolute;inset:0;width:100%;height:100%;background:#000;overflow:hidden}
#watch-stage:fullscreen{width:100%;height:100%;background:#000}

@media(pointer:coarse){#seek{height:44px}}
