.pl-kiki {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  margin-top: 18px;
  padding: 16px;
}

.pl-kiki__top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.pl-kiki__eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 4px;
}

.pl-kiki h2 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  margin: 0;
}

.pl-kiki__hint,
.pl-kiki__status {
  color: #64748b;
  font-size: 13px;
  margin: 4px 0 0;
}

.pl-kiki__toggle,
.pl-kiki__menu button {
  background: #f1f5f9;
  border: 0;
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  font-weight: 900;
  padding: 9px 12px;
}

.pl-kiki__toggle[aria-expanded="true"],
.pl-kiki__menu button:hover {
  background: #e0f2fe;
  color: #075985;
}

.pl-kiki__menu button:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.pl-kiki[data-kiki-busy="true"] .pl-kiki__menu button {
  cursor: progress;
}

.pl-kiki__menu button:focus-visible,
.pl-kiki__toggle:focus-visible,
.pl-kiki__prompt button:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: 2px;
}

.pl-kiki__status {
  margin-bottom: 10px;
}

.pl-kiki__summary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  color: #1e3a8a;
  margin-bottom: 12px;
  padding: 12px;
}

.pl-kiki__summary p {
  margin: 4px 0 0;
}

.pl-kiki__section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 12px;
}

.pl-kiki__section--suggestion {
  border-color: #bbf7d0;
}

.pl-kiki__prompt-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pl-kiki__prompt button {
  background: #0f172a;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.pl-kiki__body {
  border-top: 1px solid #e2e8f0;
  margin-top: 14px;
  padding-top: 14px;
}

.pl-kiki__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pl-kiki__result {
  background: #f8fafc;
  border-radius: 16px;
  color: #334155;
  line-height: 1.65;
  max-height: min(56vh, 520px);
  min-height: 72px;
  overflow-y: auto;
  padding: 14px;
}

.pl-kiki__result p {
  margin: 0 0 10px;
}

.pl-kiki__result p:last-child {
  margin-bottom: 0;
}

.pl-kiki__result strong {
  color: #0f172a;
}

.pl-kiki__result pre {
  background: #0f172a;
  border-radius: 12px;
  color: #e2e8f0;
  overflow-x: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.pl-kiki__notice {
  color: #64748b;
}

@media (max-width: 640px) {
  .pl-kiki__top {
    align-items: stretch;
    flex-direction: column;
  }

  .pl-kiki {
    border-radius: 18px;
    padding: 14px;
  }

  .pl-kiki__toggle,
  .pl-kiki__menu button {
    justify-content: center;
    width: 100%;
  }

  .pl-kiki__menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pl-kiki__result {
    max-height: 60vh;
  }

  .pl-kiki__prompt-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .pl-kiki__menu {
    grid-template-columns: 1fr;
  }
}
