.aida-chat .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.aida-chat-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  background: var(--gold);
  color: #141210;
  font-family: var(--sans);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.aida-chat {
  position: fixed;
  right: 1.1rem;
  bottom: 5.2rem;
  z-index: 40;
  width: min(24rem, calc(100vw - 1.6rem));
  height: min(34rem, calc(100dvh - 7.4rem));
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.aida-chat[hidden] { display: none; }
.aida-chat header,
.aida-chat form { padding: 0.85rem 1rem; }
.aida-chat header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.aida-chat header p { margin: 0; }
.aida-chat header strong { font-family: var(--serif); font-weight: 520; }
.aida-chat header small { display: block; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.aida-chat .aida-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.6rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.aida-log {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
}
.aida-log p {
  max-width: 90%;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.aida-log .aida { background: var(--bg); border: 1px solid var(--line); }
.aida-log .visitor { align-self: flex-end; background: var(--gold); color: #141210; }
.aida-chat form { display: flex; gap: 0.45rem; border-top: 1px solid var(--line); }
.aida-chat input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.75rem;
  background: var(--bg);
  color: var(--ink);
}
.aida-chat form button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.7rem 0.9rem;
  background: var(--gold);
  color: #141210;
  font-weight: 700;
  cursor: pointer;
}
.aida-go {
  display: block;
  margin: 0 1rem 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  border: 0;
  background: var(--gold);
  color: #141210;
  font-family: var(--sans);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.aida-chat-toggle:focus-visible,
.aida-chat button:focus-visible,
.aida-chat input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (max-width: 480px) {
  .aida-chat-toggle { right: 0.7rem; bottom: 0.7rem; }
  .aida-chat { right: 0.7rem; bottom: 4.8rem; width: calc(100vw - 1.4rem); }
}
