:root {
  --bg: #0a0a0b; --surface: #111113; --panel: #161618; --panel2: #1d1d20; --panel3: #242428;
  --line: #26262b; --line2: #34343b;
  --text: #f2f2f3; --muted: #a1a1aa; --dim: #71717a;
  --accent: #c6f432; --accent-ink: #11140a;
  --white: #f4f4f5;
  --s1: #6f7ff0; --s2: #7f9e14;           /* chart series (validated for dark surface) */
  --good: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --radius: 14px; --radius-lg: 22px;
  --side: 232px;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
h1, h2, h3 { margin: 0 0 .5rem; letter-spacing: -.015em; }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 600; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
[data-icon] { display: inline-flex; align-items: center; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hint { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- boot -- */
.boot { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; background: var(--bg); text-align: center; }
.boot-logo { width: 48px; height: 48px; border-radius: 14px; }
.boot-logo svg { width: 22px; height: 22px; }
.boot-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.015em; }
.boot-bar { width: 160px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; background: var(--accent); animation: indet 1.1s ease-in-out infinite; }
/* Only appears if loading is slow (a cold start), so quick loads just flash the logo. */
.boot-slow { margin: 4px 0 0; max-width: 300px; color: var(--muted); font-size: .9rem; line-height: 1.45; opacity: 0; animation: boot-show .4s 3s forwards; }
@keyframes boot-show { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot-bar span { animation: none; width: 100%; opacity: .5; } }

/* ---------------------------------------------------------------- shell -- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; transition: grid-template-columns .2s; }
.shell.collapsed { --side: 68px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px;
  border-right: 1px solid var(--line); background: var(--surface); overflow: hidden; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.08rem; padding: 6px 6px 16px; white-space: nowrap; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid !important; place-items: center; flex: none; }
.logo svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-bottom { margin-top: auto; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 10px; color: var(--muted);
  text-decoration: none; font: inherit; font-size: .92rem; font-weight: 500; background: none; border: 0; cursor: pointer; white-space: nowrap; position: relative; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--panel2); color: var(--text); }
.nav a.active { background: var(--panel3); color: var(--text); }
.nav a.active svg { color: var(--accent); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); position: absolute; left: 26px; top: 8px; }
.shell.collapsed .label { display: none; }
.shell.collapsed .nav a, .shell.collapsed .nav button { justify-content: center; }
.shell.collapsed .brand { justify-content: center; padding-inline: 0; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 28px; background: rgba(10,10,11,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); min-height: 60px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs strong { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; align-items: center; flex: none; }
main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 28px 80px; outline: none; }

/* -------------------------------------------------------------- controls -- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2);
  color: var(--text); padding: 9px 16px; border-radius: 11px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 550;
  text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: #4a4a53; background: var(--panel3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--white); color: #0a0a0b; border-color: transparent; font-weight: 650; }
.btn.primary:hover { background: #fff; }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 650; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: .84rem; border-radius: 9px; }
.btn.lg { padding: 13px 20px; font-size: .97rem; border-radius: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg.i { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--panel3); color: var(--text); }
.pill { font: inherit; font-size: .8rem; padding: 6px 11px; border-radius: 99px; background: var(--panel2); color: var(--muted);
  border: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
.pill.on { color: var(--good); border-color: #1f4d33; }
.pill.on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 7px; vertical-align: 1px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
label { display: block; font-size: .84rem; color: var(--muted); margin: 10px 0; }
label.check { display: flex; gap: 9px; align-items: center; color: var(--text); cursor: pointer; }
input, select, textarea { width: 100%; margin-top: 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line2);
  border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .92rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #55555f; box-shadow: 0 0 0 3px rgba(198,244,50,.12); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); border: 0; box-shadow: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .86rem; color: var(--text); margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); position: relative; transition: .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { left: 16px; background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.select-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); margin: 0; }
.select-chip select { width: auto; margin: 0; padding: 6px 28px 6px 10px; border-radius: 9px; background: var(--panel2); border-color: var(--line); font-size: .84rem; color: var(--text); }

/* ------------------------------------------------------------------ home -- */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 10px auto 0; max-width: 560px; }
.create { max-width: 760px; margin: 26px auto 0; }
.ctabs { display: flex; align-items: flex-end; gap: 4px; padding-left: 0; }
.ctab { display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px; border-radius: 16px 16px 0 0; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }
.ctab:hover { color: var(--text); }
.ctab[aria-selected=true] { background: var(--panel); color: var(--text); }
.ctab[aria-selected=true] svg { color: var(--accent); }
.ccard { background: var(--panel); border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg); padding: 16px; border: 1px solid var(--line); border-top-color: transparent; }
.ccard.first-off { border-top-left-radius: var(--radius-lg); }
.urlbox { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line2); border-radius: 15px; padding: 7px 7px 7px 14px; transition: border-color .15s, box-shadow .15s; }
.urlbox:focus-within { border-color: #55555f; box-shadow: 0 0 0 4px rgba(198,244,50,.08); }
.urlbox input { border: 0; background: transparent; margin: 0; padding: 10px 4px; font-size: 1rem; box-shadow: none !important; min-width: 0; }
.urlbox .plat-slot { color: var(--dim); display: grid; place-items: center; width: 22px; }
.drop { border: 1.5px dashed var(--line2); border-radius: 15px; padding: 34px 20px; text-align: center; background: var(--bg); cursor: pointer; transition: .15s; }
.drop.over, .drop:hover { border-color: var(--accent); background: #10120b; }
.drop .big { font-size: 1.02rem; font-weight: 600; margin: 10px 0 4px; }
.drop .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--panel2); display: grid; place-items: center; margin: 0 auto; color: var(--accent); }
.copts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 14px; padding: 2px 4px 0; }
.copts .sep { flex: 1; }
.recipes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2);
  background: transparent; color: var(--muted); font: inherit; font-size: .86rem; cursor: pointer; transition: .15s; }
.chip:hover { color: var(--text); border-color: #4a4a53; }
.chip[aria-pressed=true] { color: var(--text); border-color: var(--accent); background: rgba(198,244,50,.07); }
.chip[aria-pressed=true] svg { color: var(--accent); }
.chip svg.i { width: 15px; height: 15px; }
.works-with { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; color: var(--dim); font-size: .8rem; flex-wrap: wrap; }
.works-with .plats { display: flex; gap: 10px; align-items: center; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 44px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.progress { height: 6px; border-radius: 99px; background: var(--panel3); overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; background: var(--accent); transition: width .4s; }
.progress.indet > div { width: 35% !important; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ------------------------------------------------------- project cards -- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pcard { position: relative; border-radius: var(--radius); cursor: pointer; transition: transform .15s; }
.pcard:hover { transform: translateY(-2px); }
.pcard.dragging { opacity: .4; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.thumb .ph svg.i { width: 34px; height: 34px; }
.thumb .tl { position: absolute; top: 9px; left: 9px; display: flex; gap: 6px; }
.thumb .br { position: absolute; bottom: 9px; right: 9px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 4px 8px; border-radius: 7px;
  background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(6px); }
.tag svg.i { width: 13px; height: 13px; }
.tag.ok { color: var(--good); } .tag.busy { color: var(--warn); } .tag.err { color: var(--bad); }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.6); }
.thumb .bar > div { height: 100%; background: var(--accent); transition: width .4s; }
.thumb .shade { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.55)); }
.pbody { padding: 10px 2px 0; display: flex; gap: 8px; align-items: flex-start; }
.pbody .txt { min-width: 0; flex: 1; }
.ptitle { font-weight: 600; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta { font-size: .8rem; color: var(--dim); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fdot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; border: 1px dashed var(--line2); border-radius: var(--radius); grid-column: 1/-1; }
.empty .ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: var(--panel2); display: grid; place-items: center; color: var(--dim); }
.skeleton { background: linear-gradient(90deg, var(--panel) 0, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* -------------------------------------------------------------- folders -- */
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; width: 260px; max-width: 100%; }
.search input { margin: 0; padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 17px; height: 17px; }
.folders { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 14px; margin-bottom: 14px; scrollbar-width: thin; }
.ftile { flex: none; display: flex; align-items: center; gap: 11px; min-width: 168px; padding: 11px 8px 11px 13px; border-radius: 13px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; cursor: pointer; transition: .15s; position: relative; }
.ftile:hover { border-color: var(--line2); background: var(--panel2); }
.ftile.active { border-color: var(--accent); }
.ftile.drop-over { border-color: var(--accent); background: rgba(198,244,50,.08); transform: scale(1.03); }
.ftile .fic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ftile .fname { font-weight: 600; font-size: .88rem; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftile .fcount { font-size: .76rem; color: var(--dim); }
.ftile .icon-btn { width: 28px; height: 28px; margin-left: auto; }
.ftile.add { border-style: dashed; color: var(--muted); min-width: 140px; justify-content: center; padding-right: 13px; }
.swatches { display: flex; gap: 8px; margin-top: 8px; }
.swatches button { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.swatches button[aria-pressed=true] { border-color: var(--white); }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 50vh; overflow: auto; }
.pick-list button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.pick-list button:hover { border-color: var(--line2); background: var(--panel2); }
.pick-list button[aria-current=true] { border-color: var(--accent); }

/* -------------------------------------------------------------- project -- */
.proj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.proj-top h1 { margin: 0 0 6px; }
.meta-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.meta-line a { color: var(--muted); display: inline-flex; gap: 5px; align-items: center; text-decoration: none; }
.meta-line a:hover { color: var(--text); }
.project-head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr); gap: 22px; }
.player { width: 100%; border-radius: var(--radius); background: #000; display: block; max-height: 480px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { display: flex; gap: 8px; align-items: center; }
.heat { position: relative; height: 44px; margin-top: 10px; border-radius: 9px; background: var(--panel2); overflow: hidden; cursor: pointer; }
.heat canvas { width: 100%; height: 100%; display: block; }
.heat .mark { position: absolute; top: 0; bottom: 0; background: rgba(198,244,50,.16); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.heat .head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.presets button.active { border-color: var(--accent); color: var(--text); background: rgba(198,244,50,.07); }
.big-state { max-width: 640px; margin: 40px auto; text-align: center; padding: 36px 28px; }
.big-state .ico { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--panel2); }
.big-state .ico svg.i { width: 28px; height: 28px; }
.big-state img.prev { width: 100%; max-width: 420px; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin: 0 auto 18px; display: block; background: var(--panel2); }

.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card .body { padding: 12px 14px; }
.clip-card .media { position: relative; background: #000; aspect-ratio: 9/16; max-height: 420px; width: 100%; display: grid; place-items: center; }
.clip-card .media.sq { aspect-ratio: 1/1; } .clip-card .media.f45 { aspect-ratio: 4/5; } .clip-card .media.wide { aspect-ratio: 16/9; }
.clip-card video { width: 100%; height: 100%; object-fit: contain; }
.score { position: absolute; top: 10px; left: 10px; font-weight: 800; font-size: .9rem; padding: 4px 9px; border-radius: 9px; background: rgba(0,0,0,.72); }
.score.hot { color: var(--good); } .score.mid { color: var(--warn); } .score.low { color: var(--muted); }
.src { position: absolute; top: 10px; right: 10px; }
.clip-card h3 { font-size: .95rem; line-height: 1.3; }
.clip-card .reason { font-size: .82rem; color: var(--muted); margin: 6px 0; }
.tags { font-size: .8rem; color: var(--accent); }
.state { color: var(--muted); font-size: .85rem; padding: 20px; text-align: center; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ analytics -- */
.range { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.range button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .84rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.range button[aria-pressed=true] { background: var(--panel3); color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .k { font-size: .8rem; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.kpi .k svg.i { width: 15px; height: 15px; color: var(--dim); }
.kpi .v { font-size: 1.75rem; font-weight: 750; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .78rem; color: var(--dim); margin-top: 2px; }
.agrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.agrid > .span-8 { grid-column: span 8; } .agrid > .span-4 { grid-column: span 4; } .agrid > .span-6 { grid-column: span 6; } .agrid > .span-12 { grid-column: span 12; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-head h3 { margin: 0; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cols { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 6px; border-bottom: 1px solid var(--line2); }
.cols .grid-l { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.cols .grid-l span { position: absolute; right: 0; top: -16px; font-size: .7rem; color: var(--dim); }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; cursor: default; border-radius: 4px; position: relative; z-index: 1; }
.col:hover { background: rgba(255,255,255,.04); }
.col .b { flex: 1; max-width: 16px; min-height: 0; border-radius: 4px 4px 0 0; }
.col .b.z { min-height: 0; }
.xlabels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--dim); margin-top: 6px; }
.xlabels.even span { flex: 1; text-align: center; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: .86rem; }
.hbar .nm { display: flex; gap: 8px; align-items: center; color: var(--text); white-space: nowrap; overflow: hidden; }
.hbar .tr { height: 10px; background: var(--panel3); border-radius: 0 4px 4px 0; }
.hbar .fl { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.hbar .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.toplist { display: flex; flex-direction: column; gap: 4px; }
.toprow { display: grid; grid-template-columns: 34px 46px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); }
.toprow:hover { background: var(--panel2); }
.toprow .rk { color: var(--dim); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.toprow .th { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--panel3); }
.toprow .t1 { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toprow .t2 { font-size: .78rem; color: var(--dim); }
.htags { display: flex; flex-wrap: wrap; gap: 8px; }
.htags span { font-size: .82rem; padding: 6px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); }
.htags b { color: var(--muted); font-weight: 500; margin-left: 6px; }

/* --------------------------------------------------------------- social -- */
.soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.soc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.soc .glow { position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; border-radius: 50%; opacity: .14; filter: blur(50px); pointer-events: none; }
.soc-top { display: flex; align-items: center; gap: 12px; }
.bico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.bico svg { width: 22px; height: 22px; }
.soc-top .nm { font-weight: 700; font-size: 1.02rem; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.on { color: var(--good); } .status.on::before { background: var(--good); }
.status.err { color: var(--bad); } .status.err::before { background: var(--bad); }
.who { display: flex; align-items: center; gap: 11px; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.who img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--panel3); }
.who .h { font-weight: 600; font-size: .9rem; }
.who a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.sstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sstats div { background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.sstats b { display: block; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.sstats span { font-size: .74rem; color: var(--dim); }
.soc .actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.spark { width: 100%; height: 34px; display: block; }
.spark polyline { fill: none; stroke: var(--s1); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.steps { margin: 12px 0; padding-left: 20px; color: var(--text); line-height: 1.6; font-size: .9rem; }
.copyrow { display: flex; gap: 8px; align-items: center; margin: 6px 0 12px; }
.copyrow code { flex: 1; background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 11px; font-size: .82rem; overflow-x: auto; white-space: nowrap; }
code.env { background: var(--panel3); padding: 2px 6px; border-radius: 6px; font-size: .82rem; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 20px; font-size: .88rem; color: var(--muted); }
.notice svg.i { color: var(--accent); margin-top: 1px; }

/* -------------------------------------------------------------- publish -- */
.modal.pub { width: 880px; }
.pub-grid { display: grid; grid-template-columns: 240px 1fr; gap: 22px; margin-top: 10px; }
.pub-prev video { width: 100%; aspect-ratio: 9/16; max-height: 430px; background: #000; border-radius: 12px; object-fit: contain; display: block; }
.ptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ptile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: .15s; min-width: 0; }
.ptile:hover:not(:disabled) { border-color: #4a4a53; }
.ptile[aria-pressed=true] { border-color: var(--accent); background: rgba(198,244,50,.06); }
.ptile:disabled { opacity: .5; cursor: not-allowed; }
.ptile .bico { width: 36px; height: 36px; border-radius: 10px; }
.pt-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pt-txt b { font-size: .9rem; }
.pt-txt small { color: var(--dim); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; color: transparent; }
.pt-check svg.i { width: 14px; height: 14px; stroke-width: 2.6; }
.ptile[aria-pressed=true] .pt-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.prows { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.prow .bico { width: 36px; height: 36px; border-radius: 10px; }
.pr-main { flex: 1; min-width: 0; }
.pr-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.pr-state { color: var(--muted); font-size: .84rem; }
.prow.done .pr-state { color: var(--good); } .prow.error .pr-state { color: var(--bad); }
.posted { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .76rem; color: var(--dim); }
.posted a, .posted .pn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--panel2); }
.pubstate { display: flex; gap: 7px; align-items: center; font-size: .8rem; color: var(--warn); }
.pubstate.on { color: var(--good); }
.pubstate svg.i { width: 15px; height: 15px; }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.hrow img, .hrow .th-ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--panel3); display: grid; place-items: center; color: var(--dim); flex: none; }
.h-main { flex: 1; min-width: 0; }
.h-main .t1 { font-weight: 600; font-size: .9rem; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-main .t2 { font-size: .78rem; color: var(--dim); }
.h-nets { display: flex; gap: 6px; }
.hnet { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--panel2); }
.dotst { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--panel); background: var(--dim); }
.dotst.done { background: var(--good); } .dotst.error { background: var(--bad); } .dotst.uploading, .dotst.processing, .dotst.queued { background: var(--warn); }
@media (max-width: 760px) { .pub-grid { grid-template-columns: 1fr; } .pub-prev video { max-height: 260px; } .ptiles { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- overlays -- */
dialog { border: none; padding: 0; background: transparent; color: var(--text); max-width: 96vw; }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 22px; width: 500px; max-width: 96vw; max-height: 92vh; overflow: auto; }
.modal.wide { width: 1080px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { margin: 0; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 22px; }
.frame-wrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.frame-wrap video { width: 100%; display: block; }
.crop-box { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: none; display: none; }
.out-preview video { width: 100%; max-height: 360px; background: #000; border-radius: 10px; margin-top: 10px; }
.menu { position: fixed; z-index: 60; min-width: 200px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 5px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .88rem; border-radius: 8px; cursor: pointer; text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--panel3); outline: none; }
.menu button.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line2); margin: 4px 0; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: #000; border: 1px solid var(--line2); border-radius: 9px; padding: 8px 10px; font-size: .8rem; line-height: 1.5; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(90px); background: var(--white); color: #0a0a0b; font-weight: 550;
  padding: 11px 18px; border-radius: 12px; transition: .25s; opacity: 0; z-index: 80; font-size: .9rem; max-width: 92vw; }
.toast.show { transform: translateX(-50%); opacity: 1; }
.toast.err { background: #3b1414; color: #fecaca; border: 1px solid #5c1f1f; }

/* ----------------------------------------------------------- responsive -- */
.only-mobile { display: none; }
@media (max-width: 1100px) {
  .agrid > .span-8, .agrid > .span-4, .agrid > .span-6 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .project-head, .editor-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); background: rgba(17,17,19,.96); backdrop-filter: blur(12px); }
  .sidebar .brand, .only-desktop { display: none !important; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav-bottom { margin: 0; flex: 0; }
  .nav a, .nav button { flex-direction: column; gap: 3px; padding: 7px 8px; font-size: .68rem; }
  .shell .label { display: block !important; }
  .nav-dot { left: 50%; margin-left: 6px; top: 4px; }
  .topbar { padding: 10px 16px; }
  #open-settings { display: none; }
  main { padding: 18px 16px 110px; }
  .ccard { padding: 12px; }
  .urlbox { flex-wrap: wrap; padding: 6px; }
  .urlbox input { flex: 1 1 70%; }
  .urlbox .btn { flex: 1 1 100%; }
  .hbar { grid-template-columns: 90px 1fr 34px; }
  .search { width: 100%; }
  .kpi .v { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------- public pages -- */
body.is-public { background: radial-gradient(1200px 600px at 50% -10%, rgba(198,244,50,.08), transparent 60%), var(--bg); }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; display: grid; place-items: center; }
.menu-head { padding: 9px 10px 8px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.menu-head b { display: block; font-size: .9rem; }
.menu-head small { color: var(--dim); font-size: .78rem; }

.lp { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.lp-nav { display: flex; align-items: center; gap: 20px; padding: 18px 0; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(var(--bg) 70%, transparent); }
.lp-nav .brand, .auth .brand, .lp-foot .brand { padding: 0; }
.lp-links { display: flex; gap: 4px; margin-left: 12px; }
.lp-links button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .92rem; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.lp-links button:hover { color: var(--text); background: var(--panel2); }
.lp-actions { margin-left: auto; display: flex; gap: 8px; }
.lp-hero { text-align: center; padding: 64px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--accent); border: 1px solid rgba(198,244,50,.3);
  background: rgba(198,244,50,.06); padding: 6px 12px; border-radius: 99px; }
.eyebrow svg.i { width: 15px; height: 15px; }
.lp-hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin: 22px 0 18px; }
.lp-hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.55; max-width: 620px; margin: 0 auto; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.lp-hero .works-with { margin-top: 26px; }

.lp-demo { margin: 56px auto 0; max-width: 860px; padding: 18px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 40px 120px -40px rgba(198,244,50,.18); }
.demo-bar { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line2); border-radius: 15px; padding: 7px 7px 7px 14px; }
.demo-url { color: var(--dim); font-size: .95rem; flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-btn { background: var(--white); color: #0a0a0b; font-weight: 650; font-size: .88rem; padding: 10px 16px; border-radius: 11px; white-space: nowrap; }
.demo-clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.demo-clip { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.phone { position: relative; aspect-ratio: 9/16; max-height: 330px; margin: 0 auto; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 70% at 30% 20%, hsl(var(--h) 70% 45% / .9), transparent 60%),
              radial-gradient(90% 60% at 80% 90%, hsl(calc(var(--h) + 60) 70% 40% / .8), transparent 60%), #0d0d10; }
.phone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); }
.dscore { position: absolute; top: 10px; left: 10px; z-index: 1; font-weight: 800; font-size: .85rem; color: var(--good); background: rgba(0,0,0,.72); padding: 3px 8px; border-radius: 8px; }
.dcap { position: absolute; left: 8px; right: 8px; top: 64%; z-index: 1; text-align: center; font-weight: 900; font-size: clamp(.8rem, 1.6vw, 1.05rem);
  letter-spacing: .01em; color: #fff; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.6); line-height: 1.25; }
.dcap .hot { color: #ffe14d; }
.dtitle { margin-top: 10px; font-size: .86rem; font-weight: 600; color: var(--muted); text-align: left; }

.lp-sec { padding: 72px 0 24px; }
.lp-sec h2, .lp-final h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; text-align: center; margin: 0 auto; max-width: 720px; line-height: 1.12; }
.sub { color: var(--muted); text-align: center; margin: 12px auto 0; max-width: 560px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.feat .fi { width: 40px; height: 40px; border-radius: 12px; background: rgba(198,244,50,.1); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feat h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feat p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; }
.steps3 { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps3 li { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.steps3 b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: #000; font-weight: 800; margin-bottom: 14px; }
.steps3 p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; }
.lp-final { margin: 72px 0 0; padding: 56px 24px; border-radius: 26px; text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(198,244,50,.14), transparent 70%), var(--panel); border: 1px solid var(--line); }
.lp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 34px 0 40px; font-size: .85rem; }
.lp-foot .brand { font-size: .95rem; }
.lp-foot .logo { width: 26px; height: 26px; border-radius: 8px; }

/* auth */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; padding: 32px 40px; display: flex; flex-direction: column; border-right: 1px solid var(--line);
  background: radial-gradient(90% 60% at 20% 0%, rgba(198,244,50,.13), transparent 60%), var(--surface); }
.art-body { margin-top: auto; position: relative; z-index: 1; max-width: 440px; }
.art-body h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.art-body ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--muted); }
.art-body li { display: flex; gap: 10px; align-items: center; }
.art-body li svg.i { color: var(--accent); width: 18px; height: 18px; }
.art-clips { position: absolute; right: 48px; top: 96px; display: flex; gap: 16px; opacity: .6; }
.art-clips .phone.sm:nth-child(2) { margin-top: 36px; }
.phone.sm { width: 120px; transform: rotate(var(--r)); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; position: relative; }
.auth-back { position: absolute; top: 26px; left: 28px; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-size: .88rem; }
.auth-back:hover { color: var(--text); }
.auth-back svg.i { width: 16px; height: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.auth-card > .muted { margin: 0 0 22px; }
.auth-card label { color: var(--text); font-weight: 500; }
.auth-card input { padding: 12px 13px; font-size: .97rem; }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw .icon-btn { position: absolute; right: 5px; top: 50%; transform: translateY(calc(-50% + 3px)); }
.pw-meter { display: flex; gap: 6px; margin-top: -2px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 99px; background: var(--panel3); transition: background .2s; }
.pw-meter[data-s="1"] i.on { background: var(--warn); }
.pw-meter[data-s="2"] i.on, .pw-meter[data-s="3"] i.on { background: var(--good); }
.auth-err { background: #2a1212; border: 1px solid #5c1f1f; color: #fecaca; padding: 10px 12px; border-radius: 10px; font-size: .88rem; margin: 12px 0 0; }
.btn.block { width: 100%; margin-top: 18px; }
.switch { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 18px; }
.switch a { color: var(--text); font-weight: 600; }
.only-small { display: none !important; }

@media (max-width: 900px) {
  .feat-grid, .steps3 { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .only-small { display: inline-flex !important; margin-bottom: 26px; }
}
@media (max-width: 640px) {
  .lp { padding: 0 16px; }
  .lp-links { display: none; }
  .lp-actions .btn { padding: 8px 12px; }
  .lp-hero { padding-top: 36px; }
  .feat-grid, .steps3 { grid-template-columns: 1fr; }
  .demo-clips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .demo-btn { display: none; }
  .dtitle { font-size: .74rem; }
  .lp-demo { padding: 10px; border-radius: 18px; }
  .auth-back { left: 16px; top: 18px; }
}

.forgot { display: block; text-align: right; font-size: .84rem; color: var(--muted); margin-top: -4px; }
.forgot:hover { color: var(--text); }
.auth-ico { width: 52px; height: 52px; border-radius: 16px; background: rgba(198,244,50,.1); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.auth-card .muted b { color: var(--text); }

/* -------------------------------------------------------------- billing -- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; align-items: stretch; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; text-align: left; }
.plan.popular { border-color: var(--accent); box-shadow: 0 30px 80px -40px rgba(198,244,50,.35); }
.plan-badge { position: absolute; top: -11px; left: 24px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.plan h3 { font-size: 1.15rem; margin: 0; }
.plan-tag { font-size: .88rem; margin: 6px 0 18px; min-height: 2.6em; }
.pp { display: flex; align-items: baseline; gap: 6px; }
.pp b { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; }
.pp span { color: var(--muted); font-size: .9rem; }
.pp-sub { color: var(--dim); font-size: .8rem; margin-top: 2px; min-height: 1.2em; }
.plan .btn.block { margin: 18px 0 20px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li svg.i { color: var(--accent); width: 17px; height: 17px; margin-top: 1px; }
.billing-toggle .save { font-size: .72rem; color: var(--accent); margin-left: 4px; }
.cur-plan { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 24px; align-items: center; }
.cp-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 8px; }
.cp-name .dim { font-size: 1rem; font-weight: 500; }
.chip-st { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 99px; background: var(--panel3); color: var(--muted); }
.chip-st svg.i { width: 14px; height: 14px; }
.chip-st.ok { color: var(--good); } .chip-st.warn { color: var(--warn); } .chip-st.bad { color: var(--bad); }
.cp-u-top { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); }
.cp-u-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.progress.full > div { background: var(--bad); }
.faq { max-width: 760px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; font-size: .9rem; line-height: 1.5; }
.usage-note { text-align: center; color: var(--muted); font-size: .86rem; margin: 14px 0 0; display: flex; gap: 7px; justify-content: center; align-items: center; }
.usage-note svg.i { width: 15px; height: 15px; }
.usage-note a { color: var(--accent); font-weight: 600; }
.usage-note.out { color: var(--warn); }
#toast { cursor: default; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } .cur-plan { grid-template-columns: 1fr; } }

.panel.expired { display: flex; gap: 12px; align-items: flex-start; min-height: 160px; }
.panel.expired svg.i { color: var(--warn); width: 22px; height: 22px; flex: none; }

/* ---------------------------------------------------- real demo shorts -- */
.phone.has-video { background: #000; }
.phone.has-video::after { display: none; }
.phone video, .phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-clip { margin: 0; }
.dplay { position: absolute; inset: 0; z-index: 1; background: transparent; border: 0; cursor: pointer; display: grid; place-items: center; }
.dplay-ico { width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff;
  opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; backdrop-filter: blur(4px); }
.dplay-ico svg.i { width: 22px; height: 22px; fill: currentColor; stroke: none; margin-left: 3px; }
.phone.paused .dplay-ico, .dplay:focus-visible .dplay-ico { opacity: 1; transform: scale(1); }
.phone .dscore { z-index: 2; }
.snd { position: absolute; z-index: 2; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.snd:hover { background: rgba(0,0,0,.8); }
.snd svg.i { width: 17px; height: 17px; }
.dtitle { display: flex; flex-direction: column; gap: 2px; color: var(--text) !important; }
.dtitle span { color: var(--dim); font-weight: 500; font-size: .76rem; }
.demo-credit { margin: 14px 0 0; font-size: .74rem; color: var(--dim); text-align: center; }
.demo-credit a { color: var(--muted); }
.demo-clip { display: flex; flex-direction: column; align-items: center; }
.demo-clip .dtitle { text-align: center; align-items: center; }
.demo-clip { width: 100%; }
.demo-clip .phone { width: min(100%, 186px); }

/* ---------------------------------------------------- friendly progress -- */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring .trk { fill: none; stroke: var(--panel3); }
.ring .arc { fill: none; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.4,0,.2,1); }
.ring.spin svg { animation: spin 1s linear infinite; }
.ring b { font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tag .ring { margin-right: 1px; }
.proc { display: flex; align-items: center; gap: 14px; text-align: left; }
.proc-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.proc-t { font-size: .98rem; }
.proc-s { color: var(--muted); font-size: .86rem; }
.proc.compact { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.proc.big { flex-direction: column; text-align: center; gap: 16px; }
.proc.big .proc-txt { align-items: center; }
.proc.big .proc-t { font-size: 1.25rem; font-weight: 750; letter-spacing: -.01em; }
.proc.big .proc-s { font-size: .95rem; min-height: 1.3em; }
.proc.err { align-items: flex-start; margin-top: 14px; padding: 12px; border-radius: 12px; background: #1f1113; border: 1px solid #4a1d22; }
.proc.err > svg.i { color: var(--bad); width: 22px; height: 22px; margin-top: 2px; }
.proc-det { margin-top: 6px; font-size: .78rem; color: var(--dim); }
.proc-det summary { cursor: pointer; }
.proc-det code { display: block; margin-top: 6px; white-space: pre-wrap; word-break: break-word; color: var(--muted); }
.proc-note { display: block; color: var(--dim); font-size: .82rem; margin-top: 14px; text-align: center; }
.pend .pend-proc { margin-top: 22px; }
.pend-name { margin-bottom: 4px; }
.drop.uploading { cursor: default; border-style: solid; border-color: var(--line2); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.drop.uploading:hover { background: var(--bg); }
.panel.is-busy label, .panel.is-busy .presets, .panel.is-busy .row:not(.end) { opacity: .45; pointer-events: none; transition: opacity .2s; }
.clips-wait { grid-column: 1 / -1; padding: 36px 16px 8px; border: 1px dashed var(--line2); border-radius: var(--radius); }
.sk-shorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 26px; }
.sk-short { aspect-ratio: 9 / 16; border-radius: 14px; }
.state.making { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }

/* ----------------------------------------------- transfer bar (straight) -- */
.xfer { width: 100%; max-width: 420px; margin: 0 auto; }
.xfer-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.xfer-l { font-size: 1rem; font-weight: 650; }
.xfer-p { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.xfer-track { height: 8px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.xfer-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #c6f432, #22c55e); transition: width .5s cubic-bezier(.4,0,.2,1); }
.xfer.indet .xfer-fill { width: 35%; animation: indet 1.2s ease-in-out infinite; }
.up-proc { width: 100%; padding: 6px 4px; }
.pend { max-width: 520px; }
.pend .pend-proc { margin-top: 18px; }
.tag.busy { color: var(--good); }

/* ---------------------------------------------------------------- look -- */
.look { display: flex; flex-direction: column; gap: 14px; --cap-top: 72%; --cap-scale: 1; }
.look[data-pos="top"] { --cap-top: 22%; } .look[data-pos="middle"] { --cap-top: 50%; } .look[data-pos="bottom"] { --cap-top: 72%; }
.look[data-size="s"] { --cap-scale: .8; } .look[data-size="l"] { --cap-scale: 1.2; }
.look-h { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.cap-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fit-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 330px; }
.tile { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.tile .tl { font-size: .74rem; font-weight: 600; }
.tile[aria-pressed=true] .tl { color: var(--text); }
.mini { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 9px; overflow: hidden; border: 2px solid var(--line2);
  background: #111 url("/demo/look-cap.jpg") center / cover; transition: border-color .15s, transform .15s; }
.tile:hover .mini { border-color: #55555f; }
.tile[aria-pressed=true] .mini { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198,244,50,.15); }
.tile:focus-visible { outline: none; } .tile:focus-visible .mini { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-none { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; }
.mcap { position: absolute; left: 6%; right: 6%; top: var(--cap-top); transform: translateY(-50%); text-align: center; line-height: 1.15;
  font-size: calc(7.5px * var(--cap-scale)); transition: top .2s, font-size .2s; }
.mcap i { font-style: normal; }
.cap-bold { font-family: "Arial Black", Arial, sans-serif; font-weight: 900; color: #fff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.cap-bold i { color: #ffe14d; }
.cap-neon { font-family: Impact, "Arial Narrow", sans-serif; color: #fff; letter-spacing: .02em;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.cap-neon i { color: #39ff14; }
.cap-boxed { color: #fff; font-family: Arial, sans-serif; font-weight: 700; } .cap-boxed i { color: #ffe14d; }
.cap-boxed { left: 10%; right: 10%; background: rgba(0,0,0,.72); padding: 2px 3px; border-radius: 2px; }
.cap-minimal { color: #fff; font-family: Arial, sans-serif; font-size: calc(6.5px * var(--cap-scale)); text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.look.no-caps .cap-opts { opacity: .4; pointer-events: none; }
.seg-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--panel3); color: var(--text); font-weight: 600; }
/* layout previews: fill = whole card, blur = blurred bg + sharp band, bars = black + sharp band */
.mini.fit-crop { background-image: url("/demo/look-fit.jpg"); }
.mini.fit-crop .band { display: none; }
.mini.fit-blur, .mini.fit-fit { background-image: none; }
.mini.fit-blur::before { content: ""; position: absolute; inset: -10%; background: url("/demo/look-fit.jpg") center / cover; filter: blur(6px) brightness(.8); }
.mini.fit-fit { background: #000; }
.mini .band { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); aspect-ratio: 2.39 / 1; background: url("/demo/look-fit.jpg") center 30% / cover; }
.look-hook { font-size: .82rem; color: var(--muted); }
.look-wrap { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.look-wrap #apply-all { margin-top: 12px; }
.modal.look-modal { width: 560px; }
.look-btn { border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 9px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .84rem; }
.look-btn:hover { border-color: var(--line2); }
#e-look { margin: 10px 0; }
/* clip cards: virality lives in the body, never on the video */
.clip-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; margin-top: 2px; flex-wrap: wrap; }
.vir { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; }
.vir-l { color: var(--dim); }
.vir-bar { width: 46px; height: 5px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.vir-bar i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.vir.hot .vir-bar i { background: linear-gradient(90deg, #c6f432, #22c55e); } .vir.hot b { color: var(--good); }
.vir.mid .vir-bar i { background: var(--warn); } .vir.mid b { color: var(--warn); }
.vir b { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- editor -- */
.modal.ed { width: 1120px; }
.ed .editor-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: start; }
.ed-left .frame-wrap video { max-height: 52vh; background: #000; }
.trim { margin-top: 12px; }
.trim-track { position: relative; height: 40px; border-radius: 10px; background: var(--panel2) repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,255,255,.04) 23px 24px);
  border: 1px solid var(--line2); cursor: pointer; touch-action: none; }
.trim-sel { position: absolute; top: -1px; bottom: -1px; background: rgba(198,244,50,.16); border: 2px solid var(--accent); border-radius: 10px; }
.trim-h { position: absolute; top: 50%; width: 14px; height: 34px; transform: translateY(-50%); background: var(--accent); border: 0; border-radius: 5px;
  cursor: ew-resize; padding: 0; }
.trim-h::after { content: ""; position: absolute; left: 50%; top: 9px; bottom: 9px; width: 2px; transform: translateX(-50%); background: var(--accent-ink); border-radius: 2px; }
.trim-h.in { left: -8px; } .trim-h.out { right: -8px; }
.trim-h:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.trim-head { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; pointer-events: none; border-radius: 2px; }
.trim-scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--dim); margin-top: 6px; font-variant-numeric: tabular-nums; }
.trim-scale b { color: var(--text); font-weight: 600; }
.trim-ctrls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; }
.nudge { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.nudge span { margin-right: 4px; } .nudge b { color: var(--text); font-variant-numeric: tabular-nums; }
.nudge button { border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: 7px; font: inherit; font-size: .76rem; padding: 4px 7px; cursor: pointer; }
.nudge button:hover { border-color: #4a4a53; }
.ed-right { display: flex; flex-direction: column; min-height: 0; }
.ed-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 12px; }
.ed-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .86rem; font-weight: 600; padding: 8px; border-radius: 8px; cursor: pointer; }
.ed-tabs button[aria-selected=true] { background: var(--panel3); color: var(--text); }
.ed-pane { max-height: 56vh; overflow: auto; padding-right: 4px; }
.ed-foot { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.bar-colors { margin: 12px 0 4px; }
.swatch-row { display: flex; gap: 8px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line2); cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; color: var(--muted); }
.swatch[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198,244,50,.18); }
.swatch.custom { background: var(--panel2); overflow: hidden; }
.swatch.custom svg.i { width: 14px; height: 14px; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; }
.cap-toggle { margin-bottom: 12px; }
.cap-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.cap-lines { display: flex; flex-direction: column; gap: 6px; }
.cap-line { display: grid; grid-template-columns: 44px 1fr 30px; gap: 8px; align-items: center; }
.cap-line .t { font-size: .74rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.cap-line input { margin: 0; padding: 8px 10px; font-size: .88rem; }
.cap-line .icon-btn { width: 30px; height: 30px; }
#e-capwrap.off { opacity: .4; pointer-events: none; }
