: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;
  /* Text on the soft backgrounds above, accent text and links. */
  --ok-ink: #14532D;
  --warn-ink: #713F12;
  --bad-ink: #7F1D1D;
  --info-ink: #1E3A8A;
  --accent-text: #C2410C;
  --link: #9A3412;
  --link-hover: #7C2D12;
  /* Neutral fills: chips and badges, row hover, the switch off, chat bubbles. */
  --chip: #EFEBE3;
  --hover: #FBF9F5;
  --switch-off: #CFC7B8;
  --bubble: #F1EEE8;
  /* Text on a fill of var(--ink) (pressed pills, toasts). */
  --on-ink: #fff;
  --radius: 16px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --text: Inter, system-ui, sans-serif;
  color-scheme: light;
}

/* Dark theme (theme-boot.js sets data-theme). The side menu is already dark;
   Instagram previews and brand art keep their own colours. */
:root[data-theme="dark"] {
  --bg: #14110F;
  --surface: #1F1B18;
  --ink: #EDE8E0;
  --muted: #B5AC9F;
  --faint: #978E82;
  --line: #342E29;
  --line-strong: #4A423A;
  --accent-soft: #3A2216;
  --nav: #1A1714;
  --nav-active: #2E2924;
  --ok: #4ADE80;
  --ok-soft: #12301F;
  --warn: #FBBF24;
  --warn-soft: #33270B;
  --bad: #F87171;
  --bad-soft: #3B1616;
  --info: #93C5FD;
  --info-soft: #172338;
  --ok-ink: #BBF7D0;
  --warn-ink: #FDE68A;
  --bad-ink: #FECACA;
  --info-ink: #BFDBFE;
  --accent-text: #F28A4B;
  --link: #F5A06B;
  --link-hover: #FDBA8C;
  --chip: #2E2924;
  --hover: #262220;
  --switch-off: #5A5047;
  --bubble: #2E2924;
  --on-ink: #14110F;
  color-scheme: dark;
}
:root[data-theme="dark"] .nav { border-right: 1px solid var(--line); }

* { 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(--link); }
a:hover { color: var(--link-hover); }
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 260px; background: var(--nav); color: var(--nav-ink); padding: 24px 8px 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #3A342E transparent; scrollbar-gutter: stable; }
.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-parent { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.nav-parent.has-current { color: #fff; }
.nav-parent.has-current svg { stroke: var(--accent-light); }
.nav-chevron { margin-left: auto; display: flex; transition: transform .15s; }
.nav-parent .count + .nav-chevron { margin-left: 8px; }
.nav-parent[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 23px; padding-left: 12px; border-left: 1px solid #2E2925; }
.nav-sublink { min-height: 36px; font-size: 13px; }
@media (min-width: 901px) { .tabs.stage-tabs { display: none; } }
/* On a phone the stages wrap: scrolling sideways hid the last ones with no hint. */
@media (max-width: 900px) { .tabs.stage-tabs { flex-wrap: wrap; overflow-x: visible; } }
.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 > .nav-user-name { order: 0; flex: 1 1 calc(100% - 70px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nav-ink); text-decoration: none; }
.nav-user > .nav-user-name:hover { text-decoration: underline; }
.nav-user button { order: 1; }
.nav-user a, .nav-user .lang-switch, .nav-user .theme-switch { order: 2; }
.nav-user button { background: none; border: 0; color: var(--nav-ink); cursor: pointer; text-decoration: underline; padding: 4px; }
/* Touch-sized account links and pickers in the phone's side menu. */
@media (max-width: 900px) { .nav-user > * { min-height: 36px; } .nav-user > a { line-height: 36px; } .nav-user button { min-width: 44px; } }
.topbar { display: none; }
.page { display: flex; flex-direction: column; gap: 28px; }
.main { flex: 1 1 auto; min-width: 0; padding: 36px 40px 64px; display: flex; flex-direction: column; gap: 28px; max-width: 1280px; width: 100%; margin-inline: auto; }
.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; }
/* On a phone a page's actions share one row instead of stacking. */
@media (max-width: 600px) { .page-head > .actions { width: 100%; } .page-head > .actions > .btn { flex: 1 1 auto; padding-inline: 12px; } }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .nav { position: fixed; inset: 0 auto 0 0; width: 280px; height: 100vh; z-index: 45; 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; }
  .page { 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; }
/* A phone has no room for a wide frame around every card. */
@media (max-width: 600px) { .card { padding: 16px; } }
.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(--link); 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; }
.routine-form { display: grid; gap: 16px 32px; grid-template-areas: "when" "what" "after"; }
.routine-form .rf-when { grid-area: when; } .routine-form .rf-what { grid-area: what; } .routine-form .rf-after { grid-area: after; }
@media (min-width: 900px) { .routine-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "when what" "after what"; grid-template-rows: auto 1fr; align-items: start; } }
.wrap-any { overflow-wrap: anywhere; }
.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: var(--on-ink); 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: var(--switch-off); }
.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: var(--chip); color: var(--muted); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* A label of any length (how a draft was made): it wraps instead of leaving its box. */
.badge-long { white-space: normal; border-radius: 10px; min-width: 0; }
.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(--link); }

/* 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; }
/* On a phone the name wraps: cut with an ellipsis, it hid the status badge after it. */
@media (max-width: 600px) { .auto-row { flex-wrap: wrap; } .auto-row .grow { flex-basis: 100%; } .auto-row .title { white-space: normal; overflow-wrap: anywhere; } }
/* Draft grid (Publicações): one tile per draft, two columns on a phone. */
.draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.draft-grid > .empty { grid-column: 1 / -1; }
.draft-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.draft-tile-media { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--nav); display: grid; place-items: center; color: var(--faint); }
.draft-tile-media img, .draft-tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.draft-tile-media .select-box { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; }
.draft-tile-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 0 4px 4px; }
.draft-tile-body > * { max-width: 100%; }
.draft-tile .title, .draft-tile .origin { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.draft-tile .title { font-weight: 600; }
.draft-tile .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.draft-tile .badge { white-space: normal; border-radius: 10px; }
.draft-tile .approval-note { margin-top: 2px; }
.draft-tile .approval-note-comment { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@media (max-width: 640px) {
  .draft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .draft-tile { padding: 6px; }
}
.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: var(--hover); }
.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); }
.list-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.list-filters .input { flex: 1 1 220px; }
.list-filters .select { flex: 0 1 220px; min-width: 0; }
.list-more { display: flex; justify-content: center; margin-top: 12px; }
.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); color: var(--on-ink); }
.check-row .grow { flex: 1; min-width: 0; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--info-ink); font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); }
.notice.bad { background: var(--bad-soft); color: var(--bad-ink); }
.kbd { font-family: ui-monospace, monospace; font-size: 13px; background: var(--chip); 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; --pad: 24px; padding: var(--pad); 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; position: sticky; bottom: calc(-1 * var(--pad)); z-index: 1; margin: 0 calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: 12px var(--pad) var(--pad); background: var(--surface); }
/* A failed action's message takes its own line above the buttons. */
.modal-foot > .action-error { order: -1; flex-basis: 100%; }
/* The X stays in reach while a long dialog scrolls. */
.modal-head { position: sticky; top: calc(-1 * var(--pad)); z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; padding: var(--pad) var(--pad) 8px; background: var(--surface); }
.modal-head h2 { min-width: 0; overflow-wrap: anywhere; }
.modal:focus { outline: none; }
.close-x { flex: 0 0 44px; width: 44px; height: 44px; margin: -10px -10px 0 0; display: grid; place-items: center; background: none; border: 0; border-radius: 10px; color: var(--muted); cursor: pointer; }
.close-x:hover { background: var(--bg); color: var(--ink); }
.close-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#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: var(--on-ink); 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; color: #fff; }

/* 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: var(--chip); font-size: 12px; }
.step.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.step.on b { background: var(--ink); color: var(--on-ink); }
.step.done b { background: var(--ok); color: var(--on-ink); }
.dm-preview { background: #fff; color: #1A1714; 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; }
/* Header: on the page background, its content in the page container. */
.landing-top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.landing-top .brand { padding: 0; color: var(--ink); min-height: 44px; }
.top-menu { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 24px; min-width: 0; }
.top-links { display: flex; align-items: center; gap: 4px; }
.top-links a, .top-lang, .top-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.top-links a:hover, .top-lang:hover, .top-login:hover { color: var(--ink); background: var(--hover); }
.top-links a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.top-tools { display: flex; align-items: center; gap: 4px; }
.top-lang { font-size: 14px; }
.theme-toggle, .menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.theme-toggle:hover, .menu-btn:hover { background: var(--hover); }
.theme-toggle[aria-pressed="true"] { background: var(--chip); }
.theme-toggle { border-color: transparent; color: var(--muted); }
.theme-toggle:hover { color: var(--ink); }
.top-cta .menu-btn { display: none; }
.theme-toggle[hidden], .menu-btn[hidden] { display: none; }
.top-cta { display: flex; align-items: center; gap: 8px; }
.top-login { color: var(--ink); }
.menu-only { display: none; }
.landing [id] { scroll-margin-top: 96px; }
.landing-hero { background: var(--bg); color: var(--muted); padding: 88px 0 96px; }
.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: var(--ink); font-size: 56px; line-height: 1.04; 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; }
.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; line-height: 1.15; }
.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-text); 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: var(--on-ink); 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: var(--on-ink); 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; stroke: var(--ok); }
.faq { border-top: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq p { margin-bottom: 10px; }
.landing-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; padding: 48px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.landing-foot .brand { padding: 0; color: var(--ink); min-height: 44px; }
.foot-brand p { max-width: 320px; }
.foot-mail { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); }
.foot-col h2 { font-family: var(--text); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-legal { flex: 1 1 320px; margin: 0; font-size: 12px; color: var(--muted); }
.foot-tools { display: flex; align-items: center; gap: 4px; }
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-col a { min-height: 44px; }
  .foot-tools { margin-left: -10px; }
}
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }
/* Phones and small tablets: the section links move to a menu. Without JS
   they stay reachable in a second row of the header. */
@media (max-width: 900px) {
  .top-inner { flex-wrap: wrap; gap: 8px 12px; min-height: 64px; }
  .top-cta { margin-left: auto; }
  .top-cta .top-login { display: none; }
  .top-cta .menu-btn { display: inline-flex; }
  .menu-only { display: inline-flex; }
  .top-menu { order: 3; flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 8px; margin: 0 -10px; }
  .top-links { flex-wrap: wrap; }
  .top-tools { flex-wrap: wrap; }
  .js .top-menu { display: none; }
  .js .landing-top.open .top-menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; border-top: 1px solid var(--line); }
  .js .landing-top.open .top-links, .js .landing-top.open .top-tools { flex-direction: column; align-items: stretch; gap: 0; }
  .js .landing-top.open .top-tools { flex-direction: row; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
  .js .landing-top.open .top-links a { font-size: 16px; }
  .landing [id] { scroll-margin-top: 80px; }
}
@media (max-width: 700px) {
  .hero-grid h1 { font-size: 38px; }
  .landing-hero { padding: 48px 0 64px; }
}
@media (max-width: 900px) { .landing-hero .hero-visual { max-width: none; } }
@media (max-width: 420px) {
  .top-inner { gap: 8px 6px; }
  .landing-top .brand { gap: 8px; }
  .landing-top .brand-name { font-size: 16px; }
  .top-cta { gap: 6px; }
  .top-cta .btn { padding: 0 10px; font-size: 13px; }
  .menu-btn span { display: none; }
}
.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; }
/* Right-click menu (ui.js contextMenu), above the dialogs. */
.ctx-menu { position: fixed; z-index: 55; min-width: 200px; max-width: min(320px, calc(100vw - 8px)); padding: 6px; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(26, 23, 20, .18); }
.ctx-item { min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ctx-item:hover, .ctx-item:focus-visible, .ctx-item:focus { background: var(--accent-soft); outline: none; }
.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; } }
/* Palettes under the preview make it taller than the screen: stop sticking then. */
.brand-preview-card:has(.brand-palettes:not([hidden])) { position: static; }
.brand-palettes .brand-options { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.brand-palettes .brand-option-art { aspect-ratio: 3 / 2; padding: 10px; gap: 4px; }
.brand-palettes .brand-option-art strong { font-size: 15px; }
.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; }
/* Filters scroll sideways on a phone, like the music filter; the stages still wrap. */
@media (max-width: 600px) { .kind-filter.one-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .kind-filter.one-row .chip { flex: none; } .tabs.stage-tabs { gap: 0; } .tabs.stage-tabs .tab { padding: 8px 6px; font-size: 13px; min-height: 40px; } }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.list-tools .select { width: auto; max-width: 100%; min-width: 0; }
.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: var(--warn-ink); }
.guide.bad { background: var(--bad-soft); color: var(--bad-ink); }
.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 chat, assistants strip and product showcases. */
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.landing { --accent-ink: #9A3412; }
:root[data-theme="dark"] .landing { --accent-ink: var(--accent-text); }
.landing .st.wait { color: var(--warn-ink); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); 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; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.hero-grid h1 { text-wrap: balance; }
.hero-grid h1 .hl { color: var(--accent-text); }
.hero-note { max-width: 520px; font-size: 14px; color: var(--muted); }
.landing .new-sub { margin-top: 10px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.hero-trust li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.hero-visual { flex: 1 1 420px; max-width: 520px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; padding: 24px 24px 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(26, 23, 20, .08); }
.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(26, 23, 20, .25); }
.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: var(--surface); color: var(--muted); padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.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 var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--ink); font-weight: 500; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); 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; stroke: var(--ok); }
.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); }
.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: #1A1714; 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: var(--bubble); 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: var(--bubble); 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: var(--on-ink); 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); }
.hero-chat { width: 100%; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.hero-chat figcaption { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.landing .say { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.landing .say b { display: block; font-size: 12px; margin-bottom: 2px; }
.landing .say.you { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.landing .say.you b { color: var(--accent-ink); }
.landing .say.ai { align-self: flex-start; background: var(--bubble); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.landing .say.ai b { color: var(--ok-ink); }
.landing .ask-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.landing .ask-grid .card { gap: 10px; }
.landing .ask-q { font-size: 15px; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--bubble); }
.landing .assist-pick { flex-wrap: wrap; justify-content: center; border-radius: 22px; align-self: flex-start; }
.landing .assist-list { display: flex; flex-direction: column; gap: 20px; }
.landing .assist { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.landing code { overflow-wrap: anywhere; }
.landing .tool-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.landing .tool-groups ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.landing .tool-groups li { padding-left: 22px; position: relative; }
.landing .tool-groups li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.landing :focus-visible { outline-color: var(--accent); }
.landing .own-ai { border: 2px solid var(--accent); padding: 32px 24px; gap: 10px; }
.landing .own-ai p { max-width: 640px; }
.final-cta { text-align: center; background: var(--ink); color: var(--bg); border-radius: 24px; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final-cta h2 { color: var(--bg); 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 { 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) {
  .final-cta h2 { font-size: 26px; }
  .hero-visual { padding: 16px 16px 32px; }
  .landing-main h2, .showcase-copy h2 { font-size: 26px; }
}

/* Help chat */
.help-widget { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); 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-widget[hidden], .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; align-items: flex-end; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--line); }
.help-form input, .help-form textarea { 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-form textarea { resize: none; padding: 10px 12px; line-height: 1.4; }
/* iPhone: Safari zooms into fields with text under 16px. */
@media (max-width: 900px) { .help-form textarea { font-size: 16px; } }
.help-left { margin: 0; padding: 0 14px 10px; font-size: 12px; }
@media (max-width: 600px) { .help-widget { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); } .help-fab span { display: none; } .help-fab { padding: 0 14px; } }
/* Room under the last button, so the help button never covers it; the open side menu sits above it. */
body:has(.help-widget) .main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* 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(--link); 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 and theme pickers: in the side menu's footer and on the sign-in page. */
.lang-switch, .theme-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, .theme-switch option { color: var(--ink); background: var(--surface); }
.auth-lang { position: fixed; top: 14px; right: 16px; z-index: 5; display: flex; gap: 8px; }

/* 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); }

/* Shown in place of an AI picker when no AI of that kind is connected. */
.ai-missing { align-items: flex-start; border: 1px solid rgba(113, 63, 18, .18); }
.ai-missing-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(113, 63, 18, .12); }
.ai-missing strong { display: block; margin-bottom: 2px; }
.ai-missing span { display: block; line-height: 1.5; }

/* Admin: the models an AI offers, with the credits of each. */
.model-list { display: flex; flex-direction: column; gap: 8px; }
.model-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.model-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-line > .input { flex: 1 1 140px; min-width: 0; }
.model-line > .select { flex: 0 1 130px; }
.model-credits { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.model-credits .input { width: 76px; }
/* Sign-in on a phone: the pitch shrinks to a header, so the form comes first. */
@media (max-width: 900px) {
  .auth { min-height: 100dvh; grid-template-rows: auto 1fr; overflow-x: hidden; }
  .auth-side { padding: 20px 20px 22px; gap: 12px; }
  .auth-side h2 { font-size: 21px; }
  .auth-side ul { display: none; }
  .auth-form { padding: 28px 20px 40px; align-items: flex-start; }
  .auth-form > * { width: 100%; max-width: 420px; }
  /* Above the brand, so they never cover it; white only over the dark header
     (the waiting page has none). */
  .auth-side, main.auth-form { padding-top: 60px; }
  .auth-lang { position: absolute; }
  .auth-lang .lang-switch, .auth-lang .theme-switch { min-height: 32px; }
  .auth + .auth-lang .lang-switch, .auth + .auth-lang .theme-switch { color: #fff; }
}
/* On a phone, a row with a button gives the text the full width and puts
   the button below it. */
@media (max-width: 600px) {
  .check-row { flex-wrap: wrap; }
  .check-row .grow { flex: 1 1 180px; }
  .check-row .btn { flex: 1 1 100%; justify-content: center; }
}
/* iPhone: Safari zooms into fields with text under 16px, and its toolbars
   cover part of 100vh. dvh is the height actually visible. */
@media (max-width: 900px) {
  .input, .select, .textarea { font-size: 16px; }
  .shell { min-height: 100dvh; }
  .nav { height: 100dvh; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .modal { max-height: calc(100dvh - 32px); }
  .help-panel, .help-panel.wide { height: min(600px, calc(100dvh - 40px)); }
  .notif-panel { max-height: min(480px, calc(100dvh - 96px)); }
}
/* After the 900px block above, so its max-height does not win. */
@media (max-width: 600px) { .modal-backdrop { padding: 8px; } .modal { --pad: 16px; max-height: calc(100dvh - 16px); } .modal-foot > .btn { flex: 1 1 auto; } }

/* Minha conta: deleting the account is set apart from the rest. */
.danger-zone { border-color: rgba(185, 28, 28, .35); }
.card .lang-switch, .card .theme-switch { color: var(--ink, #1A1714); font-size: 14px; padding: 8px 10px; opacity: 1; border-color: var(--line-strong); border-radius: 10px; }

/* Reference images of a request (refs.js). */
.ref-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-thumbs:empty { display: none; }
.ref-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line, #E5E7EB); }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-remove { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.ref-remove:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.manual-item { display: grid; gap: 4px; justify-items: center; }
.manual-thumb { width: 96px; height: 120px; }
.manual-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.manual-move { display: flex; gap: 4px; }
.manual-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 20px 12px; border: 2px dashed var(--line-strong); border-radius: 12px; cursor: pointer; }
.manual-drop.over, .manual-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.manual-drop[aria-disabled="true"] { opacity: .6; cursor: default; }
.manual-status { display: grid; gap: 4px; justify-items: center; max-width: 120px; text-align: center; }
.manual-status progress { width: 96px; }
.manual-status .bad, .row > .small.bad { color: var(--bad); }
.manual-status .ok { color: var(--ok); }
/* Editor de imagem: the editor takes the whole width and most of the height. */
body .main:has(.studio-frame) { max-width: none; padding: 0; gap: 0; height: 100dvh; overflow: hidden; }
@media (max-width: 900px) { body .main:has(.studio-frame) { height: calc(100dvh - 68px); } }
body:has(.studio-frame) .help-widget { display: none; }
.studio-tool { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; min-height: 60px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.studio-tool .grow { flex: 1 1 0; }
.studio-tool .btn-sm { font-size: 14px; }
.studio-name { font-size: 20px; font-weight: 600; margin: 0 12px 0 0; }
.studio-doc-actions { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 8px; align-items: center; }
.studio-doc-actions .grow { flex: 1 1 0; }
.studio-tool-end { display: flex; gap: 8px; margin-left: auto; }
.studio-heading { display: flex; flex-direction: column; margin-right: 12px; }
.studio-heading .studio-name { margin: 0; }
.studio-save { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.studio-save:empty { display: none; }
.studio-save .btn-sm { min-height: 28px; padding: 0 10px; }
.studio-save.bad { color: var(--bad); }
.editor-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.editor-tile.editor-project { flex-direction: row; align-items: center; }
.editor-project-thumb { display: grid; place-items: center; flex: 0 0 48px; width: 48px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--faint); }
.studio-item > .badge { align-self: flex-start; }
.btn-icon { width: 36px; padding: 0; }
.btn-quiet { background: none; border-color: transparent; color: var(--muted); }
.page:has(.studio-frame) { flex: 1 1 0; min-height: 0; gap: 0; }
.page:has(.studio-frame) > .notice { border-radius: 0; }
.studio-stage { position: relative; flex: 1 1 0; min-height: 0; }
/* The editor's start screen, over the frame until a document is open. */
.studio-cover { position: absolute; inset: 0; display: flex; overflow-y: auto; padding: 40px 24px; background: var(--bg); }
.editor-start { margin: auto; width: 100%; max-width: 880px; display: flex; flex-direction: column; gap: 32px; }
.editor-start-head { display: flex; flex-direction: column; gap: 8px; }
.editor-start-head h2 { font-size: 32px; }
.editor-start-head > p { color: var(--muted); }
.editor-start-head .notice { margin-top: 8px; align-items: center; }
.editor-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.editor-status .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.editor-section { display: flex; flex-direction: column; gap: 12px; }
.editor-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.editor-opens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.editor-tile { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.editor-tile:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(26, 23, 20, .07); }
.editor-tile[aria-busy="true"] { opacity: .6; cursor: progress; }
.editor-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.editor-tile-text strong { font-size: 15px; }
.editor-tile-meta { color: var(--muted); font-size: 14px; }
.editor-preset { align-items: center; text-align: center; }
.editor-shape-box { display: flex; align-items: flex-end; justify-content: center; height: 120px; }
.editor-shape { height: 100%; border: 2px solid var(--line-strong); border-radius: 8px; background: var(--bg); transition: border-color .15s, background .15s; }
.editor-tile:hover .editor-shape, .editor-tile:focus-visible .editor-shape { border-color: var(--accent); background: var(--accent-soft); }
.editor-open { flex-direction: row; align-items: center; }
.editor-open-icon { flex: 0 0 48px; display: grid; place-items: center; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.editor-drop { display: none; }
.studio-cover.is-drop { box-shadow: inset 0 0 0 3px var(--accent); background: var(--accent-soft); }
.studio-cover.is-drop .editor-start { visibility: hidden; }
.studio-cover.is-drop .editor-drop { display: grid; place-items: center; position: absolute; inset: 0; color: var(--accent-hover); font-size: 20px; pointer-events: none; }
@media (max-width: 900px) {
  .studio-cover { padding: 24px 16px; }
  .studio-tool { padding: 10px 16px; }
  .editor-start { gap: 24px; }
  .editor-start-head h2 { font-size: 26px; }
  .editor-presets, .editor-opens { gap: 12px; }
  .editor-tile { padding: 16px; }
  .editor-shape-box { height: 96px; }
}
@media (max-width: 560px) {
  .editor-presets, .editor-opens { grid-template-columns: minmax(0, 1fr); }
  .editor-preset { flex-direction: row; text-align: left; }
  .editor-preset .editor-shape-box { flex: 0 0 56px; height: 56px; align-items: center; }
}
.studio-frame { display: block; width: 100%; height: 100%; border: 0; background: #262626; }
.notice .close-x { margin: -10px -10px -10px auto; }
.manual-video .manual-status { max-width: 220px; }
.manual-preview-note { max-width: 340px; text-align: center; margin: 0; }
.manual-item[draggable="true"] { cursor: grab; }
.manual-fit { max-width: 128px; font-size: 12px; padding: 4px 6px; }
.manual-art-preview { position: relative; }
.manual-assist { justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: -8px; }
.story > .manual-art-preview { position: absolute; inset: 0; }
.story > .manual-art-preview > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.manual-art-band { position: absolute; inset: auto 0 0; padding: 48px 14px 14px; display: grid; gap: 4px; font-size: 14px; }
.story .manual-art-band { bottom: 56px; }
.manual-art-band strong { font-size: 20px; line-height: 1.15; }
/* Nova arte, text alone: the slides of the form and the approximate card. */
.manual-text-art { padding: 12px; margin: 0; min-width: 0; }
.manual-text-art legend { padding: 0 4px; }
.manual-text-card { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px; }
.manual-text-card strong { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.manual-text-card > span { font-size: 14px; overflow-wrap: anywhere; }
.manual-text-card > .manual-text-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.story > .manual-text-story { position: absolute; inset: 0; padding: 64px 18px 72px; }
.ref-link { display: flex; gap: 8px; flex: 1; min-width: 220px; flex-wrap: nowrap; align-items: center; }
.ref-link input { flex: 1; min-width: 0; width: auto; }

/* Models of a built-in AI in the admin: a compact list, edited in a dialog. */
.model-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.model-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.model-info strong { overflow-wrap: anywhere; }

/* Checklist shown before the Meta login. */
.connect-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.connect-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 14px; }
.connect-links a { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.connect-links a:hover { text-decoration: underline; }

/* Calendar: month grid or week columns; on a phone the week is a list and a
   month day shows only coloured dots, so nothing scrolls sideways. */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-heading { margin-left: 8px; text-transform: capitalize; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; }
.cal-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--key); border: 1px dashed transparent; }
.cal-card { padding: 12px; }
/* The month grid uses the whole window: seven columns need the room. */
body .main:has(.cal-card) { max-width: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; text-transform: capitalize; padding: 4px 0; }
.cal-day { min-height: 96px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-week .cal-day { min-height: 220px; }
.cal-out { background: var(--bg); }
.cal-past { opacity: .7; }
.cal-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-today .cal-date { color: var(--accent-text); }
.cal-drop { background: var(--accent-soft); }
.cal-date { font: inherit; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; color: inherit; background: none; border: 0; padding: 0; text-align: left; border-radius: 4px; }
button.cal-date { cursor: pointer; }
button.cal-date:hover { color: var(--link); }
.cal-more { all: unset; cursor: pointer; padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--link); }
.cal-more:hover { text-decoration: underline; }
.cal-dots { display: none; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 10px; color: var(--muted); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--key); }
.cal-dots small { margin-left: 2px; font-size: inherit; }
.cal-list { display: flex; flex-direction: column; gap: 6px; }
.cal-list .cal-item { font-size: 14px; }
.cal-list .cal-item.cal-scheduled { cursor: auto; }
.cal-list .cal-open, .cal-list .cal-move { padding: 6px 8px; }
.cal-list .cal-title { white-space: normal; overflow-wrap: anywhere; }
.cal-weekday { color: var(--muted); font-weight: 600; text-transform: capitalize; }
.cal-item { --key: var(--faint); display: flex; align-items: center; min-width: 0; border-radius: 6px; background: var(--surface); border-left: 3px solid var(--key); font-size: 12px; color: var(--ink); text-decoration: none; }
.cal-scheduled { --key: var(--accent); }
.cal-published { --key: var(--ok); }
.cal-failed { --key: var(--bad); }
.cal-run { --key: var(--info); }
.cal-publishing { --key: var(--warn); }
.cal-item.cal-publishing { background: var(--warn-soft); }
.cal-item.cal-scheduled { background: var(--accent-soft); cursor: grab; }
.cal-item.cal-published { background: var(--ok-soft); }
.cal-item.cal-failed { background: var(--bad-soft); }
.cal-item.cal-run { background: transparent; border: 1px dashed var(--key); border-left-width: 3px; color: var(--muted); padding: 2px 4px; gap: 4px; }
.cal-key.cal-run::before { border-color: var(--info); background: transparent; }
.cal-open { all: unset; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 2px 4px; min-width: 0; flex: 1; }
.cal-open:focus-visible, .cal-move:focus-visible, .cal-run:focus-visible, .cal-date:focus-visible, .cal-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-move { all: unset; cursor: pointer; padding: 2px 4px; color: var(--link); display: flex; }
.cal-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; flex: none; }
.cal-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-item svg { flex: none; }
@media (max-width: 700px) {
  .cal-card { padding: 6px; }
  .cal-grid { gap: 2px; }
  .cal-month .cal-day { min-height: 56px; padding: 2px; }
  .cal-month .cal-item, .cal-month .cal-more { display: none; }
  .cal-month button.cal-date { flex: 1; flex-direction: column; align-items: flex-start; justify-content: space-between; }
  .cal-month .cal-dots { display: flex; }
  .cal-week { grid-template-columns: minmax(0, 1fr); }
  .cal-week .cal-day { min-height: 0; }
}

/* Followers trend under the dashboard stat. */
.stat-trend { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stat-trend small { font-weight: 600; }
.stat-trend.up { color: var(--ok); }
.stat-trend.down { color: var(--bad); }
.stat-trend.flat { color: var(--muted); }
.sparkline { display: block; max-width: 100%; }

/* Reports: line chart, "O que funcionou" and the top posts; nothing wider than a phone. */
.line-chart { display: block; width: 100%; height: auto; overflow: visible; }
.line-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .dot { fill: var(--accent); }
.line-chart .axis, .line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .grid { stroke-dasharray: 3 3; }
.line-chart text { fill: var(--muted); font-size: 10px; }
.worked { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.report-post { flex-wrap: wrap; }
.report-post .grow { flex: 1 1 160px; }
.report-post .title, .report-post .sub { white-space: normal; }
.report-table td, .report-table th { padding: 8px 6px; }
.insights-notice .stack { gap: 6px; }

/* Photo library (Biblioteca page and the picker dialog) */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.library-grid > .empty { grid-column: 1 / -1; }
.library-item { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.library-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line, #E5E7EB); display: block; }
.library-item figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-pick { border: 0; padding: 0; background: none; text-align: left; cursor: pointer; border-radius: 10px; color: inherit; }
.library-pick:hover img, .library-pick:focus-visible img { outline: 3px solid var(--accent, #7C3AED); outline-offset: 2px; }
/* Named libraries: the item count in a library pill and the upload's library choice. */
.pill-count { margin-left: 6px; opacity: .7; font-weight: 400; }
.library-target { flex: 1 1 180px; min-width: 0; width: auto; }
.music-info strong { overflow-wrap: anywhere; }

/* Em andamento (Estúdio): the works in progress */
.studio-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.studio-thumb { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line, #E5E7EB); display: block; background: var(--surface); }
.studio-thumb-empty { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.studio-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A client's answer on a draft card in Revisão (approvals.js). */
.approval-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.approval-note > * { min-width: 0; overflow-wrap: anywhere; }
.approval-note-comment { flex-basis: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
/* Montador de Reel (Estúdio): the scene list and the storyboard */
.scene-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.scene-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scene-pick { flex: 1 1 200px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-pick[aria-current="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.music-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.music-row { display: flex; gap: 8px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 480px) { .music-filter { flex-wrap: nowrap; overflow-x: auto; } .music-filter .pill { flex: none; } }
.music-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.scene-photo-thumb { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; }
.scene-sketch { position: relative; aspect-ratio: 9 / 16; border-radius: 15px; overflow: hidden; }
.scene-sketch-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-sketch-band { position: absolute; left: 0; right: 0; top: 13%; bottom: 15.6%; opacity: .84; }
.scene-sketch-text { position: absolute; inset: 13% 7% 15.6%; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow-wrap: anywhere; }
.scene-sketch-brand, .scene-sketch-handle { font-size: 11px; font-weight: 700; }
.scene-sketch-handle { position: absolute; bottom: 0; }
.scene-sketch-brand { position: absolute; top: 0; }
.scene-sketch-title { font-size: 22px; line-height: 1.15; }
.scene-sketch-body { font-size: 13px; line-height: 1.35; }
.scene-final { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 8px; }
.scene-glow { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, currentColor, transparent); opacity: .3; }

/* Footer: the panel's (inside the main column) and the public screens'. */
.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.public { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.public > .auth, .public > .auth-form { flex: 1 1 auto; min-height: 0; }
.app-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; width: 100%; max-width: 1280px; margin-inline: auto; padding: 8px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.app-foot nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; }
.app-foot .foot-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; background: none; border: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.app-foot .foot-link:hover { color: var(--ink); }
.app-foot .foot-build { margin-left: auto; font-variant-numeric: tabular-nums; }
.public > .app-foot { padding-inline: 16px; justify-content: center; }
.legal-foot { max-width: 820px; margin: 0 auto; padding: 16px 16px 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legal-foot p { margin: 0 0 4px; }
.legal-foot nav { display: flex; flex-wrap: wrap; column-gap: 4px; }
.legal-foot .legal-id { font-size: 12px; overflow-wrap: anywhere; }
.legal-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px 0 0; color: var(--muted); text-decoration: underline; }
.legal-foot a:hover { color: var(--ink); }
.approval-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); }
/* The floating help button covers the bottom-right corner: keep the footer's end clear of it. */
body:has(.help-widget) .main-col > .app-foot { padding-right: 140px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
@media (max-width: 900px) { .app-foot { padding-inline: 16px; } }
@media (max-width: 600px) { body:has(.help-widget) .main-col > .app-foot { padding-right: 84px; } }
body:has(.help-widget) .main-col > .main { padding-bottom: 32px; }
.choice strong .badge { margin-left: 8px; font-size: 11px; color: var(--ok); }

/* Brand kit: unsaved changes bar. It sticks to the bottom of the page column, lifted above the help button. */
.save-bar { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 8px 24px rgba(26, 23, 20, .18); }
.save-bar[hidden] { display: none; }
.save-bar-text { font-weight: 600; }
@media (max-width: 600px) { .save-bar { bottom: calc(72px + env(safe-area-inset-bottom)); } .save-bar .row { width: 100%; } .save-bar .row .btn { flex: 1; } }

/* Hero demo: the request is always there; the reply and the ready post fade in
   one after the other, once, and stay. Without animation support, or
   with reduced motion, everything stays visible. */
@keyframes hero-reply { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hero-ready { from { opacity: 0; transform: rotate(-3deg) translateY(10px); } to { opacity: 1; transform: rotate(-3deg); } }
.landing .hero-chat .say.ai { animation: hero-reply 1.2s ease-out .6s both; }
.landing .hero-shot { animation: hero-ready 1.2s ease-out 1.4s both; }
@media (prefers-reduced-motion: reduce) { .landing .hero-chat .say.ai, .landing .hero-shot { animation: none; } }

/* Creation assistant (create-ask.js): the plan under review and its run. */
.plan-brief { margin: 0; padding-left: 18px; }
.stack-tight { gap: 8px; } .row-tight { gap: 8px; } p.flush { margin: 0; }
.toggle-row { display: flex; gap: 10px; align-items: flex-start; } .toggle-row .hint { display: block; }
.plan-items, .plan-run { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-item { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.plan-item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-item-head .select { flex: 1 1 120px; width: auto; min-width: 0; }
.plan-item-head .input { flex: 2 1 190px; width: auto; min-width: 0; }
.plan-item-head .close-x { margin: 0 0 0 auto; }
.plan-n { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 600; }
.plan-item .textarea { min-height: 64px; }
.plan-item-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.plan-item-foot .badge { white-space: normal; }
.plan-auto { padding-top: 16px; border-top: 1px solid var(--line); }
.plan-auto h3 { margin: 0; }
.plan-total { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--chip); }
.plan-run .check-row { align-items: flex-start; }
.plan-run .grow { overflow-wrap: anywhere; }
.plan-bad { color: var(--bad); }
@media (max-width: 600px) { .plan-item-head .input { order: 1; flex-basis: 100%; } }

/* Help chat: the way to a person, at the foot and next to the messages that say the AI did not answer. */
.help-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; padding: 0 14px 10px; }
.help-foot .help-left { flex: 1 1 160px; min-width: 0; padding: 0; overflow-wrap: anywhere; }
.help-support { display: inline-block; padding: 4px 0; color: var(--link); font-size: 12px; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.help-msg.bad .help-support { color: inherit; font-size: inherit; }
.help-starters .btn { max-width: 100%; white-space: normal; text-align: left; }

/* Operator's quality levels */
.quality-block { padding-top: 14px; border-top: 1px solid var(--line); }
.quality-level { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.quality-option { gap: 8px; align-items: center; flex-wrap: wrap; }
.quality-option .input, .quality-option .select { flex: 1 1 160px; min-width: 0; }
