.pwa-connectivity {
  position: fixed;
  z-index: 5000;
  top: 50%;
  left: 50%;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(15, 18, 22, .14);
  border-radius: 18px;
  background: rgba(250, 250, 250, .84);
  color: #111318;
  box-shadow: 0 18px 55px rgba(15, 18, 22, .2);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: pwa-connectivity-in .24s cubic-bezier(.2, .8, .2, 1) both;
}

.pwa-connectivity-details {
  box-sizing: border-box;
  grid-column: 1 / -1; justify-self: stretch; width: 100%; pointer-events: auto;
  min-height: 40px; padding: 6px 11px; border: 1px solid currentColor;
  border-radius: 9px; background: transparent; color: inherit; font: inherit;
  font-size: 12px; font-weight: 650; cursor: pointer;
}
.pwa-connectivity-details[hidden] { display: none; }
.pwa-connectivity-details:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (min-width: 860px) {
  body.dashboard-body.chat-docked .app-sidebar .pwa-connectivity.is-sidebar-notice .pwa-connectivity-details {
    position: absolute; inset: 0; width: 100%; min-height: 38px; padding: 0;
    grid-column: auto; border: 0; font-size: 0; border-radius: inherit;
  }
}

.push-permission-card {
  box-sizing: border-box;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10050;
  display: block;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 14px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--border-strong, #d9dde5) 84%, transparent);
  border-radius: 16px;
  color: var(--text, #171b24);
  background: rgba(252, 252, 253, .96);
  box-shadow: 0 8px 28px rgba(7, 13, 25, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.push-permission-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.push-permission-card.is-leaving {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}

.push-permission-header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.push-permission-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #a86a09;
  background: transparent;
}

.push-permission-bell {
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url('/icons/bell-ring.svg') center / contain no-repeat;
  mask: url('/icons/bell-ring.svg') center / contain no-repeat;
}

.push-permission-copy {
  min-width: 0;
}

.push-permission-card h2 {
  margin: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.push-permission-card p {
  margin: 6px 0 0;
  color: var(--text-muted, #687080);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.push-permission-card .push-permission-error {
  color: #8c5813;
}

.push-permission-card [hidden] { display: none; }

.push-permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.push-permission-actions button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.push-permission-actions button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.push-permission-actions button:disabled {
  cursor: wait;
  opacity: .68;
}

.push-permission-primary {
  color: #fff;
  background: #25282e;
  box-shadow: none;
}

.push-permission-secondary {
  color: #626872;
  background: transparent;
}

.push-permission-actions .push-permission-primary:focus-visible {
  outline-color: #a86a09;
}

@media (hover: hover) {
  .push-permission-primary:hover:not(:disabled) { filter: brightness(1.12); }
  .push-permission-secondary:hover:not(:disabled) {
    background: rgba(128, 128, 128, .1);
    color: inherit;
  }
}

html[data-theme="dark"] .push-permission-card {
  border-color: rgba(255, 255, 255, .11);
  color: #f4f6fa;
  background: rgba(25, 27, 31, .96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .push-permission-card p {
  color: #adb2bc;
}

html[data-theme="dark"] .push-permission-card .push-permission-error {
  color: #e6bf84;
}

html[data-theme="dark"] .push-permission-mark {
  color: #fbbf24;
  background: transparent;
}

html[data-theme="dark"] .push-permission-primary {
  color: #e4e7eb;
  background: #34373d;
  border-color: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .push-permission-secondary {
  color: #adb2bc;
  background: transparent;
}

html[data-theme="dark"] .push-permission-actions .push-permission-primary:focus-visible {
  outline-color: #fbbf24;
}

@media (min-width: 860px) {
  .push-permission-card {
    top: max(12px, env(safe-area-inset-top));
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -10px) scale(.98);
  }

  .push-permission-card.is-visible {
    transform: translate(-50%, 0) scale(1);
  }

  .push-permission-card.is-leaving {
    transform: translate(-50%, -6px) scale(.985);
  }
}

@media (max-width: 859px) {
  .push-permission-card {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 12px;
    border-radius: 14px;
  }

  .push-permission-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  .push-permission-actions:has(> button[hidden]) {
    grid-template-columns: 1fr;
  }

  .push-permission-actions button {
    min-width: 0;
    min-height: 40px;
    padding-inline: 8px;
  }

  .push-permission-card p {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .push-permission-card {
    transition: none;
  }
}

.pwa-connectivity.is-leaving {
  animation: pwa-connectivity-out .2s ease both;
}

/* Keep connectivity feedback in the navigation status area so it never
   covers the workspace. The fixed rule above remains as a safe fallback on
   pages that do not render the application sidebar. */
.app-sidebar .sidebar-footer-note .pwa-connectivity.is-sidebar-notice {
  position: relative;
  z-index: 2;
  inset: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  min-height: 36px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 18, 22, .1);
  transform: none;
  animation: pwa-connectivity-sidebar-in .2s cubic-bezier(.2, .8, .2, 1) both;
}

.app-sidebar .sidebar-footer-note .pwa-connectivity.is-sidebar-notice.is-leaving {
  animation: pwa-connectivity-sidebar-out .18s ease both;
}

.app-sidebar .sidebar-footer-note:has(.pwa-connectivity)::before {
  opacity: 0;
}

.app-sidebar .sidebar-footer-note:has(.pwa-connectivity) {
  padding-top: 6px;
  padding-bottom: 6px;
}

.app-sidebar .sidebar-footer-note:has(.pwa-connectivity) .sidebar-footer-note-copy {
  display: none;
}

.app-sidebar .sidebar-footer-note .pwa-connectivity-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.app-sidebar .sidebar-footer-note .pwa-connectivity-icon img {
  width: 14px;
  height: 14px;
}

.app-sidebar .sidebar-footer-note .pwa-connectivity-copy strong {
  font-size: 10.5px;
  line-height: 1.15;
}

.app-sidebar .sidebar-footer-note .pwa-connectivity-copy span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 860px) {
  body.dashboard-body.chat-docked .app-sidebar .sidebar-footer-note:has(.pwa-connectivity) {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.dashboard-body.chat-docked .app-sidebar .sidebar-footer-note-copy {
    display: none;
  }

  body.dashboard-body.chat-docked .app-sidebar .sidebar-footer-note .pwa-connectivity.is-sidebar-notice {
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 18, 22, .12);
  }

  body.dashboard-body.chat-docked .app-sidebar .sidebar-footer-note .pwa-connectivity-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  body.dashboard-body.chat-docked .app-sidebar .sidebar-footer-note .pwa-connectivity-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.pwa-connectivity-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111318;
  color: #fff;
}

.pwa-connectivity-icon img {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}

.pwa-connectivity-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pwa-connectivity-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

.pwa-connectivity-copy span {
  color: #68707c;
  font-size: 12px;
  line-height: 1.35;
}

.pwa-connectivity.is-online .pwa-connectivity-icon {
  background: #f5f5f5;
  color: #111318;
  box-shadow: inset 0 0 0 1px rgba(15, 18, 22, .12);
}

.pwa-connectivity.is-online .pwa-connectivity-icon img {
  filter: none;
}

.pwa-connectivity.is-offline .pwa-connectivity-icon {
  background: #dc2626;
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    0 4px 12px rgba(220, 38, 38, .3);
}

.pwa-connectivity.is-offline .pwa-connectivity-icon img,
html[data-theme="dark"] .pwa-connectivity.is-offline .pwa-connectivity-icon img {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .pwa-connectivity {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(27, 28, 31, .86);
  color: #f5f5f5;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .pwa-connectivity-copy span {
  color: #a8adb5;
}

html[data-theme="dark"] .pwa-connectivity-icon {
  background: #f5f5f5;
}

html[data-theme="dark"] .pwa-connectivity-icon img {
  filter: none;
}

html[data-theme="dark"] .pwa-connectivity.is-online .pwa-connectivity-icon {
  background: #232529;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .pwa-connectivity.is-online .pwa-connectivity-icon img {
  filter: brightness(0) invert(1);
}

@keyframes pwa-connectivity-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes pwa-connectivity-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, calc(-50% - 8px)) scale(.98); }
}

@keyframes pwa-connectivity-sidebar-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwa-connectivity-sidebar-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-4px) scale(.98); }
}

@keyframes pwa-connectivity-mobile-in {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwa-connectivity-mobile-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-4px) scale(.98); }
}

@media (max-width: 859px) {
  body.dashboard-body > .pwa-connectivity {
    top: auto;
    right: auto;
    bottom: calc(var(--nav-height, 68px) + env(safe-area-inset-bottom, 0px) + 10px);
    left: max(10px, env(safe-area-inset-left, 0px));
    width: auto;
    max-width: calc(100vw - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    grid-template-columns: 28px minmax(0, auto);
    gap: 7px;
    min-height: 38px;
    padding: 5px 9px 5px 5px;
    border-radius: 12px;
    transform: none;
    animation: pwa-connectivity-mobile-in .2s cubic-bezier(.2, .8, .2, 1) both;
  }

  body.dashboard-body > .pwa-connectivity.is-leaving {
    animation: pwa-connectivity-mobile-out .18s ease both;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-icon img {
    width: 15px;
    height: 15px;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-copy {
    gap: 0;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-copy strong {
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-copy span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .pwa-connectivity {
    top: 46%;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .app-sidebar .sidebar-footer-note .pwa-connectivity.is-sidebar-notice {
    gap: 8px;
    margin-bottom: 0;
    padding: 8px;
    border-radius: 12px;
  }
}

@media (max-width: 380px) {
  body.dashboard-body > .pwa-connectivity {
    grid-template-columns: 28px;
    padding: 5px;
  }

  body.dashboard-body > .pwa-connectivity .pwa-connectivity-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.dashboard-body > .pwa-connectivity.is-offline {
    grid-template-columns: 28px minmax(0, 1fr);
    min-width: 170px;
  }

  body.dashboard-body > .pwa-connectivity.is-offline .pwa-connectivity-copy {
    position: static; width: auto; height: auto; margin: 0;
    overflow: visible; clip-path: none; white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-connectivity,
  .pwa-connectivity.is-leaving {
    animation-duration: .01ms;
  }
}

body.pwa-update-dialog-open {
  overflow: hidden;
}

/* A frameless, monochrome update prompt. The backdrop, not the card,
   provides contrast, including on browsers without backdrop-filter. */
.pwa-update-dialog {
  --update-logo-size: 72px;
  --update-ink: #202328;
  --update-muted: #5b6069;
  --update-line: rgba(32, 35, 40, .14);
  width: min(480px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--update-ink);
  background: transparent;
  box-shadow: none;
}

.pwa-update-dialog:not([open]) { display: none; }

.pwa-update-dialog::backdrop {
  background: rgba(245, 246, 248, .9);
  backdrop-filter: blur(16px) saturate(.25);
  -webkit-backdrop-filter: blur(16px) saturate(.25);
  animation: pwa-update-backdrop-in .18s ease both;
}

.pwa-update-card {
  position: relative;
  box-sizing: border-box;
  max-height: inherit;
  min-width: 0;
  padding: 24px 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: pwa-update-card-in .22s ease-out both;
}

.pwa-update-offer { display: grid; gap: 24px; min-width: 0; }

.pwa-update-offer[hidden],
.pwa-update-thanks[hidden],
.pwa-update-notes[hidden],
.pwa-update-error[hidden] { display: none !important; }

.pwa-update-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.pwa-update-mark {
  display: grid;
  place-items: center;
  width: var(--update-logo-size);
  height: var(--update-logo-size);
  margin-bottom: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pwa-update-mark img,
.pwa-update-orbit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .9;
  filter: grayscale(1) brightness(0);
}

.pwa-update-eyebrow,
.pwa-update-thanks > span {
  color: var(--update-muted);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pwa-update-hero h2,
.pwa-update-thanks h2 {
  margin: 0;
  max-width: 100%;
  color: var(--update-ink);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: none;
}

.pwa-update-hero p,
.pwa-update-thanks p {
  max-width: 34ch;
  margin: 0;
  color: var(--update-muted);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.pwa-update-notes {
  display: grid;
  gap: 0;
  max-height: min(280px, 32vh);
  max-height: min(280px, 32dvh);
  margin: 0;
  padding: 0 4px;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
}

.pwa-update-notes li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--update-line);
  background: transparent;
}

.pwa-update-notes li > span {
  color: var(--update-muted);
  font-size: .75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.pwa-update-notes li > div { display: grid; gap: 4px; min-width: 0; }
.pwa-update-notes strong {
  color: var(--update-ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pwa-update-notes p {
  margin: 0;
  color: var(--update-muted);
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pwa-update-error {
  margin: 0;
  padding: 0;
  color: #a72b32;
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.pwa-update-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-self: center;
  width: min(100%, 240px);
}

.pwa-update-actions button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 10px;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}

.pwa-update-actions button:focus-visible,
.pwa-update-notes:focus-visible {
  outline: 2px solid var(--update-ink);
  outline-offset: 4px;
}

.pwa-update-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  color: #fff;
  background: #24272c;
  box-shadow: none;
}
.pwa-update-primary:hover:not(:disabled) { background: #3b3f45; }
.pwa-update-primary:disabled { cursor: not-allowed; opacity: .45; }
.pwa-update-primary svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pwa-update-thanks {
  display: grid;
  min-height: 240px;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 8px 0;
  text-align: center;
}
/* Focus announces progress; it must not draw a frame around the copy. */
.pwa-update-thanks:focus,
.pwa-update-thanks:focus-visible { outline: none; }
.pwa-update-thanks p { font-variant-numeric: tabular-nums; }

.pwa-update-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--update-logo-size);
  height: var(--update-logo-size);
  margin-bottom: 8px;
}
.pwa-update-orbit::before {
  position: absolute;
  inset: -8px;
  border: 1px solid var(--update-line);
  border-top-color: var(--update-ink);
  border-radius: 50%;
  content: "";
  animation: pwa-update-orbit 1.6s linear infinite;
}
.pwa-update-orbit::after,
.pwa-update-orbit i { display: none; }
.pwa-update-orbit > span {
  display: grid;
  place-items: center;
  width: var(--update-logo-size);
  height: var(--update-logo-size);
  border: 0;
  background: transparent;
  box-shadow: none;
}
.pwa-update-dialog.is-complete .pwa-update-orbit::before { animation: none; }

html[data-theme="dark"] .pwa-update-dialog {
  --update-ink: #f0f1f3;
  --update-muted: #b4b7be;
  --update-line: rgba(240, 241, 243, .16);
}
html[data-theme="dark"] .pwa-update-dialog::backdrop { background: rgba(10, 12, 15, .9); }
html[data-theme="dark"] .pwa-update-card { background: transparent; }
html[data-theme="dark"] .pwa-update-mark img,
html[data-theme="dark"] .pwa-update-orbit img { filter: grayscale(1) brightness(0) invert(1); }
html[data-theme="dark"] .pwa-update-primary { color: #202328; background: #f0f1f3; }
html[data-theme="dark"] .pwa-update-primary:hover:not(:disabled) { background: #dfe1e5; }
html[data-theme="dark"] .pwa-update-error { color: #f4a0a5; }

@keyframes pwa-update-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pwa-update-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pwa-update-orbit { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .pwa-update-card { padding: 20px 8px; }
  .pwa-update-offer { gap: 20px; }
}
@media (max-width: 370px) {
  .pwa-update-card { padding-inline: 0; }
  .pwa-update-hero h2,
  .pwa-update-thanks h2 { font-size: 1.5rem; }
}
@media (max-height: 480px) {
  .pwa-update-dialog { --update-logo-size: 56px; }
  .pwa-update-card { padding-block: 12px; }
  .pwa-update-offer { gap: 16px; }
  .pwa-update-hero { grid-template-columns: var(--update-logo-size) minmax(0, 1fr); column-gap: 12px; text-align: left; justify-items: start; }
  .pwa-update-mark { grid-row: 1 / 4; margin: 0; }
  .pwa-update-eyebrow,
  .pwa-update-hero h2,
  .pwa-update-hero > p { grid-column: 2; }
  .pwa-update-hero h2 { font-size: 1.5rem; }
  .pwa-update-notes { max-height: 24vh; max-height: 24dvh; }
  .pwa-update-thanks { min-height: 160px; }
  .pwa-update-orbit { margin-bottom: 0; }
}

/* Accessibility fallbacks change the full-screen scrim, never expose a card. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pwa-update-dialog::backdrop { background: #f5f6f8; }
  html[data-theme="dark"] .pwa-update-dialog::backdrop { background: #0a0c0f; }
}
@media (prefers-reduced-transparency: reduce) {
  .pwa-update-dialog::backdrop { background: #f5f6f8; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-theme="dark"] .pwa-update-dialog::backdrop { background: #0a0c0f; }
}
@media (prefers-reduced-motion: reduce) {
  .pwa-update-dialog::backdrop,
  .pwa-update-card,
  .pwa-update-primary,
  .pwa-update-orbit::before { animation: none !important; transition: none !important; }
}
