/* PSY accessible, always-visible controls. Scoped to lesson page only. */
.psy-video-player{width:100%;margin:19px 0 14px;border-radius:14px;overflow:hidden;background:#09251e;box-shadow:0 1px 0 rgba(0,0,0,.1)}
.psy-video-player .psy-video-stage{margin:0;aspect-ratio:16/9;border-radius:0;min-height:0;cursor:pointer;outline-offset:-3px}
.psy-video-stage:focus-visible{outline:3px solid #8de0b8}
.psy-video-stage video{width:100%;height:100%;display:block;object-fit:contain;background:#08211b}
.psy-video-controls{display:flex;flex-direction:column;gap:4px;padding:9px 14px 11px;color:#f5fff9;background:#163d33;border-top:1px solid rgba(255,255,255,.08);font-family:inherit}
.psy-video-progress{padding:4px 2px 6px;min-height:21px;display:flex;align-items:center}
.psy-video-controls input[type=range]{appearance:none;-webkit-appearance:none;border:0;outline-offset:4px;cursor:pointer;padding:0;background:transparent;min-width:0}
.psy-video-progress input{width:100%;height:20px;--psy-progress:0%}
.psy-video-progress input::-webkit-slider-runnable-track{height:5px;border-radius:9px;background:linear-gradient(90deg,#65d7a1 var(--psy-progress),#6b8179 var(--psy-progress));border:0}
.psy-video-progress input::-moz-range-track{height:5px;background:#6b8179;border-radius:9px;border:0}
.psy-video-progress input::-moz-range-progress{height:5px;background:#65d7a1;border-radius:9px}
.psy-video-controls input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:15px;height:15px;border-radius:50%;border:2px solid #fff;background:#229367;margin-top:-5px;box-shadow:0 1px 3px #0008}
.psy-video-controls input[type=range]::-moz-range-thumb{width:11px;height:11px;border:2px solid #fff;border-radius:50%;background:#229367;box-shadow:0 1px 3px #0008}
.psy-video-controls input[type=range]:disabled{opacity:.55;cursor:default}
.psy-video-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:46px}
.psy-video-iconbutton{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;border-radius:8px;border:1px solid transparent;background:transparent;color:#f5fff9;font-size:20px;font-weight:500;line-height:1;font-family:inherit;cursor:pointer;white-space:nowrap}
.psy-video-iconbutton:hover,.psy-video-iconbutton:focus-visible{background:#235344;border-color:#618b77}
.psy-video-iconbutton:focus-visible,.psy-video-controls select:focus-visible{outline:2px solid #8de0b8;outline-offset:2px}
.psy-video-play{background:#127153;border-color:#3b9975}
.psy-video-play:hover{background:#19875f}
.psy-video-iconbutton small{font-size:9px;font-weight:900;position:absolute;bottom:8px;left:50%;transform:translateX(-50%)}
.psy-video-time{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;color:#e4f5ec;padding:0 4px}
.psy-video-slash{opacity:.65}
.psy-video-spacer{flex:1;min-width:4px}
.psy-video-volume{width:70px;height:24px}
.psy-video-volume::-webkit-slider-runnable-track{height:7px;background:#aac9b9;border-radius:9px}
.psy-video-volume::-moz-range-track{height:7px;background:#aac9b9;border-radius:9px}
.psy-video-volume::-webkit-slider-thumb{margin-top:-7px}
.psy-video-speed-label{font-size:13px;white-space:nowrap;color:#d7e9df}
.psy-video-controls select{min-width:70px;min-height:38px;padding:5px 7px;border-radius:7px;background:#214d40;color:#fff;border:1px solid #688c7d;font-weight:600;font-size:14px;font-family:inherit;cursor:pointer}
.psy-video-controls button{font-family:inherit}
.psy-video-player:fullscreen,.psy-video-player:-webkit-full-screen{width:100%;height:100%;margin:0;border-radius:0;background:#071813;display:flex;flex-direction:column}
.psy-video-player:fullscreen .psy-video-stage,.psy-video-player:-webkit-full-screen .psy-video-stage{flex:1 1 auto;min-height:0;aspect-ratio:auto;max-height:none;position:relative;display:block;overflow:hidden}
.psy-video-player:fullscreen .psy-video-stage video,.psy-video-player:-webkit-full-screen .psy-video-stage video{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.psy-video-player:fullscreen .psy-video-controls,.psy-video-player:-webkit-full-screen .psy-video-controls{flex:0 0 auto;padding-bottom:max(12px,env(safe-area-inset-bottom));width:100%}
@media(max-width:640px){.psy-video-controls{padding:8px 10px 10px}.psy-video-toolbar{gap:3px}.psy-video-iconbutton{min-width:40px;min-height:40px}.psy-video-time{font-size:12px}.psy-video-speed-label{display:none}.psy-video-volume{width:48px}.psy-video-controls select{min-width:55px}.psy-video-player .psy-video-stage{aspect-ratio:var(--psy-video-ratio,16/9)}}
@media(max-width:410px){.psy-video-toolbar{gap:2px}.psy-video-volume{display:none}.psy-video-iconbutton{min-width:38px}.psy-video-controls select{min-width:54px}}

/* Native Safari video fullscreen uses the browser's decoder/compositor directly.
   For the standard container fullscreen, keep the portrait video letterboxed. */
.psy-video-player:fullscreen .psy-video-stage,.psy-video-player:-webkit-full-screen .psy-video-stage{width:100%;height:auto;overflow:hidden}
.psy-video-player:fullscreen .psy-video-stage video,.psy-video-player:-webkit-full-screen .psy-video-stage video{background:#071813}

/* PSY 2.5: retain established wide stage regardless of source orientation.
   Native Safari video fullscreen (already confirmed working) is unaffected. */

/* Shared toolbar layout, including HLS quality controls. */
.psy-video-player .psy-video-toolbar{flex-wrap:nowrap;gap:4px;min-width:0;}
.psy-video-player .psy-video-spacer{flex:1 1 auto;min-width:0;}
.psy-video-player .psy-video-toolbar .psy-video-iconbutton{min-width:40px;min-height:40px;font-size:19px;flex:0 0 auto;}
.psy-video-player .psy-video-toolbar .psy-video-volume{flex:0 1 48px;width:48px;min-width:22px;}
.psy-video-player .psy-video-toolbar .psy-video-time{flex:0 0 auto;font-size:12px;padding:0 2px;}
.psy-video-player .psy-video-toolbar .psy-video-speed-label,
.psy-video-player .psy-video-toolbar .psy-video-quality-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.psy-video-player .psy-video-toolbar select[data-psy-speed]{flex:0 0 61px;width:61px;min-width:61px;max-width:61px;min-height:38px;padding:4px 3px;font-size:12px;}
.psy-video-player .psy-video-toolbar select[data-psy-quality]{flex:0 0 86px;width:86px;min-width:86px;max-width:86px;min-height:38px;padding:4px 3px;font-size:12px;}
@media(max-width:560px){
  .psy-video-player .psy-video-toolbar{flex-wrap:wrap;gap:4px;}
  .psy-video-player .psy-video-toolbar .psy-video-volume{display:none;}
  .psy-video-player .psy-video-toolbar .psy-video-iconbutton{min-width:44px;min-height:44px;}
  .psy-video-player .psy-video-toolbar .psy-video-spacer{display:none;}
  .psy-video-player .psy-video-toolbar .psy-video-time{margin-left:auto;font-size:12px;}
  .psy-video-player .psy-video-toolbar select{min-height:44px;}
}


/* Audio uses the same PSY controls with a calm artwork stage. */
.psy-audio-player .psy-video-stage{position:relative;display:grid;place-items:center;cursor:pointer;background:linear-gradient(135deg,#0b3027,#1f6651)}
.psy-audio-player .psy-video-stage audio{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.psy-audio-art{display:grid;justify-items:center;gap:8px;padding:28px;text-align:center;color:#f5fff9;max-width:90%}
.psy-audio-art strong{font-size:clamp(18px,3vw,28px);line-height:1.25;overflow-wrap:anywhere}
.psy-audio-art>span:last-child{font-size:13px;color:#bfe4d2;letter-spacing:.08em;text-transform:uppercase}
.psy-audio-disc{display:grid;place-items:center;width:78px;height:78px;border-radius:50%;background:#eaf8f0;color:#126a50;font-size:38px;box-shadow:0 14px 35px rgba(0,0,0,.18)}
