/* Grinders lesson player */
.pgv{position:absolute;inset:0;overflow:hidden;background:#000;color:#fff;font-family:Pretendard,'Noto Sans KR',system-ui,-apple-system,sans-serif;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;outline:none;border-radius:inherit;container-type:inline-size}
.pgv:focus-visible{box-shadow:inset 0 0 0 3px #41d29b}
.pgv-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.pgv[data-state="idle"] .pgv-video{object-fit:cover}
/* Before the first play the player paints the poster itself; the video may already be parked on the resume point. */
.pgv{background:#000 var(--pgv-poster,none) center/cover no-repeat}
.pgv[data-state="idle"] .pgv-video{opacity:0}
.pgv svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pgv button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pgv button:focus-visible{outline:2px solid #41d29b;outline-offset:2px;border-radius:10px}

/* scrim: keeps controls legible without darkening the whole lesson */
.pgv-scrim{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to top,#000000c4 0%,#00000066 18%,transparent 38%),linear-gradient(to bottom,#00000040,transparent 18%);opacity:0;transition:opacity .25s}
.pgv.ui .pgv-scrim,.pgv[data-state="paused"] .pgv-scrim,.pgv[data-state="ended"] .pgv-scrim{opacity:1}
.pgv[data-state="idle"] .pgv-scrim{opacity:1;background:linear-gradient(to top,#000000a6 0%,transparent 34%)}

/* start pill: sits under the poster title, aligned to its left edge */
.pgv-start{position:absolute;left:5.5%;bottom:7.5%;display:inline-flex;align-items:center;gap:12px;height:clamp(44px,8cqw,58px);padding:0 clamp(18px,2.6cqw,26px) 0 clamp(6px,1cqw,8px);border-radius:99px!important;background:#fffdf7!important;color:#111!important;
 box-shadow:0 1px 0 #ffffff inset,0 -2px 0 #0000001a inset,0 10px 28px #0008,0 2px 6px #0005;transition:transform .2s cubic-bezier(.2,1.6,.4,1),box-shadow .2s;z-index:4}
.pgv-start svg{width:clamp(30px,5.6cqw,42px);height:clamp(30px,5.6cqw,42px);padding:clamp(8px,1.4cqw,11px);border-radius:50%;background:#111;color:#fff;stroke:none}
.pgv-start span{font-size:clamp(15px,2.2cqw,18px);font-weight:850;letter-spacing:-.3px}
.pgv-start small{font-size:clamp(12px,1.7cqw,14px);font-weight:700;color:#00000080;font-variant-numeric:tabular-nums}
.pgv-start small:empty{display:none}
.pgv-start:hover{transform:translateY(-2px);box-shadow:0 1px 0 #fff inset,0 -2px 0 #0000001a inset,0 16px 34px #0009,0 2px 6px #0005}
.pgv-start:active{transform:translateY(1px) scale(.97);box-shadow:0 1px 0 #fff inset,0 4px 12px #0007;transition-duration:.06s}
.pgv:not([data-state="idle"]) .pgv-start{display:none}

/* loading */
.pgv-spinner{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px;border-radius:50%;border:3px solid #ffffff30;border-top-color:#fff;opacity:0;pointer-events:none;transition:opacity .2s;animation:pgv-spin .8s linear infinite}
.pgv.loading:not([data-state="idle"]) .pgv-spinner,.pgv.starting.loading .pgv-spinner{opacity:1}
.pgv.starting.loading .pgv-start{opacity:0;pointer-events:none}
@keyframes pgv-spin{to{transform:rotate(360deg)}}
/* slow network / offline: one calm line under the spinner */
.pgv-net{position:absolute;left:50%;top:calc(50% + 34px);transform:translateX(-50%);max-width:86%;padding:7px 13px;border-radius:99px;background:#000000b8;font-size:13px;font-weight:750;line-height:1.35;text-align:center;opacity:0;pointer-events:none;transition:opacity .25s}
.pgv.slow:not([data-state="idle"]) .pgv-net,.pgv.starting.slow .pgv-net,.pgv.offline .pgv-net{opacity:1}
.pgv.offline .pgv-spinner{opacity:1}
/* small players: the line sits at the top so it never covers the seek bar */
@container (max-width:560px){.pgv-net{top:10px;font-size:12px;padding:6px 11px}}

/* tap feedback */
.pgv-flash{position:absolute;left:50%;top:50%;width:76px;height:76px;margin:-38px;border-radius:50%;display:grid;place-items:center;background:#000000a6;opacity:0;pointer-events:none}
.pgv-flash svg{width:34px;height:34px}
.pgv-flash.go{animation:pgv-flash .55s ease-out}
@keyframes pgv-flash{0%{opacity:1;transform:scale(.8)}100%{opacity:0;transform:scale(1.25)}}
.pgv-fx{position:absolute;top:0;bottom:0;width:38%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;opacity:0;pointer-events:none;font-size:13px;font-weight:800}
.pgv-fx svg{width:34px;height:34px}
.pgv-fx.left{left:0;border-radius:0 50% 50% 0/0 50% 50% 0;background:radial-gradient(circle at 0 50%,#ffffff26,transparent 70%)}
.pgv-fx.right{right:0;border-radius:50% 0 0 50%/50% 0 0 50%;background:radial-gradient(circle at 100% 50%,#ffffff26,transparent 70%)}
.pgv-fx.go{animation:pgv-fx .6s ease-out}
@keyframes pgv-fx{0%{opacity:0}25%{opacity:1}100%{opacity:0}}
.pgv-toast{position:absolute;left:50%;top:14%;transform:translateX(-50%);padding:8px 14px;border-radius:99px;background:#000000cc;font-size:14px;font-weight:800;opacity:0;pointer-events:none;transition:opacity .2s}
.pgv-toast.show{opacity:1}

/* control bar */
.pgv-bar{position:absolute;left:0;right:0;bottom:0;padding:0 clamp(10px,2cqw,18px) clamp(6px,1.4cqw,12px);opacity:0;transform:translateY(8px);transition:opacity .25s,transform .25s;z-index:3}
.pgv.ui .pgv-bar,.pgv[data-state="paused"] .pgv-bar,.pgv[data-state="ended"] .pgv-bar,.pgv.menu-open .pgv-bar{opacity:1;transform:none}
.pgv[data-state="idle"] .pgv-bar{opacity:0;pointer-events:none}
.pgv:not(.ui)[data-state="playing"]{cursor:none}
.pgv-seek{position:relative;height:22px;margin:0 4px;cursor:pointer;touch-action:pan-y;touch-action:pan-y pinch-zoom}
.pgv-seek::before,.pgv-buffered,.pgv-played{content:'';position:absolute;left:0;top:50%;height:4px;margin-top:-2px;border-radius:99px;transition:height .15s,margin .15s}
.pgv-seek::before{right:0;background:#ffffff33}
.pgv-buffered{background:#ffffff59;width:0}
.pgv-played{background:#41d29b;width:0}
.pgv-knob{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:#fff;box-shadow:0 2px 6px #0007;transform:scale(0);transition:transform .15s}
.pgv-seek:hover::before,.pgv-seek:hover .pgv-buffered,.pgv-seek:hover .pgv-played,.pgv-seek.drag::before,.pgv-seek.drag .pgv-buffered,.pgv-seek.drag .pgv-played{height:6px;margin-top:-3px}
.pgv-seek:hover .pgv-knob,.pgv-seek.drag .pgv-knob,.pgv-seek:focus-visible .pgv-knob{transform:scale(1)}
.pgv-seek.drag .pgv-knob{transform:scale(1.25)}
.pgv-hover{position:absolute;bottom:22px;transform:translateX(-50%);padding:4px 8px;border-radius:7px;background:#000000cc;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums;opacity:0;pointer-events:none;transition:opacity .15s;white-space:nowrap}
.pgv-seek:hover .pgv-hover,.pgv-seek.drag .pgv-hover{opacity:1}
@media(hover:none){.pgv-knob{transform:scale(1)}.pgv-hover{display:none}.pgv-seek.drag .pgv-hover{display:block}}
.pgv-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pgv-left,.pgv-right{display:flex;align-items:center;gap:2px;min-width:0}
.pgv-btn{display:grid;place-items:center;min-width:42px;height:42px;padding:0 6px;border-radius:12px;transition:background .15s,transform .2s cubic-bezier(.2,1.6,.4,1)}
.pgv-btn:hover{background:#ffffff1f}
.pgv-btn:active{transform:scale(.9);transition-duration:.06s;background:#ffffff2b}
.pgv-btn.play svg{width:26px;height:26px}
.pgv-btn.back svg,.pgv-btn.fwd svg{width:24px;height:24px;stroke-width:1.9}
.pgv-rate{font-size:14px;font-weight:850;font-variant-numeric:tabular-nums;min-width:48px}
.pgv-time{padding:0 8px;font-size:13.5px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:#ffffffe6}
.pgv-time i{font-style:normal;color:#ffffff80;margin:0 2px}
.pgv-vol{display:flex;align-items:center}
.pgv-volrange{width:0;opacity:0;margin:0;accent-color:#fff;transition:width .2s,opacity .2s;cursor:pointer}
.pgv-vol:hover .pgv-volrange,.pgv-volrange:focus-visible{width:80px;opacity:1;margin-right:6px}
@media(hover:none){.pgv-vol{display:none}}

/* menus */
.pgv-menu{position:absolute;right:clamp(10px,2cqw,18px);bottom:64px;z-index:5;min-width:180px;max-height:70%;overflow:auto;padding:6px;border-radius:16px;background:#141619;box-shadow:0 16px 40px #000a,inset 0 0 0 1px #ffffff14;animation:pgv-pop .18s cubic-bezier(.2,1.4,.4,1)}
@keyframes pgv-pop{from{opacity:0;transform:translateY(6px) scale(.97)}}
.pgv-menu-title{margin:6px 10px 6px;font-size:12px;font-weight:800;color:#ffffff8c}
.pgv-item{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:42px;padding:0 12px;border-radius:10px;font-size:14.5px;font-weight:700;text-align:left}
.pgv-item:hover{background:#ffffff14}.pgv-item.on{color:#41d29b}
.pgv-item:active{transform:scale(.98)}

/* end card */
.pgv-end{position:absolute;inset:0;z-index:4;display:grid;place-items:center;padding:16px;background:#000000d9;animation:pgv-fade .3s ease-out}
@keyframes pgv-fade{from{opacity:0}}
.pgv-end-card{display:grid;gap:12px;width:min(440px,100%);text-align:center;animation:pgv-pop .35s cubic-bezier(.2,1.3,.4,1)}
.pgv-end-kicker{margin:0;font-size:13px;font-weight:800;color:#41d29b}
.pgv-end-next{display:flex;align-items:center;gap:14px;padding:12px 16px 12px 12px;border-radius:18px;background:#fffdf7!important;color:#111!important;text-align:left;box-shadow:0 14px 34px #0009;transition:transform .2s cubic-bezier(.2,1.6,.4,1)}
.pgv-end-next:hover{transform:translateY(-2px)}.pgv-end-next:active{transform:scale(.98);transition-duration:.06s}
.pgv-ring{position:relative;flex:none;width:44px;height:44px;display:grid;place-items:center}
.pgv-ring svg{position:absolute;inset:0;width:44px;height:44px;transform:rotate(-90deg)}
.pgv-ring circle{fill:none;stroke-width:3.5}.pgv-ring .t{stroke:#0000001a}
.pgv-ring .f{stroke:#111;stroke-linecap:round;stroke-dasharray:119.4;stroke-dashoffset:0;animation:pgv-count linear forwards}
.pgv-ring.stopped .f{animation-play-state:paused}
.pgv-ring b{font-size:15px;font-weight:900}
@keyframes pgv-count{to{stroke-dashoffset:119.4}}
.pgv-end-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.pgv-end-copy small{font-size:12px;font-weight:800;color:#0000008c}
.pgv-end-copy strong{font-size:15.5px;font-weight:850;line-height:1.35;word-break:keep-all}
.pgv-end-stay{justify-self:center;font-size:13px!important;font-weight:700;color:#ffffffb3!important;padding:6px 10px!important}
.pgv-end-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.pgv-end-practice,.pgv-end-replay{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:99px;background:#ffffff1f!important;box-shadow:inset 0 0 0 1px #ffffff2e;font-weight:800;font-size:14px;transition:transform .2s cubic-bezier(.2,1.6,.4,1),background .15s}
.pgv-end-practice{background:#41d29b!important;color:#0b1a14!important;box-shadow:none}
.pgv-end-practice:active,.pgv-end-replay:active{transform:scale(.96);transition-duration:.06s}
.pgv-end-replay svg{width:18px;height:18px}

/* compact widths */
@container (max-width:520px){.pgv-btn.back,.pgv-btn.fwd,.pgv-btn.pip{display:none}.pgv-time{font-size:12.5px;padding:0 4px}.pgv-btn{min-width:38px;height:38px}.pgv-rate{min-width:42px;font-size:13px}.pgv-end-card{gap:8px}.pgv-end-next{padding:10px 12px 10px 10px}}
.pgv.fs .pgv-video{object-fit:contain}
@media(prefers-reduced-motion:reduce){.pgv *{animation:none!important;transition:none!important}}
/* narrow players: the title fills the poster, so start becomes a round button bottom-right */
@container (max-width:560px){
 .pgv-start{left:auto;right:4.5%;bottom:7%;height:auto;padding:0;gap:0;border-radius:50%!important;background:transparent!important;box-shadow:none}
 .pgv-start svg{width:52px;height:52px;padding:15px 14px 15px 17px;background:#fffdf7;color:#111;fill:#111;box-shadow:0 8px 22px #0009,0 -2px 0 #0000001a inset}
 .pgv-start svg path{fill:#111}
 .pgv-start span,.pgv-start small{display:none}
 .pgv-start:active{transform:scale(.92)}
}

/* Smoothness (2026-11): overlays sit on top of moving video, so no backdrop blur (it re-blurs every frame on phones).
   The video gets its own compositor layer; control bar paints are isolated from the page. */
.pgv-video{transform:translateZ(0)}
.pgv{contain:layout paint;isolation:isolate}

