.pwa-dialog {
  box-sizing: border-box;
  width: min(600px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid #dededb;
  border-radius: 20px;
  background: #faf9f6;
  color: #152943;
  box-shadow: 0 24px 80px #1529434d;
}

.pwa-dialog::backdrop {
  background: #152943a6;
}

.pwa-dialog-inner {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.pwa-dialog [hidden] {
  display: none !important;
}

.pwa-dialog h2 {
  max-width: calc(100% - 2rem);
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.1;
}

.pwa-dialog h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.pwa-dialog p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.pwa-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dededb;
  border-radius: 50%;
  background: #fff;
  color: #152943;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.pwa-share {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #dededb;
}

.pwa-dialog label {
  display: block;
  margin: 0.75rem 0 0.3rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.pwa-dialog input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #8592a1;
  border-radius: 10px;
  background: #fff;
  color: #152943;
  font: inherit;
}

.pwa-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #b63723;
  border-radius: 10px;
  background: #b63723;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.pwa-action-outline {
  border-color: #ccd0d5;
  background: #fff;
  color: #152943;
}

.pwa-action-outline:hover,
.pwa-close:hover {
  border-color: #152943;
}

.pwa-dialog :is(a, button, input):focus-visible {
  outline: 3px solid #b63723;
  outline-offset: 3px;
}

.pwa-qr-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.pwa-qr-card canvas {
  display: block;
  width: min(155px, 28vw);
  height: auto;
  border: 1px solid #dededb;
  border-radius: 12px;
  background: #fff;
  image-rendering: pixelated;
}

.pwa-share-actions {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.5rem;
}

.pwa-dialog .pwa-status {
  margin: 0;
  font-size: 0.875rem;
}

.pwa-status:not(:empty) {
  padding-top: 0.75rem;
}

@media (max-width: 460px) {
  .pwa-qr-card {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
