#aitrom-chat-root {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  left: auto;
  bottom: clamp(1rem, 2vh, 1.5rem);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: "Switzer", "Segoe UI", sans-serif;
}

.aitrom-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.56rem 0.9rem;
  border: 2px solid #f39315;
  border-radius: 8px;
  background: #141414;
  color: #f4f4f4;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.aitrom-chat-btn-icon {
  flex: none;
  color: #f39315;
  transition: color 0.16s ease;
}

.aitrom-chat-btn:hover {
  background: #f39315;
  color: #141414;
}

.aitrom-chat-btn:hover .aitrom-chat-btn-icon {
  color: #141414;
}

.aitrom-chat-btn:active {
  transform: translateY(1px);
}

.aitrom-chat-btn:focus-visible {
  outline: 3px solid #f39315;
  outline-offset: 3px;
}

.aitrom-chat-panel {
  display: none;
  width: min(370px, calc(100vw - 2rem));
  height: min(440px, calc(100svh - 6.5rem));
  margin-bottom: 0.6rem;
  border: 2px solid #292929;
  border-radius: 14px;
  background: #f4f4f4;
  color: #232323;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38); /* taste-skill-ignore */
}

.aitrom-chat-panel.open {
  display: flex;
}

.aitrom-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: #141414;
  color: #f4f4f4;
  font-size: 0.95rem;
  font-weight: 600;
}

.aitrom-chat-head-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.aitrom-chat-head-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f39315;
}

.aitrom-chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #292929;
  color: #f4f4f4;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.aitrom-chat-close:hover {
  background: #f39315;
  color: #141414;
}

.aitrom-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  background: #f4f4f4;
}

.aitrom-chat-msg {
  margin: 0 0 0.55rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  max-width: 88%;
  line-height: 1.42;
  font-size: 0.95rem;
}

.aitrom-chat-msg.bot {
  background: #ffffff;
  color: #232323;
}

.aitrom-chat-msg.user {
  margin-left: auto;
  background: #f39315;
  color: #141414;
  font-weight: 500;
}

.aitrom-chat-note {
  margin: 0;
  padding: 0.35rem 0.9rem 0.45rem;
  background: #e8e8e8;
  color: #555555;
  font-size: 0.82rem;
  line-height: 1.35;
}

.aitrom-chat-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.6rem;
  background: #e8e8e8;
}

.aitrom-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #232323;
  font: inherit;
  font-size: 0.95rem;
}

.aitrom-chat-form button {
  flex: none;
  padding: 0.6rem 0.95rem;
  border: 0;
  border-radius: 8px;
  background: #141414;
  color: #f4f4f4;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.aitrom-chat-form button:hover {
  background: #f39315;
  color: #141414;
}

@media (max-width: 540px) {
  #aitrom-chat-root {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .aitrom-chat-btn {
    padding: 0.55rem 0.85rem;
  }
}
