.jx-ask-fab {
  position: fixed;
  right: 1.15rem;
  bottom: 1.35rem;
  z-index: 90;
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #f4f7f5;
  background: var(--jade, #2f5d4e);
  box-shadow: 0 8px 24px rgba(26, 33, 30, 0.22);
  font-family: var(--font-sans, sans-serif);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, background 0.2s ease;
}

.jx-ask-fab:hover {
  transform: translateY(-2px);
  background: var(--jade-deep, #1e3d34);
}

.jx-ask-panel {
  position: fixed;
  right: 1.1rem;
  bottom: 5.1rem;
  z-index: 91;
  width: min(24rem, calc(100vw - 1.6rem));
  max-height: min(70vh, 32rem);
  display: flex;
  flex-direction: column;
  background: rgba(247, 249, 248, 0.97);
  border: 1px solid var(--line, rgba(26, 33, 30, 0.12));
  box-shadow: 0 16px 40px rgba(26, 33, 30, 0.16);
  backdrop-filter: blur(10px);
}

.jx-ask-panel[hidden] {
  display: none !important;
}

.jx-ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line, rgba(26, 33, 30, 0.12));
}

.jx-ask-head strong {
  font-family: var(--font-serif, serif);
  font-weight: 500;
  font-size: 1.05rem;
}

.jx-ask-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-soft, #3a4540);
}

.jx-ask-body {
  padding: 0.85rem 1rem 1rem;
  overflow: auto;
  display: grid;
  gap: 0.75rem;
}

.jx-ask-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft, #3a4540);
  font-family: var(--font-sans, sans-serif);
  line-height: 1.55;
}

.jx-ask-input {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line, rgba(26, 33, 30, 0.12));
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  color: var(--ink, #1a211e);
}

.jx-ask-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.jx-ask-actions button {
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--jade, #2f5d4e);
  background: var(--jade, #2f5d4e);
  color: #f4f7f5;
  cursor: pointer;
}

.jx-ask-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.jx-ask-result {
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.jx-ask-sources {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.84rem;
}

.jx-ask-sources li {
  margin: 0.35rem 0;
}

.jx-ask-sources a {
  color: var(--jade-deep, #1e3d34);
}

.jx-ask-error {
  color: #8a2f2f;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.88rem;
  margin: 0;
}

.jx-ask-foot {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-soft, #3a4540);
  font-family: var(--font-sans, sans-serif);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .jx-ask-fab {
    right: 0.9rem;
    bottom: 1rem;
  }
  .jx-ask-panel {
    right: 0.75rem;
    bottom: 4.6rem;
  }
}
