:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #1A1714;
  --muted: #5E574E;
  --faint: #9C9488;
  --line: #E7E2D8;
  --line-strong: #D8D1C4;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-soft: #FBE9DF;
  --accent-light: #F28A4B;
  --nav: #1A1714;
  --nav-ink: #D9D3C7;
  --nav-active: #2E2924;
  --nav-line: #2E2924;
  --ok: #15803D;
  --ok-soft: #DCFCE7;
  --warn: #A16207;
  --warn-soft: #FEF3C7;
  --bad: #B91C1C;
  --bad-soft: #FEE2E2;
  --info: #1D4ED8;
  --info-soft: #DBEAFE;
  --radius: 16px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --text: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--text); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-hover); }
a:hover { color: #7C2D12; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 32px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.shell { min-height: 100vh; display: flex; }
.nav { flex: 0 0 248px; background: var(--nav); color: var(--nav-ink); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; flex: 0 0 32px; }
.brand-name { font-family: var(--display); font-size: 19px; font-weight: 700; white-space: nowrap; }
.account-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--nav-line); border-radius: 12px; background: #221E1A; color: #fff; text-decoration: none; }
.account-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #F28A4B, #C2410C); flex: 0 0 32px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.account-chip small { display: block; color: var(--faint); font-size: 12px; }
.account-chip strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > span { padding: 0 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--nav-ink); text-decoration: none; font-size: 14px; }
.nav-link:hover { background: #221E1A; color: #fff; }
.nav-link[aria-current="page"] { background: var(--nav-active); color: #fff; font-weight: 600; }
.nav-link[aria-current="page"] svg { stroke: var(--accent-light); }
.nav-link .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.nav-bottom { margin-top: auto; }
.nav-user { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 12px; border-top: 1px solid var(--nav-line); font-size: 13px; }
/* Two lines, so nothing runs off the menu: the name with Sair, then the
   terms and the language. */
.nav-user > span:first-child { flex: 1 1 calc(100% - 70px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user button { order: 1; }
.nav-user a, .nav-user .lang-switch { order: 2; }
.nav-user button { background: none; border: 0; color: var(--nav-ink); cursor: pointer; text-decoration: underline; padding: 4px; }
.topbar { display: none; }
.main { flex: 1 1 auto; min-width: 0; padding: 36px 40px 64px; display: flex; flex-direction: column; gap: 28px; max-width: 1280px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .nav { position: fixed; inset: 0 auto 0 0; width: 280px; height: 100vh; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .nav { transform: none; box-shadow: 0 0 0 100vmax rgba(26, 23, 20, .45); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; min-width: 44px; min-height: 44px; cursor: pointer; }
  .main { padding: 24px 16px 48px; gap: 20px; }
  h1 { font-size: 26px; }
}

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stat { gap: 6px; padding: 20px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { font-family: var(--display); font-size: 30px; font-weight: 600; }
.stat small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty strong { color: var(--ink); font-size: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn-ghost { background: none; border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-hover); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent-light); outline-offset: 0; border-color: var(--accent); }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 12px; cursor: pointer; text-align: left; background: var(--surface); border: 1px solid var(--line-strong); }
.choice[aria-pressed="true"] { background: var(--accent-soft); border: 2px solid var(--accent); padding: 15px; }
.choice strong { font-size: 14px; }
.choice span { font-size: 13px; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.switch { position: relative; flex: 0 0 44px; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: #CFC7B8; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { left: 21px; }
.error-text { color: var(--bad); font-size: 13px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EFEBE3; color: var(--muted); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.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: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-hover); }

/* Lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1 1 auto; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 56px; height: 70px; border-radius: 8px; background: var(--nav); object-fit: cover; flex: 0 0 56px; display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.clickable { cursor: pointer; border-radius: 12px; }
.clickable:hover { background: #FBF9F5; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 44px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { margin-left: 6px; font-size: 12px; color: var(--faint); }
.checklist { display: flex; flex-direction: column; gap: 10px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.check-row .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: 0 0 22px; display: grid; place-items: center; }
.check-row.done .dot { background: var(--ok); border-color: var(--ok); }
.check-row .grow { flex: 1; min-width: 0; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: #1E3A8A; font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: #713F12; }
.notice.bad { background: var(--bad-soft); color: #7F1D1D; }
.kbd { font-family: ui-monospace, monospace; font-size: 13px; background: #EFEBE3; padding: 2px 6px; border-radius: 6px; }

/* Instagram preview */
.preview-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; position: sticky; top: 24px; }
.phone { width: 340px; max-width: 100%; border-radius: 36px; background: #000; padding: 10px; box-shadow: 0 24px 48px rgba(26, 23, 20, .18); }
.phone-screen { border-radius: 28px; overflow: hidden; background: #fff; color: #000; font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 13px; }
.ig-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-weight: 600; }
.ig-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.ig-avatar { width: 32px; height: 32px; border-radius: 50%; padding: 2px; background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); flex: 0 0 32px; }
.ig-avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--nav); border: 2px solid #fff; color: #fff; font-size: 11px; font-weight: 700; }
.ig-media { width: 100%; aspect-ratio: 4 / 5; background: #1A1714; display: grid; place-items: center; color: #9C9488; object-fit: cover; }
.ig-carousel { position: relative; }
.ig-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ig-carousel-track::-webkit-scrollbar { display: none; }
.ig-carousel-track > .ig-media { flex: 0 0 100%; scroll-snap-align: start; }
.ig-count { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 12px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 600; }
.ig-nav { position: absolute; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #000; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.ig-nav.prev { left: 8px; } .ig-nav.prev svg { rotate: 180deg; }
.ig-nav.next { right: 8px; }
.ig-nav:disabled { display: none; }
.ig-dots { display: flex; justify-content: center; gap: 4px; padding-top: 8px; }
.ig-dots span { width: 6px; height: 6px; border-radius: 50%; background: #C7C7C7; }
.ig-dots span.on { background: #0095F6; }
.slide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slide-list figure { margin: 0; display: grid; gap: 4px; font-size: 12px; }
.slide-list img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ig-actions { display: flex; gap: 14px; padding: 10px 12px 4px; }
.ig-actions svg { width: 24px; height: 24px; }
.ig-caption { padding: 2px 12px 4px; white-space: pre-wrap; word-break: break-word; }
.ig-caption.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ig-meta { padding: 2px 12px 14px; color: #737373; font-size: 12px; }
.ig-tag { color: #00376B; }
.reel { position: relative; aspect-ratio: 9 / 16; background: #111; color: #fff; }
.reel video, .reel .reel-placeholder { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; text-align: center; padding: 24px; }
.reel-overlay { position: absolute; left: 0; right: 56px; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); display: flex; flex-direction: column; gap: 6px; font-size: 13px; pointer-events: none; }
.reel-side { position: absolute; right: 10px; bottom: 70px; display: flex; flex-direction: column; gap: 18px; align-items: center; pointer-events: none; }
.reel-side svg { width: 26px; height: 26px; }
.story { position: relative; aspect-ratio: 9 / 16; background: #111; color: #fff; }
.story > img, .story > video, .story .reel-placeholder { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; text-align: center; }
.story-top { position: absolute; inset: 0 0 auto; padding: 10px 12px 24px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.story-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-bar span { display: block; width: 40%; height: 100%; background: #fff; }
.story-top .ig-avatar { width: 28px; height: 28px; flex-basis: 28px; }
.story-when { color: rgba(255, 255, 255, .75); }
.story-reply { position: absolute; inset: auto 0 0; padding: 12px; display: flex; align-items: center; gap: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .45)); pointer-events: none; }
.story-reply span { flex: 1; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; font-size: 12px; }
.reel-label { position: absolute; top: 12px; left: 14px; font-weight: 700; font-size: 18px; }
.ig-profile { padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.ig-profile-top { display: flex; align-items: center; gap: 20px; }
.ig-profile-top .ig-avatar { width: 72px; height: 72px; flex-basis: 72px; }
.ig-profile-top .ig-avatar span { font-size: 22px; }
.ig-counts { display: flex; gap: 16px; text-align: center; flex: 1; justify-content: space-around; }
.ig-counts strong { display: block; font-size: 15px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-grid > * { aspect-ratio: 4 / 5; background: #E5E1DA; object-fit: cover; width: 100%; }
.ig-grid .is-new { outline: 3px solid var(--accent); outline-offset: -3px; }

/* Overlays */
.modal-backdrop { position: fixed; inset: 0; background: rgba(26, 23, 20, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }
.modal.wide { width: min(980px, 100%); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 60; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; max-width: 420px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.bad { background: var(--bad); }
.toast.ok { background: #14532D; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--nav); color: var(--nav-ink); padding: 48px; display: flex; flex-direction: column; gap: 32px; justify-content: center; }
.auth-side h2 { color: #fff; font-size: 34px; line-height: 1.15; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-side li { display: flex; gap: 12px; }
.auth-side li::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--accent-light); }
.auth-form { padding: 48px; display: flex; align-items: center; justify-content: center; }
.auth-form form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { padding: 32px 16px; } .auth-form { padding: 32px 16px; } }

/* Steps */
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EFEBE3; font-size: 12px; }
.step.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.step.on b { background: var(--ink); color: #fff; }
.step.done b { background: var(--ok); color: #fff; }
.dm-preview { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-break: break-word; }
.bubble.them { background: #EFEFEF; align-self: flex-start; }
.bubble.me { background: #3797F0; color: #fff; align-self: flex-end; }
.bubble-btn { align-self: flex-end; border: 1px solid #DBDBDB; border-radius: 12px; padding: 8px 14px; color: #3797F0; font-weight: 600; }
.loading { display: grid; place-items: center; padding: 48px; color: var(--muted); }

/* Landing */
.landing { min-height: 100vh; background: var(--bg); }
.landing-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.landing-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 40px; background: var(--nav); }
.landing-top nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.landing-top nav a:not(.btn) { color: var(--nav-ink); text-decoration: none; font-size: 14px; }
.landing-top nav a.strong { color: #fff; font-weight: 600; }
.landing-hero { background: var(--nav); color: var(--nav-ink); padding: 56px 0 72px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between; }
.hero-grid > .stack { flex: 1 1 460px; }
.hero-grid h1 { color: #fff; font-size: 52px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.lead { font-size: 18px; line-height: 1.6; }
.hero-phone { flex: 0 1 340px; display: flex; justify-content: center; }
.btn-ghost-dark { background: transparent; color: #fff; border-color: #4A423A; }
.btn-ghost-dark:hover { color: #fff; border-color: #fff; }
.landing-art { aspect-ratio: 4 / 5; background: var(--nav); color: #F6F4EF; padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.landing-art .bar { width: 44px; height: 5px; background: var(--accent-light); }
.landing-art small { font-size: 11px; letter-spacing: .1em; color: var(--accent-light); }
.landing-art strong { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.landing-main { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 64px; }
.landing-main h2 { font-size: 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature-n { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.step-item { display: flex; gap: 14px; }
.step-item b { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.period { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.period button { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: 14px; }
.period button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; width: 100%; text-align: left; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.plan.featured { border: 2px solid var(--accent); padding: 27px; }
.plan h3 { font-family: var(--display); font-size: 20px; }
.plan .price { font-family: var(--display); font-size: 40px; font-weight: 600; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 14px; }
.plan li svg { flex: 0 0 18px; margin-top: 1px; }
.faq { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin-top: 8px; }
.landing-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .landing-top { padding: 14px 16px; }
  .landing-top nav a:not(.btn):not(.strong) { display: none; }
  .hero-grid h1 { font-size: 36px; }
  .landing-hero { padding: 40px 0 56px; }
}
.code-box { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.code-box code { flex: 1; min-width: 0; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; white-space: pre-wrap; }

.landing[data-period="month"] .plan [data-period="year"], .landing[data-period="year"] .plan [data-period="month"] { display: none; }
.why { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.why li { line-height: 1.55; color: var(--muted); }
.why strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Notifications */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--nav-ink); cursor: pointer; }
.bell:hover { background: #221E1A; color: #fff; }
.bell-count { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-panel { position: fixed; z-index: 60; max-height: min(480px, calc(100vh - 96px)); overflow-y: auto; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(26, 23, 20, .18); }
.notif-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; background: inherit; border-bottom: 1px solid var(--line); }
.notif-list { list-style: none; margin: 0; padding: 4px; }
.notif { display: flex; gap: 10px; width: 100%; padding: 12px; border: 0; border-radius: 10px; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.notif:hover { background: var(--bg); }
.notif-dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.notif.unread .notif-dot { background: var(--accent); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.notif-body span { color: var(--muted); }
.notif-body small { color: var(--faint); font-size: 12px; }
.notif:not(.unread) strong { font-weight: 500; }
.notif-empty { padding: 20px 16px; color: var(--muted); font-size: 14px; }

/* Brand kit */
.brand-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.color-swatch { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; }
.brand-previews { display: grid; grid-template-columns: 1fr 0.6fr; gap: 16px; align-items: end; }
.brand-previews figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.brand-preview { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.brand-preview.story { aspect-ratio: 9 / 16; }
.brand-ai { margin-bottom: 20px; border-color: var(--accent-light, var(--line-strong)); }
.brand-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.brand-option { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.brand-option:hover { transform: translateY(-2px); }
.brand-option.on { border-color: var(--accent); }
.brand-option-art { aspect-ratio: 4 / 3; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.brand-option-art .bar { width: 34px; height: 4px; border-radius: 2px; }
.brand-option-art .name { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.brand-option-art strong { font-size: 19px; line-height: 1.15; margin-top: auto; }
.brand-option-art .sub { font-size: 12px; }
.brand-option.skeleton { min-height: 260px; background: linear-gradient(100deg, var(--bg) 30%, var(--line) 50%, var(--bg) 70%); background-size: 200% 100%; animation: brand-shimmer 1.2s linear infinite; }
@keyframes brand-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .brand-option.skeleton { animation: none; } .brand-option:hover { transform: none; } }
@media (min-width: 901px) { .brand-preview-card { position: sticky; top: 16px; align-self: start; } }
.field .label { font-size: 14px; font-weight: 600; }

/* Review: format filter */
.kind-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 6px; }
.kind-filter .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.kind-filter .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.kind-filter .chip .count { font-size: 12px; opacity: .7; }
.quota-line { margin-top: -16px; }
.quota-line.bad { color: var(--bad); font-weight: 600; }

/* Guides */
.guide { border: 1px solid var(--line); border-radius: 12px; background: var(--warn-soft); color: #713F12; }
.guide.bad { background: var(--bad-soft); color: #7F1D1D; }
.guide summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 14px; }
.guide-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.guide-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-body .muted { color: inherit; opacity: .85; }

/* Review: bulk actions */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 6px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.bulk-bar .check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.select-box { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--accent); cursor: pointer; }
.brand-logo { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line, #ddd); }
.swatch-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.notice .btn-sm { margin-left: 8px; }
.ai-section h3 { margin: 0; font-size: 15px; }
.ai-section { display: flex; flex-direction: column; gap: 8px; }

/* Landing v2: hero flow, AI strip and product showcases. */
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; background: #2E2924; color: var(--accent-light); font-size: 13px; font-weight: 600; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); animation: pulse 1.8s ease-in-out infinite; flex: none; }
.pulse-dot.green { background: #4ADE80; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.hero-grid h1 .hl { color: var(--accent-light); }
.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: #B9B1A4; }
.hero-trust li::before { content: "✓ "; color: #4ADE80; font-weight: 700; }
.hero-visual { flex: 1 1 420px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.flow-card { width: 100%; max-width: 480px; background: #231F1B; border: 1px solid #3A332C; border-radius: 20px; padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.flow-head { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9C9488; font-weight: 600; margin-bottom: 16px; }
.flow-head .live { display: inline-flex; align-items: center; gap: 6px; color: #4ADE80; }
.flow-row { display: flex; align-items: center; gap: 6px; }
.flow-col { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.chip-flow { display: flex; align-items: center; gap: 8px; background: #2E2924; border-radius: 12px; padding: 8px 10px; font-size: 12px; color: #F6F4EF; min-width: 0; }
.chip-flow b { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #3A332C; font-size: 13px; }
.chip-flow.out b { background: rgba(242, 138, 75, .18); color: var(--accent-light); }
.chip-flow span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chip-flow small { color: #9C9488; font-size: 10px; }
.flow-line { flex: 0 0 18px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent-light) 0 6px, transparent 6px 10px); background-size: 20px 2px; animation: dash 1s linear infinite; }
@keyframes dash { to { background-position: 20px 0; } }
.flow-core { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; flex: none; }
.flow-core .core { position: relative; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent-light), var(--accent)); box-shadow: 0 10px 30px rgba(242, 138, 75, .35); }
.flow-core .core-glow { position: absolute; top: -6px; width: 70px; height: 70px; border-radius: 20px; background: rgba(242, 138, 75, .25); filter: blur(10px); animation: pulse 2.4s ease-in-out infinite; }
.flow-core small { font-size: 10px; color: #9C9488; text-align: center; line-height: 1.3; }
.flow-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 12px; color: #9C9488; }
.hero-shot { position: relative; width: 210px; margin-top: -8px; transform: rotate(-3deg); }
.hero-shot img { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.hero-shot .tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; background: #FEF3C7; color: #713F12; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.ai-strip { background: #231F1B; color: #B9B1A4; padding: 18px 0; border-top: 1px solid #2E2924; }
.ai-strip .landing-wrap { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; justify-content: center; }
.ai-strip p { font-size: 13px; }
.ai-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ai-strip li { padding: 5px 12px; border: 1px solid #3A332C; border-radius: 999px; font-size: 13px; color: #F6F4EF; font-weight: 500; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.showcase.reverse .showcase-copy { order: 2; }
.showcase-copy { display: flex; flex-direction: column; gap: 14px; }
.showcase-copy h2 { font-size: 34px; line-height: 1.1; }
.showcase-visual { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 10px; }
.ticks svg { flex: 0 0 18px; margin-top: 2px; }
.mock { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 18px 50px rgba(26, 23, 20, .08); }
.mock-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.prompt-mock .typed { margin: 8px 0 14px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 14px; }
.mock-btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 10px; }
.arrow-down { font-size: 22px; color: var(--accent); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.phone-mini { width: 230px; padding: 8px; background: #111; border-radius: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.phone-mini img { width: 100%; height: auto; display: block; border-radius: 15px; }
.formats { display: flex; flex-direction: column; gap: 28px; }
.format-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; }
.format-grid figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.format-grid img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 12px 30px rgba(26, 23, 20, .12); }
.format-grid figcaption { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.format-grid figcaption strong { color: var(--ink); font-size: 15px; font-family: var(--display); }
.stack-imgs { position: relative; }
.stack-imgs img:first-child { position: absolute; inset: 0; transform: translate(10px, -10px) rotate(3deg); opacity: .7; }
.stack-imgs img:last-child { position: relative; }
.reel-frame { position: relative; }
.reel-frame .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 18px; }
.kit-mock { display: flex; flex-direction: column; gap: 16px; }
.kit-top { display: flex; gap: 12px; align-items: center; }
.kit-top small { display: block; color: var(--muted); font-size: 12px; }
.kit-logo { width: 46px; height: 46px; border-radius: 50%; background: #1B2B24; color: #E3A857; display: grid; place-items: center; font-weight: 700; font-family: var(--display); border: 2px solid #A9C7B4; }
.swatches { display: flex; gap: 10px; }
.swatches span { flex: 1; height: 54px; border-radius: 12px; border: 1px solid var(--line); }
.kit-rules { font-size: 14px; color: var(--muted); font-style: italic; }
.kit-ok { width: fit-content; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.chat-mock { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; }
.bubble.comment { background: #F1EEE8; align-self: flex-start; }
.bubble.dm { background: linear-gradient(135deg, #7C3AED, #DB2777); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.reply { background: #F1EEE8; align-self: flex-start; font-size: 13px; }
.chat-arrow { align-self: center; font-size: 11px; color: var(--muted); }
.review-mock { display: flex; flex-direction: column; gap: 10px; }
.review-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.review-tabs span { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.review-tabs .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.review-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.review-row .thumb { flex: none; width: 44px; height: 55px; border-radius: 8px; background-size: cover; background-position: center; }
.review-row div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.review-row small { color: var(--muted); }
.st { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.st.wait { background: var(--warn-soft); color: var(--warn); }
.st.sched { background: var(--info-soft); color: var(--info); }
.st.ok { background: var(--ok-soft); color: var(--ok); }
.review-quota { font-size: 12px; color: var(--muted); }
.term-mock { background: #1A1714; border-color: #2E2924; color: #E7E2D8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.term-bar { display: flex; gap: 6px; margin-bottom: 4px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3A332C; }
.term-mock .you { color: var(--accent-light); font-weight: 700; margin-right: 6px; }
.term-mock .agent { color: #4ADE80; font-weight: 700; margin-right: 6px; }
.term-mock .tool { color: #9C9488; padding-left: 12px; }
.final-cta { text-align: center; background: var(--nav); color: var(--nav-ink); border-radius: 24px; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final-cta h2 { color: #fff; font-size: 32px; max-width: 640px; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot, .flow-line, .core-glow, .arrow-down { animation: none; }
}
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .showcase.reverse .showcase-copy { order: 0; }
  .showcase-copy h2 { font-size: 28px; }
  .format-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .flow-card { padding: 14px; }
  .chip-flow { font-size: 11px; padding: 6px; gap: 6px; }
  .chip-flow b { width: 22px; height: 22px; }
  .chip-flow small { display: none; }
  .flow-core .core { width: 46px; height: 46px; }
  .flow-line { flex-basis: 8px; }
  .final-cta h2 { font-size: 26px; }
}

/* Help chat */
.help-widget { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; }
.help-fab { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(26, 23, 20, .25); }
.help-fab:hover { background: var(--accent-hover, #9A3412); }
.help-panel { width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(26, 23, 20, .25); }
.help-panel[hidden], .help-fab[hidden] { display: none; }
.help-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--nav); color: #fff; }
.help-head .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.help-head small { color: var(--nav-ink); font-size: 12px; }
.help-icon { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: grid; place-items: center; }
.help-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.help-msg { margin: 0; max-width: 86%; padding: 10px 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-msg.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.help-msg.mine { align-self: flex-end; background: var(--ink); color: var(--surface); border-radius: 14px 14px 4px 14px; }
.help-msg.bad { border-color: var(--bad, #B91C1C); color: var(--bad, #B91C1C); }
.help-msg.typing { display: inline-flex; gap: 5px; align-items: center; min-height: 20px; }
.help-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #8A8378); animation: help-dot 1s ease-in-out infinite; }
.help-msg.typing span:nth-child(2) { animation-delay: .15s; }
.help-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes help-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .help-msg.typing span { animation: none; } }
.help-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.help-form { display: flex; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--line); }
.help-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; background: var(--surface); color: var(--ink); }
.help-left { margin: 0; padding: 0 14px 10px; font-size: 12px; }
@media (max-width: 600px) { .help-widget { right: 12px; bottom: 12px; } .help-fab span { display: none; } .help-fab { padding: 0 14px; } }

/* Admin: help assistant providers */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.provider-card { border: 2px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.provider-card.on { border-color: var(--accent); }
.provider-card input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); }
.provider-fields { display: flex; flex-direction: column; gap: 10px; }

/* Help chat: Markdown answers */
.help-msg.md { white-space: normal; display: flex; flex-direction: column; gap: 8px; }
.help-msg.md p, .help-msg.md ul, .help-msg.md ol, .help-msg.md pre { margin: 0; }
.help-msg.md ul, .help-msg.md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.help-msg.md a { color: var(--accent-hover); font-weight: 600; text-decoration: underline; }
.help-msg.md code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.help-msg.md pre { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; }
.help-msg.md pre code { background: none; padding: 0; }
.help-msg.md .md-media { display: block; }
.help-msg.md img, .help-msg.md video { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.help-panel.wide { width: min(760px, calc(100vw - 24px)); height: calc(100vh - 40px); }
.help-panel.wide .help-msg { max-width: 92%; font-size: 15px; }
.help-panel.wide .help-msg.md img, .help-panel.wide .help-msg.md video { max-height: 460px; }

/* AI credits */
.credit-balance { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.credit-number { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; }
.credit-costs { flex: 0 1 300px; list-style: none; margin: 0; padding: 0; }
.credit-costs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.credit-pack { flex: 1 1 120px; min-height: 72px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; }
.credit-pack.on { border-color: var(--accent); }
.credit-plus { color: var(--ok); }

/* Language picker: in the side menu's footer and on the sign-in page. */
.lang-switch { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12px; opacity: .8; cursor: pointer; }
.lang-switch option { color: #111; }
.auth-lang { position: fixed; top: 14px; right: 16px; z-index: 5; }

/* AI credits balance, under the logo in the side menu. */
.credits-chip { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(194, 65, 12, .16); color: #FDBA8C; font-size: 13px; font-weight: 600; text-decoration: none; }
.credits-chip:hover { background: rgba(194, 65, 12, .26); }
