/* ClipVault v2.5 landing-page look, scoped under #clipvault-root */
#clipvault-root{
  --v:#5b21ff; --b:#0096ff; --c:#00d7ff; --c2:#72ffff;
  --grad:linear-gradient(120deg,#5b21ff 0%,#0096ff 52%,#00d7ff 100%);
  --grad-soft:linear-gradient(120deg,rgba(91,33,255,.10),rgba(0,215,255,.13));
  --glow:rgba(74,54,255,.34);

  --bg:#f6f7ff; --surface:#ffffff; --soft:#f4f6ff;
  --ink:#0f1220; --mut:#5c6480; --mut2:#9aa1bd;
  --line:#eceffa; --line2:#e0e4f2;
  --accent:#5b21ff; --accent-d:#4a17e0; --accent-soft:#efeaff;
  --danger:#e5484d;
  --cv-pexels:#16a37b; --cv-pixabay:#38a838;
  --r:14px; --rs:11px; --ease:cubic-bezier(.2,.75,.2,1);
  --shadow:0 1px 2px rgba(20,24,60,.04),0 10px 30px rgba(20,24,60,.06);
  --shadow-s:0 1px 2px rgba(20,24,60,.05);
  --shadow-lift:0 24px 60px -28px rgba(50,40,140,.4);

  position:relative; color:var(--ink);
  background:
    radial-gradient(700px 480px at 50% -10%, rgba(124,58,237,.14), transparent 62%),
    radial-gradient(560px 460px at 0% 108%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(560px 460px at 100% 108%, rgba(168,85,247,.14), transparent 60%),
    linear-gradient(180deg,#efeafc 0%,#f1ecfb 55%,#efeafc 100%);
  font-family:'Roboto',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
  border-radius:22px; padding:52px 28px 56px; display:block; overflow:hidden;
}
#clipvault-root *{box-sizing:border-box}
#clipvault-root a{color:inherit;text-decoration:none}
#clipvault-root button{font-family:inherit}
#clipvault-root button,#clipvault-root input,#clipvault-root select,#clipvault-root textarea{text-transform:none;letter-spacing:normal;line-height:normal}
#clipvault-root ::selection{background:var(--accent-soft)}

/* header */
#clipvault-root .cv-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#clipvault-root .cv-brand{display:flex;align-items:center;gap:11px}
#clipvault-root .cv-mark{width:36px;height:36px;border-radius:10px;flex:none;background:var(--grad);
  display:grid;place-items:center;color:#fff;box-shadow:0 8px 20px -6px var(--glow)}
#clipvault-root .cv-mark svg{width:19px;height:19px}
#clipvault-root .cv-brand h2{font-size:17px;font-weight:700;letter-spacing:-.02em;margin:0;line-height:1}
#clipvault-root .cv-brand .cv-tag{font-size:11.5px;color:var(--mut2);margin-top:3px}
#clipvault-root .cv-manage{background:var(--surface);border:1px solid var(--line2);color:var(--ink);
  padding:9px 14px;border-radius:var(--rs);font-size:12.5px;font-weight:600;cursor:pointer;
  display:inline-flex;align-items:center;gap:8px;box-shadow:var(--shadow-s);transition:transform .18s var(--ease),box-shadow .18s var(--ease),border-color .18s}
#clipvault-root .cv-manage:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 10px 22px -12px var(--glow)}
#clipvault-root .cv-manage svg{width:15px;height:15px;color:var(--accent)}
#clipvault-root .cv-manage .kdot{width:6px;height:6px;border-radius:50%;background:var(--danger)}
#clipvault-root .cv-manage .kdot.ok{background:var(--cv-pixabay)}

/* hero */
#clipvault-root .cv-hero{text-align:center;max-width:760px;margin:46px auto 34px}
#clipvault-root .cv-eyebrow{display:inline-flex;align-items:center;gap:8px;background:#fff;color:var(--accent);border:1px solid #e6ddff;
  font-size:11.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;padding:7px 15px;border-radius:999px;margin-bottom:20px;box-shadow:var(--shadow-s)}
#clipvault-root .cv-eyebrow i{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:cvpulse 2.2s infinite}
@keyframes cvpulse{0%{box-shadow:0 0 0 0 rgba(91,33,255,.45)}70%{box-shadow:0 0 0 7px rgba(91,33,255,0)}100%{box-shadow:0 0 0 0 rgba(91,33,255,0)}}
#clipvault-root .cv-hero h1{font-weight:900;letter-spacing:-.04em;font-size:clamp(36px,6.2vw,60px);line-height:1.03;margin:0 0 16px}
#clipvault-root .cv-hero h1 .g{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
#clipvault-root .cv-hero p{margin:0 auto;color:var(--mut);font-size:16.5px;line-height:1.6;max-width:600px}
#clipvault-root .cv-herobtns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:28px}
#clipvault-root .cv-herobtns .cv-btn{width:auto;padding:14px 26px}
#clipvault-root .cv-ghostbtn{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:#fff;border:1px solid var(--line2);
  color:var(--ink);font-weight:700;font-size:15px;padding:14px 26px;border-radius:13px;cursor:pointer;box-shadow:var(--shadow-s);
  transition:transform .2s var(--ease),box-shadow .22s var(--ease),border-color .18s}
#clipvault-root .cv-ghostbtn:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 14px 28px -16px var(--glow)}
#clipvault-root .cv-ghostbtn svg{width:16px;height:16px;color:var(--accent)}

/* scroll reveal */
#clipvault-root .cv-uprow{display:flex;align-items:center;gap:12px;margin:11px 2px 0;flex-wrap:wrap}
#clipvault-root .cv-upbtn{display:inline-flex;align-items:center;gap:8px;background:var(--surface);border:1px dashed var(--line2);color:var(--accent);
  font-weight:600;font-size:12.5px;padding:8px 14px;border-radius:10px;cursor:pointer;transition:all .16s var(--ease)}
#clipvault-root .cv-upbtn:hover{border-color:var(--accent);background:var(--accent-soft);transform:translateY(-1px)}
#clipvault-root .cv-upbtn svg{width:15px;height:15px}
#clipvault-root .cv-upname{font-size:12px;color:var(--mut)}

#clipvault-root .cv-dd{position:relative;display:inline-block}
#clipvault-root .cv-dd-btn{display:inline-flex;align-items:center;gap:9px;background:var(--surface);border:1px solid var(--line2);color:var(--ink);
  border-radius:10px;padding:8px 12px;font-size:13px;font-family:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s}
#clipvault-root .cv-dd-btn:hover{border-color:var(--accent)}
#clipvault-root .cv-dd.open .cv-dd-btn{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
#clipvault-root .cv-dd-btn .chev{display:grid;place-items:center;color:var(--mut2);transition:transform .2s var(--ease)}
#clipvault-root .cv-dd-btn .chev svg{width:14px;height:14px}
#clipvault-root .cv-dd.open .cv-dd-btn .chev{transform:rotate(180deg)}
#clipvault-root .cv-dd-panel{position:absolute;top:calc(100% + 8px);left:0;min-width:calc(100% + 24px);background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:0 22px 50px -18px rgba(60,40,140,.32);padding:6px;z-index:60;
  opacity:0;transform:translateY(-6px) scale(.98);transform-origin:top left;pointer-events:none;transition:opacity .18s var(--ease),transform .18s var(--ease)}
#clipvault-root .cv-dd.open .cv-dd-panel{opacity:1;transform:none;pointer-events:auto}
#clipvault-root .cv-dd-opt{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 12px;border-radius:9px;font-size:13.5px;color:var(--ink);cursor:pointer;white-space:nowrap;transition:background .13s}
#clipvault-root .cv-dd-opt:hover{background:var(--soft)}
#clipvault-root .cv-dd-opt.sel{color:var(--accent);font-weight:600}
#clipvault-root .cv-dd-opt.sel::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);flex:none}
#clipvault-root .cv-reveal{opacity:0;transform:translateY(34px);transition:opacity 1s cubic-bezier(.22,1,.36,1),transform 1s cubic-bezier(.22,1,.36,1)}
#clipvault-root .cv-reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){#clipvault-root .cv-reveal{opacity:1;transform:none}}

/* key banner */
#clipvault-root .cv-adminbar{background:var(--surface);border:1px solid var(--line2);color:var(--mut);
  padding:11px 16px;border-radius:12px;font-size:13px;margin:0 auto 22px;max-width:640px;display:none;text-align:center;box-shadow:var(--shadow-s)}
#clipvault-root .cv-adminbar b{cursor:pointer;color:var(--accent);font-weight:700}
#clipvault-root .cv-adminbar b:hover{text-decoration:underline}

/* panel = floating product card */
#clipvault-root .cv-panel{background:var(--surface);border:1px solid var(--line);border-radius:22px;
  padding:8px;box-shadow:var(--shadow-lift);max-width:760px;margin:0 auto}
#clipvault-root .cv-tabs{display:flex;gap:4px;padding:8px 8px 0}
#clipvault-root .cv-tab{border:none;background:none;color:var(--mut);font-weight:600;font-size:13.5px;
  padding:9px 16px;border-radius:10px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:all .16s var(--ease)}
#clipvault-root .cv-tab svg{width:15px;height:15px}
#clipvault-root .cv-tab:hover{color:var(--ink);background:var(--soft)}
#clipvault-root .cv-tab.on{color:#fff;background:var(--grad);box-shadow:0 8px 18px -8px var(--glow)}
#clipvault-root .cv-body{padding:14px 16px 16px}
#clipvault-root .cv-pane{display:none}
#clipvault-root .cv-pane.on{display:block}

#clipvault-root .cv-script{width:100%;min-height:140px;resize:vertical;background:var(--soft);
  border:1px solid var(--line2);border-radius:13px;padding:14px 15px;color:var(--ink);font-size:14.5px;line-height:1.6;
  font-family:inherit;outline:none;transition:border-color .16s,box-shadow .16s,background .16s}
#clipvault-root .cv-script:focus{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 4px var(--accent-soft)}
#clipvault-root .cv-script::placeholder{color:var(--mut2)}
#clipvault-root .cv-hint{font-size:12.5px;color:var(--mut2);margin:11px 2px 14px;display:flex;align-items:center;gap:7px}
#clipvault-root .cv-hint svg{width:14px;height:14px;color:var(--accent)}

#clipvault-root .cv-field{display:flex;align-items:center;gap:10px;background:var(--soft);
  border:1px solid var(--line2);border-radius:13px;padding:0 15px;transition:border-color .16s,box-shadow .16s,background .16s;margin-bottom:14px}
#clipvault-root .cv-field:focus-within{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 4px var(--accent-soft)}
#clipvault-root .cv-field svg{width:18px;height:18px;color:var(--mut2);flex:none}
#clipvault-root .cv-field input{flex:1;background:none;border:none;outline:none;color:var(--ink);font-size:15px;padding:14px 0;font-family:inherit}
#clipvault-root .cv-field input::placeholder{color:var(--mut2)}

/* gradient button with hover animation */
#clipvault-root .cv-btn{width:100%;background:var(--grad);background-size:170% 170%;color:#fff;border:none;font-weight:700;font-size:15px;
  padding:15px 22px;border-radius:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px;
  box-shadow:0 12px 26px -12px var(--glow);
  transition:transform .22s var(--ease),box-shadow .28s var(--ease),background-position .6s var(--ease)}
#clipvault-root .cv-btn:hover{transform:translateY(-2px);background-position:100% 50%;box-shadow:0 20px 40px -14px var(--glow)}
#clipvault-root .cv-btn:active{transform:translateY(0)}
#clipvault-root .cv-btn:disabled{opacity:.55;cursor:default;transform:none;box-shadow:none}
#clipvault-root .cv-btn svg{width:16px;height:16px}

/* tools */
#clipvault-root .cv-tools{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
#clipvault-root .cv-quick{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
#clipvault-root .cv-chip{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line2);
  color:var(--mut);border-radius:999px;padding:7px 13px 7px 11px;font-size:12.5px;font-weight:500;cursor:pointer;
  transition:transform .16s var(--ease),border-color .16s,color .16s,box-shadow .16s}
#clipvault-root .cv-chip svg{width:13px;height:13px;color:var(--mut2);transition:color .16s}
#clipvault-root .cv-chip:hover{transform:translateY(-2px);border-color:var(--accent);color:var(--accent);box-shadow:0 8px 16px -10px var(--glow)}
#clipvault-root .cv-chip:hover svg{color:var(--accent)}

#clipvault-root .cv-filters{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center}
#clipvault-root .cv-fg{display:flex;align-items:center;gap:8px}
#clipvault-root .cv-fl{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--mut2);font-weight:700;white-space:nowrap}
#clipvault-root select.cv-mini{background:var(--surface);border:1px solid var(--line2);color:var(--ink);border-radius:9px;
  padding:8px 9px;font-size:13px;font-family:inherit;outline:none;cursor:pointer;transition:border-color .15s}
#clipvault-root select.cv-mini:focus{border-color:var(--accent)}
#clipvault-root .cv-pill{display:inline-flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--line2);
  color:var(--ink);border-radius:9px;padding:8px 12px;font-size:13px;cursor:pointer;user-select:none;transition:all .16s var(--ease)}
#clipvault-root .cv-pill .d{width:8px;height:8px;border-radius:50%}
#clipvault-root .cv-pill:hover{border-color:var(--accent);transform:translateY(-1px)}
#clipvault-root .cv-pill.off{opacity:.45}
#clipvault-root .cv-pill.soon{cursor:not-allowed;opacity:.65;background:var(--soft)}
#clipvault-root .cv-pill.soon:hover{transform:none;border-color:var(--line2)}
#clipvault-root .cv-pill .soontag{font-size:9.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#fff;
  background:var(--mut2);padding:2px 6px;border-radius:5px;margin-left:2px}

/* results */
#clipvault-root .cv-results{max-width:1080px;margin:36px auto 0}
#clipvault-root .cv-status{display:flex;align-items:center;gap:10px;margin:0 2px 18px;font-size:13px;color:var(--mut);min-height:20px}
#clipvault-root .cv-status .cnt{color:var(--ink);font-weight:700}

/* scene */
#clipvault-root .cv-scene{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:16px;box-shadow:var(--shadow-s);animation:cvIn .4s var(--ease) both}
#clipvault-root .cv-scene-head{display:flex;align-items:baseline;gap:10px;margin-bottom:15px;flex-wrap:wrap}
#clipvault-root .cv-scene-num{color:#fff;background:var(--grad);font-weight:700;font-size:12px;padding:4px 10px;border-radius:7px;letter-spacing:.01em}
#clipvault-root .cv-scene-label{font-weight:600;color:var(--ink);font-size:14.5px}
#clipvault-root .cv-scene-q{color:var(--mut2);font-size:12.5px;margin-left:auto}
#clipvault-root .cv-scene-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(206px,1fr));gap:14px}
#clipvault-root .cv-scene-empty{color:var(--mut2);font-size:13px;padding:8px 2px}

/* keyword grid */
#clipvault-root .cv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:16px}

/* card */
@keyframes cvIn{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
#clipvault-root .cv-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:visible;position:relative;
  display:flex;flex-direction:column;transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s;animation:cvIn .45s var(--ease) both}
#clipvault-root .cv-card:has(.cv-dd.open){z-index:60}
#clipvault-root .cv-card:hover{transform:translateY(-4px);border-color:var(--line2);box-shadow:var(--shadow-lift)}
#clipvault-root .cv-thumb{position:relative;aspect-ratio:16/9;background:var(--soft);overflow:hidden;border-radius:13px 13px 0 0}
#clipvault-root .cv-thumb img,#clipvault-root .cv-thumb video{width:100%;height:100%;object-fit:cover;display:block;margin:0}
#clipvault-root .cv-thumb video{position:absolute;inset:0;opacity:0;transition:opacity .28s}
#clipvault-root .cv-card:hover .cv-thumb video{opacity:1}
#clipvault-root .cv-badge{position:absolute;background:rgba(15,18,32,.74);color:#fff;font-size:11px;font-weight:600;padding:3px 7px;border-radius:6px;backdrop-filter:blur(3px)}
#clipvault-root .cv-badge.dur{bottom:7px;right:7px;font-variant-numeric:tabular-nums}
#clipvault-root .cv-badge.res{bottom:7px;left:7px}
#clipvault-root .cv-srclabel{position:absolute;top:7px;left:7px;display:flex;align-items:center;gap:6px;
  background:rgba(255,255,255,.94);color:var(--ink);padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600;box-shadow:var(--shadow-s)}
#clipvault-root .cv-srclabel .d{width:7px;height:7px;border-radius:50%}
#clipvault-root .cv-cardbody{padding:10px 11px 11px;display:flex;flex-direction:column;gap:9px}
#clipvault-root .cv-meta{font-size:12px;color:var(--mut);line-height:1.35;min-height:16px;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
#clipvault-root .cv-actions{display:flex;gap:6px;align-items:stretch}
#clipvault-root .cv-dl{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:6px;
  background:var(--accent-soft);border:1px solid transparent;color:var(--accent);font-weight:600;font-size:13px;padding:0 10px;height:38px;border-radius:10px;
  cursor:pointer;transition:all .18s var(--ease)}
#clipvault-root .cv-dl:hover{background:var(--grad);color:#fff;box-shadow:0 10px 20px -10px var(--glow);transform:translateY(-1px)}
#clipvault-root .cv-dl svg{width:15px;height:15px;flex:none}
#clipvault-root .cv-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;background:var(--surface);
  border:1px solid var(--line2);color:var(--mut);border-radius:10px;cursor:pointer;transition:all .18s var(--ease)}
#clipvault-root .cv-icon:hover{color:var(--accent);border-color:var(--accent);transform:translateY(-1px)}
#clipvault-root .cv-icon svg{width:15px;height:15px}
#clipvault-root select.cv-q{flex:0 0 auto;width:auto;min-width:70px;background:var(--surface);border:1px solid var(--line2);color:var(--ink);border-radius:10px;
  font-size:12px;padding:0 6px;height:38px;font-family:inherit;outline:none;cursor:pointer;transition:border-color .15s}
#clipvault-root select.cv-q:focus{border-color:var(--accent)}

/* skeleton + states */
#clipvault-root .cv-sk{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
#clipvault-root .cv-sk .cv-thumb{aspect-ratio:16/9;background:linear-gradient(100deg,var(--soft) 30%,#e9edfb 50%,var(--soft) 70%);
  background-size:200% 100%;animation:cvsh 1.3s infinite}
#clipvault-root .cv-sk .l{height:11px;margin:11px;border-radius:6px;background:var(--soft)}
@keyframes cvsh{to{background-position:-200% 0}}
#clipvault-root .cv-state{text-align:center;padding:60px 24px;color:var(--mut)}
#clipvault-root .cv-state .ic{width:56px;height:56px;border-radius:15px;background:var(--surface);border:1px solid var(--line2);
  display:grid;place-items:center;margin:0 auto 16px;box-shadow:var(--shadow-s)}
#clipvault-root .cv-state .ic svg{width:24px;height:24px;color:var(--accent)}
#clipvault-root .cv-state h3{color:var(--ink);font-weight:700;margin:0 0 7px;font-size:17px}
#clipvault-root .cv-state p{margin:0 auto;max-width:420px;font-size:13.5px}
#clipvault-root .cv-state.err .ic{border-color:#f6d5d6}#clipvault-root .cv-state.err .ic svg{color:var(--danger)}

#clipvault-root .cv-more{display:flex;justify-content:center;margin-top:24px}
#clipvault-root .cv-more button{background:var(--surface);border:1px solid var(--line2);color:var(--ink);
  padding:13px 30px;border-radius:12px;font-size:14px;font-weight:600;cursor:pointer;box-shadow:var(--shadow-s);
  transition:transform .18s var(--ease),border-color .18s,color .18s,box-shadow .18s}
#clipvault-root .cv-more button:hover{transform:translateY(-2px);border-color:var(--accent);color:var(--accent);box-shadow:0 12px 24px -14px var(--glow)}
#clipvault-root .cv-more button:disabled{opacity:.5;cursor:default;transform:none}

/* modal */
#clipvault-root .cv-overlay{position:fixed;inset:0;background:rgba(15,17,35,.45);backdrop-filter:blur(4px);
  display:none;align-items:flex-start;justify-content:center;padding:88px 20px 24px;z-index:2147483000}
#clipvault-root .cv-overlay.show{display:flex}
#clipvault-root .cv-modal{background:var(--surface);border:1px solid var(--line2);border-radius:18px;width:100%;max-width:440px;
  max-height:calc(100vh - 118px);display:flex;flex-direction:column;
  box-shadow:0 40px 90px -30px rgba(30,20,90,.4);overflow:hidden;animation:cvpop .18s var(--ease)}
@keyframes cvpop{from{transform:translateY(10px) scale(.99);opacity:0}to{transform:none;opacity:1}}
#clipvault-root .cv-modalh{padding:15px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex:0 0 auto}
#clipvault-root .cv-modalh h3{font-size:16px;font-weight:700;margin:0}
#clipvault-root .cv-modalh .x{background:none;border:none;color:var(--mut);cursor:pointer;padding:5px;border-radius:8px;line-height:0}
#clipvault-root .cv-modalh .x:hover{background:var(--soft);color:var(--ink)}
#clipvault-root .cv-modalh .x svg{width:18px;height:18px}
#clipvault-root .cv-modalb{padding:16px 20px 18px;flex:1 1 auto;overflow-y:auto}
#clipvault-root .cv-modalf{flex:0 0 auto;padding:14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);background:var(--surface)}
#clipvault-root .cv-modalf .cv-save{margin-top:0}
#clipvault-root .cv-kf{margin-bottom:12px}
#clipvault-root .cv-kfhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
#clipvault-root .cv-kfhead label{margin-bottom:0}
#clipvault-root .cv-sw{position:relative;width:40px;height:23px;border-radius:999px;border:none;background:#d5d8e6;cursor:pointer;transition:background .18s var(--ease);flex:none;padding:0}
#clipvault-root .cv-sw::after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .18s var(--ease)}
#clipvault-root .cv-sw[data-on="1"]{background:var(--accent)}
#clipvault-root .cv-sw[data-on="1"]::after{transform:translateX(17px)}
#clipvault-root .cv-kf label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;margin-bottom:6px}
#clipvault-root .cv-kf label .d{width:8px;height:8px;border-radius:50%}
#clipvault-root .cv-kf input,#clipvault-root .cv-kf select{width:100%;background:var(--soft);border:1px solid var(--line2);color:var(--ink);
  border-radius:10px;padding:9px 12px;font-size:13px;font-family:inherit;outline:none;transition:border-color .15s,box-shadow .15s,background .15s}
#clipvault-root .cv-kf input:focus,#clipvault-root .cv-kf select:focus{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--accent-soft)}
#clipvault-root .cv-kf .hint{font-size:12px;color:var(--mut);margin-top:7px}
#clipvault-root .cv-kf .hint a{color:var(--accent);font-weight:600}
#clipvault-root .cv-show{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--mut);cursor:pointer;user-select:none}
#clipvault-root .cv-show input{width:14px;height:14px;accent-color:var(--accent);cursor:pointer}
#clipvault-root .cv-note{font-size:12px;color:var(--mut);background:var(--soft);border:1px solid var(--line);
  border-radius:11px;padding:11px 12px;margin-top:2px;display:flex;gap:9px;align-items:flex-start}
#clipvault-root .cv-note svg{width:15px;height:15px;flex:none;margin-top:1px;color:var(--cv-pixabay)}
#clipvault-root .cv-save{width:100%;margin-top:14px;background:var(--grad);background-size:170% 170%;color:#fff;border:none;font-weight:700;font-size:14px;
  padding:14px;border-radius:12px;cursor:pointer;box-shadow:0 12px 26px -12px var(--glow);transition:transform .2s var(--ease),background-position .5s,box-shadow .2s}
#clipvault-root .cv-save:hover{transform:translateY(-2px);background-position:100% 50%;box-shadow:0 18px 36px -14px var(--glow)}

/* header buttons + guide modal */
#clipvault-root .cv-headbtns{display:flex;gap:9px;flex-wrap:wrap}
#clipvault-root .cv-guide{max-width:520px}
#clipvault-root .cv-guide-list{list-style:none;margin:0;padding:0;counter-reset:g}
#clipvault-root .cv-guide-list li{counter-increment:g;position:relative;padding:0 0 18px 44px;font-size:13.5px;color:var(--mut);line-height:1.55}
#clipvault-root .cv-guide-list li:last-child{padding-bottom:4px}
#clipvault-root .cv-guide-list li::before{content:counter(g);position:absolute;left:0;top:-1px;width:28px;height:28px;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:13px;display:grid;place-items:center;z-index:1}
#clipvault-root .cv-guide-list li:not(:last-child)::after{content:"";position:absolute;left:13px;top:31px;bottom:4px;width:2px;background:var(--line)}
#clipvault-root .cv-guide-list li b{color:var(--ink);font-weight:700}

/* toast */
/* ---- features: license badge, favorites, format toggle, scene edit ---- */
#clipvault-root .cv-lic{display:inline-flex;align-items:center;gap:5px;font-size:9.5px;font-weight:800;padding:3px 9px;border-radius:999px;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;flex:none}
#clipvault-root .cv-lic.cc0{background:#e9f9f1;color:#0d9b63;border:1px solid #c6efdb}
#clipvault-root .cv-lic.lic{background:#fff3e6;color:#c26a12;border:1px solid #f8dcbb}
#clipvault-root .cv-lic svg{width:11px;height:11px}
#clipvault-root .cv-metarow{display:flex;align-items:center;gap:8px;justify-content:space-between}
#clipvault-root .cv-metarow .cv-meta{flex:1;min-width:0}

#clipvault-root .cv-fav{position:absolute;top:8px;right:8px;width:34px;height:34px;border-radius:50%;border:none;padding:0;background:rgba(255,255,255,.95);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 3px 10px rgba(20,24,60,.2);
  transition:transform .22s var(--ease),background .22s,box-shadow .22s;z-index:3}
#clipvault-root .cv-fav svg{width:17px;height:17px;stroke:#8a90a6;fill:none;stroke-width:1.8;display:block;transition:stroke .2s,fill .2s}
#clipvault-root .cv-fav:hover{transform:scale(1.14) rotate(-8deg);box-shadow:0 8px 18px rgba(20,24,60,.3)}
#clipvault-root .cv-fav:hover svg{stroke:var(--accent)}
#clipvault-root .cv-fav.on{background:var(--grad);box-shadow:0 8px 18px -4px var(--glow)}
#clipvault-root .cv-fav.on svg{stroke:#fff;fill:#fff;animation:cvstar .34s var(--ease)}
@keyframes cvstar{0%{transform:scale(.5) rotate(-30deg)}60%{transform:scale(1.3) rotate(8deg)}100%{transform:scale(1) rotate(0)}}

#clipvault-root .cv-favbar{position:fixed;bottom:22px;right:22px;z-index:99990;background:var(--grad);color:#fff;border:none;
  padding:12px 18px;border-radius:14px;font-weight:700;font-size:14px;cursor:pointer;display:none;align-items:center;gap:9px;
  box-shadow:0 16px 36px -12px var(--glow);transition:transform .18s var(--ease)}
#clipvault-root .cv-favbar:hover{transform:translateY(-2px)}
#clipvault-root .cv-favbar.show{display:inline-flex}
#clipvault-root .cv-favbar svg{width:17px;height:17px;fill:#fff}
#clipvault-root .cv-favbar .cnt{background:rgba(255,255,255,.25);padding:1px 8px;border-radius:999px;font-size:12.5px}

#clipvault-root .cv-favactions{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
#clipvault-root .cv-favactions button{width:auto;padding:10px 14px;font-size:13px;border-radius:11px;cursor:pointer;font-weight:600;font-family:inherit;
  display:inline-flex;align-items:center;gap:7px;transition:all .16s var(--ease)}
#clipvault-root .cv-favactions .primary{background:var(--grad);color:#fff;border:none;box-shadow:var(--shadow-s)}
#clipvault-root .cv-favactions .primary:hover{transform:translateY(-1px)}
#clipvault-root .cv-favactions .ghost{background:var(--surface);border:1px solid var(--line2);color:var(--ink)}
#clipvault-root .cv-favactions .ghost:hover{border-color:var(--accent);color:var(--accent)}
#clipvault-root .cv-favactions button svg{width:15px;height:15px}
#clipvault-root .cv-favlist{display:flex;flex-direction:column;gap:8px}
#clipvault-root .cv-favempty{text-align:center;color:var(--mut);padding:24px 8px;font-size:13.5px}
#clipvault-root .cv-favrow{display:flex;align-items:center;gap:10px;padding:8px;border:1px solid var(--line);border-radius:11px}
#clipvault-root .cv-favrow img{width:64px;height:38px;object-fit:cover;border-radius:7px;flex:none;background:var(--soft)}
#clipvault-root .cv-favrow .fi{flex:1;min-width:0}
#clipvault-root .cv-favrow .fi .t{font-size:12.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#clipvault-root .cv-favrow .fi .s{font-size:11px;color:var(--mut)}
#clipvault-root .cv-favrow .rm{width:30px;height:30px;flex:none;border:1px solid var(--line2);background:var(--surface);border-radius:8px;color:var(--mut);cursor:pointer;display:grid;place-items:center}
#clipvault-root .cv-favrow .rm:hover{color:var(--danger);border-color:var(--danger)}
#clipvault-root .cv-favrow .rm svg{width:14px;height:14px}

#clipvault-root .cv-fg .cv-seg{display:inline-flex;background:var(--soft);border:1px solid var(--line2);border-radius:10px;padding:3px;gap:2px}
#clipvault-root .cv-seg button{border:none;background:none;color:var(--mut);font-size:12.5px;font-weight:600;padding:6px 11px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s var(--ease);font-family:inherit}
#clipvault-root .cv-seg button svg{width:13px;height:13px}
#clipvault-root .cv-seg button.on{background:#fff;color:var(--accent);box-shadow:var(--shadow-s)}

#clipvault-root .cv-scene-q input{background:var(--soft);border:1px solid var(--line2);border-radius:8px;padding:6px 9px;font-size:12px;font-family:inherit;color:var(--ink);width:160px;outline:none;transition:border-color .15s}
#clipvault-root .cv-scene-q input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
#clipvault-root .cv-rescan{width:30px;height:30px;border-radius:8px;border:1px solid var(--line2);background:var(--surface);color:var(--accent);cursor:pointer;display:grid;place-items:center;flex:none;transition:all .15s var(--ease)}
#clipvault-root .cv-rescan:hover{border-color:var(--accent);background:var(--accent-soft)}
#clipvault-root .cv-rescan svg{width:15px;height:15px}
#clipvault-root .cv-scene-editwrap{display:flex;align-items:center;gap:6px;margin-left:auto}

/* toast-anchor */
#clipvault-root .cv-recent{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:12px}
#clipvault-root .cv-recent-lbl{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--mut2)}
#clipvault-root .cv-recent-chip{background:var(--soft);border:1px solid var(--line2);color:var(--ink);font-size:12.5px;padding:6px 11px;border-radius:999px;cursor:pointer;font-family:inherit;transition:all .15s var(--ease)}
#clipvault-root .cv-recent-chip:hover{border-color:var(--accent);color:var(--accent)}
#clipvault-root .cv-recent-clear{background:none;border:none;color:var(--mut);font-size:12px;cursor:pointer;font-family:inherit;text-decoration:underline}

#clipvault-root .cv-scenemore{display:flex;justify-content:center;margin-top:12px}
#clipvault-root .cv-smore{background:var(--surface);border:1px solid var(--line2);color:var(--accent);font-weight:600;font-size:13px;padding:9px 22px;border-radius:10px;cursor:pointer;font-family:inherit;transition:all .16s var(--ease)}
#clipvault-root .cv-smore:hover{border-color:var(--accent);background:var(--accent-soft)}
#clipvault-root .cv-smore:disabled{opacity:.6;cursor:default}

#clipvault-root .cv-theme{position:fixed;bottom:22px;left:22px;z-index:99990;width:44px;height:44px;border-radius:50%;border:1px solid var(--line2);background:var(--surface);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:var(--shadow-s);transition:transform .18s var(--ease)}
#clipvault-root .cv-theme:hover{transform:translateY(-2px) rotate(-12deg)}
#clipvault-root .cv-theme svg{width:19px;height:19px}

#clipvault-root.cv-dark{--bg:#0e1120;--surface:#161a2e;--soft:#1a1f38;--ink:#eceefb;--mut:#9aa2c8;--mut2:#6d769e;--line:#242a45;--line2:#30375a;--accent-soft:#221e46;
  background:
    radial-gradient(700px 480px at 50% -10%, rgba(124,58,237,.22), transparent 62%),
    radial-gradient(560px 460px at 0% 108%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(560px 460px at 100% 108%, rgba(168,85,247,.14), transparent 60%),
    linear-gradient(180deg,#0c0f1e 0%,#0e1120 60%,#0c0f1e 100%)}
#clipvault-root.cv-dark .cv-panel,#clipvault-root.cv-dark .cv-card,#clipvault-root.cv-dark .cv-modal{background:var(--surface);border-color:var(--line2)}
#clipvault-root.cv-dark .cv-eyebrow{background:var(--surface);border-color:var(--line2)}
#clipvault-root.cv-dark .cv-hero h1{color:#f3f4ff}
#clipvault-root.cv-dark .cv-script,#clipvault-root.cv-dark .cv-field,#clipvault-root.cv-dark .cv-dd-btn,#clipvault-root.cv-dark .cv-scene-q input,#clipvault-root.cv-dark .cv-modalb input,#clipvault-root.cv-dark .cv-modalb select{background:#12162a;color:var(--ink);border-color:var(--line2)}
#clipvault-root.cv-dark .cv-ghostbtn,#clipvault-root.cv-dark .cv-tab,#clipvault-root.cv-dark .cv-chip{background:var(--surface);color:var(--ink)}
#clipvault-root.cv-dark .cv-dd-panel,#clipvault-root.cv-dark .cv-seg{background:var(--surface)}
#clipvault-root.cv-dark .cv-fav{background:rgba(22,26,46,.92)}
#clipvault-root.cv-dark .cv-srclabel{background:rgba(16,20,38,.92);color:#eceefb}
#clipvault-root.cv-dark .cv-seg button.on{background:#2a3050;color:#fff}
#clipvault-root.cv-dark .cv-recent-chip,#clipvault-root.cv-dark .cv-smore{background:#12162a}
#clipvault-root.cv-dark .cv-favrow{border-color:var(--line2)}
#clipvault-root.cv-dark .cv-favrow .rm,#clipvault-root.cv-dark .cv-favactions .ghost{background:#12162a;color:var(--ink)}
#clipvault-root .cv-dd-up .cv-dd-panel{top:auto;bottom:calc(100% + 8px);transform-origin:bottom left;transform:translateY(6px) scale(.98)}
#clipvault-root .cv-dd-up.open .cv-dd-panel{transform:none}
#clipvault-root.cv-dark .cv-dl{background:#241f4d;color:#cabdff;border-color:#302a60}
#clipvault-root.cv-dark .cv-dl:hover{background:#2c2570}
#clipvault-root.cv-dark .cv-icon{background:#12162a;border-color:#30375a;color:#c4c9ee}
#clipvault-root.cv-dark .cv-icon svg{color:#c4c9ee}
#clipvault-root.cv-dark .cv-icon:hover{border-color:var(--accent);color:#fff}
#clipvault-root.cv-dark .cv-modalh h3,#clipvault-root.cv-dark .cv-modal h3,#clipvault-root.cv-dark .cv-kf label,#clipvault-root.cv-dark .cv-modalb label{color:#eceefb !important}
#clipvault-root.cv-dark .cv-modal input,#clipvault-root.cv-dark .cv-modal select,#clipvault-root.cv-dark .cv-modal textarea{background:#12162a !important;color:#eceefb !important;border-color:#30375a !important}
#clipvault-root.cv-dark .cv-modalh .x{color:#c4c9ee}
#clipvault-root.cv-dark .cv-player-q{background:#12162a;color:#eceefb;border-color:#30375a}

/* thumbnail play overlay */
#clipvault-root .cv-thumb{cursor:pointer}
#clipvault-root .cv-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s var(--ease);pointer-events:none;z-index:1}
#clipvault-root .cv-thumb:hover .cv-play{opacity:1}
#clipvault-root .cv-play svg{width:56px;height:56px;color:#fff;filter:drop-shadow(0 4px 14px rgba(0,0,0,.55));transition:transform .2s var(--ease)}
#clipvault-root .cv-thumb:hover .cv-play svg{transform:scale(1.08)}

/* video player modal */
#clipvault-root .cv-player{position:fixed;inset:0;background:rgba(8,10,24,.85);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:24px;z-index:2147483001}
#clipvault-root .cv-player.show{display:flex}
#clipvault-root .cv-player-box{background:var(--surface);border-radius:18px;overflow:hidden;max-width:940px;width:100%;box-shadow:0 40px 100px -30px rgba(0,0,0,.7);position:relative;animation:cvpop .2s var(--ease)}
#clipvault-root .cv-player-x{position:absolute;top:12px;right:12px;z-index:3;width:38px;height:38px;border-radius:50%;border:none;background:rgba(0,0,0,.55);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .16s}
#clipvault-root .cv-player-x:hover{background:rgba(0,0,0,.85)}
#clipvault-root .cv-player-x svg{width:18px;height:18px}
#clipvault-root .cv-player-stage{background:#000;aspect-ratio:16/9;width:100%}
#clipvault-root .cv-player-stage video{width:100%;height:100%;object-fit:contain;background:#000;display:block}
#clipvault-root .cv-player-stage img{width:100%;height:100%;object-fit:contain;background:#000;display:none}
#clipvault-root .cv-player-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;flex-wrap:wrap}
#clipvault-root .cv-player-title{font-weight:600;font-size:14.5px;color:var(--ink);line-height:1.3}
#clipvault-root .cv-player-sub{font-size:12.5px;color:var(--mut);margin-top:3px}
#clipvault-root .cv-player-ctrls{display:flex;align-items:center;gap:10px}
#clipvault-root .cv-player-ctrls .cv-btn{width:auto;padding:11px 20px}
#clipvault-root .cv-player-ctrls .cv-dd-btn{padding:10px 13px}
#clipvault-root .cv-player-x{position:absolute;top:12px;right:12px;z-index:3;width:40px;height:40px;border-radius:50%;border:none;background:rgba(10,12,24,.6);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .16s,transform .16s;backdrop-filter:blur(3px)}
#clipvault-root .cv-player-x:hover{background:rgba(10,12,24,.9);transform:rotate(90deg)}
#clipvault-root .cv-player-x svg{width:19px;height:19px}
#clipvault-root .cv-player-q{background:var(--soft);border:1px solid var(--line2);color:var(--ink);border-radius:10px;padding:10px 12px;font-size:13px;font-family:inherit;cursor:pointer;outline:none}
@media (max-width:560px){
  /* full height sheet: stage takes the leftover space, the bar is always visible */
  #clipvault-root .cv-player{padding:0;align-items:stretch;justify-content:stretch}
  #clipvault-root .cv-player-box{border-radius:0;max-width:100%;width:100%;min-height:0;
    height:100vh;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start}
  #clipvault-root .cv-player-stage{aspect-ratio:auto;flex:1 1 auto;min-height:0}
  #clipvault-root .cv-player-bar{flex:0 0 auto;gap:10px;
    padding:12px 14px calc(12px + env(safe-area-inset-bottom))}
  #clipvault-root .cv-player-ctrls{width:100%}
  #clipvault-root .cv-player-ctrls .cv-btn{flex:1}
  #clipvault-root .cv-player-x{top:calc(10px + env(safe-area-inset-top));right:10px}
  /* keys panel: reclaim the 88px of desktop top padding, and use dvh so the
     browser address bar cannot hide the save button */
  #clipvault-root .cv-overlay{align-items:center;
    padding:12px 12px calc(12px + env(safe-area-inset-bottom))}
  #clipvault-root .cv-modal{max-width:100%;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
}
#clipvault-root .cv-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--ink);color:#fff;padding:11px 18px;border-radius:11px;font-size:13px;
  box-shadow:0 14px 34px rgba(0,0,0,.25);opacity:0;pointer-events:none;transition:all .26s var(--ease);z-index:99999;max-width:90vw}
#clipvault-root .cv-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
#clipvault-root .cv-toast.warn{background:#7a3d12}

@media (max-width:900px){
  #clipvault-root .cv-scene-head{flex-wrap:wrap;gap:8px}
  #clipvault-root .cv-scene-editwrap{margin-left:0;width:100%}
  #clipvault-root .cv-scene-q{flex:1}
  #clipvault-root .cv-scene-q input{width:100%}
}
@media (max-width:560px){
  #clipvault-root{padding:20px 12px 30px;border-radius:16px}
  #clipvault-root .cv-scene-grid,#clipvault-root .cv-grid{grid-template-columns:1fr 1fr;gap:10px}
  #clipvault-root .cv-scene{padding:12px}
  #clipvault-root .cv-cardbody{padding:9px}
  #clipvault-root .cv-hero{margin:22px auto 24px}
  #clipvault-root .cv-herobtns{flex-direction:column;align-items:stretch}
  #clipvault-root .cv-herobtns .cv-btn,#clipvault-root .cv-ghostbtn{width:100%}
  #clipvault-root .cv-icon{display:none}
  #clipvault-root .cv-favbar{bottom:14px;right:14px;padding:10px 15px;font-size:13px}
  #clipvault-root .cv-tools{gap:12px}
  #clipvault-root .cv-fg{flex-wrap:wrap}
}
@media (max-width:480px){
  #clipvault-root .cv-scene-grid,#clipvault-root .cv-grid{grid-template-columns:1fr;gap:12px}
}
@media (prefers-reduced-motion:reduce){
  #clipvault-root *{animation:none!important;transition:none!important}
  #clipvault-root .cv-card:hover .cv-thumb video{opacity:1}
}
