/* Native-like polish for the installed Commander app. */
html, body { overscroll-behavior: none; }
* { -webkit-tap-highlight-color: transparent; }
button, [role="button"], .btn, nav, .sidebar, .menu-bar, .mobile-bottom-nav {
  -webkit-user-select: none;
  user-select: none;
}

/* Standalone with a black-translucent status bar draws under the notch: keep content clear.
   The bottom nav already pads for safe-area-inset-bottom itself. */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* PWAInstallGate */
.pwa-gate {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: #022f79; color: #fff; overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  -webkit-user-select: none; user-select: none;
}
.pwa-gate__card { width: 100%; max-width: 420px; text-align: center; }
.pwa-gate__icon { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 16px; }
.pwa-gate h1 { font-size: 22px; margin: 0 0 8px; }
.pwa-gate p { margin: 0 0 20px; line-height: 1.6; opacity: .9; }
.pwa-gate__warn { background: rgba(255, 225, 4, .15); border: 1px solid #ffe104; border-radius: 12px; padding: 14px; }
.pwa-gate__btn {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: #ffe104; color: #022f79; font-size: 17px; font-weight: 700; cursor: pointer;
}
.pwa-gate__url {
  width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff;
  font-size: 14px; -webkit-user-select: text; user-select: text;
}
.pwa-gate ol { list-style: none; padding: 0; margin: 0 0 8px; text-align: left; }
.pwa-gate li {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, .08);
}
.pwa-gate li b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffe104; color: #022f79; display: grid; place-items: center; }
.pwa-gate li svg { flex: none; width: 24px; height: 24px; }
.pwa-gate__close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; cursor: pointer;
}
