/* Shared close control: X is always visible; only hover/press adds a soft tile. */
dialog button[aria-label^="关闭"] {
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #7b8fae;
  box-shadow: none !important;
  transition: background-color .15s, color .15s;
}

dialog button[aria-label^="关闭"]:not(#cw-close) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

dialog button[aria-label^="关闭"]:hover:not(:disabled) {
  background: #f1f4fa !important;
  color: #405b7c;
}

dialog button[aria-label^="关闭"]:active:not(:disabled) {
  background: #e8eef8 !important;
}

dialog button[aria-label^="关闭"]:focus:not(:focus-visible) {
  outline: none;
}

dialog button[aria-label^="关闭"]:focus-visible {
  outline: 2px solid #6075e9 !important;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  dialog button[aria-label^="关闭"] { transition: none; }
}
