/* Agent conversation and editable advertising artifact. */
.turn-text.is-streaming::after{content:'▍';color:#b59ac4;animation:room-caret 1s steps(1,end) infinite;margin-left:2px}.result-studio details>summary{cursor:pointer;list-style:none;margin-top:16px}.result-studio details>summary::-webkit-details-marker{display:none}.chat-board{margin-top:20px}
.room-intro {
  max-width: 740px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.agent-room {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.agent-room > *,
.agent-room :is(.turn-body, .agent-chat-head > div, .result-studio-head > div) {
  min-width: 0;
}

.agent-chat,
.result-studio {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 36px #49215b08;
}

.agent-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agent-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(110deg, #fff, #faf6fd);
}

.agent-avatar,
.turn-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--deep);
  background: #f1e7f7;
  border: 1px solid #e9d9f0;
}

.agent-avatar {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: linear-gradient(140deg, #f4eafb, #e6d3ee);
  box-shadow: inset 0 1px 0 #ffffffc9;
}

.agent-avatar svg {
  width: 23px;
  height: 23px;
}

.agent-name {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.02em;
}

.agent-presence {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.agent-presence::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #217a600b;
}

.room-mode {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid #e7daed;
  border-radius: 7px;
  background: #f8f3fb;
  color: #795b86;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-transcript {
  display: flex;
  flex-direction: column;
  gap: 25px;
  min-height: 330px;
  max-height: 540px;
  padding: 26px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d9c8e2 transparent;
  scroll-padding-block: 24px;
}

.chat-turn {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  animation: room-turn-in .24s ease-out both;
}

.turn-avatar {
  width: 29px;
  height: 29px;
  margin-top: 2px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
}

.turn-avatar svg {
  width: 16px;
  height: 16px;
}

.turn-body {
  flex: 1;
  max-width: 100%;
}

.turn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.turn-meta :is(b, strong) {
  color: #54415f;
  font-size: 12px;
  font-weight: 600;
}

.turn-meta time,
.turn-meta > span {
  color: #8b7e94;
}

.turn-text {
  color: #4c3d57;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.turn-text p + p {
  margin-top: 12px;
}

.turn-text :is(ul, ol) {
  margin-block: 10px;
  padding-left: 20px;
  white-space: normal;
}

.chat-turn.is-user {
  flex-direction: row-reverse;
  margin-left: 23px;
}

.chat-turn.is-user .turn-avatar {
  border-color: #e4d9ea;
  background: #f5f0f8;
  color: #786184;
}

.chat-turn.is-user .turn-body {
  flex: 0 1 auto;
  padding: 13px 16px;
  border: 1px solid #eadff0;
  border-radius: 16px 4px 16px 16px;
  background: #f6f0fa;
}

.chat-turn.is-user .turn-text {
  color: #50365f;
}

.chat-turn.is-user .turn-meta {
  margin-bottom: 5px;
}

.activity-stream {
  display: grid;
  gap: 11px;
  margin: 16px 0 4px;
  padding: 14px 0 3px;
  border-top: 1px solid #f0e9f4;
}

.activity-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #8a7c93;
  font-size: 13px;
  line-height: 1.6;
}

.activity-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 7px;
  border: 1px solid #cfc0d8;
  border-radius: 50%;
  background: #ece3f1;
}

.activity-line.is-current {
  color: #776682;
}

.activity-line.is-current .activity-dot {
  border-color: #a879ba;
  background: #b58bc4;
  box-shadow: 0 0 0 3px #ae7dc112;
}

.activity-line.is-done .activity-dot {
  border-color: #95b6a8;
  background: #95b6a8;
}

.activity-line.is-done {
  color: #8a7d92;
}

.activity-shimmer {
  color: #7d6d88;
  background-image: linear-gradient(105deg, #7d6d88 28%, #bcaac8 43%, #7d6d88 58%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: room-status-sweep 2.8s linear infinite;
}

.activity-line.is-current .activity-shimmer::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: .9em;
  margin-left: 4px;
  background: #aa8ab9;
  vertical-align: -.05em;
  animation: room-caret 1.05s steps(1, end) infinite;
}

.activity-caption {
  margin: 4px 0 0 15px;
  color: #93859c;
  font-size: 11px;
  line-height: 1.6;
}

.agent-composer {
  margin-top: auto;
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: #fdfbfe;
}

.agent-composer form,
form.agent-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 11px;
}

.agent-composer textarea {
  min-height: 77px;
  max-height: 210px;
  border-color: #dfd2e7;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.55;
}

.agent-composer textarea::placeholder {
  color: #9b8ea5;
}

.chat-send {
  min-width: 46px;
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 11px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-send svg {
  width: 18px;
  height: 18px;
}

.composer-note {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: #8a7b94;
  font-size: 11px;
  line-height: 1.6;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 20px 18px;
  background: #fdfbfe;
}

.agent-composer .quick-prompts {
  grid-column: 1 / -1;
  padding: 0;
}

.quick-prompts button,
.chat-task-controls button {
  min-width: 0;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #e5d9ec;
  border-radius: 8px;
  background: #fff;
  color: #735380;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  transition: border-color .18s, background .18s;
}

.quick-prompts button:hover,
.chat-task-controls button:hover {
  border-color: #c8a8d5;
  background: #f6effa;
}

.chat-task-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chat-result-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 13px;
  padding: 8px 11px;
  border: 1px solid #e3d4eb;
  border-radius: 9px;
  background: #faf5fd;
  color: var(--deep);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.chat-result-link svg {
  width: 17px;
  height: 17px;
}

.result-studio {
  padding: 20px;
}

.result-studio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.result-studio-head .eyebrow {
  margin-bottom: 7px;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.result-studio-head :is(h2, h3) {
  font-size: 20px;
  letter-spacing: -.04em;
  line-height: 1.25;
}

.result-studio-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.result-studio-head .pill {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 10px;
}

.flyer-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid #e6dcec;
  border-radius: 13px;
  background: #f7f2fa;
  box-shadow: 0 6px 20px #3b204b0a;
}

.flyer-stage img,
#flyer-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
}

.flyer-status {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 18px;
  color: #83708f;
  font-size: 12px;
  line-height: 1.6;
}

.flyer-status svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.flyer-edit-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
  padding-top: 17px;
  border-top: 1px solid #eee5f3;
}

.flyer-edit-fields .field {
  min-width: 0;
  margin: 0;
  color: #695375;
  font-size: 12px;
}

.flyer-edit-fields .field > span {
  margin-bottom: 6px;
}

.flyer-edit-fields :is(input, textarea, select) {
  padding: 10px 11px;
  border-color: #e3d7ea;
  border-radius: 9px;
  background: #fffeff;
  font-size: 15px;
  line-height: 1.5;
}

.flyer-edit-fields textarea {
  min-height: 82px;
}

.flyer-edit-fields .full,
.flyer-edit-fields .palette-options {
  grid-column: 1 / -1;
}

.palette-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.palette-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #e4d8eb;
  border-radius: 8px;
  background: #fff;
  color: #796384;
  font-size: 11px;
  line-height: 1.4;
  transition: border-color .18s, background .18s;
}

.palette-choice::before {
  content: '';
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  border: 1px solid #26153414;
  border-radius: 50%;
  background: var(--palette, var(--swatch, linear-gradient(135deg, #ddc3ed 50%, #6d387f 50%)));
}

.palette-choice[data-palette="forest"] {
  --palette: linear-gradient(135deg, #dae8da 50%, #345d4d 50%);
}

.palette-choice[data-palette="sunset"] {
  --palette: linear-gradient(135deg, #fae1bd 50%, #b65b49 50%);
}

.palette-choice[data-palette="charcoal"] {
  --palette: linear-gradient(135deg, #e6dfd6 50%, #33313a 50%);
}

.palette-choice[aria-pressed="true"] {
  border-color: #af7bc0;
  background: #f5ecfa;
  color: var(--deep);
  box-shadow: 0 0 0 1px #af7bc024;
}

.flyer-tools {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.flyer-tools :is(button, a) {
  flex: 1 1 125px;
  min-width: 0;
  min-height: 43px;
  padding: 10px 13px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.artifact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid #dcc7e6;
  border-radius: 9px;
  background: #f8f1fc;
  color: var(--deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.artifact-action svg {
  width: 17px;
  height: 17px;
}

.artifact-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  min-height: 100%;
  padding: 32px 25px;
  background: radial-gradient(ellipse at 50% 32%, #eadcf684, transparent 56%), linear-gradient(150deg, #fbf7fd, #f5eef9);
  color: #8d709d;
  text-align: center;
}

.artifact-empty > svg {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  padding: 10px;
  box-sizing: content-box;
  border: 1px solid #e3d2ec;
  border-radius: 20px;
  background: #ffffff8c;
  color: #a67cb8;
}

.artifact-empty :is(h3, h4, strong) {
  max-width: 260px;
  color: #70517f;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.3;
}

.artifact-empty p {
  max-width: 255px;
  color: #8d7a98;
  font-size: 14px;
  line-height: 1.7;
}

.agent-room :is(button, a, input, textarea, select):focus-visible {
  outline: 3px solid #b27ac8;
  outline-offset: 3px;
}

.agent-room button:disabled,
.agent-room button[aria-disabled="true"] {
  opacity: .55;
  transform: none;
  box-shadow: none;
}

@keyframes room-status-sweep {
  from { background-position: 160% 0; }
  to { background-position: -100% 0; }
}

@keyframes room-caret {
  0%, 48% { opacity: .75; }
  49%, 100% { opacity: 0; }
}

@keyframes room-turn-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .agent-room { gap: 15px; }
  .agent-chat-head { padding: 18px; gap: 9px; flex-wrap: wrap; }
  .room-mode { font-size: 9px; }
  .chat-transcript { padding: 22px 17px; }
  .agent-composer { padding: 16px; }
  .quick-prompts { padding-inline: 16px; }
  .result-studio { padding: 16px; }
  .result-studio-head { flex-wrap: wrap; }
  .flyer-edit-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .room-intro { margin-bottom: 18px; font-size: 15px; }
  .agent-room { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .agent-chat, .result-studio { border-radius: 18px; }
  .agent-chat-head { padding: 17px; gap: 10px; }
  .agent-avatar { width: 39px; height: 39px; border-radius: 12px; }
  .agent-name { font-size: 15px; }
  .agent-presence { font-size: 11px; }
  .room-mode { padding: 4px 7px; font-size: 9px; }
  .chat-transcript { min-height: 330px; max-height: 500px; padding: 23px 17px; gap: 23px; }
  .chat-turn { gap: 9px; }
  .turn-text { font-size: 15px; }
  .chat-turn.is-user { margin-left: 13px; }
  .chat-turn.is-user .turn-body { padding: 12px 13px; }
  .agent-composer { padding: 16px; }
  .agent-composer form, form.agent-composer { gap: 9px; }
  .agent-composer textarea { min-height: 85px; padding: 11px 12px; }
  .chat-send { min-width: 43px; min-height: 43px; padding: 11px; }
  .quick-prompts { gap: 7px; padding: 0 16px 16px; }
  .quick-prompts button { min-height: 38px; font-size: 12px; }
  .result-studio { padding: 17px; }
  .flyer-stage { max-width: 460px; margin-inline: auto; }
  .result-studio-head :is(h2, h3) { font-size: 21px; }
  .flyer-edit-fields :is(input, textarea, select) { font-size: 16px; }
  .flyer-tools :is(button, a) { font-size: 13px; min-height: 46px; }
  .artifact-empty { padding: 28px 23px; }
}

@media (max-width: 380px) {
  .agent-chat-head { flex-wrap: wrap; padding: 15px; }
  .room-mode { margin-left: auto; }
  .chat-transcript { padding: 22px 13px; }
  .chat-turn { gap: 8px; }
  .turn-avatar { width: 25px; height: 25px; border-radius: 8px; }
  .chat-turn.is-user { margin-left: 7px; }
  .agent-composer { padding: 13px; }
  .quick-prompts { padding-inline: 13px; }
  .result-studio { padding: 14px; }
  .result-studio-head { flex-wrap: wrap; }
  .flyer-edit-fields { grid-template-columns: minmax(0, 1fr); }
  .flyer-tools :is(button, a) { flex-basis: 100%; }
  .artifact-empty :is(h3, h4, strong) { font-size: 19px; }
  .artifact-empty p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .agent-room *, .agent-room *::before, .agent-room *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .activity-shimmer {
    color: #7d6d88;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
  .activity-line.is-current .activity-shimmer::after { opacity: .6; }
}

@media (forced-colors: active) {
  .activity-shimmer { background: none; -webkit-text-fill-color: currentColor; }
  .palette-choice[aria-pressed="true"] { outline: 2px solid Highlight; }
  .activity-dot, .agent-presence::before { background: currentColor; }
}
