.design-ai-launcher {
  position: fixed;
  z-index: 1000;
  top: 8px;
  right: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 66px;
  height: 36px;
  min-height: 36px;
  padding: 3px 9px 3px 4px;
  overflow: hidden;
  border: 1px solid #a90f31;
  border-radius: 999px;
  background: linear-gradient(135deg, #e5304f, #a90f31);
  color: #fff;
  box-shadow: 0 0 0 2px #fff9, 0 4px 16px #c91f3f77;
  font: 800 15px/1 system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.design-ai-launcher img {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff8f8;
  pointer-events: none;
}
.design-ai-launcher span { display: block; letter-spacing: .02em; }
.studio-help > .design-ai-launcher {
  position: static;
  flex: 0 0 auto;
  width: 66px;
  height: 36px;
  padding: 3px 9px 3px 4px;
  border: 1px solid #a90f31;
  border-radius: 999px;
  background: linear-gradient(135deg, #e5304f, #a90f31);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 0 0 2px #fff9, 0 4px 16px #c91f3f77;
}
.design-ai-launcher:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.design-ai-launcher[aria-expanded="true"] { border-color: #b91536; box-shadow: 0 0 0 3px #ff768b55, 0 4px 18px #c91f3f88; }
.design-ai-backdrop {
  position: fixed;
  z-index: 1003;
  inset: 0;
  pointer-events: none;
  background: transparent;
}
.design-ai-drawer {
  position: fixed;
  z-index: 1004;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(440px, 100vw);
  height: 100dvh;
  box-sizing: border-box;
  background: #fffaf4;
  color: #242936;
  box-shadow: -12px 0 40px #0005;
  font-family: system-ui, sans-serif;
}
.design-ai-drawer[hidden], .design-ai-backdrop[hidden] { display: none; }
.design-ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #dacdcc;
  background: linear-gradient(135deg, #fffaf4, #f8e9e8);
}
.design-ai-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle, #fff, #ffdce2);
  color: #fff;
  font-size: 20px;
}
.design-ai-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.design-ai-title { flex: 1; min-width: 0; }
.design-ai-title strong { display: block; font-size: 15px; }
.design-ai-title small { display: block; margin-top: 3px; color: #756a70; font-size: 11px; }
.design-ai-reset, .design-ai-compact {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d5b4bc;
  border-radius: 999px;
  background: #fff;
  color: #87314f;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.design-ai-reset:hover, .design-ai-reset:focus-visible,
.design-ai-compact:hover, .design-ai-compact:focus-visible { background: #fff0f3; outline: 2px solid #96345333; }
.design-ai-close {
  width: 34px;
  height: 34px;
  border: 1px solid #c9bcba;
  border-radius: 50%;
  background: #fff;
  color: #29394d;
  font-size: 20px;
  cursor: pointer;
}
.design-ai-scroll { overflow: auto; padding: 16px; }
.design-ai-drawer.is-compact {
  top: 8px;
  right: 8px;
  width: min(330px, calc(100vw - 16px));
  height: auto;
  border: 1px solid #d5b4bc;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px #0004;
}
.design-ai-drawer.is-compact .design-ai-scroll,
.design-ai-drawer.is-compact .design-ai-composer,
.design-ai-drawer.is-compact .design-ai-reset { display: none; }
.design-ai-drawer.is-compact .design-ai-header { border-bottom: 0; }
.design-ai-message {
  margin: 0 0 12px;
  padding: 12px 13px;
  border-radius: 12px 12px 12px 3px;
  background: #f0e7e3;
  line-height: 1.65;
  font-size: 13px;
}
.design-ai-message strong { color: #7e2949; }
#designAiAnswer { display: grid; gap: 9px; margin: 0 0 10px; }
.design-ai-chat {
  max-width: 88%; box-sizing: border-box; padding: 10px 12px; border-radius: 13px;
  font-size: 12px; line-height: 1.55; overflow-wrap: anywhere;
}
.design-ai-chat-assistant { justify-self: start; border-radius: 13px 13px 13px 3px; background: #f0e7e3; color: #3e3940; }
.design-ai-chat-assistant strong { color: #7e2949; }
.design-ai-chat-user { justify-self: end; border-radius: 13px 13px 3px 13px; background: #87314f; color: #fff; }
.design-ai-chat .design-ai-understood { margin: 8px 0 0; }
.design-ai-first-question {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #d7b36a;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9e9, #f9e7e5);
  box-shadow: 0 5px 18px #8b542318;
}
.design-ai-first-question > strong { display: block; color: #6f2945; font-size: 14px; }
.design-ai-first-question > span { display: block; margin-top: 4px; color: #786c70; font-size: 11px; }
.design-ai-first-question > small { display: block; margin-bottom: 5px; color: #8d755d; font-size: 10px; font-weight: 800; }
.design-ai-first-question > p { margin: 4px 0 10px; color: #786c70; font-size: 11px; }
.design-ai-question-progress { height: 4px; margin: -4px 0 9px; overflow: hidden; border-radius: 99px; background: #eadccb; }
.design-ai-question-progress span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #963453, #d8a13e); transition: width .2s ease; }
.design-ai-question-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.design-ai-question-choice {
  min-height: 40px; padding: 7px 8px; border: 1px solid #c9a66b; border-radius: 9px;
  background: #fff; color: #5e2949; font-size: 12px; font-weight: 800; cursor: pointer;
}
.design-ai-question-choice:hover, .design-ai-question-choice:focus-visible { border-color: #963453; background: #fff2f4; outline: 2px solid #96345333; }
.design-ai-question-nav { display: flex; justify-content: space-between; gap: 5px; margin-top: 10px; }
.design-ai-question-nav button, .design-ai-question-complete button {
  min-height: 28px; padding: 4px 7px; border: 0; border-radius: 7px; background: #eee5df; color: #65595d; font-size: 10px; cursor: pointer;
}
.design-ai-question-nav button:disabled { opacity: .38; cursor: default; }
.design-ai-question-complete { display: grid; gap: 8px; }
.design-ai-question-complete > strong { color: #6f2945; font-size: 14px; }
.design-ai-question-complete > span { color: #786c70; font-size: 11px; }
.design-ai-question-summary { display: flex; flex-wrap: wrap; gap: 5px; }
.design-ai-question-summary span { padding: 5px 7px; border-radius: 999px; background: #fff; color: #71364c; font-size: 10px; font-weight: 700; }
.design-ai-question-complete button { justify-self: start; }
.design-ai-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.design-ai-mood {
  min-height: 48px;
  border-color: #a97637 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #8d2948, #bd5a52) !important;
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 4px 10px #7a29442b;
}
.design-ai-mood:first-child { background: linear-gradient(135deg, #313047, #65446d) !important; }
.design-ai-examples { margin: -3px 0 12px; color: #756a70; font-size: 11px; }
.design-ai-examples > summary { width: max-content; padding: 4px 0; cursor: pointer; font-weight: 700; }
.design-ai-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0 0; }
.design-ai-chip {
  padding: 7px 10px;
  border: 1px solid #c9b8b9;
  border-radius: 999px;
  background: #fff;
  color: #5e2949;
  font-size: 12px;
  cursor: pointer;
}
.design-ai-section-title { margin: 16px 0 8px; font-size: 12px; color: #786c70; }
.design-ai-understood { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: -3px 0 14px; }
.design-ai-understood b { width: 100%; color: #6c6065; font-size: 11px; }
.design-ai-understood span { padding: 5px 8px; border: 1px solid #e5b8c1; border-radius: 999px; background: #fff3f5; color: #8f2945; font-size: 11px; font-weight: 700; }
.design-ai-plans { display: grid; gap: 10px; }
.design-ai-plan {
  overflow: hidden;
  border: 1px solid #d3c6c3;
  border-radius: 12px;
  background: #fff;
}
.design-ai-plan-head {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 11px 12px 8px;
}
.design-ai-swatch { width: 10px; height: 38px; border-radius: 6px; background: var(--plan-color); }
.design-ai-plan h3 { margin: 0; font-size: 14px; }
.design-ai-plan small { display: block; margin-top: 3px; color: #766d70; }
.design-ai-plan p { margin: 0; padding: 0 12px 10px 31px; color: #514b50; font-size: 12px; line-height: 1.55; }
.design-ai-plan details { border-top: 1px solid #eee5e1; }
.design-ai-plan details > summary { padding: 7px 12px 8px 31px; color: #7b6d71; font-size: 10px; cursor: pointer; }
.design-ai-plan details[open] > summary { color: #963453; font-weight: 700; }
.design-ai-apply {
  margin-right: 1px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #963453;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.design-ai-plan.is-applied { border-color: #963453; box-shadow: 0 0 0 2px #96345328; }
.design-ai-plan.is-applied .design-ai-apply { background: #397157; }
.design-ai-status { min-height: 20px; margin: 11px 0 0; color: #397157; font-size: 12px; font-weight: 700; }
.design-ai-composer { padding: 12px; border-top: 1px solid #dacdcc; background: #fff; }
.design-ai-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.design-ai-input {
  min-height: 42px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #bcaeae;
  border-radius: 10px;
  background: #fff;
  color: #242936;
  font: 13px/1.4 system-ui, sans-serif;
}
.design-ai-send, .design-ai-undo {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #29394d;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.design-ai-undo { width: 100%; min-height: 34px; margin-top: 8px; background: #eee7e4; color: #51464b; }
.design-ai-undo:disabled { opacity: .45; cursor: default; }
.design-ai-note { margin: 7px 2px 0; color: #857a7e; font-size: 10px; }
@media (max-width: 720px) {
  .design-ai-launcher { right: 57px; width: 60px; padding: 3px 7px 3px 3px; }
  .studio-help > .design-ai-launcher { right: auto; width: 60px; padding: 3px 7px 3px 3px; }
  .studio-help-label { font-size: 11px; }
  .design-ai-header { gap: 7px; padding: 10px 12px; }
  .design-ai-reset, .design-ai-compact { padding: 0 8px; font-size: 10px; }
  .design-ai-drawer {
    top: auto;
    bottom: 0;
    width: 100vw;
    height: 52dvh;
    border-top: 2px solid #963453;
    box-shadow: 0 -12px 40px #0005;
  }
  .design-ai-question-choice { min-height: 36px; font-size: 11px; }
}
@media print { .design-ai-launcher, .design-ai-backdrop, .design-ai-drawer { display: none !important; } }
@media (prefers-reduced-motion: no-preference) {
  .design-ai-drawer:not([hidden]) { animation: designAiIn .18s ease-out; }
  @keyframes designAiIn { from { transform: translateX(24px); opacity: .6; } }
  @media (max-width: 720px) {
    .design-ai-drawer:not([hidden]) { animation-name: designAiUp; }
    @keyframes designAiUp { from { transform: translateY(24px); opacity: .6; } }
  }
}
