/* ==========================================================================
   Stickman Studio 2.0 — pure CSS design system (no frameworks)
   Light + dark themes, marketing site, auth, studio app & admin.
   ========================================================================== */

:root {
  --brand: #7C3AED;
  --brand-2: #EC4899;
  --brand-3: #F59E0B;
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
  --bg: #F6F5FB;
  --bg-2: #EEEBF8;
  --surface: #FFFFFF;
  --surface-2: #F9F8FD;
  --surface-3: #F1EEFA;
  --border: #E6E2F3;
  --border-strong: #D3CDE8;
  --text: #17142B;
  --text-2: #4A4566;
  --muted: #7B7698;
  --ok: #12B76A;
  --warn: #F79009;
  --err: #F04438;
  --info: #2E90FA;
  --shadow-sm: 0 1px 2px rgba(23, 20, 43, .06), 0 1px 3px rgba(23, 20, 43, .05);
  --shadow: 0 8px 24px -8px rgba(54, 28, 120, .18), 0 2px 6px rgba(23, 20, 43, .05);
  --shadow-lg: 0 30px 60px -20px rgba(54, 28, 120, .35);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --sidebar: 268px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0D0B17;
  --bg-2: #14111F;
  --surface: #17142A;
  --surface-2: #1C1832;
  --surface-3: #241F3E;
  --border: #2B2647;
  --border-strong: #3A3360;
  --text: #F2F0FA;
  --text-2: #C9C4E2;
  --muted: #8F89AF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, video, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-3); padding: .12em .4em; border-radius: 6px; }
pre { background: #120F22; color: #E7E3FF; padding: 14px; border-radius: var(--radius-sm); overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-word; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none !important; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); flex: none; }
.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.brand-light { color: #fff; }

/* ---------- Buttons ---------- */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border); background: var(--b); color: var(--text); font: 600 .92rem var(--font); cursor: pointer; text-decoration: none !important; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); background-size: 160% 160%; border: 0; color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-primary:hover { background-position: 100% 50%; box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--brand) 85%, transparent); }
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn-soft { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 22%, var(--border)); color: var(--brand); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 9px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; transition: .15s; }
.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .86rem; color: var(--text-2); }
.help { color: var(--muted); font-size: .8rem; }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 .94rem var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
input[type=color] { width: 56px; height: 44px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
input[type=file] { font: 500 .9rem var(--font); color: var(--text-2); }
input[type=range] { width: 100%; accent-color: var(--brand); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B7698' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--brand); background: var(--surface-3); }
.pw-toggle .i-hide { display: none; }
.pw-toggle.on .i-hide { display: block; }
.pw-toggle.on .i-show { display: none; }
.pw-meter { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--err); transition: .25s; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2, .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); overflow: hidden; }
.input-prefix span { padding: 0 10px 0 13px; color: var(--muted); font-weight: 600; }
.input-prefix input { border: 0; border-radius: 0; padding-left: 0; }
.input-prefix input:focus { box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .85rem; cursor: pointer; transition: .15s; user-select: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active, input:checked + .chip { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-color: var(--brand); color: var(--brand); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); transition: .15s; }
.radio-card > span strong { font-size: .95rem; }
.radio-card > span small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.radio-card:hover > span { border-color: var(--border-strong); }
.radio-card input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.radio-card input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }

/* ---------- Alerts / badges / toasts ---------- */
.alert { position: relative; padding: 12px 42px 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-weight: 500; font-size: .92rem; }
.alert-success { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.alert-error { background: color-mix(in srgb, var(--err) 9%, var(--surface)); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: color-mix(in srgb, var(--err) 75%, var(--text)); }
.alert-warning { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: color-mix(in srgb, var(--warn) 60%, var(--text)); }
.alert-info { background: color-mix(in srgb, var(--info) 9%, var(--surface)); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: color-mix(in srgb, var(--info) 70%, var(--text)); }
.alert-close { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; width: 28px; height: 28px; border-radius: 8px; }
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-ready, .badge-active, .badge-paid, .badge-done, .badge-published, .badge-replied { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-processing, .badge-running, .badge-queued, .badge-pending, .badge-new { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.badge-failed, .badge-suspended, .badge-cancelled, .badge-refunded { background: color-mix(in srgb, var(--err) 13%, transparent); color: var(--err); }
.badge-expired, .badge-archived, .badge-draft, .badge-read { background: var(--surface-3); color: var(--muted); }
.badge-brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.badge-plain::before { display: none; }
.pill-count { margin-left: auto; font-style: normal; background: var(--err); color: #fff; font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 2000; max-width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 13px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; animation: toast-in .25s ease; }
.toast.ok { background: #0F5132; color: #fff; }
.toast.err { background: #8A1C1C; color: #fff; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Cards / layout primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-pad-0 { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.stat .d { font-size: .8rem; color: var(--muted); }
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-icon { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.meter { display: block; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--text); }
.empty-state.big { padding: 80px 20px; }
.empty-state .stick { width: 110px; height: 180px; margin: 0 auto 6px; }
.empty-code { font-size: 4.5rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 8px; }
.divider-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 600; margin: 18px 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table a.row-link { color: var(--text); font-weight: 700; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user small { display: block; color: var(--muted); }
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .85rem; text-decoration: none; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; position: relative; }
.toolbar .search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 38px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; background: var(--surface-3); border-radius: 13px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font: 600 .88rem var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.active, .tab[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------- Dropdown / modal ---------- */
[data-dropdown] { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
[data-dropdown].open .dropdown { display: block; animation: pop .15s ease; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; color: var(--text-2); font: 600 .88rem var(--font); background: transparent; border: 0; text-decoration: none; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-3); color: var(--text); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.modal { position: fixed; inset: 0; background: rgba(13, 11, 23, .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 1500; padding: 18px; }
.modal-card { width: min(460px, 100%); background: var(--surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .18s ease; max-height: 90vh; overflow: auto; }
.modal-card.wide { width: min(820px, 100%); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   App shell
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; z-index: 50; overflow-y: auto; transition: transform .25s ease; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 16px; }
.sidebar-close { display: none; }
.new-btn { margin: 0 4px 14px; width: calc(100% - 8px); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: .9rem; text-decoration: none; transition: .15s; }
.side-nav a:hover { background: var(--surface-3); color: var(--text); }
.side-nav a.active { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.side-nav a.active .icon { color: var(--brand); }
.plan-card { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--brand-2) 10%, var(--surface))); border: 1px solid var(--border); text-decoration: none !important; color: var(--text); }
.plan-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; }
.plan-usage { font-size: .78rem; color: var(--muted); font-weight: 600; }
.sidebar-scrim { display: none; }
.app-main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.menu-btn { display: none; }
.topbar-title { font-weight: 700; color: var(--text-2); font-size: .95rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font-family: var(--font); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .78rem; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.user-meta strong { font-size: .84rem; }
.user-meta small { font-size: .72rem; color: var(--muted); }
.content { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; }

/* ---------- Dashboard / project cards ---------- */
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 30px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #F59E0B 0%, transparent 45%), radial-gradient(90% 120% at 0% 100%, #EC4899 0%, transparent 55%), linear-gradient(135deg, #5B21B6, #7C3AED); box-shadow: var(--shadow); }
.hero-card h1, .hero-card h2 { color: #fff; }
.hero-card p { color: rgba(255, 255, 255, .85); max-width: 560px; }
.hero-card .btn { background: #fff; color: #4C1D95; border: 0; }
.hero-card .btn-outline-light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.hero-card .stick { position: absolute; right: 40px; bottom: -6px; width: 120px; height: 200px; opacity: .95; }
.hero-card .stick .s-line, .hero-card .stick .s-head { stroke: #fff; }
.hero-card .stick .s-head { fill: rgba(255, 255, 255, .15); }
.hero-card .stick .s-eye { fill: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .2s, box-shadow .2s; text-decoration: none !important; color: var(--text); }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-3), var(--bg-2)); display: grid; place-items: center; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb .ph { color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; }
.project-thumb .ph .icon { width: 30px; height: 30px; }
.project-thumb .badge { position: absolute; left: 10px; top: 10px; background: rgba(13, 11, 23, .7); color: #fff; backdrop-filter: blur(6px); }
.project-thumb .ratio { position: absolute; right: 10px; top: 10px; }
.project-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.project-body h3 { margin: 0; font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: auto; }
.steps-mini { display: flex; gap: 4px; margin-top: 6px; }
.steps-mini i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.steps-mini i.on { background: var(--grad); }

/* ---------- Studio wizard / project workspace ---------- */
.stepper { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: 1; min-width: 132px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 700; font-size: .86rem; cursor: pointer; text-align: left; font-family: var(--font); transition: .15s; }
.step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .8rem; flex: none; }
.step.done { color: var(--text-2); }
.step.done .n { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.step.current { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.step.current .n { background: var(--grad); color: #fff; }
.step:disabled { cursor: not-allowed; opacity: .55; }
.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.title-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: .15s; }
.title-card:hover { border-color: var(--border-strong); }
.title-card.selected { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent); }
.title-card.recommended::before { content: "★ Recommended"; position: absolute; top: -11px; left: 16px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.title-card h3 { margin: 0; font-size: 1.05rem; }
.scores { display: flex; gap: 14px; flex-wrap: wrap; }
.score { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--text-2); }
.score .meter { width: 90px; }
.score.safety .meter i { background: linear-gradient(90deg, #12B76A, #4ADE80); }
.reason { font-size: .84rem; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.reason strong { color: var(--text); }
.script-box textarea { min-height: 360px; font-size: .98rem; line-height: 1.75; }
.script-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); font-weight: 600; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); text-align: center; cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 36px; height: 36px; color: var(--brand); }
.progress-card { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.progress-bar { height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 12px 0; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--grad); background-size: 200% 100%; animation: shimmer 2s linear infinite; border-radius: 99px; transition: width .5s ease; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stage-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stage-list span { padding: 5px 11px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: .76rem; font-weight: 700; }
.stage-list span.on { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.stage-list span.done { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.video-frame { border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-frame video { display: block; width: 100%; max-height: 72vh; background: #000; }
.video-frame.portrait { max-width: 380px; margin: 0 auto; }
.video-frame.square { max-width: 560px; margin: 0 auto; }
.kit-block { position: relative; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 12px; }
.kit-block h4 { margin: 0 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kit-block .kit-text { white-space: pre-wrap; word-break: break-word; font-size: .92rem; }
.kit-block .copy-btn { position: absolute; top: 10px; right: 10px; }
.scene-list { display: grid; gap: 10px; }
.scene-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; }
.scene-row .t { font-family: var(--mono); color: var(--brand); font-weight: 700; font-size: .78rem; }
.scene-row .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.scene-row .tags span { font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.log-box { max-height: 300px; }
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 2px; }
.voice-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: .15s; text-align: left; font-family: var(--font); color: var(--text); }
.voice-item:hover { border-color: var(--border-strong); }
.voice-item.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.voice-item .vi-text { flex: 1; min-width: 0; }
.voice-item strong { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-item small { display: block; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-btn { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); display: grid; place-items: center; cursor: pointer; }
.play-btn .icon { width: 14px; height: 14px; }
.play-btn:disabled { opacity: .35; cursor: default; }
.task-list { display: grid; gap: 10px; }
.task-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.task-item .ti-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.task-item audio { width: 100%; height: 36px; margin-top: 6px; }
.task-item .ti-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.task-item img { max-height: 150px; border-radius: 10px; border: 1px solid var(--border); }
.dialogue-row { display: grid; grid-template-columns: 110px 1fr 38px; gap: 8px; margin-bottom: 8px; }

/* ---------- Admin specifics ---------- */
.perm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.perm-group { margin-bottom: 20px; }
.perm-group h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.perm-grid label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.perm-grid label input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.perm-grid label small { display: block; color: var(--muted); font-weight: 500; font-family: var(--mono); font-size: .72rem; }
.role-list { display: flex; flex-direction: column; gap: 6px; }
.role-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: .9rem; text-decoration: none; }
.role-list a.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.role-list a small { color: var(--muted); font-weight: 600; }
.rte { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rte-bar button { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 700 .82rem var(--font); cursor: pointer; }
.rte-bar button:hover, .rte-bar button.on { background: var(--surface-3); color: var(--brand); }
.rte-area { min-height: 280px; padding: 16px; outline: none; line-height: 1.7; }
.rte-area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.rte textarea { border: 0; border-radius: 0; min-height: 280px; font-family: var(--mono); font-size: .85rem; }
.setting-section { scroll-margin-top: 90px; }
.settings-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .88rem; text-decoration: none; }
.settings-nav a:hover { background: var(--surface-3); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.secret-state { font-size: .76rem; font-weight: 700; color: var(--ok); }
.check-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.check-list li small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.check-list .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.check-list .ok .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.check-list .warn .dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bar-chart div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-chart i { display: block; width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: var(--grad); min-height: 3px; }
.bar-chart span { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* ==========================================================================
   Public marketing site
   ========================================================================== */
.container { width: min(1180px, 100% - 40px); margin: 0 auto; }
.container.narrow { width: min(780px, 100% - 40px); }
.site { background: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > a:not(.btn) { color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.site-nav > a:not(.btn):hover { color: var(--brand); }
.nav-sep { width: 1px; height: 22px; background: var(--border); }
.nav-toggle { display: none; border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 8px; }
.nav-toggle .icon { width: 26px; height: 26px; }
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 760px; background: radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 70%), radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 70%), radial-gradient(30% 40% at 60% 70%, color-mix(in srgb, var(--brand-3) 20%, transparent), transparent 70%); filter: blur(10px); z-index: 0; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: .82rem; font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-sm); }
.eyebrow b { background: var(--grad); color: #fff; padding: 3px 10px; border-radius: 99px; font-size: .74rem; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.04; letter-spacing: -.045em; margin: 20px 0 18px; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.14rem; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { color: var(--ok); }
.hero-visual { position: relative; }
.player-mock { position: relative; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 14px; transform: rotate(-1.2deg); }
.player-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #FFF8EE, #F4EEE4); }
[data-theme="dark"] .player-screen { background: linear-gradient(180deg, #1F1B33, #151226); }
.player-screen .ground { position: absolute; left: 0; right: 0; bottom: 22%; height: 3px; background: var(--text); opacity: .85; border-radius: 3px; }
.player-screen .headline { position: absolute; left: 7%; top: 9%; font-weight: 800; font-size: clamp(1rem, 2.2vw, 1.55rem); letter-spacing: -.03em; color: var(--text); }
.player-screen .headline em { font-style: normal; background: #E5372B; color: #fff; padding: 0 8px; border-radius: 6px; margin-left: 4px; display: inline-block; animation: pulse-pop 2.4s ease-in-out infinite; }
.player-screen .caption { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); background: #17142B; color: #fff; font-weight: 700; font-size: .8rem; padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
.player-screen .caption b { background: #E5372B; padding: 1px 6px; border-radius: 5px; }
.player-screen .stick { position: absolute; bottom: 22%; height: 58%; width: auto; }
.player-screen .stick.one { left: 52%; }
.player-screen .stick.two { left: 72%; height: 50%; }
.player-screen .bulb { position: absolute; left: 18%; top: 40%; width: 18%; animation: float 3s ease-in-out infinite; }
.player-bar { display: flex; align-items: center; gap: 10px; padding: 12px 6px 2px; }
.player-bar .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; }
.player-bar .track { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.player-bar .track i { display: block; height: 100%; width: 40%; background: var(--grad); animation: play 8s linear infinite; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; animation: float 4s ease-in-out infinite; }
.float-card .icon { color: var(--brand); }
.float-card.a { left: -24px; top: 18%; }
.float-card.b { right: -14px; bottom: 16%; animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes play { from { width: 0; } to { width: 100%; } }
@keyframes pulse-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08) rotate(-2deg); } }
.logo-strip { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; color: var(--muted); font-weight: 800; font-size: .95rem; letter-spacing: .02em; opacity: .8; }
.section { padding: 86px 0; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.04em; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .f-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 16px; box-shadow: 0 10px 20px -10px var(--brand); }
.feature .f-icon .icon { width: 24px; height: 24px; }
.feature p { color: var(--text-2); margin: 0; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step-card { position: relative; padding: 24px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.step-card::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: block; font-size: 2.1rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; letter-spacing: -.04em; }
.step-card p { color: var(--text-2); margin: 0; font-size: .92rem; }
.niche-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.niche-cloud span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-sm); }
.niche-cloud .icon { color: var(--brand); }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.style-swatch { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.style-swatch .sw { height: 92px; position: relative; }
.style-swatch .sw .stick { position: absolute; right: 16px; bottom: 6px; height: 80px; width: auto; }
.style-swatch div.t { padding: 10px 14px; font-weight: 700; font-size: .88rem; }
.style-swatch div.t small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.price-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); transform: translateY(-8px); }
.price-card .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .74rem; font-weight: 800; padding: 5px 14px; border-radius: 99px; white-space: nowrap; }
.price-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; margin: 14px 0 4px; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.price-card li .icon { color: var(--ok); margin-top: 2px; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.testi blockquote { margin: 0; font-size: 1rem; color: var(--text); font-weight: 500; }
.stars { color: #F59E0B; display: flex; gap: 2px; }
.stars .icon { width: 16px; height: 16px; fill: currentColor; }
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 4px 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 0 0 16px; }
.cta-band { position: relative; overflow: hidden; border-radius: 30px; padding: 56px; text-align: center; color: #fff; background: radial-gradient(70% 120% at 0% 0%, #EC4899, transparent 60%), radial-gradient(70% 120% at 100% 100%, #F59E0B, transparent 60%), linear-gradient(135deg, #4C1D95, #7C3AED); box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-band p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
.cta-band .btn { background: #fff; color: #4C1D95; border: 0; }
.prose { font-size: 1.04rem; color: var(--text-2); }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.6em; }
.prose a { text-decoration: underline; }
.prose img { border-radius: 14px; }
.prose blockquote { border-left: 4px solid var(--brand); margin: 1.2em 0; padding: 4px 18px; color: var(--text); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.page-hero { padding: 70px 0 40px; text-align: center; background: radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.04em; }
.page-hero p { color: var(--text-2); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 26px; background: var(--surface); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; color: var(--text-2); font-weight: 600; font-size: .9rem; margin-bottom: 8px; text-decoration: none; }
.footer-grid a:not(.brand):hover { color: var(--brand); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 26px; }
.contact-info .item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.contact-info .item .icon { color: var(--brand); width: 22px; height: 22px; }

/* ---------- Animated stickman (SVG) ---------- */
.stick { overflow: visible; }
.stick .s-line { fill: none; stroke: var(--text); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.stick .s-head { fill: var(--surface); stroke: var(--text); stroke-width: 6; }
.stick .s-eye { fill: var(--text); }
.stick .s-mouth { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.stick .s-body { transform-origin: 60px 190px; }
.stick-wave .s-arm-f { transform-origin: 60px 66px; animation: wave 1.1s ease-in-out infinite; }
.stick-wave .s-body { animation: bob 1.1s ease-in-out infinite; }
.stick-run .s-body { animation: bob .45s ease-in-out infinite; }
.stick-run .s-leg-f { transform-origin: 60px 116px; animation: leg .45s ease-in-out infinite; }
.stick-run .s-leg-b { transform-origin: 60px 116px; animation: leg .45s ease-in-out infinite reverse; }
.stick-run .s-arm-f, .stick-run .s-arm-b { transform-origin: 60px 66px; animation: leg .45s ease-in-out infinite reverse; }
.stick-shrug .s-arm-f, .stick-shrug .s-arm-b { transform-origin: 60px 66px; animation: shrug 1.6s ease-in-out infinite; }
.stick-jump .s-body { animation: jump 1s cubic-bezier(.3, .7, .4, 1) infinite; }
.stick-think .s-body { animation: sway 2.4s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(18deg); } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes leg { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }
@keyframes shrug { 50% { transform: translateY(-6px) scaleY(1.04); } }
@keyframes jump { 0%, 100% { transform: translateY(0) scaleY(.96); } 45% { transform: translateY(-34px) scaleY(1.04); } }
@keyframes sway { 50% { transform: rotate(3deg); } }

/* ---------- Auth ---------- */
.auth-body { background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(80% 60% at 0% 0%, #EC4899 0%, transparent 60%), radial-gradient(70% 60% at 100% 100%, #F59E0B 0%, transparent 60%), linear-gradient(140deg, #3B0764, #6D28D9); color: #fff; display: flex; align-items: center; padding: 48px; }
.auth-art-inner { max-width: 460px; }
.auth-art h2 { color: #fff; font-size: 2.6rem; letter-spacing: -.04em; margin-top: 18px; }
.auth-art p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
.stage-demo { display: flex; align-items: flex-end; gap: 10px; height: 230px; margin-top: 40px; border-bottom: 3px solid rgba(255, 255, 255, .8); }
.stage-demo .stick { width: 120px; height: 200px; }
.stage-demo .stick.sm { width: 90px; height: 150px; }
.stage-demo .stick .s-line, .stage-demo .stick .s-head, .stage-demo .stick .s-mouth { stroke: #fff; }
.stage-demo .stick .s-head { fill: rgba(255, 255, 255, .12); }
.stage-demo .stick .s-eye { fill: #fff; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 24px; }
.auth-brand-mobile { display: none; margin-bottom: 26px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 16px; font-size: .88rem; }
.auth-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: .92rem; }
.install-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(60% 60% at 10% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%), var(--bg); }
.install-card { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 34px; box-shadow: var(--shadow-lg); }
.install-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.install-head h1 { margin: 0; }
.install-head p { margin: 0; }
.install-head .brand-mark { width: 54px; height: 54px; border-radius: 16px; }
.install-step { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 18px 0 12px; }
.install-step span { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: .82rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-close { display: inline-grid; }
  .sidebar-scrim.show { display: block; position: fixed; inset: 0; background: rgba(13, 11, 23, .45); z-index: 45; }
  .app-main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .content { padding: 20px 16px; }
  .topbar { padding: 10px 16px; }
  .user-meta { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 40px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .contact-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-brand-mobile { display: inline-flex; }
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s; }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav > a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 12px; }
  .nav-sep { display: none; }
  .site-nav .theme-toggle { margin-top: 12px; }
  .float-card.a { left: 0; }
  .float-card.b { right: 0; }
}
@media (max-width: 640px) {
  .grid-4, .feature-grid, .testi-grid, .steps-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 18px; }
  .cta-band { padding: 36px 20px; border-radius: 22px; }
  .section { padding: 60px 0; }
  .price-card.featured { transform: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .scene-row { grid-template-columns: 1fr; }
  .task-item { grid-template-columns: 1fr; }
  .task-item .ti-icon { display: none; }
  .dialogue-row { grid-template-columns: 1fr 38px; }
  .dialogue-row select { grid-column: 1 / -1; }
  .table th, .table td { padding: 10px 12px; }
  .page-head { align-items: stretch; }
  .install-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
