/* Markleyo Studio - one stylesheet, no build step.
   System: Inter; type 12/13/14/16/20 (+ display); 4px grid; control height 40px (auth 44px);
   radius 8 (small) / 10 (controls) / 12 (menus) / 16 (cards) / 20 (panels) / 999 (pills);
   one floating shadow, one dialog shadow; purple #8052FF is the only brand accent. */

:root {
  --ink: #141024;
  --text: #4A4A5C;
  --muted: #7C7993;
  --faint: #A9A6BD;
  --line: #ECE9F6;
  --line-2: #E2DEF1;
  --bg: #FAFAFD;
  --surface: #fff;
  --soft: #F6F4FE;
  --soft-2: #F1EEFF;
  --brand: #8052FF;
  --brand-2: #7146F0;
  --brand-ink: #5B33D6;
  --brand-soft: #F1ECFF;
  --good: #16A34A; --good-soft: #EAF8EF;
  --warn: #B45309; --warn-soft: #FEF4E6;
  --bad: #DC2626; --bad-soft: #FDECEC;
  --info: #2E7DFF; --info-soft: #EAF2FF;
  --h: 40px;
  --h-sm: 32px;
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-card: 0 1px 2px rgba(20,16,36,.04), 0 12px 32px -24px rgba(60,40,120,.35);
  --shadow-float: 0 18px 44px -14px rgba(30,20,70,.28), 0 2px 6px rgba(30,20,70,.06);
  --shadow-dialog: 0 40px 90px -30px rgba(20,10,50,.45), 0 8px 24px -8px rgba(20,10,50,.18);
  --ease: cubic-bezier(.16,1,.3,1);
  --rail: 84px;
  --top: 56px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; max-width: 100%; overflow-x: clip; }
body {
  font: 400 14px/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand); }
img, svg { display: block; }
.ic { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: #E4DAFF; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row-12 { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-8 { display: grid; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* ---------- Buttons: one height, one radius ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r); border: 1px solid transparent;
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s, box-shadow .2s, transform .2s var(--ease);
  text-decoration: none; user-select: none;
}
.btn .ic { width: 16px; height: 16px; }
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #8A5EFF, #7146F0);
  box-shadow: 0 8px 20px -10px rgba(113,70,240,.9), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(113,70,240,.95), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-dark { color: #fff; background: var(--ink); }
.btn-dark:hover { color: #fff; background: #241D3D; }
.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line-2); box-shadow: 0 1px 2px rgba(20,16,36,.04); }
.btn-secondary:hover { color: var(--ink); border-color: #CFC6F2; background: #FDFCFF; }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--soft); }
.btn-soft { color: var(--brand-ink); background: var(--brand-soft); }
.btn-soft:hover { color: var(--brand-ink); background: #E8E0FF; }
.btn-danger { color: #fff; background: var(--bad); }
.btn-danger:hover { color: #fff; background: #C81E1E; }
.btn-danger-ghost { color: var(--bad); background: transparent; border-color: #F5CACA; }
.btn-danger-ghost:hover { color: var(--bad); background: var(--bad-soft); }
.btn-sm { height: var(--h-sm); padding: 0 12px; border-radius: var(--r-sm); font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn-sm.btn-icon { width: var(--h-sm); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .8; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.label { font-size: 13px; font-weight: 600; color: var(--ink); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hint { font-size: 12px; color: var(--muted); }
.error { font-size: 12px; color: var(--bad); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: var(--h); padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s; outline: none; min-width: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #D4CCEF; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(128,82,255,.14); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: #F0A3A3; }
.input[readonly] { background: var(--soft); color: var(--text); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background: #fff 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='%237C7993' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .input-icon { padding-left: 38px; }
.input-wrap > .lead { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-wrap > .trail { position: absolute; right: 4px; top: 4px; height: calc(var(--h) - 8px); width: calc(var(--h) - 8px); border: 0; background: none; border-radius: 7px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.input-wrap > .trail:hover { background: var(--soft); color: var(--ink); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); cursor: pointer; line-height: 1.4; }
.check input { appearance: none; width: 18px; height: 18px; flex: none; margin: 0; border: 1.5px solid #CBC5E2; border-radius: 5px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: .15s; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; margin: 0; flex: none; border-radius: 999px; background: #DAD5EA; transition: .2s var(--ease); cursor: pointer; position: relative; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; padding-top: 0; }
.setting-row:last-child { padding-bottom: 0; }
.setting-row .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.setting-row .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); min-height: 64px; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 700; }
.card-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 24px; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: #FCFBFF; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card-foot .hint { margin-right: auto; }
.card-danger { border-color: #F6D5D5; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--soft); color: var(--text); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-good { background: var(--good-soft); color: #15803D; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: #1D5FD0; }
.badge-dark { background: var(--ink); color: #fff; }

/* ---------- Avatar ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #8052FF, #8F8CFF); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-sq { border-radius: 10px; }

/* ---------- Floating menus (one anatomy) ---------- */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 220px; max-width: 340px;
  max-height: min(560px, calc(100vh - 80px)); overflow: auto;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float);
  text-align: left; font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0; white-space: normal;
  animation: menu-in .16s var(--ease);
}
.menu-left { left: 0; right: auto; }
.menu-up { top: auto; bottom: calc(100% + 6px); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-sm); color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; }
.menu-item .ic { width: 16px; height: 16px; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--soft); color: var(--ink); outline: none; }
.menu-item:hover .ic { color: var(--brand-ink); }
.menu-item .meta { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.menu-item.is-active { color: var(--brand-ink); }
.menu-item.danger, .menu-item.danger .ic { color: var(--bad); }
.menu-item.danger:hover { background: var(--bad-soft); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { height: 40px; padding: 0 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: #FCFBFF; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #FCFBFF; }
.table .r { text-align: right; }
.table .strong { color: var(--ink); font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table .actions > * { vertical-align: middle; }
.table a.rowlink { color: var(--ink); font-weight: 600; }
.table a.rowlink:hover { color: var(--brand-ink); }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user .who { min-width: 0; }
.cell-user .n { color: var(--ink); font-weight: 600; font-size: 13px; }
.cell-user .e { font-size: 12px; color: var(--muted); }
.amount-plus { color: #15803D; font-weight: 600; }
.amount-minus { color: var(--ink); font-weight: 600; }

/* ---------- Toolbar & tabs ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .input-wrap { flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .select { width: auto; min-width: 150px; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 4px; height: var(--h); background: #F2F0F8; border-radius: var(--r); }
.segmented a, .segmented button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.segmented a:hover, .segmented button:hover { color: var(--ink); }
.segmented .is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,16,36,.1); }
.segmented .count { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-color: var(--brand); }

/* ---------- Alerts, empty, toasts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 13px; background: var(--soft); color: var(--ink); }
.alert .ic { margin-top: 1px; color: var(--brand); }
.alert-good { background: var(--good-soft); } .alert-good .ic { color: var(--good); }
.alert-warn { background: var(--warn-soft); } .alert-warn .ic { color: var(--warn); }
.alert-bad { background: var(--bad-soft); } .alert-bad .ic { color: var(--bad); }
.alert b { font-weight: 600; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; }
.empty .em-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 4px; }
.empty h3 { font-size: 15px; font-weight: 700; }
.empty p { font-size: 13px; color: var(--muted); max-width: 360px; }
.toasts { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px 12px 12px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-dialog); animation: toast-in .3s var(--ease); }
.toast .ic { color: #6EE7A0; }
.toast.warn .ic { color: #FCD34D; }
.toast button { margin-left: auto; border: 0; background: none; color: #A9A3C6; cursor: pointer; padding: 2px; border-radius: 6px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Dialog ---------- */
dialog.modal { width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-dialog); color: var(--text); }
dialog.modal::backdrop { background: rgba(20,16,36,.42); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: dialog-in .22s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.modal-body { padding: 20px 24px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 22px; }

/* ---------- App shell ---------- */
.shell { min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--rail); display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 16px; background: #fff; border-right: 1px solid var(--line);
}
.rail-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; }
.rail-logo img { width: 34px; height: 34px; }
.rail nav { display: grid; gap: 4px; width: 100%; padding: 0 10px; }
.rail-item { display: grid; justify-items: center; gap: 4px; padding: 8px 0 7px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; position: relative; }
.rail-item .ic { width: 22px; height: 22px; padding: 0; }
.rail-item .ri { display: grid; place-items: center; width: 40px; height: 32px; border-radius: 10px; transition: background .2s, color .2s; }
.rail-item:hover { color: var(--ink); }
button.rail-item { width: 100%; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.rail-wide button.rail-item { font-size: 13.5px; font-weight: 500; }
.rail-item:hover .ri { background: var(--soft); }
.rail-item.is-active { color: var(--brand-ink); }
.rail-item.is-active .ri { background: var(--brand-soft); color: var(--brand-ink); }
.rail-item .pip { position: absolute; top: 6px; right: 18px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.rail-bottom { margin-top: auto; }
.rail, .main { transition: width .25s var(--ease), margin-left .25s var(--ease); }
.rail-logo .logo-word { display: none; width: 148px; height: auto; }
.rail-toggle {
  position: absolute; top: 46px; right: -12px; z-index: 2; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer;
  box-shadow: 0 2px 6px rgba(20,16,36,.08); transition: color .2s, border-color .2s, transform .25s var(--ease);
}
.rail-toggle:hover { color: var(--brand-ink); border-color: #CFC6F2; }
html:not(.rail-wide) .rail-toggle { transform: rotate(180deg); }
/* Open menu: logo wordmark, icon + label in one line */
html.rail-wide { --rail: 232px; }
.rail-wide .rail { align-items: stretch; padding: 6px 12px 16px; }
.rail-wide .rail-logo { width: auto; justify-content: flex-start; display: flex; padding: 0 10px; }
.rail-wide .rail-logo .logo-mark { display: none; }
.rail-wide .rail-logo .logo-word { display: block; }
.rail-wide .rail nav { padding: 0; gap: 2px; }
.rail-wide .rail-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; color: var(--text); }
.rail-wide .rail-item .ri { width: auto; height: auto; background: none !important; }
.rail-wide .rail-item .ri .ic { width: 20px; height: 20px; }
.rail-wide .rail-item:hover { background: var(--soft); color: var(--ink); }
.rail-wide .rail-item.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.rail-wide .rail-item .pip { position: static; margin-left: auto; border: 0; }
.rail-wide .rail-item .rl { white-space: nowrap; }
.main { margin-left: var(--rail); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 6px; padding: 0 24px;
  background: rgba(250,250,253,.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.is-scrolled { border-color: var(--line); }
.topbar .spacer { flex: 1; }
/* Compact top bar: smaller controls than page controls */
.topbar .btn, .topbar .credit-chip { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.topbar .btn .ic, .topbar .credit-chip .ic { width: 15px; height: 15px; }
.topbar .avatar { width: 32px; height: 32px; font-size: 12px; }
.ws-switch { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 7px; line-height: 1.25; border-radius: var(--r); border: 1px solid transparent; color: var(--ink); max-width: 280px; }
.ws-switch:hover, .dd[open] > .ws-switch { background: #fff; border-color: var(--line); }
.ws-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.ws-mark img { width: 100%; height: 100%; object-fit: cover; }
.ws-switch .n { font-size: 13px; font-weight: 600; }
.ws-switch > .ic { margin-left: 4px; }
.ws-switch .p { font-size: 11px; color: var(--muted); font-weight: 500; }
.credit-chip { display: inline-flex; align-items: center; gap: 8px; height: var(--h); padding: 0 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line-2); color: var(--ink); font-size: 13px; font-weight: 600; }
.credit-chip .ic { width: 16px; height: 16px; color: var(--brand); }
.credit-chip:hover { color: var(--ink); border-color: #CFC6F2; }
.btn-upgrade { color: #6B3F00; background: linear-gradient(180deg, #FFF3D6, #FFE7B3); border-color: #F7D58C; }
.btn-upgrade:hover { color: #6B3F00; border-color: #EEC266; }
.btn-upgrade .ic { color: #D98A00; }
.avatar-btn { padding: 2px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.avatar-btn:hover, .dd[open] > .avatar-btn { border-color: #D6CBFF; }
.page { padding: 8px 28px 56px; max-width: 1280px; margin: 0 auto; }
.page-narrow { max-width: 1040px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 24px; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.page-head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.page-head .row { flex-wrap: wrap; justify-content: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.back-link:hover { color: var(--ink); }
.announce { display: flex; align-items: center; gap: 12px; margin: 0 28px; padding: 10px 14px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 13px; }
.announce .ic { color: #B8A3FF; }
.announce a { color: #CDBFFF; font-weight: 600; margin-left: auto; white-space: nowrap; }
.imp-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; height: 40px; background: #FDF2D8; color: #6B3F00; font-size: 13px; font-weight: 600; }
.imp-bar button { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid #EDC774; background: #fff; color: #6B3F00; font-size: 12px; font-weight: 600; cursor: pointer; }
.dotgrid { background-image: radial-gradient(rgba(128,82,255,.10) 1px, transparent 1px); background-size: 22px 22px; }

/* Account menu */
.acct { width: 300px; max-width: 300px; padding: 8px; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; }
.acct-head .n { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; min-width: 0; }
.acct-head .e { font-size: 12px; color: var(--muted); }
.acct-credit { display: block; margin: 0 0 6px; padding: 14px; border-radius: var(--r-md); background: linear-gradient(135deg, #F4EFFF, #EEF3FF); color: var(--ink); }
.acct-credit:hover { color: var(--ink); }
.acct-credit .top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.acct-credit .top .ic { color: var(--brand); width: 18px; height: 18px; }
.acct-credit .top .left { margin-left: auto; font-weight: 600; font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 2px; }
.meter { height: 6px; border-radius: 999px; background: rgba(128,82,255,.14); overflow: hidden; margin-top: 12px; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8052FF, #8F8CFF); }
.acct-upsell { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; margin-bottom: 6px; border-radius: var(--r-md); background: #FFF8E8; font-size: 12.5px; color: #6B3F00; font-weight: 600; }
.acct-upsell .btn { margin-left: auto; }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 28px 0 24px; }
.hero h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.hero h1 .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 1; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero p { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 20px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: var(--h); padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .2s var(--ease); }
.pill .ic { width: 16px; height: 16px; color: var(--muted); }
.pill:hover { color: var(--ink); border-color: #CFC6F2; }
.pill.is-active { color: var(--brand-ink); background: var(--brand-soft); border-color: #D9CCFF; }
.pill.is-active .ic { color: var(--brand); }
.composer { display: grid; grid-template-columns: 300px 1fr; gap: 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 30px 60px -40px rgba(60,40,120,.45), 0 1px 2px rgba(20,16,36,.04); }
.composer-visual { position: relative; height: 196px; border-radius: 14px; overflow: hidden; }
.composer-main { display: flex; flex-direction: column; padding: 6px 4px 0 20px; min-width: 0; }
.composer textarea { flex: 1; width: 100%; min-height: 120px; border: 0; outline: none; resize: none; padding: 6px 0; font-size: 15px; line-height: 1.6; color: var(--ink); background: transparent; }
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.composer-bar .chip { display: inline-flex; align-items: center; gap: 6px; height: var(--h); padding: 0 12px; border-radius: var(--r-sm); background: var(--soft); color: var(--text); font-size: 12.5px; font-weight: 600; }
.composer-bar .chip .ic { width: 14px; height: 14px; color: var(--brand); }
.composer-bar .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.tool-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.tool-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: #F7F6FB; border: 1px solid transparent; color: var(--ink); transition: .25s var(--ease); min-width: 0; }
.tool-card:hover { background: #fff; border-color: var(--line-2); box-shadow: var(--shadow-card); transform: translateY(-2px); color: var(--ink); }
.tool-card .tc-t { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tool-card .tc-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  --c1: #8052FF; --c2: #B79CFF; color: var(--c1);
  background: linear-gradient(140deg, color-mix(in srgb, var(--c2) 42%, #fff), color-mix(in srgb, var(--c1) 12%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c1) 14%, transparent), inset 0 1px 0 rgba(255,255,255,.9); }
.tile .ic { width: 22px; height: 22px; }
.tile-sm { width: 36px; height: 36px; border-radius: 10px; }
.tile-sm .ic { width: 18px; height: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.section-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.section-title a { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.section-title a:hover { color: var(--ink); }

/* Feature banner (dark, the one place we go dark in-app) */
.feature { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; padding: 36px 40px; border-radius: var(--r-xl); overflow: hidden; background: #0B0A18; color: #fff; isolation: isolate; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 90% at 85% 30%, rgba(128,82,255,.38), transparent 60%),
  radial-gradient(40% 60% at 10% 110%, rgba(124,168,255,.18), transparent 60%); }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(70% 80% at 70% 40%, #000, transparent); }
.feature .eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #CDBFFF; }
.feature h2 { color: #fff; font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -.03em; margin-top: 14px; }
.feature h2 em { font-style: normal; background: linear-gradient(96deg, #9A6BFF, #8F8CFF 55%, #7CA8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature p { color: #B4AED0; font-size: 14.5px; margin-top: 10px; max-width: 460px; }
.feature .row { margin-top: 22px; }
.btn-glass { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.btn-glass:hover { color: #fff; border-color: rgba(143,140,255,.7); }

/* Mock visuals (CSS-only product glimpses, aria-hidden) */
.mock { position: absolute; inset: 0; overflow: hidden; }
.mock-social { background: linear-gradient(160deg, color-mix(in srgb, var(--c2, #B79CFF) 26%, #fff), #EEF2FF); }
.mock-content { background: linear-gradient(160deg, color-mix(in srgb, var(--c2, #A5B4FC) 30%, #fff), #F6F3FF); }
.mock-image { background: linear-gradient(160deg, color-mix(in srgb, var(--c2, #F9A8D4) 28%, #fff), #EDEBFF); }
.mock-video { background: linear-gradient(160deg, color-mix(in srgb, var(--c2, #93C5FD) 28%, #fff), #F1EEFF); }
.mock .post { position: absolute; left: 22px; top: 22px; width: 172px; padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 18px 30px -18px rgba(60,40,120,.5); animation: float 6s ease-in-out infinite; }
.mock .post .ph { height: 74px; border-radius: 8px; background: linear-gradient(135deg, var(--c1, #8052FF), var(--c2, #8F8CFF) 70%, #7CA8FF); position: relative; overflow: hidden; }
.mock .post .ph::after { content: ""; position: absolute; left: -30%; top: 0; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 3.2s ease-in-out infinite; }
.mock .post .ln { height: 6px; border-radius: 4px; background: #ECE8FA; margin-top: 8px; }
.mock .post .ln.s { width: 60%; }
.mock .post .who { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.mock .post .who i { width: 16px; height: 16px; border-radius: 50%; background: #141024; }
.mock .post .who b { height: 6px; width: 60px; border-radius: 4px; background: #DDD7F3; }
.mock .sched { position: absolute; right: 18px; bottom: 22px; display: grid; gap: 6px; }
.mock .sched span { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 8px; background: #fff; font-size: 10.5px; font-weight: 700; color: var(--ink); box-shadow: 0 10px 20px -12px rgba(60,40,120,.45); }
.mock .sched span i { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.mock .sched span:nth-child(2) i { background: #8052FF; box-shadow: 0 0 0 3px rgba(128,82,255,.18); }
.mock .sched span:nth-child(3) i { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.mock .doc { position: absolute; left: 22px; right: 22px; top: 22px; bottom: -10px; padding: 16px; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 18px 30px -18px rgba(60,40,120,.5); }
.mock .doc .h { height: 10px; width: 55%; border-radius: 5px; background: #141024; margin-bottom: 12px; }
.mock .doc .ln { height: 6px; border-radius: 4px; background: #ECE8FA; margin-top: 8px; }
.mock .doc .ln.hl { background: linear-gradient(90deg, color-mix(in srgb, var(--c1, #8052FF) 35%, #fff), #ECE8FA); }
.mock .doc .cursor { display: inline-block; width: 2px; height: 12px; background: var(--brand); margin-top: 8px; animation: blink 1s steps(2) infinite; }
.mock .tiles { position: absolute; inset: 18px; display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.mock .tiles i { border-radius: 10px; }
.mock .tiles i:nth-child(1) { grid-row: span 2; background: radial-gradient(80% 70% at 30% 25%, #FFD6A8, transparent 60%), linear-gradient(160deg, var(--c1, #8052FF), #2E1C6E); }
.mock .tiles i:nth-child(2) { background: radial-gradient(70% 70% at 70% 30%, #A7F3D0, transparent 60%), linear-gradient(160deg, #6366F1, #8B8CFF); }
.mock .tiles i:nth-child(3) { background: radial-gradient(70% 70% at 30% 70%, #FBCFE8, transparent 60%), linear-gradient(160deg, #A855F7, #7C3AED); }
.mock .frame { position: absolute; left: 22px; right: 22px; top: 20px; height: 112px; border-radius: 12px; background: linear-gradient(160deg, #1B1640, #0B0A18); display: grid; place-items: center; box-shadow: 0 18px 30px -18px rgba(20,10,50,.6); }
.mock .frame .play { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; }
.mock .frame .play::after { content: ""; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.mock .timeline { position: absolute; left: 22px; right: 22px; bottom: 22px; display: flex; gap: 4px; }
.mock .timeline i { height: 22px; flex: 1; border-radius: 6px; background: #fff; box-shadow: 0 6px 14px -10px rgba(60,40,120,.5); }
.mock .timeline i:nth-child(2) { flex: 2; background: color-mix(in srgb, var(--c2, #C4B5FD) 55%, #fff); }
.mock .timeline i:nth-child(4) { flex: 1.5; background: #DCE8FF; }
.mock .playhead { position: absolute; bottom: 16px; width: 2px; height: 34px; background: var(--c1, var(--brand)); left: 30%; animation: playhead 6s linear infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes shimmer { 0% { left: -30%; } 60%,100% { left: 120%; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes playhead { from { left: 8%; } to { left: 90%; } }

/* Agent preview (feature banner right side) */
.agent-mock { position: relative; height: 230px; }
.agent-mock .card-a { position: absolute; right: 8px; top: 0; width: 270px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.agent-mock .msg { font-size: 12.5px; color: #E4DFFF; line-height: 1.5; }
.agent-mock .msg b { color: #fff; }
.agent-mock .steps { display: grid; gap: 8px; margin-top: 12px; }
.agent-mock .step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #B4AED0; }
.agent-mock .step i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); flex: none; display: grid; place-items: center; }
.agent-mock .step.done i { background: #22C55E; border-color: #22C55E; }
.agent-mock .step.done i::after { content: ""; width: 7px; height: 4px; border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translateY(-1px); }
.agent-mock .step.run i { border-color: #8F8CFF; border-top-color: transparent; animation: spin 1s linear infinite; }
.agent-mock .step.done { color: #fff; }
.agent-mock .chipset { position: absolute; right: 8px; bottom: 0; display: flex; gap: 8px; }
.agent-mock .chipset span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px; background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 700; box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); animation: float 7s ease-in-out infinite; }
.agent-mock .chipset span:nth-child(2) { animation-delay: -2s; }
.agent-mock .chipset span i { width: 8px; height: 8px; border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Apps page */
.spot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.spot-card { position: relative; display: block; height: 220px; border-radius: var(--r-xl); overflow: hidden; color: var(--ink); border: 1px solid var(--line); transition: .3s var(--ease); }
.spot-card:hover { transform: translateY(-3px); box-shadow: 0 30px 50px -34px rgba(60,40,120,.55); color: var(--ink); }
.spot-card .mock { bottom: 64px; }
.spot-card .cap { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #fff; border-top: 1px solid var(--line); }
.spot-card .cap b { font-size: 14px; font-weight: 700; }
.spot-card .cap span { font-size: 12px; color: var(--muted); }
.spot-card .cap .btn { margin-left: auto; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.app-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r-md); color: var(--ink); border: 1px solid transparent; transition: .2s var(--ease); min-width: 0; }
.app-item:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow-card); color: var(--ink); }
.app-item .t { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-item .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-soon { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: #F2F0F8; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.tag-new { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: #FFE4E6; color: #E11D48; font-size: 10.5px; font-weight: 700; }

/* Tool detail */
.tool-hero { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: stretch; }
.tool-hero .visual { position: relative; min-height: 260px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }

/* Settings layout */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.subnav { position: sticky; top: calc(var(--top) + 16px); display: grid; gap: 2px; }
.subnav .grp { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 16px 12px 6px; }
.subnav .grp:first-child { padding-top: 0; }
.subnav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: var(--r); color: var(--text); font-size: 13.5px; font-weight: 500; }
.subnav a .ic { width: 17px; height: 17px; color: var(--muted); }
.subnav a:hover { background: #fff; color: var(--ink); }
.subnav a.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,16,36,.05), 0 0 0 1px var(--line); }
.subnav a.is-active .ic { color: var(--brand); }
.avatar-field { display: flex; align-items: center; gap: 16px; }
.qr { width: 184px; height: 184px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr svg { width: 100%; height: 100%; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; padding: 16px; border-radius: var(--r-md); background: var(--soft); }
.session { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.session:first-child { border-top: 0; padding-top: 0; }
.session .tile { background: var(--soft); color: var(--text); }

/* Billing */
.plan-now { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; }
.plan-now > div { padding: 24px; }
.plan-now > div + div { border-left: 1px solid var(--line); }
.plan-name { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.big-num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.fact { padding: 12px; border-radius: var(--r-md); background: #FAF9FF; border: 1px solid var(--line); }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pack { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
.pack .c { font-size: 15px; font-weight: 700; color: var(--ink); }
.pack .p { font-size: 12.5px; color: var(--muted); }
.pack form { margin-left: auto; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.plan.is-featured { border-color: #CDBDFF; box-shadow: 0 0 0 3px rgba(128,82,255,.08), 0 30px 60px -40px rgba(128,82,255,.6); }
.plan .ribbon { position: absolute; top: -11px; left: 24px; }
.plan h3 { font-size: 16px; font-weight: 700; }
.plan .tl { font-size: 12.5px; color: var(--muted); margin-top: 4px; min-height: 38px; }
.plan .price { display: flex; align-items: baseline; gap: 4px; margin: 16px 0 4px; }
.plan .price b { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.plan .price span { font-size: 13px; color: var(--muted); }
.plan .bill { font-size: 12px; color: var(--muted); min-height: 18px; }
.plan .btn { margin: 20px 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .ic { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; }
.save { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--good-soft); color: #15803D; font-size: 11px; font-weight: 700; }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px; background: #0E0C1D; color: #B4AED0; overflow-y: auto; }
.aside-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.aside-brand img { width: 30px; height: 30px; }
.aside-brand b { font-size: 14px; font-weight: 700; }
.aside-brand span { display: block; font-size: 11.5px; color: #8E88AE; font-weight: 500; }
.aside .grp { padding: 16px 10px 6px; font-size: 11px; font-weight: 600; color: #6E6890; letter-spacing: .04em; }
.aside a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; color: #B4AED0; font-size: 13px; font-weight: 500; }
.aside a .ic { width: 17px; height: 17px; color: #7D77A0; }
.aside a:hover { background: rgba(255,255,255,.05); color: #fff; }
.aside a.is-active { background: rgba(128,82,255,.18); color: #fff; }
.aside a.is-active .ic { color: #B9A2FF; }
.aside .foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 8px; padding: 0 32px; background: rgba(250,250,253,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.admin-top .crumb { font-size: 13px; color: var(--muted); font-weight: 500; }
.admin-top .crumb b { color: var(--ink); font-weight: 600; }
.admin-page { padding: 24px 32px 56px; max-width: 1320px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 20px; }
.kpi .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .k .ic { width: 16px; height: 16px; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-top: 8px; line-height: 1.1; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; }
.chart .bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart .bar i { display: block; border-radius: 4px 4px 2px 2px; background: #DCCFFF; min-height: 2px; transition: background .2s; }
.chart .bar:hover i { background: var(--brand); }
.chart .bar:last-child i { background: var(--brand); }
.chart .bar .tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 2; }
.chart .bar:hover .tip { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.ctl-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); }
.ctl-row > .k { font-size: 13px; font-weight: 600; color: var(--ink); }
.ctl-row form { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctl-row form .grow { flex: 1; min-width: 0; }
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pagination .pages { display: flex; gap: 4px; }

/* Auth */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; background: #fff; }
.auth-art { position: relative; overflow: hidden; background: #0B0A18; color: #fff; display: flex; flex-direction: column; padding: 40px 48px; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(55% 45% at 70% 30%, rgba(128,82,255,.42), transparent 65%),
  radial-gradient(45% 40% at 15% 85%, rgba(124,168,255,.2), transparent 65%); animation: drift 20s ease-in-out infinite alternate; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(75% 65% at 55% 40%, #000, transparent); }
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 15px; font-weight: 700; }
.auth-brand img { width: 32px; height: 32px; }
.auth-stage { flex: 1; display: grid; place-items: center; padding: 32px 0; }
.stage { position: relative; width: min(440px, 100%); height: 410px; }
.stage .s-card { position: absolute; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.stage .s-main { left: 40px; right: 40px; top: 0; padding: 16px; box-shadow: 0 60px 100px -40px rgba(0,0,0,.7); }
.stage .s-head { display: flex; align-items: center; gap: 10px; }
.stage .s-head i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #8052FF, #7CA8FF); }
.stage .s-head b { font-size: 12.5px; }
.stage .s-head span { font-size: 11px; color: #948FB4; display: block; font-weight: 500; }
.stage .s-img { height: 150px; margin-top: 12px; border-radius: 12px; background:
  radial-gradient(60% 70% at 30% 30%, rgba(255,214,168,.9), transparent 60%),
  radial-gradient(60% 70% at 80% 80%, rgba(124,168,255,.8), transparent 60%),
  linear-gradient(135deg, #6D3CFF, #2B1A6B); position: relative; overflow: hidden; }
.stage .s-img::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); animation: shimmer 4s ease-in-out infinite; }
.stage .s-txt { margin-top: 12px; font-size: 12.5px; color: #E4DFFF; line-height: 1.5; min-height: 38px; }
.stage .s-txt .caret { display: inline-block; width: 2px; height: 13px; background: #B9A2FF; vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(2) infinite; }
.stage .s-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; font-weight: 600; animation: float 7s ease-in-out infinite; }
.stage .s-chip i { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.stage .s-c1 { left: 0; bottom: 60px; }
.stage .s-c2 { right: 0; bottom: 60px; animation-delay: -3s; }
.stage .s-c2 i { background: #B9A2FF; box-shadow: 0 0 0 4px rgba(185,162,255,.2); }
.stage .s-bar { left: 64px; right: 64px; bottom: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 11.5px; color: #B4AED0; }
.stage .s-bar .prog { flex: 1; height: 5px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.stage .s-bar .prog i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, #8052FF, #7CA8FF); animation: prog 5s var(--ease) infinite; }
@keyframes prog { 0% { width: 8%; } 70%,100% { width: 100%; } }
.auth-copy h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.035em; color: #fff; line-height: 1.15; }
.auth-copy h2 em { font-style: normal; background: linear-gradient(96deg, #9A6BFF, #8F8CFF 55%, #7CA8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy p { color: #B4AED0; font-size: 15px; margin-top: 10px; max-width: 440px; }
.auth-dots { display: flex; gap: 6px; margin-top: 24px; }
.auth-dots i { width: 18px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); }
.auth-dots i.on { width: 28px; background: #fff; }
.auth-form { display: flex; flex-direction: column; padding: 40px 48px; }
.auth-form .top-link { align-self: flex-end; font-size: 13px; color: var(--muted); }
.auth-form .top-link a { font-weight: 600; }
.auth-box { width: min(400px, 100%); margin: auto; padding: 24px 0; }
.auth-box h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.auth-box .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.auth-box form { margin-top: 28px; }
.auth-box .input, .auth-box .btn { height: 44px; }
.auth-box .input-wrap > .trail { height: 36px; width: 36px; }
.auth-box .stack { gap: 14px; }
.oauth { display: grid; gap: 10px; margin-top: 28px; }
.oauth .btn { height: 44px; font-size: 13.5px; }
.oauth .btn .ic { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-size: 12px; color: var(--faint); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or + form { margin-top: 22px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.auth-switch a { font-weight: 600; }
.legal { font-size: 12px; color: var(--faint); text-align: center; margin-top: 24px; line-height: 1.6; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.code-input { text-align: center; font-size: 22px !important; letter-spacing: .4em; font-weight: 700; font-variant-numeric: tabular-nums; }
.pw-meter { display: flex; gap: 4px; margin-top: 2px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .2s; }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: #F87171; }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: #FBBF24; }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: #8B8CFF; }
.pw-meter[data-score="4"] i { background: #22C55E; }
.centered-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.centered-card { width: min(460px, 100%); padding: 36px; text-align: center; }
.centered-card .tile { margin: 0 auto 16px; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-ink); }
.centered-card h1 { font-size: 22px; font-weight: 800; }
.centered-card p { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .tool-row, .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .composer { grid-template-columns: 1fr; }
  .composer-visual { display: none; }
  .composer-main { padding: 6px 8px 0; }
  .feature { grid-template-columns: 1fr; }
  .feature .agent-mock { display: none; }
  .spot { grid-template-columns: 1fr 1fr; }
  .spot-card:nth-child(3) { display: none; }
  .tool-hero { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .aside { position: static; height: auto; }
  .settings { grid-template-columns: 1fr; }
  .subnav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .subnav .grp { display: none; }
  .plan-now { grid-template-columns: 1fr; }
  .plan-now > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .packs { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --rail: 0px; }
  .rail { inset: auto 0 0 0; width: auto; height: 64px; flex-direction: row; padding: 0 8px; border-right: 0; border-top: 1px solid var(--line); }
  .rail-logo, .rail .rail-bottom, .rail-toggle { display: none; }
  html.rail-wide { --rail: 0px; }
  .rail-wide .rail { flex-direction: row; padding: 0 8px; align-items: center; }
  .rail-wide .rail-item { flex-direction: column; height: auto; gap: 4px; padding: 6px 0; font-size: 11px; font-weight: 600; background: none !important; }
  .topbar { gap: 6px; }
  .topbar .btn-admin { display: none; }
  .ws-switch { max-width: 170px; }
  .credit-chip { padding: 0 10px; }
  .btn-upgrade { width: var(--h); padding: 0; }
  .composer-bar .chip, .composer-bar .count { display: none; }
  .composer-bar { justify-content: flex-end; }
  .subnav a { white-space: nowrap; flex: none; }
  .rail nav { display: flex; justify-content: space-around; padding: 0; }
  .rail-item { flex: 1; padding: 6px 0; }
  .main { padding-bottom: 72px; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .announce { margin: 0 16px; }
  .ws-switch .p, .credit-chip .lbl, .btn-upgrade .lbl { display: none; }
  .form-grid, .grid-2-even, .facts { grid-template-columns: 1fr; }
  .tool-row, .app-grid, .plans, .spot, .kpis { grid-template-columns: 1fr; }
  .feature { padding: 28px 24px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .auth-form { padding: 24px 20px; }
  .admin-page, .admin-top { padding-left: 16px; padding-right: 16px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .toolbar .input-wrap, .toolbar .select { max-width: none; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Tool card (list) with JoggAI-style hover ---------- */
.titem { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 76px; padding: 14px 40px 14px 14px;
  border-radius: var(--r-lg); color: var(--ink); overflow: hidden; isolation: isolate; transition: box-shadow .3s var(--ease); }
.titem::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .3s var(--ease);
  background: linear-gradient(105deg, #DFF5F1 0%, #F3F0FF 50%, #FFF1DC 100%); }
.titem-soft { background: #F7F6FB; }
.titem:hover { color: var(--ink); }
.titem:hover::before { opacity: 1; }
.titem .tile { transition: width .35s var(--ease), margin .35s var(--ease), opacity .2s, transform .35s var(--ease); }
.titem:hover .tile { width: 0; margin-right: -14px; opacity: 0; transform: scale(.5); }
.titem-b { display: grid; gap: 2px; min-width: 0; }
.titem .t { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; min-width: 0; }
.titem .d { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.titem-soft .d { -webkit-line-clamp: 1; }
.titem .go { position: absolute; right: 14px; top: 50%; display: grid; color: var(--muted); opacity: 0; transform: translate(-8px, -50%); transition: opacity .25s, transform .3s var(--ease); }
.titem:hover .go { opacity: 1; transform: translate(0, -50%); }

/* ---------- Coverflow slideshow ---------- */
.cflow { position: relative; height: 300px; margin: 4px 0 8px; }
.cflow-track { position: absolute; inset: 0 64px; }
.cflow-slide { position: absolute; top: 30px; left: 50%; width: min(440px, 46%); height: 236px; border-radius: var(--r-xl); overflow: hidden;
  background: #fff; color: #fff; box-shadow: 0 24px 40px -30px rgba(30,20,70,.45);
  transform: translateX(-50%) scale(.7); opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .45s, top .6s var(--ease), height .6s var(--ease), box-shadow .6s; }
.cflow-slide:hover { color: #fff; }
.cflow-slide .mock { inset: 0; }
.cflow-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20,16,36,.78)); pointer-events: none; }
.cflow-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.cflow-cap .nm { font-size: 16px; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.cflow-try { opacity: 0; transform: translateY(6px); transition: .35s var(--ease); background: #fff; }
.cflow-slide.is-prev, .cflow-slide.is-next { opacity: 1; pointer-events: auto; transform: translateX(var(--x)) scale(.86); top: 46px; height: 206px; z-index: 1; }
.cflow-slide.is-prev { --x: -112%; }
.cflow-slide.is-next { --x: 12%; }
.cflow-slide.is-center { opacity: 1; pointer-events: auto; z-index: 3; top: 10px; height: 260px; transform: translateX(-50%) scale(1);
  box-shadow: 0 40px 70px -34px rgba(30,20,70,.6), 0 0 0 1px rgba(20,16,36,.04); }
.cflow-slide.is-center .cflow-try { opacity: 1; transform: none; }
.cflow-slide.is-center .cflow-cap .nm { font-size: 19px; }
.cflow-nav { position: absolute; top: 50%; z-index: 4; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(30,20,70,.3); transition: .2s; }
.cflow-nav:hover { color: var(--ink); border-color: #CFC6F2; }
.cflow-nav.prev { left: 8px; }
.cflow-nav.next { right: 8px; }

/* ---------- Large two-panel popup ---------- */
dialog.xmodal { width: min(1100px, calc(100vw - 48px)); height: min(680px, calc(100vh - 48px)); max-width: none; max-height: none; padding: 0; border: 0;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-dialog); color: var(--text); }
dialog.xmodal[open] { display: grid; grid-template-columns: 252px minmax(0, 1fr); animation: dialog-in .25s var(--ease); }
dialog.xmodal::backdrop { background: rgba(20,16,36,.45); backdrop-filter: blur(3px); }
.xm-side { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; background: #F7F7FA;
  background-image: radial-gradient(rgba(20,16,36,.07) 1px, transparent 1px); background-size: 18px 18px; border-right: 1px solid var(--line); }
.xm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.xm-brand .ic { color: var(--brand); }
.xm-nav { display: grid; gap: 4px; }
.xm-nav button { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none;
  color: var(--text); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.xm-nav button .ic { color: var(--muted); }
.xm-nav button:hover { background: rgba(20,16,36,.04); color: var(--ink); }
.xm-nav button.is-active { background: #ECEBF2; color: var(--ink); font-weight: 600; }
.xm-nav button.is-active .ic { color: var(--brand); }
.xm-blank { margin-top: auto; height: 44px; }
.xm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 26px 32px 0; background: #fff; }
.xm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xm-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.xm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.xm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.xm-chips button { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s; }
.xm-chips button:hover { background: var(--soft); color: var(--ink); }
.xm-chips button.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.xm-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-content: start; padding: 18px 2px 28px; }
.xm-card { display: grid; gap: 10px; color: var(--ink); min-width: 0; }
.xm-card:hover { color: var(--ink); }
.xm-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.xm-card:hover .xm-thumb { transform: translateY(-3px); box-shadow: 0 22px 36px -26px rgba(30,20,70,.55); }
.xm-flag { position: absolute; top: 10px; left: 10px; z-index: 2; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 6px;
  background: rgba(20,16,36,.72); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.xm-cap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xm-cap .n { display: block; font-size: 13.5px; font-weight: 700; }
.xm-cap .d { display: block; font-size: 12px; color: var(--muted); }
.xm-empty { grid-column: 1 / -1; }
@media (max-width: 900px) {
  dialog.xmodal[open] { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .xm-side { flex-direction: row; overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .xm-brand, .xm-blank { display: none; }
  .xm-nav { display: flex; }
  .xm-nav button { white-space: nowrap; }
  .xm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xm-main { padding: 18px 18px 0; }
  .cflow-slide { width: 70%; }
  .cflow-slide.is-prev, .cflow-slide.is-next { opacity: 0; pointer-events: none; }
}
@media (max-width: 560px) { .xm-grid { grid-template-columns: 1fr; } .cflow { height: 260px; } .cflow-track { inset: 0 44px; } .cflow-slide { width: 100%; } }

/* Slides and popup thumbs: recompose the small mock-ups for their frame */
.cflow-slide::after { background: linear-gradient(180deg, transparent 56%, rgba(20,16,36,.6)); }
.cflow-slide .mock-social .post { left: 16%; top: 24px; width: 36%; }
.cflow-slide .mock-social .sched { right: 13%; top: 40px; bottom: auto; }
.cflow-slide .mock .doc { left: 16%; right: 16%; top: 24px; }
.cflow-slide .mock .frame { left: 16%; right: 16%; top: 22px; height: 56%; }
.cflow-slide .mock .timeline, .cflow-slide .mock .playhead { display: none; }
.cflow-slide .mock .tiles { inset: 22px 16% 70px; }
.xm-thumb .mock-social .post { left: 12px; top: 14px; width: 44%; padding: 8px; }
.xm-thumb .mock-social .post .ph { height: 52px; }
.xm-thumb .mock-social .sched { right: 12px; top: 18px; bottom: auto; gap: 5px; }
.xm-thumb .mock-social .sched span { height: 22px; padding: 0 7px; font-size: 9.5px; }
.xm-thumb .mock .doc { left: 16px; right: 16px; top: 16px; }
.xm-thumb .mock .frame { left: 16px; right: 16px; top: 14px; height: 58%; }
.xm-thumb .mock .timeline { left: 16px; right: 16px; bottom: 12px; }
.xm-thumb .mock .timeline i { height: 16px; }
.xm-thumb .mock .playhead { bottom: 8px; height: 26px; }
.xm-thumb .mock .tiles { inset: 14px; }
