/* V23 — cinema-first video surface: the controls belong ON the picture, not under it. */
.v23-video-surface{display:contents}
#v23CenterPlay{display:none}
#playerModal[data-v21-video="true"]{background:#000;isolation:isolate}
#playerModal[data-v21-video="true"] .v23-video-surface{
 position:relative;display:block;flex:1 1 auto;min-height:0;width:100%;height:100%;overflow:hidden;
 background:#000;isolation:isolate;
}
#playerModal[data-v21-video="true"] .player-stage{
 position:absolute;inset:0;width:100%;height:100%;min-height:0!important;max-height:none!important;
 display:block;background:#000;
}
#playerModal[data-v21-video="true"] .player-stage video{
 position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;background:#000;
}
/* The top navigation is a light overlay in theater mode, not an extra layout row. */
#playerModal[data-v21-video="true"] .player-header{
 position:absolute;top:0;left:0;right:0;z-index:21;min-height:0;height:auto;
 padding:calc(12px + env(safe-area-inset-top,0px)) clamp(16px,2.6vw,35px) 45px;
 background:linear-gradient(180deg,#000e 0%,#0009 48%,transparent 100%);
 border:0;box-shadow:none;pointer-events:none;transition:opacity .22s ease;
}
#playerModal[data-v21-video="true"] .player-header>*{pointer-events:auto}
#playerModal[data-v21-video="true"] .player-header .player-brand{font-weight:800;font-size:clamp(13px,1.5vw,18px);letter-spacing:.05em}
#playerModal[data-v21-video="true"] .player-header .player-logo-image{width:22px;height:33px;object-fit:contain}
#playerModal[data-v21-video="true"] .player-header .player-state{font-size:10px;letter-spacing:.11em;background:#08080b95;border:1px solid #fff3}
#playerModal[data-v21-video="true"] .player-header .player-back{font-size:13px;color:#fff}
#playerModal[data-v21-video="true"]:not(.v22-episode-ended) .player-bottom{display:none!important}
/* The menu floats above the progress bar. A full screen request targets ONLY this surface. */
#playerModal[data-v21-video="true"] .player-chrome{
 position:absolute;inset:auto 0 0;z-index:20;width:100%;max-width:100%;flex:none;
 box-sizing:border-box;background:linear-gradient(180deg,transparent 0%,#0006 20%,#000e 100%);
 border:0;box-shadow:none;padding:48px clamp(16px,2.7vw,44px) calc(13px + env(safe-area-inset-bottom,0px));
 gap:12px;transition:opacity .22s ease,transform .22s ease;overflow:visible;
}
#playerModal[data-v21-video="true"] .player-progress-line{display:flex;gap:15px;align-items:center;min-height:25px}
#playerModal[data-v21-video="true"] .player-progress-line input{
 accent-color:#e73755;height:18px;min-width:0;cursor:pointer;margin:0;touch-action:none;
}
#playerModal[data-v21-video="true"] .player-time{font-size:12px;color:#fff;min-width:104px;text-align:right;letter-spacing:.02em;text-shadow:0 1px 5px #000}
#playerModal[data-v21-video="true"] .player-control-row{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(60px,1fr) minmax(0,1fr);
 align-items:center;gap:16px;min-height:40px;
}
#playerModal[data-v21-video="true"] .player-control-group{display:flex;align-items:center;gap:clamp(3px,.8vw,14px);flex-wrap:nowrap;min-width:0}
#playerModal[data-v21-video="true"] .v23-left-controls{justify-content:flex-start}
#playerModal[data-v21-video="true"] .player-right-controls{justify-content:flex-end;margin-left:0}
#playerModal[data-v21-video="true"] #playerSceneTitle{
 display:block;max-width:100%;min-width:0;color:#fff;white-space:nowrap;overflow:hidden;
 text-overflow:ellipsis;text-align:center;letter-spacing:.01em;font-size:clamp(11px,1.05vw,16px);font-weight:700;text-shadow:0 1px 6px #000;
}
#playerModal[data-v21-video="true"] .player-control,
#playerModal[data-v21-video="true"] .v23-icon-control{
 min-width:36px;min-height:36px;width:38px;height:38px;padding:7px;
 background:transparent;border:1px solid transparent;border-radius:8px;color:#fff;
 box-shadow:none;display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;
 transition:background .15s ease,transform .15s ease;
}
#playerModal[data-v21-video="true"] .player-control.primary{background:transparent;border-color:transparent;font-size:30px;min-width:42px;width:42px}
#playerModal[data-v21-video="true"] .player-control:hover:not(:disabled),
#playerModal[data-v21-video="true"] .v23-icon-control:hover:not(:disabled){background:#ffffff30;transform:none}
#playerModal[data-v21-video="true"] .player-control svg,
#playerModal[data-v21-video="true"] .v23-icon-control svg{width:25px;height:25px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;fill:none}
#playerModal[data-v21-video="true"] #playerRewind svg,
#playerModal[data-v21-video="true"] #playerForward svg{width:29px;height:29px}
#playerModal[data-v21-video="true"] #playerRewind small,
#playerModal[data-v21-video="true"] #playerForward small{position:absolute;left:50%;top:50%;transform:translate(-50%,-25%);font:700 9px/1 ui-sans-serif,system-ui;pointer-events:none}
#playerModal[data-v21-video="true"] #playerRestart{display:none}
#playerModal[data-v21-video="true"] .volume-control{display:flex;gap:3px;align-items:center;color:#fff}
#playerModal[data-v21-video="true"] .volume-control input{width:64px;accent-color:#e73755}
#playerModal[data-v21-video="true"] .v23-icon-control:disabled{opacity:.37;cursor:not-allowed}
#playerModal[data-v21-video="true"] .player-audio-status,#playerModal[data-v21-video="true"] .v14-stream-status{display:none!important}
/* Gear opens a real compact settings sheet, using existing working language/quality/speed selects. */
#playerModal .v23-settings-panel{display:none}
#playerModal[data-v21-video="true"] .v23-settings-panel:not([hidden]){
 display:flex;position:absolute;right:clamp(16px,2.7vw,44px);bottom:calc(100% - 34px);
 z-index:28;flex-direction:column;gap:13px;min-width:min(290px,calc(100vw - 32px));
 max-width:calc(100vw - 32px);max-height:min(410px,70dvh);overflow-y:auto;
 padding:18px;border:1px solid #ffffff3a;border-radius:13px;background:#151319f5;
 backdrop-filter:blur(20px);box-shadow:0 12px 48px #000c;
}
#playerModal .v23-settings-title{display:flex;justify-content:space-between;gap:8px;align-items:center;color:#fff;font-size:14px;font-weight:800}
#playerModal .v23-settings-title button{background:transparent;border:0;color:#eee;font-size:17px;padding:5px;cursor:pointer}
#playerModal[data-v21-video="true"] .v23-settings-panel .audio-player-select{display:flex;flex-direction:column;align-items:stretch;gap:6px;font-size:12px}
#playerModal[data-v21-video="true"] .v23-settings-panel .audio-player-select[hidden]{display:none!important}
#playerModal[data-v21-video="true"] .v23-settings-panel .audio-player-select span{display:block;color:#dad3d9}
#playerModal[data-v21-video="true"] .v23-settings-panel .audio-player-select select{
 width:100%;max-width:none;min-height:40px;padding:8px 9px;background:#232027;border:1px solid #ffffff44;color:#fff;font-size:13px;
}
#playerModal[data-v21-video="true"] .v23-settings-panel #v21SpeedSelect{width:100%;max-width:none}
#playerModal[data-v21-video="true"] .v23-settings-panel #narrationToggle{display:none}
/* Central control appears only while paused; loading overlay always wins. */
#playerModal[data-v21-video="true"] #v23CenterPlay:not([hidden]){
 display:flex;align-items:center;justify-content:center;position:absolute;z-index:14;
 top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;border:1px solid #ffffff55;
 width:clamp(68px,8vw,95px);height:clamp(68px,8vw,95px);padding:20px;
 color:#fff;background:#060507b0;box-shadow:0 8px 35px #0009;cursor:pointer;
}
#playerModal[data-v21-video="true"] #v23CenterPlay svg{width:58%;height:58%}
#playerModal[data-v21-video="true"] #v23CenterPlay:focus-visible,
#playerModal[data-v21-video="true"] .player-control:focus-visible,
#playerModal[data-v21-video="true"] .v23-icon-control:focus-visible{outline:2px solid #fff;outline-offset:3px}
#playerModal[data-v21-video="true"] .player-pause-indicator{display:none!important}
#playerModal[data-v21-video="true"] .scene-watermark{opacity:.52}
#playerModal[data-v21-video="true"].player-idle-chrome:not(.v23-settings-open) .player-chrome,
#playerModal[data-v21-video="true"].player-idle-chrome:not(.v23-settings-open) .player-header{opacity:0;pointer-events:none;transform:none}
#playerModal[data-v21-video="true"].player-idle-chrome:not(.v23-settings-open) .player-chrome:focus-within,
#playerModal[data-v21-video="true"].player-idle-chrome:not(.v23-settings-open) .player-chrome:hover{opacity:1;pointer-events:auto}
#playerModal[data-v21-video="true"] .v21-buffer-overlay{z-index:18}
#v23VideoSurface:fullscreen{position:fixed;width:100vw;height:100dvh;max-height:100dvh;background:#000;inset:0}
#v23VideoSurface:fullscreen .player-stage{height:100%!important;max-height:none!important;min-height:0!important}
#v23VideoSurface:fullscreen #sceneVideo{height:100%;width:100%;object-fit:contain}
/* When choices replace the video, release the whole surface so the poll can fill the screen. */
#playerModal.v22-episode-ended .v23-video-surface{display:none!important}
#playerModal.v22-episode-ended .player-header{position:relative;top:auto;left:auto;right:auto;pointer-events:auto}
#playerModal.v22-episode-ended .player-header>*{pointer-events:auto}
@media(max-width:850px){
 #playerModal[data-v21-video="true"] .player-chrome{padding:40px 12px calc(10px + env(safe-area-inset-bottom,0px));gap:7px}
 #playerModal[data-v21-video="true"] .player-control-row{gap:5px;grid-template-columns:minmax(0,1fr) minmax(0,.75fr) minmax(0,1fr)}
 #playerModal[data-v21-video="true"] .player-control-group{gap:2px}
 #playerModal[data-v21-video="true"] .player-control,#playerModal[data-v21-video="true"] .v23-icon-control{width:36px;height:36px;min-width:34px;min-height:34px;padding:6px}
 #playerModal[data-v21-video="true"] .player-control.primary{width:38px;min-width:38px}
 #playerModal[data-v21-video="true"] .volume-control input{display:none}
 #playerModal[data-v21-video="true"] .player-time{min-width:90px;font-size:11px}
 #playerModal[data-v21-video="true"] .player-header .player-brand{font-size:12px}
}
@media(max-width:520px){
 #playerModal[data-v21-video="true"] .player-chrome{padding:34px 8px calc(10px + env(safe-area-inset-bottom,0px));gap:5px}
 #playerModal[data-v21-video="true"] .player-control-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:3px}
 #playerModal[data-v21-video="true"] #playerSceneTitle{display:none}
 #playerModal[data-v21-video="true"] .player-control,#playerModal[data-v21-video="true"] .v23-icon-control{min-width:29px;min-height:32px;width:31px;height:32px;padding:4px}
 #playerModal[data-v21-video="true"] .player-control.primary{min-width:32px;width:32px;font-size:23px}
 #playerModal[data-v21-video="true"] .player-control svg,#playerModal[data-v21-video="true"] .v23-icon-control svg{width:22px;height:22px}
 #playerModal[data-v21-video="true"] .player-progress-line{gap:7px}
 #playerModal[data-v21-video="true"] .player-time{font-size:10px;min-width:89px}
 #playerModal[data-v21-video="true"] .player-header{padding:calc(7px + env(safe-area-inset-top,0px)) 10px 35px}
 #playerModal[data-v21-video="true"] .player-header .player-brand{display:none}
 #playerModal[data-v21-video="true"] .player-header .player-state{font-size:9px}
 #playerModal[data-v21-video="true"] .v23-settings-panel:not([hidden]){right:8px;bottom:calc(100% - 12px);max-height:55dvh}
}
@media(max-width:345px){#playerModal[data-v21-video="true"] .volume-control{display:none}}
@media(prefers-reduced-motion:reduce){#playerModal[data-v21-video="true"] .player-chrome,#playerModal[data-v21-video="true"] .player-header{transition:none}}
/* Story/animation episodes still use the legacy control layout and can open settings. */
#playerModal:not([data-v21-video="true"]) .v23-settings-panel:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:10px;background:#141017;border:1px solid #5b3b48;border-radius:9px}
#playerModal:not([data-v21-video="true"]) .v23-settings-panel .audio-player-select{display:flex}
#playerModal:not([data-v21-video="true"]) .v23-settings-panel .audio-player-select[hidden]{display:none!important}
#playerModal:not([data-v21-video="true"]) .v23-settings-title{display:flex;align-items:center;gap:10px}
#playerModal:not([data-v21-video="true"]) .v23-icon-control{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:4px;color:#eee;background:#201a20;border:1px solid #5e4650;border-radius:8px}
#playerModal:not([data-v21-video="true"]) .v23-icon-control svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;fill:none}
#playerModal:not([data-v21-video="true"]) .player-control svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.6;fill:none}
