/* Opt-in application shell; the original studio remains unchanged. */
html.has-chat-app { background: #fff; color-scheme: light; }
html.has-chat-app body { min-height: 100dvh; margin: 0; padding: 0; background: #fff; }
html.has-chat-app .app-shell { width: min(100%, 1200px); max-width: none; margin: 0 auto; padding: 86px 24px 40px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
html.has-chat-app .app-shell > .topbar,
html.has-chat-app .brand-chat__launcher { display: none !important; }
html.has-chat-app .brand-chat--app .brand-chat__dialog {
  --chat-panel-height: var(--chat-viewport-height, 100dvh);
  top: var(--chat-viewport-top, 0px); left: 0; width: 100%; max-width: 100%;
  height: var(--chat-panel-height); max-height: var(--chat-panel-height);
  margin: 0; border: 0; border-radius: 0; transform: none; box-shadow: none;
}
.brand-chat--app .brand-chat__dialog::backdrop { background: #fff; backdrop-filter: none; }
.brand-chat--app .brand-chat__header { display: none; }
.brand-chat--app .brand-chat__conversation { width: min(100%, 1000px); margin: 0 auto; padding: 0 28px max(18px, env(safe-area-inset-bottom)); }
.brand-chat--app .brand-chat__history { padding-top: 32px; padding-bottom: 28px; }
.brand-chat--app .brand-chat__message-text,
.brand-chat--app .brand-chat__local-text { font-size: 16px; line-height: 1.8; }
.brand-chat--app .brand-chat__composer { border-radius: 27px; padding: 14px 18px 12px; }
.brand-chat--app .brand-chat__speaker { font-size: 11px; }
.brand-chat--app[data-entry='name'] .brand-chat__history { display: flex; flex-direction: column; justify-content: center; padding-bottom: clamp(24px, 12vh, 130px); }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand { position: relative; width: min(100%, 740px); margin: 0 auto; grid-template-columns: minmax(0, 1fr) 66px; gap: 0; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > .brand-chat__speaker { display: none; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > .brand-chat__local-text { grid-area: 1 / 1 / 2 / -1; margin: 0 0 30px; font-size: clamp(25px, 3.1vw, 36px); font-weight: 500; line-height: 1.25; text-align: center; letter-spacing: -1px; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > .brand-chat__field { grid-area: 2 / 1 / 3 / -1; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand .brand-chat__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand .brand-chat__input { min-height: 70px; padding: 20px 78px 20px 24px; border-radius: 40px; font-size: 18px; box-shadow: 0 5px 24px #00000006; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand .brand-chat__input:focus-visible { outline: 1px solid #aaa; outline-offset: 2px; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > button[type='submit'] { grid-area: 2 / 2 / 3 / 3; align-self: center; justify-self: center; width: 46px; min-height: 46px; padding: 0; font-size: 0; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > button[type='submit']::after { content: '↑'; font-size: 28px; font-weight: 400; line-height: 1; }
.brand-chat--app[data-entry='name'] .brand-chat__new-brand > .brand-chat__muted { margin: 12px 0 0; color: #969696; text-align: center; font-size: 11px; }
.brand-chat--app .chat-studio__composer { border-color: #dedede; border-radius: 25px; box-shadow: 0 3px 20px #00000004; }
.brand-chat--app .chat-studio__format { color: #8c8c8c; }
.brand-chat--app .chat-studio__format[aria-pressed='true'] { color: #171717; border-color: #ddd; background: #f1f1f1; }
.brand-chat--app .chat-studio__button--primary { background: #171717; border-color: #171717; }
.brand-chat--app .chat-studio__textarea { color: #252525; }
.brand-chat--app .chat-studio__textarea::placeholder { color: #909090; }
.brand-chat--app :is(.chat-studio__upload-square, .chat-studio__person) { border-color: #d8d8d8; background: #fafafa; color: #777; }
.chat-app__header, .chat-app__drawer { color: #171717; font-family: Inter, system-ui, sans-serif; text-align: left; }
.chat-app__header { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 12px; flex: 0 0 auto; min-height: 62px; width: 100%; padding: 8px 28px; background: #fff; }
.chat-app__page-header { position: sticky; top: 0; z-index: 15; background: #fff; }
html.has-chat-app .chat-app__page-header + .app-shell { padding-top: 18px; }
.chat-app__wordmark { text-align: center; min-width: 0; }
.chat-app__title { margin: 0; color: #171717; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.8px; }
.chat-app__context { display: block; margin-top: 2px; overflow: hidden; color: #838383; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.chat-app__context:empty { display: none; }
.chat-app__header button, .chat-app__drawer button, .chat-app__style-actions button { appearance: none; margin: 0; font: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; cursor: pointer; }
.chat-app__header :is(.chat-app__menu,.chat-app__new), .chat-app__drawer .chat-app__dismiss { display: grid; place-items: center; width: 46px; height: 46px; min-height: 46px; padding: 10px; border: 1px solid #e2e2e2; border-radius: 50%; background: #fff; color: #171717; }
.chat-app__header .chat-app__new { border-color: transparent; }
.chat-app__menu span, .chat-app__new span, .chat-app__dismiss span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.chat-app__header svg, .chat-app__drawer svg, .chat-app__style-actions svg { display: block; flex: 0 0 24px; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-app__drawer { position: fixed; inset: 0 auto 0 0; width: min(370px, calc(100vw - 48px)); max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)); border: 0; border-radius: 0 28px 28px 0; background: #fff; overflow-y: auto; overscroll-behavior: contain; box-shadow: 12px 0 65px #00000018; }
.chat-app__drawer[open] { display: flex; flex-direction: column; }
.chat-app__drawer::backdrop { background: #00000025; }
.chat-app__drawer-top { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #ededed; }
.chat-app__drawer .chat-app__dismiss { border-color: transparent; width: 40px; height: 40px; min-height: 40px; }
.chat-app__drawer .chat-app__dismiss { flex: 0 0 40px; }
.chat-app__nav { display: grid; gap: 5px; }
.chat-app__nav-item { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 52px; padding: 13px 15px; border: 0; border-radius: 13px; background: transparent; color: #202020; font-size: 16px; font-weight: 500; line-height: 1.4; text-align: left; text-decoration: none; cursor: pointer; }
.chat-app__nav-item[aria-current='page'] { background: #f2f2f2; }
.chat-app__drawer #brand-picker { margin: 0; }
.chat-app__drawer .brand-picker__brands { display: flex; flex: 1 1 auto; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; padding: 4px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overflow-anchor: none; }
.chat-app__drawer .brand-picker__brands::-webkit-scrollbar { display: none; }
.chat-app__drawer .brand-picker__brands .brand-picker__object { display: inline-flex; flex: 0 0 auto; gap: 0; max-width: 225px; border-radius: 12px; background: #f5f5f5; }
.chat-app__drawer .brand-picker__brands .brand-picker__chip { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 11px 12px; overflow: hidden; border: 0; border-radius: 12px; background: transparent; color: #5d5d5d; font-size: 13px; font-weight: 500; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; box-shadow: none; }
.chat-app__drawer .brand-picker__brands .brand-picker__object:has(.is-selected),
.chat-app__drawer .brand-picker__brands .brand-picker__chip.is-selected { background: #222; color: #fff; }
.chat-app__drawer .brand-picker__brands .brand-picker__remove { flex: 0 0 24px; width: 24px; height: 32px; margin-right: 3px; font-size: 18px; }
.chat-app__drawer .brand-picker__brands .brand-picker__object:has(.is-selected) .brand-picker__remove { color: #cfcfcf; }
.chat-app__drawer .brand-picker__brands .brand-picker__chip--add { flex: 0 0 42px; width: 42px; min-width: 42px; min-height: 42px; margin: 0; padding: 0; border: 1px solid #e5e5e5; font-size: 0; text-align: center; }
.chat-app__drawer .brand-picker__brands .brand-picker__chip--add::after { content: '+'; font-size: 23px; font-weight: 400; }
.chat-app__products-toggle > span { flex: 1 1 auto; min-width: 0; }
.chat-app__products-brand { display: block; margin-top: 2px; color: #888; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.chat-app__products-toggle > svg:last-child { flex-basis: 16px; width: 16px; height: 16px; transition: transform 120ms ease; }
.chat-app__products-toggle[aria-expanded='true'] > svg:last-child { transform: rotate(180deg); }
.chat-app__products-panel { margin: -1px 0 7px 27px; padding: 2px 0 3px 14px; border-left: 1px solid #e7e7e7; }
.chat-app__products-panel[hidden], .chat-app__products-brand[hidden] { display: none; }
.chat-app__drawer .brand-picker__offers { display: grid; gap: 5px; }
.chat-app__drawer .brand-picker__offers .brand-picker__object { display: flex; width: 100%; }
.chat-app__drawer .brand-picker__offers .brand-picker__chip { flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border-color: transparent; border-radius: 10px; background: transparent; color: #282828; font-size: 14px; font-weight: 400; box-shadow: none; }
.chat-app__drawer .brand-picker__chip.is-selected { background: #f1f1f1; border-color: transparent; color: #171717; box-shadow: none; }
.chat-app__drawer .brand-picker__offers .brand-picker__chip--add { margin-top: 6px; border: 1px solid #e5e5e5; font-size: 12px; }
.chat-app__drawer .brand-picker__label { display: none; }
.chat-app__empty { margin: 8px 14px; color: #888; font-size: 13px; }
.chat-app__drawer-footer { margin-top: auto; padding-top: 24px; }
.chat-app__notice { margin: 8px 14px 0; color: #777; font-size: 12px; }
/* On desktop the same navigation stays beside both the calendar and the chat. */
@media (min-width: 1024px) {
  html.has-desktop-navigation { --chat-navigation-width: 280px; }
  html.has-chat-app.has-desktop-navigation body { padding-left: var(--chat-navigation-width); }
  html.has-chat-app.has-desktop-navigation .brand-chat--app .brand-chat__dialog { padding-left: var(--chat-navigation-width); box-sizing: border-box; }
  html.has-chat-app.has-desktop-navigation .chat-studio__editor { left: calc(var(--chat-editor-view-left, 0px) + var(--chat-navigation-width)); width: calc(var(--chat-editor-view-width, 100vw) - var(--chat-navigation-width)); }
  html.has-desktop-navigation .chat-app__drawer { width: var(--chat-navigation-width); max-width: var(--chat-navigation-width); box-sizing: border-box; border-right: 1px solid #e9e3ef; border-radius: 0; box-shadow: none; z-index: 20; background: #fcfaff; }
  html.has-desktop-navigation .chat-app__menu,
  html.has-desktop-navigation .chat-app__dismiss { display: none; }
  html.has-desktop-navigation .chat-app__header:not(.is-scheduled) { grid-template-columns: minmax(0, 1fr) 48px; }
  html.has-desktop-navigation .chat-app__wordmark { padding-left: 48px; }
  html.has-desktop-navigation .chat-app__nav-item { gap: 12px; padding: 12px; font-size: 14px; border-radius: 5px; }
  html.has-desktop-navigation .chat-app__nav-item[aria-current='page'] { background: #eee3fa; color: #6732a8; }
}
.chat-app__style-actions { display: none; }
.brand-chat--app[data-view='brain'] .chat-app__style-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chat-app__style-actions button { border: 1px solid #e3e3e3; font-size: 14px; }
.brand-chat--app[data-knowledge='true'][data-knowledge-empty='true'] .brand-chat__history { display: flex; flex-direction: column; justify-content: center; }
.brand-chat__knowledge-welcome { width: min(100%, 560px); margin: 0 auto 24px; }
.brand-chat__knowledge-welcome[hidden], .brand-chat__knowledge-question[hidden] { display: none; }
.brand-chat__knowledge-question { margin: 0 auto 24px; color: #27212e; font-size: clamp(26px, 4vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: -.8px; text-align: center; overflow-wrap: anywhere; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-actions { display: flex; justify-content: center; gap: 10px; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-actions > button { flex: 1 1 0; max-width: 220px; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 8px; border: 1px solid #ded7e8; border-radius: 5px; background: #fff; font-size: 13px; font-weight: 500; text-align: center; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-actions svg { flex-basis: 19px; width: 19px; height: 19px; }
.chat-app__style-preview { display: none; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-actions > button { flex-wrap: wrap; align-content: center; row-gap: 7px; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-preview { display: flex; flex: 1 0 100%; align-items: center; justify-content: center; gap: 6px; min-width: 0; color: #6f6778; font-size: 12px; font-weight: 400; line-height: 1.3; }
.chat-app__style-swatch { flex: 0 0 auto; width: 20px; height: 20px; border: 1px solid #00000024; border-radius: 50%; }
.chat-app__style-font { overflow: hidden; color: #2b2233; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.chat-app__style-separator { color: #b3abbd; }
.chat-app__style-empty { color: #8a8193; }
.brand-chat--app[data-knowledge='true'] .chat-app__style-actions #brand-owner-panel { display: none; }
.brand-chat--app[data-knowledge-family='true'] .chat-app__style-actions { display: none; }
.brand-chat__knowledge-families { margin-top: 26px; }
.brand-chat--app[data-knowledge-family='true'] .brand-chat__knowledge-families { margin-top: 0; }
.brand-family__heading { margin: 0 0 10px; color: #706779; font-size: 13px; font-weight: 500; text-align: left; }
.brand-family__list { display: grid; gap: 8px; max-height: min(26vh, 220px); padding: 2px; margin: -2px; overflow-y: auto; }
.brand-family__button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; margin: 0; border: 1px solid #ded7e8; border-radius: 5px; background: #fff; color: #352a40; font: 500 14px/1.45 Inter, system-ui, sans-serif; text-align: center; cursor: pointer; box-shadow: none; letter-spacing: normal; text-transform: none; }
.brand-family__button:disabled { opacity: .5; cursor: default; }
.brand-family__button:focus-visible, .brand-family__editor:focus-visible { outline: 2px solid #783fc3; outline-offset: 2px; }
.brand-family__choice { width: 100%; justify-content: space-between; text-align: left; overflow-wrap: anywhere; }
.brand-family__choice::after { content: '›'; font-size: 22px; color: #917d9e; }
.brand-family__add { width: 100%; margin-top: 8px; color: #783fc3; }
.brand-family__add::before { content: '+'; font-size: 19px; font-weight: 400; }
.brand-family__empty { margin: 8px 0 14px; font-size: 13px; color: #746b7c; line-height: 1.5; }
.brand-family__back { padding-left: 0; border-color: transparent; background: transparent; color: #755493; font-size: 12px; }
.brand-family__back::before { content: '←'; }
.brand-family__eyebrow { margin: 20px 0 5px; font-size: 12px; color: #7a6c86; }
.brand-family__name { margin: 0 0 22px; font-size: clamp(24px, 4vw, 30px); font-weight: 600; line-height: 1.25; letter-spacing: -.5px; overflow-wrap: anywhere; }
.brand-family__strategy { margin: 0 0 24px; white-space: pre-wrap; overflow-wrap: anywhere; color: #342d3b; font-size: 16px; line-height: 1.75; }
html.has-chat-app #brand-chat-dialog .brand-family__editor { box-sizing: border-box; display: block; width: 100%; min-height: 320px; margin: 0 0 14px; padding: 16px; border: 1px solid #d4c6e0; border-radius: 5px; background: #fff; color: #342d3b; font: 400 16px/1.7 Inter, system-ui, sans-serif; resize: vertical; }
.brand-family__actions, .brand-family__edit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.brand-family__button--primary { border-color: #783fc3; background: #783fc3; color: #fff; }
.brand-family__counter { flex-basis: 100%; color: #82798a; font-size: 11px; padding: 2px 0; }
.brand-family__status { margin: 16px 0 12px; color: #675574; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.brand-chat__knowledge-families [hidden], html.has-chat-app #brand-chat-dialog .brand-family__editor[hidden] { display: none; }
.chat-app__header button:disabled, .chat-app__drawer button:disabled { opacity: .4; cursor: default; }
:is(.chat-app__header,.chat-app__drawer,.chat-app__style-actions) :is(button,a):focus-visible { outline: 2px solid #222; outline-offset: 3px; }
@media (hover: hover) { .chat-app__nav-item:hover { background: #f6f6f6; } }
@media (max-width: 600px) {
  html.has-chat-app .app-shell { padding: 12px 14px 30px; }
  .chat-app__header { min-height: 60px; padding: 7px 16px; }
  .chat-app__title { font-size: 19px; }
  .brand-chat--app .brand-chat__conversation { padding: 0 16px max(12px, env(safe-area-inset-bottom)); }
  .brand-chat--app .brand-chat__history { padding-top: 20px; }
  .brand-chat--app[data-entry='name'] .brand-chat__new-brand .brand-chat__input { font-size: 16px; min-height: 64px; }
  .brand-chat--app[data-entry='name'] .brand-chat__new-brand > .brand-chat__local-text { font-size: 27px; letter-spacing: -.7px; }
  .chat-app__drawer { width: min(360px, calc(100vw - 46px)); padding-left: 12px; padding-right: 12px; }
}

/* A finished brand brief leads to planning; information remains editable. */
.brand-chat__ready-summary { padding: 22px 0 8px; margin-top: 16px; border-top: 1px solid #edf0ed; }
.brand-chat__ready-identity { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 650; color: #202923; overflow-wrap: anywhere; }
.brand-chat__ready-industry { margin: 5px 0 20px; color: #747d77; font-size: 13px; line-height: 1.5; }
.brand-chat__ready-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-chat__ready-actions button { min-height: 54px; padding: 14px 16px; border: 1px solid #1d513b; border-radius: 16px; background: #1d513b; color: #fff; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.brand-chat__ready-actions button:last-child { background: #fff; border-color: #dce4de; color: #344e3d; }
html.has-chat-app #day-schedule { max-width: 760px; margin: 0 auto; }
.social-plan-header { position: relative; margin: 16px 0 28px; padding-right: 8px; }
.social-plan-eyebrow { margin: 0 0 10px; font-size: 11px; color: #718079; letter-spacing: .04em; }
html .social-plan-header .lab-plan-title { display: block; margin: 0; font-size: clamp(26px, 5vw, 34px); line-height: 1.15; font-weight: 650; letter-spacing: -1px; color: #1d2922; }
.social-plan-context { margin: 6px 0 16px; color: #6f7973; font-size: 17px; overflow-wrap: anywhere; }
.social-plan-platforms { display: flex; gap: 8px; color: #3e5145; }
.social-plan-platforms > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #e5eae6; border-radius: 11px; background: #fafcf9; }
.social-plan-platforms svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.schedule-family-picker { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 24px; border: 1px solid #e5eae6; border-radius: 24px; background: #fff; color: #1d2922; box-shadow: 0 24px 80px #14251d26; font-family: Inter, system-ui, sans-serif; }
.schedule-family-picker::backdrop { background: #14251d55; backdrop-filter: blur(5px); }
.schedule-family-picker h2 { margin: 8px 0 24px; font-size: 25px; font-weight: 600; line-height: 1.2; letter-spacing: -.6px; }
.schedule-family-picker__context { color: #718079; font-size: 13px; margin: 0; }
.schedule-family-picker__choices { display: grid; gap: 10px; }
.schedule-family-picker button { width: 100%; min-height: 52px; padding: 15px; border: 1px solid #dce7df; border-radius: 14px; background: #f4f8f5; color: #224a35; font: inherit; font-size: 15px; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.schedule-family-picker button:focus-visible { outline: 3px solid #38915c; outline-offset: 3px; }
.schedule-family-picker .schedule-family-picker__cancel { margin-top: 14px; text-align: center; background: transparent; border-color: transparent; color: #727d76; font-size: 13px; }

.brand-family__industry-summary { margin: -8px 0 20px; font-size: 13px; line-height: 1.5; color: #706779; }
.brand-family__industry { display: grid; gap: 7px; margin: 0 0 18px; font-size: 13px; color: #706779; }
html.has-chat-app #brand-chat-dialog .brand-family__industry-select { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d4c6e0; border-radius: 5px; background: #fff; color: #342d3b; font: 400 16px/1.4 Inter, system-ui, sans-serif; }
