dialog > .dialog-close {
  position: absolute !important;
  z-index: 50;
  top: 12px !important;
  right: 12px !important;
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink), 0 8px 20px rgba(11, 16, 22, .24);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

/* The dialog frame never scrolls. Only its content region does, so the X
   remains anchored to the frame in browsers where sticky dialog children
   otherwise move with the document. */
.sheet-dialog,
.method-dialog,
.login-dialog,
.location-dialog {
  overflow: hidden;
}

.sheet-dialog > #detailContent {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.method-dialog,
.login-dialog,
.location-dialog {
  max-height: calc(100dvh - 32px);
  padding: 0 !important;
}

dialog > .dialog-scroll-region {
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 42px;
}

dialog > .dialog-close:hover {
  background: var(--ink);
  color: var(--yellow);
}

dialog > .dialog-close:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  dialog > .dialog-scroll-region {
    padding: 34px 22px;
  }
}
