.pwa-install {
  position: fixed;
  z-index: 100000;
  right: 14px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  display: flex;
  justify-content: flex-end;
  color: #000;
  font-family: "Schibsted Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
}

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

.pwa-install button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pwa-install-pillbar {
  display: flex;
  align-items: stretch;
  min-height: 56px;
  overflow: hidden;
  border: 3px solid #000;
  border-radius: 999px;
  background: #c6ee3c;
  box-shadow: 4px 4px 0 #000;
  pointer-events: auto;
}

.pwa-install-pill,
.pwa-install-pill-dismiss {
  min-height: 50px;
  border: 0;
  color: #000;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.pwa-install .pwa-install-pill {
  padding: 12px 14px 12px 20px;
  font-size: 1rem;
  font-weight: 800;
}

.pwa-install-pill-dismiss {
  width: 48px;
  padding: 0 9px 3px 8px;
  border-left: 3px solid #000;
  background: #fff;
  font-size: 1.8rem;
  line-height: 1;
}

.pwa-install-pill:active,
.pwa-install-pill-dismiss:active,
.pwa-install-action:active {
  transform: translate(2px, 2px);
}

.pwa-install-sheet {
  position: relative;
  width: 100%;
  max-height: min(78vh, 640px);
  max-height: min(78dvh, 640px);
  padding: 56px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  border: 3px solid #000;
  border-radius: 8px;
  background: #fffdf6;
  box-shadow: 7px 7px 0 #000;
  pointer-events: auto;
  animation: pwa-sheet-in 180ms ease-out;
}

.pwa-install-sheet::before {
  position: absolute;
  top: 14px;
  right: 0;
  left: 0;
  height: 30px;
  background: var(--glasses, none) 8px 0 / 128px 30px repeat-x;
  content: "";
}

.pwa-install-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.pwa-install-heading-icon {
  display: block;
  width: 52px;
  height: 52px;
  border: 3px solid #000;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 104' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 18h68L42 58z' fill='%23fff'/%3E%3Cpath d='M15 26h54L42 56z' fill='%23ff2f92' stroke='none'/%3E%3Cpath d='M8 18h68L42 58z'/%3E%3Cpath d='M42 58v30M24 91h36'/%3E%3C/svg%3E") center 55% / 30px no-repeat,
    #ff9a1f;
  transform: rotate(-6deg);
}

.pwa-install-kicker {
  margin: 0 0 2px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pwa-install-heading h2 {
  margin: 0;
  color: #000;
  font-family: "Shrikhand", "Arial Black", sans-serif;
  font-size: clamp(1.15rem, 5.4vw, 1.45rem);
  font-weight: 400;
  line-height: 1.15;
}

.pwa-install-close {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  place-items: center;
  border: 3px solid #000;
  border-radius: 50%;
  color: #000;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.pwa-install-intro {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

.pwa-install-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pwa-install-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 3px dotted #000;
  font-size: 0.98rem;
  line-height: 1.35;
}

.pwa-install-steps li:first-child {
  border-top: 3px dotted #000;
}

.pwa-step-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 3px solid #000;
  border-radius: 50%;
  color: #000;
  background: #ff2f92;
  font-family: "Shrikhand", "Arial Black", sans-serif;
  font-size: 1.05rem;
}

.pwa-install-steps li:nth-child(2) .pwa-step-number {
  background: #19cfc0;
}

.pwa-install-steps li:nth-child(3) .pwa-step-number {
  background: #c6ee3c;
}

.pwa-step-icon {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 6px;
  border: 2px solid #000;
  border-radius: 4px;
  color: #000;
  background: #ff9a1f;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.pwa-install-ios-return {
  margin: 16px 0 0;
  padding: 14px;
  border: 3px dashed #000;
  border-radius: 4px;
  color: #000;
  background: #ffe36b;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
}

.pwa-install-note {
  margin: 14px 2px 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.pwa-install-action {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 3px solid #000;
  border-radius: 999px;
  color: #000;
  background: #ff2f92;
  box-shadow: 4px 4px 0 #000;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}

.pwa-install-fallback {
  margin: 0;
  padding: 16px;
  border: 3px solid #000;
  border-radius: 4px;
  color: #000;
  background: #7eeee2;
  font-size: 1.02rem;
  line-height: 1.5;
}

.pwa-install button:focus-visible {
  outline: 4px solid #7a3ff2;
  outline-offset: 3px;
}

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

@media (min-width: 480px) {
  .pwa-install {
    right: 20px;
    left: auto;
    width: 390px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-sheet {
    animation: none;
  }
}
