.ac-chat-launch {
  position: fixed;
  z-index: 35;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 17px;
  border: 1px solid #ffffff26;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  box-shadow: 0 4px 20px #27282133;
  font-size: 12px;
  font-weight: 700;
}
.ac-chat-launch svg { color: #ffa263; }
.ac-chat-launch:hover { background: #41423a; }
.ac-chat {
  position: fixed;
  inset: auto max(22px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) auto;
  margin: 0;
  padding: 0;
  width: min(390px, calc(100% - 44px));
  max-height: calc(100dvh - 40px);
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 10px 50px #27282130;
  overflow: hidden;
}
.ac-chat::backdrop { background: #27282126; }
.ac-chat-shell { display: flex; flex-direction: column; max-height: min(590px, calc(100dvh - 42px)); }
.ac-chat-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px;
  gap: 11px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--warm);
}
.ac-chat-header h2 { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.ac-chat-header p { font-size: 11px; color: #67675e; margin-top: 3px; }
.ac-chat-close { width: 44px; height: 44px; border-radius: 50%; background: transparent; font-size: 25px; }
.ac-chat-close:hover { background: #ebe9e2; }
.ac-chat-scroll { overflow: auto; overscroll-behavior: contain; padding: 15px; }
.ac-chat-log { display: grid; gap: 9px; }
.ac-chat-message {
  width: fit-content;
  max-width: 95%;
  padding: 10px 13px;
  border-radius: 10px 10px 10px 2px;
  background: var(--warm);
  font-size: 13px;
  line-height: 1.55;
}
.ac-chat-visitor { justify-self: end; background: #fce7d8; border-radius: 10px 10px 2px 10px; }
.ac-chat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ac-chat-choices { display: grid; gap: 7px; margin-top: 12px; }
.ac-chat-choices > * {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e3d7ca;
  border-radius: 6px;
  background: white;
  color: #753414;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.ac-chat-choices > :hover { background: #fff4eb; border-color: #dc9b71; }
.ac-chat-choices > a::after {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-inline: auto 2px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.ac-chat :focus-visible { outline-offset: -2px; }
.ac-chat-footer:has(button[hidden]) { display: none; }
.ac-chat-footer { border-top: 1px solid var(--line); padding: 0 15px; }
.ac-chat-footer button { min-height: 44px; padding: 0 5px; background: transparent; font-size: 12px; font-weight: 700; }
.ac-chat-footer button:hover { color: var(--orange-dark); }
@media (max-width: 620px) {
  .ac-chat-launch { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); padding: 12px; }
  .ac-chat-launch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ac-chat { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: min(390px, calc(100% - 24px)); }
}
