.quote-live .quote-comment-anchor {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.quote-live .quote-comment-trigger {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  inline-size: 30px;
  block-size: 30px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--action, #7137e7);
  cursor: pointer;
}

.quote-live .quote-comment-trigger:hover {
  background: var(--action-soft, #f0ebff);
  border-color: var(--border, #d7def0);
}

.quote-live .quote-comment-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.quote-live .quote-comment-trigger:disabled {
  opacity: 0.55;
  cursor: default;
}

.quote-save-confirm.quote-comment-dialog {
  box-sizing: border-box;
  width: min(540px, calc(100% - 28px));
  max-height: 88dvh;
  margin: auto;
  padding: 18px;
  border-radius: 16px;
}

.quote-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.quote-comment-header .icon-button { flex-shrink: 0; }
.quote-comment-header h2 { margin: 0 0 4px; font-size: 18px; }
.quote-comment-header p { margin: 0; color: var(--muted, #59677f); overflow-wrap: anywhere; }

.quote-comment-history {
  max-height: min(40dvh, 330px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 8px 0 14px;
}

.quote-comment-history:focus-visible { outline-offset: -2px; }
.quote-comment-history ol { margin: 0; padding: 0 8px 0 0; list-style: none; }
.quote-comment-history li:last-child { border-bottom: 0; }
.quote-comment-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.quote-comment-meta time { color: var(--muted, #59677f); font-size: 12px; }
.quote-comment-history li p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-comment-empty { margin: 0; color: var(--muted, #59677f); }
.quote-comment-form { display: grid; gap: 6px; }
.quote-comment-form label { font-size: 13px; font-weight: 650; }

.quote-comment-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border, #d7def0);
  background: var(--surface, #fff);
  color: var(--text, #17223a);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.quote-comment-form textarea:focus-visible {
  outline: 2px solid var(--action, #7137e7);
  outline-offset: -1px;
}

.quote-comment-form footer { margin-top: 2px; align-items: center; }
.quote-comment-form footer span { margin-right: auto; font-size: 13px; }
.quote-comment-error p { color: var(--danger, #c42a4a); overflow-wrap: anywhere; }

@media (pointer: coarse) {
  .quote-live .quote-comment-trigger { flex-basis: 44px; inline-size: 44px; block-size: 44px; }
}
