/* Dee PWA — full-screen install gate (pre-login) */
.dee-pwa-gate {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  overflow: auto;
}

.dee-pwa-gate[hidden] {
  display: none !important;
}

.dee-pwa-gate__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(65, 212, 6, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(22, 163, 74, 0.18), transparent 50%),
    linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 40%, #f8fafc 100%);
}

.dee-pwa-gate__card {
  position: relative;
  width: min(100%, 420px);
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  animation: deePwaGateIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes deePwaGateIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.dee-pwa-gate__logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 24px;
}

.dee-pwa-gate__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dee-pwa-gate__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #16a34a;
}

.dee-pwa-gate__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.dee-pwa-gate__desc {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
  font-weight: 500;
}

.dee-pwa-gate__benefits {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  text-align: left;
}

.dee-pwa-gate__benefits li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.12);
  font-size: 0.78rem;
  font-weight: 650;
  color: #14532d;
}

.dee-pwa-gate__benefit-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  flex-shrink: 0;
}

.dee-pwa-gate__actions {
  display: grid;
  gap: 0.65rem;
}

.dee-pwa-gate__install,
.dee-pwa-gate__browser {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 1.25rem;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 180ms ease, background 220ms ease, box-shadow 220ms ease;
}

.dee-pwa-gate__install {
  color: #fff;
  background: linear-gradient(135deg, #41d406, #16a34a);
  box-shadow: 0 12px 28px rgba(65, 212, 6, 0.35);
}

.dee-pwa-gate__install:hover {
  filter: brightness(1.03);
}

.dee-pwa-gate__install:active,
.dee-pwa-gate__browser:active {
  transform: scale(0.98);
}

.dee-pwa-gate__install:disabled {
  opacity: 0.7;
  cursor: wait;
}

.dee-pwa-gate__browser {
  color: #334155;
  background: transparent;
  border: 1.5px solid #e2e8f0;
}

.dee-pwa-gate__browser:hover {
  background: #f8fafc;
}

.dee-pwa-gate__hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

body.dee-pwa-gate-open .auth-shell {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 420px) {
  .dee-pwa-gate__benefits {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dee-pwa-gate__card {
    animation: none;
  }
}
