/* ---------------------------------------------------------------- review layer (play + recordings) */
.reviewbtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.mediarow { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--bg); margin-top: 6px; cursor: pointer; }
.mediarow:hover { outline: 1px solid var(--line); }
.mkind { font-size: 18px; }

.review-layer { position: fixed; inset: 0; z-index: 50; background: #0b0d12; display: flex; flex-direction: column; color: var(--text, #e8eaf0); }
.rv-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rv-top .grow { flex: 1; }
.rv-body { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.rv-stage { display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 10px; min-width: 0; min-height: 0; gap: 8px; }
.gameframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #000; }
.rvvideo { width: 100%; max-height: calc(100vh - 130px); background: #000; border-radius: 8px; outline: none; }
.rv-side { border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; padding: 10px 12px; }
.rv-side h4 { margin: 4px 0 8px; }
.sidehead { display: flex; justify-content: space-between; align-items: center; }
.clock { font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.06); }
.recdot { color: #ff3b5c; font-size: 12px; font-weight: 700; }
.recdot.off { color: var(--dim); opacity: .5; }
.notebtn { background: #ffb547; color: #1b1405; border-color: #ffb547; font-weight: 600; }

.trackwrap { display: grid; gap: 4px; }
.track { position: relative; height: 14px; border-radius: 7px; background: rgba(255,255,255,.08); }
.mark { position: absolute; top: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #ffb547; cursor: pointer; border: 2px solid #0b0d12; }
.mark.st-addressed { background: #5b9dff; }
.mark.st-approved { background: #3fbf7f; }
.mark.st-wontfix { background: #777; }

.notelist { display: grid; gap: 8px; }
.notelist .empty { padding: 8px; }
.notecard { background: var(--bg); border-radius: 10px; padding: 8px; cursor: pointer; border-left: 3px solid #ffb547; display: grid; gap: 6px; }
.notecard.st-addressed { border-left-color: #5b9dff; }
.notecard.st-approved { border-left-color: #3fbf7f; opacity: .8; }
.notecard.st-wontfix { border-left-color: #777; opacity: .6; }
.notehead { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ntime { font-family: ui-monospace, Consolas, monospace; background: rgba(255,181,71,.15); color: #ffb547; padding: 1px 6px; border-radius: 5px; }
.noteimg { width: 100%; border-radius: 6px; display: block; }
.notebody { white-space: pre-wrap; }
.noteactions { display: flex; gap: 6px; align-items: center; }
.noteactions select { flex: 1; }
.ticket { font-weight: 600; cursor: pointer; }
button.small { font-size: 12px; padding: 3px 8px; }
pre.state { max-height: 160px; overflow: auto; font-size: 11px; background: rgba(0,0,0,.3); padding: 6px; border-radius: 6px; margin: 4px 0 0; }
canvas.markup { width: 100%; border-radius: 8px; cursor: crosshair; touch-action: none; display: block; margin: 6px 0; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 900px) { .rv-body { grid-template-columns: 1fr; grid-template-rows: 1fr 40vh; } .rv-side { border-left: 0; border-top: 1px solid var(--line); } }

.modal-bg { z-index: 60; }
.toast { z-index: 70; }
.notecard { min-width: 0; }
.notehead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* versions */
.mediarow .grow { flex: 1; min-width: 0; }
.mediarow .mkind { font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 700; color: #ffb547; }
.pill.vst-review { background: rgba(91,157,255,.18); color: #8fb8ff; }
.pill.vst-changes { background: rgba(229,83,75,.18); color: #ff8a80; }
.pill.vst-approved { background: rgba(63,191,127,.18); color: #6fdca3; }
.vlabel { font-family: ui-monospace, Consolas, monospace; color: #ffb547; }
.vstatus { display: inline-flex; gap: 6px; align-items: center; }
.vstatus button { font-size: 12px; padding: 3px 8px; }
button.approve { background: #3fbf7f; border-color: #3fbf7f; color: #062014; font-weight: 600; }
.vdesc { background: rgba(255,255,255,.05); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.carried { margin-top: 14px; display: grid; gap: 8px; }
.carried h4 { margin: 6px 0 0; }
.carried .notecard { opacity: .85; }
.fixlist { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.fixnote { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 8px; background: var(--bg); cursor: pointer; }
.fixnote span:nth-child(3) { flex: 1; }
.versel { max-width: 260px; }

/* client review */
.mtags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.tag.client { background: rgba(255,122,89,.18); color: #ffb199; border-radius: 6px; padding: 1px 6px; font-size: 11px; }
button.shared { border-color: #ff7a59; color: #ffb199; }
.cversions { margin-bottom: 14px; }
.cversions .list { display: grid; gap: 6px; }
.decided summary { cursor: pointer; color: var(--dim); margin: 8px 0; }
.wmwrap { position: relative; }
.wmwrap .rvvideo { display: block; }
.watermark { position: absolute; inset: 0 0 48px 0; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: space-around;
  justify-content: space-around; transform: rotate(-18deg) scale(1.3); opacity: .16; color: #fff; font-size: 14px; font-weight: 600; user-select: none; }
.watermark span { padding: 18px 28px; white-space: nowrap; }

.wmwrap { overflow: hidden; border-radius: 8px; }
.watermark { inset: 0 0 56px 0; transform: none; }
.watermark span { transform: rotate(-18deg); }

.rv-top { flex-wrap: nowrap; min-width: 0; }
.rv-top button, .rv-top .tag, .rv-top .pill, .rv-top b { white-space: nowrap; flex: 0 0 auto; }
.rv-top > .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }

/* client show home */
.showgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; padding: 0 24px; margin: 6px 0 18px; }
.showcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px;
  background-image: linear-gradient(135deg, rgba(255,122,89,.10), rgba(91,157,255,.08)); }
.showhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.showhead h3 { margin: 2px 0 0; }
.showprog { display: grid; gap: 4px; }
.showprog .bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.showprog .bar span { display: block; height: 100%; background: linear-gradient(90deg, #3fbf7f, #8be0b1); border-radius: 4px; }
.contacts { display: grid; gap: 6px; }
.faces { display: flex; gap: 12px; flex-wrap: wrap; }
.face { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.newslist { display: grid; gap: 8px; }
.news { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.news.clickable { cursor: pointer; }
.news.clickable:hover { border-color: rgba(255,255,255,.25); }
.nposter { width: 120px; border-radius: 6px; flex: 0 0 auto; }
.nbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar.studio { display: inline-grid; place-items: center; background: rgba(255,255,255,.08); border-radius: 50%; width: 28px; height: 28px; }
.mposter { width: 96px; border-radius: 6px; flex: 0 0 auto; }
.mposter.small { width: 64px; }

.holdnote { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,181,71,.10); border: 1px solid rgba(255,181,71,.35); display: grid; gap: 4px; white-space: pre-wrap; }

/* live scene review */
.livesetup { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.livesetup a { cursor: pointer; }
button.live { background: #e5534b; border-color: #e5534b; color: #fff; font-weight: 600; }
.pill.live { background: #e5534b; color: #fff; font-weight: 700; animation: livepulse 2s infinite; }
@keyframes livepulse { 50% { opacity: .6; } }
.tag.shotcam { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.tag.shotcam.free { background: rgba(91,157,255,.25); color: #bcd6ff; }
.livewrap { position: relative; flex: 1; min-height: 0; background: #000; border-radius: 8px; overflow: hidden; }
.livevideo { position: absolute; inset: 0; }
.livevideo video { width: 100% !important; height: 100% !important; object-fit: contain; }
.livestatus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 15px; text-align: center; padding: 20px; }
.flyhelp { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #dbe7ff;
  padding: 6px 12px; border-radius: 8px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.hidden { display: none !important; }
.transport { display: flex; align-items: center; gap: 8px; }
.transport button { min-width: 36px; }
.ltrack { position: relative; flex: 1; height: 30px; border-radius: 6px; background: rgba(255,255,255,.06); cursor: pointer; touch-action: none; }
.lshots { position: absolute; inset: 0; }
.lshot { position: absolute; top: 0; bottom: 0; border-right: 2px solid #0b0d12; background: rgba(91,157,255,.18); color: #9fbfff;
  font-size: 10px; padding: 2px 6px; overflow: hidden; white-space: nowrap; }
.lshot:nth-child(2n) { background: rgba(255,181,71,.16); color: #ffcf8a; }
.lmarks { position: absolute; left: 0; right: 0; bottom: 2px; height: 12px; }
.lhead { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px #000; pointer-events: none; }

.livewrap { cursor: grab; outline: none; }
.livewrap.dragging { cursor: none; }
.flyhelp.dim { opacity: .55; }
.flyhud { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.55); color: #cfe0ff; padding: 4px 10px; border-radius: 6px;
  font: 12px ui-monospace, Consolas, monospace; pointer-events: none; }
.flyprefs { position: relative; font-size: 12px; }
.flyprefs summary { cursor: pointer; list-style: none; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.06); }
.flypop { position: absolute; right: 0; bottom: 34px; background: #161a22; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  padding: 8px 12px; display: grid; gap: 6px; white-space: nowrap; z-index: 5; }
.flypop label { display: flex; align-items: center; gap: 6px; }

/* exact (lossless) frame over the stream */
.exactframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.exacttag { position: absolute; left: 10px; top: 10px; background: rgba(46,160,67,.85); color: #fff; padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600; pointer-events: none; }
.exactlink { display: block; color: #6fdc8c; }

.packsel { max-width: 260px; font-size: 12px; }
.tag.packtag { background: rgba(255,255,255,.08); padding: 0 6px; border-radius: 5px; font-size: 11px; margin-left: 6px; }

.exacttag.render { background: rgba(196, 128, 22, .92); }
.rendertag { position: absolute; right: 10px; top: 10px; background: rgba(20, 22, 28, .88); color: #f3c47a; padding: 4px 10px; border-radius: 6px;
  font-size: 13px; pointer-events: none; border: 1px solid rgba(243, 196, 122, .4); }
.rendersize { margin-left: -4px; }

/* phone: the player header is one nowrap row wider than the screen; let it scroll sideways so Note and close are reachable */
@media (max-width: 900px) { .rv-top { overflow-x: auto; scrollbar-width: none; } }
/* reserve the frame before video metadata loads so the caption and marker strip do not jump */
.rvvideo { aspect-ratio: 16 / 9; }

/* ---------------------------------------------------------------- SyncSketch-grade animation review player */
.review-layer.rv-anim { background: #111214; color: #e2e4e9; }
.rv-anim-top { background: #14161a; gap: 8px; padding: 6px 12px; min-height: 44px; border-bottom: 1px solid #2a2d34; }
.rv-ename { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.rv-hmeta { font-family: ui-monospace, Consolas, monospace; font-size: 11px; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.06); color: #aeb3be; }
.rv-author { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.rv-anim-body { flex: 1; display: grid; grid-template-columns: 1fr 356px; min-height: 0; overflow: hidden; }
.rv-anim-body.nopanel { grid-template-columns: 1fr 0; }
.rv-anim-body.nopanel .rv-anim-side { display: none; }

.rv-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0e0f10; }
.rv-tools { display: flex; align-items: center; gap: 3px; padding: 5px 8px; background: #1a1c21; border-bottom: 1px solid #2a2d34; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-height: 40px; }
.rv-toolgroup { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.rv-sep { display: inline-block; width: 1px; height: 20px; background: #30343d; margin: 0 2px; flex: 0 0 auto; }

.rv-tb { height: 28px; min-width: 26px; padding: 0 7px; border-radius: 5px; border: 1px solid transparent; background: transparent; color: #d8dce4; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
.rv-tb:hover:not(:disabled) { background: #262932; }
.rv-tb:disabled { opacity: .38; cursor: default; }
.rv-tb.on { background: #253855; border-color: #426ca8; color: #dbeaff; }
.rv-tb-caret { padding: 0 5px; min-width: 22px; margin-left: -4px; }
.rv-tb kbd, .rv-popover kbd, .rv-keys-sheet kbd { font: 10px ui-monospace, Consolas, monospace; color: #99a0ad; border: 1px solid #353944; border-radius: 3px; padding: 0 4px; background: rgba(0,0,0,.25); }
.rv-playbtn { min-width: 34px; font-weight: 700; }
.rv-zoom-lbl { font-family: ui-monospace, Consolas, monospace; font-size: 11px; min-width: 36px; text-align: center; }

.rv-sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); padding: 0; cursor: pointer; flex: 0 0 auto; }
.rv-sw.on { border-color: #fff; box-shadow: 0 0 0 1px #000; transform: scale(1.1); }
.rv-swap { position: relative; padding: 0 7px; gap: 6px; }
.rv-swap-a, .rv-swap-b { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #fff; }
.rv-swap-b { margin-left: -9px; margin-top: 5px; border-color: #222; }
.rv-size-lbl { font-family: ui-monospace, Consolas, monospace; font-size: 11px; min-width: 32px; text-align: center; color: #cfd3dc; }
.rv-op-wrap { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #a7adb9; margin-left: 2px; white-space: nowrap; }
.rv-op-range { width: 52px; accent-color: #4c9bff; }
.rv-op-lbl { font-family: ui-monospace, Consolas, monospace; min-width: 30px; }
.rv-cmpsel { height: 28px; font-size: 12px; padding: 0 6px; background: #22252c; border: 1px solid #353944; color: #e2e4e9; border-radius: 5px; }
.rv-badge-cnt { background: #ffb020; color: #1a1204; border-radius: 9px; padding: 0 5px; font-size: 10px; font-weight: 700; }

.rv-descbar { display: flex; gap: 12px; align-items: center; padding: 5px 12px; background: #16181c; border-bottom: 1px solid #252830; font-size: 12px; color: #b7bcc7; flex-wrap: wrap; }
.rv-desc-txt { color: #d9dde6; }

/* Viewport & stage */
.rv-anim .watermark { inset: 0; z-index: 4; }
.rv-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; background: #0e0f10; user-select: none; }
.rv-viewport.panning { cursor: grabbing; }
.rv-stage-box { position: relative; background: #000; border-radius: 4px; overflow: hidden; box-shadow: 0 8px 36px rgba(0,0,0,.55); transform-origin: center center; }
.rv-vid { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.rv-novid { padding: 32px; text-align: center; }
.rv-overlay-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.rv-draw-cv.drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }

/* Compare layer */
.rv-cmp { position: absolute; inset: 0; display: grid; place-items: center; background: #0e0f10; overflow: hidden; }
.rv-cmp.side { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.rv-cmp.side .rv-cmp-pane { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; background: #000; border-radius: 4px; overflow: hidden; display: grid; place-items: center; }
.rv-cmp.wipe .rv-cmp-pane { position: absolute; inset: 8px; display: grid; place-items: center; overflow: hidden; }
.rv-cmp.wipe .rv-vid { width: 100%; height: 100%; object-fit: contain; }
.rv-wipebar { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: 50%; cursor: ew-resize; z-index: 6; box-shadow: 0 0 8px rgba(0,0,0,.8); touch-action: none; }
.rv-wipebar::after { content: "⟷"; position: absolute; top: 50%; left: -14px; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 13px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.6); }
.rv-vtag { position: absolute; top: 42px; z-index: 5; font-size: 12px; font-weight: 600; background: rgba(14,15,18,.82); color: #eef2f8; padding: 3px 9px; border-radius: 5px; border: 1px solid rgba(255,255,255,.14); pointer-events: none; }
.rv-vtag-left { left: 12px; }
.rv-vtag-right { right: 12px; }

/* HUD overlays */
.rv-hud { position: absolute; z-index: 5; font-size: 11px; color: #d3d7df; background: rgba(12,14,18,.78); border: 1px solid rgba(255,255,255,.10); border-radius: 5px; padding: 3px 8px; pointer-events: none; backdrop-filter: blur(4px); }
.rv-hud-tl { left: 10px; top: 10px; }
.rv-hud-tr { right: 10px; top: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.rv-hud-bl { left: 10px; bottom: 10px; display: flex; gap: 10px; align-items: center; }
.rv-hud-bc { left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: #fff; background: rgba(20,24,32,.92); }
.rv-leg-item { display: inline-flex; align-items: center; gap: 4px; }
.rv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.rv-dot-before { background: #e0605a; }
.rv-dot-after { background: #53c27a; }

/* Onion skins popover */
.rv-popover { position: absolute; left: 12px; top: 10px; width: 258px; background: #1d2026; border: 1px solid #353944; border-radius: 8px; padding: 11px 12px; z-index: 12; box-shadow: 0 14px 36px rgba(0,0,0,.65); font-size: 12px; color: #dde1e8; }
.rv-popover h5 { margin: 0 0 8px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.rv-prow { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; gap: 8px; }
.rv-pop-note { color: #8c92a0; font-size: 11px; padding-top: 6px; border-top: 1px solid #2b2f38; margin-top: 4px; }
.rv-pop-slider { display: inline-flex; align-items: center; gap: 6px; }
.rv-pop-slider input { width: 92px; accent-color: #4c9bff; }
.rv-pop-val { font-family: ui-monospace, Consolas, monospace; font-size: 11px; min-width: 30px; text-align: right; }
.rv-pop-chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rv-seg { display: inline-flex; border: 1px solid #353944; border-radius: 4px; overflow: hidden; }
.rv-seg button { padding: 2px 7px; font-size: 11px; border: 0; border-radius: 0; background: #16181d; color: #9ea4b2; cursor: pointer; }
.rv-seg button:hover { background: #262a33; color: #fff; }
.rv-seg button.on { background: #2a4164; color: #fff; font-weight: 600; }

/* Timeline & frame ruler */
.rv-tl { background: #191b20; border-top: 1px solid #2a2d34; padding: 6px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.rv-transport { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.rv-transport .grow { flex: 1; }
.rv-ff { width: 64px; height: 28px; padding: 2px 6px; font: 12px ui-monospace, Consolas, monospace; text-align: center; background: #101216; border: 1px solid #343843; border-radius: 5px; color: #f0f2f6; }
.rv-tl-mut { font-size: 11px; color: #8c93a2; white-space: nowrap; }
.rv-tc { font: 12px ui-monospace, Consolas, monospace; color: #c7cdd9; padding: 2px 7px; background: rgba(255,255,255,.05); border-radius: 4px; white-space: nowrap; }
.rv-fps-badge { padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.04); }
.rv-speed { height: 28px; font-size: 12px; padding: 0 6px; background: #101216; border: 1px solid #343843; color: #e2e4e9; border-radius: 5px; }
.rv-range-lbl { margin-left: 4px; }

.rv-ruler { position: relative; height: 46px; background: #111317; border: 1px solid #2e323c; border-radius: 5px; overflow: hidden; cursor: pointer; touch-action: none; outline: none; }
.rv-ruler:focus-visible { border-color: #4c9bff; }
.rv-ticks, .rv-nums, .rv-marks, .rv-nranges { position: absolute; inset: 0; pointer-events: none; }
.rv-marks { pointer-events: auto; }
.rv-tick { position: absolute; bottom: 0; width: 1px; height: 9px; background: #2f333d; }
.rv-tick.major { height: 17px; background: #525866; }
.rv-num { position: absolute; top: 2px; font: 10px ui-monospace, Consolas, monospace; color: #8b91a0; transform: translateX(3px); white-space: nowrap; }

.rv-range { position: absolute; top: 0; bottom: 0; background: rgba(76,155,255,.16); border-left: 2px solid #4c9bff; border-right: 2px solid #4c9bff; pointer-events: none; }
.rv-rhandle { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; pointer-events: auto; }
.rv-rhandle-in { left: -6px; }
.rv-rhandle-out { right: -6px; }

.rv-og { position: absolute; bottom: 0; height: 5px; pointer-events: none; }
.rv-og-before { background: rgba(224,96,90,.65); }
.rv-og-after { background: rgba(83,194,122,.65); }

.rv-nrange { position: absolute; bottom: 5px; height: 4px; border-radius: 2px; background: rgba(255,181,71,.55); }
.rv-nrange.st-addressed { background: rgba(91,157,255,.55); }
.rv-nrange.st-approved { background: rgba(63,191,127,.55); }
.rv-nrange.st-wontfix { background: rgba(130,130,130,.45); }
.rv-nrange.sel { height: 6px; filter: brightness(1.3); }

.rv-mk { position: absolute; width: 10px; height: 10px; padding: 0; border: 1.5px solid #0e0f10; border-radius: 2px; transform: translateX(-5px) rotate(45deg); background: #ffb547; cursor: pointer; z-index: 3; }
.rv-mk.st-addressed { background: #5b9dff; }
.rv-mk.st-approved { background: #3fbf7f; }
.rv-mk.st-wontfix { background: #777; }
.rv-mk.has-ink { box-shadow: 0 0 0 1px rgba(255,255,255,.55); }
.rv-mk.sel { border-color: #fff; transform: translateX(-5px) rotate(45deg) scale(1.25); z-index: 4; }

.rv-ph { position: absolute; top: 0; bottom: 0; width: 2px; background: #ff4d4d; pointer-events: none; z-index: 5; }
.rv-ph::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 7px solid #ff4d4d; }
.rv-hovertip { position: absolute; top: 2px; transform: translateX(-50%); background: rgba(0,0,0,.85); color: #fff; font: 10px ui-monospace, Consolas, monospace; padding: 1px 5px; border-radius: 3px; pointer-events: none; z-index: 6; white-space: nowrap; }

/* Notes panel */
.rv-anim-side { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: #191b20; border-left: 1px solid #2a2d34; }
.rv-side-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 4px; }
.rv-side-head h4 { margin: 0; font-size: 13px; }
.rv-filters { display: flex; gap: 5px; flex-wrap: wrap; padding: 4px 12px 9px; border-bottom: 1px solid #2a2d34; }
.rv-chip { font-size: 11px; padding: 2px 9px; border-radius: 12px; background: #23262e; color: #9ea4b2; border: 1px solid #323642; cursor: pointer; }
.rv-chip:hover { color: #e6e9ef; }
.rv-chip.on { background: #243652; border-color: #466ea8; color: #fff; font-weight: 600; }

.rv-side-scroll { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.rv-notelist { display: grid; gap: 8px; }
.rv-ncard { padding: 8px 9px; border-radius: 8px; background: #13151a; border: 1px solid #262933; border-left: 3px solid #ffb547; }
.rv-ncard.sel { background: #1a2434; border-color: #3b5a8a; border-left-color: #4c9bff; }
.rv-ncard-top { display: flex; gap: 9px; align-items: flex-start; }
.rv-nthumb { position: relative; width: 88px; height: 50px; border-radius: 4px; overflow: hidden; background: #000; flex: 0 0 auto; border: 1px solid #2d313c; }
.rv-nthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-nfr { position: absolute; left: 3px; bottom: 2px; font: 10px ui-monospace, Consolas, monospace; background: rgba(0,0,0,.78); color: #ffd180; padding: 0 4px; border-radius: 2px; }
.rv-ncard-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.rv-nbadge { font: 10px ui-monospace, Consolas, monospace; background: rgba(76,155,255,.16); color: #99c5ff; padding: 1px 5px; border-radius: 4px; }
.rv-nbadge.ink { background: rgba(255,176,32,.18); color: #ffc65c; }
.rv-anim .avatar.s20 { width: 20px; height: 20px; min-width: 20px; font-size: 9px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.rv-nlinks { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.rv-linkbtn { background: transparent; border: 0; padding: 0; color: #8c94a5; font-size: 11px; cursor: pointer; }
.rv-linkbtn:hover { color: #e8ecf4; text-decoration: underline; background: transparent; }
.rv-linkbtn.danger { background: transparent; border: 0; color: #c77676; }
.rv-linkbtn.danger:hover { color: #ff8585; background: transparent; }
.rv-st-sel { font-size: 11px; padding: 2px 6px; }

.rv-replies { margin-top: 4px; padding-left: 10px; border-left: 2px solid #2e323d; display: grid; gap: 6px; }
.rv-reply { font-size: 12px; color: #cbd0db; display: grid; gap: 2px; }
.rv-reply-head { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.rv-reply-head .grow { flex: 1; }
.rv-edit-box, .rv-reply-compose { display: grid; gap: 5px; margin-top: 4px; }
.rv-edit-ta { width: 100%; font: inherit; font-size: 12px; background: #0e1014; color: #e8ecf4; border: 1px solid #353a47; border-radius: 5px; padding: 5px 7px; resize: vertical; }
.rv-edit-btns { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.rv-edit-btns .grow { flex: 1; }

.rv-carried summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #b7becb; padding: 4px 0; }
.rv-carried-hint { margin-bottom: 6px; }
.rv-carried-list { display: grid; gap: 6px; }

/* Docked compose */
.rv-compose { border-top: 1px solid #2a2d34; padding: 9px 10px; background: #1e2027; display: grid; gap: 6px; position: relative; }
.rv-compose-ta { width: 100%; min-height: 54px; max-height: 120px; background: #121419; border: 1px solid #343844; border-radius: 6px; color: #eceff5; padding: 6px 8px; font: inherit; font-size: 12.5px; resize: vertical; }
.rv-compose-ta:focus { outline: none; border-color: #4c9bff; }
.rv-crow { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #9aa1b0; }
.rv-crow .grow { flex: 1; }
.rv-compose-meta { font-family: ui-monospace, Consolas, monospace; color: #b7c0d2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-compose-client { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; color: #ffb199; }
.rv-savebtn { font-size: 12px; padding: 4px 11px; white-space: nowrap; }

/* Shortcut sheet modal */
.rv-keys-overlay { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; }
.rv-keys-sheet { background: #1b1d23; border: 1px solid #343845; border-radius: 10px; padding: 16px 20px; width: min(860px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.75); }
.rv-keys-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rv-keys-head h3 { margin: 0; font-size: 15px; }
.rv-keys-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rv-keys-cols h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: #8c93a3; margin: 0 0 6px; }
.rv-kr { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #272a33; font-size: 12px; }

@media (max-width: 960px) {
  .rv-anim-body { grid-template-columns: 1fr; grid-template-rows: 1fr 44vh; }
  .rv-anim-body.nopanel { grid-template-rows: 1fr 0; }
  .rv-anim-side { border-left: 0; border-top: 1px solid #2a2d34; }
  .rv-keys-cols { grid-template-columns: 1fr; }
}
