:root{--ink:#14202e;--sub:#5b6878;--line:#dfe4ea;--bg:#f5f7fa;--brand:#1f3a5f;--accent:#2563eb;--red:#dc2626;--ok:#15803d;--warn:#b45309}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;color:var(--ink);background:var(--bg);font-size:15px;line-height:1.45}
nav{display:flex;gap:1.2rem;align-items:center;padding:.7rem 1.4rem;background:var(--brand)}
nav a{color:#dbe6f5;text-decoration:none;font-weight:500}nav a:hover{color:#fff}
nav .brand{color:#fff;font-weight:700;margin-right:auto;letter-spacing:.2px}
nav .rec{color:#fecaca}
main{max-width:1400px;margin:0 auto;padding:1.4rem}
h1{font-size:1.45rem;margin:0 0 .8rem}h2{font-size:1.1rem;margin:0 0 .6rem}
.sub{color:var(--sub);font-size:.88rem}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:1.2rem 1.3rem;margin-bottom:1rem}
.narrow{max-width:380px;margin:3rem auto}
label{display:block;font-weight:600;font-size:.88rem;margin:.7rem 0 .25rem}
input[type=text],input[type=password],input[type=number],textarea,select{width:100%;padding:.55rem .65rem;border:1px solid #cbd3dc;border-radius:7px;font:inherit;background:#fff}
textarea{min-height:140px;resize:vertical}
.chk{display:flex;gap:.5rem;align-items:center;font-weight:500}.chk input{width:auto}
.btn{display:inline-flex;align-items:center;gap:.35rem;padding:.55rem 1rem;border:0;border-radius:7px;background:var(--accent);color:#fff;font:inherit;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:hover{filter:brightness(1.08)}.btn:disabled{opacity:.5;cursor:default}
.btn.sec{background:#e8edf3;color:var(--ink)}.btn.red{background:var(--red)}.btn.ok{background:var(--ok)}.btn.sm{padding:.32rem .65rem;font-size:.85rem}
.err{color:var(--red);font-size:.9rem}.okmsg{color:var(--ok)}
.msg{padding:.6rem .8rem;border-radius:7px;margin:.6rem 0;font-size:.92rem}
.msg.err{background:#fef2f2;border:1px solid #fecaca}.msg.warn{background:#fffbeb;border:1px solid #fde68a;color:#78350f}.msg.ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#14532d}
.row{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.spacer{flex:1}
/* library */
.lib{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}
.vcard{background:#fff;border:1px solid var(--line);border-radius:10px;padding:1rem;display:flex;flex-direction:column;gap:.4rem}
.vcard h3{margin:0;font-size:1rem}
.pill{display:inline-block;padding:.1rem .5rem;border-radius:99px;font-size:.75rem;font-weight:600;background:#eef2f7;color:var(--sub)}
.pill.ready{background:#dcfce7;color:#166534}.pill.failed{background:#fee2e2;color:#991b1b}.pill.busy{background:#fef3c7;color:#92400e}.pill.share{background:#dbeafe;color:#1e40af}
/* recorder */
.recwrap{display:grid;grid-template-columns:minmax(300px,420px) 1fr;gap:1rem;align-items:start}
.live{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}
.dot{width:14px;height:14px;border-radius:50%;background:var(--red);animation:pulse 1.2s infinite}.dot.paused{background:var(--warn);animation:none}
@keyframes pulse{50%{opacity:.35}}
.timer{font-size:1.6rem;font-variant-numeric:tabular-nums;font-weight:700}
.meter{height:8px;background:#e5e7eb;border-radius:4px;overflow:hidden;margin:.6rem 0}.meter i{display:block;height:100%;width:0;background:var(--ok);transition:width .1s}
.prev{width:100%;border-radius:8px;background:#000;margin-top:.6rem}
.prompter{background:#0f172a;color:#f8fafc;border-radius:10px;padding:0;position:relative;height:calc(100vh - 140px);min-height:360px;display:flex;flex-direction:column}
.prompter .bar{display:flex;gap:.5rem;align-items:center;padding:.5rem .7rem;border-bottom:1px solid #1e293b;flex-wrap:wrap}
.prompter .bar .btn.sec{background:#1e293b;color:#e2e8f0}
.prompter .text{flex:1;overflow-y:auto;padding:1.2rem 1.6rem 60vh;white-space:pre-wrap;line-height:1.55;font-size:30px}
.prompter .guide{position:absolute;left:0;right:0;top:34%;border-top:2px solid rgba(250,204,21,.35);pointer-events:none}
/* editor */
.ed{display:grid;grid-template-columns:minmax(380px,1.1fr) 1fr;gap:1rem;align-items:start}
.ed .left{position:sticky;top:.8rem}
.ed video{width:100%;background:#000;border-radius:8px}
.stats{display:flex;gap:1rem;flex-wrap:wrap;font-size:.88rem;color:var(--sub);margin:.5rem 0}
.stats b{color:var(--ink)}
.tools{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin:.5rem 0}
.tools input[type=number]{width:4.6rem;padding:.3rem .4rem}
.tx{background:#fff;border:1px solid var(--line);border-radius:10px;padding:1rem 1.2rem;max-height:calc(100vh - 120px);overflow-y:auto;font-size:1.02rem;line-height:1.9;user-select:text}
.tx p{margin:0 0 .8rem}
.w{cursor:pointer;border-radius:3px;padding:1px 0}
.w:hover{background:#eef2ff}
.w.cut{color:#9aa4b2;text-decoration:line-through;text-decoration-color:var(--red);background:#fff1f2}
.w.now{background:#fde68a}
.w.fill{color:var(--warn)}
.gap{display:inline-block;font-size:.72rem;padding:0 .35rem;margin:0 .15rem;border-radius:4px;background:#eef2f7;color:var(--sub);cursor:pointer;line-height:1.5;vertical-align:middle;user-select:none}
.gap.cut{background:#fee2e2;color:#b91c1c;text-decoration:line-through}
.timeline{position:relative;height:14px;background:#e5e7eb;border-radius:4px;margin:.5rem 0;cursor:pointer;overflow:hidden}
.timeline .c{position:absolute;top:0;bottom:0;background:rgba(220,38,38,.55)}
.timeline .ph{position:absolute;top:0;bottom:0;width:2px;background:var(--ink)}
.timeline .mk{position:absolute;top:0;bottom:0;background:rgba(37,99,235,.35)}
.kbd{font-family:ui-monospace,monospace;font-size:.78rem;background:#eef2f7;border:1px solid var(--line);border-radius:4px;padding:0 .3rem}
.share video{width:100%;max-height:78vh;background:#000;border-radius:8px}
.share{max-width:1100px;margin:0 auto}
details summary{cursor:pointer;font-weight:600}
@media (max-width:900px){.ed,.recwrap{grid-template-columns:1fr}.ed .left{position:static}.prompter{height:60vh}}
