/* Keep one-finger page and shelf scrolling, but leave no browser pinch gesture. */
@media (pointer:coarse), (any-pointer:coarse) {
  html,body { touch-action:pan-x pan-y; }
}
.pwa-banner { position: fixed; z-index: 35; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 14px; color: #203653; background: #fffdf7; border: 2px solid #203653; border-radius: 18px 15px 20px 14px; box-shadow: 0 5px 0 #203653, 0 10px 32px #20365330; font-family: Outfit, sans-serif; }
.pwa-banner img { flex: 0 0 auto; border-radius: 12px; }
.pwa-banner > div { min-width: 0; flex: 1; }
.pwa-banner strong, .pwa-banner span { display: block; line-height: 1.3; }
.pwa-banner strong { font-size: 16px; }
.pwa-banner span { margin-top: 3px; font-size: 13px; }
.pwa-banner button, .pwa-dialog button { min-width: 44px; min-height: 48px; color: #203653; font: 700 14px Outfit, sans-serif; }
.pwa-install { flex: 0 0 auto; padding: 10px 14px; background: #ffcf48; border: 2px solid #203653; border-radius: 12px; }
.pwa-close { padding: 4px; border: 0; background: transparent; font-size: 26px !important; }
.game-active .pwa-banner, .world-loading .pwa-banner { display: none; }
.pwa-dialog { max-width: 460px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; color: #203653; background: #fffdf7; border: 3px solid #203653; border-radius: 26px 20px 28px 18px; font-family: Outfit, sans-serif; }
.pwa-dialog::backdrop { background: #111725bf; }
.pwa-dialog header { display: flex; align-items: center; justify-content: space-between; }
.pwa-dialog img { border-radius: 14px; }
.pwa-dialog h2 { margin: 20px 0 8px; color: #203653; font: 800 28px/1.1 Outfit, sans-serif; }
.pwa-dialog p { margin: 8px 0; }
.pwa-dialog ol { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 18px; }
.pwa-dialog li { display: flex; gap: 12px; align-items: center; }
.pwa-dialog li > span { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; background: #dceaff; border-radius: 10px; font-weight: 800; }
.pwa-dialog svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-dialog .pwa-note { font-size: 13px; color: #52647a; }
.app-nav .nav-install { display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;padding:9px;border:2px solid var(--app-border,#b8c7dc);border-radius:14px;background:var(--app-raised,#edf3ff);color:var(--app-text,#203653);cursor:pointer; }
.app-nav .nav-install[hidden] { display:none; }.nav-install svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.app-nav .nav-install:focus-visible { outline:3px solid var(--app-accent,#2559ce);outline-offset:3px; }
.pwa-dialog button:focus-visible, .pwa-banner button:focus-visible { outline: 3px solid #2559ce; outline-offset: 3px; }
@media (display-mode:standalone), (display-mode:minimal-ui), (display-mode:window-controls-overlay) {
  .app-nav .nav-install,.pwa-banner { display:none !important; }
}
html[data-app-theme=dark] :is(.pwa-dialog,.pwa-banner) { background: var(--app-surface); color: var(--app-text); border-color: var(--app-border); }
html[data-app-theme=dark] :is(.pwa-dialog h2,.pwa-close) { color: var(--app-text); }
html[data-app-theme=dark] .pwa-note { color: var(--app-muted); }
.pwa-dialog li > span { color: #203653; }
@media(max-width: 420px) { .pwa-banner { gap: 8px; padding: 10px; }.pwa-banner img { width: 36px; height: 36px; }.pwa-banner span { display: none; }.pwa-banner strong { font-size: 14px; }.pwa-install { padding: 8px; } }
