/* =========================================================================
   UltraClips — one stylesheet, organised top to bottom:
   1 tokens · 2 base · 3 layout · 4 components · 5 pages · 6 animations
   ========================================================================= */

/* 1 ─ Tokens ------------------------------------------------------------ */
:root {
  --bg: #08080c;
  --bg-2: #0e0e14;
  --surface: #13131b;
  --surface-2: #1a1a24;
  --surface-3: #22222e;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #ececf3;
  --text-2: #a3a3b5;
  --text-3: #6c6c80;

  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ec4899 100%);

  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.13);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.13);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.13);
  --info: #38bdf8;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar: 240px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.ttf"); }
@font-face { font-family: "Bebas Neue"; src: url("/fonts/BebasNeue-Regular.ttf"); }
@font-face { font-family: "Archivo Black"; src: url("/fonts/ArchivoBlack-Regular.ttf"); }
@font-face { font-family: "Poppins"; font-weight: 700; src: url("/fonts/Poppins-Bold.ttf"); }

/* 2 ─ Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {               /* soft glow behind everything */
  content: "";
  position: fixed;
  inset: -20% -10% auto auto;
  width: 60vw; height: 60vw;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.10), transparent);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: rgba(139, 92, 246, 0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

i[data-icon] { display: inline-flex; width: 18px; height: 18px; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }

/* 3 ─ Layout ------------------------------------------------------------ */
.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0;
  width: var(--sidebar); height: 100vh;
  flex: none;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: 0 6px 20px -6px rgba(217, 70, 239, 0.6);
}
.brand-mark svg { width: 16px; height: 16px; fill: #fff; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: #fff; }
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.plan-pill {
  padding: 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
}
.plan-pill strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.plan-pill .bar { margin-top: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 32px;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.topbar-title .crumb { color: var(--text-3); font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.page { padding: 28px 32px 60px; max-width: 1400px; width: 100%; margin: 0 auto; }
.page.full { max-width: none; padding: 0; }
.only-mobile { display: none !important; }
.scrim { display: none; }

/* 4 ─ Components -------------------------------------------------------- */
/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 13.5px; white-space: nowrap;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255,255,255,.18); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary {
  border: 0; color: #fff; background: var(--grad); background-size: 160% 160%;
  box-shadow: 0 8px 24px -10px rgba(217, 70, 239, .7);
}
.btn-primary:hover { background: var(--grad); background-position: 100% 0; box-shadow: 0 10px 30px -8px rgba(217, 70, 239, .85); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger:hover { background: var(--bad-soft); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.btn-ok { background: var(--ok-soft); border-color: rgba(34,197,94,.35); color: #86efac; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn .spin { width: 14px; height: 14px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent;
  display: inline-grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-title .dim { font-weight: 500; }
.grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.section-head { display: flex; align-items: end; gap: 12px; margin: 30px 0 14px; }
.section-head h2 { font-size: 16px; }

/* Badges + chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: #86efac; }
.badge.warn { background: var(--warn-soft); color: #fcd34d; }
.badge.bad { background: var(--bad-soft); color: #fca5a5; }
.badge.accent { background: var(--accent-soft); color: #c4b5fd; }
.badge.live::before { animation: pulse-dot 1.4s infinite; }
.badge.plain::before { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.chip.on { background: var(--accent-soft); border-color: rgba(139,92,246,.6); color: #fff; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b5' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group { display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.hint { font-size: 12px; color: var(--text-3); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3);
  position: relative; transition: background .25s var(--ease); flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .25s var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); transition: transform .15s;
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }
.range-row { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 10px; }
.range-row output { text-align: right; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Progress */
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar > span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--grad); background-size: 200% 100%;
  transition: width .5s var(--ease);
}
.bar.live > span { animation: shimmer 1.6s linear infinite; }
.bar.ok > span { background: var(--ok); }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r); }

/* Empty state */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--text-2);
}
.empty .empty-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: #c4b5fd;
}
.empty .empty-icon i { width: 26px; height: 26px; }
.empty h3 { color: var(--text); font-size: 16px; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.tab {
  flex: 1; height: 32px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s, color .2s;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface-3); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tab i { width: 15px; height: 15px; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  animation: toast-in .35s var(--ease);
}
.toast.out { animation: toast-out .25s ease forwards; }
.toast .t-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast.ok .t-icon { background: var(--ok-soft); color: var(--ok); }
.toast.bad .t-icon { background: var(--bad-soft); color: var(--bad); }
.toast.info .t-icon { background: var(--accent-soft); color: #c4b5fd; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 4, 8, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade-in .2s ease;
}
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: pop-in .35s var(--ease);
}
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; flex: 1; }
.modal-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 22px; }
.modal-backdrop.closing { animation: fade-out .2s ease forwards; }
.modal-backdrop.closing .modal { animation: pop-out .2s ease forwards; }

/* Dropzone */
.drop {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 200px; padding: 26px; text-align: center;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  background: var(--bg-2); cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(139,92,246,.06); }
.drop.over { transform: scale(1.01); }
.drop .drop-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(217,70,239,.7);
  animation: float 3s ease-in-out infinite;
}
.drop .drop-icon i { width: 26px; height: 26px; }
.drop strong { font-size: 15px; }
.file-pill { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); }
.file-pill .grow { flex: 1; min-width: 0; }
.file-pill .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 5 ─ Pages ------------------------------------------------------------- */
/* Hero + stats */
.hero {
  position: relative; overflow: hidden;
  padding: 30px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 85% -10%, rgba(236,72,153,.18), transparent 70%),
    radial-gradient(500px 260px at 10% 120%, rgba(139,92,246,.20), transparent 70%),
    var(--surface);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.hero p { color: var(--text-2); margin-top: 8px; max-width: 520px; }
.hero .grow { flex: 1; min-width: 260px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.stat { padding: 18px; }
.stat .stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.stat .stat-label i { width: 16px; height: 16px; color: #c4b5fd; }
.stat .stat-value { font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: -0.03em; }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.two-col > *, .grid > * { min-width: 0; }

.health-list { display: flex; flex-direction: column; gap: 10px; }
.health-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.health-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.health-item .dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.health-item .dot.bad { background: var(--warn); }
.health-item .name { font-weight: 600; width: 92px; flex: none; }
.health-item .detail { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { display: grid; grid-template-columns: 54px 1fr 64px; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 10px; }
.meter span:last-child { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.p-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  cursor: pointer;
}
.p-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.p-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-2); overflow: hidden; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.p-card:hover .p-thumb img { transform: scale(1.05); }
.p-thumb .dur { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.7); font-size: 11.5px; font-weight: 600; }
.p-thumb .status { position: absolute; left: 10px; top: 10px; }
.p-body { padding: 14px 16px 16px; }
.p-body h3 { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { display: flex; gap: 12px; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.p-card .p-menu { position: absolute; right: 8px; top: 8px; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.55); }
.p-card:hover .p-menu { opacity: 1; }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); }

/* Project page */
.proj-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.proj-head .thumb { width: 180px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--bg-2); flex: none; }
.proj-head .thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-head .grow { flex: 1; min-width: 240px; }
.proj-head h1 { font-size: 22px; font-weight: 800; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--text-2); font-size: 12.5px; }
.proj-meta span { display: inline-flex; align-items: center; gap: 6px; }
.proj-meta i { width: 14px; height: 14px; color: var(--text-3); }

.pipeline { display: flex; flex-direction: column; gap: 4px; }
.stage { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 6px; border-radius: 10px; transition: background .3s; }
.stage.running { background: var(--accent-soft); }
.stage .s-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); font-size: 12px; font-weight: 700; }
.stage.done .s-icon { background: var(--ok-soft); color: var(--ok); }
.stage.running .s-icon { background: var(--accent); color: #fff; box-shadow: 0 0 0 6px rgba(139,92,246,.18); animation: ring 1.6s infinite; }
.stage.failed .s-icon { background: var(--bad-soft); color: var(--bad); }
.stage.skipped .s-icon { color: var(--text-3); }
.stage .s-label { font-weight: 600; }
.stage .s-detail { font-size: 12px; color: var(--text-3); }
.stage .s-icon i { width: 15px; height: 15px; }

/* Clip cards (vertical) */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.c-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, opacity .3s;
}
.c-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.c-card.rejected { opacity: .45; }
.c-card.approved { border-color: rgba(34,197,94,.45); }
.c-media { position: relative; aspect-ratio: 9/16; overflow: hidden; cursor: pointer;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite; }
.c-media img, .c-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-media video { opacity: 0; transition: opacity .3s; }
.c-media.playing video { opacity: 1; }
.c-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, transparent 25%, transparent 55%, rgba(0,0,0,.85) 100%); pointer-events: none; }
.c-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; z-index: 2; }
.c-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; }
.c-bottom h4 { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-bottom .dim { font-size: 11.5px; color: rgba(255,255,255,.7); margin-top: 4px; }
.c-rank { padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.6); font-size: 11.5px; font-weight: 700; }
.c-actions { display: flex; gap: 6px; padding: 10px; }
.c-actions .btn { flex: 1; }

.score-ring { --v: 0; position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: conic-gradient(var(--c, #8b5cf6) calc(var(--v) * 1%), rgba(255,255,255,.12) 0);
  display: grid; place-items: center; }
.score-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: rgba(10,10,14,.9); }
.score-ring span { position: relative; font-size: 12px; font-weight: 800; }

/* Studio */
.studio { display: grid; grid-template-columns: 250px 1fr 360px; height: calc(100vh - 64px); }
.studio-list { border-right: 1px solid var(--line); overflow: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); }
.s-clip { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; transition: background .2s; align-items: center; }
.s-clip:hover { background: var(--surface); }
.s-clip.on { background: var(--accent-soft); }
.s-clip img { width: 48px; height: 64px; object-fit: cover; border-radius: 6px; background: #000; }
.s-clip .t { font-size: 12.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-clip .m { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; align-items: center; }

.stage-area { display: flex; flex-direction: column; min-width: 0; overflow: auto; }
.viewer { flex: 1; min-height: 420px; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(139,92,246,.08), transparent 60%); }
.frame { position: relative; height: min(64vh, 640px); background: #000; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); transition: aspect-ratio .4s var(--ease); }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.fit video { object-fit: contain; }
.frame .blur-bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(28px) brightness(.55); }
.frame.fit_solid .blur-bg { display: none; }
.frame .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.65)); opacity: 0; transition: opacity .3s; }
.frame.vig .vignette { opacity: 1; }
.caption {
  position: absolute; left: 50%; transform: translate(-50%, -50%);
  width: 90%; text-align: center; cursor: grab; user-select: none; z-index: 3;
  line-height: 1.1; padding: 4px; border-radius: 8px; border: 1px dashed transparent;
  transition: border-color .2s;
}
.caption:hover { border-color: rgba(255,255,255,.35); }
.caption.dragging { cursor: grabbing; border-color: var(--accent); }
.caption .w { display: inline-block; margin: 0 .12em; transition: transform .12s, color .12s; }
.caption .w.on { color: var(--hl, #5b8cff); transform: scale(1.08); }
.caption.boxed .inner { background: rgba(0,0,0,.62); padding: .1em .35em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.transport { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--bg-2); }
.transport .time { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 92px; }
.play-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #000; display: grid; place-items: center; cursor: pointer; transition: transform .15s var(--ease); }
.play-btn:hover { transform: scale(1.06); }
.play-btn i { width: 18px; height: 18px; }

.timeline { padding: 16px 24px 22px; background: var(--bg-2); }
.tl-track { position: relative; height: 54px; border-radius: 10px; background: var(--surface); overflow: hidden; border: 1px solid var(--line); user-select: none; }
.tl-wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; padding: 0 2px; opacity: .45; }
.tl-wave b { flex: 1; background: var(--text-3); border-radius: 2px; }
.tl-sel { position: absolute; top: 0; bottom: 0; background: rgba(139,92,246,.22); border: 2px solid var(--accent); border-radius: 8px; }
.tl-handle { position: absolute; top: -2px; bottom: -2px; width: 12px; background: var(--accent); cursor: ew-resize; display: grid; place-items: center; }
.tl-handle::after { content: ""; width: 2px; height: 18px; border-radius: 2px; background: rgba(255,255,255,.8); }
.tl-handle.l { left: -2px; border-radius: 7px 0 0 7px; }
.tl-handle.r { right: -2px; border-radius: 0 7px 7px 0; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 8px #fff; pointer-events: none; }
.tl-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; font-variant-numeric: tabular-nums; }

.inspector { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.inspector-head { padding: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.inspector-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.inspector-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.save-state { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.save-state.saving::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: pulse-dot 1s infinite; }
.save-state.saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.style-tile { height: 58px; border-radius: 10px; border: 1px solid var(--line-2); background: #000 linear-gradient(135deg, #1e1b2e, #0b0b10); display: grid; place-items: center; cursor: pointer; transition: all .2s var(--ease); font-size: 15px; text-transform: uppercase; }
.style-tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); }
.style-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.style-tile small { display: block; font-family: Inter, sans-serif; font-size: 10px; text-transform: none; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.ai-reason { padding: 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(139,92,246,.3); font-size: 12.5px; color: #ddd6fe; }
.ai-reason strong { display: flex; align-items: center; gap: 6px; color: #fff; margin-bottom: 4px; font-size: 12px; }
.score-bars { display: flex; flex-direction: column; gap: 8px; }
.score-bars .meter { grid-template-columns: 90px 1fr 34px; margin: 0; }
.share-box { display: flex; flex-direction: column; gap: 8px; }

/* Exports table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; padding: 0 14px 10px; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.ex-thumb { width: 44px; height: 64px; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; position: relative; }
.ex-thumb video { width: 100%; height: 100%; object-fit: cover; }

/* Jobs mini panel (sidebar) */
.jobs-mini { display: flex; flex-direction: column; gap: 8px; }
.job-mini { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; animation: slide-up .4s var(--ease); }
.job-mini .row { justify-content: space-between; margin-bottom: 6px; }
.job-mini .msg { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; font-size: 11.5px; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.settings-nav a:hover { background: var(--surface); color: var(--text); }
.settings-sections { display: flex; flex-direction: column; gap: 16px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-row .txt { flex: 1; }
.setting-row .txt strong { display: block; font-weight: 600; }
.setting-row .ctl { width: 240px; flex: none; }
.setting-row .ctl.auto { width: auto; }
.code-box { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; letter-spacing: .06em; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); }

/* Sidebar: plan meter + user chip */
a.plan-pill { display: block; transition: border-color .2s, background .2s; }
a.plan-pill:hover { border-color: rgba(139,92,246,.45); background: var(--surface-2); }
.bar.warn > span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; transition: background .2s; }
.user-chip:hover { background: var(--surface); }
.user-chip .who { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.user-chip .who strong { font-size: 13px; }
.user-chip .who span { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 12.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* Auth screen */
body.auth-mode .app { display: none; }
#authRoot:empty { display: none; }
.auth-page { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-showcase { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: #0b0a12; border-right: 1px solid var(--line); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.blob.b1 { width: 420px; height: 420px; background: #8b5cf6; top: -120px; left: -80px; }
.blob.b2 { width: 360px; height: 360px; background: #ec4899; bottom: -120px; right: -60px; animation-delay: -4s; }
.blob.b3 { width: 260px; height: 260px; background: #38bdf8; top: 40%; left: 40%; opacity: .25; animation-delay: -8s; }
.auth-copy { position: relative; z-index: 2; }
.auth-copy h1 { font-size: 46px; font-weight: 800; letter-spacing: -0.04em; margin: 56px 0 26px; line-height: 1.05; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-weight: 500; }
.pt-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: #c4b5fd; }
.pt-icon i { width: 16px; height: 16px; }
.float-cards { position: relative; z-index: 2; height: 250px; margin-top: 30px; }
.float-card { position: absolute; width: 150px; height: 230px; border-radius: 18px; padding: 12px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), linear-gradient(160deg, #2a1f4a, #120f1d);
  border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow-lg); backdrop-filter: blur(6px); animation: float 6s ease-in-out infinite; }
.float-card.f1 { left: 0; top: 10px; transform: rotate(-6deg); }
.float-card.f2 { left: 130px; top: 0; z-index: 2; animation-delay: -2s; }
.float-card.f3 { left: 260px; top: 18px; transform: rotate(6deg); animation-delay: -4s; }
.fc-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-2); }
.fc-score { padding: 1px 7px; border-radius: 999px; background: var(--ok-soft); color: #86efac; }
.fc-cap { margin-top: auto; text-align: center; font-family: "Anton", Impact, sans-serif; font-size: 17px; letter-spacing: .02em; text-shadow: 0 2px 0 #000, 0 0 6px #000; }
.fc-cap .hl { color: #5b8cff; }
.fc-title { font-size: 11px; color: var(--text-2); margin-top: 10px; }
.auth-side { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); padding: 32px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg); animation: pop-in .5s var(--ease); transition: opacity .25s, transform .25s; }
.auth-card.leaving { opacity: 0; transform: translateY(-10px) scale(.98); }
.auth-card.shake { animation: shake .4s; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.auth-head .brand-mark { margin-bottom: 6px; }
.auth-head h2 { font-size: 24px; font-weight: 800; }
.auth-error { padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: #fca5a5; font-size: 13px; border: 1px solid rgba(239,68,68,.3); }
.btn-lg { height: 46px; font-size: 14.5px; }
.pw-strength { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 2px; }
.pw-strength span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s var(--ease), background .3s; background: var(--bad); }
.pw-strength[data-level="2"] span { background: var(--warn); }
.pw-strength[data-level="3"] span, .pw-strength[data-level="4"] span { background: var(--ok); }

/* Billing */
.test-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid rgba(245,158,11,.35); color: #fcd34d; font-size: 13px; }
.test-banner i { width: 16px; height: 16px; }
.current-plan h2 { font-size: 24px; font-weight: 800; }
.plan-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.plan-icon i { width: 24px; height: 24px; }
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.usage-meter { display: flex; flex-direction: column; gap: 8px; }
.interval-toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.interval-toggle button { border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 12.5px; padding: 7px 14px; border-radius: 9px; cursor: pointer; transition: all .2s; }
.interval-toggle button.on { background: var(--surface-3); color: #fff; }
.interval-toggle .save { color: #86efac; font-size: 11px; margin-left: 4px; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.price-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.price-card.popular { border-color: rgba(139,92,246,.6); background: linear-gradient(180deg, rgba(139,92,246,.12), transparent 40%), var(--surface);
  box-shadow: 0 0 0 1px rgba(139,92,246,.3), 0 20px 60px -20px rgba(139,92,246,.45); }
.price-card.current { border-color: rgba(34,197,94,.45); }
.price-card h3 { font-size: 17px; }
.ribbon { position: absolute; top: -11px; left: 22px; padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; }
.price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.price .amount { font-size: 38px; font-weight: 800; letter-spacing: -0.04em; }
.price .per { color: var(--text-3); }
.billed { margin-top: -6px; margin-bottom: 6px; }
.features { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--text-2); }
.features li { display: flex; gap: 8px; align-items: flex-start; }
.features li i { width: 16px; height: 16px; color: var(--ok); margin-top: 1px; }
.checkout { max-width: 520px; margin: 0 auto; }
.checkout-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.checkout-card h2 { font-size: 22px; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.checkout-total strong { font-size: 26px; }
.account { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.account-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
}
@media (max-width: 560px) { .pricing-grid, .usage-grid { grid-template-columns: 1fr; } .auth-card { padding: 24px; } }

/* Auth extras + verify banner */
.link-btn { border: 0; background: none; padding: 0; color: #c4b5fd; font-weight: 600; font-size: 12px; cursor: pointer; }
.link-btn:hover { color: #fff; text-decoration: underline; }
.auth-alt { text-align: center; }
.sent-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: #c4b5fd; animation: float 3s ease-in-out infinite; }
.sent-icon i { width: 28px; height: 28px; }
.dev-note { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: #fcd34d; }
.verify-banner { display: flex; align-items: center; gap: 10px; padding: 10px 32px; font-size: 13px;
  background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(236,72,153,.12)); border-bottom: 1px solid var(--line); }
.verify-banner i { width: 16px; height: 16px; color: #c4b5fd; }
.verify-banner span { flex: 1; }
.nav a .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad);
  color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; animation: pulse-dot 1.6s infinite; }

/* Social Manager ---------------------------------------------------------- */
.subnav { display: flex; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; }
.subnav { scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav-item { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; transition: all .2s; }
.subnav-item i { width: 16px; height: 16px; }
.subnav-item:hover { color: var(--text); background: var(--surface); }
.subnav-item.on { color: #fff; background: var(--surface-3); box-shadow: 0 2px 10px rgba(0,0,0,.3); }

.pf-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 11px; flex: none; letter-spacing: -.02em; box-shadow: 0 4px 12px -4px rgba(0,0,0,.6); }
.pf-badge.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 9.5px; }
.pf-badge.xs { width: 16px; height: 16px; border-radius: 4px; font-size: 7.5px; }
.clip-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.post-row:hover { border-color: var(--line-2); transform: translateX(3px); }
.post-row.due { border-color: rgba(245,158,11,.5); background: linear-gradient(90deg, rgba(245,158,11,.08), transparent 60%), var(--surface); }
.post-thumb { position: relative; width: 64px; height: 86px; border-radius: 10px; overflow: hidden; }
.post-badge { position: absolute; left: 4px; bottom: 4px; }
.post-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.post-main .row { flex-wrap: wrap; gap: 8px; }
.post-text { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-tags { color: #a78bfa; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-actions { display: flex; gap: 4px; align-items: center; }

.compose { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.clip-picker { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); max-height: calc(100vh - 110px); }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.picker-list { overflow: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -6px; padding: 0 6px; }
.pick { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  text-align: left; cursor: pointer; transition: all .2s; color: inherit; }
.pick:hover { background: var(--surface-2); }
.pick.on { background: var(--accent-soft); border-color: rgba(139,92,246,.5); }
.pick img { width: 46px; height: 62px; border-radius: 8px; object-fit: cover; }
.pick-title { font-size: 12.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ok-dot { color: #86efac; }
.compose-work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.compose-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.compose-card.sticky { position: sticky; top: 84px; }
.compose-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 80px 20px;
  border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.compose-empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: #c4b5fd; }
.pf-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 9px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: 13px; transition: all .2s var(--ease); }
.pf-toggle:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.pf-toggle.on { color: #fff; border-color: rgba(139,92,246,.6); background: var(--accent-soft); }
.pf-toggle i { width: 14px; height: 14px; color: #86efac; }
.pf-toggle:not(.on) .pf-badge { filter: grayscale(.8); opacity: .6; }
.compose-controls { display: flex; flex-direction: column; gap: 12px; }
.compose-controls .row { align-items: flex-end; }
.ai-state { align-self: center; }
.pf-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; overflow-x: auto; }
.pf-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pf-tab.on { background: var(--surface-3); color: #fff; }
.spin.tiny { width: 12px; height: 12px; border-width: 2px; }
.editor-grid { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.preview-col { display: flex; flex-direction: column; gap: 10px; align-items: center; position: sticky; top: 90px; }
.editor-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.char-count { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--bad); font-weight: 700; }
.hooks { display: flex; flex-direction: column; gap: 6px; }
.hook { display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-size: 13px; transition: all .2s; }
.hook:hover { border-color: rgba(139,92,246,.6); background: var(--accent-soft); }
.hook i { width: 14px; height: 14px; color: #fcd34d; flex: none; }
.compose-footer { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px;
  border-radius: var(--r-lg); background: rgba(19,19,27,.92); backdrop-filter: blur(12px); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }

.tag-box { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 42px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); cursor: text; }
.tag-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px;
  background: var(--accent-soft); color: #ddd6fe; font-size: 12.5px; font-weight: 600; animation: pop-in .25s var(--ease); }
.tag-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; }
.tag-chip button:hover { background: rgba(255,255,255,.12); }
.tag-input { flex: 1; min-width: 110px; border: 0; outline: none; background: transparent; font-size: 13px; }

/* Phone + feed previews */
.phone { position: relative; width: 260px; aspect-ratio: 9/19.5; border-radius: 38px; padding: 10px; background: #050507;
  box-shadow: 0 0 0 2px #2a2a36, 0 30px 70px -20px rgba(0,0,0,.9); }
.phone-notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; border-radius: 20px; background: #000; z-index: 4; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #000; }
.phone-screen video, .phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 22%, transparent 55%, rgba(0,0,0,.8)); pointer-events: none; }
.phone-top { position: absolute; top: 44px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; z-index: 2; color: rgba(255,255,255,.9); }
.phone-rail { position: absolute; right: 8px; bottom: 90px; display: flex; flex-direction: column; gap: 14px; z-index: 2; font-size: 18px; text-shadow: 0 1px 4px #000; }
.phone-caption { position: absolute; left: 12px; right: 44px; bottom: 16px; z-index: 2; font-size: 11.5px; line-height: 1.4; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.phone-caption strong { display: block; margin-bottom: 4px; font-size: 12.5px; }
.ph-title { font-weight: 700; margin-bottom: 3px; }
.ph-text { white-space: pre-wrap; word-break: break-word; }
.ph-text .tag, .feed-text .tag { color: #a5c8ff; font-weight: 600; }
.phone.reels .ph-text .tag { color: #e0e7ff; }
.more { color: rgba(255,255,255,.65); }
.feed-card { width: 290px; border-radius: 16px; overflow: hidden; background: #fff; color: #0f1419; box-shadow: 0 30px 70px -25px rgba(0,0,0,.9); font-size: 13px; }
.feed-card.x { background: #000; color: #e7e9ea; border: 1px solid #2f3336; }
.feed-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 6px; }
.feed-head div { display: flex; flex-direction: column; }
.feed-head .dim { font-size: 11px; }
.feed-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; }
.feed-text { padding: 4px 12px 10px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.feed-card.linkedin .feed-text .tag, .feed-card.facebook .feed-text .tag { color: #0a66c2; }
.feed-media { position: relative; background: #000; overflow: hidden; }
.feed-media video, .feed-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed-actions { display: flex; justify-content: space-around; padding: 10px; font-size: 12px; font-weight: 600; color: #536471; border-top: 1px solid rgba(0,0,0,.08); }
.feed-card.x .feed-actions { border-color: #2f3336; color: #71767b; }

/* Publish flow */
.publish-steps { display: flex; flex-direction: column; gap: 12px; }
.publish-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.publish-step.done { border-color: rgba(34,197,94,.35); }
.publish-step > div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 13px; }
.publish-step.done .step-num { background: var(--ok-soft); color: var(--ok); }
.step-num i { width: 15px; height: 15px; }
.kit-caption { margin: 0; max-height: 120px; overflow: auto; width: 100%; white-space: pre-wrap; font: 12.5px/1.5 Inter, sans-serif; color: var(--text-2);
  padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.edit-preview { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clip-thumb.big { width: 220px; height: 390px; border-radius: 14px; }
.edit-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { font-size: 20px; min-width: 190px; text-align: center; }
.cal-head .icon-btn span { font-size: 22px; line-height: 1; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); }
.cal-legend span { display: inline-flex; gap: 5px; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell, .cal-chip { min-width: 0; overflow: hidden; }
.cal-chip .pf-badge { flex: none; }
.cal-dow { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 6px 4px; }
.cal-cell { position: relative; min-height: 118px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, background .2s; }
.cal-cell.other { opacity: .45; }
.cal-cell.today { border-color: rgba(139,92,246,.6); box-shadow: inset 0 0 0 1px rgba(139,92,246,.3); }
.cal-cell.today .cal-date { background: var(--grad); color: #fff; }
.cal-cell.drop { background: var(--accent-soft); border-color: var(--accent); }
.cal-date { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); }
.cal-chip { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 7px; font-size: 11px; cursor: pointer;
  background: color-mix(in srgb, var(--pf) 16%, var(--surface-2)); border-left: 3px solid var(--pf); transition: transform .15s; }
.cal-chip:hover { transform: translateY(-1px); }
.cal-chip.dragging { opacity: .4; }
.cal-chip.posted { opacity: .55; }
.cal-chip.draft { border-left-style: dashed; }
.cal-chip i { width: 12px; height: 12px; color: var(--ok); }
.cal-chip .t { font-weight: 700; white-space: nowrap; }
.cal-chip .c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.cal-more { font-size: 11px; color: var(--text-3); padding-left: 4px; }
.cal-add { position: absolute; top: 6px; right: 8px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  color: var(--text-3); opacity: 0; transition: opacity .2s; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--surface-3); color: #fff; }

/* Plan my week */
.plan-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.plan-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.plan-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.plan-clip { position: relative; aspect-ratio: 9/14; border-radius: 12px; overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; background: #000; transition: all .2s var(--ease); }
.plan-clip img { opacity: .55; transition: opacity .2s; }
.plan-clip.on { border-color: var(--accent); transform: scale(1.02); }
.plan-clip.on img { opacity: 1; }
.plan-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.6); color: transparent; border: 1px solid rgba(255,255,255,.4); }
.plan-clip.on .plan-check { background: var(--accent); color: #fff; border-color: var(--accent); }
.plan-check i { width: 13px; height: 13px; }
.plan-clip-title { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 10.5px; font-weight: 600; color: #fff; text-align: left;
  text-shadow: 0 1px 3px #000; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.plan-pf { display: flex; gap: 8px; align-items: center; }
.plan-pf .pf-toggle { flex: 1; }
.input.time { width: 132px; height: 40px; flex: none; padding: 0 8px; }
.plan-timeline { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow: auto; }
.plan-day-head { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.plan-slot { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg-2); font-size: 12px; margin-bottom: 4px; animation: slide-up .3s var(--ease); }
.plan-slot-title { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upsell { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px; }
.upsell > div { flex: 1; min-width: 240px; }
.upsell h2 { font-size: 20px; margin-bottom: 6px; }

/* Brand kit */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.brand-grid .card { display: flex; flex-direction: column; gap: 14px; }
.sets { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.set-row { display: grid; grid-template-columns: 130px 1fr 36px; gap: 8px; width: 100%; align-items: start; }
.social-cta { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(236,72,153,.12)); border: 1px solid rgba(139,92,246,.4); transition: transform .2s var(--ease); }
.social-cta:hover { transform: translateY(-2px); }
.social-cta .plan-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.social-cta > div { flex: 1; }
.social-cta > i { width: 16px; height: 16px; color: var(--text-3); }

@media (max-width: 1100px) {
  .compose, .plan-grid { grid-template-columns: 1fr; }
  .clip-picker { position: static; max-height: 320px; }
  .compose-card.sticky { position: static; }
}
@media (max-width: 760px) {
  .editor-grid, .edit-grid { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .post-row { grid-template-columns: 52px 1fr; }
  .post-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .cal-cell { min-height: 80px; padding: 4px; }
  .cal-chip .c, .cal-chip .t { display: none; }
  .verify-banner { padding: 10px 16px; flex-wrap: wrap; }
  .set-row { grid-template-columns: 1fr 36px; }
  .set-row .tag-box { grid-column: 1 / -1; }
}

/* 6 ─ Animations -------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(139,92,246,.5); } 100% { box-shadow: 0 0 0 10px rgba(139,92,246,0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

.page-enter { animation: slide-up .45s var(--ease); }
.stagger > * { animation: slide-up .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .10s; } .stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; } .stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; } .stagger > *:nth-child(8) { animation-delay: .30s; }
.stagger > *:nth-child(n+9) { animation-delay: .34s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1200px) {
  .studio { grid-template-columns: 1fr 340px; }
  .studio-list { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: none; }
  .studio { grid-template-columns: 1fr; height: auto; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .only-mobile { display: inline-grid !important; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 15px; white-space: nowrap; overflow: hidden; }
  .topbar-title .crumb { display: none; }
  .topbar-actions .btn { font-size: 0; gap: 0; padding: 0 10px; }
  .topbar-actions .btn i { width: 18px; height: 18px; }
  .topbar-actions .input { width: 130px !important; }
  .topbar-actions .hint { display: none; }
  .section-head { flex-wrap: wrap; align-items: center; }
  .clip-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .proj-head .thumb { width: 100%; }
  .page { padding: 20px 16px 50px; }
  .hero { padding: 22px; } .hero h1 { font-size: 24px; }
  .setting-row { flex-direction: column; align-items: stretch; }
  .setting-row .ctl { width: 100%; }
  .table .hide-sm { display: none; }
  .frame { height: 58vh; }
}

/* Email setup steps (Engine settings) */
.setup-steps { margin: 8px 0 0; padding: 14px 14px 14px 34px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.setup-steps a { color: #c4b5fd; text-decoration: underline; }
.setup-steps code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); word-break: break-all; }

/* Gifts: redeem box (billing) + gift codes (admin) */
.redeem-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(236,72,153,.08)), var(--surface); border-color: rgba(139,92,246,.35); }
.plan-icon.small { width: 40px; height: 40px; border-radius: 12px; }
.plan-icon.small i { width: 20px; height: 20px; }
.code-list { display: flex; flex-direction: column; gap: 10px; }
.code-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.code-card:hover { border-color: var(--line-2); }
.code-card.off { opacity: .6; }
.code-main { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.code-text { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 8px; background: var(--bg-2); border: 1px dashed rgba(139,92,246,.6); }
.code-actions { display: flex; gap: 6px; align-items: center; }
.table-wrap { overflow-x: auto; }
.table .badge { white-space: nowrap; }
.table td .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* Pricing v2 */
.usage-grid.three { grid-template-columns: repeat(3, 1fr); }
.price-card h3 { font-size: 13px; letter-spacing: .12em; color: var(--text-2); }
.price-card .tagline { font-size: 12.5px; min-height: 36px; }
.credits-line { font-size: 15px; } .credits-line span { color: var(--text-3); }
.accounts-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #c4b5fd; }
.accounts-line i { width: 14px; height: 14px; }
.feature-group { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.feature-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-top: 6px; }
.features li.soon { color: var(--text-3); }
.features li.soon i { color: var(--text-3); }
.features li span:first-of-type { flex: 1; }
.soon-pill { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 999px; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); white-space: nowrap; flex: none; }
.compare th.here, .compare td.here { background: rgba(139,92,246,.07); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .yes { color: var(--ok); display: inline-flex; } .compare .yes i { width: 16px; height: 16px; }
.compare .no { color: var(--text-3); }
.two-col.even { grid-template-columns: 1fr 1fr; }
.addon-list { display: flex; flex-direction: column; gap: 6px; }
.addon { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 13px; }
@media (max-width: 900px) { .usage-grid.three, .two-col.even { grid-template-columns: 1fr; } }
.upsell > .plan-icon { flex: none; min-width: 0; }

/* Gaming Split Cropper (Studio) */
.viewer.split-on { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.split-source { display: none; flex: 1 1 380px; max-width: 640px; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); }
.viewer.split-on .split-source { display: flex; }
.split-source-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.split-draw-row { display: flex; gap: 8px; flex-wrap: wrap; }
.split-draw { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: 12.5px; transition: all .2s; }
.split-draw i { width: 15px; height: 15px; }
.split-draw.cam.on, .split-draw.cam.done { border-color: #22d3ee; color: #a5f3fc; }
.split-draw.game.on, .split-draw.game.done { border-color: #4ade80; color: #bbf7d0; }
.split-draw.on { box-shadow: 0 0 0 4px rgba(255,255,255,.06); background: var(--surface-3); }
.split-src-surface { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; touch-action: none; user-select: none; }
.split-src-surface.drawing { cursor: crosshair; }
.split-src-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.split-src-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(0,0,0,.7); color: #fff; pointer-events: none; white-space: nowrap; }
.split-box { position: absolute; border: 2px solid; border-radius: 4px; cursor: move; box-shadow: 0 0 0 9999px rgba(0,0,0,0); }
.split-box.cam { border-color: #22d3ee; background: rgba(34,211,238,.10); }
.split-box.game { border-color: #4ade80; background: rgba(74,222,128,.08); }
.split-src-surface.drawing .split-box { pointer-events: none; }
.split-box-label { position: absolute; left: 4px; top: 4px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #04110a; }
.split-box.cam .split-box-label { background: #22d3ee; }
.split-box.game .split-box-label { background: #4ade80; }
.split-handle { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid currentColor; }
.split-box.cam .split-handle { color: #22d3ee; } .split-box.game .split-handle { color: #4ade80; }
.split-handle.nw { left: -7px; top: -7px; cursor: nwse-resize; } .split-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.split-handle.ne { right: -7px; top: -7px; cursor: nesw-resize; } .split-handle.sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.split-composite { position: absolute; inset: 0; width: 100%; height: 100%; display: none; z-index: 1; }
.frame.split-on .split-composite { display: block; }
.frame.split-on > video { opacity: 0; }
.split-controls { display: flex; flex-direction: column; gap: 14px; }
.split-warn { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 12.5px;
  background: var(--warn-soft); color: #fcd34d; border: 1px solid rgba(245,158,11,.35); }
.split-warn i { width: 15px; height: 15px; flex: none; }
.split-pct { font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.split-region { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.split-dot { width: 10px; height: 10px; border-radius: 3px; }
.viewer.split-on { flex-wrap: nowrap; padding: 18px; gap: 16px; }
.viewer.split-on .split-source { flex: 1 1 0; min-width: 0; max-width: 720px; }
.viewer.split-on .frame { height: min(58vh, 560px); flex: none; }
@media (max-width: 1000px) { .viewer.split-on { flex-direction: column; } .viewer.split-on .split-source { width: 100%; flex: none; } }

.verify-banner .code-input { width: 130px; height: 32px; letter-spacing: .2em; text-align: center; font-weight: 700; }
.verify-banner a { color: #c4b5fd; }

.form-grid .span-all { grid-column: 1 / -1; }

/* Terms / Privacy / Refund links (sign-in screen, pricing page) */
.legal-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; }
.legal-links a { color: var(--text-3); text-decoration: none; }
.legal-links a:hover { color: var(--text-2); text-decoration: underline; }
.auth-form .hint a { color: var(--text-2); text-decoration: underline; }

/* Credit packs */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pack-card { display: flex; flex-direction: column; gap: 6px; position: relative; }
.pack-card .badge { position: absolute; top: 14px; right: 14px; }
.pack-credits strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pack-credits span { color: var(--text-2); }
.pack-price { font-size: 20px; font-weight: 700; margin-top: 6px; }
.pack-card .btn { margin-top: 10px; }
