body.store-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.store-modal-open .container {
  overflow: hidden;
}

.store-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px
    max(18px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.store-modal[hidden] {
  display: none !important;
}

.store-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      800px 480px at 50% 18%,
      rgba(106, 166, 255, 0.16),
      transparent 70%
    ),
    rgba(4, 8, 15, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: store-modal-fade-in 0.22s ease both;
}

.store-modal__dialog {
  position: relative;
  isolation: isolate;
  width: min(100%, 590px);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: hidden;
  padding: 34px clamp(22px, 5vw, 42px) 30px;
  border: 1px solid transparent;
  border-radius: 28px;
  color: var(--text);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(17, 25, 42, 0.98), rgba(9, 14, 25, 0.98))
      padding-box,
    linear-gradient(
        135deg,
        rgba(106, 166, 255, 0.66),
        rgba(130, 255, 210, 0.28),
        rgba(255, 255, 255, 0.1)
      )
      border-box;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: store-modal-rise-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.store-modal__dialog::before,
.store-modal__dialog::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.store-modal__dialog::before {
  width: 260px;
  height: 260px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(130, 255, 210, 0.2), transparent 68%);
}

.store-modal__dialog::after {
  width: 300px;
  height: 300px;
  bottom: -210px;
  left: -110px;
  background: radial-gradient(circle, rgba(106, 166, 255, 0.22), transparent 68%);
}

.store-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.store-modal__close:hover {
  transform: rotate(4deg) scale(1.04);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.store-modal__close:focus-visible {
  outline: 3px solid rgba(130, 255, 210, 0.34);
  outline-offset: 3px;
}

.store-modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.store-modal__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.store-modal__logo-wrap {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, #172842, #1c2a44);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.store-modal__logo-wrap img {
  width: 80%;
  height: 80%;
  display: block;
  object-fit: contain;
}

.store-modal__eyebrow {
  margin-bottom: 9px;
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}


.store-modal__description {
  max-width: 500px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
}

.store-modal__thank-you {
  display: block;
  margin-top: 12px;
  font-size: 0.88em;
  line-height: 1.5;
}

.store-modal__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
}

.store-modal__divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16));
}

.store-modal__divider span:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent);
}

.store-modal__divider strong {
  color: rgba(234, 240, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.store-modal__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 310px);
  margin-inline: auto;
}

.store-modal__store-link[hidden] {
  display: none !important;
}

.store-modal__store-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.store-modal__store-link:hover {
  transform: translateY(-3px);
  border-color: rgba(130, 255, 210, 0.25);
  background: linear-gradient(
    135deg,
    rgba(106, 166, 255, 0.1),
    rgba(130, 255, 210, 0.065)
  );
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.store-modal__store-link:focus-visible {
  outline: 3px solid rgba(130, 255, 210, 0.34);
  outline-offset: 3px;
}

.store-modal__store-link.is-selected {
  border-color: rgba(130, 255, 210, 0.36);
  background: linear-gradient(
    135deg,
    rgba(106, 166, 255, 0.13),
    rgba(130, 255, 210, 0.09)
  );
  box-shadow:
    0 0 0 1px rgba(106, 166, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.store-modal__store-link img {
  display: block;
  width: min(100%, 180px);
  height: auto;
}


.store-modal__hint {
  margin: 17px 0 0;
  color: rgba(154, 163, 178, 0.74);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes store-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes store-modal-rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .store-modal {
    place-items: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px
      max(12px, env(safe-area-inset-bottom, 0px));
  }

  .store-modal__dialog {
    width: min(100%, 460px);
    max-height: calc(100dvh - 24px);
    padding: clamp(26px, 5dvh, 32px) 18px clamp(20px, 4dvh, 24px);
    border-radius: 24px;
    overflow: hidden;
  }

  .store-modal__brand {
    margin-bottom: 14px;
  }

  .store-modal__actions {
    grid-template-columns: 1fr;
  }

  .store-modal__store-link {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding: 12px 14px;
    text-align: center;
  }

  .store-modal__store-link img {
    width: min(100%, 180px);
    margin-inline: auto;
  }

}

@media (max-width: 560px) and (max-height: 680px) {
  .store-modal__dialog {
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .store-modal__brand {
    margin-bottom: 10px;
  }

  .store-modal__logo-wrap {
    width: 40px;
    height: 40px;
  }

  .store-modal__eyebrow {
    margin-bottom: 6px;
  }


  .store-modal__description {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .store-modal__divider {
    margin: 18px 0 13px;
  }

  .store-modal__store-link {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-modal__backdrop,
  .store-modal__dialog {
    animation: none;
  }

  .store-badge--button,
  .store-modal__close,
  .store-modal__store-link {
    transition: none;
  }
}

/* iOS PWA-Installationsansicht im Store-Modal */
.store-modal__view[hidden] {
  display: none !important;
}

button.store-modal__store-link {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.store-modal__pwa-view {
  animation: store-modal-view-in 0.22s ease both;
}

.store-modal__pwa-title {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(23px, 4.5vw, 31px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.store-modal__pwa-description {
  max-width: 500px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.store-modal__steps {
  display: grid;
  gap: 9px;
  max-width: 500px;
  margin: 18px auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.store-modal__step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  color: rgba(234, 240, 255, 0.9);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
  line-height: 1.45;
}

.store-modal__step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #09121e;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(106, 166, 255, 0.16);
  font-size: 14px;
  font-weight: 900;
}

.store-modal__step-domain {
  color: var(--brand-2);
  font-weight: 800;
  text-decoration: none;
}


.store-modal__step-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-modal__share-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--brand-2);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-modal__pwa-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 500px;
  margin: 17px auto 0;
}

.store-modal__pwa-open {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.store-modal__pwa-open {
  padding: 0 17px;
  border: 1px solid rgba(130, 255, 210, 0.35);
  color: #07131c;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-2), #b5ffe6);
  box-shadow: 0 12px 25px rgba(130, 255, 210, 0.13);
}

.store-modal__pwa-open svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.store-modal__pwa-open:hover {
  transform: translateY(-2px);
}


.store-modal__pwa-open:focus-visible {
  outline: 3px solid rgba(130, 255, 210, 0.34);
  outline-offset: 3px;
}

@keyframes store-modal-view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .store-modal__pwa-title {
    font-size: clamp(22px, 7vw, 28px);
  }

  .store-modal__pwa-description {
    font-size: 14px;
    line-height: 1.48;
  }

  .store-modal__steps {
    margin-top: 14px;
  }

  .store-modal__step {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 10px;
    min-height: 49px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .store-modal__step-number {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .store-modal__share-icon {
    width: 25px;
    height: 25px;
  }

  .store-modal__pwa-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .store-modal__pwa-open {
    min-height: 44px;
  }
}

@media (max-width: 560px) and (max-height: 680px) {
  .store-modal__pwa-title {
    margin-top: 4px;
    font-size: 22px;
  }

  .store-modal__pwa-description {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
  }

  .store-modal__steps {
    gap: 6px;
    margin-top: 10px;
  }

  .store-modal__step {
    min-height: 43px;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.35;
  }

  .store-modal__pwa-actions {
    margin-top: 10px;
  }

  .store-modal__pwa-open {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-modal__pwa-view {
    animation: none;
  }

  .store-modal__pwa-open {
    transition: none;
  }
}
