.app-download-panel {
  box-sizing: border-box; position: fixed; inset: auto; margin: 0;
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 22px; border: 1px solid var(--border, #dce3e4); border-radius: 12px;
  background: var(--surface-elevated, #fff); color: var(--foreground, #505969);
  box-shadow: 0 18px 60px #001c2926; font: 14px/1.5 var(--sans, sans-serif);
  opacity: 0; transform: scale(1); transform-origin: top right; pointer-events: none;
  /* Match LocaleMenu's standard fade / 95% zoom, including native popover dismissal. */
  transition:
    opacity var(--motion-standard, 180ms) ease,
    transform var(--motion-standard, 180ms) ease,
    display var(--motion-standard, 180ms) allow-discrete,
    overlay var(--motion-standard, 180ms) allow-discrete;
}
.app-download-panel:popover-open { opacity: 1; transform: scale(1); pointer-events: auto; }
@starting-style {
  .app-download-panel:popover-open { opacity: 0; transform: scale(.95); }
}
.app-download-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.app-download-panel header strong { display: block; font-size: 20px; font-weight: 650; }
.app-download-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.app-download-close svg { width: 24px; height: 24px; }
.app-download-close:hover { background: var(--layer-hover-01, #f2f6f5); }
.app-download-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-download-store { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.app-download-qr { display: flex; align-items: center; flex-direction: column; gap: 10px; padding: 14px 10px 10px; border: 1px solid var(--border, #dce3e4); border-radius: 8px; }
.app-download-platform { font-size: 12px; letter-spacing: .08em; color: var(--muted-foreground, #727c80); }
.app-download-qr img { display: block; width: 100%; height: auto; max-width: 164px; aspect-ratio: 1; background: #fff; border-radius: 4px; }
.app-download-store-button { display: flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 8px; border: 1px solid #111820; border-radius: 8px; background: #111820; color: #fff; text-decoration: none; direction: ltr; cursor: pointer; }
.app-download-store-button > svg { flex: none; width: 22px; height: 22px; }
.app-download-store-button strong { font-size: 14px; font-weight: 650; white-space: nowrap; }
.app-download-store-arrow { display: flex; flex: none; }
.app-download-store-arrow svg { width: 16px; height: 16px; }
.app-download-store-button:hover { background: #263440; border-color: #263440; }
.app-download-store-button:active, .app-download-apk:active { background: #080d12; }
.app-download-panel footer { border-top: 1px solid var(--border, #dce3e4); margin-top: 20px; padding-top: 12px; }
.app-download-apk { display: flex; gap: 12px; align-items: center; min-height: 44px; box-sizing: border-box; border: 1px solid #111820; border-radius: 8px; background: #111820; color: #fff; text-decoration: none; padding: 10px 12px; font-size: 14px; }
.app-download-apk svg { flex: none; width: 20px; height: 20px; }
.app-download-apk svg:last-child { margin-inline-start: auto; }
.app-download-apk:hover { background: #263440; border-color: #263440; }
.app-download-panel :is(a, button):focus-visible { outline: 2px solid var(--primary, #177777); outline-offset: 3px; }
@media (max-width: 380px) {
  .app-download-panel { padding: 16px; }
  .app-download-stores { gap: 10px; }
  .app-download-qr { padding: 12px 6px 6px; }
  .app-download-store-button { gap: 6px; padding-inline: 5px; }
  .app-download-store-button strong { font-size: 13px; }
  .app-download-store-button > svg { width: 20px; height: 20px; }
  .app-download-store-arrow { display: none; }
}
@media (forced-colors: active) {
  .app-download-panel, .app-download-qr, .app-download-store-button { border: 1px solid CanvasText; }
  .app-download-store-button, .app-download-apk { color: LinkText; background: Canvas; border-color: CanvasText; }
}

@media (max-width: 767.98px) {
  .app-download-panel { transform-origin: top center; }
}
@media (prefers-reduced-motion: reduce) {
  .app-download-panel { transition: none; }
}

/* Compatibility for the deployed AuthBoundary; source no longer renders this note. */
.auth-mode-panel .auth-demo-note { display: none; }
