/* MOVE Coach — the Video tab (studio.js): the Video Room and the breakdown studio.
   Loaded after coach.css; uses its tokens. */

/* ---- The Video Room ---- */
.vr-head { display: flex; align-items: flex-end; gap: 16px; margin: 6px 0 16px; }
.vr-head > div { flex: 1; min-width: 0; }
.vr-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px; }
.vr-empty p { margin: 0 0 6px; }
.vr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vr-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.vr-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  background: #000; color: #fff;
}
.vr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vr-play {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .15s;
}
.vr-thumb:hover .vr-play { transform: scale(1.08); }
.vr-dur {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.7); font-family: var(--sf-rounded);
}
.vr-meta { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vr-title { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-sent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.vr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vr-tags .chip { font-size: 12px; padding: 2px 8px; }
.vr-filter { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.vr-filter label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.bd-tagpick { display: flex; flex-direction: column; gap: 10px; background: var(--surface-hi); border-radius: var(--r-inner); padding: 10px; max-height: 230px; overflow-y: auto; }
.bd-taggroup small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.bd-tagopts { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-tagopt { position: relative; display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--fill); color: var(--text); font-size: 13px; cursor: pointer; user-select: none; }
.bd-tagopt input { position: absolute; opacity: 0; pointer-events: none; }
.bd-tagopt:has(input:checked) { background: rgba(0,220,250,.18); color: var(--cyan); font-weight: 600; }
.bd-tagopt:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 1px; }
.vr-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; margin-top: auto; }
.btn.danger { color: var(--bad); }
.vr-player { background: #000; border-radius: var(--r-inner); overflow: hidden; display: grid; place-items: center; min-height: 200px; }
.vr-player video, .vr-player img { width: 100%; max-height: 70vh; display: block; object-fit: contain; }
.vr-note { white-space: pre-wrap; margin: 12px 0 4px; }

/* ---- Sheets (send, play, finish) ---- */
.st-modal {
  position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 20px;
}
.st-sheet {
  width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 18px 20px 20px;
  background: var(--material-thick); border-radius: 18px; box-shadow: 0 40px 120px -30px rgba(0,0,0,.9);
}
.st-sheet.wide { width: min(1040px, 100%); }
.st-sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.st-sheet-head > div { flex: 1; min-width: 0; }
.st-save { font-size: 13px; color: var(--good); margin-top: 2px; }
.st-save.bad { color: var(--bad); }
.st-finish { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.st-preview { background: #000; border-radius: var(--r-inner); overflow: hidden; }
.st-preview video, .st-preview img { width: 100%; max-height: 70vh; display: block; object-fit: contain; }
.st-sheet textarea {
  width: 100%; background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--r-inner);
  padding: 10px 12px; outline: none; font: inherit; color: inherit; resize: vertical;
}
.st-sheet textarea:focus { border-color: var(--cyan); }
.st-sheet .field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.st-sheet .row.wrap { flex-wrap: wrap; }
.st-recips { display: flex; flex-direction: column; max-height: 230px; overflow-y: auto; background: var(--surface-hi); border-radius: var(--r-inner); padding: 4px; }
.st-recip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.st-recip:hover { background: rgba(255,255,255,.06); }
.st-recip input { accent-color: var(--cyan); width: 17px; height: 17px; flex: none; }
.st-recip.team { border-bottom: .5px solid var(--line); border-radius: 8px 8px 0 0; }
.st-recip.team span { display: flex; flex-direction: column; }
.st-recip small { color: var(--muted); font-size: 12px; }
.st-recip:has(input:disabled):not(.team) { opacity: .45; }
@media (max-width: 760px) { .st-finish { grid-template-columns: 1fr; } }

/* ---- The studio, laid out like OnForm (2026-10-12) ----
   A top bar; then the tool rail · the video · the clip list; then the deck: playback for the
   active clip over its timeline. app.js sizes nothing — studio.js fits .st to the window
   (fitHeight) and the canvas to the stage (fitCanvas). */
.view.wide { max-width: 1680px; padding-bottom: 12px; }
.st { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; min-height: 520px; }
.st-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.st-bar .back { white-space: nowrap; }
.toggle.small { font-size: 13px; gap: 8px; }
.toggle.small .sw { width: 38px; height: 23px; }
.toggle.small .sw::after { width: 19px; height: 19px; }
.toggle.small input:checked + .sw::after { transform: translateX(15px); }
.st-recctl { display: flex; align-items: center; gap: 10px; }
.st-recctl.live { background: rgba(255,69,58,.14); padding: 5px 6px 5px 12px; border-radius: 999px; }
.st-recctl.live b { font-family: var(--sf-rounded); min-width: 38px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); display: inline-block; flex: none; }
.st-recbtn, .st-libbtn { display: inline-flex; align-items: center; gap: 8px; }
.st-libbtn.on { background: var(--fill-hi); color: #fff; }
/* Add video (2026-10-22, task 5): one button, three ways in. */
.st-add { position: relative; }
.st-addbtn { display: inline-flex; align-items: center; gap: 8px; }
.st-add-menu { min-width: 320px; }
.st-add-item { display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; border-radius: 9px; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; }
.st-add-item:hover, .st-add-item:focus-visible { background: var(--surface-top); }
.st-add-item[hidden] { display: none; }
.st-add-item svg { flex: none; color: var(--accent, #00dcfa); }
.st-add-item span { display: flex; flex-direction: column; gap: 2px; }
.st-add-item b { font-size: 14px; font-weight: 600; }
.st-add-item small { font-size: 12.5px; color: var(--muted); }
.st.recording .st-dot { animation: st-blink 1s steps(2, start) infinite; }
@keyframes st-blink { to { visibility: hidden; } }
.st-meter { width: 60px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.st-meter i { display: block; height: 100%; width: var(--p, 0%); background: var(--good); transition: width .1s; }

.st-main { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; min-height: 0; }
.st.lib-open .st-main { grid-template-columns: 68px minmax(0, 1fr) 290px; }
.st:not(.lib-open) .st-src { display: none; }

/* Save (2026-10-12). */
.st-savebtn { min-width: 64px; }
.st-saveopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 6px; }
.st-saveopt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--surface-hi); color: var(--text); cursor: pointer; font: inherit;
}
.st-saveopt:hover:not(:disabled) { border-color: var(--cyan); }
.st-saveopt:disabled { opacity: .4; cursor: default; }
.st-saveopt b { font-size: 14px; }
.st-saveopt span { font-size: 12px; color: var(--muted); }
.st-making { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.st-bar-p { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.st-bar-p i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .15s; }
@media (max-width: 560px) { .st-saveopts { grid-template-columns: 1fr; } }

/* The tool rail. */
.st-rail {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; background: var(--surface);
  border-radius: 14px; overflow-y: auto; min-height: 0; scrollbar-width: none;
}
.st-rail::-webkit-scrollbar { display: none; }
.st-tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 58px; min-height: 46px; flex: none;
  border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 600; padding: 4px 0;
}
.st-tool:hover { color: #fff; background: var(--fill); }
.st-tool.on { color: #00151a; background: var(--cyan); }
.st-sep { width: 36px; height: 1px; background: var(--line); margin: 6px 0; flex: none; }
.st-colors { display: grid; grid-template-columns: repeat(2, 24px); gap: 6px; padding: 2px 0 6px; }
.st-color {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 2px var(--surface) inset;
}
.st-color.on { border-color: #fff; }
.st-widths { display: flex; flex-direction: column; gap: 2px; }
.st-width { width: 44px; height: 26px; border: 0; border-radius: 8px; background: none; cursor: pointer; display: grid; place-items: center; }
.st-width i { display: block; width: 22px; height: var(--w); border-radius: 99px; background: var(--muted); }
.st-width.on { background: var(--fill-hi); }
.st-width.on i { background: #fff; }

/* The video. */
.st-work { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.st-stage {
  position: relative; flex: 1; min-height: 0; background: #000; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
}
#st-canvas { display: block; touch-action: none; cursor: crosshair; max-width: 100%; max-height: 100%; }
#st-canvas[data-tool="move"] { cursor: default; }
#st-canvas[data-tool="zoom"] { cursor: zoom-in; }
#st-canvas[data-tool="text"] { cursor: text; }
#st-canvas[data-tool="erase"] { cursor: not-allowed; }
.st-hint { margin: 0 4px; min-height: 18px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-drop-hint {
  position: absolute; display: grid; place-items: center; pointer-events: none;
  background: rgba(0,220,250,.16); box-shadow: 0 0 0 3px var(--cyan) inset; color: #fff; font-weight: 700; font-size: 18px;
}
.st-text {
  position: absolute; z-index: 2; min-width: 160px; background: rgba(0,0,0,.66); border: 1px solid var(--cyan); border-radius: 999px;
  padding: .15em .5em; font-weight: 700; font-family: Montserrat, var(--sf); outline: none;
}
.st-opacity {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.66); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
}
.st-opacity label { display: flex; align-items: center; gap: 10px; }
.st-opacity input { width: 130px; accent-color: var(--cyan); }
.st-zoombar {
  position: absolute; right: 12px; bottom: 12px; display: flex; gap: 2px; background: rgba(0,0,0,.66); border-radius: 999px; padding: 3px;
}
.st-zoombar button { min-width: 34px; height: 34px; border: 0; border-radius: 999px; background: none; color: #fff; cursor: pointer; font-size: 18px; font-weight: 600; }
.st-zoombar button:hover { background: rgba(255,255,255,.14); }
.st-zoombar [data-zreset] { font-size: 12px; font-family: var(--sf-rounded); padding: 0 6px; }

/* The clip list (side panel). */
.st-src {
  background: var(--surface); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 10px;
  min-height: 0; overflow: hidden; transition: box-shadow .15s;
}
.st-src.drop { box-shadow: 0 0 0 2px var(--cyan) inset; }
.st-src > .seg { align-self: stretch; display: flex; }
.st-src > .seg button { flex: 1; }
.st-src-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; flex: 1; }
.st-src-body select { padding: 8px 10px; font-size: 14px; }
.st-clips { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 120px; }
.st-clips .note { padding: 6px 4px; margin: 0; }
.st-clip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: grab; user-select: none;
}
.st-clip:hover { background: var(--surface-hi); }
.st-clip:active { cursor: grabbing; }
.st-clip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-clip-main b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-clip-main small { color: var(--muted); font-size: 12px; }
.st-clip-v { font-family: var(--sf-rounded); font-weight: 600; font-size: 14px; }
.st-clip-v small { color: var(--muted); font-size: 10px; margin-left: 2px; }
.st-nav, .st-nav:active { cursor: pointer; }
.st-none { opacity: .45; cursor: default; }
.st-none:hover { background: none; }
.st-chev { color: var(--muted); font-size: 18px; flex: none; }
.st-back { margin: 2px 0 4px; }
.st-head { font-weight: 700; font-size: 15px; margin: 2px 2px 6px; }
.st-clip-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--fill); display: grid; place-items: center; flex: none; }
.st-up { font-size: 12px; color: var(--muted); padding: 4px; }
.st-up span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-up i { display: block; height: 3px; border-radius: 2px; margin-top: 4px; background: linear-gradient(90deg, var(--cyan) var(--p), var(--fill) var(--p)); }
.st-file {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--line-hi); font-size: 14px;
}
.st-file:hover { border-color: var(--cyan); }
.st-file .note { font-size: 12px; }


/* The deck: playback + timeline. */
.st-deck { background: var(--surface); border-radius: 14px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.st-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-ib {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; background: var(--fill); color: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 16px; padding: 0;
}
.st-ib:hover { background: var(--fill-hi); }
.st-ib:disabled { opacity: .35; cursor: default; }
.st-ib.big { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #000; }
.st-ib.on { background: rgba(0,220,250,.2); color: var(--cyan); }
.st-ib b { font-size: 10px; font-family: var(--sf-rounded); }
.st-time { font-family: var(--sf-rounded); font-size: 14px; font-weight: 600; white-space: nowrap; min-width: 92px; font-variant-numeric: tabular-nums; }
.st-time small { color: var(--muted); font-weight: 500; font-size: 12px; }
.st-speed button, .st-which button { min-width: 40px; }
.st-speed button:disabled { opacity: .4; }
.st-which button { display: inline-flex; align-items: center; gap: 6px; }
.st-which i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.st-which button.drop { box-shadow: 0 0 0 2px var(--cyan) inset; }
.st-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--muted); font: 600 13px var(--sf); cursor: pointer; white-space: nowrap;
}
.st-pill svg { width: 15px; height: 15px; }
.st-pill.on { color: var(--cyan); background: rgba(0,220,250,.14); }
.st-pill:disabled { opacity: .4; cursor: default; }
.st-mpick { max-height: 150px; overflow-y: auto; }
.st-mpick .mtiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

.st-tl { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.st-tl-l {
  font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-tl-l.head { flex-direction: column; align-items: flex-start; gap: 0; color: #fff; }
.st-tl-l small { color: var(--muted); font-weight: 500; font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.st-tl-l.on { color: #fff; }
.st-tl-l i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.st-strip { position: relative; height: 56px; border-radius: 9px; overflow: hidden; background: #000; touch-action: none; cursor: pointer; user-select: none; }
.st-strip.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; cursor: default; background: var(--surface-hi); }
.st-thumbs { position: absolute; inset: 0; display: flex; }
.st-thumbs canvas { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.st-dim { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.68); pointer-events: none; }
.st-trim { position: absolute; top: 0; bottom: 0; border: 3px solid var(--amber); border-radius: 8px; pointer-events: none; }
.st-handle { position: absolute; top: 0; bottom: 0; width: 22px; cursor: ew-resize; z-index: 3; background: var(--amber); }
.st-handle.in { transform: translateX(0); border-radius: 8px 0 0 8px; }
.st-handle.out { transform: translateX(-100%); border-radius: 0 8px 8px 0; }
.st-handle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 18px; margin: -9px 0 0 -1.5px; border-radius: 2px; background: rgba(0,0,0,.55); }
.st-contact { position: absolute; bottom: 0; width: 2px; height: 14px; margin-left: -1px; background: var(--cyan); pointer-events: none; z-index: 2; }
.st-ph { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px #000; pointer-events: none; z-index: 4; }
.st-lane { position: relative; height: 24px; border-radius: 7px; background: var(--surface-hi); touch-action: none; }
.st-lane .st-ph { width: 1px; background: rgba(255,255,255,.55); box-shadow: none; }
.st-lane.hint { color: var(--muted); font-size: 12px; display: flex; align-items: center; padding: 0 10px; height: 24px; }
/* The drawings scroll in their own box, so many of them never squeeze the video. */
.st-tracks { grid-column: 1 / -1; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 10px; align-items: center; max-height: 84px; overflow-y: auto; }
.st-span {
  position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--c); color: #000; cursor: grab; display: flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 700; overflow: hidden; white-space: nowrap; opacity: .85;
}
.st-span.always { left: 0; right: 0; opacity: .4; cursor: pointer; }
.st-span.on { opacity: 1; box-shadow: 0 0 0 2px #fff; }
.st-span .e { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; }
.st-span .e.l { left: 0; } .st-span .e.r { right: 0; }
.st-span .e::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 5px; width: 2px; border-radius: 1px; background: rgba(0,0,0,.45); }
.st-span b { pointer-events: none; }

.st-hidden { position: fixed; left: -9999px; top: 0; width: 2px; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; }
.st-hidden video { width: 2px; height: 2px; }

/* iPad and narrow laptops: the clip list slides over the video instead of beside it. */
@media (max-width: 1099px) {
  .st.lib-open .st-main { grid-template-columns: 68px minmax(0, 1fr); }
  .st-main { position: relative; }
  .st-src { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 85%); z-index: 6; box-shadow: -12px 0 40px rgba(0,0,0,.6); }
}
/* iPad portrait and phones: the rail becomes a strip above the video. */
@media (max-width: 760px) {
  .st-main, .st.lib-open .st-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .st-rail { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px; }
  .st-sep { width: 1px; height: 36px; margin: 0 4px; }
  .st-colors { grid-template-columns: repeat(6, 22px); padding: 0 4px; align-self: center; }
  .st-widths { flex-direction: row; align-self: center; }
  .st-tool { width: 52px; }
  .st-tl, .st-tracks { grid-template-columns: 72px minmax(0, 1fr); }
  .st-time { min-width: 0; }
}

/* ---- The coach's camera window in the studio (2026-10-07) ---- */
.st-camctl { display: inline-flex; align-items: center; gap: 6px; }
.st-cambtn { display: inline-flex; align-items: center; gap: 6px; }
.st-cambtn.on { background: var(--cyan); color: #000; }
.st-camsize button { min-width: 30px; padding: 4px 8px; }
#st-canvas.on-cam, #st-canvas.on-cam[data-tool] { cursor: grab; }
#st-canvas.cam-drag, #st-canvas.cam-drag[data-tool] { cursor: grabbing; }

/* ---- Messages (messages.js, 2026-10-07) ---- */
.msg-panel { padding: 16px 18px 14px; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.msg-panel .panel-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg-panel .panel-t h2 { margin: 0; font-size: 17px; }
.msg-list { display: flex; flex-direction: column; gap: 10px; max-height: 440px; min-height: 90px; overflow-y: auto; padding: 4px 2px; }
.msg { display: flex; flex-direction: column; max-width: min(72%, 520px); }
.msg.them { align-self: flex-start; align-items: flex-start; }
.msg.us { align-self: flex-end; align-items: flex-end; }
.msg-b { border-radius: 18px; padding: 9px 13px; background: var(--surface-hi); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msg.us .msg-b { background: color-mix(in srgb, var(--cyan) 22%, var(--surface-hi)); }
.msg.us.mine .msg-b { background: var(--cyan); color: #00161a; }
.msg-b p { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.38; }
.msg-meta { font-size: 11px; color: var(--muted); margin: 3px 8px 0; }
.msg-audio { display: flex; align-items: center; gap: 8px; }
.msg-audio audio { height: 34px; max-width: 260px; }
.msg-audio.sm audio { height: 30px; }
.msg-media {
  position: relative; display: block; width: 260px; max-width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px;
  overflow: hidden; background: #000; color: #fff; cursor: pointer;
}
.msg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-media-t { position: absolute; left: 8px; bottom: 8px; right: 60px; font-size: 12px; font-weight: 600; text-align: left; text-shadow: 0 1px 3px rgba(0,0,0,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-media:hover .vr-play { transform: scale(1.08); }
.msg-compose { display: flex; align-items: flex-end; gap: 8px; border-top: .5px solid var(--line); padding-top: 10px; }
.msg-compose textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 160px; padding: 9px 14px; border-radius: 20px; font: inherit; font-size: 15px;
  background: var(--surface-hi); color: var(--text); border: 1px solid transparent; outline: none; line-height: 1.35;
}
.msg-compose textarea:focus { border-color: var(--cyan); }
.msg-compose .iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.msg-voice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface-hi); border-radius: 14px; padding: 10px 12px; }
.msg-voice > div { flex: 1; min-width: 240px; }
.msg-memo { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.msg-memo audio { flex: 1; height: 34px; }

.vrec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vrec-go { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; background: var(--fill); color: var(--text); }
.vrec-go:hover { background: var(--fill-hi); }
.vrec.live .vrec-go { background: var(--bad); color: #fff; }
.vrec-time { font-family: var(--sf-rounded); font-variant-numeric: tabular-nums; }
.vrec audio { height: 34px; max-width: 280px; }

.msg-sheet .seg { margin-bottom: 12px; }
.msg-kinds button, .msg-srcs button { display: inline-flex; align-items: center; gap: 6px; }
.msg-src-box { margin-bottom: 12px; }
.crec-stage { position: relative; background: #000; border-radius: var(--r-inner); overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.crec-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.crec-stage video[data-live] { transform: scaleX(-1); }
.crec-stage [data-wait] { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #ccc; }
.crec.live .crec-stage { outline: 3px solid var(--bad); outline-offset: -3px; }
.cpick { display: flex; flex-direction: column; gap: 8px; }
.cpick select { align-self: flex-start; }
.cpick-list { max-height: 220px; overflow-y: auto; background: var(--surface-hi); border-radius: var(--r-inner); padding: 4px; display: flex; flex-direction: column; }
.cpick-row { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.cpick-row:hover { background: var(--hover); }
.cpick-row.on { background: var(--cyan); color: #00161a; }
.cpick-row svg { flex: none; width: 14px; height: 14px; }
.cpick-prev { background: #000; border-radius: var(--r-inner); overflow: hidden; }
.cpick-prev video { width: 100%; max-height: 300px; display: block; object-fit: contain; }
.vr-audio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--cyan);
  background: radial-gradient(160px 90px at 50% 40%, rgba(0,220,250,.18), transparent 70%), #0a0a0d; }
.vr-audio svg { width: 34px; height: 34px; }
.vr-audio b { font-size: 13px; color: #fff; }
.vr-audio.big { position: static; padding: 40px 20px; width: 100%; }
.vr-audio.big audio { width: min(420px, 100%); }
.vr-thumb .vr-audio + .vr-play { display: none; }

/* Unread marks: the profile's Message button and Home's athlete rows. */
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; margin-left: 6px; }
.ath-new { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #00161a; background: var(--cyan); vertical-align: 2px; }
.ath-new svg { width: 12px; height: 12px; }
@media (max-width: 760px) {
  .msg { max-width: 86%; }
  .msg-list { max-height: 60vh; }
}
.msg.us.mine .note, .msg.us.mine .msg-audio svg { color: rgba(0,22,26,.75); }

/* ---- The catch viewer's 3D glove path (path3d.js) ----
   Fills the clip's half; dark in both modes like the clip stage. */
.v-mode { align-self: flex-start; }
.p3d { position: relative; justify-self: stretch; align-self: stretch; width: 100%; height: 100%; min-height: min(80vh, 760px); border-radius: 12px; overflow: hidden; background: #000; touch-action: none; }
.p3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.p3d > canvas:active { cursor: grabbing; }
/* VIEWS (Nolan, 2026-11-12): one "Views" button; the view names drop down under it. */
.p3d-views { position: absolute; top: 12px; left: 12px; z-index: 3; }
.p3d-viewsbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: rgba(28,28,30,.8); color: #fff; font: 600 13px Montserrat, system-ui, sans-serif; cursor: pointer; }
.p3d-viewsbtn span { font-size: 10px; transition: transform .15s; }
.p3d-viewsbtn.open { background: #fff; color: #111; }
.p3d-viewsbtn.open span { transform: rotate(180deg); }
.p3d .p3d-viewmenu { position: absolute; max-width: none; overflow: visible; align-items: stretch; flex: none; top: calc(100% + 6px); left: 0; display: grid; gap: 2px; min-width: 150px; padding: 6px; border-radius: 12px; background: rgba(28,28,30,.95); }
.p3d .p3d-viewmenu[hidden] { display: none; }
.p3d .p3d-viewmenu button { color: #fff; border-radius: 8px; padding: 7px 12px; font-size: 13px; text-align: left; white-space: nowrap; }
/* THE PLAY LINE (Nolan, 2026-10-24, "line on the edge"): a thin yellow line along the very bottom
   of the stage with Contact (white) and Stick (green) ticks; small round pause and speed buttons
   and the clock just above it. Orbit (word only, yellow) sits a little above those. */
.p3d-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px 20px; color: #fff; pointer-events: none; }
.p3d-bar[hidden] { display: none; }
.p3d-bar > button { pointer-events: auto; flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(28,28,30,.8); color: #fff; font: 700 12px Montserrat, system-ui, sans-serif; cursor: pointer; }
.p3d-speed { margin-left: auto; }
.p3d-time { font: 600 12px Montserrat, system-ui, sans-serif; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
.p3d-line { pointer-events: auto; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; display: flex; align-items: flex-end; }
.p3d-scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; --p: 0%; }
.p3d-scrub::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, #fdc124 var(--p), rgba(255,255,255,.18) var(--p)); }
.p3d-scrub::-moz-range-track { height: 4px; background: linear-gradient(90deg, #fdc124 var(--p), rgba(255,255,255,.18) var(--p)); }
.p3d-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 4px; border: 0; background: transparent; }
.p3d-scrub::-moz-range-thumb { width: 0; height: 4px; border: 0; background: transparent; }
.p3d-line:hover .p3d-scrub::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; }
.p3d-line:hover .p3d-scrub::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.p3d-scrub:focus-visible { outline: 2px solid #fdc124; outline-offset: -2px; }
.p3d-ticks { position: absolute; inset: 0; pointer-events: none; }
.p3d-ticks i { position: absolute; bottom: 0; width: 3px; height: 8px; margin-left: -1px; border-radius: 1px; }
.p3d-orbit { position: absolute; left: 12px; bottom: 64px; z-index: 1; height: 30px; padding: 0 14px; border: 0; border-radius: 99px; box-shadow: inset 0 0 0 1.5px #fdc124; background: rgba(0,0,0,.55); color: #fdc124; font: 700 12px Montserrat, system-ui, sans-serif; cursor: pointer; }
.p3d-orbit.on { background: #fdc124; color: #111; }
.p3d-orbit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.p3d-key { position: absolute; top: 56px; left: 16px; right: 64px; z-index: 1; pointer-events: none; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000; }
.p3d-key span { display: inline-flex; align-items: center; gap: 5px; }
.p3d-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
/* The strike zone's key (Nolan, 2026-11-29, K2): a small box top left, with the zone. */
.p3d-zkey { position: absolute; top: 84px; left: 16px; z-index: 1; pointer-events: none; display: grid; gap: 4px; padding: 7px 10px; border-radius: 8px; background: rgba(18, 20, 24, .85); border: 1px solid rgba(255, 255, 255, .15); color: #e8e8ec; font: 600 11px -apple-system, system-ui, sans-serif; }
.p3d-zkey[hidden] { display: none; }
.p3d-zkey span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.p3d-zkey i.z { width: 14px; height: 0; border-top: 2px solid #fff; }
.p3d-zkey i.s { width: 14px; height: 9px; background: rgba(253, 193, 36, .35); } /* one gold, no darker edge (11-30) */
/* The round buttons, top right: ruler, strike zone, pitch line — whichever the path has, ruler outermost. */
.p3d-tools { position: absolute; top: 12px; right: 12px; z-index: 1; display: flex; flex-direction: row-reverse; gap: 8px; }
.p3d-tools button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(28,28,30,.8); color: #fff; cursor: pointer; }
.p3d-tools button.on { background: #fff; color: #111; }
/* The ruler's menu: one line per distance, lit when on. */
.p3d-dist { position: absolute; top: 56px; right: 12px; z-index: 2; display: grid; gap: 2px; padding: 6px; border-radius: 12px; background: rgba(28,28,30,.92); }
.p3d-dist[hidden] { display: none; }
.p3d-dist button { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,.5); font: 600 13px Montserrat, system-ui, sans-serif; text-align: left; cursor: pointer; }
.p3d-dist button i { flex: none; width: 10px; height: 10px; border-radius: 50%; opacity: .35; }
.p3d-dist button.on { color: #fff; }
.p3d-dist button.on i { opacity: 1; }
.p3d-menuhead { padding: 8px 10px 2px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 4px; color: rgba(255,255,255,.4); font: 700 10px Montserrat, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 860px) { .p3d { height: 62vh; min-height: 0; border-radius: 0; } }
@media (min-width: 861px) { .v-stage .p3d { min-height: 0; } }
/* VIDEO + 3D (2026-10-15): the clip and its 3D path side by side as a pair — the path the
   clip's own size — with the stage taking two thirds of the viewer on a laptop. The path's play
   bar steps aside (the clip's controls drive both), so its key sits at the bottom. */
.v-stage.is-both { grid-template-columns: 1fr 1fr; gap: 8px; }
/* The last catch's stage, frozen over the next one while it loads (app.js `held`). */
.v-stage > .v-stage.v-held { position: absolute; inset: 0; z-index: 3; }
.v-stage.is-both .p3d { min-height: 0; height: auto; aspect-ratio: var(--ar, .5625); align-self: center; }
.v-stage.is-both .p3d-key { top: auto; bottom: 10px; left: 10px; }
.v-stage.is-both .p3d-orbit { bottom: 34px; left: 8px; height: 26px; padding: 0 10px; }
.v-stage.is-both .p3d-tools { top: auto; bottom: 8px; right: 8px; gap: 6px; }
.v-stage.is-both .p3d-tools button { width: 30px; height: 30px; }
.v-stage.is-both .p3d-dist { top: auto; bottom: 44px; right: 8px; }
.v-stage.is-both .p3d-key { right: 118px; }
/* A narrow stage: the views wrap rather than run under the ruler and zone buttons. */
@media (min-width: 861px) {
  .viewer:has(.v-stage.is-both) { grid-template-columns: 2fr 1fr; }
  .v-stage.is-both .stage, .v-stage.is-both .p3d { width: min(calc(50cqw - 4px), 100cqh * var(--ar, .5625)); }
}
@media (max-width: 860px) { .v-stage.is-both .stage, .v-stage.is-both .p3d { height: auto; width: 100%; border-radius: 0; } }

/* ---- Drills (drills.js, 2026-10-17): the drill bank + MOVE AI that sends from it ---- */
.dr-ai { margin: 0 0 18px; border: 1px solid rgba(0,220,250,.28); }
.dr-ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dr-ai-head b { font-size: 17px; }
.dr-ai-log { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; max-height: 60vh; overflow-y: auto; }
.dr-ai-log .ai-a p { font-size: 15px; }
.dr-ai .ai-reading { margin: 0; color: var(--muted); }
.dr-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dr-suggest .chip { cursor: pointer; padding: 6px 12px; font-size: 13px; }
.dr-suggest .chip:hover { color: var(--text); }
.dr-ai-form { display: flex; gap: 8px; }
.dr-ai-form input { flex: 1; min-width: 0; background: var(--surface-hi); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; }
.dr-ai-form input:focus { outline: none; border-color: var(--cyan); }
.dr-pick { display: flex; gap: 12px; padding: 12px; margin-left: 28px; background: var(--surface-hi); border-radius: var(--r-inner); }
.dr-pick.gone { padding: 10px 12px; }
.dr-pick-img { width: 96px; height: 64px; flex: none; border-radius: 8px; object-fit: cover; background: #000; }
.dr-pick-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dr-pick-b textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font: inherit; resize: vertical; }
.dr-pick-note { margin: 0; white-space: pre-wrap; }
.dr-pick-f { font-size: 14px; }
.dr-pick-f span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.dr-who { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-who-p { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.dr-who-p .linkbtn { font-size: 15px; line-height: 1; padding: 0 2px; color: var(--muted); }
.dr-folders { margin: 0 0 14px; }
.dr-folders button { white-space: nowrap; }
.dr-n { color: var(--muted); font-weight: 500; margin-left: 2px; }
.dr-folder { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin: 0 0 14px; background: var(--surface); border-radius: var(--r-card); }
.dr-folder > div { flex: 1; min-width: 0; }
.dr-folder p { margin: 4px 0 0; white-space: pre-wrap; }
.dr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.dr-card .vr-meta { padding-bottom: 14px; }
.dr-sheet { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.dr-player video { max-height: 60vh; }
.dr-tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-tag { display: inline-flex; cursor: pointer; }
.dr-tag input { position: absolute; opacity: 0; pointer-events: none; }
.dr-tag span { padding: 5px 10px; border-radius: 999px; background: var(--surface-hi); color: var(--muted); font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.dr-tag input:checked + span { color: var(--cyan); background: rgba(0,220,250,.15); border-color: rgba(0,220,250,.35); }
.dr-tag input:focus-visible + span { outline: 2px solid var(--cyan); }
@media (max-width: 860px) {
  .dr-sheet { grid-template-columns: 1fr; }
  .dr-pick { margin-left: 0; }
  .dr-pick-img { width: 72px; height: 48px; }
}
.dr-form .field input:not([type=checkbox]), .dr-form .field select {
  width: 100%; background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--r-inner);
  padding: 9px 12px; color: inherit; font: inherit;
}
.dr-form .field input:not([type=checkbox]):focus, .dr-form .field select:focus { outline: none; border-color: var(--cyan); }

/* The dashboard's own delete confirm (studio.js confirmSheet), in place of the browser's. */
.st-sheet.st-confirm { width: min(400px, 100%); padding: 20px; }
.st-confirm-text { margin: 0 0 18px; line-height: 1.45; }
.st-confirm-row { display: flex; justify-content: flex-end; gap: 10px; }
.st-confirm .btn.danger { background: var(--bad); color: #fff; }

/* The numbers without a clip (overlay.js mountOverlayClock): a black stage and a play bar. */
.stage-clock { background: #0b0b0d; }
.clock-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(28,28,30,.8); }
.clock-play { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.clock-scrub { flex: 1; accent-color: #fdc124; }

/* THE PHASES (2026-10-26): a word button beside the round tools opens the menu; the open phases'
   seconds and inches sit bottom left above Orbit; the play line is coloured by phase. */
.p3d-tools .p3d-phbtn { width: auto; padding: 0 14px; border-radius: 99px; font: 700 12px Montserrat, system-ui, sans-serif; gap: 4px; display: inline-flex; align-items: center; }
.p3d-tools .p3d-phbtn.open { background: #fff; color: #111; }
/* THE APPROACH ANGLE BUTTON (Nolan, 2026-11-12): beside Phases, its words very small; amber when on. */
.p3d-tools .p3d-angbtn { width: auto; padding: 0 10px; border-radius: 99px; font: 700 9px Montserrat, system-ui, sans-serif; letter-spacing: .02em; display: inline-flex; align-items: center; white-space: nowrap; }
.p3d-tools .p3d-angbtn.on { background: #fdc124; color: #111; }
.p3d-tools .p3d-angwrap { position: relative; display: inline-flex; }
/* Redirect switch: drops under the Approach Angle pill while it is on (Nolan, 11-12). */
.p3d-tools .p3d-redirsw { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); width: auto; height: 16px; padding: 0 6px 0 3px; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px; font: 700 7.5px Montserrat, system-ui, sans-serif; letter-spacing: .02em; white-space: nowrap; background: rgba(28,28,30,.85); color: #fff; }
.p3d-tools .p3d-redirsw[hidden] { display: none; }
.p3d-redirsw .p3d-sw { position: relative; width: 14px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); transition: background .15s; }
.p3d-redirsw .p3d-sw::after { content: ""; position: absolute; top: 1px; left: 1px; width: 6px; height: 6px; border-radius: 50%; background: #fff; transition: transform .15s; }
.p3d-redirsw[aria-checked="true"] .p3d-sw { background: #fdc124; }
.p3d-redirsw[aria-checked="true"] .p3d-sw::after { transform: translateX(6px); }
/* In Both (Nolan, 11-12: "looks shitty"): the round-button size no longer squashes it, and it
   sits in the row right beside the pill instead of floating over the row above. */
.v-stage .p3d-tools button.p3d-redirsw { width: auto; height: 16px; padding: 0 6px 0 3px; border-radius: 99px; display: inline-flex; place-items: center normal; align-items: center; line-height: 1; box-sizing: border-box; }
.v-stage .p3d-tools button.p3d-redirsw[hidden] { display: none; }
.v-stage.is-both .p3d-tools .p3d-angwrap { gap: 4px; align-items: center; align-self: center; }
.v-stage.is-both .p3d-tools button.p3d-redirsw { position: static; transform: none; width: auto; height: 18px; flex: none; }

/* Pitch location card on the 3D path (TrackMan-style, catcher's view; Nolan 2026-11-22). */
.p3d-pword { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 1; pointer-events: none; display: grid; gap: 4px; color: #fff; font-family: Montserrat, system-ui, sans-serif; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.p3d-pword b { justify-self: start; font-size: 15px; font-weight: 700; padding-bottom: 3px; border-bottom: 2px solid #ff3b30; }
.p3d-pword span { font-size: 24px; font-weight: 800; line-height: 1; }
.p3d-pword small { margin-left: 4px; font-size: 11px; font-weight: 700; opacity: .85; }
.p3d-pword em { font-style: normal; font-size: 11px; color: rgba(255,255,255,.75); white-space: nowrap; }
.p3d-pword em b { font-size: 11px; padding: 0; border: 0; color: #fff; }
.p3d-pword em small { margin-left: 2px; font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.v-stage.is-both .p3d-pword { left: 10px; transform: translateY(-50%) scale(.8); transform-origin: left center; }
.p3d-phnums { position: absolute; left: 14px; bottom: 108px; z-index: 1; display: grid; gap: 2px; pointer-events: none; font: 700 10px Montserrat, system-ui, sans-serif; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
.p3d-phnums div { display: flex; align-items: center; gap: 5px; }
.p3d-phnums span { color: #fff; font-weight: 600; }
.p3d-paused { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1; pointer-events: none; padding: 6px 14px; border-radius: 99px; background: rgba(28,28,30,.85); color: #fff; font: 700 12px Montserrat, system-ui, sans-serif; }
.p3d-scrub::-webkit-slider-runnable-track { background: transparent; }
.p3d-scrub::-moz-range-track { background: transparent; }
.p3d-ticks b { position: absolute; bottom: 0; height: 4px; }
.p3d-ticks .p3d-head { width: 3px; height: 12px; margin-left: -1px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.85); }
.v-stage.is-both .p3d-phnums { bottom: 66px; left: 10px; font-size: 9px; }
.v-stage.is-both .p3d-tools .p3d-phbtn { width: auto; padding: 0 10px; font-size: 11px; }
.v-stage.is-both .p3d-tools .p3d-angbtn { padding: 0 8px; font-size: 9px; }

/* THE PHASE PLAY BAR (catchbar.js, Max 2026-10-27, style D): one bar under the clip (Video) or
   across clip + 3D path (Both). A thin line in the path's phase colours — Load white, Approach
   yellow, Catch to Stick blue, Hold green — a small gap between phases, no names (Max, 10-28),
   and a round white playhead. The stage leaves room for it. */
.v-stage.with-cbar { padding-bottom: 66px; }
.cbar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 50px; z-index: 2; display: flex; align-items: center; gap: 12px; color: #fff; }
.cbar[hidden] { display: none; }
.cbar-play { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.cbar-sound { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.6); cursor: pointer; }
.cbar-sound:hover { background: rgba(255,255,255,.14); color: #fff; }
.cbar-sound.on { color: #fff; }
.cbar-play:hover { background: rgba(255,255,255,.22); }
.cbar-time { flex: none; min-width: 54px; font: 600 12px Montserrat, system-ui, sans-serif; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }
.cbar-line { position: relative; flex: 1; height: 44px; cursor: pointer; touch-action: none; }
.cbar-track, .cbar-segs { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; }
.cbar-track { background: rgba(255,255,255,.14); }
.cbar-segs b { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.cbar-head { position: absolute; top: 12px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #000; pointer-events: none; }
.cbar-key { position: absolute; left: 0; right: 0; top: 24px; display: flex; flex-wrap: wrap; gap: 4px 14px; pointer-events: none; font: 700 11px Montserrat, system-ui, sans-serif; color: rgba(255,255,255,.85); }
.cbar-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cbar-key i { width: 8px; height: 8px; border-radius: 50%; }
/* Player + coach dashboard (Nolan, 11-10): the names are buttons that jump to their phase. */
.cbar-key.cbar-key-jump { pointer-events: auto; }
/* One row (Nolan, 11-10): the names never stack; on a narrow clip the row runs left under the
   play button and the clock rather than wrapping. */
.viewer.v-fit .cbar-key { flex-wrap: nowrap; left: auto; right: 0; gap: 12px; }
/* The play button and clock sit level with the line, above the names (Nolan, 11-10). */
.viewer.v-fit .cbar-play, .viewer.v-fit .cbar-time, .viewer.v-fit .cbar-sound { transform: translateY(-10px); }
.viewer.v-fit .cbar-key { top: 30px; }
.cbar-key button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 2px 6px; margin: -2px -6px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cbar-key button:hover { background: rgba(255,255,255,.16); color: #fff; }
.cbar-line:focus-visible { outline: 2px solid #fdc124; outline-offset: 3px; border-radius: 4px; }

/* WATCH SESSION (2026-11-08, reel.js): every filmed catch back to back, over the page.
   B3 layout (Nolan, 11-10): the clip and a panel as two rounded cards on grey, no black around. */
.reel {
  position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: center; gap: 24px; padding: 24px;
  background: color-mix(in srgb, var(--bg) 92%, var(--text)); color: var(--text); user-select: none;
}
.reel[hidden] { display: none; }
.reel-stage {
  position: relative; flex: none; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100% - 24px - min(620px, 46%));
  border-radius: 18px; overflow: hidden; background: #000; color: #fff;
}
.reel-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.reel-v[hidden] { display: none; }
.reel-zones { position: absolute; inset: 0; display: grid; grid-template-columns: 30% 1fr 30%; }
.reel-zone { background: none; border: 0; padding: 0; cursor: pointer; }
.reel-zone:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }
.reel-top { position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px 24px; background: linear-gradient(rgba(0,0,0,.5), transparent); pointer-events: none; }
.reel-bars { display: flex; gap: 3px; }
.reel-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.reel-bars i { display: block; height: 100%; width: 0; background: #fff; }
/* Subtle (Nolan, 11-10): small, faint, brighter only while the mouse is over the clip. */
.reel-arrow {
  position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0,0,0,.22); color: rgba(255,255,255,.7); font-size: 20px; line-height: 1; cursor: pointer;
  opacity: .55; transition: opacity .2s, background .2s;
}
.reel-arrow.l { left: 10px; } .reel-arrow.r { right: 10px; }
.reel-stage:hover .reel-arrow { opacity: .9; }
.reel-arrow:hover { background: rgba(0,0,0,.45); color: #fff; opacity: 1; }
@media (hover: none) { .reel-arrow { opacity: .8; } }
.reel-nums { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.reel-num { background: rgba(0,0,0,.55); backdrop-filter: blur(8px); border-radius: 12px; padding: 7px 12px; font-size: 13px; }
.reel-num small { display: block; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.75); }
.reel-num b { font-size: 20px; font-weight: 700; }
.reel-paused { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; font-size: 36px; pointer-events: none; }
.reel-paused[hidden], .reel-loading[hidden], .reel-again[hidden] { display: none; }
.reel-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,.7); pointer-events: none; }
.reel-again { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; border-radius: 999px; padding: 14px 26px; background: var(--cyan); color: #000; font-weight: 700; font-size: 16px; cursor: pointer; }

.reel-panel {
  flex: 0 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 24px;
  background: var(--surface); border-radius: 18px; overflow: hidden;
}
.reel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.reel-head-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.reel-title { font-size: 22px; font-weight: 800; }
.reel-sub { font-size: 14px; color: var(--muted); }
.reel-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; flex: none;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--surface-hi); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.reel-btn:hover { filter: brightness(1.15); }
.reel-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.reel-star { --fill: none; }
.reel-star.on { --fill: var(--amber); color: var(--amber); }
.reel-cn.on { background: var(--cyan); color: #000; }
.reel-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--cyan); color: #000; font-size: 11px; line-height: 18px; text-align: center; }
.reel-cn.on .reel-count { background: #fff; }
.reel-count[hidden] { display: none; }
.reel-speed.on { background: var(--cyan); color: #000; }
.reel-go { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.reel-open { height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--surface-hi); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.reel-open:hover { filter: brightness(1.15); }
.reel-open.blue { background: transparent; color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }
.reel-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; padding: 0 8px; }
.reel-list[hidden] { display: none; }
.reel-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; flex: none;
}
.reel-row:hover { background: var(--surface-hi); }
.reel-row.on { background: var(--surface-hi); box-shadow: inset 3px 0 0 var(--cyan); }
.reel-thumb { width: 44px; height: 60px; border-radius: 8px; overflow: hidden; background: #000; flex: none; }
.reel-thumb img, .reel-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reel-row-t b { font-size: 15px; }
.reel-row-t small { font-size: 13px; color: var(--muted); }
.reel-row em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cyan); display: none; }
.reel-row.on em { display: inline; }
/* A toast from the reel (a post that failed, the microphone blocked) shows over it. */
body:has(> .reel:not([hidden])) .dl-toast { z-index: 1100; }
/* Comments take the list's place in the panel. */
.reel-side { flex: 1; min-height: 0; display: flex; flex-direction: column; user-select: text; }
.reel-side[hidden] { display: none; }
.reel-side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; }
.reel-side-body { flex: 1; overflow-y: auto; }
@media (max-width: 760px) {
  .reel { flex-direction: column; gap: 0; padding: 0; }
  .reel-stage { width: 100%; height: 58vh; max-width: none; aspect-ratio: auto !important; border-radius: 0; }
  .reel-panel { flex: 1; min-height: 0; border-radius: 16px 16px 0 0; margin-top: -12px; padding: 18px 16px; gap: 12px; }
  .reel-title { font-size: 18px; }
  .reel-open { padding: 0 14px; font-size: 14px; }
}
/* Comments + voice notes on a catch (catchnotes.js): the reel's panel and the catch viewer. */
.cn { display: flex; flex-direction: column; gap: 12px; }
.cn-head { display: flex; flex-direction: column; gap: 2px; }
.cn-list { display: flex; flex-direction: column; gap: 12px; }
.cn-note { display: flex; gap: 10px; align-items: flex-start; }
.cn-body { flex: 1; min-width: 0; }
.cn-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cn-meta .cn-del { margin-left: auto; font-size: 12px; }
.cn-text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-audio { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.cn-audio audio { width: 100%; height: 36px; }
.cn-add { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.cn-add textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 56px; font: inherit; color: var(--text); background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--r-inner); padding: 10px 12px; }
.cn-add textarea:focus { outline: 2px solid var(--cyan); outline-offset: -1px; }
.cn-post { align-self: flex-end; }
.v-notes { border-top: 1px solid var(--line); padding-top: 12px; }
.v-back { align-self: flex-start; }

/* ---- Pitch tags in the catch viewer (tagedit.js, tag later 2026-11-08) ---- */
.v-tags { display: grid; gap: 12px; padding: 12px; border-radius: var(--r-inner, 10px); background: var(--surface-hi, #2c2c2e); }
.v-tags-d > summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 0; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.v-tags-d > summary::-webkit-details-marker { display: none; }
.v-tags-d > summary::after { content: "Edit"; margin-left: auto; color: var(--cyan); font-weight: 600; }
.v-tags-d[open] > summary::after { content: "Done"; }
.v-tags-d > summary .note { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-tags .tg-h { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.v-tags .tg-round { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.v-tags .tg-round label, .v-tags .tg-labels label { display: grid; gap: 3px; font-size: 11px; color: var(--muted); min-width: 0; }
.v-tags select { width: 100%; min-width: 0; background: var(--surface-top, #3a3a3c); color: inherit; border: 0; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12.5px; }
.v-tags .tg-scope { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface-top, #3a3a3c); font-size: 12.5px; }
.v-tags .tg-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.v-tags .tg-chip { display: flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 8px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface-top, #3a3a3c); color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.v-tags .tg-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.v-tags .tg-chip.on { background: var(--c); border-color: var(--c); color: #000; }
.v-tags .tg-chip.on i { background: #000; }
.v-tags .tg-chip.gone { opacity: .75; }
.v-tags .tg-chip kbd { font: 600 10px ui-monospace, Menlo, monospace; opacity: .6; }
.v-tags .tg-chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.v-tags .tg-zone { display: flex; gap: 12px; align-items: center; }
.v-tags .tz { width: 118px; flex: none; display: block; }
.v-tags .tz rect { cursor: pointer; }
.v-tags .tz-q { fill: rgba(255,255,255,.06); stroke: var(--line); stroke-width: .6; }
.v-tags .tz-q.on { fill: #FFBF06; }
.v-tags .tz-c { fill: rgba(255,255,255,.14); stroke: #000; stroke-width: 1.2; }
.v-tags .tz-c.on { fill: var(--cyan); }
.v-tags .tz rect:hover { opacity: .8; }
.v-tags .tz text { font: 600 6.5px system-ui, sans-serif; fill: var(--muted); pointer-events: none; }
.v-tags .tg-zt { display: grid; gap: 4px; font-size: 13px; min-width: 0; }
.v-tags .tg-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.v-tags .tg-labels .tg-h { grid-column: 1 / -1; margin-bottom: 0; }
.v-tags .tg-by:empty, .v-tags .tg-keys:empty { display: none; }
.v-tags .tg-keys kbd { font: 600 10px ui-monospace, Menlo, monospace; padding: 1px 4px; border-radius: 4px; background: var(--surface-top, #3a3a3c); }
.section-title .tag-pitches { margin-left: auto; text-transform: none; letter-spacing: normal; }
.section-title .tag-pitches + .watch-session { margin-left: 8px; }

/* BOTH, less crammed (Nolan, 11-10): the play bar under the pair already names the phases, so
   the path's own Contact / Stick key steps aside, and its view buttons stay on one line
   (sliding sideways when the path is narrow) instead of stacking over the picture. */
.v-stage.is-both .p3d-key { display: none; }
.v-stage.is-both .p3d-orbit { display: none; }   /* Nolan, 11-10: no Orbit in Both */
.v-stage.is-both .p3d-phnums { bottom: 14px; }

/* Tag box for the ML labels (Nolan, 2026-11-10): What happened + Sensor clip as wrapping buttons,
   the 7 × 7 zone board + the dirt, the team's groups folded into More tags. */
.v-tags .tg-chips.tg-wrap { display: flex; flex-wrap: wrap; }
.v-tags .tg-wrap .tg-chip { flex: 0 0 auto; padding: 0 10px; }
.v-tags .tg-fam { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; align-items: start; margin-bottom: 6px; }
.v-tags .tg-fl { font-size: 11.5px; color: var(--muted); padding-top: 9px; }
/* ML catch guess (Sam, 2026-11-18, mlcatch.js): one quiet line + a faint dotted outline on the
   button (or family row) the model would pick. Never looks like a pick. */
.v-tags .tg-ml { font-size: 12px; color: var(--muted); margin: -2px 0 8px; }
.v-tags .tg-ml b { font-weight: 600; color: var(--text); }
.v-tags .tg-chip.ml:not(.on) { border-style: dashed; border-color: var(--c); }
.v-tags .tg-fam.ml .tg-fl { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.v-tags .tz7 { width: 168px; }
.v-tags .tz-s { stroke: #000; stroke-width: 1; }
.v-tags .tz-s.r0, .v-tags .tz-s.r1 { fill: rgba(255,255,255,.16); }
.v-tags .tz-s.r2 { fill: rgba(255,255,255,.08); }
.v-tags .tz-s.r3 { fill: rgba(255,255,255,.035); }
.v-tags .tz-dirt { fill: rgba(170,120,80,.35); }
.v-tags .tz-s.on { fill: var(--cyan); }
.v-tags .tz-frame { fill: none; stroke: #fff; stroke-width: 1.2; pointer-events: none; }
.v-tags .tz .tz-dt { fill: #d9b99b; font-size: 5.5px; }
.v-tags .tg-more > summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.v-tags .tg-more > summary::-webkit-details-marker { display: none; }
.v-tags .tg-more > summary::after { content: "▸"; margin-left: auto; color: var(--muted); }
.v-tags .tg-more[open] > summary::after { content: "▾"; }
.v-tags .tg-more[open] { display: grid; gap: 12px; }

/* Both (Nolan, 11-12): the path is narrow, so its buttons don't squeeze into each other or over
   the phase numbers: smaller word pills, and what doesn't fit beside the numbers moves up a row. */
.v-stage.is-both .p3d-tools { flex-wrap: wrap-reverse; justify-content: flex-start; max-width: max(120px, calc(100% - 158px)); }
.v-stage.is-both .p3d-tools button { flex: none; }
.v-stage.is-both .p3d-tools .p3d-angbtn, .v-stage.is-both .p3d-tools .p3d-phbtn { width: auto; height: 22px; padding: 0 8px; font-size: 8px; letter-spacing: .02em; align-self: center; }
.v-stage.is-both .p3d-phnums { font-size: 8px; gap: 1px; }

/* With the views folded into one button (11-12), the round buttons + the Approach Angle and Phase
   Data pills share the top row; pills drawn the same small size, a narrow path wraps them down. */
.v-stage:not(.is-both) .p3d-tools { flex-wrap: wrap; justify-content: flex-start; align-items: center; max-width: calc(100% - 130px); }
.v-stage:not(.is-both) .p3d-tools button { flex: none; }
.v-stage:not(.is-both) .p3d-tools .p3d-angbtn, .v-stage:not(.is-both) .p3d-tools .p3d-phbtn { width: auto; height: 28px; padding: 0 10px; font-size: 9px; letter-spacing: .02em; }
.v-stage.is-both .p3d-viewsbtn { height: 28px; padding: 0 12px; font-size: 12px; }
/* Contact / Stick key smaller (Nolan, 11-12). */
.p3d-key { font-size: 9px; gap: 4px 10px; }
.p3d-key i { width: 7px; height: 7px; }
/* Strike probability under the pitch location card (Sam, 11-29). */
