:root {
  --bg: #0f0e0c; --panel: #171512; --panel2: #1e1b17; --line: #2b2722; --line2: #3a352e;
  --text: #ece6dc; --dim: #9a9186; --faint: #6b645b;
  --accent: #f2b45a; --accent-ink: #1a1307; --good: #7cc48a; --bad: #e0705f; --sel: rgba(242,180,90,.16);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
.top { height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.brand img { width: 24px; height: 24px; }
.title { color: var(--dim); font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.ghost { background: none; border-color: transparent; color: var(--dim); padding: 4px 8px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.f { background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 10px 12px; width: 100%; outline: none; resize: none; }
.f:focus { border-color: var(--accent); }
.muted { color: var(--dim); } .faint { color: var(--faint); }
select.vsel { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; color: var(--text); }

.rv { display: grid; grid-template-columns: 1fr 420px; height: calc(100% - 52px); }
.player { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 8px; min-height: 0; border-right: 1px solid var(--line); }
.stage { position: relative; height: calc(100vh - 172px); aspect-ratio: 9 / 16; max-width: 100%; background: #000; border-radius: 12px; overflow: hidden; cursor: pointer; }
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage:fullscreen { border-radius: 0; height: 100%; width: 100%; }
.bigplay { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(15,14,12,.62); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.bigplay svg { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
.flash { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(15,14,12,.5); color: #fff; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.flash svg { width: 26px; height: 26px; fill: currentColor; }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
.ctl { width: calc((100vh - 172px) * 9 / 16); max-width: 100%; display: grid; gap: 4px; }
.ctl .row { display: flex; align-items: center; gap: 4px; }
.ctl .sp { flex: 1; }
.ib { width: 38px; height: 38px; border: 0; background: none; color: var(--text); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.ib:hover { background: var(--panel2); }
.ib svg { width: 20px; height: 20px; fill: currentColor; }
.ib.txt { width: auto; padding: 0 9px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.time { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; margin-left: 4px; }
.time b { color: var(--text); font-weight: 600; }
.scrub { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.scrub .rail { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.scrub:hover .rail { top: 10px; height: 6px; }
.scrub .buf, .scrub .prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.scrub .buf { background: rgba(236,230,220,.18); }
.scrub .prog { background: var(--accent); }
.scrub .head { position: absolute; top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.marks { position: absolute; left: 0; right: 0; top: 0; height: 8px; }
.marks i { position: absolute; top: 0; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--good); border: 1.5px solid var(--bg); cursor: pointer; }
.marks i.new { background: var(--accent); }
.tip { position: absolute; bottom: 26px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 6px; font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none; white-space: nowrap; }
.tip.on { opacity: 1; }
.pinbtn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); background: var(--panel2); border-radius: 8px; padding: 5px 9px; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 700; }
.pinbtn svg { width: 15px; height: 15px; fill: var(--dim); }
.pinbtn.on { border-color: var(--accent); color: var(--accent); }
.pinbtn.on svg { fill: var(--accent); }
.small { font-size: 12.5px; }
.who { width: 140px; padding: 6px 10px; }
.note.now { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.side { display: flex; flex-direction: column; min-height: 0; }
.notes { flex: 1; overflow: auto; min-height: 0; }
.note { padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.note:hover { background: var(--panel); }
.note .h { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.note .h .sp { flex: 1; }
.note .tc { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.note .tx { margin-top: 4px; line-height: 1.45; white-space: pre-wrap; }
.note.done .tx { color: var(--faint); text-decoration: line-through; }
.note .rp { margin-top: 6px; font-size: 13px; color: var(--dim); border-left: 2px solid var(--line2); padding-left: 8px; }
.tag { font-size: 11.5px; border: 1px solid var(--line2); border-radius: 5px; padding: 1px 6px; color: var(--dim); }
.tag.sent { color: var(--accent); border-color: rgba(242,180,90,.4); }
.tag.done { color: var(--good); border-color: rgba(124,196,138,.4); }
.compose { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 8px; background: var(--panel); }
.compose .row { display: flex; gap: 8px; align-items: center; }
.compose .row .sp { flex: 1; }
.empty { padding: 18px 16px; color: var(--faint); }
.banner { padding: 10px 16px; background: var(--sel); border-bottom: 1px solid var(--line); font-size: 14px; }
.loading, .gone { padding: 40px 20px; color: var(--dim); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); padding: 10px 16px; border-radius: 10px; z-index: 9; }
body.home main { max-width: 520px; margin: 18vh auto 0; padding: 0 20px; }
body.home h1 { margin: 14px 0 6px; letter-spacing: -.02em; }
body.home p { color: var(--dim); line-height: 1.5; }

@media (max-width: 860px) {
  .rv { display: block; height: auto; }
  .player { border-right: 0; padding: 0 0 6px; }
  .stage { height: 64vh; width: auto; margin: 0 auto; border-radius: 0; }
  .ctl { width: 100%; padding: 0 12px; }
  .notes { overflow: visible; }
  .compose { position: sticky; bottom: 0; }
}
.bigplay[hidden] { display: none; }
.ib.txt.on { color: var(--accent); }
#send { margin-left: 4px; }
@media (max-width: 520px) {
  .top { gap: 8px; padding: 0 10px; }
  .brand span.bn { display: none; }
  #send { padding: 7px 10px; font-size: 13.5px; }
}
