:root {
  --pwa-bg: rgba(16, 18, 31, 0.42);
  --pwa-card-bg: #fff;
  --pwa-text: #17171c;
  --pwa-muted: #666878;
  --pwa-primary: #ff7f15;
  --pwa-primary-dark: #ee6d05;
  --pwa-track: #ececf2;
  --pwa-progress: linear-gradient(90deg, #FF7D12 0%, #ffac28 100%);
  --pwa-shadow: 0 24px 54px rgba(0, 0, 0, 0.2);
}

.pwa-hidden { display: none !important; }
.pwa-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--pwa-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pwa-overlay.is-visible { display: flex; }

.pwa-card {
  position: relative;
  width: min(92vw, 380px);
  background: var(--pwa-card-bg);
  border-radius: 22px;
  box-shadow: var(--pwa-shadow);
  overflow: hidden;
  color: var(--pwa-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.pwa-card__inner { padding: 24px 20px 0; }
.pwa-card__actions { padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }

.pwa-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #383a43;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pwa-card__close svg { width: 18px; height: 18px; }
.pwa-card__close:active { transform: translateY(1px); }
.pwa-card--locked .pwa-card__close { display: none !important; }

.pwa-card__title {
  margin: 0;
  padding-right: 54px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 630;
  letter-spacing: -0.03em;
}
.pwa-card__sub {
  margin: 10px 0 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--pwa-muted);
}

.pwa-card__image-wrap {
  margin: 18px auto 0;
  width: 300px;
  height: 300px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-card__image {
  width: 300px;
  height: 300px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.pwa-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--pwa-primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.pwa-btn:active { transform: translateY(1px); background: var(--pwa-primary-dark); }

.pwa-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(122, 119, 130, 0.08);
  color: #FF7D12;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.pwa-status--success {
  background: rgba(27, 166, 83, 0.12);
  color: #15803d;
}

.pwa-progress-view,
.pwa-ready {
  padding-bottom: 24px;
}

.pwa-progress-shell {
  margin-top: 20px;
}
.pwa-progress__track {
  height: 12px;
  border-radius: 999px;
  background: var(--pwa-track);
  overflow: hidden;
}
.pwa-progress__bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--pwa-progress);
  transition: width 0.16s linear;
}
.pwa-progress__meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--pwa-muted);
}
.pwa-progress__meta strong {
  color: var(--pwa-text);
  font-size: 14px;
}

@media (max-width: 380px) {
  .pwa-card__title { font-size: 26px; }
  .pwa-card__image-wrap, .pwa-card__image { width: 260px; height: 260px; }
}
