/* One close control for dialog headers; footer cancel actions keep their labels. */
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label] {
  box-sizing: border-box;
  position: relative;
  inset: auto;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  align-self: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  aspect-ratio: 1;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-2) 68%, transparent);
  color: var(--muted);
  font-size: 0;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label]::before,
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 0;
  border-top: 1.5px solid currentColor;
  border-radius: 2px;
  background: transparent;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label]::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label]:is(:hover, :focus-visible) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
  .information-dialog-close, .information-popover-close, .account-settings-close,
  .profile-preview-close, .live-preview-close, .report-source-close)[aria-label]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Long titles shrink before the close control, including narrow management dialogs. */
body :is(.profile-preview-toolbar, .account-settings-heading, .information-dialog-heading,
  .information-popover-heading, .card-team-toolbar, .live-preview-heading,
  .match-dialog-toolbar, .plan-dialog-toolbar, .gs-header, .br-dialog-head,
  .audience-rating-head) > :not(button):not(a) {
  min-width: 0;
}
@media (prefers-reduced-motion: reduce) {
  body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
    .information-dialog-close, .information-popover-close, .account-settings-close,
    .profile-preview-close, .live-preview-close, .report-source-close)[aria-label] { transition: none; }
}
@media (forced-colors: active) {
  body :is(dialog header > button[aria-label^="关闭"], .audience-rating-close,
    .information-dialog-close, .information-popover-close, .account-settings-close,
    .profile-preview-close, .live-preview-close, .report-source-close)[aria-label] { border-color: ButtonText; }
}
