body.patch-notes-open { overflow: hidden; }
#patch-notes-open[hidden] { display: none; }
.patch-notes-notice { display: flex; align-items: center; gap: 12px 20px; margin: 0 0 16px; padding: 14px 18px; color: var(--text, #f5f6f8); background: #282d35; border: 1px solid #59606d; border-radius: 12px; }
.patch-notes-notice p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.patch-notes-notice-label { display: block; color: var(--gold, #ffda62); font-size: 12px; font-weight: 700; }
.patch-notes-notice-actions { display: flex; flex-shrink: 0; gap: 8px; }
.patch-notes-notice button { min-height: 44px; white-space: nowrap; }
.patch-notes-dialog {
  box-sizing: border-box;
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: min(840px, calc(100vh - 48px));
  max-height: min(840px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  color: var(--text, #f5f6f8);
  background: #252931;
  border: 1px solid #59606d;
  border-radius: 18px;
  box-shadow: 0 28px 90px #0009;
  overflow: hidden;
}
.patch-notes-dialog[open] { display: flex; flex-direction: column; }
.patch-notes-dialog::backdrop { background: #060a12bc; backdrop-filter: blur(5px); }
.patch-notes-header { display: flex; align-items: center; gap: 12px; padding: 22px 24px 18px; border-bottom: 1px solid #ffffff19; flex-shrink: 0; }
.patch-notes-logo { width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0; }
.patch-notes-heading { flex: 1; min-width: 0; }
.patch-notes-date { display: block; color: var(--gold, #ffda62); font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 3px; }
.patch-notes-dialog h2 { margin: 0; color: var(--text, #f5f6f8); font-size: 22px; line-height: 1.35; }
.patch-notes-dialog h2:focus { outline: none; }
.patch-notes-dialog .patch-notes-close { align-self: flex-start; min-width: 44px; min-height: 44px; padding: 8px; border-color: transparent; background: transparent; font-size: 22px; line-height: 1; }
.patch-notes-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 24px; scrollbar-gutter: stable; }
.patch-notes-content:focus-visible { outline-offset: -3px; }
.patch-notes-intro { margin: 0 0 16px; color: var(--sub, #c2c9d3); font-size: 14px; }
.patch-notes-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.patch-notes-picker[hidden] { display: none; }
.patch-notes-picker select { min-width: 0; max-width: 100%; flex: 1; }
.patch-note-section + .patch-note-section { border-top: 1px solid #ffffff12; margin-top: 20px; padding-top: 20px; }
.patch-note-section h3 { display: flex; align-items: baseline; gap: 9px; margin: 0 0 10px; color: #f3f5f8; font-size: 16px; line-height: 1.5; }
.patch-note-tag { flex-shrink: 0; padding: 2px 7px; border-radius: 5px; font-size: 11px; color: #ffe59a; background: #ffda621a; font-family: var(--font-body); }
.patch-note-section ul { padding-left: 19px; margin: 0; color: #dce1e9; font-size: 14px; line-height: 1.75; }
.patch-note-section li + li { margin-top: 7px; }
.patch-note-section li::marker { color: #8d98aa; }
.patch-notes-footnote { border-radius: 8px; margin: 20px 0 0; padding: 12px 14px; background: #ffffff07; color: var(--sub, #c2c9d3); font-size: 12px; line-height: 1.7; }
.patch-notes-footer { flex-shrink: 0; border-top: 1px solid #ffffff19; padding: 16px 24px 20px; background: #20242b; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 18px; align-items: center; }
.patch-notes-preference { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 28px; color: #f0f2f6; }
.patch-notes-preference input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.patch-notes-hint { margin: 0; color: var(--sub, #c2c9d3); font-size: 11px; line-height: 1.55; }
.patch-notes-confirm { grid-column: 2; grid-row: 1 / span 2; min-width: 90px; }
.patch-notes-status { grid-column: 1 / -1; margin: 4px 0 0; color: #ffb3be; font-size: 12px; line-height: 1.6; }
.patch-notes-status:empty { display: none; }
@media (max-width: 540px) {
  .patch-notes-notice { align-items: stretch; flex-direction: column; padding: 12px 14px; gap: 8px; }
  .patch-notes-notice-actions { justify-content: flex-end; }
  .patch-notes-dialog { width: calc(100% - 20px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .patch-notes-header { padding: 15px 14px 13px; gap: 9px; }
  .patch-notes-logo { width: 38px; height: 38px; border-radius: 10px; }
  .patch-notes-dialog h2 { font-size: 19px; }
  .patch-notes-date { font-size: 11px; }
  .patch-notes-content { padding: 16px; }
  .patch-note-section h3 { align-items: flex-start; font-size: 15px; gap: 7px; }
  .patch-note-tag { margin-top: 2px; }
  .patch-notes-footer { grid-template-columns: minmax(0,1fr); padding: 12px 16px max(14px, env(safe-area-inset-bottom)); gap: 5px; }
  .patch-notes-confirm { grid-column: 1; grid-row: auto; width: 100%; margin-top: 7px; }
}
@media (max-height: 440px) {
  .patch-notes-dialog { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); }
  .patch-notes-header { padding-top: 8px; padding-bottom: 8px; }
  .patch-notes-footer { padding-top: 8px; padding-bottom: 8px; }
}
