html:has(.participation-sheet[open]) {
  overflow: hidden;
}

.participation-sheet {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(100% - 3rem, 27rem);
  max-width: none;
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #faf7fc;
  color-scheme: dark;
  background: radial-gradient(
      ellipse 68% 82% at 88% 3%,
      #2b1a48,
      #231632 38%,
      transparent
    ), linear-gradient(#17111f, #100d15);
  border: 1px solid #ffffff26;
  border-radius: 24px;
  box-shadow: 0 20px 80px #0008;
  font-family: Inter, system-ui, sans-serif;
}

.participation-sheet:not([open]) {
  display: none;
}

.participation-sheet[open] {
  display: flex;
  flex-direction: column;
}

.participation-sheet::backdrop {
  background: #0a070ed1;
}

.participation-sheet__panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.participation-sheet__grip {
  display: none;
}

.participation-sheet__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem 0;
}

.participation-sheet__header img {
  height: auto;
}

.participation-sheet__close {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  padding: 0;
  color: inherit;
  background: #ffffff0e;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.participation-sheet__content {
  min-height: 0;
  padding: 0.75rem 1.5rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}

.participation-sheet__content h2 {
  margin: 0;
  font-size: clamp(1.45rem, 6.5vw, 1.875rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.participation-sheet__content p {
  margin: 0.5rem 0 0;
  color: #d7c9df;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.participation-sheet__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1.25rem 0 1rem;
}

.participation-sheet__stores a {
  display: grid;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  border-radius: 7px;
}

.participation-sheet__stores img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
}

.participation-sheet__open-app {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  color: #e2d6e9;
  background: #ffffff08;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: start;
  text-decoration: none;
}

.participation-sheet__open-app span {
  flex: 1;
}

.participation-sheet__open-app strong {
  color: #e1c8ff;
  font-weight: 600;
  white-space: nowrap;
}

.participation-sheet__open-app svg {
  flex: none;
  color: #e1c8ff;
}

.participation-sheet__close:hover,
.participation-sheet__open-app:hover {
  background: #ffffff1a;
}

.participation-sheet__stores a:hover {
  opacity: 0.85;
}

.participation-sheet :is(a, button):focus-visible {
  outline: 2px solid #d8b4fe;
  outline-offset: 3px;
}

@media (width > 767px) {
  .participation-sheet__close,
  .participation-sheet__close:hover {
    color: #decee6;
    background: transparent;
  }

  .participation-sheet__close::before {
    position: absolute;
    width: 28px;
    height: 28px;
    background: #ffffff0b;
    border-radius: 50%;
    content: "";
  }

  .participation-sheet__close:hover::before {
    background: #ffffff1a;
  }

  .participation-sheet__close svg {
    z-index: 1;
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 767px) {
  .participation-sheet {
    inset-block-start: auto;
    width: min(100%, 34rem);
    max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)));
    margin-block: 0;
    border-radius: 24px 24px 0 0;
    transform: translateY(var(--sheet-offset, 0px));
  }

  @media (prefers-reduced-motion: no-preference) {
    .participation-sheet:not([style*="--sheet-offset"]) {
      transition: transform 160ms ease-out;
    }
  }

  .participation-sheet__grip {
    display: grid;
    height: 30px;
    flex: none;
    place-items: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .participation-sheet__grip::before {
    width: 36px;
    height: 4px;
    background: #a48caf;
    border-radius: 4px;
    content: "";
  }

  .participation-sheet__header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    padding: 0 1rem;
  }

  .participation-sheet__header img {
    grid-column: 2;
    justify-self: center;
  }

  .participation-sheet__close {
    grid-column: 3;
  }

  .participation-sheet__content {
    padding: 0.5rem 1rem max(1.25rem, env(safe-area-inset-bottom));
    text-align: center;
  }

  .participation-sheet__stores {
    justify-content: center;
  }
}
