.ip-assistant {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 110;
  display: grid;
  justify-items: end;
  gap: 8px;
  color: #edf4ff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.ip-assistant *, .ip-assistant *::before { box-sizing: border-box; }
.ip-assistant [hidden] { display: none !important; }
.ip-assistant button, .ip-assistant input { font: inherit; }
.ip-assistant button { cursor: pointer; }
.ip-assistant :focus-visible { outline: 2px solid #a2d7ff; outline-offset: 3px; }
.ip-assistant-launch {
  min-height: 44px; padding: 0 12px; border: 1px solid #6ca6fa; border-radius: 999px;
  background: #1558c9; color: #fff; font-weight: 600; box-shadow: 0 10px 26px #0311268c;
}
.ip-assistant-launch img, .ip-assistant-head img { object-fit: contain; vertical-align: middle; }
.ip-assistant-launch img { margin-right: 7px; }
.ip-assistant-panel {
  width: min(320px, calc(100vw - 32px)); max-height: min(410px, calc(100dvh - 82px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #0c182a; border: 1px solid #385985; border-radius: 16px;
  box-shadow: 0 18px 50px #0008;
}
.ip-assistant-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: #132744; border-bottom: 1px solid #2c4566;
}
.ip-assistant-head strong { flex: 1; font-size: 13px; font-weight: 600; }
.ip-assistant-close {
  width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: #203957; color: #fff;
}
.ip-assistant-log { overflow-y: auto; min-height: 0; padding: 9px 10px 0; }
.ip-assistant .ip-assistant-message {
  font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.5;
  margin: 0 0 6px; padding: 8px 9px; border-radius: 10px;
  background: #182b43; color: #edf4ff; overflow-wrap: anywhere; white-space: pre-wrap;
}
.ip-assistant-message[data-speaker="user"] { margin-left: 22px; background: #16458a; }
.ip-assistant-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 8px; }
.ip-assistant-actions a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 8px; border: 1px solid #385985; border-radius: 7px;
  color: #a9d3ff; background: #132744; font-size: 12px; text-decoration: none;
}
.ip-assistant-form { display: flex; gap: 6px; padding: 7px 10px; border-top: 1px solid #2c4566; }
.ip-assistant-form input {
  min-width: 0; flex: 1; height: 42px; padding: 0 10px;
  border: 1px solid #416084; border-radius: 8px; background: #0b1424; color: #fff;
}
.ip-assistant-form input::placeholder { color: #a7b6cb; }
.ip-assistant-form button { border: 0; border-radius: 8px; padding: 0 10px; color: white; background: #1d5ed4; }
.ip-assistant-form button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 600px) {
  .ip-assistant-form input { font-size: 16px; }
}
