[data-install-launch][hidden],
[data-install-backdrop][hidden],
[data-install-sheet][hidden],
[data-install-ios-guide][hidden],
[data-install-android-guide][hidden],
[data-install-lightbox][hidden] { display: none !important; }

.pwa-install-launch {
  position: fixed;
  z-index: 24;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #fff;
  background: #1d4ed8;
  box-shadow: 0 12px 28px rgba(29, 78, 216, .32);
  font: 750 14px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.pwa-install-launch:focus-visible,
.pwa-install-sheet button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

.pwa-install-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(3, 10, 24, .66);
  backdrop-filter: blur(3px);
}

.pwa-install-sheet {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 0;
  width: min(560px, 100%);
  max-height: min(92dvh, 760px);
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateX(-50%);
  color: #10213f;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 60px rgba(3, 10, 24, .28);
}

body.pwa-install-open { overflow: hidden; }

.pwa-install-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.pwa-install-header > div { display: grid; gap: 2px; min-width: 0; }
.pwa-install-kicker { color: #2563eb; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.pwa-install-header strong { font-size: 20px; line-height: 1.25; }
.pwa-install-message { color: #64748b; font-size: 13px; }
.pwa-install-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #334155;
  background: #f1f5f9;
  font-size: 26px;
  cursor: pointer;
}

.pwa-ios-guide { min-width: 0; }
.pwa-guide-image-button { display: block; width: 100%; max-width: 100%; padding: 0; overflow: hidden; border: 1px solid #dbe5f2; border-radius: 14px; background: #f8fbff; cursor: zoom-in; }
.pwa-guide-image { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.pwa-guide-caption { margin: 10px 0 0; color: #53647c; font-size: 13px; line-height: 1.5; text-align: center; }
.pwa-guide-lightbox { position: fixed; z-index: 110; inset: 0; overflow: auto; overscroll-behavior: contain; padding: 64px 18px 24px; background: rgba(3, 10, 24, .94); text-align: center; }
.pwa-guide-lightbox img { display: block; width: min(1122px, 92vw); max-width: none; height: auto; margin: 0 auto; border-radius: 12px; }
.pwa-guide-lightbox-close { position: fixed; z-index: 111; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff55; border-radius: 50%; color: #fff; background: #0f1f3ddd; font-size: 27px; cursor: pointer; }
.pwa-step-copy { display: block; margin-top: 10px; font-size: 20px; line-height: 1.2; }

.pwa-phone-demo {
  position: relative;
  width: min(286px, calc(100vw - 64px));
  height: 302px;
  margin: 0 auto;
  overflow: hidden;
  border: 6px solid #172033;
  border-radius: 30px;
  background: #eef2f7;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}
.pwa-phone-demo::before { content: ""; position: absolute; z-index: 2; top: 7px; left: 50%; width: 76px; height: 18px; transform: translateX(-50%); border-radius: 12px; background: #172033; }
.pwa-highlight { color: #0758d1 !important; background: #dbeafe !important; box-shadow: 0 0 0 4px #60a5fa, 0 0 20px rgba(37, 99, 235, .32); }
.pwa-big-arrow { position: absolute; z-index: 5; display: grid; place-items: center; color: #ef4444; font-size: 54px; font-weight: 900; line-height: 1; filter: drop-shadow(0 3px 1px #fff); }
.pwa-menu-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 15px; color: #1e293b; background: #fff; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 14px; }
.pwa-menu-row:first-of-type { border-radius: 13px 13px 0 0; }
.pwa-menu-row:nth-last-of-type(1) { border-radius: 0 0 13px 13px; }
.pwa-home-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 2px solid currentColor; border-radius: 7px; font-size: 20px; }
.pwa-arrow-side { right: 5px; top: 163px; transform: rotate(180deg); }

.pwa-manual-close,
.pwa-native-action { min-height: 46px; border: 0; border-radius: 11px; font-weight: 800; cursor: pointer; }
.pwa-manual-close,
.pwa-native-action { color: #fff; background: #2563eb; }

.pwa-android-guide { text-align: center; }
.pwa-android-menu-demo { height: 270px; padding: 40px 14px 14px; background: #eef2f7; }
.pwa-android-menu-head { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 15px; color: #334155; background: #fff; border-radius: 12px 12px 0 0; font-weight: 750; }
.pwa-android-menu-head b { font-size: 27px; }
.pwa-android-guide .pwa-arrow-side { top: 171px; }
.pwa-manual-close { width: 100%; margin-top: 14px; }

@media (max-width: 430px) {
  .pwa-install-launch { left: 10px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 54px); min-height: 44px; padding-inline: 14px; }
  .pwa-install-sheet { width: 100%; max-width: 100%; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .pwa-install-header { margin-bottom: 5px; }
  .pwa-install-header strong { font-size: 18px; }
  .pwa-phone-demo { width: min(270px, calc(100vw - 44px)); height: 286px; }
  .pwa-guide-image-button { border-radius: 10px; }
  .pwa-guide-caption { margin-top: 8px; font-size: 12px; }
  .pwa-guide-lightbox { padding-inline: 10px; }
  .pwa-guide-lightbox img { width: 160vw; }
  .pwa-step-copy { margin-top: 8px; font-size: 18px; }
}

@media (display-mode: standalone) {
  .pwa-install-launch, .pwa-install-backdrop, .pwa-install-sheet { display: none !important; }
}
