html:has(#hy-cite-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
#hongyi-research-subtle .hy-cite-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--hy-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
#hongyi-research-subtle .hy-paper-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
#hongyi-research-subtle .hy-cite-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 30px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid light-dark(rgb(0 0 0 / .1), rgb(255 255 255 / .12));
  border-radius: 16px;
  background: light-dark(#fafbf9, #1b1f22);
  color: var(--hy-ink);
  box-shadow: 0 24px 100px rgb(0 0 0 / .25);
  font: inherit;
}
#hongyi-research-subtle .hy-cite-dialog::backdrop {
  background: rgb(8 12 16 / .48);
  backdrop-filter: blur(7px);
}
#hongyi-research-subtle .hy-cite-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
#hongyi-research-subtle .hy-cite-eyebrow { margin: 0 0 5px; color: var(--hy-secondary); font-size: 12px; }
#hongyi-research-subtle #hy-cite-heading { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.035em; }
#hongyi-research-subtle .hy-cite-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hy-secondary);
  cursor: pointer;
}
#hongyi-research-subtle .hy-cite-title { margin: 16px 0 24px; font-size: 15px; line-height: 1.6; color: var(--hy-secondary); }
#hongyi-research-subtle .hy-cite-code-label { padding: 12px 16px; border: 1px solid var(--hy-line); border-bottom: 0; border-radius: 8px 8px 0 0; font-size: 11px; color: var(--hy-secondary); }
#hongyi-research-subtle .hy-cite-code {
  margin: 0;
  padding: 16px;
  max-height: 42dvh;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--hy-line);
  border-radius: 0 0 8px 8px;
  background: light-dark(rgb(0 0 0 / .025), rgb(0 0 0 / .16));
  color: var(--hy-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
#hongyi-research-subtle .hy-cite-code code { font: 12px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }
#hongyi-research-subtle .hy-cite-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
#hongyi-research-subtle .hy-cite-source { color: var(--hy-secondary); font-size: 12px; padding-block: 8px; }
#hongyi-research-subtle .hy-cite-copy {
  border: 1px solid var(--hy-selectable-edge);
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--hy-selectable-fill);
  color: var(--hy-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 116px;
}
#hongyi-research-subtle .hy-cite-copy:disabled { cursor: progress; }
#hongyi-research-subtle .hy-cite-status { margin: 0; font-size: 12px; color: var(--hy-secondary); }
#hongyi-research-subtle .hy-cite-status:not(:empty) { margin-top: 12px; }
@media (max-width: 620px) {
  #hongyi-research-subtle .hy-cite-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 22px 18px; border-radius: 12px; }
  #hongyi-research-subtle .hy-cite-code { padding: 12px; }
  #hongyi-research-subtle .hy-cite-code code { font-size: 11px; }
  #hongyi-research-subtle .hy-paper-actions { grid-column: 2; grid-row: 2; flex-direction: column; align-items: flex-end; gap: 2px; }
}
@media (pointer: coarse) {
  #hongyi-research-subtle .hy-cite-trigger,
  #hongyi-research-subtle .hy-cite-close,
  #hongyi-research-subtle .hy-cite-copy { min-height: 44px; }
  #hongyi-research-subtle .hy-cite-close { min-width: 44px; }
}
