#mmAPISettingsButton { flex-shrink: 0; white-space: nowrap; }
.mm-api-dialog {
  width: min(560px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid var(--mm-line);
  border-radius: 14px;
  color: var(--mm-text);
  background: var(--mm-surface);
  box-shadow: 0 20px 60px rgba(31, 42, 61, .24);
  overflow: auto;
}
.mm-api-dialog::backdrop { background: rgba(31, 42, 61, .35); }
.mm-api-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--mm-line); }
.mm-api-heading h2 { margin: 0; font-size: 17px; }
.mm-api-body { padding: 18px 22px 8px; }
.mm-api-notice { margin-bottom: 18px; padding: 11px 13px; background: #fff8e9; border: 1px solid #f1dfb5; border-radius: 8px; color: #775312; font-size: 13px; }
.mm-api-notice p { margin: 5px 0 0; }
.mm-api-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.mm-api-field label { font-size: 13px; font-weight: 600; }
.mm-api-field input, .mm-api-field select { min-width: 0; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--mm-line); border-radius: 8px; color: inherit; background: #fbfcfe; font: inherit; font-size: 13px; }
.mm-api-field input::placeholder { color: #7b8799; }
.mm-api-field small, .mm-api-protocol { color: var(--mm-sub); font-size: 12px; line-height: 1.6; }
.mm-api-secret { display: flex; align-items: center; gap: 8px; }
.mm-api-secret input { flex: 1; }
.mm-api-secret button { flex-shrink: 0; min-height: 36px; }
.mm-api-protocol { margin: 2px 0 8px; }
.mm-api-footer { padding: 12px 22px 18px; border-top: 1px solid var(--mm-line); }
.mm-api-footer p { margin: 0 0 10px; color: var(--mm-sub); font-size: 12px; }
.mm-api-clear { align-self: flex-start; }
.mm-api-result { overflow-wrap: anywhere; }
.mm-api-result:empty { display: none; }
.mm-ai-node-enter { animation:mm-ai-appear .3s ease-out both; }
@keyframes mm-ai-appear { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .mm-ai-node-enter { animation:none; } }
.mm-api-result[data-kind="success"] { color: #167347; }
.mm-api-result[data-kind="error"] { color: #b42318; }
.mm-ai-attachment { display:block; color:#63718a; font-size:12px; overflow-wrap:anywhere; }
.mm-api-actions { display: flex; align-items: center; gap: 8px; }
.mm-api-action-gap { flex: 1; }
.mm-api-dialog :is(input, select, button):focus-visible { outline: 2px solid var(--mm-ink); outline-offset: 2px; }
@media (max-width: 480px) {
  .mm-api-heading { padding: 14px 16px; }
  .mm-api-body { padding: 14px 16px 6px; }
  .mm-api-footer { padding: 12px 16px 14px; }
}

.mm-ai-result-state { display:block; margin-top:10px; line-height:1.6; }
