.brand-chat {
  --chat-ink: #252525;
  --chat-muted: #707070;
  --chat-line: #e6e6e6;
  --chat-mango: #a3a3a3;
  --chat-viewport-fallback: 100vh;
  margin: 22px 0 28px;
  padding: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--chat-ink);
  text-align: left;
}
.brand-chat *, .brand-chat *::before, .brand-chat *::after { box-sizing: border-box; }
.brand-chat [hidden] { display: none !important; }
.brand-chat[data-view="brain"] .brand-chat__memory { margin-top: 0; border-top: 0; }
.brand-chat[data-view="brain"] .brand-chat__memory-summary { font-size: 14px; color: #111; }
.brand-chat[data-view="brain"] .brand-chat__memory-text { max-height: none; font-size: 14px; }
.brand-chat[data-view="brain"] .brand-chat__history { padding-top: 14px; }

/* The page keeps just one invitation; the conversation lives in the top layer. */
.brand-chat .brand-chat__launcher {
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(100%, 454px);
  min-height: 76px;
  padding: 14px 17px;
  appearance: none;
  border: 1px solid #d7d7d7;
  border-radius: 21px;
  background: #fcfcfc;
  color: var(--chat-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 12px #25252506;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.brand-chat__launcher-logo { display: block; flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
.brand-chat__launcher-label { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; line-height: 1.45; letter-spacing: -.2px; }
.brand-chat__launcher-arrow { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #e6e6e6; color: #484848; font-size: 20px; line-height: 1; }

.brand-chat__dialog {
  --chat-panel-height: min(780px, calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) - 64px));
  position: fixed;
  inset: auto;
  left: 50%;
  top: calc(var(--chat-viewport-top, 0px) + (var(--chat-viewport-height, var(--chat-viewport-fallback)) - var(--chat-panel-height)) / 2);
  width: 720px;
  max-width: calc(100vw - 48px);
  height: var(--chat-panel-height);
  max-height: var(--chat-panel-height);
  min-height: 0;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid #dadada;
  border-radius: 24px;
  background: #ffffff;
  color: var(--chat-ink);
  font: inherit;
  text-align: left;
  box-shadow: 0 24px 90px #14141429, 0 2px 12px #1414140a;
  color-scheme: light;
}
.brand-chat__dialog:not([open]) { display: none; }
.brand-chat__dialog[open] { display: flex; flex-direction: column; }
.brand-chat__dialog::backdrop { background: #19191943; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.brand-chat__header { display: grid; flex: 0 0 auto; grid-template-columns: 36px minmax(0, 1fr) 40px; gap: 2px 12px; align-items: center; padding: 19px 24px 17px; border-bottom: 1px solid #efefef; background: #ffffff; }
.brand-chat__avatar { display: block; grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; object-fit: contain; }
.brand-chat__title { grid-column: 2; grid-row: 1; margin: 0; color: var(--chat-ink); font-size: 16px; font-weight: 750; line-height: 1.3; letter-spacing: -.3px; }
.brand-chat__intro, .brand-chat__muted, .brand-chat__space-note, .brand-chat__local-note { margin: 8px 0; color: var(--chat-muted); font-size: 12px; line-height: 1.55; }
.brand-chat__header .brand-chat__intro { grid-column: 2; grid-row: 2; margin: 0; font-size: 11px; }
.brand-chat .brand-chat__close { display: grid; place-items: center; grid-column: 3; grid-row: 1 / span 2; width: 40px; min-height: 40px; margin: 0; padding: 0; appearance: none; border: 0; border-radius: 50%; background: #f4f4f4; color: #5d5d5d; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.brand-chat__conversation { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; min-width: 0; padding: 0 26px 15px; overflow: hidden; }
.brand-chat__source { display: grid; gap: 18px; padding-top: 12px; }
.brand-chat__source-choices { display: grid; gap: 9px; }
.brand-chat__source-extraction, .brand-chat__name-transcript { display: grid; gap: 14px; margin: 14px 0 24px; }
.brand-chat__source-prompt { font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.6; background: #f7f7f7; }
.brand-chat__header .brand-chat__intro { overflow-wrap: anywhere; }
.brand-chat__source-choices .brand-chat__button { justify-content: flex-start; padding: 15px 18px; border-radius: 15px; }
.brand-chat__family-candidates { margin-top: 18px; }
.brand-chat__family-choices { margin-top: 12px; }
.brand-chat__message-text.is-typing::after { content: ""; display: inline-block; width: 4px; height: 1em; margin-left: 3px; background: #777; vertical-align: -.12em; }
.brand-chat[data-view="chat"] .brand-chat__proposal { border: 1px solid #e6e6e6; border-radius: 16px; padding: 18px; }
.brand-chat[data-view="chat"] .brand-chat__proposal-family { font-size: 13px; font-weight: 650; margin-top: 0; }
.brand-chat__history { position: relative; flex: 1 1 auto; min-height: 0; max-height: none; margin: 0; padding: 24px 5px 22px 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; overflow-anchor: none; -webkit-overflow-scrolling: touch; }
.brand-chat__messages, .brand-chat__introduction { display: grid; gap: 25px; }
.brand-chat__messages:not(:empty), .brand-chat__new-brand, .brand-chat__empty { margin-top: 25px; }
.brand-chat__message { justify-self: start; width: fit-content; max-width: 100%; min-width: 0; margin: 0; padding: 0 3px; border: 0; background: transparent; }
.brand-chat__message--user { justify-self: end; max-width: 86%; padding: 12px 16px; border-radius: 19px 19px 5px 19px; background: #f1f1f1; }
.brand-chat__speaker { display: block; margin: 0 0 7px; color: #838383; font-size: 10px; font-weight: 600; line-height: 1.4; }
.brand-chat__message-text, .brand-chat__memory-text, .brand-chat__local-text { margin: 0; color: var(--chat-ink); font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.brand-chat__direction-note { margin-top: 1em; }
.brand-chat__message-text.is-typing + .brand-chat__direction-note,
.is-editing-direction .brand-chat__direction-note { display: none; }
.brand-chat__local-message { width: fit-content; }
.brand-chat__local-text.is-typing::after { display: inline-block; width: 5px; height: 1em; margin-left: 3px; border-radius: 2px; background: var(--chat-mango); content: ""; vertical-align: -.12em; animation: brand-chat-caret 900ms steps(1, end) infinite; }

.brand-chat .brand-chat__button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid #252525; border-radius: 999px; background: #252525; color: #ffffff; font: inherit; font-size: 12px; font-weight: 650; line-height: 1.4; text-transform: none; letter-spacing: normal; cursor: pointer; box-shadow: none; }
.brand-chat .brand-chat__button--quiet { border-color: #e0e0e0; background: #ffffff; color: #626262; }
.brand-chat__local-message .brand-chat__button--quiet { min-height: 38px; padding: 8px 12px; font-size: 11px; }
.brand-chat__message--user .brand-chat__button--quiet { margin-top: 9px; padding: 5px 0; min-height: 32px; border-color: transparent; background: transparent; color: #676767; }
.brand-chat__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
/* Corrections are real buttons, easy to spot and tap, not grey captions. */
.brand-chat .brand-chat__message--user .brand-chat__button--quiet.brand-chat__edit { margin-top: 12px; padding: 7px 14px 7px 12px; min-height: 36px; gap: 6px; border: 1px solid #bdbdbd; border-radius: 999px; background: #ffffff; color: #1f1f1f; font-size: 12px; font-weight: 650; }
.brand-chat .brand-chat__button--quiet.brand-chat__edit::before { width: 13px; height: 13px; background: currentColor; content: ""; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4L5.4 14H2v-3.4z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4L5.4 14H2v-3.4z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.brand-chat .brand-chat__button--quiet.brand-chat__back { border-color: transparent; background: transparent; color: #3c3c3c; padding-inline: 6px; text-decoration: underline; text-underline-offset: 3px; }
.brand-chat__industry .brand-chat__back { display: flex; margin-top: 10px; }
/* A step's answers and its compact "← Wróć" share one row. */
.brand-chat__style .brand-chat__actions { flex-wrap: nowrap; }
.brand-chat__style .brand-chat__actions > .brand-chat__button { flex: 0 1 auto; min-width: 0; white-space: normal; }
.brand-chat__style .brand-chat__actions > .brand-chat__back { flex: 0 0 auto; white-space: nowrap; }
.brand-chat__actions--send { justify-content: space-between; }
.brand-chat__local-note { margin: 9px 0 0; font-size: 11px; }
.brand-chat__swatches { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 11px; }
.brand-chat__swatch { display: inline-flex; align-items: center; gap: 7px; color: #545454; font-size: 11px; line-height: 1.4; }
.brand-chat__swatch i { width: 23px; height: 23px; border: 1px solid #00000022; border-radius: 50%; }
.brand-chat__field { display: grid; min-width: 0; gap: 6px; }
.brand-chat__label { color: #656565; font-size: 11px; font-weight: 650; line-height: 1.4; }
.brand-chat :is(.brand-chat__input,.brand-chat__select,.brand-chat__textarea) { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 10px; background: #ffffff; color: var(--chat-ink); font: inherit; font-size: 15px; line-height: 1.5; box-shadow: none; }
.brand-chat__textarea { display: block; min-height: 84px; max-height: 320px; resize: vertical; }
.brand-chat__textarea--memory { min-height: 190px; }
.brand-chat__message.is-editing-direction { width: 100%; }
.brand-chat__direction-editor { width: 100%; min-width: 0; margin-top: 8px; }
.brand-chat .brand-chat__direction-text { width: 100%; min-height: 160px; height: clamp(180px, 40dvh, 380px); max-height: 55dvh; padding: 13px; font-size: 16px; line-height: 1.6; border: 1px solid #ddd; border-radius: 14px; resize: vertical; }
.brand-chat__direction-editor .brand-chat__actions { justify-content: flex-end; }
.brand-chat__direction-count { flex-basis: 100%; text-align: right; }
.brand-chat__new-brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; width: 100%; }
.brand-chat__new-brand p, .brand-chat__new-brand .brand-chat__speaker { grid-column: 1 / -1; margin: 0; }
.brand-chat__empty { color: var(--chat-muted); }
.brand-chat__choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; padding: 2px; }
.brand-chat__selected { margin: 3px 0; color: #666; font-size: 11px; line-height: 1.4; }
.brand-chat :is(.brand-chat__choice,.brand-chat__selected-choice) { min-height: 38px; max-width: 100%; padding: 9px 13px; border: 1px solid #dddddd; border-radius: 16px; background: #ffffff; color: #5a5a5a; font: inherit; font-size: 12px; line-height: 1.45; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }
.brand-chat .brand-chat__choice[aria-pressed="true"], .brand-chat .brand-chat__selected-choice { border-color: #aaaaaa; background: #eeeeee; color: #333333; }
.brand-chat__composer { position: relative; flex: 0 0 auto; margin-top: 9px; padding: 12px 12px 10px; border: 1px solid #d6d6d6; border-radius: 21px; background: #ffffff; box-shadow: 0 2px 8px #1e1e1e03; }
.brand-chat__composer:focus-within { border-color: #b3b3b3; box-shadow: 0 0 0 2px #cbcbcb42; }
/* Keep accessible labels/help while giving the message field a quiet single surface. */
.brand-chat__composer .brand-chat__label,
.brand-chat__composer > .brand-chat__muted { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.brand-chat .brand-chat__composer .brand-chat__textarea { min-height: 44px; height: clamp(44px, calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) * .1), 82px); max-height: 82px; padding: 3px 4px; border: 0; border-radius: 0; background: transparent; font-size: 16px; line-height: 1.5; resize: none; outline: 0; box-shadow: none; }
.brand-chat__composer .brand-chat__actions { margin-top: 5px; }
.brand-chat__composer .brand-chat__selected { margin: 3px 0; }
.brand-chat__composer .brand-chat__selected-choice { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.brand-chat__composer .brand-chat__button[type="submit"] { min-height: 38px; padding: 9px 20px; background: #202020; border-color: #202020; }
.brand-chat__counter { min-width: 0; color: #848484; font-size: 10px; line-height: 1.45; }
.brand-chat__counter.is-over-limit { color: #656565; }
.brand-chat__footnote { flex: 0 0 auto; margin: 8px 4px 0; color: #8a8a8a; font-size: 10px; line-height: 1.5; text-align: center; }
.brand-chat__connection { flex: 0 0 auto; margin: 7px 2px 2px; color: var(--chat-muted); font-size: 11px; line-height: 1.5; }
.brand-chat__connection.mango-loading { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 12px; }
.brand-chat__connection.mango-loading::before { margin-right: 0; flex-shrink: 0; }
.brand-chat__mango-reader { display: flex; justify-content: center; align-items: center; flex: 0 0 auto; margin: 4px 0; }
.brand-chat__mango-canvas { display: block; width: 118px; height: 103px; }
.brand-chat__memory, .brand-chat__settings { margin-top: 22px; padding-top: 13px; border-top: 1px solid var(--chat-line); }
.brand-chat__memory-summary { padding: 5px 0; color: #707070; font-size: 11px; font-weight: 600; line-height: 1.7; cursor: pointer; }
.brand-chat__memory-text { max-height: 260px; margin: 12px 0; padding: 12px 14px; border-radius: 11px; background: #f5f5f5; font-size: 12px; overflow-y: auto; }
.brand-chat__proposal { margin-top: 16px; }
.brand-chat__toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; }
.brand-chat__toolbar .brand-chat__field { flex: 1 1 180px; }
.brand-chat__space-note { padding: 11px 13px; border: 1px solid #e5e5e5; border-radius: 11px; background: #f5f5f5; color: #737373; font-size: 11px; }
.brand-chat__error { flex: 0 1 auto; min-height: 0; max-height: min(150px, calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) * .2)); margin: 8px 0 0; padding: 11px 13px; border: 1px solid #dedede; border-radius: 12px; background: #f5f5f5; color: #686868; overflow-y: auto; overflow-wrap: anywhere; }
.brand-chat__error p { margin: 0 0 7px; font-size: 12px; line-height: 1.55; }
.brand-chat :is(button,input,select,textarea,summary):focus-visible { outline: 3px solid #828282; outline-offset: 3px; }
.brand-chat :is(button,select):disabled { cursor: not-allowed; opacity: .48; }
.brand-chat textarea[readonly] { color: #7a7a7a; }

/* Real editor controls, scoped to the dialog: no clone and no editor-wide restyling. */
html .brand-chat .brand-style-panel { margin: 15px 0 9px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--chat-ink); box-shadow: none; }
html .brand-chat .brand-style-panel__header, html .brand-chat .brand-style-panel__hint,
html .brand-chat .brand-style-panel__toggle { display: none; }
html .brand-chat .brand-style-panel__groups { display: block; margin: 0; }
html .brand-chat .brand-style-panel__group,
html .brand-chat .brand-style-panel__group.is-enabled { padding: 0; border: 0; background: transparent; }
html .brand-chat .brand-style-panel__fields { gap: 14px; }
html .brand-chat[data-step="0"] .brand-style-panel__group:nth-child(2),
html .brand-chat[data-step="1"] .brand-style-panel__group:first-child { display: none; }
html .brand-chat .brand-style-panel__label, html .brand-chat .brand-style-panel__hex { color: #747474; }
html .brand-chat .brand-style-panel__color { width: 48px; height: 48px; flex-basis: 48px; padding: 3px; border: 1px solid #d1d1d1; border-radius: 12px; background: #ffffff; box-shadow: none; }
html .brand-chat .brand-style-panel__font-card { border-color: #dedede; background: #ffffff; color: #393939; }
html .brand-chat .brand-style-panel__font-card.is-selected { border-color: #393939; background: #f6f6f6; }

html .brand-chat .brand-style-panel__toggle input { accent-color: #767676; }

@supports (height: 100dvh) { .brand-chat { --chat-viewport-fallback: 100dvh; } }
@keyframes brand-chat-caret { 0%, 48% { opacity: .85; } 49%, 100% { opacity: 0; } }
@media (hover: hover) {
  .brand-chat .brand-chat__launcher:not(:disabled):hover { border-color: #b5b5b5; background: #f5f5f5; box-shadow: 0 5px 18px #5151510b; }
  .brand-chat .brand-chat__button:not(:disabled):hover { filter: brightness(.94); }
  .brand-chat .brand-chat__choice:not(:disabled):hover { border-color: #adadad; background: #f5f5f5; }
  .brand-chat .brand-chat__close:not(:disabled):hover { background: #e8e8e8; color: #252525; }
}
@media (max-width: 600px) {
  .brand-chat { margin: 18px 0 24px; }
  .brand-chat .brand-chat__launcher { width: 100%; min-height: 72px; padding: 13px 14px; border-radius: 19px; gap: 10px; }
  .brand-chat__launcher-label { font-size: 14px; }
  .brand-chat__launcher-logo { flex-basis: 36px; width: 36px; height: 36px; }
  .brand-chat__launcher-arrow { flex-basis: 30px; width: 30px; height: 30px; }
  .brand-chat__dialog {
    --chat-panel-height: calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) - 16px);
    top: calc(var(--chat-viewport-top, 0px) + 8px);
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    border-radius: 20px;
  }
  .brand-chat__header { grid-template-columns: 32px minmax(0, 1fr) 40px; padding: max(14px, env(safe-area-inset-top)) 15px 13px; gap: 2px 10px; }
  .brand-chat__avatar { width: 32px; height: 32px; }
  .brand-chat__conversation { padding: 0 max(13px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); }
  .brand-chat__history { padding-top: 21px; padding-right: 0; scrollbar-gutter: auto; }
  .brand-chat__message-text, .brand-chat__local-text { font-size: 16px; line-height: 1.65; }
  .brand-chat__message--user { max-width: 92%; padding: 11px 14px; }
  .brand-chat__toolbar .brand-chat__field { flex-basis: 100%; }
  .brand-chat__new-brand { grid-template-columns: minmax(0, 1fr); }
  .brand-chat__style .brand-chat__actions { gap: 7px; }
  .brand-chat__style .brand-chat__button { padding-inline: 11px; }
  .brand-chat :is(.brand-chat__input,.brand-chat__select,.brand-chat__textarea),
  .brand-chat__composer { margin-top: 6px; padding: 10px 10px 8px; border-radius: 19px; }
  .brand-chat__footnote { margin-top: 6px; font-size: 9px; }
}
@media (max-width: 420px) {
  html .brand-chat[data-step="1"] .brand-style-panel__fields { grid-template-columns: minmax(0, 1fr); }
  .brand-chat__header .brand-chat__intro { font-size: 10px; }
}
@media (max-height: 520px) and (min-width: 601px) {
  .brand-chat__dialog {
    --chat-panel-height: calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) - 16px);
    top: calc(var(--chat-viewport-top, 0px) + 8px);
  }
  .brand-chat__header { padding: 10px 20px; }
  .brand-chat__conversation { padding: 0 20px 10px; }
  .brand-chat__history { padding-top: 16px; padding-bottom: 16px; }
  .brand-chat__footnote { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-chat .brand-chat__launcher { transition: none; }
  .brand-chat__local-text.is-typing::after { animation: none; opacity: .65; }
  .brand-chat__history { scroll-behavior: auto; }
}

/* Temporary local creation flow, inside the existing brand chat. */
.brand-chat--creation-mockup .brand-chat__dialog {
  --chat-panel-height: min(900px, calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) - 48px));
  width: min(1040px, calc(100vw - 48px));
}
.brand-chat--creation-mockup .brand-chat__conversation { padding: 0; min-height: 0; }
.brand-chat--creation-mockup .brand-chat__conversation > :not(.chat-creation-host) { display: none !important; }
.brand-chat--creation-mockup .chat-creation-host { display: flex; flex: 1; min-height: 0; min-width: 0; padding: 0 24px 16px; }
@media (max-width: 600px) {
  .brand-chat--creation-mockup .brand-chat__dialog {
    --chat-panel-height: calc(var(--chat-viewport-height, var(--chat-viewport-fallback)) - 16px);
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    border-radius: 22px;
  }
  .brand-chat--creation-mockup .chat-creation-host { padding: 0 14px 12px; }
}
@media (max-height: 780px) and (min-width: 601px) {
  .brand-chat--creation-mockup .chat-creation__intro { margin-bottom: 16px; }
  .brand-chat--creation-mockup .chat-creation__intro-copy { display: none; }
  .brand-chat--creation-mockup .chat-creation__result-heading { margin-bottom: 10px; }
  .brand-chat--creation-mockup .chat-creation .chat-creation__card { flex-basis: min(82%, 220px); }
  .brand-chat--creation-mockup .chat-creation__carousel::after { flex-basis: calc(100% - min(82%, 220px) - 13px); }
  .brand-chat--creation-mockup .chat-creation__video-fields { max-width: 440px; }
  .brand-chat--creation-mockup .chat-creation__video-description { margin: 4px 0 8px; }
}

.brand-chat .brand-chat__composer .brand-chat__textarea:focus,
.brand-chat .brand-chat__composer .brand-chat__textarea:focus-visible { outline: none; box-shadow: none; }

/* One explicit brand category: native horizontal scrolling on phones and desktop. */
.brand-chat__industry { min-width: 0; width: 100%; margin: 24px 0; }
.brand-chat__industry-choices { display: flex; flex-wrap: nowrap; gap: 10px; width: 100%; min-width: 0; margin-top: 14px; padding: 3px 2px 12px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.brand-chat .brand-chat__industry-choices .brand-chat__button { flex: 0 0 auto; min-height: 44px; padding: 12px 18px; white-space: nowrap; }
.brand-chat .brand-chat__industry-choices .brand-chat__button[aria-pressed="true"] { background: #252525; border-color: #252525; color: #fff; }
.brand-chat__industry > .brand-chat__button { margin-top: 6px; }

/* A new brand from its website: the address, then the brand read from it. */
.brand-chat__website, .brand-chat__identity { display: grid; gap: 12px; width: 100%; margin-top: 25px; }
.brand-chat__website p, .brand-chat__identity p { margin: 0; }
.brand-chat__website-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.brand-chat__website-error { padding-left: 10px; border-left: 2px solid #333333; color: #333333; font-size: 13px; font-weight: 600; line-height: 1.5; }
.brand-chat .brand-chat__no-website { justify-self: start; grid-column: 1 / -1; min-height: 40px; padding: 0; border: 0; background: transparent; color: #545454; text-decoration: underline; text-underline-offset: 3px; }
.brand-chat__identity-logo-box { justify-self: start; }
.brand-chat__identity-logo { display: block; width: auto; height: 56px; max-width: 220px; object-fit: contain; object-position: left center; }
.brand-chat__identity-rows { display: grid; gap: 12px; margin: 0; }
.brand-chat__identity-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; }
.brand-chat__identity-row dt { color: #666; font-size: 12px; }
.brand-chat__identity-row dd { min-width: 0; margin: 0; }
.brand-chat__identity-fonts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.brand-chat__identity-heading-sample { font-size: 22px; line-height: 1.1; }
.brand-chat__identity-body-sample { font-size: 15px; }
.brand-chat__identity-font-source { flex-basis: 100%; font-size: 12px; }
.brand-chat__identity-actions { justify-content: flex-end; }
/* Every colour, font and the industry read from the website can be changed before the brand is made. */
.brand-chat__swatch--edit { position: relative; cursor: pointer; }
.brand-chat__swatch-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.brand-chat__swatch--edit:focus-within i { outline: 3px solid #828282; outline-offset: 2px; }
.brand-chat__swatch--edit.is-empty i { border-style: dashed; background: transparent; }
.brand-chat__swatch--edit.is-off, .brand-chat__identity-fonts .is-off { opacity: .55; }
.brand-chat__identity-color-note { display: block; margin-top: 8px; font-size: 12px; }
.brand-chat__identity-pickers { display: grid; flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.brand-chat__identity-pickers .brand-chat__field { display: grid; gap: 4px; }
.brand-chat .brand-chat__identity-select { min-height: 42px; padding: 8px 10px; }
@media (max-width: 560px) {
  .brand-chat__website-row { grid-template-columns: minmax(0, 1fr); }
  .brand-chat__identity-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* The brand from its website as a conversation from the link on: CosmoMango asks one question at a time,
   the owner's answers stay in the thread with "Zmień …" under them. The Noir theme supplies the --cm-*
   tokens in the app; the fallbacks keep the thread readable anywhere else. */
.brand-chat .brand-chat__identity-thread { gap: 25px; margin-top: 0; padding: 0 !important; border: 0 !important; background: transparent !important; }
.brand-chat__identity-thread[hidden], .brand-chat__identity-thread [hidden] { display: none !important; }
.brand-chat__identity-thread > .brand-chat__message:not(.brand-chat__message--user) { width: 100%; }
.brand-chat__identity-body { display: grid; gap: 14px; margin-top: 14px; }
.brand-chat p.brand-chat__identity-lead { margin: 0; font-size: 13px; line-height: 1.5; }
.brand-chat__identity-answer.brand-chat__swatches { gap: 8px; margin-top: 9px; }
.brand-chat__identity-answer .brand-chat__swatch i { width: 18px; height: 18px; }
.brand-chat__identity-thread .brand-chat__identity-actions { justify-content: flex-start; margin-top: 16px; }
.brand-chat .brand-chat__wizard-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; max-width: 420px; margin: 0; }
.brand-chat .brand-chat__wizard-palette .brand-chat__swatch { display: grid; gap: 6px; align-items: start; }
.brand-chat .brand-chat__wizard-palette .brand-chat__swatch i { width: 100%; height: auto !important; aspect-ratio: 5 / 4; border-radius: 0; }
.brand-chat__wizard-palette .brand-chat__swatch-name { color: var(--cm-ink-3, #777); font-size: 11px; }
.brand-chat__wizard-palette .brand-chat__swatch-code { color: var(--cm-ink, #222); font: 500 11px/1 var(--cm-mono, ui-monospace, monospace); }
.brand-chat__identity-thread:not(.is-editing) .brand-chat__wizard-palette .brand-chat__swatch { pointer-events: none; }
.brand-chat__wizard-spec { display: grid; gap: 8px; max-width: 560px; }
.brand-chat p.brand-chat__wizard-spec-head { margin: 0; color: var(--cm-ink, #222); font-size: clamp(34px, 9vw, 54px); line-height: 1; overflow-wrap: anywhere; }
.brand-chat p.brand-chat__wizard-spec-body { margin: 0; color: var(--cm-ink-2, #555); font-size: 16px; line-height: 1.45; }
.brand-chat p.brand-chat__wizard-spec-names { margin: 0; font-family: var(--cm-mono, monospace); font-size: 11px; }
.brand-chat p.brand-chat__wizard-word { margin: 0; color: var(--cm-mango, darkorange); font: 400 clamp(34px, 9vw, 52px)/1 var(--cm-font, sans-serif); letter-spacing: -.04em; }
.brand-chat__wizard-changes { display: none !important; gap: 10px; }
.brand-chat__identity-thread.is-editing .brand-chat__wizard-changes { display: grid !important; }
.brand-chat__identity-thread.is-editing .brand-chat__wizard-word { display: none; }
.brand-chat__wizard-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.brand-chat .brand-chat__wizard-font { position: relative; display: grid; align-content: space-between; gap: 10px; min-width: 0; min-height: 88px; padding: 12px 28px 12px 12px; border: 1px solid var(--cm-line-2, #d9d9d9); border-radius: 0;
  background: var(--cm-s2, #fff); color: var(--cm-ink, #222); text-align: left; cursor: pointer; transition: border-color .2s; }
.brand-chat .brand-chat__wizard-font:hover { border-color: var(--cm-ink-3, #777); }
.brand-chat .brand-chat__wizard-font[aria-pressed="true"] { border-color: var(--cm-ink, #222); box-shadow: inset 0 0 0 1px var(--cm-ink, #222); }
.brand-chat .brand-chat__wizard-font[aria-pressed="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 15px; height: 15px; background: var(--cm-ink, #222); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M2.2 6.4l2.4 2.4 5.2-5.6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M2.2 6.4l2.4 2.4 5.2-5.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.brand-chat .brand-chat__wizard-sample { overflow: hidden; font-size: 21px !important; line-height: 1.05; overflow-wrap: anywhere; }
.brand-chat .brand-chat__wizard-sample--body { font-size: 13px !important; line-height: 1.4; }
.brand-chat__wizard-font small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; color: var(--cm-ink-3, #777); font: 400 10px/1.2 var(--cm-mono, monospace); }
.brand-chat__wizard-font small b { margin-left: 5px; padding: 2px 4px; background: var(--cm-ok-fill, green); color: #fff; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; }
.brand-chat__wizard-industries { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.brand-chat .brand-chat__wizard-tile { min-height: 54px; padding: 12px; border: 1px solid var(--cm-line-2, #d9d9d9); border-radius: 0; background: var(--cm-s2, #fff); color: var(--cm-ink, #222); font: 500 15px/1.2 var(--cm-font, inherit); text-align: left; cursor: pointer; }
.brand-chat .brand-chat__wizard-tile[aria-pressed="true"] { border-color: var(--cm-ink, #222); background: var(--cm-ink, #222); color: var(--cm-bg, #fff); }
.brand-chat__identity-thread .brand-chat__identity-name { max-width: 420px; font-size: 24px; line-height: 1.15; }
.brand-chat__wizard-word-in { display: inline-block; white-space: pre; }
@media (prefers-reduced-motion: no-preference) {
  .brand-chat__identity-body:not([hidden]) { animation: brand-chat-step-in .5s cubic-bezier(.2,.7,.2,1) both; }
  .brand-chat__identity-thread > .brand-chat__message--user:not([hidden]) { animation: brand-chat-step-in .35s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes brand-chat-step-in { from { opacity: 0; translate: 0 10px; filter: blur(4px); } }
  .brand-chat__wizard-word-in { animation: brand-chat-word-in .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 70ms); }
  @keyframes brand-chat-word-in { from { opacity: 0; translate: 0 .25em; filter: blur(8px); } }
}
/* While the brand is read from its website the thread is the whole conversation. */
.brand-chat[data-identity-wizard="true"] .brand-chat__history > :not(.brand-chat__identity-thread) { display: none !important; }
.brand-chat[data-identity-wizard="true"] .brand-chat__history { justify-content: flex-start !important; }
@media (max-width: 420px) {
  .brand-chat .brand-chat__wizard-sample:not(.brand-chat__wizard-sample--body) { font-size: 18px !important; }
  .brand-chat__wizard-fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
