/* A quiet paper-coloured control, with a full 44px touch target. */
.scroll-dialog .dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #796880;
  box-shadow: none;
  isolation: isolate;
  transition: color .18s ease;
}
.scroll-dialog .dialog-close::before {
  content: '';
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid #c9bbc93d;
  border-radius: 8px;
  background: #fffcf7f2;
  box-shadow: 0 1px 4px #57425e08;
  transition: background .18s ease, border-color .18s ease;
}
.scroll-dialog .dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  pointer-events: none;
}
@media (hover: hover) {
  .scroll-dialog .dialog-close:hover { color: #5f486e; }
  .scroll-dialog .dialog-close:hover::before {
    background: #f1ebf3;
    border-color: #c9bbc980;
  }
}
.scroll-dialog .dialog-close:active::before { background: #e9e0ee; }
.scroll-dialog .dialog-close:focus-visible {
  outline: 2px solid #80678e;
  outline-offset: 1px;
}
/* The static heading receives initial dialog focus, not the close control.
   Keyboard users retain a visible focus indicator when they Tab to the button. */
.scroll-dialog #letter-title:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .scroll-dialog .dialog-close,
  .scroll-dialog .dialog-close::before { transition: none; }
}
