.zem-ai {
  --zem-ai-ink: #071a20;
  --zem-ai-deep: #09252b;
  --zem-ai-gold: #e8b84f;
  --zem-ai-paper: #fffdf8;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--zem-ai-ink);
}
.zem-ai-launcher {
  border: 1px solid rgba(232,184,79,.65);
  border-radius: 999px;
  background: var(--zem-ai-deep);
  color: #fff;
  padding: 13px 18px;
  font: inherit;
  font-weight: 750;
  box-shadow: 0 14px 35px rgba(3,22,28,.25);
  cursor: pointer;
}
.zem-ai-launcher span { color: var(--zem-ai-gold); margin-right: 6px; }
.zem-ai-dialog {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 100px));
  overflow: hidden;
  border: 1px solid rgba(7,26,32,.14);
  border-radius: 18px;
  background: var(--zem-ai-paper);
  box-shadow: 0 24px 70px rgba(3,22,28,.3);
}
.zem-ai-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  background: var(--zem-ai-deep);
  color: #fff;
}
.zem-ai-dialog > header strong,
.zem-ai-dialog > header span { display: block; }
.zem-ai-dialog > header span { margin-top: 2px; color: #d8e1e3; font-size: 12px; }
.zem-ai-dialog > header button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.zem-ai-consent { padding: 20px; }
.zem-ai-consent > p { margin-top: 0; font-weight: 700; }
.zem-ai-consent label,
.zem-ai-review label { display: block; font-size: 13px; line-height: 1.5; }
.zem-ai-primary {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background: var(--zem-ai-gold);
  color: #17130a;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.zem-ai-primary:disabled { opacity: .55; cursor: wait; }
.zem-ai-chat { display: grid; grid-template-rows: minmax(180px, 1fr) auto auto auto auto auto; max-height: min(650px, calc(100vh - 165px)); }
.zem-ai-messages { overflow-y: auto; padding: 16px; background: #f4f5f2; }
.zem-ai-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 13px;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 14px;
}
.zem-ai-message-assistant { border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 3px 12px rgba(7,26,32,.08); }
.zem-ai-message-user { margin-left: auto; border-bottom-right-radius: 4px; background: var(--zem-ai-deep); color: #fff; }
.zem-ai-review { overflow-y: auto; max-height: 310px; padding: 16px; border-top: 1px solid #dce2df; background: #fff9e9; }
.zem-ai-review h3 { margin: 0 0 5px; font-size: 17px; }
.zem-ai-review > p { margin: 0 0 12px; font-size: 13px; }
.zem-ai-review dl { display: grid; grid-template-columns: 115px 1fr; gap: 6px 10px; margin: 0 0 13px; font-size: 12px; }
.zem-ai-review dt { font-weight: 800; }
.zem-ai-review dd { margin: 0; overflow-wrap: anywhere; }
.zem-ai-chat form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid #dce2df; background: #fff; }
.zem-ai-chat textarea { min-height: 48px; max-height: 120px; resize: vertical; border: 1px solid #aebbb8; border-radius: 9px; padding: 9px; font: inherit; }
.zem-ai-chat form button { align-self: stretch; border: 0; border-radius: 9px; background: var(--zem-ai-deep); color: #fff; padding: 0 13px; font: inherit; font-weight: 750; cursor: pointer; }
.zem-ai-status { min-height: 20px; margin: 0; padding: 0 14px 10px; background: #fff; color: #586764; font-size: 12px; }
.zem-ai-voice { display: grid; grid-template-columns: auto auto 1fr; gap: 7px 9px; align-items: center; padding: 10px 14px; border-top: 1px solid #dce2df; background: #fff; }
.zem-ai-voice p { grid-column: 1 / -1; margin: 0; color: #586764; font-size: 11px; line-height: 1.4; }
.zem-ai-voice button { min-height: 34px; border: 1px solid var(--zem-ai-deep); border-radius: 8px; background: #fff; color: var(--zem-ai-deep); padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.zem-ai-voice button[data-zem-ai-voice-stop] { border-color: #9b2c2c; color: #8a2424; }
.zem-ai-voice button:disabled { opacity: .55; cursor: wait; }
.zem-ai-voice span { color: #586764; font-size: 11px; text-align: right; }
.zem-ai-handoff { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 10px 14px; border-top: 1px solid #dce2df; background: #f8f3e8; font-size: 12px; line-height: 1.4; }
.zem-ai-consent .zem-ai-handoff { margin: 16px -20px -20px; padding: 12px 20px; }
.zem-ai-handoff span { flex: 1 1 100%; color: #586764; }
.zem-ai-handoff a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #b98c2e; border-radius: 8px; padding: 6px 10px; color: #654707; font-weight: 800; text-decoration: none; }
.zem-ai-handoff a:focus-visible { outline: 3px solid rgba(232,184,79,.55); outline-offset: 2px; }
.zem-ai a { color: #7b590b; }
.zem-ai input[type="checkbox"] { margin: 1px 5px 0 0; vertical-align: top; }
.zem-ai .cf-turnstile { margin-top: 12px; }
@media (max-width: 600px) {
  .zem-ai { right: 14px; bottom: 14px; }
  .zem-ai-dialog { position: fixed; inset: 10px; width: auto; max-height: none; }
  .zem-ai-chat { max-height: calc(100vh - 72px); }
  .zem-ai-voice { grid-template-columns: 1fr 1fr; }
  .zem-ai-voice span { grid-column: 1 / -1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .zem-ai *, .zem-ai *::before, .zem-ai *::after { scroll-behavior: auto !important; }
}
