.drop-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 16px rgb(0 0 0 / 0.35));
}
.drop-toggle svg { display: block; width: 58px; height: 58px; }
.drop-toggle:focus-visible { outline: 2px solid #75cfed; outline-offset: 3px; }

body.has-appbar .drop-toggle {
  right: 16px;
  bottom: calc(78px + env(safe-area-inset-bottom));
}

body.has-appbar .assistant {
  bottom: calc(148px + env(safe-area-inset-bottom));
  height: min(520px, calc(100svh - 220px));
}

.assistant {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 70;
  display: none;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100svh - 108px));
  flex-direction: column;
  background: #11283f;
  border: 1px solid rgb(200 236 248 / 0.35);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
  overflow: hidden;
}
.assistant.is-open { display: flex; }
.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px 14px;
  background: #183754;
}
.assistant-head strong {
  display: block;
  color: #fff;
  font-family: "Gotham Rounded", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}
.assistant-head span {
  display: block;
  color: #c8ecf8;
  font-size: 0.75rem;
}
.assistant-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.assistant-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 18px;
}
.bubble {
  max-width: 86%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 18px;
  font-family: "Gotham Rounded", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.4;
}
.bubble.bot {
  align-self: flex-start;
  background: #e9eef2;
  color: #11283f;
  border-bottom-left-radius: 4px;
}
.bubble.user {
  align-self: flex-end;
  background: #1c4770;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.choice-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.choice-stack button {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: #1c4770;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.choice-stack button:hover { background: #245a86; }
.bubble .aside {
  display: block;
  margin-top: 10px;
}
.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 1.2em;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1c4770;
  animation: type-dot 1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes type-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.assistant-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #183754;
}
.assistant-form input {
  flex: 1;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #11283f;
  font: inherit;
  font-size: 16px;
}
.assistant-form button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: #1c4770;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.assistant-credit {
  margin: 0;
  padding: 2px 12px 0;
  border-top: 1px solid rgb(200 236 248 / 0.35);
  background: #11283f;
  color: #8fb4c6;
  font-family: "Gotham", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-align: right;
  text-transform: uppercase;
}
