.pwa-sheet[hidden],
.pwa-toast[hidden] {
  display: none !important;
}

html.pwa-sheet-open,
body.pwa-sheet-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.pwa-sheet-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
}

.pwa-sheet {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  overflow: hidden;
  overscroll-behavior: none;
  background: rgba(2, 5, 9, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.pwa-sheet-dialog {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 23px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 88, .55);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0, rgba(217, 181, 88, .15), transparent 38%),
    linear-gradient(155deg, rgba(21, 27, 36, .99), rgba(7, 10, 15, .99));
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .62);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-sheet-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  color: #d9b558;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pwa-sheet-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.pwa-sheet h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 950;
  font-style: italic;
  letter-spacing: -.025em;
  line-height: 1;
  text-transform: uppercase;
}

.pwa-sheet p {
  margin: 13px 0 0;
  color: #aeb9c6;
  font-size: 14px;
  line-height: 1.55;
}

.pwa-sheet-steps {
  display: grid;
  gap: 9px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.pwa-sheet-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: #dce3ea;
  font-size: 13px;
}

.pwa-sheet-steps b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(217, 181, 88, .46);
  border-radius: 50%;
  color: #e1bd63;
  font-size: 12px;
}

.pwa-sheet-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 20px;
}

.pwa-sheet-button {
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid rgba(217, 181, 88, .48);
  border-radius: 11px;
  background: transparent;
  color: #d9b558;
  font: 850 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.pwa-sheet-button.is-primary {
  border-color: #d9b558;
  background: linear-gradient(135deg, #e0bd63, #b88c2f);
  color: #080b10;
  box-shadow: 0 10px 30px rgba(184, 140, 47, .22);
}

.pwa-sheet-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .88);
  outline-offset: 3px;
}

.pwa-sheet-note {
  display: block;
  margin-top: 13px;
  color: #768391;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.pwa-toast {
  position: fixed;
  z-index: 2147483001;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 460px);
  padding: 13px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(217, 181, 88, .52);
  border-radius: 12px;
  background: rgba(10, 14, 20, .97);
  color: #f4f6f8;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .52);
  font: 750 12px/1.45 Inter, system-ui, sans-serif;
  text-align: center;
}

@media (min-width: 600px) {
  .pwa-sheet-actions.has-secondary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pwa-sheet:not([hidden]) .pwa-sheet-dialog {
    animation: pwa-sheet-in .24s cubic-bezier(.2, .8, .2, 1) both;
  }

  @keyframes pwa-sheet-in {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}
