/* PWA shell: install affordance + landscape-only gate. Kept out of the game bundle. */
#pwa-install {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 80;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgb(102 255 158 / 0.42);
  border-radius: 2px;
  background: rgb(3 10 6 / 0.94);
  color: #baffd3;
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgb(102 255 158 / 0.14);
  cursor: pointer;
}
#pwa-install.show { display: inline-flex; }
#pwa-install:hover { border-color: #66ff9e; color: #e6fff0; }

#pwa-rotate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / 0.38) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 30%, #0a1d11, #020805 70%);
  color: #8dffb9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (orientation: portrait) and (pointer: coarse) {
  #pwa-rotate { display: grid; }
}
body.pwa-gated #pwa-rotate { display: grid; }
body.pwa-gated #pwa-install { display: none !important; }
.pwa-card {
  width: min(420px, 100%);
  padding: 26px 22px;
  border: 1px solid rgb(102 255 158 / 0.34);
  background: rgb(3 10 6 / 0.9);
  box-shadow: 0 0 0 1px rgb(102 255 158 / 0.06), 0 0 60px rgb(102 255 158 / 0.08);
  text-align: center;
}
.pwa-phone {
  width: 54px;
  height: 88px;
  margin: 0 auto 20px;
  border: 2px solid #66ff9e;
  border-radius: 8px;
  box-shadow: 0 0 18px rgb(102 255 158 / 0.25);
  position: relative;
  transform: rotate(90deg);
}
.pwa-phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 14px;
  height: 2px;
  transform: translateX(-50%);
  background: #66ff9e;
}
.pwa-kicker { font-size: 10px; letter-spacing: 0.28em; color: #6eea9c; text-transform: uppercase; }
.pwa-title { margin: 10px 0 8px; font-size: 19px; letter-spacing: 0.08em; color: #d9ffe6; }
.pwa-copy { margin: 0 auto 18px; max-width: 34ch; font-size: 12px; line-height: 1.6; color: #87c9a0; }
.pwa-copy.ko { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; color: #6da987; }
.pwa-actions { display: grid; gap: 8px; }
.pwa-btn {
  padding: 10px 12px;
  border: 1px solid rgb(102 255 158 / 0.45);
  background: #06150c;
  color: #c9ffdd;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.pwa-btn.primary { background: #66ff9e; color: #03150a; border-color: #66ff9e; font-weight: 700; }
.pwa-btn:focus { outline: 2px solid #66ff9e; outline-offset: 3px; }
.pwa-btn:focus:not(:focus-visible) { outline-color: rgb(102 255 158 / 0.45); }
#pwa-rotate-install { display: none; }
#pwa-rotate-install.show { display: block; }
