.ai-use-popover {
  position: fixed;
  z-index: 90;
  width: min(270px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(5, 12, 24, 0.28);
}

.ai-use-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 2px;
  color: var(--ink);
  font-size: 15px;
}

.ai-use-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.ai-use-close:hover,
.ai-use-close:focus-visible {
  background: var(--soft);
  outline: none;
}

.ai-destination-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.ai-destination {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.ai-destination:hover,
.ai-destination:focus-visible {
  background: var(--soft);
  outline: none;
}

.ai-destination-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
}

.ai-destination > span:last-child {
  display: grid;
  gap: 2px;
}

.ai-destination strong {
  font-size: 14px;
}

.ai-destination small {
  color: var(--muted);
  font-size: 11px;
}

.ai-destination-chatgpt {
  background: #0f8f73;
}

.ai-destination-gemini {
  background: #5b76df;
}

.ai-destination-claude {
  background: #bd6547;
}

.ai-destination-genspark {
  background: #6d4fd3;
}

.toast.pointer-toast {
  right: auto;
  bottom: auto;
  max-width: calc(100vw - 24px);
  transform: translate(-50%, -115%);
}

.toast.pointer-toast.show {
  transform: translate(-50%, -125%);
}

.inline-results > .help-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.inline-results > .help-notes .help-note {
  min-height: 34px;
  padding: 3px 0;
  border: 0;
  border-radius: 4px;
  white-space: normal;
}

.inline-results > .help-notes .help-note::before {
  display: none;
}

.inline-results > .help-notes .help-note strong {
  font-size: 13px;
  font-weight: 850;
}

.inline-results > .help-notes .help-note span {
  font-size: 12px;
}

.inline-results > .help-notes .help-note-wrong {
  background: transparent;
}

.inline-results > .help-notes .help-note-wrong::before {
  background: #ffac2f;
  box-shadow: 0 0 0 4px rgba(255, 172, 47, 0.15);
}

.inline-results > .help-notes .help-note-wrong strong {
  color: #b66a00;
}

.inline-results > .help-notes .help-note-missed {
  background: transparent;
}

.inline-results > .help-notes .help-note-missed::before {
  background: #ff5a5f;
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.15);
}

.inline-results > .help-notes .help-note-missed strong {
  color: #d92d35;
}

[data-theme="dark"] .inline-results > .help-notes .help-note-wrong {
  background: transparent;
}

[data-theme="dark"] .inline-results > .help-notes .help-note-wrong strong {
  color: #ffc66d;
}

[data-theme="dark"] .inline-results > .help-notes .help-note-missed {
  background: transparent;
}

[data-theme="dark"] .inline-results > .help-notes .help-note-missed strong {
  color: #ff8a8f;
}

@media (max-width: 760px) {
  .inline-results > .help-notes {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .inline-results > .help-notes .help-note {
    min-height: 30px;
    padding: 3px 0;
  }

  .inline-results > .help-notes .help-note span {
    display: inline;
  }
}

.local-processing-notice {
  flex: 0 0 auto;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #bddccf;
  border-radius: 8px;
  background: #edf8f2;
  color: #205b43;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .local-processing-notice {
  background: #142a25;
  color: #b4e6cf;
  border-color: #30554a;
}
.ai-move-hint { margin: 6px 2px 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-panel { position: relative; }
#manualResultButton { z-index: 30; }
.restore-summary { max-height: min(260px, 35vh); overflow: auto; }
.restore-summary .summary-item { cursor: pointer; }
#restoreEntityList { display: flex; flex-wrap: wrap; gap: 7px; max-height: 120px; overflow: auto; }
#restoreEntityList .entity-chip { display: inline-flex; flex-wrap: wrap; gap: 8px; cursor: default; max-width: 100%; overflow-wrap: anywhere; }
#restoreEntityList .entity-chip > span { color: var(--muted); }
