/**
 * Product Templates hub (#catalog-templates) — the "AI Product Images" design.
 * Scoped under .aih-page (+ the body-level overlays .aih-wz-overlay / .aih-ap).
 * Light/indigo palette (#5B53E8) on #F5F6F8, matching the Supplemental Feeds page.
 */
@keyframes aih-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aih-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

.aih-page {
    max-width: 1320px; margin: 0 auto; padding: 32px 28px 120px;
    color: #14171F; font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}
.aih-page button { font-family: inherit; }

/* Header */
.aih-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.aih-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.aih-sub { margin: 9px 0 0; color: #5B6473; font-size: 14.5px; line-height: 1.55; max-width: 700px; }

/* Header action cluster — Template gallery (secondary) + New template (primary). */
.aih-head__action { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.aih-gallery-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: #5B6473; background: #FFFFFF; border: 1px solid #E2E4EA; border-radius: 10px; padding: 11px 15px; cursor: pointer; white-space: nowrap; }
.aih-gallery-btn:hover { background: #FAFAFB; color: #14171F; }
.aih-gallery-btn svg { width: 16px; height: 16px; }

/* New ▾ menu */
.aih-new { position: relative; flex: 0 0 auto; }
.aih-new__btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: #FFFFFF; background: #5B53E8; border: none; border-radius: 10px; padding: 11px 16px; cursor: pointer; }
.aih-new__btn:hover { background: #4A43D6; }
.aih-new__btn svg { width: 16px; height: 16px; }
.aih-new__chev { width: 13px !important; height: 13px !important; transition: transform .15s; }
.aih-new__btn.is-open .aih-new__chev { transform: rotate(180deg); }
.aih-new__scrim { position: fixed; inset: 0; z-index: 40; }
.aih-new__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 41; width: 268px; background: #FFFFFF; border: 1px solid #E6E7EC; border-radius: 13px; box-shadow: 0 18px 44px rgba(16, 24, 40, 0.20); padding: 7px; animation: aih-fade .14s ease; }
.aih-new__item { width: 100%; display: flex; align-items: flex-start; gap: 11px; text-align: left; background: none; border: none; border-radius: 9px; padding: 10px 11px; cursor: pointer; }
.aih-new__item:hover { background: #F6F5FE; }
.aih-new__ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 17px; }
.aih-new__ico.is-img { background: #EAF1FF; } .aih-new__ico.is-vid { background: #FDEEF0; }
.aih-new__ico.is-aii { background: #EEEDFC; } .aih-new__ico.is-aiv { background: #E9F6FF; }
.aih-new__t { flex: 1; min-width: 0; }
.aih-new__title { display: block; font-size: 13px; font-weight: 600; color: #2A3343; }
.aih-new__desc { display: block; font-size: 11.5px; color: #646B78; margin-top: 1px; line-height: 1.35; }

/* Type tabs */
.aih-tabs { margin-top: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aih-tab { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #5B6473; background: #FFFFFF; border: 1px solid #E6E7EC; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.aih-tab.is-on { color: #FFFFFF; background: #5B53E8; border-color: #5B53E8; }
.aih-tab__count { font-size: 11px; font-weight: 700; color: #646B78; background: #F2F3F6; padding: 1px 7px; border-radius: 999px; }
.aih-tab.is-on .aih-tab__count { color: #FFFFFF; background: rgba(255, 255, 255, 0.22); }

/* Grid */
.aih-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }   /* 4 per row (user 2026-10-31) */
@media (max-width: 1180px) { .aih-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aih-loading { grid-column: 1 / -1; display: flex; justify-content: center; padding: 60px 0; }

/* Card */
.aih-card { background: #FFFFFF; border: 1px solid #E9EAEE; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); overflow: hidden; display: flex; flex-direction: column; }
/* 1:1 — most creatives are square, so the card shows the whole image instead of a 150px crop. */
.aih-card__prev { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(135deg, #FFF1E0, #FDE8EF); display: flex; align-items: center; justify-content: center; }
.aih-card__prev--ai.is-aii { background: linear-gradient(135deg, #F0EEFB, #F6EAFB); }
.aih-card__prev--ai.is-aiv { background: linear-gradient(135deg, #E9F6FF, #E5FBF4); }
.aih-card__img { width: 100%; height: 100%; object-fit: cover; }
.aih-card__emoji { font-size: 34px; }
.aih-card__previmg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aih-card__prev.has-img { background: #EEF0F4; }
.aih-badge { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: #fff; }
.aih-badge.is-dark { background: rgba(20, 23, 31, 0.72); }
.aih-badge.is-aii { background: #5B53E8; }
.aih-badge.is-aiv { background: #0E8AC0; }
.aih-status { position: absolute; top: 9px; right: 9px; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; border: none; cursor: pointer; }
.aih-status.is-on { background: #DCFCE7; color: #15803D; }
.aih-status.is-paused { background: #F1F2F4; color: #646B78; }
.aih-status.is-draft { background: #F1F2F4; color: #646B78; cursor: default; }
.aih-card__body { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.aih-card__name { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aih-card__meta { font-size: 12px; color: #646B78; margin-top: 2px; }
/* Admin-only failed-render details. */
.aih-dbg-back { position: fixed; inset: 0; background: rgba(20,22,27,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.aih-dbg { background: #fff; border-radius: 14px; width: min(860px, 100%); max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.aih-dbg__head, .aih-dbg__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #ECEDF1; }
.aih-dbg__foot { border-bottom: 0; border-top: 1px solid #ECEDF1; }
.aih-dbg__list { overflow: auto; padding: 10px 18px; }
.aih-dbg__item { border: 1px solid #ECEDF1; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.aih-dbg__top { font-weight: 600; font-size: 13px; }
.aih-dbg__err { white-space: pre-wrap; word-break: break-word; background: #F7F7F9; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin: 8px 0 4px; max-height: 180px; overflow: auto; }
.aih-dbg__meta { font-size: 12px; color: #646B78; }
.aih-dbg__ta { width: 100%; min-height: 120px; font: 12px monospace; }
/* Render progress on a template card: "66 of 123 ready · 12 queued" + bar. */
.aih-prog { margin-top: 8px; }
.aih-prog__line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.aih-prog__nums { font-weight: 600; color: #1F2430; }
.aih-prog__extra { color: #646B78; }
.aih-prog__bar { height: 6px; border-radius: 999px; background: #ECEDF1; margin-top: 4px; overflow: hidden; }
.aih-prog__fill { height: 100%; background: #5B53E8; border-radius: 999px; transition: width .4s ease; }
.aih-prog__bar.is-done .aih-prog__fill { background: #12B76A; }
.aih-review { margin-top: 11px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #9A6B0E; background: #FBF1DC; border: 1px solid #F0DCA8; border-radius: 9px; padding: 9px; cursor: pointer; }
.aih-review:hover { background: #F8E9C8; }
.aih-review svg { width: 14px; height: 14px; }
.aih-card__acts { margin-top: auto; padding-top: 11px; display: grid; grid-template-columns: 1fr 1fr 38px; gap: 7px; }
/* The ⋮ always sits in the narrow last track; with only TWO children (template cards,
   recipes with nothing generated) the primary button spans both 1fr columns instead of
   leaving the middle slot to a stretched ⋮ (2026-07-14 — Pause/Activate moved into ⋮). */
.aih-card__acts > .aih-card__menu { grid-column: -2 / -1; }
.aih-card__acts > :first-child:nth-last-child(2) { grid-column: 1 / -2; }
/* "Review items" button — the all-statuses counter rides a small top-right badge
   (the count-in-the-label made the button too wide). */
.aih-btn--review { position: relative; }
.aih-btn__count { position: absolute; top: -8px; right: -6px; min-width: 18px; padding: 2px 6px; border-radius: 999px; background: #5B53E8; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; border: 2px solid #fff; pointer-events: none; }
.aih-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: #5B6473; background: #F4F5F7; border: 1px solid #ECEDF1; border-radius: 8px; padding: 7px; cursor: pointer; }
.aih-btn:hover { background: #ECEDF1; }
.aih-btn svg { width: 14px; height: 14px; }
.aih-btn--primary { color: #5B53E8; background: #F0EEFC; border-color: #E2DEFA; }
.aih-btn--primary:hover { background: #E7E3FA; }
.aih-btn--lg { padding: 10px 16px; font-size: 13px; }
/* Delete-icon button (3rd column of the card action grid) */
.aih-card__del { display: flex; align-items: center; justify-content: center; background: #FDEFEC; border: 1px solid #F6D8CC; border-radius: 8px; color: #C0492A; cursor: pointer; }
.aih-card__del:hover { background: #FBE0D7; }
.aih-card__del svg { width: 15px; height: 15px; }
/* ⋮ overflow menu on a card's action row (Delete + See approvals / Browse renders). */
.aih-card__menu { display: flex; align-items: center; justify-content: center; background: #F4F5F7; border: 1px solid #E2E4EA; border-radius: 8px; color: #5B6473; cursor: pointer; padding: 0 9px; }
.aih-card__menu:hover, .aih-card__menu.is-open { background: #ECEEF1; color: #2A3343; }
.aih-card__menu svg { width: 16px; height: 16px; }
.aih-cardmenu__pop { position: fixed; z-index: 1200; min-width: 178px; background: #fff; border: 1px solid #E2E4EA; border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .14); padding: 5px; display: flex; flex-direction: column; gap: 2px; }
.aih-cardmenu__item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: none; background: none; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: #2A3343; text-align: left; font-family: inherit; white-space: nowrap; }
.aih-cardmenu__item:hover { background: #F2F3F6; }
.aih-cardmenu__item svg { width: 15px; height: 15px; flex: 0 0 auto; color: #646B78; }
.aih-cardmenu__item.is-danger { color: #C0492A; }
.aih-cardmenu__item.is-danger:hover { background: #FDEFEC; }
.aih-cardmenu__item.is-danger svg { color: #C0492A; }

/* ── Animated empty state (per-filter) ────────────────────────────────────── */
@keyframes aih-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes aih-shimmer { 0% { background-position: -340px 0; } 100% { background-position: 340px 0; } }
.aih-empty { grid-column: 1 / -1; margin-top: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #FFFFFF; border: 1px solid #ECEDF1; border-radius: 18px; padding: 48px 28px 44px; animation: aih-fade .2s ease; }
.aih-e2-mock { position: relative; width: 300px; animation: aih-float 4.2s ease-in-out infinite; }
.aih-e2-plus { position: absolute; top: -14px; right: -14px; width: 42px; height: 42px; border-radius: 12px; background: #5B53E8; box-shadow: 0 8px 20px rgba(91, 83, 232, 0.4); display: flex; align-items: center; justify-content: center; z-index: 3; border: 3px solid #FFFFFF; color: #fff; }
.aih-e2-plus svg { width: 20px; height: 20px; }
.aih-e2-card { background: #FFFFFF; border: 1px solid #ECEDF1; border-radius: 18px; box-shadow: 0 24px 50px rgba(16, 24, 40, 0.13); padding: 14px; }
.aih-e2-cardhead { background: linear-gradient(135deg, #EEEDFC, #F3F1FE); border-radius: 12px; padding: 24px 18px; display: flex; align-items: center; gap: 11px; }
.aih-e2-cardhead svg { width: 22px; height: 22px; }
.aih-e2-cardhead span { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: #14171F; }
.aih-e2-shot { margin-top: 12px; position: relative; background: linear-gradient(135deg, #EFF0F4, #E7E9EF); border-radius: 11px; height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; background-size: 340px 100%; animation: aih-shimmer 2.6s linear infinite; }
.aih-e2-disc { position: absolute; top: 11px; left: 11px; background: #E5533C; color: #fff; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.aih-e2-shot svg { width: 34px; height: 34px; }
.aih-e2-metarow { margin-top: 13px; display: flex; align-items: center; gap: 12px; }
.aih-e2-bar { flex: 1; height: 8px; border-radius: 5px; background: linear-gradient(90deg, #ECEDF1, #F4F5F7); }
.aih-e2-price { font-size: 16px; font-weight: 800; color: #14171F; }
.aih-e2-title { margin: 28px 0 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.aih-e2-desc { margin: 9px 0 0; font-size: 13.5px; color: #646B78; line-height: 1.6; max-width: 440px; }
/* Four create options as rich descriptive cards (icon + title + sub). */
.aih-e2-cards { margin-top: 26px; width: 100%; max-width: 1000px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }   /* five create cards — 4 columns left the fifth alone on a row */
@media (max-width: 1180px) { .aih-e2-cards { grid-template-columns: repeat(3, 1fr); max-width: 640px; } }
.aih-ecard { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; text-align: left; background: #FFFFFF; border: 1px solid #E6E7EC; border-radius: 13px; padding: 16px 15px; cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s, transform .12s; }
.aih-ecard:hover { border-color: #CFCBF6; box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07); transform: translateY(-2px); }
.aih-ecard__ico { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.aih-ecard__ico svg { width: 20px; height: 20px; }
.aih-ecard__ico.is-img { background: #EEF2FE; color: #3A63D8; }
.aih-ecard__ico.is-vid { background: #FDEFE9; color: #C0492A; }
.aih-ecard__ico.is-aii { background: #F0EEFC; color: #5B53E8; }
.aih-ecard__ico.is-aiv { background: #E9F7EF; color: #1F8A5B; }
.aih-ecard__title { font-size: 13.5px; font-weight: 700; color: #2A3343; }
.aih-ecard__desc { font-size: 12px; color: #6B7280; line-height: 1.45; }
.aih-ecard.is-primary { border-color: #5B53E8; box-shadow: 0 0 0 1px #5B53E8 inset; }
.aih-ecard.is-primary:hover { border-color: #5B53E8; }
@media (prefers-reduced-motion: reduce) { .aih-e2-mock { animation: none; } .aih-e2-shot { animation: none; } }

/* ── Wizard ───────────────────────────────────────────────────────────────── */
/* The OVERLAY scrolls (the whole popup), never the modal itself — no inner scrollbar. align-items:flex-start
   + the modal's margin:auto keeps short popups centered while tall ones anchor to the top and scroll the
   window. (Was: modal max-height:94vh + overflow-y:auto, which gave a cramped inner scroll.) */
.aih-wz-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 26, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; overscroll-behavior: contain; animation: aih-fade .15s ease; }
.aih-wz { width: 1040px; max-width: 100%; margin: auto; background: #FFFFFF; border-radius: 18px; box-shadow: 0 30px 70px rgba(16, 24, 40, 0.32); animation: aih-pop .16s ease; }
.aih-wz__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 0; }
.aih-wz__icon { width: 40px; height: 40px; border-radius: 11px; background: #EEEDFC; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #5B53E8; }
.aih-wz__icon svg { width: 20px; height: 20px; }
.aih-wz__hi { flex: 1; }
.aih-wz__hi h2 { margin: 0; font-size: 18px; font-weight: 700; }
.aih-wz__hi p { margin: 2px 0 0; font-size: 13px; color: #646B78; }
.aih-wz__steps { display: flex; align-items: center; padding: 18px 24px; }
.aih-wz__seg { display: flex; align-items: center; flex: 1; min-width: 0; }
/* `.aih-wz__seg` is reused further down for two segmented controls (the quality/model
   picker ~L474 and the mode toggle ~L588) whose bare-selector box styling (bg / border /
   padding) otherwise cascades onto these wizard STEP segments and wraps each step in a grey
   pill. Re-assert the stepper's own flat look at higher specificity; the controls live
   outside `.aih-wz__steps`, so they're untouched. Both wizards (image recipe + UGC video)
   share this stepper, so this keeps them identical and clean. */
.aih-wz__steps .aih-wz__seg { display: flex; background: none; border: 0; border-radius: 0; padding: 0; gap: 0; }
.aih-wz__dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #FFFFFF; color: #6B7280; border: 1.5px solid #D5D8DF; flex: 0 0 auto; }
.aih-wz__dot.is-on { background: #5B53E8; color: #FFFFFF; border-color: #5B53E8; }
.aih-wz__steplbl { font-size: 12.5px; font-weight: 600; color: #6B7280; white-space: nowrap; margin-left: 8px; flex: 0 0 auto; }
.aih-wz__steplbl.is-on { color: #2A3343; }
.aih-wz__line { flex: 1; height: 2px; margin: 0 10px; border-radius: 2px; background: #E6E7EC; min-width: 14px; }
.aih-wz__line.is-on { background: #5B53E8; }
.aih-wz__body { border-top: 1px solid #F0F1F4; padding: 22px 24px; min-height: 300px; display: flex; flex-direction: column; gap: 16px; animation: aih-fade .15s ease; }
/* "Voice & preview" step (video): a WIDER modal + a 2-column layout (voice picker | preview studio)
   so the busiest step isn't one long crowded stack. Stacks to one column on narrow viewports. */
.aih-wz--wide { width: 1240px; }
.aih-wz__vp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.aih-wz__vp-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.aih-wz__vp-grid .aih-wz__preview { position: static; }   /* columns are side-by-side already — drop the sticky pin */
@media (max-width: 1000px) {
    .aih-wz--wide { width: 940px; }
    .aih-wz__vp-grid { grid-template-columns: 1fr; }
}
.aih-wz__field { display: flex; flex-direction: column; }
.aih-wz__label { display: block; font-size: 12.5px; font-weight: 600; color: #3B414C; margin-bottom: 6px; }
/* Subtle separator between the basics and prompt-&-style halves of the combined step 1. */
.aih-wz__div { height: 1px; background: #F0F1F4; margin: 4px 0; }
.aih-wz__input { width: 100%; box-sizing: border-box; border: 1px solid #E2E4EA; border-radius: 9px; padding: 10px 12px; font-size: 13.5px; outline: none; font-family: inherit; }
.aih-wz__input:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.12); }
.aih-wz__kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.aih-kind { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1.5px solid #ECEDF1; background: #FFFFFF; border-radius: 11px; padding: 12px; cursor: pointer; }
.aih-kind.is-on { border-color: #5B53E8; background: #F4F3FE; }
.aih-kind__emoji { font-size: 20px; flex: 0 0 auto; }
.aih-kind__title { display: block; font-size: 13px; font-weight: 600; color: #2A3343; }
.aih-kind__desc { display: block; margin-top: 2px; font-size: 11.5px; color: #646B78; line-height: 1.4; }
.aih-wz__ratios { display: flex; gap: 8px; }
.aih-ratio { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1.5px solid #ECEDF1; background: #FFFFFF; border-radius: 10px; padding: 9px 4px; cursor: pointer; }
.aih-ratio.is-on { border-color: #5B53E8; background: #F4F3FE; }
.aih-ratio__sw { display: block; border-radius: 3px; background: #C2C9D4; }
.aih-ratio.is-on .aih-ratio__sw { background: #5B53E8; }
.aih-ratio__lbl { font-size: 11.5px; font-weight: 600; color: #5B6473; }
.aih-ratio.is-on .aih-ratio__lbl { color: #5B53E8; }
.aih-ratio__dim { font-size: 9.5px; font-weight: 600; color: #646B78; white-space: nowrap; letter-spacing: -0.1px; }
.aih-ratio.is-on .aih-ratio__dim { color: #7B74EC; }
.aih-wz__lead { margin: 0; font-size: 13px; color: #5B6473; line-height: 1.5; }
.aih-wz__note { margin: 8px 0 0; font-size: 11.5px; color: #6B7280; line-height: 1.45; }
/* UGC step-1 intro banner + numbered section cards (recipe wizard mockup structure). */
.aih-wz__introbanner { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: rgba(91, 83, 232, 0.06); border: 1px solid rgba(91, 83, 232, 0.18); }
.aih-wz__introbanner-ico { flex: 0 0 auto; color: #5B53E8; margin-top: 1px; }
.aih-wz__introbanner-ico svg { width: 18px; height: 18px; }
.aih-wz__introbanner p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #4A4660; }
.aih-wz__introbanner strong { color: #2A2440; font-weight: 700; }
.aih-wz__section { border: 1px solid #ECEDF1; border-radius: 14px; background: #FFFFFF; overflow: hidden; }
.aih-wz__section-hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #F2F3F6; }
.aih-wz__section-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; background: #EEEDFC; color: #5B53E8; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.aih-wz__section-title { font-size: 13.5px; font-weight: 700; color: #2A3343; }
.aih-wz__section-hint { margin-left: auto; font-size: 12px; color: #6B7280; }
.aih-wz__section-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
/* Step-group label in the stepper (video recipe: Create / Target / Publish). */
.aih-wz__group { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #6B7280; margin: 0 10px 0 2px; flex: 0 0 auto; align-self: center; white-space: nowrap; }
/* Creator (UGC) step — selected-avatar preview + upload. */
.aih-wz__creator-sel { display: flex; align-items: center; gap: 14px; margin: 12px 0; min-height: 96px; }
.aih-wz__creator-img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; border: 1px solid #E3E5EA; }
.aih-wz__creator-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.aih-wz__creator-ok { font-size: 13px; font-weight: 700; color: #0F8A5F; }
.aih-wz__creator-empty { font-size: 13px; color: #6B7280; }
/* Creator LIBRARY (Creator step) — a gallery of reusable creators: upload tile + selectable thumbs. */
.aih-wz__creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 9px; margin: 12px 0; }
.aih-wz__creator { position: relative; aspect-ratio: 1; border: 2px solid #ECEDF1; border-radius: 11px; overflow: hidden; padding: 0; cursor: pointer; background: #F4F5F7; }
.aih-wz__creator.is-on { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.15); }
.aih-wz__creator-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.aih-wz__creator-check { position: absolute; top: 5px; left: 5px; width: 20px; height: 20px; border-radius: 50%; background: #5B53E8; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.aih-wz__creator-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.12s; }
.aih-wz__creator:hover .aih-wz__creator-del { opacity: 1; }
.aih-wz__creator-add { aspect-ratio: 1; border: 1.5px dashed #CDD2DA; border-radius: 11px; background: #FBFBFC; color: #646B78; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 10.5px; font-weight: 600; text-align: center; }
.aih-wz__creator-add:hover { border-color: #5B53E8; color: #5B53E8; }
.aih-wz__creator-add.is-busy { opacity: 0.6; pointer-events: none; }
.aih-wz__creator-add-ico { font-size: 24px; line-height: 1; font-weight: 400; }
/* Voice picker (Creator & voice step) — UGC handoff spec: a ROUND play circle (34px) + a
   name/lang block, the whole tile a soft-bordered button that fills purple-tinted when
   selected (was a full-height left play-bar). ▶ sample + single-select unchanged. */
.aih-wz__voicegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.aih-wz__voice { display: flex; align-items: center; gap: 8px; border: 1.5px solid #E2E4EA; border-radius: 9px; padding: 9px 10px; background: #fff; position: relative; overflow: visible; }
.aih-wz__voice.is-on { border-color: #5B53E8; background: #F4F3FE; box-shadow: none; }
.aih-wz__voice-play { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #E2E4EA; background: #fff; color: #5B53E8; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .12s; box-shadow: 0 1px 2px rgba(16,24,40,0.08); }
.aih-wz__voice-play:hover { background: #5B53E8; border-color: #5B53E8; color: #fff; transform: scale(1.08); }
.aih-wz__voice-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: none; background: transparent; cursor: pointer; text-align: left; }
.aih-wz__voice-name { font-size: 11.5px; font-weight: 700; color: #2A3343; line-height: 1.3; }
.aih-wz__voice-tag { font-size: 10px; color: #6B7280; }
.aih-wz__voice.is-on .aih-wz__voice-name { color: #5B53E8; }
.aih-wz__voice-play:disabled { opacity: .4; cursor: default; box-shadow: none; }
.aih-wz__voice-play:disabled:hover { background: #fff; border-color: #E2E4EA; color: #5B53E8; transform: none; }
/* ElevenLabs voice list — loading + unconfigured/empty states (avatar-audio lip-sync model). */
.aih-wz__voiceload { display: flex; align-items: center; gap: 6px; padding: 12px 2px; font-size: 12.5px; color: #6B7280; }
.aih-wz__voiceempty { padding: 12px 14px; font-size: 12.5px; line-height: 1.5; color: #6B7280; background: #F6F7FA; border: 1px dashed #D7DAE0; border-radius: 10px; }
.aih-wz__voicelang { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.aih-wz__voicelang-lbl { font-size: 12px; font-weight: 600; color: #6B7280; flex: 0 0 auto; }
.aih-wz__voicelang .aih-sel { flex: 0 0 auto; min-width: 190px; }
/* Voice picker groups: "Your voices" + the full "ElevenLabs Library" (all voices per language). */
.aih-wz__voicegrp-hd { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6B7280; margin: 12px 0 6px; }
.aih-wz__voicelib { max-height: 300px; overflow-y: auto; }
.aih-wz__voicelib-hint { font-size: 12px; color: #646B78; line-height: 1.4; margin: 2px 0; }
.aih-wz__voicemore { width: 100%; margin-top: 8px; font-size: 12px; font-weight: 600; color: #5B53E8; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 9px; padding: 8px; cursor: pointer; }
.aih-wz__voicemore:hover { background: #E7E3FA; }
.aih-wz__voicemore:disabled { opacity: 0.6; cursor: default; }
/* Library filter row: gender dropdown + search input. */
.aih-wz__voicefilters { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.aih-wz__voicefilters .aih-sel { flex: 0 0 auto; min-width: 130px; }
.aih-wz__voicesearch { flex: 1 1 auto; min-width: 0; font-size: 12.5px; padding: 7px 10px; border: 1px solid #E3E5EA; border-radius: 9px; background: #fff; color: #2A3343; }
.aih-wz__voicesearch:focus { outline: none; border-color: #7B74EC; box-shadow: inset 0 0 0 1px #7B74EC; }
.aih-wz__join { display: inline-flex; background: #F2F3F6; border-radius: 9px; padding: 3px; gap: 2px; }
.aih-joinbtn { font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 7px; border: none; cursor: pointer; background: transparent; color: #646B78; }
.aih-joinbtn.is-on { background: #FFFFFF; color: #5B53E8; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.aih-wz__conds { display: flex; flex-direction: column; gap: 9px; }
.aih-condrow { display: grid; grid-template-columns: 1fr 150px 1fr 34px; gap: 9px; align-items: center; }
.aih-condrow__val { border: 1px solid #E2E4EA; border-radius: 8px; padding: 9px 10px; font-size: 12.5px; outline: none; font-family: inherit; }
.aih-condrow__val:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.12); }
.aih-condrow__rm { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: none; background: #FDEAE2; color: #C0492A; border-radius: 8px; cursor: pointer; }
.aih-condrow__rm:hover { background: #F8D8CB; }
.aih-condrow__rm svg { width: 15px; height: 15px; }
.aih-wz__addcond { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #5B53E8; background: #F4F3FE; border: 1px dashed #CFCBF6; border-radius: 9px; padding: 8px 13px; cursor: pointer; }
.aih-wz__addcond svg { width: 14px; height: 14px; }
.aih-wz__estimate { align-self: flex-start; font-size: 12px; color: #646B78; display: inline-flex; align-items: center; gap: 7px; background: #F4F5F7; border-radius: 8px; padding: 8px 11px; }
.aih-wz__estimate svg { width: 14px; height: 14px; }
.aih-wz__textarea { width: 100%; box-sizing: border-box; height: 108px; border: 1px solid #E2E4EA; border-radius: 11px; padding: 12px; font-size: 13px; line-height: 1.5; outline: none; font-family: inherit; resize: vertical; }
.aih-wz__textarea:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.12); }
.aih-wz__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.aih-chip { font-size: 12px; font-weight: 600; color: #5B6473; background: #F4F5F7; border: 1px solid #ECEDF1; border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.aih-chip.is-on { color: #5B53E8; background: #EEEDFC; border-color: #D9D5F7; }
.aih-wz__tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.aih-tcard { display: flex; align-items: center; gap: 10px; border: 1px solid #ECEDF1; background: #FFFFFF; border-radius: 11px; padding: 12px; cursor: pointer; }
.aih-tcard.is-on { border-color: #E0DDFA; background: #FBFAFF; }
.aih-tcard__title { display: block; font-size: 12.5px; font-weight: 600; color: #2A3343; }
.aih-tcard__desc { display: block; font-size: 11px; color: #646B78; }
.aih-tsw { width: 38px; height: 22px; border-radius: 999px; padding: 2.5px; display: flex; flex: 0 0 auto; background: #D5D8DF; justify-content: flex-start; transition: all .15s; }
.aih-tsw.is-on { background: #5B53E8; justify-content: flex-end; }
.aih-tsw__knob { width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.aih-approval { display: flex; align-items: center; gap: 12px; border: 1px solid #ECEDF1; background: #FFFFFF; border-radius: 12px; padding: 14px; cursor: pointer; }
.aih-approval.is-on { border-color: #CDEBD9; background: #F6FBF8; }
.aih-approval__icon { width: 34px; height: 34px; border-radius: 9px; background: #F2F3F6; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #6B7280; }
.aih-approval.is-on .aih-approval__icon { background: #DCF4E6; color: #1C8C56; }
.aih-approval__icon svg { width: 18px; height: 18px; }
.aih-approval__t { flex: 1; }
.aih-approval__title { font-size: 13px; font-weight: 700; color: #2A3343; }
.aih-approval__desc { font-size: 11.5px; color: #646B78; margin-top: 2px; }
.aih-approval .aih-tsw { width: 42px; height: 24px; }
.aih-approval.is-on .aih-tsw.is-on { background: #22A06B; }
.aih-approval .aih-tsw__knob { width: 19px; height: 19px; }
/* Native select used inside the wizard */
.aih-sel { position: relative; display: flex; align-items: center; }
.aih-sel select { width: 100%; appearance: none; -webkit-appearance: none; border: 1px solid #E2E4EA; border-radius: 8px; padding: 9px 26px 9px 10px; font-size: 12.5px; background: #FFFFFF; cursor: pointer; outline: none; font-family: inherit; }
.aih-sel select:focus { border-color: #5B53E8; }
.aih-sel__chev { position: absolute; right: 9px; pointer-events: none; display: flex; }
.aih-sel__chev svg { width: 13px; height: 13px; }
.aih-wz__foot { border-top: 1px solid #F0F1F4; padding: 16px 24px; display: flex; align-items: center; }
/* Step 2 is taller than a laptop screen; keep Previous / Next on screen while the page scrolls. */
.aih-wz__foot { position: sticky; bottom: -24px; z-index: 3; background: #FFFFFF; border-radius: 0 0 18px 18px; }
/* Inline "why Next refused" note — sits right before the Next button (role=alert,
   auto-removes after 6s). The toast also fires; this one can't be missed. */
.aih-wz__blocknote { padding: 0 12px; font-size: 12.5px; font-weight: 600; color: #C0492A; text-align: right; max-width: 46%; animation: aih-fade .15s ease; }
.aih-wz__prev { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #5B6473; background: none; border: none; cursor: pointer; padding: 8px 4px; }
.aih-wz__prev.is-off { color: #646B78; cursor: default; }
.aih-wz__prev svg { width: 15px; height: 15px; }
.aih-wz__counter { margin: 0 auto; font-size: 12.5px; color: #6B7280; }
.aih-wz__next { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #FFFFFF; background: #5B53E8; border: none; border-radius: 10px; padding: 10px 18px; cursor: pointer; }
.aih-wz__next.is-finish { background: #1F8A5B; }
.aih-wz__next svg { width: 15px; height: 15px; }
/* Hover feedback — shared by BOTH wizards (the image recipe + the UGC video, which now reuses
   this class instead of its old inline .vw-next/.vw-create). Same darkened brand/finish tokens. */
.aih-wz__next:hover { background: #4A43D6; }
.aih-wz__next.is-finish:hover { background: #197A4F; }
/* Edit mode: secondary "Update" (save now) shown on steps 1–2 beside Next. */
.aih-wz__update { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #1F8A5B; background: #E4F7EC; border: 1px solid #C7EBD5; border-radius: 10px; padding: 10px 16px; cursor: pointer; margin-right: 10px; }
.aih-wz__update:hover { background: #D6F2E2; }
.aih-wz__update svg { width: 15px; height: 15px; }
/* is / is_not → searchable MULTI-select of the field's unique values (replaces the text value input). */
.aih-vsel { position: relative; flex: 1 1 70px; min-width: 60px; }
.aih-vsel__trigger { width: 100%; min-height: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #fff; border: 1px solid #D5D8DF; border-radius: 8px; padding: 4px 26px 4px 8px; cursor: pointer; text-align: left; font: inherit; position: relative; }
.aih-vsel__trigger:hover { border-color: #B9BECB; }
.aih-vsel__ph { color: #6B7280; font-size: 12.5px; }
.aih-vsel__chip { display: inline-flex; align-items: center; gap: 4px; background: #EEEDFC; color: #3F38C9; border-radius: 6px; padding: 2px 4px 2px 7px; font-size: 11.5px; font-weight: 600; max-width: 150px; }
.aih-vsel__chiptxt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aih-vsel__chipx { cursor: pointer; color: #7A73E6; font-size: 13px; line-height: 1; padding: 0 1px; }
.aih-vsel__chipx:hover { color: #3F38C9; }
.aih-vsel__caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #6B7280; font-size: 10px; pointer-events: none; }
.aih-vsel__panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 210px; background: #fff; border: 1px solid #E2E4EA; border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); padding: 7px; }
.aih-vsel__search { width: 100%; box-sizing: border-box; border: 1px solid #E2E4EA; border-radius: 7px; padding: 7px 9px; font-size: 12.5px; margin-bottom: 6px; font-family: inherit; }
.aih-vsel__search:focus { outline: none; border-color: #5B53E8; }
.aih-vsel__list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.aih-vsel__msg { padding: 10px; font-size: 12px; color: #6B7280; text-align: center; }
.aih-vsel__item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: none; background: none; border-radius: 6px; cursor: pointer; font: inherit; font-size: 12.5px; color: #2A3343; text-align: left; }
.aih-vsel__item:hover { background: #F2F3F6; }
.aih-vsel__item.is-on { background: #F0EEFC; }
.aih-vsel__box { width: 15px; height: 15px; flex: 0 0 auto; border: 1.5px solid #C7CCD6; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.aih-vsel__item.is-on .aih-vsel__box { background: #5B53E8; border-color: #5B53E8; }
.aih-vsel__val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aih-vsel__cnt { flex: 0 0 auto; font-size: 11px; color: #646B78; }

/* ── Approval review (full-screen) ────────────────────────────────────────── */
.aih-ap { position: fixed; inset: 0; z-index: 65; background: #FFFFFF; display: flex; flex-direction: column; animation: aih-fade .15s ease; }
.aih-ap__head { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid #ECEDF1; }
.aih-ap__hi { flex: 1; min-width: 0; }
.aih-ap__titlerow { display: flex; align-items: center; gap: 9px; }
.aih-ap__titlerow h2 { margin: 0; font-size: 16px; font-weight: 700; }
.aih-ap__pending { font-size: 11px; font-weight: 700; color: #9A6B0E; background: #FBF1DC; padding: 3px 9px; border-radius: 999px; }
.aih-ap__failed { color: #B42318; background: #FDE8E8; cursor: pointer; margin-left: 6px; }
.aih-ap__failed:hover { background: #FBD5D5; }
.aih-ap__hi p { margin: 2px 0 0; font-size: 12.5px; color: #646B78; }
.aih-ap__body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.aih-ap__empty { text-align: center; max-width: 420px; }
.aih-ap__emptymark { width: 48px; height: 48px; margin: 0 auto; border-radius: 12px; background: #F2F3F6; display: flex; align-items: center; justify-content: center; color: #6B7280; }
.aih-ap__emptymark svg { width: 24px; height: 24px; }
.aih-ap__empty h3 { margin: 14px 0 0; font-size: 17px; font-weight: 700; }
.aih-ap__empty p { margin: 8px 0 0; font-size: 13px; color: #5B6473; line-height: 1.55; }

/* ── Card: name row + edit pencil + renders link + status toggle ───────────── */
.aih-card__namerow { display: flex; align-items: center; gap: 6px; }
.aih-card__namerow .aih-card__name { flex: 1; min-width: 0; }
.aih-card__edit { width: 24px; height: 24px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: none; background: none; color: #646B78; cursor: pointer; border-radius: 6px; padding: 0; }
.aih-card__edit:hover { background: #F4F5F7; color: #5B6473; }
.aih-card__edit svg { width: 14px; height: 14px; }
.aih-card__renders { margin-top: 9px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #646B78; background: none; border: none; padding: 0; cursor: pointer; }
.aih-card__renders:hover { color: #5B53E8; }
.aih-card__renders svg { width: 13px; height: 13px; }
/* "Add to gallery / In gallery" public-library toggle on image template cards. */
.aih-card__public { margin-top: 6px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #646B78; background: none; border: 1px solid #ECEDF1; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.aih-card__public:hover { color: #5B53E8; border-color: #D9D5F7; }
.aih-card__public svg { width: 13px; height: 13px; }
.aih-card__public.is-on { color: #5B53E8; background: #EEEDFC; border-color: #D9D5F7; }
/* (.aih-btn--toggle removed 2026-07-14 — Pause/Activate lives in every card's ⋮ menu.) */

/* Empty-state feature row */
.aih-e2-feats { margin-top: 34px; width: 100%; max-width: 720px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.aih-e2-feat { background: #FFFFFF; border: 1px solid #ECEDF1; border-radius: 13px; padding: 18px 16px; text-align: center; }
.aih-e2-feat__ico { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; background: #F0EEFC; align-items: center; justify-content: center; color: #5B53E8; }
.aih-e2-feat__ico svg { width: 18px; height: 18px; }
.aih-e2-feat__title { margin-top: 11px; font-size: 13.5px; font-weight: 700; color: #2A3343; }
.aih-e2-feat__desc { margin-top: 5px; font-size: 12px; color: #6B7280; line-height: 1.5; }

/* Spinner (preview / gallery / improve) */
@keyframes aih-spin { to { transform: rotate(360deg); } }
.aih-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.4px solid rgba(91, 83, 232, 0.25); border-top-color: #5B53E8; display: inline-block; animation: aih-spin .8s linear infinite; flex: 0 0 auto; vertical-align: middle; }

/* ── Shared dialogs (title edit / save preset) ─────────────────────────────── */
.aih-dlg-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(15, 18, 26, 0.55); display: flex; align-items: center; justify-content: center; padding: 24px; animation: aih-fade .15s ease; }
.aih-dlg { position: relative; width: 420px; max-width: 100%; background: #FFFFFF; border-radius: 16px; box-shadow: 0 30px 70px rgba(16, 24, 40, 0.32); padding: 20px; animation: aih-pop .16s ease; }
.aih-dlg--save { width: 460px; }
.aih-dlg__h { margin: 0; padding-right: 40px; font-size: 15.5px; font-weight: 700; }
.aih-dlg__sub { margin: 4px 0 0; font-size: 12px; color: #646B78; line-height: 1.45; }
.aih-dlg__input { margin-top: 13px; width: 100%; border: 1px solid #E2E4EA; border-radius: 9px; padding: 10px 12px; font-size: 13.5px; outline: none; font-family: inherit; }
.aih-dlg__input:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.12); }
.aih-dlg__foot { margin-top: 16px; display: flex; justify-content: flex-end; gap: 9px; }
.aih-dlg__btn { font-size: 13px; font-weight: 600; color: #5B6473; background: #FFFFFF; border: 1px solid #E2E4EA; border-radius: 9px; padding: 9px 15px; cursor: pointer; font-family: inherit; }
.aih-dlg__btn:hover { background: #F7F8FA; }
.aih-dlg__btn--primary { color: #FFFFFF; background: #5B53E8; border-color: #5B53E8; }
.aih-dlg__btn--primary:hover { background: #4A43D6; }
.aih-dlg__btn--green { color: #FFFFFF; background: #1F8A5B; border-color: #1F8A5B; }
.aih-dlg__btn--green:hover { background: #197A4F; }

/* ── Wizard step 1: two-column (form + live preview) ───────────────────────── */
.aih-wz__s1 { display: grid; grid-template-columns: 1fr 334px; gap: 22px; }
/* Two EQUAL columns — for paired equal-weight panels (e.g. Creator | Voice), where the
   form+preview-card ratio of __s1 would wrongly pin one side to 334px. */
.aih-wz__s2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.aih-wz__s1col { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.aih-wz__s1top { display: grid; grid-template-columns: 1fr 250px; gap: 12px; align-items: stretch; }
/* VIDEO variant: a small Language select sits between name and status (name | language | status).
   align-items:start (not stretch) so the language cell's green "✓ … selected" line below the select
   doesn't inflate the name input + status button to match its height. */
.aih-wz__s1top--lang { grid-template-columns: 1fr 170px 210px; align-items: start; }
.aih-wz__s1top--lang .aih-wz__selok { margin-top: 6px; }
/* Name + status are equal-height boxes: stretch the row, let each control fill its field. */
.aih-wz__s1top .aih-wz__input, .aih-wz__s1top .aih-wz__status { flex: 1; }
.aih-wz__status { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid #E2E4EA; border-radius: 9px; background: #FFFFFF; padding: 10px 12px; cursor: pointer; }
.aih-wz__status:hover { border-color: #D9D5F7; }
.aih-wz__status.is-on { border-color: #D9D5F7; background: #F7F6FE; }
.aih-wz__status-lbl { font-size: 13.5px; font-weight: 600; color: #2A3343; }
/* Section delimiter inside the wizard body */
.aih-wz__divider { border: 0; height: 1px; background: #ECEDF1; margin: 18px 0; }
/* "Applies to all products" callout — shown when no product conditions are set */
.aih-wz__allbox { display: flex; gap: 11px; align-items: flex-start; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.aih-wz__allbox-ico { color: #5B53E8; flex: 0 0 auto; display: flex; margin-top: 1px; }
.aih-wz__allbox-ico svg { width: 18px; height: 18px; }
.aih-wz__allbox strong { display: block; font-size: 13px; font-weight: 600; color: #3F38C9; }
.aih-wz__allbox span { display: block; font-size: 12px; color: #6B6F86; line-height: 1.45; margin-top: 2px; }
/* The step-1 "N of M products match" counter is the condition component's standard count line
   (.cnd-count, css/rules.css) since 2026-11-06 — no wizard-specific styling. */
/* UGC video wizard — "here's what will happen" recap (review step). */
.aih-wz__review { border: 1px solid #E2E4EA; border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.aih-wz__review-hd { display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px; background: linear-gradient(180deg, #F5F3FE, #FBFBFF); border-bottom: 1px solid #ECEDF1; }
.aih-wz__review-ico { width: 34px; height: 34px; border-radius: 9px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.aih-wz__review-ico svg { width: 18px; height: 18px; }
.aih-wz__review-title { font-size: 14px; font-weight: 800; color: #2A3343; }
.aih-wz__review-sub { font-size: 12px; color: #5B6473; line-height: 1.5; margin-top: 3px; }
.aih-wz__review-rows { display: flex; flex-direction: column; }
/* Spend guardrail callout under the review rows (video). */
.aih-wz__review-cost { margin: 10px 0 0; font-size: 11.5px; line-height: 1.5; color: #7A6326; background: #FBF8EF; border: 1px solid #F0E6CE; border-radius: 8px; padding: 8px 11px; }
.aih-wz__review-cost:empty { display: none; }
.aih-wz__review-row { display: flex; align-items: center; gap: 10px; padding: 9px 15px; border-top: 1px solid #F0F1F4; font-size: 12.5px; }
.aih-wz__review-k { flex: 0 0 116px; color: #646B78; font-weight: 600; }
.aih-wz__review-v { color: #2A3343; font-weight: 600; display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.aih-wz__review-v strong { color: #2A3343; font-weight: 800; }
.aih-wz__review-v .aih-wz__review-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; background: #F0EEFC; border: 1px solid #E2DEFA; color: #4A4396; border-radius: 6px; padding: 1px 7px; }
.aih-wz__review-row.is-warn .aih-wz__review-v { color: #C0492A; }
.aih-wz__review-row.is-zero .aih-wz__review-v, .aih-wz__review-row.is-zero .aih-wz__review-v strong { color: #C0492A; }
.aih-wz__review-spin { width: 13px; height: 13px; flex: 0 0 auto; border: 2px solid #CDD2DC; border-top-color: #5B53E8; border-radius: 50%; animation: aih-spin .7s linear infinite; display: inline-block; }
.aih-wz__review-statwrap { color: #5B6473; font-weight: 500; }
.aih-wz__review-pill { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; margin-right: 2px; }
.aih-wz__review-pill.is-active { color: #15803D; background: #E4F7EC; }
.aih-wz__review-pill.is-draft { color: #9A6B0E; background: #FBF1DC; }
/* A single condition has no bracket rail, but .rules-group__body still reserves the 46px
   rail column → the row reads as indented/not-left-aligned. Collapse the gutter in the wizard. */
.aih-wz .rules-group--norail > .rules-group__body { grid-template-columns: 1fr; }
.aih-wz__input.is-invalid { border-color: #E0573E; background: #FDF3F0; }
.aih-wz__fielderr { margin-top: 7px; font-size: 12px; font-weight: 500; color: #C0492A; line-height: 1.45; }
.aih-wz__promphead { display: flex; align-items: center; justify-content: space-between; }
.aih-wz__promphead .aih-wz__label { margin-bottom: 0; }
.aih-wz__improve { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #5B53E8; background: none; border: none; cursor: pointer; padding: 0; }
.aih-wz__improve svg { width: 12px; height: 12px; }
.aih-wz__improve .aih-spin { width: 12px; height: 12px; border-width: 2px; }
.aih-wz__textarea--tall { height: auto; min-height: 150px; flex: 1; }
.aih-wz__browse { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; color: #5B53E8; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 10px; padding: 10px; cursor: pointer; }
.aih-wz__browse:hover { background: #E7E3FA; }
/* Quality segmented control (low / medium / high) — shown for tier-quality models. */
.aih-wz__seg { display: flex; background: #F2F3F6; border-radius: 9px; padding: 3px; gap: 2px; }
.aih-wz__seg-btn { flex: 1; font-size: 12.5px; font-weight: 600; color: #5B6473; background: none; border: none; border-radius: 6px; padding: 7px 0; cursor: pointer; font-family: inherit; }
.aih-wz__seg-btn.is-on { color: #14171F; background: #FFFFFF; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10); }
/* Quality tier buttons carry a per-image price under the label. */
.aih-wz__seg-btn--q { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.aih-wz__seg-name { font-size: 12.5px; }
.aih-wz__qnote { margin: 7px 0 0; font-size: 11px; color: #6B7280; }
/* Insert-field chips above the prompt textarea — drop {title}/{brand}/… at the cursor. */
.aih-wz__fieldchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; }
.aih-wz__fieldchips-lbl { font-size: 11px; font-weight: 600; color: #6B7280; }
.aih-wz__fieldchip { font-size: 11.5px; font-weight: 600; color: #5B53E8; background: #F4F3FE; border: 1px solid #E4E1FB; border-radius: 7px; padding: 4px 9px; cursor: pointer; font-family: inherit; }
.aih-wz__fieldchip:hover { background: #ECEAF9; }
.aih-wz__browse svg { width: 16px; height: 16px; }
.aih-wz__preview { background: #FBFBFC; border: 1px solid #ECEDF1; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 11px; align-self: start; }
.aih-wz__preview-head { display: flex; align-items: center; justify-content: space-between; }
.aih-wz__preview-title { font-size: 12.5px; font-weight: 700; color: #2A3343; }
.aih-wz__preview-badge { font-size: 10px; font-weight: 700; color: #5B53E8; background: #EEEDFC; padding: 2px 8px; border-radius: 999px; }
.aih-wz__preview-prod { display: flex; align-items: center; gap: 10px; background: #FFFFFF; border: 1px solid #E6E7EC; border-radius: 10px; padding: 7px; cursor: pointer; text-align: left; }
.aih-wz__preview-prod:hover { border-color: #D9D5F7; }
.aih-wz__preview-emoji { width: 38px; height: 38px; border-radius: 8px; background: #EEF2FF; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.aih-wz__preview-pmeta { flex: 1; min-width: 0; }
.aih-wz__preview-pname { display: block; font-size: 12.5px; font-weight: 600; color: #2A3343; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aih-wz__preview-psub { display: block; font-size: 10.5px; color: #6B7280; }
.aih-wz__preview-box { aspect-ratio: 1 / 1; border-radius: 11px; border: 1px solid #ECEDF1; background: #FFFFFF; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.aih-wz__preview-idle { text-align: center; padding: 22px; }
.aih-wz__preview-bigemoji { font-size: 64px; }
.aih-wz__preview-bigemoji.is-faded { opacity: 0.55; font-size: 30px; }
.aih-wz__preview-hint { margin-top: 9px; font-size: 11.5px; color: #646B78; line-height: 1.45; }
.aih-wz__preview-state { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 11.5px; color: #646B78; }
.aih-wz__preview-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.aih-wz__preview-tag { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 700; color: #fff; background: rgba(20, 23, 31, 0.72); padding: 3px 8px; border-radius: 999px; }
/* 4 columns: the ORIGINAL product tile + up to 3 generated variants on one row. */
.aih-wz__preview-variants { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.aih-wz__preview-vthumb { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.aih-wz__preview-vthumb.is-on { border-color: #5B53E8; }
.aih-wz__preview-vthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Original (source) tile — neutral accent so it reads as the reference, not a result. */
.aih-wz__preview-vthumb--orig.is-on { border-color: #6B7280; }
.aih-wz__preview-vbadge--orig { color: #fff; background: rgba(20, 23, 31, 0.82); }
.aih-wz__preview-tag.is-orig { background: rgba(75, 85, 99, 0.92); }
.aih-wz__preview-vemoji { font-size: 26px; }
.aih-wz__preview-vbadge { position: absolute; bottom: 3px; right: 3px; font-size: 7.5px; font-weight: 700; color: #2A3343; background: rgba(255, 255, 255, 0.9); padding: 1px 4px; border-radius: 999px; }
.aih-wz__preview-gen { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #5B53E8; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 9px; padding: 9px; cursor: pointer; }
.aih-wz__preview-gen:hover { background: #E7E3FA; }
.aih-wz__preview-gen:disabled { opacity: 0.7; cursor: default; }
.aih-wz__preview-gen svg { width: 14px; height: 14px; }
.aih-wz__preview-save { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #1F8A5B; background: #E4F7EC; border: 1px solid #C7EBD5; border-radius: 9px; padding: 9px; cursor: pointer; }
.aih-wz__preview-save:hover { background: #D6F2E2; }
.aih-wz__preview-save svg { width: 14px; height: 14px; }
.aih-wz__preview-note { font-size: 10.5px; color: #646B78; text-align: center; line-height: 1.4; }
/* UGC lip-sync preview (audio-avatar): test-on label, spoken-script box, full-clip button + video */
.aih-wz__preview-sub { font-size: 11px; color: #646B78; text-align: center; margin: -2px 0 2px; }
.aih-wz__preview-script { font-size: 12.5px; line-height: 1.5; color: #2A3343; background: #F6F7FA; border: 1px solid #E7E9EF; border-radius: 9px; padding: 9px 11px; font-style: italic; }
.aih-wz__preview-clip { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #2A3343; background: #fff; border: 1px solid #D7DAE0; border-radius: 9px; padding: 9px; cursor: pointer; }
.aih-wz__preview-clip:hover { background: #F6F7FA; }
.aih-wz__preview-clip:disabled { opacity: 0.55; cursor: default; }
.aih-wz__preview-clip svg { width: 14px; height: 14px; }
.aih-wz__preview-video { width: 100%; border-radius: 10px; overflow: hidden; background: #000; }
.aih-wz__preview-video video { display: block; width: 100%; max-height: 420px; }
/* Preview studio: inline actor picker (reuses the creator gallery — hide its verbose lead/note here),
   the voice line, and the editable script box. */
/* Preview studio: COMPACT actor row (the full creator gallery lives on the Creator step). */
.aih-wz__pvactorrow { display: flex; align-items: center; gap: 8px; }
.aih-wz__pvactorthumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid #E3E5EA; flex: 0 0 auto; }
.aih-wz__pvchange { margin-left: auto; font-size: 12px; font-weight: 600; color: #5B53E8; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.aih-wz__pvchange:hover { background: #E7E3FA; }
.aih-wz__pvvoice { text-align: left; margin: 2px 0 0; }
.aih-wz__pvscript { min-height: 72px; }
.aih-wz__pvest { text-align: left; margin-top: 3px; }
.aih-wz__pvest.is-warn { color: #C2410C; font-weight: 600; }
/* Real preview: product thumbnail, generated media, loading shimmer + result states */
.aih-wz__preview-thumb { width: 38px; height: 38px; border-radius: 8px; overflow: hidden; background: #EEF2FF; flex: 0 0 auto; }
.aih-wz__preview-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aih-wz__preview-cycle { flex: 0 0 auto; color: #6B7280; display: flex; }
.aih-wz__preview-cycle svg { width: 15px; height: 15px; }
.aih-wz__preview-prod.is-skeleton { justify-content: center; gap: 8px; color: #646B78; font-size: 11.5px; cursor: default; }
.aih-wz__preview-prod.is-empty { flex-direction: column; align-items: flex-start; gap: 2px; cursor: default; }
.aih-wz__preview-prod.is-empty:hover { border-color: #E6E7EC; }
.aih-wz__preview-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: aih-fade .35s ease both; }
.aih-wz__preview-box.is-loading { background: linear-gradient(100deg, #F4F5F8 30%, #ECEDF2 50%, #F4F5F8 70%); background-size: 340px 100%; animation: aih-shimmer 1.1s linear infinite; }
.aih-wz__preview-idleicon { color: #646B78; display: flex; justify-content: center; }
.aih-wz__preview-idleicon svg { width: 30px; height: 30px; }
.aih-wz__preview-state.is-err { color: #C0473A; }
.aih-wz__preview-state.is-err svg { width: 24px; height: 24px; }
/* Avatar test studio — actions row + audio/video result states (mirror the image-preview box) */
/* Test-studio actions on ONE row, equal width — "Preview the look" + "Render a full test clip" at 50%
   each (a lone button fills the row). "Hear the review" is hidden, so two buttons sit side-by-side. */
.aih-wz__pvactions { display: flex; gap: 8px; }
.aih-wz__pvactions > button { flex: 1; justify-content: center; }
.aih-wz__pvaudio { width: 100%; padding: 16px; color: #5B53E8; }
.aih-wz__pvaudio-icon { display: flex; justify-content: center; }
.aih-wz__pvaudio-icon svg { width: 30px; height: 30px; }
.aih-wz__pvaudio audio { width: 100%; max-width: 260px; margin-top: 2px; }
.aih-wz__preview-box.is-video,
.aih-wz__preview-box.is-combine { aspect-ratio: auto; background: #000; max-height: 480px; }
.aih-wz__pvclip { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; animation: aih-fade .35s ease both; }
/* Render-on-image overlay: combined still as backdrop + a spinner/status on top while the clip renders */
.aih-wz__pvover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 12px; text-align: center; background: rgba(20, 23, 31, 0.5); color: #fff; font-size: 11.5px; }
.aih-wz__pvover .aih-spin { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
/* Selected-language green ✓ confirmation (Language field — image + video) */
.aih-wz__selok { display: none; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; font-weight: 600; color: #1F8A5B; }
.aih-wz__selok.is-on { display: inline-flex; }
.aih-wz__selok svg { width: 14px; height: 14px; flex: 0 0 auto; }
/* Voice step — "selected voice" confirmation pill */
.aih-wz__voicesel { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 12px; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 9px; font-size: 12.5px; color: #2A3343; }
.aih-wz__voicesel-dot { width: 8px; height: 8px; border-radius: 50%; background: #34C759; flex: 0 0 auto; }
.aih-wz__voicesel-name { font-weight: 600; }
.aih-wz__voicesel-tag { font-size: 10px; font-weight: 700; color: #5B53E8; background: #fff; border: 1px solid #E2DEFA; padding: 2px 7px; border-radius: 999px; }
/* Casting (Creator & voice) — Simple/Advanced segmented toggle + per-product-gender blocks */
/* UGC video wizard — step 2 "Casting" bar. Matches the v2 handoff (UGC Recipe Wizard.dc.html):
   a bordered banner (not a bare row), label + Simple/Advanced toggle left-aligned. The help line
   sits just below (the handoff inlines it; below is the lower-risk layout pending a preview pass). */
.aih-wz__castbar { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; background: #FBFBFC; border: 1px solid #ECEDF1; border-radius: 11px; padding: 12px 15px; flex-wrap: wrap; }
.aih-wz__castbar-lbl { font-size: 12.5px; font-weight: 700; color: #3B414C; flex: 0 0 auto; }
.aih-wz__castbar-help { font-size: 11.5px; color: #6B7280; margin: 0 0 16px; line-height: 1.45; }
/* Step-2 creator / voice columns as bordered CARDS (UGC handoff). Video-only — the image wizard
   never renders these columns, so the framing can't leak into it. */
.aih-wz__castcard { border: 1px solid #ECEDF1; border-radius: 12px; padding: 16px; }
/* Demo card header row: "Creator on camera · N actors" / "Voice · tap ▶ for a sample". */
.aih-wz__castcard-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.aih-wz__castcard-lbl { font-size: 12px; font-weight: 700; color: #3B414C; }
.aih-wz__castcard-sub { color: #6B7280; font-weight: 500; }
.aih-wz__castcard-count { font-size: 11px; color: #6B7280; }
.aih-wz__seg { display: inline-flex; background: #F0F1F4; border: 1px solid #E3E5EA; border-radius: 9px; padding: 2px; }
.aih-wz__seg-btn { font-size: 12.5px; font-weight: 600; color: #5A6473; background: transparent; border: 0; border-radius: 7px; padding: 5px 14px; cursor: pointer; }
.aih-wz__seg-btn.is-on { background: #fff; color: #2A3343; box-shadow: 0 1px 2px rgba(20, 23, 31, 0.12); }
.aih-wz__castblock { border: 1px solid #ECEDF1; border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #FCFCFD; }
.aih-wz__castblock-hd { margin-bottom: 10px; }
.aih-wz__castblock-title { display: block; font-size: 13.5px; font-weight: 700; color: #2A3343; }
.aih-wz__castblock-hint { display: block; font-size: 11.5px; color: #646B78; margin-top: 2px; }
.aih-wz__castblock--male { border-left: 3px solid #5B8DEF; }
.aih-wz__castblock--female { border-left: 3px solid #E86AA6; }
.aih-wz__castblock--other { border-left: 3px solid #B0B6C0; }
/* UGC image builder — Shot setting: scene-preset pills + a compact optional free-text detail */
.aih-wz__scenes { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 10px; }
.aih-wz__scene { font-size: 12.5px; font-weight: 600; color: #5A6473; background: #F4F5F7; border: 1px solid #E3E5EA; border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.aih-wz__scene:hover { background: #ECEDF1; }
.aih-wz__scene.is-on { color: #FFFFFF; background: #5B53E8; border-color: #5B53E8; }
.aih-wz__shotnotes { min-height: 54px; }
.aih-wz__pvgen { margin-top: 2px; }
.aih-wz__pvgentext { font-size: 12.5px; line-height: 1.5; color: #2A3343; background: #F7F8FA; border: 1px solid #ECEDF1; border-radius: 9px; padding: 9px 11px; white-space: pre-wrap; }
.aih-wz__preview-vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Preset-looks gallery ──────────────────────────────────────────────────── */
.aih-gallery { width: 880px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; background: #FFFFFF; border-radius: 18px; box-shadow: 0 30px 70px rgba(16, 24, 40, 0.32); overflow: hidden; animation: aih-pop .16s ease; }
.aih-gallery__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #F0F1F4; flex: 0 0 auto; }
.aih-gallery__head > div:first-child { flex: 1; }
.aih-gallery__h { margin: 0; font-size: 18px; font-weight: 700; }
.aih-gallery__sub { margin: 2px 0 0; font-size: 13px; color: #646B78; }
.aih-gallery__list { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.aih-gallery__loading { display: flex; justify-content: center; padding: 40px 0; }
.aih-gallery__row { border: 1px solid #ECEDF1; border-radius: 13px; background: #FFFFFF; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.aih-gallery__info { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.aih-gallery__name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #2A3343; }
.aih-gallery__saved { font-size: 9px; font-weight: 700; color: #1F8A5B; background: #E4F7EC; padding: 2px 7px; border-radius: 999px; }
.aih-gallery__prompt { font-size: 11.5px; color: #646B78; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aih-gallery__actions { align-self: flex-start; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aih-gallery__use { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #FFFFFF; background: #5B53E8; border: none; border-radius: 8px; padding: 8px 13px; cursor: pointer; }
.aih-gallery__use:hover { background: #4A43D6; }
.aih-gallery__use svg { width: 13px; height: 13px; }
.aih-gallery__del { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #C0334A; background: #FCEBEE; border: 1px solid #F6D2D9; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.aih-gallery__del:hover { background: #F8DDE2; }
.aih-gallery__del:disabled { opacity: .5; cursor: default; }
.aih-gallery__del svg { width: 13px; height: 13px; }
.aih-gallery__thumb { width: 96px; height: 80px; border-radius: 10px; border: 1px solid #ECEDF1; display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; flex: 0 0 auto; }
.aih-gallery__media { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Original → generated: the product's own image, an arrow, then the generated look. */
.aih-gallery__thumb.is-ba { width: 210px; display: flex; align-items: stretch; gap: 0; font-size: 0; }
.aih-gallery__bacell { position: relative; flex: 1 1 0; height: 100%; overflow: hidden; }
.aih-gallery__baarrow { flex: 0 0 auto; width: 24px; display: flex; align-items: center; justify-content: center; color: #646B78; background: #FFFFFF; }
.aih-gallery__baarrow svg { width: 15px; height: 15px; }
.aih-gallery__balabel { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #FFFFFF; background: rgba(17,19,24,.62); padding: 2px 0; text-align: center; line-height: 1.25; }
.aih-gallery__empty { text-align: center; font-size: 13px; color: #646B78; padding: 30px 0; }

/* ── Approval review: two-column ───────────────────────────────────────────── */
.aih-ap__filter { flex: 0 0 auto; width: 150px; }
.aih-ap__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.aih-ap__col { padding: 22px 28px; display: flex; flex-direction: column; overflow: auto; }
.aih-ap__col--orig { border-right: 1px solid #ECEDF1; }
.aih-ap__eyebrow { font-size: 11px; font-weight: 700; color: #646B78; text-transform: uppercase; letter-spacing: .05em; flex: 0 0 auto; }
.aih-ap__eyebrow.is-ai { color: #5B53E8; }
.aih-ap__img { margin-top: 12px; flex: 1; min-height: 160px; border-radius: 14px; border: 1px solid #ECEDF1; overflow: hidden; background: #FAFAFB; display: flex; align-items: center; justify-content: center; position: relative; }
.aih-ap__img.is-ai { border-color: #E0DDFA; }
.aih-ap__bigemoji { font-size: 64px; }
.aih-ap__ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; }
.aih-ap__ph .aih-ap__bigemoji { font-size: 44px; opacity: .45; }
.aih-ap__phnote { font-size: 12.5px; font-weight: 600; color: #6B7280; }
.aih-ap__reroll { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #5B53E8; background: #F0EEFC; border: 1px solid #E2DEFA; border-radius: 9px; padding: 9px 14px; cursor: pointer; margin-left: auto; }
.aih-ap__reroll:hover { background: #E7E3FA; }
.aih-ap__reroll svg { width: 15px; height: 15px; }
.aih-ap__search { flex: 0 1 240px; min-width: 140px; border: 1px solid #E2E4EA; border-radius: 9px; padding: 8px 12px; font-size: 12.5px; font-family: inherit; background: #fff; color: #2A3343; }
.aih-ap__search:focus { outline: none; border-color: #5B53E8; }
.aih-ap__search::placeholder { color: #AEB4BE; }
/* Re-roll modal — edit prompt + regenerate one output. */
.aih-rr-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(15, 18, 26, .55); display: flex; align-items: center; justify-content: center; padding: 24px; animation: aih-fade .15s ease; }
.aih-rr { width: 100%; max-width: 460px; background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(16, 24, 40, .28); padding: 20px; animation: aih-pop .15s ease; }
.aih-rr__head { display: flex; align-items: center; justify-content: space-between; }
.aih-rr__title { font-size: 16px; font-weight: 700; color: #2A3343; }
.aih-rr__sub { margin: 6px 0 14px; font-size: 12.5px; color: #6B6F86; line-height: 1.45; }
.aih-rr__ref { display: flex; align-items: center; gap: 11px; background: #FAFAFB; border: 1px solid #ECEDF1; border-radius: 11px; padding: 9px; margin-bottom: 13px; }
.aih-rr__refimg { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 9px; overflow: hidden; background: #EEF2FF; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.aih-rr__refimg img { width: 100%; height: 100%; object-fit: cover; }
.aih-rr__refttl { font-size: 13px; font-weight: 600; color: #2A3343; }
.aih-rr__refsub { font-size: 11.5px; color: #6B7280; margin-top: 2px; }
.aih-rr__label { display: block; font-size: 12px; font-weight: 600; color: #2A3343; margin-bottom: 6px; }
.aih-rr__ta { width: 100%; box-sizing: border-box; border: 1px solid #D5D8DF; border-radius: 9px; padding: 10px 12px; font-size: 13px; font-family: inherit; line-height: 1.5; resize: vertical; }
.aih-rr__ta:focus { outline: none; border-color: #5B53E8; }
.aih-rr__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.aih-rr__status { flex: 1; font-size: 12px; color: #646B78; }
.aih-rr__status.is-busy { color: #5B53E8; }
.aih-rr__status.is-err { color: #C0473A; }
.aih-rr__gen { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #fff; background: #5B53E8; border: none; border-radius: 10px; padding: 10px 20px; cursor: pointer; }
.aih-rr__gen:hover { background: #4F47D6; }
.aih-rr__gen:disabled { opacity: .6; cursor: default; }
.aih-ap__pname { margin-top: 5px; font-size: 15px; font-weight: 600; }
.aih-ap__metagrid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; flex: 0 0 auto; }
.aih-ap__k { font-size: 11px; color: #6B7280; }
.aih-ap__v { font-size: 13px; font-weight: 600; margin-top: 3px; }
.aih-ap__v.is-mono { font-family: ui-monospace, monospace; }
.aih-ap__rhead { display: flex; align-items: center; justify-content: space-between; }
.aih-ap__status { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; }
.aih-ap__recipe { position: absolute; bottom: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(20, 23, 31, 0.7); padding: 4px 10px; border-radius: 999px; }
.aih-ap__recipe svg { width: 11px; height: 11px; }
.aih-ap__prompt { margin-top: 12px; background: #FBFBFC; border: 1px solid #ECEDF1; border-radius: 11px; padding: 11px; flex: 0 0 auto; max-height: 130px; overflow: auto; }
.aih-ap__prompttext { margin-top: 6px; font-size: 12.5px; color: #5B6473; line-height: 1.5; }
.aih-ap__foot { border-top: 1px solid #ECEDF1; padding: 14px 24px; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.aih-ap__nav { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #5B6473; background: #FFFFFF; border: 1px solid #E2E4EA; border-radius: 9px; padding: 9px 14px; cursor: pointer; }
.aih-ap__nav:hover { background: #F7F8FA; }
.aih-ap__nav svg { width: 14px; height: 14px; }
.aih-ap__pos { margin-left: auto; font-size: 12.5px; color: #6B7280; }
.aih-ap__reject { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #FFFFFF; background: #E5533C; border: none; border-radius: 9px; padding: 10px 18px; cursor: pointer; }
.aih-ap__reject:hover { background: #D2452F; }
.aih-ap__reject svg { width: 15px; height: 15px; }
.aih-ap__approve { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #FFFFFF; background: #1F8A5B; border: none; border-radius: 9px; padding: 10px 18px; cursor: pointer; }
.aih-ap__approve:hover { background: #197A4F; }
.aih-ap__approve svg { width: 15px; height: 15px; }

@media (max-width: 880px) {
    .aih-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aih-wz__kinds, .aih-wz__tgrid { grid-template-columns: 1fr; }
    .aih-condrow { grid-template-columns: 1fr 1fr; }
    .aih-e2-cards { grid-template-columns: 1fr 1fr; }
    .aih-wz__s1 { grid-template-columns: 1fr; }
    .aih-wz__s2 { grid-template-columns: 1fr; }
    .aih-wz__s1top, .aih-wz__s1top--lang { grid-template-columns: 1fr; }
    .aih-wz__preview { position: static; }
    .aih-wz__preview-variants { grid-template-columns: repeat(2, 1fr); }
    .aih-ap__grid { grid-template-columns: 1fr; }
    .aih-ap__col--orig { border-right: none; border-bottom: 1px solid #ECEDF1; }
    .aih-e2-feats { grid-template-columns: 1fr; }
}
/* Step indicator compaction — the 5-step UGC stepper's full nowrap labels overflow on large
   phones / small tablets (measured: ~11px over at 600px). Below 640px keep EVERY dot + connector
   (progress stays visible) but show only the ACTIVE step's name and drop the CREATE/TARGET/PUBLISH
   group captions; the modal subtitle already names the current step. Shared by both wizards. */
@media (max-width: 640px) {
    .aih-wz__steplbl { display: none; }
    .aih-wz__steplbl.is-on { display: inline; }
    .aih-wz__group { display: none; }
    .aih-wz__line { margin: 0 6px; }
}
@media (max-width: 560px) {
    .aih-grid { grid-template-columns: minmax(0, 1fr); }
    .aih-empty { padding: 32px 16px 28px; }
    .aih-e2-mock { width: 100%; max-width: 300px; }   /* fixed 300px mock overflowed the phone column */
    .aih-e2-cards { grid-template-columns: 1fr; }
    .aih-wz-overlay { padding: 10px; }
    .aih-wz__foot { bottom: -10px; }
    /* Wizard shell on phones — recover horizontal space (shared by BOTH the image-recipe
       and UGC-video wizards, so they stay consistent on mobile). */
    .aih-wz__head { padding: 16px 16px 0; }
    .aih-wz__steps { padding: 14px 16px; }
    .aih-wz__body { padding: 18px 16px; gap: 13px; }
    .aih-wz__foot { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
    /* Voice + creator pickers (UGC): keep two readable columns; let the filter rows wrap. */
    .aih-wz__voicegrid { grid-template-columns: 1fr 1fr; }
    .aih-wz__voicelang, .aih-wz__voicefilters { flex-wrap: wrap; }
    .aih-wz__voicelang .aih-sel, .aih-wz__voicefilters .aih-sel { flex: 1 1 auto; min-width: 0; }
    /* Conditions row: stack field / operator / value so inputs don't get crushed. */
    .aih-condrow { grid-template-columns: 1fr; }
}

/* ── Onboarding wizard (store URL → brand kit) — reuses the .aih-wz shell ── */
.onb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.onb-foot--center { justify-content: center; }
.onb-foot .btn { display: inline-flex; align-items: center; gap: 7px; }
.onb-foot .btn svg { width: 16px; height: 16px; }

.onb-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 11px 13px; border: 1.5px solid #E2E4EA; border-radius: 11px; background: #FFFFFF; cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.onb-kind:hover { border-color: #C3C6D4; }
.onb-kind.is-on { border-color: #5B53E8; background: rgba(91, 83, 232, 0.05); box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.12); }
.onb-kind__lbl { font-size: 13.5px; font-weight: 700; color: #2A3343; }
.onb-kind__sub { font-size: 11.5px; color: #6B7280; }

.onb-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.onb-swatch { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(15, 18, 26, 0.10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.onb-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.onb-chip { font-size: 12.5px; font-weight: 600; color: #3B414C; background: #F4F5F7; border: 1px solid #ECEDF1; border-radius: 8px; padding: 6px 11px; }
.onb-chip--link { text-decoration: none; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.onb-chip--link:hover { background: #EEEDFC; border-color: #C9C5F2; color: #4A3Fd0; }
.onb-logo { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; background: #F7F8FA; border: 1px solid #ECEDF1; border-radius: 12px; max-width: 220px; }
.onb-logo img { max-width: 180px; max-height: 64px; object-fit: contain; display: block; }

.onb-build { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 20px 8px; }
.onb-build__title { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: #2A3343; }
.onb-build .aih-wz__lead { text-align: center; max-width: 440px; }
.onb-build__spin { width: 52px; height: 52px; border-radius: 14px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; }
.onb-build__spin--err { background: #FCEBEB; color: #D14343; }
.onb-build__spin--err svg { width: 24px; height: 24px; }
.onb-build__list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; }
.onb-build__item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #4A4660; }
.onb-build__bullet { flex: 0 0 auto; display: inline-flex; }

.onb-spin { display: inline-block; border: 2.5px solid rgba(91, 83, 232, 0.25); border-top-color: #5B53E8; border-radius: 50%; animation: onb-spin .7s linear infinite; vertical-align: middle; box-sizing: border-box; }
.onb-build__spin--err .onb-spin { display: none; }
@keyframes onb-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Onboarding wizard v2 — the 5-step "Set up {project}" flow
   (Onboarding Wizard.dc.html handoff). Rides .aih-wz-overlay; everything else
   is its own onb2-* namespace so the recipe wizards stay untouched.
   ========================================================================== */
.onb2 { width: 1080px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(16,24,40,.28); display: flex; flex-direction: column; color: #14171F; overflow: hidden; }
.onb2__head { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 13px; padding: 18px 24px 0; }
.onb2__mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg,#6E66EE,#8A5CEC); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 5px 14px rgba(91,83,232,.3); }
.onb2__mark svg { width: 20px; height: 20px; stroke: #fff; }
.onb2__hi { flex: 1; min-width: 0; }
.onb2__hi h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.onb2__hi p { margin: 2px 0 0; font-size: 12.5px; color: #646B78; }
.onb2__steps { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 15px 24px 0; border-bottom: 1px solid #F0F1F4; }
.onb2-step { flex: 1; display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 8px 4px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; font: inherit; }
.onb2-step.is-cur { border-bottom-color: #5B53E8; }
.onb2-step__dot { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #EEF0F3; color: #5B6270; }   /* 5.4:1 on its #EEF0F3 dot */
.onb2-step__dot svg { width: 12px; height: 12px; }
.onb2-step.is-cur .onb2-step__dot { background: #5B53E8; color: #fff; }
.onb2-step.is-done .onb2-step__dot { background: #DCFCE7; color: #15803D; }
.onb2-step__lbl { font-size: 12.5px; font-weight: 600; color: #646B78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb2-step.is-cur .onb2-step__lbl { color: #2A3343; font-weight: 700; }
.onb2-step.is-done .onb2-step__lbl { color: #5B6473; }
.onb2__body { flex: 1 1 auto; overflow: auto; padding: 22px 24px; min-height: 300px; display: flex; flex-direction: column; gap: 15px; }
/* Column-flex children default to flex-shrink:1 — when a step overflows, every card was
   COMPRESSED below its content height and (overflow:hidden) visibly CUT its sections
   (colors / typography / logo on the brand-kit step). Never shrink; the body scrolls. */
.onb2__body > * { flex: 0 0 auto; }
.onb2__body--fade { animation: ob2-fade .18s ease; }
@keyframes ob2-fade { from { transform: translateY(5px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.onb2__foot { flex: 0 0 auto; border-top: 1px solid #F0F1F4; padding: 13px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; row-gap: 0; background: #fff; }
.onb2-prev { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #5B6473; background: none; border: none; cursor: pointer; padding: 8px 4px; font-family: inherit; }
.onb2-prev.is-off { color: #646B78; cursor: default; pointer-events: none; }
.onb2-prev svg { width: 15px; height: 15px; }
.onb2-count { font-size: 12px; color: #646B78; }
.onb2-spacer { flex: 1; }
.onb2-skip { font-size: 13px; font-weight: 600; color: #646B78; background: none; border: none; cursor: pointer; padding: 8px 4px; font-family: inherit; }
.onb2-next { display: inline-flex; align-items: center; gap: 7px; background: #5B53E8; color: #fff; border: none; border-radius: 10px; padding: 11px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(91,83,232,.3); font-family: inherit; }
.onb2-next:hover { background: #4F47DE; }
.onb2-next:disabled { opacity: .7; cursor: default; }
.onb2-next svg { width: 15px; height: 15px; }

/* shared bits */
.onb2-banner { display: flex; align-items: flex-start; gap: 11px; background: #F4F3FE; border: 1px solid #E6E3FB; border-radius: 11px; padding: 14px 16px; font-size: 12.5px; line-height: 1.5; color: #4A4470; }
.onb2-banner strong { color: #3B3470; font-weight: 600; }
.onb2-banner > svg { width: 17px; height: 17px; stroke: #5B53E8; flex: 0 0 auto; margin-top: 1px; }
.onb2-banner--col { flex-direction: column; gap: 0; }
.onb2-banner__row { display: flex; align-items: flex-start; gap: 11px; }
.onb2-banner__row svg { width: 17px; height: 17px; stroke: #5B53E8; flex: 0 0 auto; margin-top: 1px; }
.onb2-banner__legend { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #E6E3FB; }
.onb2-banner__legend span { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.onb2-banner__legend i { width: 20px; height: 20px; border-radius: 50%; background: #5B53E8; color: #fff; font-size: 11px; font-weight: 800; font-style: normal; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-banner__legend i svg { width: 11px; height: 11px; stroke: #fff; }
.onb2-banner--grad { background: linear-gradient(135deg,#F4F3FE,#EEF7F1); border-color: #E3E6F6; align-items: center; }
.onb2-banner__spark { width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid #E6E3FB; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-banner__spark svg { width: 18px; height: 18px; stroke: #5B53E8; }
.onb2-banner__spark--lg { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg,#6E66EE,#8A5CEC); border: none; box-shadow: 0 6px 16px rgba(91,83,232,.3); }
.onb2-banner__spark--lg svg { stroke: #fff; width: 24px; height: 24px; }
.onb2-banner--grad > div { flex: 1; min-width: 0; }
.onb2-banner__t { font-size: 13px; font-weight: 700; color: #2A2350; }
.onb2-banner__d { font-size: 11.5px; color: #6A6494; margin-top: 1px; }
.onb2-banner--big h3 { margin: 0; font-size: 16px; font-weight: 700; color: #2A2350; }
.onb2-banner--big p { margin: 3px 0 0; font-size: 13px; color: #5B6473; }
.onb2-card { border: 1px solid #E7E8EC; border-radius: 13px; overflow: hidden; background: #fff; }
.onb2-card__head { padding: 11px 16px; background: #FBFBFC; border-bottom: 1px solid #EFF0F3; display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; color: #3B414C; }
.onb2-card__head em { font-size: 11.5px; font-weight: 400; font-style: normal; color: #6B7280; }
.onb2-card__pad { padding: 16px; }
.onb2-card__row { padding: 16px; display: flex; align-items: center; gap: 14px; }
.onb2-card__txt { flex: 1; min-width: 0; }
.onb2-card__t { font-size: 13.5px; font-weight: 700; color: #2A3343; }
.onb2-card__d { font-size: 12px; color: #646B78; margin-top: 2px; line-height: 1.45; }
.onb2-badgeA { width: 21px; height: 21px; border-radius: 6px; background: #EEEDFC; color: #5B53E8; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }
.onb2-pill { font-size: 11px; font-weight: 600; color: #5B53E8; background: #F4F3FE; border: 1px solid #E6E3FB; border-radius: 6px; padding: 3px 8px; }
.onb2-soon { font-size: 9.5px; font-weight: 700; color: #9A6B0E; background: #FBF1DC; border-radius: 5px; padding: 2px 6px; margin-left: 7px; }
.onb2-lbl { display: block; font-size: 12px; font-weight: 600; color: #5B6473; margin-bottom: 6px; }
.onb2-caps { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #646B78; text-transform: uppercase; margin-bottom: 8px; }
.onb2-in { width: 100%; height: 40px; border: 1.5px solid #E2E4EA; border-radius: 9px; padding: 0 12px; font-size: 13px; outline: none; box-sizing: border-box; font-family: inherit; }
.onb2-in:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91,83,232,.1); }
.onb2-in--mono { font-family: ui-monospace, monospace; }
.onb2-in.is-valid { border-color: #9FD8B4; }
.onb2-ta { width: 100%; min-height: 54px; border: 1px solid #E2E4EA; border-radius: 9px; padding: 10px 12px; font-size: 13px; line-height: 1.5; outline: none; resize: vertical; box-sizing: border-box; font-family: inherit; }
.onb2-ta:focus { border-color: #5B53E8; }
.onb2-ta--tall { min-height: 84px; }
.onb2-inline { display: flex; gap: 10px; align-items: stretch; }
.onb2-inline .onb2-in { flex: 1; min-width: 0; }
.onb2-btn { display: inline-flex; align-items: center; gap: 7px; background: #5B53E8; color: #fff; border: 1px solid #5B53E8; border-radius: 9px; padding: 0 16px; height: 40px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(91,83,232,.28); font-family: inherit; flex: 0 0 auto; }
.onb2-btn:hover { background: #4F47DE; }
.onb2-btn svg { width: 14px; height: 14px; }
.onb2-btn--ghost { background: #F4F3FE; color: #5B53E8; border-color: #E6E3FB; box-shadow: none; }
.onb2-btn--ghost:hover { background: #ECEAFC; }
.onb2-btn--ok { background: #DCFCE7; color: #15803D; border-color: #BBE7CA; box-shadow: none; cursor: default; }
.onb2-btn--ok:hover { background: #DCFCE7; }
.onb2-btn--sm { height: 30px; padding: 0 11px; font-size: 12px; }
.onb2-msg { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #15803D; }
.onb2-msg svg { width: 14px; height: 14px; stroke: #15803D; flex: 0 0 auto; }
.onb2-msg--err { color: #D14343; }
.onb2-msg--err svg { stroke: #D14343; }
.onb2-or { display: flex; align-items: center; gap: 12px; padding: 2px 4px; }
.onb2-or span { flex: 1; height: 1px; background: #EBECEF; }
.onb2-or em { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #646B78; text-transform: uppercase; font-style: normal; }
.onb2-shopmark { width: 46px; height: 46px; border-radius: 11px; background: #95BF47; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 3px 9px rgba(149,191,71,.35); }
.onb2-ftgrid { padding: 16px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.onb2-ft { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; border: 1.5px solid #E7E8EC; background: #fff; border-radius: 11px; padding: 13px 14px; cursor: pointer; text-align: left; font-family: inherit; }
.onb2-ft.is-on { border-color: #5B53E8; background: #F7F6FE; }
.onb2-ft__mark { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; font-family: ui-monospace, monospace; }
.onb2-ft__name { font-size: 13px; font-weight: 700; color: #2A3343; }
.onb2-ft__desc { font-size: 11.5px; color: #646B78; line-height: 1.4; }
.onb2-optin.onb2-needs { background: #FEF3C7; color: #92400E; }
.onb2-ainote { margin-top: 10px; border: 1px solid #F5D9A8; background: #FFFBF2; border-radius: 12px; padding: 10px 14px; font-size: 12.5px; line-height: 1.5; color: #5B6473; }
.onb2-ainote strong { color: #92400E; }
.onb2-mapneed { border: 1px solid #F5D9A8; background: #FFFBF2; border-radius: 13px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; animation: ob2-fade .2s ease; }
.onb2-mapneed__t { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #92400E; }
.onb2-mapneed__t svg { width: 16px; height: 16px; flex: 0 0 auto; }
.onb2-mapneed__d { margin: 0; font-size: 12.5px; line-height: 1.5; color: #5B6473; }
.onb2-mapneed__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.onb2-done { border: 1px solid #CDEBD8; border-radius: 13px; overflow: hidden; animation: ob2-fade .2s ease; }
.onb2-done__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #F1FBF5; border-bottom: 1px solid #DCF2E5; font-size: 12.5px; color: #5B6473; }
.onb2-done__head strong { font-size: 13px; font-weight: 700; color: #15803D; }
.onb2-done__head em { margin-left: auto; font-size: 11.5px; color: #646B78; font-style: normal; }
.onb2-done__tick { width: 26px; height: 26px; border-radius: 50%; background: #DCFCE7; color: #15803D; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-done__tick svg { width: 15px; height: 15px; }
.onb2-done__pad { padding: 13px 16px; }
.onb2-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.onb2-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #3B4A63; background: #F2F4F7; border: 1px solid #E6E8EC; border-radius: 6px; padding: 4px 9px; }
.onb2-chip svg { width: 10px; height: 10px; stroke: #5B53E8; }
.onb2-chip--mono { font-family: ui-monospace, monospace; }
.onb2-chip--more { color: #5B53E8; background: #F4F3FE; border-color: #E6E3FB; }
.onb2-chip--x b { cursor: pointer; font-weight: 700; color: #6B7280; margin-left: 2px; }
.onb2-chip--add { color: #5B53E8; background: #F4F3FE; border-color: #E6E3FB; cursor: pointer; font-family: inherit; }
.onb2-chlist { display: flex; flex-direction: column; gap: 11px; }
.onb2-ch { border: 1px solid #E7E8EC; border-radius: 13px; overflow: hidden; background: #fff; }
.onb2-ch.is-linked { border-color: #CDEBD8; background: #F6FCF8; }
.onb2-ch__row { display: flex; align-items: center; gap: 13px; padding: 13px 15px; }
.onb2-ch__mark { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex: 0 0 auto; }
.onb2-ch__txt { flex: 1; min-width: 0; }
.onb2-ch__name { font-size: 14px; font-weight: 700; color: #2A3343; display: flex; align-items: center; }
.onb2-linked { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: #15803D; background: #DCFCE7; border: 1px solid #BBE7CA; border-radius: 5px; padding: 2px 6px; margin-left: 7px; }
.onb2-linked svg { width: 9px; height: 9px; }
.onb2-ch__sub { font-size: 12px; color: #646B78; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb2-ch__ai { display: flex; align-items: center; gap: 11px; border-top: 1px solid #E6E3FB; background: #F7F6FE; padding: 12px 15px; }
.onb2-ch__ai.is-on { background: #FBFBFE; border-top-color: #EEEDF6; }
.onb2-ch__aiico { width: 30px; height: 30px; border-radius: 8px; background: #EAE8FB; color: #7A72E0; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-ch__ai.is-on .onb2-ch__aiico { background: #EEEDFC; color: #5B53E8; }
.onb2-ch__aiico svg { width: 16px; height: 16px; }
.onb2-ch__aitxt { flex: 1; min-width: 0; }
.onb2-ch__ait { font-size: 12.5px; font-weight: 700; color: #2A3343; display: flex; align-items: center; gap: 7px; }
.onb2-recbadge { font-size: 9px; font-weight: 800; letter-spacing: .05em; color: #5B53E8; background: #EAE8FB; border: 1px solid #DAD5F5; border-radius: 5px; padding: 2px 6px; }
.onb2-ch__aid { font-size: 11.5px; line-height: 1.45; color: #6A6398; margin-top: 2px; }
.onb2-ch__ai.is-on .onb2-ch__aid { color: #5B53E8; }
.onb2-ch__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px 12px; background: #FBFBFE; }
.onb2-ch__chips .onb2-chip { color: #4A4470; background: #F1F0FB; border-color: #E4E2F6; }
.onb2-switchwrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.onb2-switchwrap em { font-size: 10px; font-weight: 700; color: #6A6398; font-style: normal; }
.onb2-switch { width: 44px; height: 24px; border-radius: 999px; background: #C9C4F0; border: none; position: relative; cursor: pointer; padding: 0; transition: background .15s; flex: 0 0 auto; }
.onb2-switch span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.onb2-switch.is-on { background: #5B53E8; }
.onb2-switch.is-on span { left: 22px; }
.onb2-switch:disabled { opacity: .45; cursor: not-allowed; }
/* A channel the plan does not include: visible, greyed, with the reason and a way to the plans (2026-11-19). */
.onb2-chx.is-locked { background: #FAFAFB; border-style: dashed; }
.onb2-chx.is-locked .onb2-chx__logo { filter: grayscale(1); opacity: .6; }
.onb2-chx.is-locked .onb2-chx__name { color: #6B7280; }
.onb2-planlock { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 10px; font-weight: 600; letter-spacing: .04em; vertical-align: middle; }
.onb2-domain { display: flex; align-items: center; gap: 10px; background: #FBFBFC; border: 1px solid #E7E8EC; border-radius: 11px; padding: 11px 14px; }
.onb2-domain > svg { width: 16px; height: 16px; stroke: #5B53E8; flex: 0 0 auto; }
.onb2-domain .onb2-in { flex: 1; height: 36px; font-weight: 600; }
/* Brand-kit URL fields (store + optional project site) */
.onb2-urls { display: flex; flex-direction: column; gap: 14px; }
.onb2-urls .onb2-caps { margin-bottom: 6px; }
.onb2-caps--lbl { margin: 0; flex: 0 0 auto; letter-spacing: .05em; }
.onb2-hint { margin: 6px 2px 0; font-size: 11.5px; color: #6B7280; }
.onb2-from { font-size: 11px; font-weight: 600; color: #15803D; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.onb2-from svg { width: 13px; height: 13px; }
.onb2-roles { padding: 16px; display: grid; grid-template-columns: repeat(7,1fr); gap: 10px; }
.onb2-role { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.onb2-role__sw { width: 100%; height: 46px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 1px 3px rgba(16,24,40,.12); cursor: pointer; position: relative; overflow: hidden; display: block; }
.onb2-role__sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.onb2-role__hex { font-size: 10.5px; font-weight: 600; color: #3B4A63; background: #F2F4F7; border: 1px solid #E6E8EC; border-radius: 5px; padding: 2px 6px; font-family: ui-monospace, monospace; }
.onb2-role__name { font-size: 11px; color: #646B78; text-align: center; }
.onb2-typo { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.onb2-card__pad .onb2-typo { padding: 0; }
.onb2-logo { padding: 16px; display: flex; align-items: center; gap: 14px; }
.onb2-logo__box { width: 150px; height: 74px; border: 1px solid #E7E8EC; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; position: relative; }
.onb2-logo__box em { position: absolute; top: 6px; left: 6px; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; color: #5B53E8; background: #EEEDFC; border-radius: 4px; padding: 2px 5px; font-style: normal; }
.onb2-logo__box img { max-width: 120px; max-height: 52px; object-fit: contain; }
.onb2-logo__none { font-size: 12px; color: #6B7280; }
.onb2-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #3B4A63; cursor: pointer; }
.onb2-check input { width: 16px; height: 16px; accent-color: #5B53E8; }
.onb2-check span { display: none; }
.onb2-reclist { display: flex; flex-direction: column; gap: 9px; }
.onb2-caps--group { padding: 6px 2px 1px; margin: 0; letter-spacing: .06em; font-size: 10.5px; font-weight: 800; }
.onb2-reclist .onb2-rec { display: flex; align-items: center; gap: 13px; border: 1px solid #E7E8EC; background: #fff; border-radius: 12px; padding: 13px 15px;  }
.onb2-reclist .onb2-rec.is-on { border-color: #E0DEF7; background: #FBFBFE; }
.onb2-rec__ico { width: 34px; height: 34px; border-radius: 9px; background: #F4F5F7; color: #6B7280; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-reclist .onb2-rec.is-on .onb2-rec__ico { background: #EEEDFC; color: #5B53E8; }
.onb2-rec__ico svg { width: 17px; height: 17px; }
.onb2-rec__txt { flex: 1; min-width: 0; }
.onb2-rec__t { font-size: 13px; font-weight: 700; color: #2A3343; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.onb2-rec__d { font-size: 11.5px; color: #646B78; margin-top: 2px; line-height: 1.4; }
.onb2-detected { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: #15803D; background: #DCFCE7; border: 1px solid #BBE7CA; border-radius: 5px; padding: 2px 6px; }
.onb2-detected svg { width: 9px; height: 9px; }
.onb2-optin { font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: #B26A00; background: #FFF4E0; border: 1px solid #F2DBB0; border-radius: 5px; padding: 2px 6px; }
.onb2-recap { border: 1px solid #E7E8EC; border-radius: 13px; overflow: hidden; }
.onb2-recap__row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.onb2-recap__row.has-divider { border-top: 1px solid #F0F1F4; }
.onb2-recap__ico { width: 28px; height: 28px; border-radius: 8px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-recap__ico svg { width: 15px; height: 15px; }
.onb2-recap__ico.is-pending { background: #fff; border: 1.5px dashed #D3D7DF; }
.onb2-suggested { color: #5B53E8; background: #F4F3FE; border-color: #E6E3FB; }
.onb2-recap__txt { flex: 1; min-width: 0; }
.onb2-recap__txt div { font-size: 13px; font-weight: 600; color: #2A3343; }
.onb2-recap__txt em { font-size: 12px; color: #646B78; font-style: normal; }
.onb2-recap__ok { font-size: 11.5px; font-weight: 700; color: #15803D; display: inline-flex; align-items: center; gap: 5px; }
.onb2-recap__ok svg { width: 13px; height: 13px; }
.onb2-recap__ok.is-muted { color: #6B7280; font-weight: 600; }   /* "Later" / "Waiting": nothing to do now, not a failure */
.onb2-recap__jump { font-size: 11.5px; font-weight: 600; color: #5B53E8; background: none; border: none; cursor: pointer; font-family: inherit; }
.onb2-nextsteps { display: flex; flex-direction: column; gap: 8px; }
.onb2-nextsteps a { font-size: 12.5px; font-weight: 600; color: #5B53E8; text-decoration: none; }
.onb2-nextsteps a:hover { text-decoration: underline; }
.onb2-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #14171F; color: #fff; font-size: 13px; font-weight: 500; padding: 11px 18px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.3); z-index: 10050; display: flex; align-items: center; gap: 9px; }
.onb2-toast svg { width: 16px; height: 16px; stroke: #6EE7A0; }
.onb2-tplpick { position: fixed; inset: 0; background: rgba(20,23,31,.45); z-index: 10040; display: flex; align-items: center; justify-content: center; padding: 32px; animation: ob2-fade .14s ease; }
.onb2-tplpick__card { width: 100%; max-width: 680px; max-height: 84vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.32); }
.onb2-tplpick__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid #F0F1F4; position: sticky; top: 0; background: #fff; }
.onb2-tplpick__ico { width: 36px; height: 36px; border-radius: 10px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.onb2-tplpick__ico svg { width: 19px; height: 19px; }
.onb2-tplpick__head > div { flex: 1; min-width: 0; }
.onb2-tplpick__t { font-size: 15px; font-weight: 700; color: #2A2350; }
.onb2-tplpick__d { font-size: 12px; color: #646B78; margin-top: 2px; line-height: 1.45; }
.onb2-tplpick__grid { padding: 18px 22px 22px; display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.onb2-tpl { display: flex; flex-direction: column; text-align: left; border: 1.5px solid #E7E8EC; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; padding: 0; font-family: inherit; }
.onb2-tpl.is-on { border-color: #5B53E8; box-shadow: 0 0 0 3px #EEEDFC; }
.onb2-tpl__name { padding: 10px 12px 12px; font-size: 12.5px; font-weight: 700; color: #2A3343; }
@media (max-width: 900px) {
  .onb2-roles { grid-template-columns: repeat(4,1fr); }
  .onb2-ftgrid, .onb2-typo { grid-template-columns: 1fr; }
  .onb2__steps { overflow-x: auto; }
}

/* ── Approval bulk actions (T3) — approve/reject everything in view ───────── */
.aih-ap__bulk { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border, #e2e4ea); background: var(--bg-primary, #fff); font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.aih-ap__bulk--approve { color: #16a34a; }
.aih-ap__bulk--approve:hover { border-color: #16a34a; background: rgba(22, 163, 74, 0.06); }
.aih-ap__bulk--reject { color: #dc2626; }
.aih-ap__bulk--reject:hover { border-color: #dc2626; background: rgba(220, 38, 38, 0.06); }

/* Variant-group generation count on the match counters (dedup toggle ON) */
.aih-wz__matchcount-gen { color: #5B53E8; font-weight: 600; }

/* ── Approval quick-actions (T11): copy-prompt + open-product-page ────────── */
.aih-ap__prhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aih-ap__copy { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border, #e2e4ea); background: var(--bg-primary, #fff); border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-weight: 600; color: #5B6473; cursor: pointer; font-family: inherit; }
.aih-ap__copy:hover { border-color: #5B53E8; color: #5B53E8; }
.aih-ap__copy svg { width: 12px; height: 12px; }
.aih-ap__plink { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: #5B53E8; text-decoration: none; }
.aih-ap__plink:hover { text-decoration: underline; }
.aih-ap__plink svg { width: 13px; height: 13px; }

/* "Unseen only" — a real SWITCH (reuses the wizard's .aih-tsw track/knob, scaled
   to the 32px toolbar) + label + count badge, so on/off reads at a glance:
   grey track = off, indigo track + tinted chip + white count pill = on. */
.aih-ap__unseen { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 8px; border-radius: 8px; border: 1px solid var(--border, #e2e4ea); background: var(--bg-primary, #fff); font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; color: var(--text-secondary, #6b7280); }
.aih-ap__unseen .aih-tsw { width: 32px; height: 18px; padding: 2px; }
.aih-ap__unseen .aih-tsw__knob { width: 14px; height: 14px; }
.aih-ap__unseen:hover { border-color: #5B53E8; color: #5B53E8; }
.aih-ap__unseen.is-on { border-color: #5B53E8; background: rgba(91, 83, 232, 0.08); color: #5B53E8; }
.aih-ap__unseen-n { padding: 1px 8px; border-radius: 999px; background: #F0F1F4; color: #5B6473; font-size: 11.5px; font-weight: 700; }
.aih-ap__unseen.is-on .aih-ap__unseen-n { background: #5B53E8; color: #FFFFFF; }

/* Hover tooltips in the approval reviewer — a toast-style accent bubble with an
   arrow, attached to the control (content = the [data-tip] attribute; replaces
   the browser's native title tooltips). Default opens ABOVE (footer actions);
   [data-tip-pos="down"] opens BELOW (the head bar sits at the viewport top);
   [data-tip-align="right"] pins the bubble's right edge to controls that sit
   near the screen's right edge. Shown on hover AND keyboard focus, after a
   short delay so quick mouse passes don't flash bubbles. */
.aih-ap [data-tip] { position: relative; }
.aih-ap [data-tip]::after {
    content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
    background: #5B53E8; color: #FFFFFF; font-size: 12px; font-weight: 600; line-height: 1.45; text-align: center;
    padding: 7px 11px; border-radius: 9px; width: max-content; max-width: 250px; white-space: normal;
    box-shadow: 0 8px 24px rgba(91, 83, 232, 0.35); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility .14s; z-index: 80;
}
.aih-ap [data-tip]::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translate(-50%, 4px);
    border: 5px solid transparent; border-bottom-width: 0; border-top-color: #5B53E8;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility .14s; z-index: 80;
}
.aih-ap [data-tip]:hover::after, .aih-ap [data-tip]:focus-visible::after,
.aih-ap [data-tip]:hover::before, .aih-ap [data-tip]:focus-visible::before {
    opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: .28s;
}
.aih-ap [data-tip][data-tip-pos="down"]::after { bottom: auto; top: calc(100% + 10px); transform: translate(-50%, -4px); }
.aih-ap [data-tip][data-tip-pos="down"]::before { bottom: auto; top: calc(100% + 5px); transform: translate(-50%, -4px); border-top: 0; border-bottom: 5px solid #5B53E8; }
.aih-ap [data-tip][data-tip-align="right"]::after { left: auto; right: -4px; transform: translate(0, 4px); }
.aih-ap [data-tip][data-tip-pos="down"][data-tip-align="right"]::after { transform: translate(0, -4px); }
.aih-ap [data-tip]:hover[data-tip-pos="down"]::after, .aih-ap [data-tip]:focus-visible[data-tip-pos="down"]::after,
.aih-ap [data-tip]:hover[data-tip-pos="down"]::before, .aih-ap [data-tip]:focus-visible[data-tip-pos="down"]::before { transform: translate(-50%, 0); }
.aih-ap [data-tip]:hover[data-tip-align="right"]::after, .aih-ap [data-tip]:focus-visible[data-tip-align="right"]::after { transform: translate(0, 0); }

/* Out-of-credit banner on the templates/recipes hub. Amber rather than red: nothing is broken and
   nothing was lost — the parked generations resume on their own once the project is topped up. */
.aih-credit-warn {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 16px; padding: 12px 14px;
    border: 1px solid #F2E3C2; border-radius: 10px; background: #FFFBF2;
    font-size: 13px; color: #6B5A32;
}
.aih-credit-warn__icon { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.aih-credit-warn__msg  { flex: 1 1 260px; min-width: 0; }
.aih-credit-warn__cta {
    flex: 0 0 auto; cursor: pointer;
    padding: 7px 13px; border-radius: 8px;
    border: 1px solid var(--accent, #5B53E8); background: var(--accent, #5B53E8); color: #fff;
    font-size: 12px; font-weight: 600;
}
.aih-credit-warn__cta:hover { filter: brightness(1.06); }

/* WORK IN FLIGHT — same layout as the two warning banners, deliberately NOT their colour.
   Those two are problems to act on; this one is the pipeline working, and dressing it in amber
   would train people to read a healthy mass generation as something wrong. Indigo is the app's
   own accent, so it reads as activity rather than alarm. */
.aih-credit-warn.aih-render-busy {
    border-color: #DEDBF8; background: #F6F5FE; color: #453FA0;
}
.aih-render-busy .aih-credit-warn__icon {
    display: inline-block;
    animation: aih-busy-spin 1.6s linear infinite;
}
@keyframes aih-busy-spin { to { transform: rotate(360deg); } }
/* The spin is decoration on a line that already states the numbers, so it is the first thing to
   go when someone has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    .aih-render-busy .aih-credit-warn__icon { animation: none; }
}

/* ============================================================================
 * Onboarding — PLAN step (step 5)
 * The one step that cannot be skipped, so the cards read as a decision: a clear
 * selected state, and a price that is legible before anything else.
 * ========================================================================== */
.onb2-plans {
    display: grid;
    /* THREE columns, not auto-fit: six plans across five columns leaves the last one
       stranded alone on a second row. 3x2 is balanced and keeps each card wide enough
       for its description to breathe. */
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 4px 0 14px;
}
@media (max-width: 900px) { .onb2-plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .onb2-plans { grid-template-columns: 1fr; } }
.onb2-plan {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 15px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .13s, box-shadow .13s, transform .13s;
}
.onb2-plan:hover { border-color: #c7cbd1; transform: translateY(-1px); }
.onb2-plan.is-on {
    border-color: var(--accent, #5B53E8);
    box-shadow: 0 0 0 3px rgba(91, 83, 232, .13);
}
.onb2-plan__name  { font-size: 13px; font-weight: 700; color: #1f2430; }
.onb2-plan__price { font-size: 22px; font-weight: 700; color: #1f2430; line-height: 1.15; }
.onb2-plan__price span { font-size: 12px; font-weight: 600; color: #6b7280; }
.onb2-plan__meta  { font-size: 11.5px; font-weight: 600; color: var(--accent, #5B53E8); }
.onb2-plan__desc  { font-size: 11.5px; line-height: 1.5; color: #6b7280; }
.onb2-plan__pick {
    margin-top: 6px;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #6b7280;
}
.onb2-plan.is-on .onb2-plan__pick { color: var(--accent, #5B53E8); }
/* A paid plan this server cannot sell (no Stripe price / Stripe not configured): visibly
   inert, with the reason in place of the pick label. */
.onb2-plan.is-off { cursor: not-allowed; opacity: .62; background: #fafafa; }
.onb2-plan.is-off:hover { border-color: #e5e7eb; transform: none; }
.onb2-plan.is-off .onb2-plan__pick { text-transform: none; letter-spacing: 0; color: #9a6b0e; }
.onb2-plan__note { font-size: 12px; line-height: 1.55; color: #6b7280; }
/* A recoverable server answer (Stripe not configured, webhook still pending): stays on
   screen under the cards, unlike a toast. */
.onb2-plan__notice {
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
    color: #9a6b0e;
    background: #fbf1dc;
}
.onb2-plan__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* A refusal toast: amber, not the success green. Paired with a different mark in
   toast(kind='warn') — colour alone is not a signal everyone receives. */
.onb2-toast--warn { background: #7c2d12; color: #fff; }
.onb2-toast--warn svg { color: #fdba74; }

/* Rename dialog inline error (a blank name used to be a silent no-op). */
.aih-dlg__err { margin-top: 6px; font-size: 12px; color: #B3261E; }

/* In-app confirmation dialog (replaces the native confirm()). */
.aih-dlg--confirm { max-width: 460px; }
.aih-dlg__msg { margin: 6px 0 14px; font-size: 13px; line-height: 1.55; color: #4b5563; overflow-wrap: anywhere; }
.aih-dlg__btn--danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.aih-dlg__btn--danger:hover { background: #9a1f18; }

/* Wizard footer: Previous · Step N of 6 · Skip · Continue must wrap on a phone, not overflow. */
@media (max-width: 640px) {
    .onb2__foot { flex-wrap: wrap; row-gap: 8px; }
    .onb2__foot > * { min-width: 0; }
}

/* ════════════════════════════════════════════════════════════════════════════
   UGC Recipe Wizard — step 2 "Creator & voice", per the handoff design
   (.adplex-handoff/adplex-admin/project/UGC Recipe Wizard.dc.html). Built by
   drawCreatorVoice / drawCreator / drawVoice in js/catalog-templates/templates-page.js.
   ════════════════════════════════════════════════════════════════════════════ */
.uw-s2 { display: flex; flex-direction: column; gap: 20px; padding: 4px 0; animation: uw-fade .15s ease; }
@keyframes uw-fade { from { transform: translateY(4px); } to { transform: translateY(0); } }

.uw-castbar { display: flex; align-items: center; gap: 13px; background: #FBFBFC; border: 1px solid #ECEDF1; border-radius: 11px; padding: 12px 15px; flex-wrap: wrap; }
.uw-castbar-lbl { font-size: 12.5px; font-weight: 700; color: #3B414C; flex: 0 0 auto; }
.uw-castbar-hint { font-size: 11.5px; color: #6B7280; line-height: 1.4; }
.uw-seg { display: flex; background: #ECEDF1; border-radius: 9px; padding: 3px; gap: 2px; }
.uw-castseg { width: 240px; flex: 0 0 auto; }
.uw-segbtn { flex: 1; font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 0; border-radius: 7px; border: none; cursor: pointer; background: transparent; color: #646B78; }
.uw-segbtn.is-on { background: #FFFFFF; color: #14171F; box-shadow: 0 1px 2px rgba(16,24,40,0.12); }

.uw-segtabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.uw-segtab { display: flex; align-items: center; gap: 12px; text-align: left; background: #FFFFFF; border: 1.5px solid #E2E4EA; border-radius: 12px; padding: 11px 13px; cursor: pointer; font: inherit; min-width: 0; }
.uw-segtab.is-on { background: #F4F3FE; border-color: #5B53E8; }
.uw-segtab-face { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: 0 0 auto; }
.uw-segtab-face.is-m { background: linear-gradient(135deg,#D9ECF6,#A9CFE6); }
.uw-segtab-face.is-f { background: linear-gradient(135deg,#FBE9F0,#F3C2D6); }
.uw-segtab-face.is-o { background: linear-gradient(135deg,#E7E2D6,#C7BBA2); }
.uw-segtab-txt { flex: 1; min-width: 0; }
.uw-segtab-lbl { display: block; font-size: 13px; font-weight: 700; color: #2A3343; }
.uw-segtab.is-on .uw-segtab-lbl { color: #14171F; }
.uw-segtab-desc { display: block; font-size: 11px; color: #6B7280; margin-top: 1px; }
.uw-segtab-check { width: 18px; height: 18px; border-radius: 50%; background: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

.uw-rule { height: 1px; background: #F0F1F4; margin-top: 4px; }
.uw-rule--tight { margin: 2px 0 12px; }
.uw-rule--hd { margin: 0 0 14px; }

.uw-castgrid { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
.uw-castcard { border: 1px solid #ECEDF1; border-radius: 12px; padding: 16px; min-width: 0; }
.uw-cardhd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.uw-cardhd-lbl { font-size: 12px; font-weight: 700; color: #3B414C; }
.uw-cardhd-sub { color: #6B7280; font-weight: 500; }
.uw-cardhd-meta { font-size: 11px; color: #6B7280; }
.uw-grp { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: #646B78; text-transform: uppercase; margin-bottom: 7px; }
.uw-tip { margin: 13px 0 0; font-size: 11.5px; color: #6B7280; line-height: 1.55; }
.uw-tip:empty { display: none; }
.uw-empty { margin: 8px 0 0; font-size: 12px; color: #6B7280; line-height: 1.5; }
.uw-loading { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6B7280; padding: 6px 2px; }
.uw-span { grid-column: 1 / -1; }

/* creators */
.uw-crgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.uw-crgrid--recent { margin-bottom: 14px; }
.uw-cr { position: relative; aspect-ratio: 1 / 1; border: 2px solid #ECEDF1; border-radius: 11px; background: #F4F5F7; padding: 0; cursor: pointer; overflow: visible; }
.uw-cr.is-on { border-color: #5B53E8; }
.uw-cr-img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; }
.uw-cr-check { position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%; background: #5B53E8; display: flex; align-items: center; justify-content: center; }
.uw-cr-del { position: absolute; top: 4px; left: 4px; width: 17px; height: 17px; border-radius: 50%; background: rgba(20,23,31,0.72); color: #fff; font-size: 13px; line-height: 16px; text-align: center; opacity: 0; transition: opacity .12s; }
.uw-cr:hover .uw-cr-del, .uw-cr:focus-visible .uw-cr-del { opacity: 1; }
.uw-cr-del:hover { background: #E5533C; }
.uw-cr-pop { position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); z-index: 40; width: 132px; height: 132px; border-radius: 14px; box-shadow: 0 12px 34px rgba(16,24,40,0.32); border: 3px solid #fff; background: #fff; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s ease, visibility 0s linear .12s; }
.uw-cr-pop img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; display: block; }
.uw-cr-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; }
.uw-cr:hover .uw-cr-pop { opacity: 1; visibility: visible; transition: opacity .12s ease .5s, visibility 0s linear .5s; }
.uw-cr-add { aspect-ratio: 1 / 1; border: 1.5px dashed #CDD2DA; border-radius: 11px; background: #FBFBFC; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: #646B78; font: inherit; padding: 0; }
.uw-cr-add:hover { border-color: #5B53E8; color: #5B53E8; }
.uw-cr-add.is-busy { cursor: progress; }
.uw-cr-add-lbl { font-size: 10.5px; font-weight: 600; }

/* voices */
.uw-selwrap { position: relative; display: flex; align-items: center; }
.uw-sel { appearance: none; -webkit-appearance: none; border: 1px solid #E2E4EA; border-radius: 8px; padding: 6px 24px 6px 9px; font: inherit; font-size: 12px; font-weight: 600; color: #14171F; background: #FFFFFF; cursor: pointer; outline: none; }
.uw-sel:focus { border-color: #5B53E8; }
.uw-selcaret { position: absolute; right: 8px; pointer-events: none; display: flex; }
.uw-vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.uw-vbox { border: 1px solid #E9EAEE; border-radius: 11px; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #FBFBFC; }
.uw-vt { display: flex; align-items: flex-start; gap: 8px; position: relative; text-align: left; border: 1.5px solid #ECEDF1; background: #FFFFFF; border-radius: 9px; padding: 9px 10px; cursor: pointer; font: inherit; min-width: 0; }
.uw-vt.is-on { border-color: #5B53E8; background: #F4F3FE; }
.uw-vt-txt { flex: 1; min-width: 0; padding-right: 14px; }
.uw-vt-name { display: block; font-size: 11.5px; font-weight: 700; color: #2A3343; line-height: 1.3; overflow-wrap: anywhere; }
.uw-vt.is-on .uw-vt-name { color: #5B53E8; }
.uw-vt-sub { display: block; font-size: 10px; color: #6B7280; margin-top: 2px; text-transform: capitalize; }
.uw-vt-check { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: #5B53E8; display: flex; align-items: center; justify-content: center; }
.uw-play { position: relative; align-self: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #C7C3F5; background: #FFFFFF; color: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: pointer; transition: all .12s; box-shadow: 0 1px 2px rgba(16,24,40,0.08); }
.uw-play:hover, .uw-play.is-playing { background: #5B53E8; border-color: #5B53E8; color: #fff; }
.uw-play:hover { transform: scale(1.08); }
.uw-play.is-disabled { opacity: .4; cursor: not-allowed; transform: none; background: #FFFFFF; color: #5B53E8; border-color: #C7C3F5; }
.uw-play-ico { display: flex; }
.uw-play-tip { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); background: #14171F; color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; padding: 4px 8px; border-radius: 6px; pointer-events: none; z-index: 30; box-shadow: 0 4px 12px rgba(16,24,40,0.25); opacity: 0; visibility: hidden; transition: opacity .1s, visibility 0s linear .1s; }
.uw-play-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: #14171F; }
.uw-play:not(.is-disabled):hover .uw-play-tip { opacity: 1; visibility: visible; transition: opacity .1s .5s, visibility 0s linear .5s; }
.uw-play.is-playing .uw-play-tip { display: none; }
.uw-more { font: inherit; font-size: 12px; font-weight: 600; color: #5B53E8; background: #FFFFFF; border: 1px solid #E2E4EA; border-radius: 8px; padding: 8px; cursor: pointer; }
.uw-more:disabled { color: #AEB4BE; cursor: default; }

@media (max-width: 880px) {
    .uw-castgrid { grid-template-columns: 1fr; }
    .uw-segtabs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .uw-vgrid, .uw-vbox { grid-template-columns: 1fr 1fr; }
    .uw-castseg { width: 100%; }
}

/* UGC Recipe Wizard — step 3 "Script & model" (handoff). Built by drawScriptModel. */
.uw-s3 { display: flex; flex-direction: column; gap: 18px; animation: uw-fade .15s ease; }
.uw-field { min-width: 0; }
.uw-lbl { display: block; font-size: 12px; font-weight: 600; color: #5B6473; margin-bottom: 6px; }
.uw-lbl--flush { margin-bottom: 0; }
.uw-lbl--tight { margin-bottom: 3px; }
.uw-lbl-sub { color: #6B7280; font-weight: 500; }
.uw-hint { margin: 6px 0 0; font-size: 11.5px; color: #6B7280; line-height: 1.5; }
.uw-hint--lead { margin: 0 0 9px; }
.uw-modelrow { display: grid; grid-template-columns: 1fr 220px; gap: 16px; align-items: start; }
.uw-modelrow.is-single { grid-template-columns: 1fr; }
.uw-bigselwrap { position: relative; display: flex; align-items: center; }
.uw-bigsel { appearance: none; -webkit-appearance: none; width: 100%; border: 1px solid #E2E4EA; border-radius: 9px; padding: 10px 28px 10px 12px; font: inherit; font-size: 13px; color: #14171F; background: #FFFFFF; cursor: pointer; outline: none; text-overflow: ellipsis; }
.uw-bigsel:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91,83,232,0.1); }
.uw-selcaret--big { right: 10px; }
.uw-modelnote { margin: 6px 0 0; font-size: 11.5px; color: #15803D; display: flex; align-items: flex-start; gap: 5px; line-height: 1.45; }
.uw-modelnote svg { flex: 0 0 auto; margin-top: 2px; }
.uw-modelnote.is-warn { color: #B45309; }
.uw-seg--tall .uw-segbtn { padding: 9px 0; }
.uw-modelopts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; }
.uw-optseg { min-width: 220px; }
.uw-opt { display: flex; align-items: center; gap: 12px; border: 1px solid #E2E4EA; background: #FFFFFF; border-radius: 10px; padding: 9px 12px; cursor: pointer; text-align: left; font: inherit; min-width: 240px; flex: 1 1 260px; }
.uw-opt.is-on { border-color: #D9D6F7; background: #FBFBFE; }
.uw-opt-txt { flex: 1; min-width: 0; }
.uw-opt-lbl { display: block; font-size: 12.5px; font-weight: 700; color: #2A3343; }
.uw-opt-hint { display: block; font-size: 11px; color: #6B7280; margin-top: 1px; line-height: 1.4; }
.uw-switch { width: 34px; height: 20px; border-radius: 999px; flex: 0 0 auto; padding: 2px; display: flex; background: #D5D8DF; justify-content: flex-start; transition: all .15s; box-sizing: border-box; }
.uw-switch-knob { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.is-on > .uw-switch { background: #5B53E8; justify-content: flex-end; }
.uw-switch--lg { width: 42px; height: 24px; padding: 2.5px; }
.uw-switch--lg .uw-switch-knob { width: 19px; height: 19px; }
.uw-rule--flush { margin: 0; }
.uw-sechd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.uw-miniseg { display: flex; background: #F2F3F6; border: 1px solid #E7E8EC; border-radius: 8px; padding: 2px; }
.uw-miniseg-btn { font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border: none; border-radius: 6px; cursor: pointer; background: transparent; color: #646B78; }
.uw-miniseg-btn.is-on { background: #FFFFFF; color: #5B53E8; box-shadow: 0 1px 2px rgba(16,24,40,0.12); }
.uw-aicard { width: 100%; display: flex; align-items: center; gap: 12px; border: 1px solid #E2E4EA; background: #FFFFFF; border-radius: 11px; padding: 13px 14px; cursor: pointer; text-align: left; margin-bottom: 10px; font: inherit; }
.uw-aicard.is-on { border-color: #D9D6F7; background: #FBFBFE; }
.uw-aicard-ico { width: 32px; height: 32px; border-radius: 8px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.uw-aicard-txt { flex: 1; min-width: 0; }
.uw-aicard-title { display: block; font-size: 13px; font-weight: 700; color: #2A3343; }
.uw-aicard-sub { display: block; font-size: 11.5px; color: #5B6473; margin-top: 1px; }
.uw-chiprow { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.uw-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.uw-chips-lbl { font-size: 11px; color: #6B7280; }
.uw-chip { font: inherit; font-size: 11px; font-weight: 600; color: #5B53E8; background: #F4F3FE; border: 1px solid #E6E3FB; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.uw-chip:hover { background: #EEEDFC; }
.uw-linkbtn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 600; color: #5B53E8; background: none; border: none; cursor: pointer; padding: 2px 0; }
.uw-ta { display: block; width: 100%; box-sizing: border-box; height: 96px; border: 1px solid #E2E4EA; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.5; color: #14171F; outline: none; resize: vertical; }
.uw-ta:focus { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91,83,232,0.1); }
.uw-ta--exact { height: 90px; }
.uw-ta--shot { height: 72px; margin-top: 10px; }
.uw-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.uw-pill { font: inherit; font-size: 12.5px; font-weight: 600; color: #5B6473; background: #F2F3F6; border: 1px solid #E6E7EC; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.uw-pill:hover { border-color: #C7C3F5; }
.uw-pill.is-on { color: #fff; background: #5B53E8; border-color: #5B53E8; }
@media (max-width: 640px) {
    .uw-modelrow { grid-template-columns: 1fr; }
    .uw-opt, .uw-optseg { min-width: 0; flex-basis: 100%; }
}

/* UGC Recipe Wizard — step 4 "Preview & publish" (handoff). Built by drawPublishStep / uwSummary /
   buildAvatarPreviewPanel. */
.uw-s4 { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; animation: uw-fade .15s ease; }
.uw-s4-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.uw-s4-side { min-width: 0; position: sticky; top: 0; }

.uw-review { display: flex; align-items: center; gap: 12px; border: 1px solid #E9EAEE; background: #FFFFFF; border-radius: 11px; padding: 13px 15px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.uw-review.is-on { border-color: #C7EBD5; background: #F4FBF7; }
.uw-review-ico { width: 32px; height: 32px; border-radius: 8px; background: #DCFCE7; color: #15803D; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.uw-review-txt { flex: 1; min-width: 0; }
.uw-review-title { display: block; font-size: 13.5px; font-weight: 700; color: #14171F; }
.uw-review-sub { display: block; font-size: 12px; color: #5B6473; margin-top: 1px; }
.is-on > .uw-switch--ok { background: #1F8A5B; }

.uw-sum { border: 1px solid #E9EAEE; border-radius: 12px; overflow: hidden; }
.uw-sum-hd { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; background: #F4F3FE; border-bottom: 1px solid #ECE9FB; }
.uw-sum-ico { flex: 0 0 auto; margin-top: 1px; display: flex; }
.uw-sum-hdt { font-size: 12.5px; line-height: 1.5; color: #4A4470; }
.uw-sum-hdt strong { color: #3B3470; font-weight: 600; }
.uw-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #EFF0F3; border-top: 1px solid #EFF0F3; }
.uw-sum-cell { background: #FFFFFF; padding: 9px 14px; min-width: 0; }
.uw-sum-k { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: #646B78; text-transform: uppercase; margin-bottom: 3px; }
.uw-sum-v { font-size: 12px; font-weight: 600; color: #2A3343; line-height: 1.35; overflow-wrap: anywhere; }
.uw-sum-cell.is-warn .uw-sum-v { color: #B45309; }
.uw-sum-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #5B53E8; background: #F4F3FE; border-radius: 5px; padding: 1px 5px; }

.uw-cost { display: flex; align-items: flex-start; gap: 9px; background: #FFFBF0; border: 1px solid #F5E6BE; border-radius: 10px; padding: 11px 13px; }
.uw-cost-ico { flex: 0 0 auto; margin-top: 1px; display: flex; }
.uw-cost-txt { font-size: 12px; line-height: 1.5; color: #6B5A2A; }
.uw-cost-txt strong { color: #3B414C; }

.uw-studio { border: 1px solid #E9EAEE; border-radius: 13px; background: #FBFBFC; overflow: hidden; }
.uw-studio-hd { padding: 12px 14px; border-bottom: 1px solid #F0F1F4; display: flex; align-items: center; gap: 8px; }
.uw-studio-title { font-size: 12.5px; font-weight: 700; color: #14171F; }
.uw-studio-badge { margin-left: auto; font-size: 9.5px; font-weight: 700; color: #5B53E8; background: #EEEDFC; padding: 2px 7px; border-radius: 999px; }
.uw-studio-body { padding: 13px 14px; }
.uw-studio-lbl { display: block; font-size: 11px; font-weight: 600; color: #6B7280; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.uw-studio .aih-wz__preview-box.uw-studio-box { margin-top: 11px; width: 100%; min-height: 180px; aspect-ratio: auto; border: 1px dashed #E2E4EA; border-radius: 10px; background: #FFFFFF; box-sizing: border-box; }
.uw-studio .aih-wz__preview-box.uw-studio-box.is-video,
.uw-studio .aih-wz__preview-box.uw-studio-box.is-combine { border-style: solid; aspect-ratio: 9 / 16; min-height: 0; background: #0E1016; }
.uw-studio-actions { margin-top: 11px; display: flex; flex-direction: column; gap: 7px; }
.uw-sbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 600; color: #3B414C; background: #FFFFFF; border: 1px solid #E2E4EA; border-radius: 9px; padding: 9px; cursor: pointer; width: 100%; }
.uw-sbtn:hover:not(:disabled) { border-color: #C7C3F5; color: #14171F; }
.uw-sbtn--tint { color: #5B53E8; background: #F4F3FE; border-color: #E6E3FB; }
.uw-sbtn--tint:hover:not(:disabled) { background: #EEEDFC; color: #4A43D6; }
.uw-sbtn:disabled { opacity: .55; cursor: progress; }
.uw-studio-note { margin: 9px 0 0; font-size: 10px; color: #646B78; line-height: 1.45; }
.uw-studio-msg { margin: 0 0 11px; font-size: 12px; color: #5B6473; line-height: 1.5; }
.uw-studio .aih-wz__pvgen { margin-top: 12px; }

@media (max-width: 880px) {
    .uw-s4 { grid-template-columns: 1fr; }
    .uw-s4-side { position: static; }
}
@media (max-width: 480px) {
    .uw-sum-grid { grid-template-columns: 1fr; }
}

/* ── Setup wizard · step 2 "Where do you advertise?" (2026-10-22 redesign) ──────────────────
   One question + why, then channels grouped by how they connect, each row = real logo, one line
   on what it does, one button, and a slim AI switch. Replaces the banner/legend/chips layout. */
.onb2-chhead { margin: 2px 0 16px; }
.onb2-chhead__t { margin: 0; font-size: 17px; font-weight: 700; color: #14171F; letter-spacing: -.2px; }
.onb2-chhead__d { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: #5B6473; max-width: 640px; }
.onb2-chhead__d strong { color: #3B414C; font-weight: 600; }
.onb2-chgroup { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.onb2-chgroup__t { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6B7280; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.onb2-chgroup__t span { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #646B78; }
.onb2-chx { border: 1px solid #E9EAEE; border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .15s; }
.onb2-chx:hover { border-color: #D9D5F7; }
.onb2-chx.is-linked { border-color: #C7EBD5; }
.onb2-chx__row { display: flex; align-items: center; gap: 13px; padding: 13px 14px; }
.onb2-chx__logo { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid #EEF0F3; display: flex; align-items: center; justify-content: center; }
.onb2-chx__logo--sm { width: 28px; height: 28px; border-radius: 7px; }
.onb2-chx__txt { flex: 1; min-width: 0; }
.onb2-chx__name { font-size: 14px; font-weight: 650; color: #14171F; display: flex; align-items: center; flex-wrap: wrap; row-gap: 3px; }
.onb2-chx__desc { margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: #5B6473; }
.onb2-chx__btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: #5B53E8; border: 1px solid #5B53E8; border-radius: 9px; padding: 8px 16px; cursor: pointer; white-space: nowrap; }
.onb2-chx__btn:hover { background: #4A43D6; border-color: #4A43D6; }
.onb2-chx__btn svg { width: 14px; height: 14px; }
.onb2-chx__btn--done { color: #15803D; background: #F0FBF4; border-color: #C7EBD5; }
.onb2-chx__btn--done:hover { color: #116B33; background: #E3F7EA; border-color: #A9DFBD; }
.onb2-chx__ai { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid #F2F3F5; background: #FAFAFC; cursor: pointer; }
.onb2-chx__aiico { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; background: #EEEDFC; color: #5B53E8; display: flex; align-items: center; justify-content: center; }
.onb2-chx__aiico svg { width: 12px; height: 12px; }
.onb2-chx__aitxt { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: #3B414C; }
.onb2-chx__aitxt em { display: block; font-style: normal; font-weight: 500; font-size: 11.5px; color: #646B78; margin-top: 1px; }
.onb2-switch--sm { width: 36px; height: 20px; }
.onb2-switch--sm span { width: 16px; height: 16px; }
.onb2-switch--sm.is-on span { left: 18px; }
.onb2-chsoon:empty { display: none; }
.onb2-chsoon__row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px dashed #E2E4EA; border-radius: 10px; font-size: 12.5px; color: #5B6473; }
.onb2-chsoon__row strong { color: #3B414C; font-weight: 600; }
.onb2-chsoon__row > span:nth-child(2) { flex: 1; }
.onb2-chsoon__btn { font: inherit; font-size: 12px; font-weight: 600; color: #5B53E8; background: none; border: none; cursor: pointer; padding: 4px 6px; }
.onb2-chsoon__btn:hover { text-decoration: underline; }
@media (max-width: 560px) {
    .onb2-chx__row { flex-wrap: wrap; }
    .onb2-chx__txt { flex: 1 1 calc(100% - 56px); }
    .onb2-chx__btn { width: 100%; justify-content: center; }
}

/* ── Setup wizard · step 4 template picker with REAL previews (2026-10-22) ───────────────── */
.onb2-tplpick__card { max-width: 820px; display: flex; flex-direction: column; overflow: hidden; }
.onb2-tplpick__htxt { flex: 1; min-width: 0; }
.onb2-tplpick__t { font-size: 17px; color: #14171F; letter-spacing: -.2px; }
.onb2-tplpick__d { font-size: 13px; color: #5B6473; line-height: 1.55; margin-top: 5px; max-width: 640px; }
.onb2-tplpick__d strong { color: #3B414C; font-weight: 600; }
.onb2-tplpick__grid { overflow: auto; flex: 1; min-height: 0; gap: 14px; }
.onb2-tpl { transition: border-color .12s, box-shadow .12s, transform .12s; }
.onb2-tpl:hover { border-color: #C7C3F5; transform: translateY(-1px); }
.onb2-tpl__prev { position: relative; display: block; flex: 0 0 auto; height: 172px; background: #F4F5F8; border-bottom: 1px solid #F0F1F4; padding: 12px 0; box-sizing: border-box; }
.onb2-tpl__prev .ctp-mini { height: 100%; width: auto; aspect-ratio: 1 / 1; margin: 0 auto; border: 1px solid #E9EAEE; border-radius: 6px; box-shadow: 0 1px 3px rgba(20,23,31,.06); }
.onb2-tpl__tick { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: #5B53E8; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(91,83,232,.35); }
.onb2-tpl__tick svg { width: 13px; height: 13px; }
.onb2-tpl__name { display: block; padding: 10px 12px 0; font-size: 13.5px; font-weight: 650; color: #14171F; }
.onb2-tpl__desc { display: block; padding: 2px 12px 12px; font-size: 11.5px; line-height: 1.45; color: #646B78; }
.onb2-tplpick__foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid #F0F1F4; background: #fff; }
.onb2-tplpick__note { flex: 1; font-size: 12px; color: #6B7280; }
.onb2-tplpick__foot .onb2-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) {
    .onb2-tplpick { padding: 12px; }
    .onb2-tplpick__grid { grid-template-columns: repeat(2, 1fr); padding: 14px; }
    .onb2-tplpick__foot { flex-wrap: wrap; }
    .onb2-tplpick__note { flex: 1 1 100%; }
    .onb2-tplpick__foot .onb2-btn { flex: 1; justify-content: center; }
}

/* ── Setup wizard · step 5 "How will you use Adplex?" (2026-10-22 redesign) ──────────────── */
.onb2-planhead { margin: 2px 0 14px; }
.onb2-planfam { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.onb2-planfam__opt { text-align: left; font: inherit; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1.5px solid #E2E4EA; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.onb2-planfam__opt:hover { border-color: #C7C3F5; }
.onb2-planfam__opt.is-on { border-color: #5B53E8; box-shadow: 0 0 0 3px #EEEDFC; }
.onb2-planfam__opt strong { font-size: 13.5px; color: #14171F; font-weight: 650; }
.onb2-planfam__opt.is-on strong { color: #4A43D6; }
.onb2-planfam__opt span { font-size: 12px; color: #6B7380; line-height: 1.4; }
.onb2-plans2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: stretch; }
.onb2-plan2 { position: relative; display: flex; flex-direction: column; border: 1.5px solid #E7E8EC; border-radius: 14px; background: #fff; padding: 18px 16px 16px; }
.onb2-plan2.is-rec { border-color: #5B53E8; box-shadow: 0 6px 20px rgba(91,83,232,.10); }
.onb2-plan2.is-on { border-color: #1F8A5B; background: #F7FCF9; }
.onb2-plan2.is-off { opacity: .6; }
.onb2-plan2__flag { position: absolute; top: -10px; left: 14px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: #5B53E8; border-radius: 999px; padding: 3px 10px; }
.onb2-plan2__name { font-size: 14px; font-weight: 700; color: #2A3343; }
.onb2-plan2__price { margin-top: 6px; font-size: 28px; font-weight: 750; letter-spacing: -.02em; color: #14171F; }
.onb2-plan2__price span { font-size: 12.5px; font-weight: 500; color: #646B78; letter-spacing: 0; margin-left: 2px; }
.onb2-plan2__cr { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #5B53E8; }
.onb2-plan2__list { list-style: none; margin: 14px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.onb2-plan2__list li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.4; color: #3B414C; }
.onb2-plan2__list li svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 2px; color: #5B53E8; }
.onb2-plan2__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #E2E4EA; background: #fff; color: #3B414C; cursor: pointer; }
.onb2-plan2__btn:hover:not(:disabled) { border-color: #C7C3F5; color: #14171F; }
.onb2-plan2__btn.is-primary { background: #5B53E8; border-color: #5B53E8; color: #fff; }
.onb2-plan2__btn.is-primary:hover:not(:disabled) { background: #4A43D6; border-color: #4A43D6; color: #fff; }
.onb2-plan2.is-on .onb2-plan2__btn { background: #E7F7EE; border-color: #BFE8D0; color: #15803D; }
.onb2-plan2__btn svg { width: 14px; height: 14px; }
.onb2-plan2__btn:disabled { cursor: default; }
@media (max-width: 640px) {
    .onb2-planfam { grid-template-columns: 1fr; }
}

/* ── Onboarding step 1 · Shopify (store address only, no app) ─────────────────────────── */
.onb2-shop { border: 1px solid #DCEBC8; border-radius: 13px; background: linear-gradient(180deg, #F7FBF1 0%, #fff 62%); overflow: hidden; }
.onb2-shop.is-done { border-color: #CDEBD8; background: linear-gradient(180deg, #F2FBF5 0%, #fff 70%); }
.onb2-shop__row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 16px 4px; }
.onb2-shop.is-done .onb2-shop__row { padding-bottom: 12px; }
.onb2-shop__logo { width: 44px; height: 44px; border-radius: 11px; background: #fff; border: 1px solid #E3EEDA; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 2px 6px rgba(94,142,62,.12); }
.onb2-shop__logo--sm { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
.onb2-shop__txt { flex: 1; min-width: 0; }
.onb2-shop__t { font-size: 14px; font-weight: 700; color: #2A3343; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.onb2-shop__det { font-size: 11px; font-weight: 600; color: #4D7A2E; background: #EAF5DD; border-radius: 6px; padding: 2px 7px; }
.onb2-shop__d { font-size: 12.5px; color: #5B6473; line-height: 1.5; margin-top: 3px; }
.onb2-shop__form { padding: 10px 16px 16px 74px; }
.onb2-shop__addr { flex: 1; min-width: 0; display: flex; align-items: center; height: 40px; border: 1.5px solid #E2E4EA; border-radius: 9px; background: #fff; overflow: hidden; }
.onb2-shop__addr:focus-within { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91,83,232,.1); }
.onb2-shop__addr > span { padding: 0 2px 0 12px; font-size: 13px; color: #646B78; font-family: ui-monospace, monospace; }
.onb2-shop__addr .onb2-in { border: 0; height: 100%; padding-left: 2px; box-shadow: none; font-family: ui-monospace, monospace; }
.onb2-shop__addr .onb2-in:focus { box-shadow: none; }
.onb2-shop__hint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: #646B78; }
.onb2-shop__hint em { font-style: normal; font-family: ui-monospace, monospace; color: #5B6473; }
.onb2-shop__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px 14px 74px; border-top: 1px solid #E7F2EA; }
.onb2-shop__foot .onb2-msg { margin: 0; font-family: ui-monospace, monospace; font-weight: 500; }
.onb2-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: #5B53E8; cursor: pointer; }
.onb2-linkbtn:hover { text-decoration: underline; }
.onb2-shopopen { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; padding: 11px 14px; border: 1px dashed #D4E3C3; border-radius: 12px; background: #FAFCF7; cursor: pointer; color: #3B414C; }
.onb2-shopopen:hover { border-style: solid; border-color: #A9CB86; background: #F4F9EE; }
.onb2-shopopen__t { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; }
.onb2-shopopen__t strong { color: #2A3343; }
.onb2-shopopen__go { font-size: 12.5px; font-weight: 700; color: #4D7A2E; white-space: nowrap; }
@media (max-width: 640px) {
    .onb2-shop__form, .onb2-shop__foot { padding-left: 16px; }
    .onb2-shop__form .onb2-inline { flex-direction: column; }
    .onb2-shop__form .onb2-btn { justify-content: center; }
    .onb2-shopopen__go { display: none; }
}

/* Onboarding stepper — step 1 on a project with no product catalog (lead-gen / other). */
.onb2-step.is-skip .onb2-step__dot { background: #F1F2F5; color: #646B78; }   /* skipped: lighter dot, text still ≥ 4.5:1 (2026-11-25) */
.onb2-step.is-skip .onb2-step__lbl { color: #646B78; font-style: italic; }   /* skipped = italic, not unreadably pale */

/* ── Onboarding: the one-field store screen + the trial note (short flow, 2026-10-27) ── */
.onb2-store { max-width: 520px; margin: 18px auto 10px; text-align: center; }
.onb2-store__h { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: #14171F; letter-spacing: -0.01em; }
.onb2-store__p { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #5B6473; }
.onb2-store__form { display: flex; gap: 10px; }
.onb2-store__in { flex: 1; min-width: 0; height: 46px; font-size: 15px; padding: 0 14px; border: 1px solid #E2E4EA; border-radius: 10px; background: #fff; color: #14171F; }
.onb2-store__in:focus { outline: none; border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, .15); }
.onb2-store__form .onb2-next { height: 46px; white-space: nowrap; }
.onb2-store__err { min-height: 20px; margin-top: 8px; font-size: 13px; color: #B42318; }
.onb2-store__alt { margin-top: 6px; background: none; border: 0; padding: 4px; font-size: 13px; color: #6B7280; cursor: pointer; text-decoration: underline; }
.onb2-store__alt:hover { color: #5B53E8; }
@media (max-width: 560px) { .onb2-store__form { flex-direction: column; } .onb2-store__form .onb2-next { width: 100%; justify-content: center; } }
/* The "I don't sell products online" form: name + optional website, stacked (2026-11-09). */
.onb2-store__form--stack { flex-direction: column; }
.onb2-store__form--stack .onb2-store__in { flex: 0 0 auto; text-align: left; }
.onb2-store__form--stack .onb2-next { width: 100%; justify-content: center; }
/* An inline "why didn't Continue work" line in the footer (a toast alone vanished in seconds). */
.onb2-footmsg { flex-basis: 100%; order: -1; margin: 0 0 8px; padding: 8px 12px; border-radius: 9px; background: #FEF3F2; border: 1px solid #FECDCA; color: #912018; font-size: 13px; line-height: 1.45; }
.onb2-linknote { margin: 0 0 16px; }   /* a Meta / Google linking outcome at the top of Ad accounts */
.onb2-trial { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: #ECFDF3; border: 1px solid #ABEFC6; color: #05603A; font-size: 13px; line-height: 1.5; }
.onb2-trial svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
/* Last step: "Optimize every product with AI" (onbAiFeedCard) */
.onb2-aifeed { margin-top: 14px; }
.onb2-aifeed__pad { display: flex; align-items: center; gap: 12px; }
.onb2-aifeed__ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #F1F0FC; color: #5B53E8; display: inline-flex; align-items: center; justify-content: center; }
.onb2-aifeed__ico svg { width: 18px; height: 18px; }
.onb2-aifeed__txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; }
.onb2-aifeed__txt strong { display: block; color: #16181D; }
.onb2-aifeed__txt em { display: block; font-style: normal; color: #5B6473; }
@media (max-width: 560px) { .onb2-aifeed__pad { flex-wrap: wrap; } .onb2-aifeed__pad .onb2-btn { width: 100%; } }

/* ── Onboarding step 1: "Where do you sell?" (platform tiles + connect panel + file upload) ── */
.onb2-src { margin: 14px 0 4px; }
.onb2-src__h { font-size: 13px; font-weight: 700; color: #14171F; margin-bottom: 8px; }
.onb2-src__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.onb2-src__tile { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 9px 12px; border: 1px solid #E2E4EA; border-radius: 10px; background: #fff;
  font: 600 13px/1.25 'IBM Plex Sans', system-ui, sans-serif; color: #14171F; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.onb2-src__tile:hover { border-color: #C9C4F6; }
.onb2-src__tile.is-on { border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, .12); background: #FAFAFF; }
.onb2-src__tile svg { width: 22px; height: 22px; flex: 0 0 22px; }
.onb2-src__alt { display: block; margin: 10px 0 2px; font-size: 12.5px; }
.onb2-api .onb2-card__head .sp-mark, .onb2-api .onb2-card__head svg { margin-right: 6px; }
.onb2-api__fields { display: grid; gap: 6px; margin: 12px 0 8px; }
.onb2-api__fields .onb2-lbl { margin-top: 4px; }
.onb2-api__gets { margin: 6px 0 10px; font-size: 12px; line-height: 1.5; color: #6B7280; }
.onb2-opt { font-style: normal; font-weight: 500; color: #646B78; }
.onb2-upload { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed #D6D2F7; border-radius: 10px; background: #FAFAFF; cursor: pointer; font-size: 13px; color: #3F38C9; font-weight: 600; }
.onb2-upload:hover { border-color: #5B53E8; }
.onb2-upload input { display: none; }
.onb2-upload svg { width: 16px; height: 16px; }
/* A file is being uploaded / read: say so, and take no second click (js s1Upload). */
.onb2-upload.is-busy { cursor: progress; border-style: solid; border-color: #5B53E8; background: #F3F2FF; color: #3B35B8; pointer-events: none; }
.onb2-upload.is-busy > span { display: inline-flex; align-items: center; gap: 8px; }
.onb2-msg--warn { color: #8A4B00; background: #FFF8EB; border-radius: 8px; padding: 8px 10px; align-items: flex-start; gap: 8px; }
.onb2-auth { margin-top: 10px; font-size: 12.5px; color: #4B5563; }
.onb2-auth summary { cursor: pointer; color: #5B53E8; font-weight: 600; }
.onb2-auth__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (max-width: 560px) { .onb2-auth__row { grid-template-columns: 1fr; } }

/* ONE notice for the approval reviewer (2026-10-31): bottom-centre, just above its footer, and each
   new message replaces the last (openApproval → apToast) — the page toasts stacked top-right. */
.aih-ap-notice {
    position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 10050;
    display: flex; align-items: baseline; gap: 8px; max-width: min(560px, calc(100vw - 32px));
    padding: 10px 16px; border-radius: 999px; background: #14161b; color: #fff;
    font-size: 13px; line-height: 1.35; box-shadow: 0 10px 28px rgba(20, 22, 27, .28);
    animation: aihApNoticeIn .18s ease-out;
}
.aih-ap-notice strong { font-weight: 700; white-space: nowrap; }
.aih-ap-notice span { color: rgba(255, 255, 255, .78); }
.aih-ap-notice--success strong::before { content: '✓ '; color: #4ade80; }
.aih-ap-notice--error { background: #7f1d1d; }
.aih-ap-notice--error strong::before, .aih-ap-notice--warning strong::before { content: '! '; }
.aih-ap-notice--warning { background: #78350f; }
.aih-ap-notice.is-leaving { opacity: 0; transform: translate(-50%, 6px); transition: opacity .2s ease, transform .2s ease; }
@keyframes aihApNoticeIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── AdPlex ImageBot: shops that refuse our image downloads (js/catalog-templates/imagebot-alert.js) ── */
.ibb-slot:empty { display: none; }
.ibb-overlay { z-index: 1100; }
.ibb-modal { width: min(820px, 100%); max-width: 820px; min-width: 0; outline: none; }
.ibb-body > *, .ibb-pane, .ibb-steps li { min-width: 0; max-width: 100%; }
.ibb-head { align-items: flex-start; gap: 12px; }
.ibb-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: #14171F; }
.ibb-sub { margin: 4px 0 0; font-size: 13px; color: #5B6473; }
.ibb-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 16px; font-size: 13.5px; color: #14171F; line-height: 1.55; }
.ibb-body code { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; background: #EEEDFC; color: #3F38C9; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.ibb-body pre.ib-code { margin: 8px 0 2px; padding: 10px 12px; background: #14171F; color: #E8EAF0; border-radius: 9px; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 'IBM Plex Mono', ui-monospace, Menlo, monospace; }
.ibb-shops { display: flex; flex-direction: column; gap: 8px; }
.ibb-shop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid #F2E3C2; background: #FFFBF2; border-radius: 10px; }
.ibb-shop__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ibb-shop__facts { font-size: 12.5px; color: #5B6473; }
.ibb-shop__status:empty { display: none; }
.ibb-shop__status { font-size: 12.5px; font-weight: 600; }
.ibb-shop__status.is-ok { color: #0F7B3F; }
.ibb-shop__status.is-bad { color: #B42318; }
.ibb-shop__act { display: flex; align-items: center; gap: 8px; }
.ibb-ua { border: 1px solid #E2E4EA; border-radius: 12px; padding: 12px 14px; }
.ibb-ua__label { font-size: 12.5px; font-weight: 600; color: #5B6473; margin-bottom: 6px; }
.ibb-ua__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ibb-ua__row .ibb-ua__val { flex: 1 1 300px; padding: 7px 10px; font-size: 13px; }
.ibb-ua__hint { margin-top: 8px; font-size: 12.5px; color: #5B6473; }
.ibb-sec__h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.ibb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ibb-tab { font: 600 12.5px 'IBM Plex Sans', system-ui, sans-serif; color: #5B6473; background: #fff; border: 1px solid #E2E4EA; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: normal; text-align: left; max-width: 100%; }
.ibb-tab:hover { border-color: #C9C6F5; color: #3F38C9; }
.ibb-tab.is-active { background: #EEEDFC; border-color: #5B53E8; color: #3F38C9; }
.ibb-for { margin: 0 0 8px; color: #5B6473; font-size: 13px; }
.ibb-steps { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.ibb-steps li { padding-left: 4px; }
.ibb-steps li::marker { color: #5B53E8; font-weight: 700; }
.ibb-note { margin-top: 10px; padding: 10px 12px; background: #EEEDFC; border-left: 3px solid #5B53E8; border-radius: 0 9px 9px 0; font-size: 13px; }
.ibb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ibb-btn { display: inline-flex; align-items: center; gap: 7px; font: 600 13px 'IBM Plex Sans', system-ui, sans-serif; border-radius: 9px; padding: 9px 16px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.ibb-btn:disabled { opacity: .6; cursor: default; }
.ibb-btn--primary { background: #5B53E8; color: #fff; }
.ibb-btn--primary:hover { background: #4A43D6; color: #fff; text-decoration: none; }
.ibb-btn--ghost { background: #fff; color: #5B6473; border-color: #E2E4EA; padding: 8px 13px; }
.ibb-btn--ghost:hover { background: #FAFAFB; color: #14171F; text-decoration: none; }
.ibb-btn--wa { background: #1FAF5A; color: #fff; }
.ibb-btn--wa:hover { background: #17964C; color: #fff; text-decoration: none; }
.ibb-link { background: none; border: 0; padding: 4px 6px; color: #646B78; font: 600 12.5px 'IBM Plex Sans', system-ui, sans-serif; cursor: pointer; }
.ibb-link:hover { color: #14171F; text-decoration: underline; }
.ibb-msg { margin: 0; padding: 10px 12px; border: 1px solid #E2E4EA; border-radius: 9px; background: #FAFAFB; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 'IBM Plex Sans', system-ui, sans-serif; max-height: 220px; overflow: auto; }
.ibb-ta { position: fixed; left: -9999px; top: 0; }
@media (max-width: 640px) { .ibb-body { padding: 14px; } .ibb-shop__act { width: 100%; } }

/* A card being deleted (2026-11-08): covered, inert, with a spinner + "Deleting…" */
.aih-card { position: relative; }
.aih-card.is-busy { pointer-events: none; }
.aih-card__busy { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 16px; text-align: center; border-radius: inherit; background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(2px); font-size: 13px; font-weight: 500; color: #1F2937; }
.aih-card__spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #E5E7EB; border-top-color: #5B53E8; animation: aih-spin .8s linear infinite; }
@keyframes aih-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aih-card__spin { animation-duration: 2.4s; } }

/* Import templates from another project (2026-11-08) */
.tpi-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(17, 20, 28, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tpi { width: 820px; max-width: 100%; max-height: min(86vh, 860px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(16, 24, 40, .22); outline: none; }
.tpi__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid #EEF0F3; }
.tpi__title { margin: 0; font-size: 17px; font-weight: 700; color: #14171F; }
.tpi__sub { margin: 4px 0 0; font-size: 13px; color: #6B7280; line-height: 1.45; }
.tpi__body { padding: 14px 20px; overflow-y: auto; min-height: 180px; }
.tpi__foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid #EEF0F3; }
.tpi__grow { flex: 1; }
.tpi__btn { font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 15px; border-radius: 10px; border: 1px solid #E2E4EA; background: #fff; color: #374151; cursor: pointer; }
.tpi__btn:hover:not(:disabled) { background: #FAFAFB; }
.tpi__btn.is-primary { background: #5B53E8; border-color: #5B53E8; color: #fff; }
.tpi__btn.is-primary:hover:not(:disabled) { background: #4C44D6; }
.tpi__btn:disabled { opacity: .5; cursor: not-allowed; }
.tpi__btn:focus-visible, .tpi__project:focus-visible, .tpi__link:focus-visible { outline: 2px solid #5B53E8; outline-offset: 2px; }
.tpi__msg { display: flex; align-items: center; gap: 10px; padding: 28px 4px; font-size: 13.5px; color: #6B7280; }
.tpi__msg.is-error { color: #B42318; }
.tpi__spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #E5E7EB; border-top-color: #5B53E8; animation: tpi-spin .8s linear infinite; flex: 0 0 auto; }
@keyframes tpi-spin { to { transform: rotate(360deg); } }
.tpi__projects { display: flex; flex-direction: column; gap: 6px; }
.tpi__project { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; padding: 11px 12px; border: 1px solid #E9EAEE; border-radius: 12px; background: #fff; cursor: pointer; }
.tpi__project:hover:not(:disabled) { border-color: #C9C6F5; background: #FAFAFF; }
.tpi__project:disabled { opacity: .55; cursor: not-allowed; }
.tpi__pinit { width: 32px; height: 32px; border-radius: 8px; background: #EEEDFD; color: #5B53E8; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tpi__pname { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #14171F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpi__pcount { font-size: 12.5px; color: #6B7280; white-space: nowrap; }
.tpi__chev { font-size: 20px; color: #646B78; line-height: 1; }
.tpi__tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tpi__link { font: inherit; font-size: 13px; font-weight: 600; color: #5B53E8; background: none; border: none; padding: 2px 0; cursor: pointer; }
.tpi__count { font-size: 12.5px; color: #6B7280; }
.tpi__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.tpi__card { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border: 1px solid #E9EAEE; border-radius: 12px; cursor: pointer; background: #fff; }
.tpi__card:hover { border-color: #C9C6F5; }
.tpi__card.is-on { border-color: #5B53E8; background: #F7F6FF; box-shadow: 0 0 0 1px #5B53E8 inset; }
.tpi__cb { width: 16px; height: 16px; accent-color: #5B53E8; flex: 0 0 auto; margin: 0; }
.tpi__thumb { box-sizing: content-box; width: 100px; height: 100px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: #F1F2F4; border: 1px solid #ECEDF0; display: flex; align-items: center; justify-content: center; }
.tpi__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tpi__noimg { font-size: 11px; color: #646B78; text-align: center; padding: 4px; }
.tpi__meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.tpi__name { font-size: 13.5px; font-weight: 600; color: #14171F; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tpi__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tpi__tag { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.tpi__tag.is-active { background: #E7F6EC; color: #1F7A3E; }
.tpi__tag.is-paused { background: #F1F2F4; color: #5B6473; }
.tpi__tag.is-type { background: #EEEDFD; color: #4C44D6; }
.tpi__size { font-size: 11.5px; color: #646B78; }
@media (max-width: 640px) { .tpi__grid { grid-template-columns: 1fr; } .tpi { max-height: 92vh; } }
.tpi__search { position: relative; margin: 12px 20px 0; }
.tpi__search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #646B78; display: inline-flex; pointer-events: none; }
.tpi__search-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; padding: 9px 12px 9px 34px; border: 1px solid #E2E4EA; border-radius: 10px; background: #fff; color: #14171F; }
.tpi__search-in:focus { outline: none; border-color: #5B53E8; box-shadow: 0 0 0 3px rgba(91, 83, 232, .15); }
.tpi__group + .tpi__group { margin-top: 14px; }
.tpi__group-h { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #646B78; margin: 0 2px 6px; }
.tpi__pinit.is-shared { background: #E8F4FD; color: #1D6FB8; }
.tpi__prole { font-size: 11px; font-weight: 600; color: #1D6FB8; background: #E8F4FD; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* ── White-label onboarding (js/onboarding/wl-onboarding.js): Optimize, Feed and Plan steps ── */
.onbwl-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.onbwl-point { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid #E9EAEE; border-radius: 12px; background: #fff; }
.onbwl-point__ico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; background: #EEEDFD; color: #5B53E8; display: grid; place-items: center; }
.onbwl-point__ico svg { width: 16px; height: 16px; }
.onbwl-point strong { display: block; font-size: 14px; font-weight: 600; color: #14171F; margin-bottom: 3px; }
.onbwl-point em { font-style: normal; font-size: 12.5px; line-height: 1.45; color: #5B6472; }
.onbwl-act__pad { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.onbwl-act__ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #EEEDFD; color: #5B53E8; display: grid; place-items: center; }
.onbwl-act__ico.is-on { background: #ECFDF3; color: #1F8A5B; }
.onbwl-act__ico svg { width: 18px; height: 18px; }
.onbwl-act__txt { flex: 1 1 260px; min-width: 0; }
.onbwl-act__txt strong { display: block; font-size: 14.5px; font-weight: 600; color: #14171F; }
.onbwl-act__txt em, .onbwl-act__pad > em { font-style: normal; font-size: 13px; line-height: 1.5; color: #5B6472; }
.onbwl-feeds { display: flex; flex-direction: column; gap: 10px; }
.onbwl-feed__st.is-ready { color: #1F8A5B; font-weight: 500; }
.onbwl-feed__st.is-building { color: #B45309; }
.onbwl-feed__more { padding: 12px 14px 14px; border-top: 1px solid #F0F1F4; background: #FAFAFB; display: flex; flex-direction: column; gap: 10px; }
.onbwl-feed__url { display: flex; gap: 8px; }
.onbwl-feed__url .onb2-input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.onbwl-feed__auto { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #EEEDFD; color: #2E2A8F; font-size: 13px; line-height: 1.45; }
.onbwl-feed__auto > span:first-child { flex: 1 1 260px; }
.onbwl-feed__btns { display: flex; gap: 8px; }
.onbwl-feed__ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #ECFDF3; color: #05603A; font-size: 13px; }
.onbwl-feed__ok svg { width: 15px; height: 15px; flex: 0 0 15px; }
.onbwl-feed__how { font-size: 13px; color: #3B4252; }
.onbwl-feed__how summary { cursor: pointer; font-weight: 600; color: #14171F; }
.onbwl-feed__how ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.onbwl-feed__tip { margin: 8px 0 0; font-size: 12.5px; color: #5B6472; }
.onbwl-plan__ch { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.onbwl-plan__first { margin: -2px 0 8px; font-size: 12px; font-weight: 600; color: #3F7A55; }   /* free days carry over (2026-11-25) — 5.1:1 on white */
/* Monthly / Yearly switch on the white-label Plan step (2026-11-25) — #646B78 on white = 5.3:1, accent text on white = 5.6:1 */
.onbwl-interval { display: inline-flex; gap: 2px; padding: 3px; margin: 4px 0 14px; border: 1px solid #E3E5EA; border-radius: 999px; background: #F5F6F8; }
.onbwl-interval__b { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: #646B78; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.onbwl-interval__b:hover { color: #1F2330; }
.onbwl-interval__b.is-on { background: #FFFFFF; color: #1F2330; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.onbwl-interval__b:focus-visible { outline: 2px solid var(--accent, #5B53E8); outline-offset: 2px; }
.onbwl-interval__save { padding: 2px 7px; border-radius: 999px; background: #EEEDFD; color: #4A43C9; font-size: 11px; font-weight: 700; }
.onbwl-plan__alt { margin: -2px 0 8px; font-size: 12px; color: #646B78; }
.onbwl-plan__ch span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 999px; background: #F4F5F7; font-size: 12px; font-weight: 500; color: #14171F; }
.onbwl-plan__ch svg, .onbwl-plan__ch img { width: 16px; height: 16px; }
@media (max-width: 760px) { .onbwl-points { grid-template-columns: 1fr; } .onbwl-feed__url { flex-direction: column; } }

/* White-label onboarding — Title protection card (2026-11-25). Text colours ≥ 4.5:1 on white. */
.onbwl-protect { margin-top: 12px; }
.onbwl-protect__head { display: flex; align-items: flex-start; gap: 12px; }
.onbwl-protect__head .onbwl-act__txt em { display: block; font-style: normal; font-size: 12.5px; line-height: 1.5; color: #4B5563; margin-top: 2px; }
.onbwl-protect__head .onbwl-act__txt b { font-weight: 600; color: #14171F; }
.onbwl-protect__head .onb2-switch { flex: 0 0 auto; margin-top: 4px; }
.onbwl-protect__lbl { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: #14171F; }
.onbwl-protect__lbl span { font-weight: 400; color: #646B78; }
.onbwl-protect__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.onbwl-protect__row .onb2-input { flex: 1 1 260px; min-width: 0; }
