/* =====================================================================
   viewer-plus.css — in-player Study panel (notes + AI assistant), bar buttons, seek-bar note dots,
   floating watermark look, and the speed editor menu.
   Loads after player.css. No backdrop-filter anywhere (blurring live video every frame causes lag).
   ===================================================================== */

/* ---- bar buttons (they are .vc-btn, so player.css already sizes / colours them) ---- */
html body #video-theater .vp-bar-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { position: relative; }
html body #video-theater .vp-bar-btn.vp-on:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { background: rgba(99,102,241,.38) !important; color: #fff; }
html body #video-theater .vp-ask-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { gap: 5px; padding: 0 10px 0 7px; }
html body #video-theater .vp-ask-label:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { font: 600 12.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html body #video-theater #vc-cp.vp-flash:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { color: #34d399; background: rgba(16,185,129,.22) !important; }
html body #video-theater #vc-cp.vp-saving:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { opacity: .6; }
.vp-badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 9px; background: #10b981; color: #04130c; font: 800 10px/15px system-ui, sans-serif; text-align: center; pointer-events: none; }
.vp-badge[hidden] { display: none; }
@media (max-width: 640px) { .vp-ask-label { display: none; } html body #video-theater .vp-ask-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { padding: 0 6px; } }

/* ---- note dots on the seek bar ---- */
.vp-markers { position: absolute; left: 6px; right: 6px; top: 50%; height: 0; pointer-events: none; z-index: 3; }
.vp-dot { position: absolute; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }

/* ---- in-player toast (visible in fullscreen too) ---- */
.vp-toast { position: absolute; left: 50%; bottom: 84px; z-index: 60; max-width: min(88%, 420px); transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
            padding: 9px 14px; border-radius: 10px; background: rgba(8,10,16,.94); border: 1px solid rgba(255,255,255,.16); color: #f1f5f9; font: 600 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; transition: opacity .18s ease, transform .18s ease; }
.vp-toast.vp-show { opacity: 1; transform: translate(-50%, 0); }
.vp-toast.vp-ok { border-color: rgba(52,211,153,.55); color: #a7f3d0; }
.vp-toast.vp-warn { border-color: rgba(251,191,36,.55); color: #fde68a; }
.vp-toast.vp-error { border-color: rgba(248,113,113,.6); color: #fecaca; }
#video-theater:fullscreen .vp-toast, #video-theater.vc-pseudo-fs .vp-toast { bottom: 110px; }

/* ---- panel: side drawer on desktop, bottom sheet on a phone ---- */
.vp-panel { position: absolute; top: 10px; right: 10px; bottom: 84px; z-index: 50; width: min(372px, calc(100% - 20px)); display: flex; flex-direction: column; overflow: hidden;
            background: #0e1119; border: 1px solid rgba(255,255,255,.1); border-radius: 18px;
            box-shadow: 0 18px 48px rgba(0,0,0,.55); color: #e5e7eb; font: 400 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; animation: vpIn .18s ease-out both; }
.vp-panel[hidden], .vp-sec[hidden], .vp-resume[hidden], .vp-status[hidden], .vp-link[hidden], .vp-count[hidden], .vp-quick[hidden], .vp-note-time[hidden] { display: none !important; }
#video-theater:fullscreen .vp-panel, #video-theater.vc-pseudo-fs .vp-panel { top: 14px; right: 14px; bottom: 110px; width: min(404px, calc(100% - 28px)); }
@keyframes vpIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.vp-panel *, .vp-panel *::before, .vp-panel *::after { box-sizing: border-box; }
.vp-grip { display: none; }

/* header: segmented tabs + close */
.vp-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; flex: none; }
.vp-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); }
.vp-tab { appearance: none; flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #94a3b8; font: 700 13px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.vp-tab svg { width: 15px; height: 15px; flex: none; }
.vp-tab:hover { color: #e2e8f0; }
.vp-tab[aria-selected="true"] { background: #4f46e5; color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.45); }
.vp-count { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: rgba(16,185,129,.28); color: #6ee7b7; font: 800 10.5px/16px system-ui, sans-serif; text-align: center; }
.vp-tab[aria-selected="true"] .vp-count { background: rgba(255,255,255,.22); color: #fff; }
.vp-x { appearance: none; flex: none; border: 0; background: rgba(255,255,255,.06); color: #cbd5e1; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; cursor: pointer; }
.vp-x:hover { background: rgba(255,255,255,.14); color: #fff; }
.vp-x svg { width: 17px; height: 17px; }

.vp-sec { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 12px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#vp-sec-ask { overflow-y: auto; }

/* inputs + buttons */
.vp-input { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #f8fafc; padding: 10px 12px; font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; resize: none; outline: none; }
.vp-input::placeholder { color: #8391a7; }
.vp-input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,.25); }
.vp-btn { appearance: none; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #f1f5f9; padding: 0 16px; height: 38px; border-radius: 11px; font: 700 13px/1 system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.vp-btn:hover { background: rgba(255,255,255,.16); }
.vp-btn:disabled { opacity: .55; cursor: default; }
.vp-btn-green { background: #059669; border-color: #10b981; color: #fff; } .vp-btn-green:hover { background: #10b981; }
.vp-btn-ind { background: #4f46e5; border-color: #6366f1; color: #fff; } .vp-btn-ind:hover { background: #6366f1; }
.vp-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.vp-link { appearance: none; background: none; border: 0; padding: 4px 0; color: #a5b4fc; font: 600 12px/1.2 system-ui, sans-serif; cursor: pointer; }
.vp-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.vp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vp-card { border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 10px; }

/* on/off switch (replaces the plain checkboxes) */
.vp-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #b6c2d3; font: 500 12.5px/1.2 system-ui, sans-serif; user-select: none; min-height: 32px; }
.vp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vp-sw { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: rgba(255,255,255,.2); transition: background .15s; }
.vp-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .15s; }
.vp-switch input:checked + .vp-sw { background: #10b981; }
.vp-switch input:checked + .vp-sw::after { transform: translateX(14px); }
.vp-switch input:focus-visible + .vp-sw { outline: 2px solid #a5b4fc; outline-offset: 2px; }

/* notes */
.vp-composer { display: flex; flex-direction: column; gap: 8px; }
.vp-stamp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.vp-stamp { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 12.5px; }
.vp-stamp-ico { font-size: 12px; }
.vp-stamp b { font: 800 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: #6ee7b7; }
.vp-stamp.vp-locked b::after { content: " \1F4CC"; font-size: 11px; }
.vp-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vp-list-head { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; color: #7d8aa0; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.vp-list { display: flex; flex-direction: column; gap: 8px; }
.vp-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; text-align: center; color: #94a3b8; font-size: 12.5px; }
.vp-empty b { color: #e2e8f0; font-size: 13px; }
.vp-note { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.vp-note.vp-cur { border-color: rgba(52,211,153,.55); background: rgba(16,185,129,.09); }
.vp-note-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vp-time { appearance: none; flex: none; border: 1px solid rgba(52,211,153,.35); background: rgba(16,185,129,.16); color: #6ee7b7; padding: 4px 9px; border-radius: 999px; font: 800 11.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.vp-time:hover { background: #059669; color: #fff; }
.vp-note-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vp-note-text { margin: 0; color: #e5e7eb; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.vp-edit { font-size: 14px; resize: vertical; }
.vp-tools { flex: none; display: flex; gap: 4px; }
.vp-ico { appearance: none; border: 0; background: rgba(255,255,255,.07); color: #cbd5e1; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; font: 700 11px/1 system-ui, sans-serif; }
.vp-ico:hover { background: rgba(255,255,255,.16); color: #fff; }
.vp-ico svg { width: 15px; height: 15px; }
.vp-ico.vp-danger { background: #b91c1c; color: #fff; }
.vp-foot { margin: 2px 0 0; color: #7d8aa0; font-size: 11.5px; text-align: center; }

/* ask */
.vp-askbar { flex: none; display: flex; align-items: center; gap: 10px; }
.vp-askbar .vp-switch { min-height: 28px; flex: none; }
.vp-ctx-t { display: none; }
.vp-stop { align-self: flex-start; }
.vp-ctx { flex: 1; min-width: 0; color: #94a3b8; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-ctx b { color: #a5b4fc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.vp-seg { flex: none; display: inline-flex; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.07); }
.vp-seg-btn { appearance: none; border: 0; background: transparent; color: #b6c2d3; height: 28px; padding: 0 11px; border-radius: 8px; font: 700 12px/1 system-ui, sans-serif; cursor: pointer; }
.vp-seg-btn[aria-pressed="true"] { background: #4f46e5; color: #fff; }
.vp-chat { flex: 1; min-height: 72px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 4px; }
.vp-hello { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: auto 0; padding: 18px 14px; border-radius: 16px; background: rgba(99,102,241,.1); border: 1px solid rgba(129,140,248,.22); color: #c7d2fe; font-size: 12.5px; text-align: center; }
.vp-hello-ico { font-size: 20px; }
.vp-hello b { color: #fff; font-size: 14px; } .vp-hello span:last-child { color: #b6c2d3; }
.vp-msg { display: flex; flex-direction: column; gap: 3px; max-width: 90%; }
.vp-msg.vp-user { align-self: flex-end; align-items: flex-end; }
.vp-msg.vp-assistant { align-self: flex-start; align-items: flex-start; }
.vp-bubble { padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.vp-user .vp-bubble { background: #4f46e5; color: #fff; border-bottom-right-radius: 5px; }
.vp-assistant .vp-bubble { background: rgba(255,255,255,.08); color: #f1f5f9; border-bottom-left-radius: 5px; }
.vp-at { font: 600 10.5px ui-monospace, monospace; color: #7d8aa0; }
.vp-say { font-size: 11.5px; }
.vp-typing { display: inline-flex; gap: 4px; align-items: center; }
.vp-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: vpDot 1s infinite ease-in-out; }
.vp-typing i:nth-child(2) { animation-delay: .15s; } .vp-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes vpDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.vp-quick { flex: none; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vp-quick::-webkit-scrollbar { display: none; }
.vp-chip { appearance: none; flex: none; border: 1px solid rgba(129,140,248,.4); background: rgba(99,102,241,.12); color: #c7d2fe; height: 32px; padding: 0 12px; border-radius: 999px; font: 600 12px/1 system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.vp-chip:hover { background: rgba(99,102,241,.3); color: #fff; }
.vp-status { flex: none; padding: 8px 11px; border-radius: 10px; background: rgba(255,255,255,.07); color: #cbd5e1; font-size: 12.5px; }
.vp-status.vp-live { background: rgba(239,68,68,.16); color: #fecaca; }
.vp-status.vp-warn { background: rgba(245,158,11,.15); color: #fde68a; }
.vp-status.vp-error { background: rgba(239,68,68,.18); color: #fecaca; }
.vp-ask-form { flex: none; display: flex; gap: 6px; align-items: center; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.vp-ask-form:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,.2); }
.vp-q { flex: 1; min-width: 0; height: 40px; padding: 0 6px; }
.vp-mic, .vp-send { appearance: none; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.vp-mic { background: rgba(99,102,241,.22); color: #e0e7ff; }
.vp-mic svg, .vp-send svg { width: 19px; height: 19px; }
.vp-mic:hover { background: rgba(99,102,241,.45); }
.vp-mic.vp-live { background: #dc2626; color: #fff; animation: vpPulse 1.2s infinite; }
.vp-mic.vp-nomic { opacity: .5; }
.vp-send { background: #4f46e5; color: #fff; } .vp-send:hover { background: #6366f1; } .vp-send:disabled { opacity: .5; cursor: default; }
@keyframes vpPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); } }
.vp-resume { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #b6c2d3; font-size: 12.5px; }

.vp-panel :focus-visible { outline: 2px solid #a5b4fc; outline-offset: 1px; }

/* phone held upright: a bottom sheet over the lower part of the picture */
@media (max-width: 720px) {
    .vp-panel, #video-theater:fullscreen .vp-panel, #video-theater.vc-pseudo-fs .vp-panel { top: auto; left: 0; right: 0; width: 100%; height: min(70%, 560px); bottom: 64px; border-width: 1px 0 0; border-radius: 20px 20px 0 0; animation: vpUp .2s ease-out both; }
    @keyframes vpUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
    .vp-grip { display: block; flex: none; width: 38px; height: 4px; margin: 7px auto 0; border-radius: 2px; background: rgba(255,255,255,.22); }
    .vp-head { padding-top: 6px; }
    .vp-tab { height: 38px; } .vp-x { width: 40px; height: 40px; }
    .vp-btn { height: 42px; } .vp-sm { height: 36px; }
    .vp-ico { min-width: 38px; height: 38px; }
    .vp-sec { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .vp-toast { bottom: 72px; }
}
/* phone turned sideways: a narrow side drawer again */
@media (max-height: 480px) and (orientation: landscape) {
    .vp-panel, #video-theater:fullscreen .vp-panel, #video-theater.vc-pseudo-fs .vp-panel { top: 6px; right: 6px; left: auto; bottom: 62px; width: min(46%, 380px); height: auto; border-width: 1px; border-radius: 16px; animation: vpIn .18s ease-out both; }
    .vp-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vp-panel, .vp-toast, .vp-mic.vp-live, .vp-typing i, .vp-sw, .vp-sw::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   THEME-PROOFING — the panel is always dark (it sits on the video). main.css / graphics.css have global
   `.light-theme p / label / span / input / textarea { color … !important }` rules, so the colours that matter are
   restated here with an id in the selector (an id beats any number of classes).
   ===================================================================== */
#video-theater #vp-panel { color: #e5e7eb; }
#vp-panel .vp-switch, #vp-panel .vp-switch-label, #vp-panel .vp-seg-btn { color: #b6c2d3 !important; }
#vp-panel .vp-seg-btn[aria-pressed="true"] { color: #fff !important; }
#vp-panel .vp-stamp, #vp-panel .vp-stamp-ico { color: #94a3b8 !important; }
#vp-panel .vp-stamp b { color: #6ee7b7 !important; }
#vp-panel .vp-note-text { color: #e5e7eb !important; }
#vp-panel .vp-empty, #vp-panel .vp-empty span { color: #94a3b8 !important; }
#vp-panel .vp-empty b { color: #e2e8f0 !important; }
#vp-panel .vp-list-head, #vp-panel .vp-list-head span { color: #7d8aa0 !important; }
#vp-panel .vp-foot, #vp-panel .vp-at { color: #7d8aa0 !important; }
#vp-panel .vp-ctx { color: #94a3b8 !important; }
#vp-panel .vp-ctx b { color: #a5b4fc !important; }
#vp-panel .vp-hello { color: #c7d2fe !important; }
#vp-panel .vp-hello b { color: #fff !important; }
#vp-panel .vp-hello span { color: #b6c2d3 !important; }
#vp-panel .vp-count { color: #6ee7b7 !important; }
#vp-panel .vp-tab[aria-selected="true"] .vp-count { color: #fff !important; }
#vp-panel .vp-tab, #vp-panel .vp-tab span { color: #94a3b8 !important; }
#vp-panel .vp-tab[aria-selected="true"], #vp-panel .vp-tab[aria-selected="true"] span { color: #fff !important; }
#vp-panel .vp-resume span { color: #b6c2d3 !important; }
#vp-panel .vp-link { color: #a5b4fc !important; }
#vp-panel .vp-user .vp-bubble { color: #fff !important; }
#vp-panel .vp-assistant .vp-bubble { color: #f1f5f9 !important; }
#vp-panel .vp-chip { color: #c7d2fe !important; }
#vp-panel .vp-btn, #vp-panel .vp-ico { color: #f1f5f9 !important; }
#vp-panel .vp-btn-green, #vp-panel .vp-btn-ind, #vp-panel .vp-send { color: #fff !important; }
#vp-panel .vp-time { color: #6ee7b7 !important; }
#vp-panel .vp-time:hover { color: #fff !important; }
#vp-panel .vp-status { color: #cbd5e1 !important; }
#vp-panel .vp-status.vp-live, #vp-panel .vp-status.vp-error { color: #fecaca !important; }
#vp-panel .vp-status.vp-warn { color: #fde68a !important; }
#vp-panel .vp-typing i { background: #94a3b8 !important; }
#vp-toast.vp-toast { color: #f1f5f9 !important; }
#vp-toast.vp-toast.vp-ok { color: #a7f3d0 !important; } #vp-toast.vp-toast.vp-warn { color: #fde68a !important; } #vp-toast.vp-toast.vp-error { color: #fecaca !important; }
#video-theater .vp-ask-label, #video-theater .vp-badge { color: inherit !important; }
#video-theater .vp-badge { color: #04130c !important; }
/* inputs: graphics.css restyles every input/textarea with several :not(#id) — match that weight */
#video-theater #vp-panel .vp-input:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) {
    background-color: rgba(255,255,255,.06) !important; background-image: none !important; color: #f8fafc !important; border: 1px solid rgba(255,255,255,.16) !important; box-shadow: none !important;
      border-radius: 12px !important; }
#video-theater #vp-panel .vp-input:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):focus { border-color: #818cf8 !important; box-shadow: 0 0 0 3px rgba(129,140,248,.28) !important; }
#video-theater #vp-panel #vp-note-input:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):focus { border-color: #34d399 !important; box-shadow: 0 0 0 3px rgba(52,211,153,.24) !important; }
#video-theater #vp-panel .vp-input:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8)::placeholder { color: #8391a7 !important; opacity: 1; }
/* the question field sits inside the rounded bar, so it has no box of its own */
#video-theater #vp-panel .vp-ask-form .vp-q:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { background-color: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 999px !important; }
#video-theater #vp-panel .vp-ask-form .vp-q:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):focus { box-shadow: none !important; }
@media (max-width: 720px) { #video-theater #vp-panel .vp-input:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { font-size: 16px !important; } }   /* 16px stops iPhones zooming in on focus */

/* the Ask AI button must be as wide as its label */
html body #video-theater .vp-ask-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { width: auto; flex: none; display: inline-flex; align-items: center; }

/* =====================================================================
   FLOATING WATERMARKS — smaller and much fainter (they still drift around and still name the account).
   Beats sessions.css / liquid-glass.css / main.css (all !important) by id count.
   ===================================================================== */
#video-theater #video-watermark-teacher:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8), #video-theater #video-watermark-student:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8),
.light-theme #video-theater #video-watermark-teacher:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8), .light-theme #video-theater #video-watermark-student:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) {
    font-size: 9px !important; font-weight: 700 !important; letter-spacing: .04em !important;
    color: rgba(255,255,255,.26) !important;
    text-shadow: 0 0 2px rgba(0,0,0,.55) !important;
    padding: 0 4px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 4px !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
@media (max-width: 767px) {
    #video-theater #video-watermark-teacher:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8), #video-theater #video-watermark-student:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8),
    .light-theme #video-theater #video-watermark-teacher:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8), .light-theme #video-theater #video-watermark-student:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { font-size: 7px !important; padding: 0 3px !important; }
}

/* =====================================================================
   SPEED EDITOR — the menu behind the "1x" button: readout, fine slider (0.05x), -/+ and quick presets
   ===================================================================== */
html body #video-theater #vc-speed-menu:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { width: min(290px, 86vw); min-width: 0; padding: 12px; }
#vc-speed-menu .vp-sp { display: flex; flex-direction: column; gap: 10px; }
#vc-speed-menu .vp-sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#vc-speed-menu .vp-sp-head span { color: #94a3b8 !important; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
#vc-speed-menu .vp-sp-head output { color: #fff !important; font: 800 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
#vc-speed-menu .vp-sp-row { display: flex; align-items: center; gap: 8px; }
html body #video-theater #vc-speed-menu .vp-sp-step:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.09) !important; color: #fff; font: 700 20px/1 system-ui, sans-serif; }
html body #video-theater #vc-speed-menu .vp-sp-step:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):hover { background: rgba(255,255,255,.18) !important; }
html body #video-theater #vc-speed-menu .vp-sp-step:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):disabled { opacity: .35; cursor: default; }
#vc-speed-menu .vp-sp-range { flex: 1; min-width: 0; width: 100%; height: 32px; }
#vc-speed-menu .vp-sp-range::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(to right, #818cf8, #a78bfa var(--p), rgba(255,255,255,.22) var(--p)); }
#vc-speed-menu .vp-sp-range::-moz-range-track { height: 6px; background: rgba(255,255,255,.22); }
#vc-speed-menu .vp-sp-range::-moz-range-progress { height: 6px; }
#vc-speed-menu .vp-sp-range::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; opacity: 1; }
#vc-speed-menu .vp-sp-range::-moz-range-thumb { width: 20px; height: 20px; opacity: 1; }
#vc-speed-menu .vp-sp-scale { display: flex; justify-content: space-between; margin: -6px 46px 0; }
#vc-speed-menu .vp-sp-scale span { color: #7d8aa0 !important; font: 600 10.5px/1 ui-monospace, monospace; }
#vc-speed-menu .vp-sp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
html body #video-theater #vc-speed-menu .vp-sp-chip:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { display: inline-flex; width: auto; justify-content: center; gap: 0; padding: 0 11px; height: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.06) !important; color: #e2e8f0; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
html body #video-theater #vc-speed-menu .vp-sp-chip:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8):hover { background: rgba(255,255,255,.16) !important; color: #fff; }
html body #video-theater #vc-speed-menu .vp-sp-chip.on:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { background: #4f46e5 !important; border-color: #6366f1; color: #fff; font-weight: 800; }
html body #video-theater #vc-speed-menu .vp-sp-chip.on:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8)::after { content: none; }
html body #video-theater #vc-speed-menu .vp-sp-chip[hidden]:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { display: none; }
#vc-speed-menu .vp-sp-note { margin: 0; color: #94a3b8 !important; font: 500 11.5px/1.35 system-ui, sans-serif; }
#vc-speed-menu .vp-sp-note[hidden] { display: none; }
@media (max-width: 640px) {
    html body #video-theater #vc-speed-menu:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { width: min(300px, 92vw); }
    html body #video-theater #vc-speed-menu .vp-sp-step:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { width: 42px; height: 42px; }
    html body #video-theater #vc-speed-menu .vp-sp-chip:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7):not(#_8) { height: 36px; padding: 0 13px; }
}
/* =====================================================================
   FRAME BY FRAME + SMART RESUME
   ===================================================================== */
/* frame-step buttons: only while the session is paused (also while scrubbing, which pauses it) */
html body #video-theater .vc-frames:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { display: none; align-items: center; gap: 0; }
html body #video-theater.vc-is-paused .vc-frames:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { display: inline-flex; }
html body #video-theater .vc-frame-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { min-width: 32px; padding: 0 4px; touch-action: manipulation; }
html body #video-theater .vc-frame-btn svg:not(#_1):not(#_2):not(#_3) { width: 16px; height: 16px; }
/* phones: the bar has no room for two more buttons, so they float as a small pill just above it while paused */
@media (max-width: 640px) {
    html body #video-theater.vc-is-paused .vc-frames:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) {
        position: absolute; right: 6px; bottom: calc(100% + 46px); z-index: 45; padding: 2px; border-radius: 9999px;
        background: rgba(6, 10, 22, .88); border: 1px solid rgba(255, 255, 255, .18); }
    html body #video-theater .vc-frame-btn:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { min-width: 44px; height: 40px; }
    html body #video-theater .vc-frame-btn svg:not(#_1):not(#_2):not(#_3) { width: 18px; height: 18px; }
}
/* the time bubble above the thumb while scrubbing: larger, and shows mm:ss.frame */
html body #video-theater .vc-tip:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5):not(#_6):not(#_7) { font-variant-numeric: tabular-nums; }

/* "Continued from 12:24 - Start over" */
.vp-resume-note { position: absolute; left: 50%; bottom: 84px; z-index: 61; max-width: min(92%, 460px); display: flex; align-items: center; gap: 8px;
                  padding: 8px 8px 8px 14px; border-radius: 12px; background: rgba(8,10,16,.95); border: 1px solid rgba(129,140,248,.55); color: #e0e7ff;
                  font: 600 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.vp-resume-note.vp-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.vp-rn-btn { flex: none; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: #6366f1; color: #fff; font: 700 12.5px/1 system-ui, sans-serif; cursor: pointer; }
.vp-rn-btn:hover { background: #818cf8; }
.vp-rn-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #a5b4fc; font-size: 20px; line-height: 1; cursor: pointer; }
.vp-rn-x:hover { background: rgba(255,255,255,.1); }
#video-theater:fullscreen .vp-resume-note, #video-theater.vc-pseudo-fs .vp-resume-note { bottom: 110px; }
@media (max-width: 640px) { .vp-resume-note { bottom: 72px; } }
.vp-autoresume { display: flex; justify-content: center; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .vp-resume-note { transition: none; } }
/* theme sheets recolour text inside the player: keep the banner readable, and keep it clear of the open study panel */
html body #video-theater .vp-resume-note:not(#_1):not(#_2):not(#_3):not(#_4), html body #video-theater .vp-resume-note .vp-rn-txt:not(#_1):not(#_2):not(#_3):not(#_4):not(#_5) { color: #e0e7ff !important; }
html body #video-theater .vp-resume-note .vp-rn-btn:not(#_1):not(#_2):not(#_3):not(#_4) { color: #fff !important; }
#video-theater.vp-has-panel .vp-resume-note { left: 14px; max-width: calc(100% - 420px); transform: translate(0, 8px); }
#video-theater.vp-has-panel .vp-resume-note.vp-show { transform: none; }
@media (max-width: 640px) { #video-theater.vp-has-panel .vp-resume-note { max-width: calc(100% - 28px); bottom: auto; top: 10px; } }