/* Pose viewer (2026-10-19): the clip frame by frame with the skeleton and the measured angles */
.pose-viewer{ position:fixed; inset:0; z-index:410; background:#08080a; display:flex; flex-direction:column; align-items:center; padding:max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); gap:10px; }
.pose-viewer .pv-close{ align-self:flex-end; width:38px; height:38px; border-radius:50%; border:0; background:rgba(255,255,255,.1); color:#fff; font-size:15px; cursor:pointer; }
.pose-viewer .pv-canvas{ flex:0 1 auto; min-height:0; width:100%; max-width:560px; height:auto; max-height:calc(100dvh - 270px); object-fit:contain; border-radius:14px; margin:auto 0; }
.pose-viewer .pv-info{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; min-height:30px; }
.pose-viewer .pv-info span{ padding:6px 11px; border-radius:999px; background:rgba(255,255,255,.09); color:#e9e6df; font:600 12.5px var(--font-ui, system-ui); }
.pose-viewer .pv-info b{ color:#F4B04A; font-weight:800; }
.pose-viewer .pv-bar{ display:flex; align-items:center; gap:12px; width:100%; max-width:420px; }
.pose-viewer .pv-play{ flex:none; width:42px; height:42px; border-radius:50%; border:0; background:#F4B04A; cursor:pointer; position:relative; }
.pose-viewer .pv-play::before{ content:''; position:absolute; left:15px; top:12px; width:5px; height:18px; background:#1a1408; box-shadow:9px 0 0 #1a1408; border-radius:1px; }
.pose-viewer .pv-play.paused::before{ left:16px; top:12px; width:0; height:0; background:none; box-shadow:none; border-left:14px solid #1a1408; border-top:9px solid transparent; border-bottom:9px solid transparent; border-radius:0; }
.pose-viewer .pv-range{ flex:1; accent-color:#F4B04A; }
.pose-viewer .pv-note{ max-width:420px; text-align:center; color:#bdb9ae; font:500 12px/1.45 var(--font-ui, system-ui); }
.msg-video-wrap .msg-video-badge{ z-index:2; }
.msg-video-wrap, .msg-video-wrap .msg-video-badge, .msg-pose-hint{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
/* a clip that was not analysed (or whose analysis was refused) still plays full screen on tap, while this visit lasts */
.clip-player{ position:fixed; inset:0; z-index:420; background:#000; display:flex; align-items:center; justify-content:center; padding:max(14px, env(safe-area-inset-top)) 0 max(14px, env(safe-area-inset-bottom)); }
.clip-player video{ width:100%; max-height:100%; object-fit:contain; background:#000; }
.clip-player .clip-close{ position:absolute; top:max(12px, env(safe-area-inset-top)); right:12px; z-index:2; width:40px; height:40px; border-radius:50%; border:0; background:rgba(255,255,255,.16); color:#fff; font-size:15px; cursor:pointer; }
.msg-pose-hint{ position:absolute; right:10px; bottom:10px; padding:6px 11px; border-radius:999px; background:#F4B04A; color:#1a1408; font:800 12px var(--font-ui, system-ui); }
/* 2026-10-27: the live player - the real clip, with the points drawn on it as it plays */
.pose-viewer .pv-stage{ --ar:.5625; position:relative; flex:0 1 auto; width:min(100%, 560px, calc((100dvh - 290px) * var(--ar))); aspect-ratio:var(--ar); margin:auto 0; border-radius:14px; overflow:hidden; background:#000; }
.pose-viewer .pv-video, .pose-viewer .pv-over{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.pose-viewer .pv-video{ object-fit:fill; }
.pose-viewer .pv-over{ pointer-events:none; }
.pose-viewer .pv-speed{ flex:none; min-width:46px; height:34px; padding:0 10px; border-radius:17px; border:1px solid rgba(255,255,255,.22); background:transparent; color:#e9e6df; font:700 12.5px var(--font-ui, system-ui); cursor:pointer; }

/* the movement is read right on the clip's cover, inside the chat bubble, after sending */
.msg-video-wrap.scanning .msg-video-badge, .msg-video-wrap.scanning .msg-pose-hint{ display:none; }
.msg-scan{ position:absolute; inset:0; border-radius:12px; overflow:hidden; transition:opacity .3s ease; }
.msg-scan.out{ opacity:0; }
.msg-scan .sfx{ position:absolute; inset:0; width:100%; height:100%; border-radius:0; }
.msg-scan-hud{ position:absolute; left:0; right:0; bottom:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:26px 12px 11px; background:linear-gradient(to top, rgba(6,8,12,.82), rgba(6,8,12,0)); pointer-events:none; }
.msg-scan-status{ min-width:0; font:600 12px/1.35 var(--font-ui, system-ui); color:#f2f4f7; }
.msg-scan-skip{ flex:none; pointer-events:auto; padding:5px 11px; border-radius:999px; border:1px solid rgba(255,255,255,.4); background:rgba(6,8,12,.5); color:#fff; font:700 12px var(--font-ui, system-ui); cursor:pointer; }

/* preparing the clip (before it can be sent) */
.ap-prep{ flex:none; width:52px; height:52px; border-radius:var(--r-sm, 8px); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; }
.ap-spin{ width:22px; height:22px; border-radius:50%; border:2.5px solid var(--line-strong, var(--line)); border-top-color:var(--gold); animation:apSpin .8s linear infinite; }
@keyframes apSpin{ to{ transform:rotate(360deg); } }
body.attach-busy #sendBtn{ opacity:.45; cursor:not-allowed; }
/* video preview: the person says what the video is for (technique, or just show it) */
#attachPreview .ap-info-wrap{ white-space:normal; overflow:visible; text-overflow:clip; display:flex; flex-direction:column; gap:8px; }
.ap-intent{ display:flex; gap:6px; flex-wrap:wrap; }
.ap-intent button{ padding:6px 11px; min-height:32px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--text); font:700 12px var(--font-ui, 'Manrope', system-ui, sans-serif); cursor:pointer; }
.ap-intent button[aria-pressed="true"]{ border-color:var(--gold); color:var(--gold); background:color-mix(in srgb, var(--gold) 12%, transparent); }
.ap-intent button:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){ .ap-spin{ animation-duration:2.4s; } .msg-scan{ transition:none; } }