.pwa-install-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent, #7aa2f7) 36%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel, #141923) 92%, var(--accent, #7aa2f7));
}

.pwa-install-card.hidden {
  display: none;
}

.pwa-install-card > span:nth-child(2) {
  min-width: 0;
}

.pwa-install-card strong,
.pwa-install-card small {
  display: block;
}

.pwa-install-card strong {
  color: var(--text, #f5f7fb);
  font-size: 14px;
  line-height: 1.3;
}

.pwa-install-card small {
  margin-top: 4px;
  color: var(--muted, #9ba6b7);
  font-size: 12px;
  line-height: 1.35;
}

.pwa-install-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent, #7aa2f7) 18%, transparent);
  color: var(--accent, #7aa2f7);
}

.pwa-install-icon svg,
.pwa-install-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pwa-install-card button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
}

.push-notification-settings > p {
  margin: 0;
  color: var(--muted, #9ba6b7);
  font-size: 13px;
  line-height: 1.45;
}

.push-notification-settings > button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
}

.pwa-install-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text, #f5f7fb);
}

.pwa-install-dialog::backdrop {
  background: rgb(2 5 10 / 78%);
  backdrop-filter: blur(8px);
}

.pwa-install-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  gap: 12px;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid rgb(255 255 255 / 10%);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--panel, #141923);
  box-shadow: 0 -20px 60px rgb(0 0 0 / 38%);
}

.pwa-install-sheet > img {
  grid-column: 1;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.pwa-install-sheet > div {
  grid-column: 2;
  align-self: center;
  min-width: 0;
}

.pwa-install-sheet > div p,
.pwa-install-sheet > div h2 {
  margin: 0;
}

.pwa-install-sheet > div p {
  color: var(--accent, #7aa2f7);
  font-size: 12px;
  font-weight: 700;
}

.pwa-install-sheet > div h2 {
  margin-top: 4px;
  font-size: 19px;
  line-height: 1.25;
}

.pwa-install-close {
  grid-column: 3;
  grid-row: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 7%);
  color: var(--text, #f5f7fb);
}

.pwa-install-sheet ol {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pwa-install-sheet li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgb(255 255 255 / 5%);
}

.pwa-install-sheet li span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #7aa2f7) 20%, transparent);
  color: var(--accent, #7aa2f7);
  font-weight: 800;
}

.pwa-install-sheet li p,
.pwa-install-note {
  margin: 0;
  line-height: 1.4;
}

.pwa-install-note {
  grid-column: 1 / -1;
  color: var(--muted, #9ba6b7);
  font-size: 13px;
}

.pwa-install-done {
  grid-column: 1 / -1;
  min-height: 48px;
  border-radius: 12px;
}

@media (min-width: 640px) {
  .pwa-install-sheet {
    right: 50%;
    bottom: 24px;
    left: auto;
    width: min(440px, calc(100% - 32px));
    transform: translateX(50%);
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-dialog,
  .pwa-install-sheet {
    scroll-behavior: auto;
  }
}
