/* ClipForge — dark UI with a violet → pink accent. No external assets. */

:root {
  color-scheme: dark;
  --bg: #09090f;
  --bg-side: #0d0d16;
  --surface: #13131e;
  --surface-2: #1a1a28;
  --surface-3: #232335;
  --surface-hover: #1f1f30;
  --border: #262639;
  --border-strong: #36364f;
  --text: #f3f3f8;
  --text-2: #c3c3d6;
  --text-3: #9191ab;
  --brand: #8b5cf6;
  --brand-hi: #a78bfa;
  --brand-text: #c9b8ff;
  --pink: #ec4899;
  --grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #db2777 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(219, 39, 119, .18));
  --brand-tint: rgba(139, 92, 246, .16);
  --brand-tint-2: rgba(139, 92, 246, .28);
  --success: #22c55e;
  --success-text: #4ade80;
  --success-tint: rgba(34, 197, 94, .14);
  --warn: #f59e0b;
  --warn-text: #fbbf24;
  --warn-tint: rgba(245, 158, 11, .14);
  --danger: #ef4444;
  --danger-text: #fb7185;
  --danger-tint: rgba(239, 68, 68, .14);
  --info: #38bdf8;
  --info-text: #7dd3fc;
  --info-tint: rgba(56, 189, 248, .13);
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow: 0 18px 40px -16px rgba(0, 0, 0, .65);
  --shadow-pop: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --ring: 0 0 0 3px rgba(167, 139, 250, .55);
  --side-w: 248px;
  --tabbar-h: 64px;
  --topbar-h: 60px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--border-strong) transparent; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
svg { max-width: 100%; }
.icon, .platform-icon { display: inline-block; flex: none; vertical-align: -0.2em; }
.logo-mark { display: block; flex: none; }
video { background: #000; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
code, kbd {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: .08em .4em;
  overflow-wrap: anywhere;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
::selection { background: rgba(167, 139, 250, .35); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-3); color: var(--text); transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ layout */

.shell {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--bg-side) calc(var(--side-w) - 1px), var(--border) calc(var(--side-w) - 1px), var(--border) var(--side-w), transparent var(--side-w));
}
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px 16px; background: var(--bg-side); border-right: 1px solid var(--border); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo-mark { flex: none; filter: drop-shadow(0 6px 16px rgba(192, 38, 211, .35)); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 14px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 560; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--brand-tint); color: #fff; }
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.nav-item[aria-current="page"] .icon { color: var(--brand-hi); }
.nav-new { margin: 2px 0 10px; justify-content: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.side-card {
  padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2);
}
.side-card strong { color: var(--text); }
.side-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: rgba(9, 9, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--border); }
.topbar .brand { display: none; padding: 0; }
.topbar-title { font-weight: 650; color: var(--text-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 28px 64px; }
.page.is-wide { max-width: 1400px; }
.page.is-narrow { max-width: 880px; }
#outlet.is-entering > * { animation: fade-in .22s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 22px; }
.page-head h1 { font-size: 30px; }
.page-head .sub { margin-top: 6px; color: var(--text-3); max-width: 640px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; font-weight: 560; margin: 6px 0 2px; }
.back-link:hover { color: var(--text); text-decoration: none; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.count-pill { font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-3); padding: 2px 9px; border-radius: 999px; }

/* mobile tab bar */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom); background: rgba(13, 13, 22, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); grid-template-columns: repeat(5, 1fr);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none;
  color: var(--text-3); font-size: 11px; font-weight: 600; border-radius: 12px; padding: 4px 0; min-width: 0;
}
.tab:hover { text-decoration: none; color: var(--text); }
.tab[aria-current="page"], .tab.is-active { color: #fff; }
.tab[aria-current="page"] .tab-ic, .tab.is-active .tab-ic { background: var(--brand-tint-2); color: #e9e1ff; }
.tab-ic { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .15s; }
.tab-create .tab-ic { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(192, 38, 211, .7); }

/* ------------------------------------------------------------------ buttons */

.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s, opacity .15s;
}
.btn:hover { background: var(--surface-3); border-color: #45455f; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 10px 26px -12px rgba(192, 38, 211, .85), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.1); border-color: transparent; box-shadow: 0 14px 30px -12px rgba(219, 39, 119, .9), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--danger-tint); border-color: rgba(239, 68, 68, .35); color: #fecaca; }
.btn-danger:hover { background: rgba(239, 68, 68, .24); border-color: rgba(239, 68, 68, .6); }
.btn-soft { background: var(--brand-tint); border-color: rgba(139, 92, 246, .35); color: #e4dbff; }
.btn-soft:hover { background: var(--brand-tint-2); border-color: rgba(167, 139, 250, .6); }
.btn-sm { --h: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-icon { padding: 0; width: var(--h); }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-text); font-weight: 600; min-height: 0; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ forms */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field + .field { margin-top: 16px; }
.label, .field > label { font-weight: 620; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.label .opt { font-weight: 500; color: var(--text-3); font-size: 13px; }
.help { color: var(--text-3); font-size: 13px; line-height: 1.45; }
.help a { color: var(--brand-text); }
.field-error { color: var(--danger-text); font-size: 13px; font-weight: 560; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: #7a7a94; }
.input:hover, .select:hover, .textarea:hover { border-color: #47476a; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-hi); box-shadow: var(--ring); background: #1d1d2d; }
.input[readonly] { color: var(--text-2); background: var(--surface); }
.input[disabled], .select[disabled], .textarea[disabled] { opacity: .6; cursor: not-allowed; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.textarea.mono, .input.mono { font-family: var(--mono); font-size: 13px; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239191ab' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: #1a1a28; color: var(--text); }
.input-group { display: flex; align-items: stretch; gap: 8px; }
.input-group > .input { flex: 1; min-width: 0; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.char-count { font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.char-count.is-over { color: var(--danger-text); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field-row > .field + .field { margin-top: 0; }
input[type="color"] { -webkit-appearance: none; appearance: none; border: 0; padding: 0; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }

.check {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 560; user-select: none;
}
.check input[type="checkbox"], .check input[type="radio"], .cb {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px;
  border: 1.5px solid #55557a; background: var(--surface-2); display: grid; place-items: center; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.check input[type="radio"] { border-radius: 50%; }
.check input:checked, .cb:checked { background: var(--brand); border-color: var(--brand); }
.check input[type="checkbox"]:checked::after, .cb:checked::after {
  content: ""; width: 10px; height: 6px; border: 2.2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg);
}
.cb:indeterminate { background: var(--brand); border-color: var(--brand); }
.cb:indeterminate::after { content: ""; width: 10px; height: 2.2px; background: #fff; border-radius: 2px; }
.check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.check input:focus-visible, .cb:focus-visible { box-shadow: var(--ring); }
.check input:disabled, .cb:disabled { opacity: .45; cursor: not-allowed; }

/* switch */
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch-field + .switch-field { border-top: 1px solid var(--border); }
.switch-field.is-disabled { opacity: .55; cursor: not-allowed; }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-label { font-weight: 600; }
.switch-help { font-size: 13px; color: var(--text-3); }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 27px; margin: 0;
  border-radius: 999px; background: #34344c; border: 1px solid #45455f; cursor: pointer; transition: background .18s, border-color .18s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #d9d9e6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .2s var(--ease), background .18s;
}
.switch:checked { background: var(--brand); border-color: var(--brand-hi); }
.switch:checked::after { transform: translateX(19px); background: #fff; }
.switch:focus-visible { box-shadow: var(--ring); }
.switch:disabled { cursor: not-allowed; }

/* range */
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row .range { flex: 1; }
.range-value { min-width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0;
  --p: 50%;
}
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) 0 var(--p), #34344c var(--p) 100%);
}
.range::-moz-range-track { height: 6px; border-radius: 999px; background: #34344c; }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--brand); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .35), 0 2px 8px rgba(0, 0, 0, .5);
}
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(139, 92, 246, .35); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(167, 139, 250, .6); }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* choice chips (radio/checkbox styled as pills) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { position: relative; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-opt span, .chip-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.chip-opt:hover span, .chip-btn:hover { border-color: #55557a; color: var(--text); }
.chip-opt input:checked + span, .chip-btn[aria-pressed="true"] {
  background: var(--brand-tint-2); border-color: var(--brand-hi); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45);
}
.chip-opt input:focus-visible + span { box-shadow: var(--ring); }
.chip-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.chip-opt .platform-icon { width: 18px; height: 18px; }

/* segmented control */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented button, .segmented label {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-3); font-weight: 620; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.segmented label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented button:hover, .segmented label:hover { color: var(--text); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"], .segmented label:has(input:checked) {
  background: var(--surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 4px 10px -4px rgba(0, 0, 0, .5);
}
.segmented label:has(input:focus-visible) { box-shadow: var(--ring); }

/* ------------------------------------------------------------------ cards & surfaces */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px;
}
.card-sm { padding: 16px; border-radius: var(--radius); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-head .help { margin-top: 4px; }
.card-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-hi);
}
.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.hidden, [hidden] { display: none !important; }

/* status chips & badges */
.chip-status {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px;
  font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.chip-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-status .chip-ic { width: 13px; height: 13px; stroke-width: 2.6; }
.tone-neutral { background: var(--surface-3); color: var(--text-2); }
.tone-brand { background: var(--brand-tint); color: var(--brand-text); border-color: rgba(139, 92, 246, .3); }
.tone-success { background: var(--success-tint); color: var(--success-text); border-color: rgba(34, 197, 94, .25); }
.tone-danger { background: var(--danger-tint); color: var(--danger-text); border-color: rgba(239, 68, 68, .3); }
.tone-warn { background: var(--warn-tint); color: var(--warn-text); border-color: rgba(245, 158, 11, .3); }
.tone-info { background: var(--info-tint); color: var(--info-text); border-color: rgba(56, 189, 248, .25); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12px;
  font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge-brand { background: var(--grad); color: #fff; }
.badge-soft { background: var(--brand-tint); color: var(--brand-text); }
.badge-success { background: var(--success-tint); color: var(--success-text); }
.badge-warn { background: var(--warn-tint); color: var(--warn-text); }
.badge-danger { background: var(--danger-tint); color: var(--danger-text); }

.score {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px;
  font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; color: #0b0b12; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .6);
}
.score .icon { stroke-width: 2.4; }
.score-lg { height: 32px; font-size: 15px; padding: 0 12px 0 9px; }
.score-hot { background: #4ade80; }
.score-good { background: #bef264; }
.score-ok { background: #fcd34d; }
.score-low { background: #cbd5e1; }

/* spinner & progress */
.spinner {
  --s: 16px; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2); border-top-color: currentColor; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress { position: relative; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-sm { height: 5px; }
.progress-lg { height: 10px; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--grad); transition: width .5s var(--ease); }
.progress.is-indeterminate .progress-fill {
  width: 40% !important; animation: indet 1.3s ease-in-out infinite; background: linear-gradient(90deg, transparent, var(--brand-hi), var(--pink), transparent);
}
@keyframes indet { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* skeletons */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-media { aspect-ratio: 16 / 9; border-radius: 12px; }
.skeleton-card.is-clip .skeleton-media { aspect-ratio: 9 / 16; }
.skeleton-line { height: 14px; }
.skeleton-line.short { width: 60%; }
.skeleton-row { height: 64px; border-radius: 14px; }

/* empty states */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: rgba(19, 19, 30, .6);
}
.empty-icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; margin-bottom: 6px;
  background: var(--grad-soft); color: #e4dbff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .25);
}
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-3); max-width: 460px; }
.empty-action { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty-error .empty-icon { background: var(--danger-tint); color: var(--danger-text); box-shadow: none; }

/* banners */
.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 14px; border: 1px solid;
  font-size: 14px; line-height: 1.45;
}
.banner + .banner { margin-top: 10px; }
.banner > .icon { flex: none; margin-top: 1px; }
.banner-body { flex: 1; min-width: 0; }
.banner-body strong { display: block; margin-bottom: 2px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.banner-x { flex: none; margin: -6px -6px -6px 0; color: inherit; opacity: .8; }
.banner-info { background: var(--info-tint); border-color: rgba(56, 189, 248, .28); color: #d6f1ff; }
.banner-info > .icon { color: var(--info-text); }
.banner-warn { background: var(--warn-tint); border-color: rgba(245, 158, 11, .32); color: #fdecc8; }
.banner-warn > .icon { color: var(--warn-text); }
.banner-error { background: var(--danger-tint); border-color: rgba(239, 68, 68, .35); color: #ffe0e0; }
.banner-error > .icon { color: var(--danger-text); }
.banner-success { background: var(--success-tint); border-color: rgba(34, 197, 94, .3); color: #dcfce7; }
.banner-success > .icon { color: var(--success-text); }
.banner-brand { background: var(--grad-soft); border-color: rgba(167, 139, 250, .35); color: #ede7ff; }
.banner-brand > .icon { color: var(--brand-hi); }
.banner a { color: inherit; text-decoration: underline; font-weight: 650; }

/* toasts */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 13px 10px 13px 14px; border-radius: 14px;
  background: #1c1c2b; border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); animation: toast-in .25s var(--ease);
}
.toast.is-leaving { animation: toast-out .18s ease forwards; }
.toast-icon { flex: none; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success-text); }
.toast-error { border-color: rgba(239, 68, 68, .45); }
.toast-error .toast-icon { color: var(--danger-text); }
.toast-warn .toast-icon { color: var(--warn-text); }
.toast-info .toast-icon { color: var(--brand-hi); }
.toast-msg { flex: 1; min-width: 0; font-size: 14px; font-weight: 520; overflow-wrap: anywhere; }
.toast-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -4px 0; border: 0; border-radius: 8px; background: none; color: var(--text-3); }
.toast-close:hover { background: var(--surface-3); color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* modal dialog */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 920px); padding: 0; border: 1px solid var(--border-strong);
  border-radius: 22px; background: #15151f; color: var(--text); box-shadow: var(--shadow-pop); overflow: hidden;
  flex-direction: column;
}
.modal[open] { display: flex; animation: modal-in .2s var(--ease); }
.modal.is-leaving { animation: modal-out .14s ease forwards; }
.modal::backdrop { background: rgba(4, 4, 10, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-sm { width: min(440px, calc(100vw - 24px)); }
.modal-lg { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0 24px; }
.modal-title { font-size: 19px; }
.modal-desc { color: var(--text-3); margin-top: 4px; font-size: 14px; }
.modal-x { margin: -4px -4px 0 0; }
.modal-body { padding: 16px 24px 4px; overflow-y: auto; overscroll-behavior: contain; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; flex-wrap: wrap; }
.confirm-text { color: var(--text-2); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(6px) scale(.985); } }

/* popover (activity) */
.activity { position: relative; }
.activity-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px 0 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font-weight: 650; font-size: 13px;
}
.activity-btn:hover { color: var(--text); background: var(--surface-3); }
.activity-btn.is-busy { color: #efe9ff; border-color: rgba(167, 139, 250, .55); background: var(--brand-tint); }
.activity-btn .ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.popover {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto;
  padding: 8px; border-radius: 18px; background: #17172299; background: #171722; border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
  animation: modal-in .16s var(--ease);
}
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.popover-head h3 { font-size: 15px; }
.job { display: flex; gap: 12px; padding: 12px 10px; border-radius: 12px; }
.job + .job { border-top: 1px solid var(--border); }
.job:hover { background: var(--surface-2); }
.job-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-hi); }
.job-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.job-title { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.job-msg { font-size: 13px; color: var(--text-3); }
.popover-empty { padding: 22px 12px 26px; text-align: center; color: var(--text-3); font-size: 14px; }

/* bottom sheet (mobile "More") */
.sheet .modal-body { padding-bottom: 22px; }
.sheet-links { display: flex; flex-direction: column; gap: 6px; }
.sheet-link { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); color: var(--text); font-weight: 620; border: 0; width: 100%; text-align: left; }
.sheet-link:hover { text-decoration: none; background: var(--surface-3); }
.sheet-link .icon:last-child { margin-left: auto; color: var(--text-3); }

/* ------------------------------------------------------------------ home */

.hero { position: relative; padding: 36px 0 8px; text-align: center; }
.hero-glow {
  position: absolute; inset: -40px 0 auto; height: 420px; z-index: -1; pointer-events: none; filter: blur(60px); opacity: .55;
  background: radial-gradient(40% 55% at 35% 40%, rgba(124, 58, 237, .55), transparent 70%), radial-gradient(35% 50% at 68% 45%, rgba(219, 39, 119, .4), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 650;
  color: #e4dbff; background: rgba(139, 92, 246, .14); border: 1px solid rgba(167, 139, 250, .3);
}
.hero h1 { margin: 18px auto 0; font-size: clamp(34px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 820; max-width: 860px; }
.hero .lead { margin: 16px auto 0; max-width: 620px; color: var(--text-2); font-size: 17px; }
.create-card {
  position: relative; margin: 30px auto 0; max-width: 780px; padding: 10px; border-radius: 24px; text-align: left;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, rgba(167, 139, 250, .65), rgba(236, 72, 153, .45) 60%, rgba(54, 54, 79, .8)) border-box;
  border: 1px solid transparent; box-shadow: 0 30px 80px -30px rgba(124, 58, 237, .55);
}
.create-row { display: flex; gap: 10px; align-items: stretch; }
.create-input { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.create-input > .icon { position: absolute; left: 18px; color: var(--text-3); pointer-events: none; }
.create-input .input {
  height: 58px; padding-left: 50px; font-size: 17px; border-radius: 16px; background: var(--surface-2); border-color: var(--border);
}
.create-row .btn-lg { height: 58px; border-radius: 16px; padding: 0 26px; }
.create-error { padding: 8px 10px 0; }
.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; padding: 16px; border-radius: 16px;
  border: 1.5px dashed var(--border-strong); color: var(--text-3); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-hi); background: var(--brand-tint); color: var(--text); }
.dropzone strong { color: var(--text-2); font-weight: 650; }
.dropzone:hover strong, .dropzone.is-over strong { color: #fff; }
.dropzone .icon { flex: none; }
.dz-text { display: flex; flex-direction: column; text-align: left; font-size: 13px; }
.dz-text strong { font-size: 14px; }
.upload-box { margin-top: 10px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.upload-box .row-between { margin-bottom: 10px; }

.opts-panel { max-width: 780px; margin: 14px auto 0; text-align: left; }
.opts-toggle {
  display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-align: left; transition: border-color .15s, background .15s;
}
.opts-toggle:hover { border-color: var(--border-strong); background: #161622; }
.opts-toggle .icon:first-child { color: var(--brand-hi); flex: none; }
.opts-toggle .opts-title { font-weight: 700; flex: none; }
.opts-summary { flex: 1; min-width: 0; color: var(--text-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opts-toggle .chev { flex: none; color: var(--text-3); transition: transform .2s; }
.opts-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.opts-toggle[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.opts-body { padding: 6px 18px 18px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 16px 16px; background: var(--surface); }
.opts-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how-step { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.how-num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; margin-bottom: 12px;
  font-weight: 800; background: var(--grad-soft); color: #efe9ff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .3);
}
.how-step h3 { margin-bottom: 6px; }
.how-step p { color: var(--text-3); font-size: 14px; }

/* ------------------------------------------------------------------ options editor */

.opt-section { padding: 18px 0; }
.opt-section + .opt-section { border-top: 1px solid var(--border); }
.opt-section > .label { margin-bottom: 4px; }
.opt-section > .help { margin-bottom: 12px; }
.opt-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.aspect-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile-opt { position: relative; }
.tile-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.tile {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px 12px;
  border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); text-align: center;
  font-size: 13px; font-weight: 620; transition: border-color .15s, background .15s, color .15s;
}
.tile small { font-weight: 500; color: var(--text-3); font-size: 11.5px; line-height: 1.3; }
.tile-opt:hover .tile { border-color: #55557a; color: var(--text); }
.tile-opt input:checked + .tile { border-color: var(--brand-hi); background: var(--brand-tint); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .5); }
.tile-opt input:checked + .tile small { color: #d9ceff; }
.tile-opt input:focus-visible + .tile { box-shadow: var(--ring); }
.shape { display: grid; place-items: center; height: 40px; }
.shape i { display: block; border: 2px solid currentColor; border-radius: 4px; }
.layout-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.style-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; }
.style-opt .tile { padding: 6px 6px 10px; gap: 7px; }
.style-thumb { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #2a1f4a; }
.style-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); }
.style-name { font-size: 13px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.swatch span {
  display: block; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 0 transparent; transition: box-shadow .15s, transform .15s;
}
.swatch:hover span { transform: scale(1.06); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff; }
.swatch input:focus-visible + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand-hi); }
.swatch-auto span {
  display: grid; place-items: center; width: auto; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong); height: 34px;
}
.swatch-auto input:checked + span { color: #fff; border-color: #fff; }
.custom-color { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 12.5px; font-weight: 650; color: var(--text-2); cursor: pointer; }
.custom-color input[type="color"] { width: 26px; height: 26px; }
.custom-color.is-active { border-color: #fff; color: #fff; }
.pos-opts .tile { flex-direction: row; gap: 10px; padding: 10px 12px; justify-content: flex-start; }
.phone-mini { position: relative; flex: none; width: 18px; height: 30px; border-radius: 4px; border: 2px solid currentColor; }
.phone-mini::after { content: ""; position: absolute; left: 2px; right: 2px; height: 4px; border-radius: 2px; background: currentColor; }
.phone-mini.p-upper::after { top: 4px; }
.phone-mini.p-middle::after { top: 11px; }
.phone-mini.p-lower::after { bottom: 4px; }
.num-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); }
.num-stepper button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); border-radius: 999px; }
.num-stepper button:hover { color: #fff; background: var(--surface-3); }
.num-stepper input { width: 44px; text-align: center; border: 0; background: none; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num-stepper input::-webkit-outer-spin-button, .num-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-stepper.is-disabled { opacity: .45; }

/* music picker */
.track-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.track-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); transition: border-color .15s, background .15s;
}
.track-row:hover { border-color: var(--border-strong); }
.track-row.is-selected { border-color: var(--brand-hi); background: var(--brand-tint); }
.track-row.is-playing .play-btn { background: var(--grad); color: #fff; border-color: transparent; }
.play-btn {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text);
}
.play-btn:hover { border-color: var(--brand-hi); }
.play-btn .icon { width: 16px; height: 16px; }
.track-info { flex: 1; min-width: 0; }
.track-name { font-weight: 650; font-size: 14px; }
.track-meta { font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.track-row .check { flex: none; }

/* ------------------------------------------------------------------ video cards */

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.video-card {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.video-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.vc-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.vc-media img, .vc-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph {
  display: grid; place-items: center; color: rgba(233, 225, 255, .55);
  background: radial-gradient(120% 120% at 0% 0%, rgba(124, 58, 237, .45), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(219, 39, 119, .35), transparent 55%), #1b1630;
}
.vc-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vc-status { position: absolute; left: 8px; top: 8px; }
.vc-status .chip-status { background: rgba(10, 10, 16, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vc-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 15px 15px; flex: 1; }
.vc-title { font-weight: 680; font-size: 15px; line-height: 1.35; }
.vc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.vc-meta .sep::before { content: "·"; }
.vc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; font-size: 13px; }
.vc-clips { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--text-2); }
.vc-clips .icon { color: var(--brand-hi); }
.vc-msg { font-size: 12.5px; color: var(--text-3); }

/* ------------------------------------------------------------------ video detail */

.vd-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.vd-thumb { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.vd-thumb img, .vd-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.vd-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vd-info h1 { font-size: 26px; overflow-wrap: anywhere; }
.vd-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; color: var(--text-3); font-size: 14px; }
.vd-meta span { display: inline-flex; align-items: center; gap: 6px; }
.vd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.progress-card { margin-top: 22px; }
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step-bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.step-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .5s var(--ease); }
.step.is-done .step-bar i { width: 100%; }
.step.is-active .step-bar i { width: 55%; animation: pulse-w 1.6s ease-in-out infinite; }
@keyframes pulse-w { 50% { opacity: .55; } }
.step.is-failed .step-bar i { width: 100%; background: var(--danger); }
.step-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--text-3); }
.step.is-done .step-label { color: var(--text-2); }
.step.is-done .step-label .icon { color: var(--success-text); }
.step.is-active .step-label { color: #fff; }
.step.is-failed .step-label { color: var(--danger-text); }
.step-num { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--text-3); flex: none; }
.step.is-active .step-num { background: var(--brand); color: #fff; }
.progress-msg { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.progress-msg strong { font-variant-numeric: tabular-nums; }
.error-box { display: flex; gap: 14px; align-items: flex-start; }
.error-box .card-icon { background: var(--danger-tint); color: var(--danger-text); }
.error-box p { color: var(--text-2); margin-top: 4px; }

/* ------------------------------------------------------------------ clip cards */

.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; align-items: start; }
.clip-card {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.clip-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.clip-card.is-rejected { opacity: .72; }
.clip-media { position: relative; aspect-ratio: var(--ar, 9 / 16); background: #07070b; overflow: hidden; }
.clip-media video, .clip-media img, .clip-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.clip-media video { object-fit: contain; }
.clip-media .score { position: absolute; left: 10px; top: 10px; z-index: 2; }
.clip-media .media-badge { position: absolute; right: 10px; top: 10px; z-index: 2; }
.clip-media .badge { background: rgba(10, 10, 16, .78); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.render-state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 22px;
  text-align: center; color: var(--text-2); font-size: 14px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(124, 58, 237, .35), transparent 60%), radial-gradient(120% 80% at 50% 100%, rgba(219, 39, 119, .2), transparent 60%), #120f1f;
}
.render-state .progress { width: 80%; }
.render-state strong { color: #fff; font-size: 15px; }
.render-state.is-failed { background: radial-gradient(120% 80% at 50% 0%, rgba(239, 68, 68, .2), transparent 60%), #160f14; }
.render-state.is-failed .icon { color: var(--danger-text); }
.render-state .err { font-size: 12.5px; color: var(--text-3); }
.clip-body { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px 14px; }
.clip-title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.clip-title a { color: inherit; }
.clip-hook { font-size: 13px; color: var(--text-2); display: flex; gap: 6px; }
.clip-hook .icon { flex: none; margin-top: 2px; color: var(--brand-hi); width: 14px; height: 14px; }
.clip-source { font-size: 12.5px; color: var(--text-3); }
.clip-source a { color: var(--text-2); }
.clip-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.clip-meta .row { gap: 10px; }
.clip-meta .stat { display: inline-flex; align-items: center; gap: 4px; }
.clip-meta .stat .icon { width: 14px; height: 14px; }
.vote { display: inline-flex; gap: 4px; }
.vote-btn {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-3);
  transition: background .12s, color .12s, border-color .12s;
}
.vote-btn .icon { width: 16px; height: 16px; }
.vote-btn:hover { color: var(--text); border-color: #55557a; }
.vote-btn.up[aria-pressed="true"] { background: var(--success-tint); border-color: rgba(34, 197, 94, .55); color: var(--success-text); }
.vote-btn.down[aria-pressed="true"] { background: var(--danger-tint); border-color: rgba(239, 68, 68, .55); color: var(--danger-text); }
.clip-actions { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; }
.clip-actions .btn { padding: 0 8px; }
.posted-dot { display: inline-flex; align-items: center; gap: 4px; color: var(--success-text); font-weight: 650; }

/* ------------------------------------------------------------------ clip editor */

.editor { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.editor-side { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column; gap: 12px; }
.player { position: relative; aspect-ratio: var(--ar, 9 / 16); max-height: calc(100vh - 230px); margin: 0 auto; width: 100%; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.player.is-landscape { max-height: none; }
.player video { width: 100%; height: 100%; object-fit: contain; }
.player .render-state { border-radius: inherit; }
.editor-side .score { position: absolute; left: 12px; top: 12px; z-index: 2; }
.side-stats { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.reason { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.reason strong { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.reason strong .icon { color: var(--brand-hi); width: 15px; height: 15px; }
.editor-main { min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: 1 0 auto; justify-content: center; min-height: 40px; padding: 0 14px; border: 0;
  border-radius: 10px; background: none; color: var(--text-3); font-weight: 650; font-size: 14px; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--surface-2); }
.tab-btn[aria-selected="true"] { color: #fff; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tab-btn[aria-selected="true"] .icon { color: var(--brand-hi); }
.tab-btn .dirty-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.tab-panel { margin-top: 16px; }
.savebar {
  position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px;
  padding: 12px 12px 12px 18px; border-radius: 18px; background: rgba(28, 28, 43, .94); border: 1px solid rgba(167, 139, 250, .45);
  box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: modal-in .2s var(--ease);
}
.savebar .msg { display: flex; align-items: center; gap: 10px; font-weight: 620; font-size: 14px; }
.savebar .msg .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px rgba(236, 72, 153, .2); }
.tag-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface-2); cursor: text;
}
.tag-input:focus-within { border-color: var(--brand-hi); box-shadow: var(--ring); }
.tag-input input { flex: 1; min-width: 120px; border: 0; background: none; padding: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--brand-tint);
  color: #e4dbff; font-weight: 620; font-size: 13.5px; border: 1px solid rgba(139, 92, 246, .35);
}
.tag button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 0; background: none; color: inherit; opacity: .75; }
.tag button:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.tag button .icon { width: 13px; height: 13px; }

/* trim & transcript */
.trim-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trim-box { padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); }
.trim-box .label { margin-bottom: 10px; }
.time-input { font-family: var(--mono); font-size: 18px; font-weight: 700; text-align: center; letter-spacing: .02em; }
.nudges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.nudges .btn { padding: 0 4px; font-variant-numeric: tabular-nums; }
.timeline { position: relative; height: 34px; margin: 18px 0 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.timeline-sel { position: absolute; top: 0; bottom: 0; background: var(--brand-tint-2); border-left: 3px solid var(--brand-hi); border-right: 3px solid var(--pink); }
.timeline-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.transcript { display: flex; flex-wrap: wrap; gap: 4px 4px; line-height: 1.2; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); max-height: 380px; overflow-y: auto; }
.word {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: var(--surface-3);
  color: var(--text); font-size: 14.5px; font-weight: 560; cursor: pointer; transition: background .12s, border-color .12s;
}
.word:hover { border-color: var(--brand-hi); background: #2c2c44; }
.word.is-edited { background: var(--brand-tint-2); border-color: rgba(167, 139, 250, .6); }
.word.is-context { background: none; color: #6f6f8a; font-weight: 500; border: 1px dashed transparent; }
.word.is-context:hover { color: var(--text-2); border-color: var(--border-strong); }
.word-edit { width: 10ch; min-height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--brand-hi); background: #1d1d2d; box-shadow: var(--ring); font-size: 14.5px; }
.transcript-sep { flex-basis: 100%; height: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: var(--surface-3); }
.legend i.ctx { background: none; border: 1px dashed #6f6f8a; }
.legend i.ed { background: var(--brand-tint-2); border: 1px solid var(--brand-hi); }

/* posts list */
.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.post-thumb { display: block; flex: none; width: 54px; aspect-ratio: 9 / 16; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.post-thumb img, .post-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.post-title { font-weight: 680; font-size: 14.5px; }
.post-title a { color: inherit; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.post-meta .platform-icon { width: 18px; height: 18px; }
.post-acct { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; }
.post-nets { display: inline-flex; gap: 3px; }
.post-nets .platform-icon { width: 16px; height: 16px; }
.post-error { font-size: 13px; color: var(--danger-text); background: var(--danger-tint); padding: 8px 10px; border-radius: 10px; }
.post-note { font-size: 13px; color: var(--text-3); }
.post-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.post-time { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* composer */
.acct-list { display: flex; flex-direction: column; gap: 8px; }
.acct-opt { border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); transition: border-color .15s, background .15s; }
.acct-opt.is-checked { border-color: var(--brand-hi); background: var(--brand-tint); }
.acct-opt.is-disabled { opacity: .6; }
.acct-opt > label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.acct-name { font-weight: 650; }
.acct-sub { font-size: 12.5px; color: var(--text-3); }
.acct-nets { padding: 0 14px 12px 46px; }
.acct-nets .chips { gap: 6px; }
.acct-nets .chip-opt span { min-height: 32px; padding: 0 11px; font-size: 13px; }
.when-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.when-row .input { max-width: 260px; }

/* ------------------------------------------------------------------ filters toolbar */

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input-wrap { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .select { width: auto; min-width: 150px; }
.toolbar .check { padding: 0 6px; }
.filter-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.filter-pill:has(input:checked) { border-color: var(--brand-hi); background: var(--brand-tint); color: #fff; }
.filter-pill input { margin: 0; }
.load-more { display: flex; justify-content: center; margin-top: 22px; }

/* ------------------------------------------------------------------ channels */

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.channel-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: border-color .15s, transform .15s; }
.channel-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.ch-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; font-weight: 800; font-size: 18px;
  background: var(--grad); color: #fff;
}
.avatar img, .avatar .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.ch-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-box { padding: 10px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.stat-box strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 12px; color: var(--text-3); }
.add-channel { display: flex; gap: 10px; }
.add-channel .input-wrap { flex: 1; }
.ch-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ch-head-info { flex: 1; min-width: 220px; }
.ch-head-info h1 { font-size: 26px; }
.ch-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 22px; }
.vtable { width: 100%; border-collapse: separate; border-spacing: 0; }
.vtable th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; padding: 0 12px 10px; white-space: nowrap; }
.vtable td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.vtable tr:hover td { background: rgba(26, 26, 40, .6); }
.vtable tr.is-selected td { background: var(--brand-tint); }
.vt-thumb { width: 112px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface-2); flex: none; }
.vt-thumb img, .vt-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.vt-title { font-weight: 620; line-height: 1.35; }
.vt-num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.vt-check { width: 44px; }
.selbar {
  position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 12px 12px 18px; border-radius: 18px; background: rgba(28, 28, 43, .95); border: 1px solid rgba(167, 139, 250, .45);
  box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* ------------------------------------------------------------------ schedule */

.sched-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sched-side { position: sticky; top: calc(var(--topbar-h) + 12px); }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ap-state.on { color: var(--success-text); }
.ap-state.off { color: var(--text-3); }
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.time-chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.time-chip button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--text-3); }
.time-chip button:hover { color: #fff; background: var(--surface-3); }
.time-chip button .icon { width: 14px; height: 14px; }
.slot-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.slot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.slot strong { font-variant-numeric: tabular-nums; }
.day-group + .day-group { margin-top: 24px; }
.day-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 10px; }
.day-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.save-state { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; min-height: 18px; }
.save-state .icon { width: 14px; height: 14px; color: var(--success-text); }

/* ------------------------------------------------------------------ music */

.music-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.mood-group + .mood-group { margin-top: 26px; }
.mood-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; font-weight: 750; text-transform: capitalize; }
.mood-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.music-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.music-row + .music-row { margin-top: 8px; }
.music-row.is-playing { border-color: rgba(167, 139, 250, .55); background: #17142a; }
.music-row.is-playing .play-btn { background: var(--grad); border-color: transparent; color: #fff; }
.music-row .track-info { display: flex; flex-direction: column; gap: 3px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; background: var(--brand-hi); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; }
.eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.pending-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(167, 139, 250, .5); background: var(--brand-tint); font-size: 14px; }

/* ------------------------------------------------------------------ settings */

.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-3); font-weight: 600; font-size: 14px; }
.settings-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.settings-nav a.is-active { color: #fff; background: var(--brand-tint); }
.settings-nav a.is-active .icon { color: var(--brand-hi); }
.settings-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.settings-main > .card { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.section-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.secret-set { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); min-height: 44px; }
.secret-set code { background: none; border: 0; padding: 0; color: var(--text-2); }
.env-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 14px; }
.env-note .icon { color: var(--text-3); }
.platform-card { border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.platform-card + .platform-card { margin-top: 12px; }
.platform-card.is-featured {
  background: linear-gradient(#17152a, #17152a) padding-box, linear-gradient(135deg, rgba(167, 139, 250, .8), rgba(236, 72, 153, .6)) border-box;
  border: 1px solid transparent;
}
.pc-head { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; width: 100%; border: 0; background: none; text-align: left; color: var(--text); }
button.pc-head:hover { background: rgba(255, 255, 255, .02); }
.pc-head .platform-icon { width: 36px; height: 36px; flex: none; }
.pc-title { font-weight: 720; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-sum { font-size: 13.5px; color: var(--text-3); margin-top: 2px; }
.pc-body { padding: 0 18px 18px; }
.pc-head .chev { flex: none; color: var(--text-3); transition: transform .2s; }
.pc-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.guide-steps li { position: relative; padding-left: 38px; color: var(--text-2); font-size: 14px; line-height: 1.55; counter-increment: step; }
.guide-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--surface-3); color: var(--text); font-weight: 800; font-size: 12.5px;
}
.guide-steps strong { color: var(--text); }
.limits { margin: 0; padding-left: 18px; color: var(--text-3); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
details.disclosure > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 650; color: var(--brand-text); font-size: 14px; padding: 4px 0; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform .2s; }
details.disclosure[open] > summary .icon { transform: rotate(90deg); }
details.disclosure > .disclosure-body { margin-top: 10px; }
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--mono); font-size: 13px; }
.acct-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.acct-row + .acct-row { margin-top: 8px; }
.acct-row .platform-icon { width: 34px; height: 34px; flex: none; }
.acct-row.is-expired { border-color: rgba(245, 158, 11, .45); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.status-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.status-item .si-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.status-item .si-ic.ok { background: var(--success-tint); color: var(--success-text); }
.status-item .si-ic.bad { background: var(--danger-tint); color: var(--danger-text); }
.status-item .si-ic.warn { background: var(--warn-tint); color: var(--warn-text); }
.status-item .si-ic.info { background: var(--brand-tint); color: var(--brand-hi); }
.si-label { font-size: 12.5px; color: var(--text-3); }
.si-value { font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.disk-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; display: flex; }
.disk-bar i { display: block; height: 100%; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

/* ------------------------------------------------------------------ login & boot */

.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-card { width: min(420px, 100%); padding: 32px 28px 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); text-align: center; }
.login-card .logo-mark { margin: 0 auto 18px; }
.login-card h1 { font-size: 24px; }
.login-card p { color: var(--text-3); margin-top: 8px; }
.login-card form { margin-top: 22px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.boot { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-3); }
.boot .logo-mark { animation: boot-pulse 1.4s ease-in-out infinite; }
@keyframes boot-pulse { 50% { transform: scale(.94); opacity: .8; } }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .sched-layout, .music-layout { grid-template-columns: minmax(0, 1fr); }
  .sched-side { position: static; order: -1; }
}

@media (max-width: 1060px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; max-width: 420px; width: 100%; margin: 0 auto; }
  .player { max-height: 64vh; width: auto; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: sticky; top: var(--topbar-h); z-index: 15; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px 0; background: var(--bg); scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: none; border: 1px solid var(--border); }
  .ch-controls { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  :root { --topbar-h: 56px; }
  .shell { display: block; background: none; }
  .sidebar { display: none; }
  .tabbar { display: grid; }
  .topbar { padding: 0 16px; }
  .topbar .brand { display: flex; font-size: 17px; }
  .topbar .brand .logo-mark { width: 28px; height: 28px; }
  .topbar-title { display: none; }
  .page { padding: 4px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
  .toasts { left: 16px; right: 16px; width: auto; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .page-head { margin: 8px 0 16px; }
  .page-head h1 { font-size: 24px; }
  .hero { padding-top: 18px; }
  .hero .lead { font-size: 15.5px; }
  .create-card { padding: 8px; border-radius: 20px; margin-top: 22px; }
  .create-row { flex-direction: column; }
  .create-input .input { height: 54px; font-size: 16px; }
  .create-row .btn-lg { height: 52px; width: 100%; }
  .dz-text { text-align: center; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .aspect-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .style-gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .opts-body { padding: 4px 14px 16px; }
  .vd-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .vd-thumb { max-width: 420px; }
  .vd-info h1 { font-size: 22px; }
  .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .step-label .txt { display: none; }
  .step-label { justify-content: center; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .clip-body { padding: 11px; }
  .clip-actions { grid-template-columns: 1fr 1fr; }
  .clip-title { font-size: 14px; }
  .card { padding: 18px; border-radius: 18px; }
  .trim-grid { grid-template-columns: minmax(0, 1fr); }
  .savebar, .selbar { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .vtable thead { display: none; }
  .vtable, .vtable tbody { display: block; }
  .vtable tr { display: grid; grid-template-columns: 34px 96px minmax(0, 1fr); grid-template-areas: "c t i" "c t s"; gap: 4px 12px; padding: 12px 4px; border-top: 1px solid var(--border); }
  .vtable td { display: block; padding: 0; border: 0; }
  .vtable tr:hover td { background: none; }
  .vtable tr.is-selected { background: var(--brand-tint); border-radius: 12px; }
  .vtable tr.is-selected td { background: none; }
  .vtable td.vt-check { grid-area: c; align-self: center; width: auto; }
  .vtable td.vt-thumb-cell { grid-area: t; align-self: center; }
  .vtable td.vt-info { grid-area: i; }
  .vtable td.vt-status { grid-area: s; }
  .vtable td.vt-dur, .vtable td.vt-views, .vtable td.vt-date { display: none; }
  .vt-thumb { width: 96px; }
  .vt-mobile-meta { display: flex !important; }
  .channel-grid { grid-template-columns: minmax(0, 1fr); }
  .add-channel { flex-direction: column; }
  .post-row { flex-wrap: wrap; }
  .post-actions { width: 100%; justify-content: flex-start; padding-left: 68px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .modal-sm { width: 100vw; }
  .modal-lg { width: 100vw; }
  .modal-actions { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1; }
  @keyframes modal-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .popover { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 6px); width: auto; }
  .ch-head { align-items: flex-start; }
  .tabs { margin: 0 -2px; }
  .tab-btn { padding: 0 12px; flex: 1 0 auto; }
  .toolbar .input-wrap { max-width: none; flex-basis: 100%; }
  .status-grid { grid-template-columns: minmax(0, 1fr); }
}


.vt-mobile-meta { display: none !important; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-top: 3px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.music-row:not(.is-playing) .eq { display: none; }

/* ------------------------------------------------------------------ late additions */
fieldset.opt-section { border: 0; margin: 0; min-width: 0; padding: 18px 0; }
fieldset.opt-section > legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; }
fieldset.opt-section > legend + * { clear: both; }
.opt-section > .label + .help { margin-top: -4px; }
.cap-controls[hidden] { display: none !important; }
.opts-editor .switch-field:first-of-type { padding-top: 4px; }
.cb[type="radio"] { border-radius: 50%; }
.cb[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.net-results { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.net-results li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.net-results a { display: inline-flex; align-items: center; gap: 4px; }
.net-err { color: var(--danger-text); }
.chip-opt span .mood-dot, .chip-opt span .platform-icon { margin-left: -2px; }

input[type="file"].input { padding: 6px 8px; min-height: 44px; color: var(--text-2); cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text);
  border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 620; font-size: 13.5px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: #2d2d44; }
.help .icon, .small .icon, p .icon { vertical-align: -0.18em; }

.acct-row .grow { flex: 1 1 220px; }
.acct-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pc-head .chev { margin-top: 8px; }
.pc-head[aria-expanded="false"] .pc-sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 820px) {
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clip-actions { grid-template-columns: 1fr 1fr; }
  .clip-actions .btn { min-width: 0; }
  .tab-extra { display: none; }
  .settings-main > .card { scroll-margin-top: calc(var(--topbar-h) + 72px); }
  .banner { flex-wrap: wrap; }
  .banner > .banner-body { flex: 1 1 200px; min-width: 0; }
  .banner > .btn:not(.banner-x) { margin-left: 32px; }
  .pc-head { padding: 14px; gap: 12px; }
  .pc-body { padding: 0 14px 16px; }
  .pc-head .platform-icon { width: 30px; height: 30px; }
}
@media (max-width: 359px) {
  .clip-grid { grid-template-columns: minmax(0, 1fr); }
}
.field > .segmented, .stack-sm > .segmented { align-self: flex-start; }
.login-card .field-error { color: var(--danger-text); margin: 0; }
.login-card .help { margin-top: 16px; }
#outlet:focus { outline: none; }
/* sentence-style captions show a longer sample line; zoom less so it isn't cropped */
.style-thumb img[data-style="minimal"], .style-thumb img[data-style="classic"] { transform: scale(1.06); }
@media (max-width: 480px) {
  .tab-btn { padding: 0 8px; gap: 6px; }
  .tab-btn > .icon { display: none; }
}
.tabs { position: relative; } /* offsetParent for revealTab() */
@media (max-width: 820px) {
  .clip-actions .btn-icon { width: auto; }
}

/* ------------------------------------------------------------------ pick moments (video page) */

.pick-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 0 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.moment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.moment {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.moment:hover { border-color: var(--border-strong); }
.moment.is-selected { border-color: var(--brand-hi); background: var(--brand-tint); }
.moment-check { padding-top: 3px; }
.moment-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.moment-title { font-size: 16px; line-height: 1.35; margin: 8px 0 4px; overflow-wrap: anywhere; }
.moment-quote {
  margin: 8px 0 0; padding: 0 0 0 12px; border-left: 3px solid var(--border-strong); color: var(--text-2);
  font-size: 14px; line-height: 1.5; overflow-wrap: anywhere;
}
.moment-why { margin: 8px 0 0; font-size: 13px; color: var(--text-3); display: flex; gap: 6px; }
.moment-why .icon { flex: none; margin-top: 2px; color: var(--brand-hi); }
.moment-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 560px) {
  .moment { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .moment-actions { grid-column: 2; flex-direction: row; align-items: center; }
  .pick-toolbar .btn-primary { width: 100%; justify-content: center; }
}

/* ------------------------------------------------------------------ AI spending (settings) */

.budget-box { padding: 2px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.budget-box .switch-label .icon { vertical-align: -0.15em; color: var(--warn-text); }
.spend-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.spend-total strong { display: block; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.spend-total span { color: var(--text-3); font-size: 13px; }
.spend-split { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.spend-split span { display: inline-flex; align-items: center; gap: 6px; }
.spend-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.spend-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.spend-list li:last-child { border-bottom: 0; }
.spend-list strong { flex: none; font-variant-numeric: tabular-nums; }
