body {
  --main-padding: 32px;

  @media (width >= 1320px) {
    --main-padding: 72px;
  }
}

.main {
  position: relative;
  width: var(--card-width);
  padding: 24px var(--main-padding) env(safe-area-inset-bottom, 0) var(--main-padding);
  background: var(--surface-1);
  border-radius: 36px;

  @media (width < 830px) {
    box-sizing: border-box;
    width: 100%;
    padding-top: 0;
    border-radius: 36px 36px 0 0;
    box-shadow:
      0 0 2px var(--surface-2-shadow),
      0 0 18px var(--surface-2-shadow);

    @supports (backdrop-filter: blur(24px)) {
      background: var(--surface-2);
      backdrop-filter: blur(24px);
    }
  }
}

.main_expand {
  @media (width >= 830px) {
    display: none;
  }

  @media (width < 830px) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    user-select: none;
    background: transparent;
    border: none;
  }
}

.main_expand::before {
  @media (width < 830px) {
    display: block;
    width: 32px;
    height: 4px;
    content: "";
    background: var(--surface-ui-regular);
    border-radius: 2px;
  }
}

.main_row {
  margin-bottom: 24px;
}

.main_row--sample {
  :is(body.is-main-collapsed) & {
    margin-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  }
}

.main_footer {
  padding-bottom: 46px;
  font-size: 11.25px;
  line-height: 18px;
  color: var(--text-secondary);
  text-align: center;
}

.main_link {
  font-weight: bold;
  color: inherit;
  text-decoration: none;

  &:focus {
    text-decoration: none;
    border-radius: 2px;
    outline-offset: 2px;
  }
}

.main:has(.main_logo:hover) .main_link.is-em,
.main_link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.main_logo-icon {
  width: 100%;
  height: 100%;
}

.main_logo {
  position: absolute;
  bottom: env(safe-area-inset-bottom, 0);
  left: 50%;
  width: 96px;
  height: 38px;
  padding-top: 10px;
  color: var(--surface-ui-regular);
  transform: translateX(-50%);
}

.main_logo:hover,
.main:has(.main_link.is-em:is(:hover, :focus)) .main_logo {
  color: var(--accent);
}

.main_logo::before,
.main_logo::after {
  position: absolute;
  bottom: 8px;
  display: none;
  width: 22px;
  height: 10px;
  content: "";
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center top;
  animation-name: --main-blinking;
  animation-play-state: paused;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.main_logo::before {
  left: 15px;
  animation-duration: 3.7s;
}

.main_logo::after {
  right: 15px;
  animation-duration: 2.9s;
  animation-delay: 0.7s;
}

.main_logo:hover::before,
.main_logo:hover::after {
  display: block;
  animation-play-state: running;

  @media (width < 830px) {
    display: none;
  }
}

@keyframes --main-blinking {
  6% {
    transform: scaleY(0);
  }

  9% {
    transform: scaleY(1);
  }

  12% {
    transform: scaleY(0);
  }
}
