.page-postcard .fants-scene img {
  object-position: center bottom;
}

.page-postcard .star-item[data-star="2"] {
  left: calc(100% * 485 / 1440);
  top: calc(100% * 131 / 750);
}

.page-postcard .star-item[data-star="8"] {
  left: calc(100% * 1316 / 1440);
  top: calc(100% * 252 / 750);
  width: calc(100% * 56 / 1440);
  height: calc(100% * 56 / 750);
}

.page-postcard .star-item[data-star="9"] {
  left: calc(100% * 67 / 1440);
  top: calc(100% * 45 / 750);
  width: calc(100% * 56 / 1440);
  height: calc(100% * 56 / 750);
}

.page-postcard .star-item[data-star="10"] {
  left: calc(100% * 1231 / 1440);
  top: calc(100% * 17 / 750);
  width: calc(100% * 56 / 1440);
  height: calc(100% * 56 / 750);
}

.page-postcard .star-item[data-star="11"] {
  left: calc(100% * 1255 / 1440);
  top: calc(100% * 173 / 750);
  width: calc(100% * 52 / 1440);
  height: calc(100% * 52 / 750);
}

.page-postcard .star-item[data-star="12"] {
  left: calc(100% * 49 / 1440);
  top: calc(100% * 158 / 750);
  width: calc(100% * 52 / 1440);
  height: calc(100% * 52 / 750);
}

.page-postcard .scene {
  overflow: hidden;
}

.page-postcard .footer {
  z-index: 12;
}

.page-postcard .scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  height: 72px;
  background: linear-gradient(
    180deg,
    rgba(125, 105, 172, 0) 0%,
    rgba(125, 105, 172, 0.62) 42%,
    rgb(125, 105, 172) 100%
  );
  pointer-events: none;
}

.postcard-panel {
  position: absolute;
  left: 424px;
  top: 31px;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 585px;
  max-height: none;
  overflow: visible;
}

.postcard-logo {
  width: 90px;
  height: 45px;
  flex-shrink: 0;
  margin-bottom: 20px;
}

.postcard-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 451px;
  margin: 0;
  padding: 0.08em 0 0;
  font-family: "Lorrach BETA", sans-serif;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.postcard-title span {
  display: block;
  overflow: visible;
  background: var(--GOLD-GRAD, linear-gradient(256deg, #cead7c 13.83%, #fff2cb 68.88%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.postcard-title__sm {
  font-size: 34px;
}

.postcard-title__lg {
  font-size: 54px;
}

.postcard-title__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.postcard-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 588px;
  margin: 18px 0 0;
}

.postcard-steps {
  position: absolute;
  left: 0;
  top: 15px;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: 36.4px;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  list-style: none;
}

.postcard-step {
  position: relative;
  width: 36.4px;
  height: 32px;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.postcard-step img {
  position: absolute;
  inset: 0;
  display: block;
  width: 36.4px;
  height: 32px;
  max-width: none;
  pointer-events: none;
  object-fit: fill;
  object-position: center;
}

.postcard-step__on {
  display: none;
}

.postcard-step.is-active .postcard-step__on {
  display: block;
}

.postcard-step.is-active .postcard-step__off {
  display: none;
}

.postcard-envelope {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 583px;
  height: 655px;
}

.postcard-envelope__tex {
  display: none;
}

.postcard-envelope__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 583px;
  min-height: 0;
  margin: 0;
  background: #e4c892;
  overflow: visible;
}

.postcard-envelope__paper {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
  object-fit: cover;
  object-position: top center;
}

.postcard-envelope__pocket {
  position: relative;
  flex-shrink: 0;
  width: 583px;
  height: 148px;
  margin-top: -2px;
  overflow: hidden;
  pointer-events: none;
}

.postcard-envelope__pocket img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: cover;
  object-position: top center;
}

.postcard-form {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 15px 40px 50px;
}

@media (min-width: 769px) and (orientation: landscape), (min-width: 1025px) {
  .postcard-steps {
    left: 0;
    top: 15px;
    z-index: 0;
  }

  .postcard-envelope {
    z-index: 1;
    height: auto;
    min-height: 655px;
    padding-bottom: 0;
    border-radius: 5px 5px 0 0;
    background-image: url("../images/postcard/envelope-gold.webp");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 583px 655px;
    background-clip: border-box;
  }

  .postcard-envelope__body {
    background: transparent;
  }

  .postcard-envelope__paper,
  .postcard-envelope__pocket {
    display: none;
  }

  .postcard-form {
    padding: 15px 40px 70px;
  }

  .postcard-title {
    filter: drop-shadow(0 0 50.494px rgba(233, 219, 178, 0.60));
  }

  .postcard-result {
    padding: calc(72px * var(--scene-scale)) 24px 32px;
    gap: 40px;
  }

  .postcard-result__nav {
    top: calc(40px * var(--scene-scale));
  }

  .page-postcard .postcard-result__back,
  .postcard-result__back {
    gap: calc(10px * var(--scene-scale));
    font-size: calc(16px * var(--scene-scale));
  }

  .postcard-result__back .fants-back__icon {
    width: calc(30px * var(--scene-scale));
    height: calc(30px * var(--scene-scale));
  }

  .postcard-result__card {
    width: min(
      calc(356px * var(--scene-scale)),
      46vw,
      calc((100vh - 200px) * 356 / 498)
    );
  }
}

.postcard-panel-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.postcard-panel-step[hidden] {
  display: none;
}

.postcard-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(125, 105, 172, 0.4);
}

.postcard-card--designs {
  padding-bottom: 10px;
}

.postcard-card--summary {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 8px 10px;
  border-radius: 8px;
}

.postcard-card--wishes {
  gap: 10px;
  border-radius: 8px;
}

.postcard-card--summary .postcard-label {
  flex: 0 0 auto;
}

.postcard-choices {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: auto;
  flex: 0 0 auto;
  min-width: min-content;
}

.postcard-card--summary .postcard-wish-preview {
  flex: 1 1 100%;
}

.postcard-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  flex-shrink: 0;
  height: 30px;
  padding: 0 14px;
  border: 1px solid #472c7c;
  border-radius: 25.611px;
  background: #fff;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
  white-space: nowrap;
}

.postcard-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 16px;
  color: #7d69ac;
}

.postcard-label img {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.postcard-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.postcard-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  flex-shrink: 0;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 25.611px;
  background: #cfc9e1;
  cursor: pointer;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
  white-space: nowrap;
}

span.postcard-chip {
  cursor: default;
}

.postcard-chips--inline {
  flex-direction: row;
}

.postcard-chips--inline .postcard-chip {
  width: auto;
}

.postcard-chip.is-selected,
.postcard-wish.is-selected {
  background: #7d69ac;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.postcard-designs-wrap {
  position: relative;
}

.postcard-designs-hint {
  display: none;
}

.postcard-designs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.postcard-designs::-webkit-scrollbar {
  display: none;
}

.postcard-design {
  box-sizing: border-box;
  flex: 0 0 112px;
  width: 112px;
  height: 157px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 19px;
  background: transparent;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.postcard-design.is-selected {
  border-color: #d7bb8c;
  opacity: 1;
}

.postcard-designs.has-selection .postcard-design:not(.is-selected) {
  opacity: 0.5;
}

.postcard-design img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.postcard-wishes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.postcard-wish {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: #cfc9e1;
  cursor: pointer;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
}

.postcard-wish-preview {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #472c7c;
  border-radius: 10px;
  background: #fff;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
}

.postcard-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.postcard-affix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 25px;
  background: #cfc9e1;
  cursor: pointer;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
  white-space: nowrap;
}

.postcard-affix--add {
  margin-left: auto;
  padding: 0 10px;
}

.postcard-affix[hidden] {
  display: none;
}

.postcard-affix__x {
  display: block;
  width: 10px;
  height: 10px;
}

.postcard-affix__x svg {
  display: block;
  width: 10px;
  height: 10px;
}

.postcard-field input {
  flex: 1;
  min-width: 0;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid #472c7c;
  border-radius: 0;
  background: transparent;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 17px;
  color: #472c7c;
  outline: none;
}

.postcard-field input::placeholder {
  color: #cfc9e1;
}

.postcard-field input.is-invalid {
  border-bottom-color: #c45c6a;
}

.postcard-name-hint {
  margin: 2px 0 0;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  color: #c45c6a;
}

.postcard-name-hint[hidden] {
  display: none;
}

.postcard-card--names {
  gap: 8px;
}

.postcard-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 282px;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 4px;
}

.postcard-actions--single {
  padding-top: 0;
}

.postcard-next,
.postcard-create,
.postcard-result__save {
  gap: 10px;
  min-width: 148px;
}

.postcard-next:disabled,
.postcard-create:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

.postcard-create {
  min-width: 198px;
  padding-inline: 18px;
}

.postcard-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  color: #472c7c;
  -webkit-text-fill-color: #472c7c;
  text-shadow: none;
  white-space: nowrap;
}

.postcard-edit .fants-back__icon {
  color: #472c7c;
}

.postcard-edit .glass-icon__gold,
.postcard-edit:hover .glass-icon__gold,
.postcard-edit:focus-visible .glass-icon__gold {
  opacity: 0;
}

.postcard-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.postcard-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease, visibility 0s;
}

body.is-popup-open .page-postcard .scene > .fants-back {
  visibility: hidden;
}

.postcard-overlay__dim {
  position: absolute;
  inset: 0;
  background: #472c7c;
  opacity: 0.92;
}

.postcard-overlay__stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.postcard-overlay__star {
  position: absolute;
  overflow: visible;
  transform-origin: center;
  animation-name: fant-star-shrink;
  animation-duration: 4s;
  animation-timing-function: cubic-bezier(0.45, 0.05, 0.2, 1);
  animation-iteration-count: infinite;
}

.postcard-overlay__star.gstar {
  animation-delay: 0s;
}

.postcard-overlay__star.star {
  animation-delay: 2s;
}

.postcard-overlay__star img {
  display: block;
  width: 100%;
  height: 100%;
}

.postcard-wait,
.postcard-result {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.postcard-wait {
  padding: 0 24px;
}

.postcard-result {
  opacity: 0;
  pointer-events: none;
}

.postcard-overlay.is-result .postcard-wait {
  opacity: 0;
  pointer-events: none;
}

.postcard-overlay.is-result .postcard-result {
  opacity: 1;
  pointer-events: auto;
}

.postcard-wait__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 19px;
  width: 260px;
  max-width: 100%;
  padding: 30px 14px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(125, 105, 172, 0.4);
}

.postcard-wait__loader {
  width: 30px;
  height: 30px;
  animation: postcard-spin 1.1s linear infinite;
}

.postcard-wait p {
  width: 232px;
  max-width: 100%;
  margin: 0;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  text-align: center;
  color: #7d69ac;
}

.postcard-result {
  padding: 88px 24px 32px;
  gap: 40px;
}

.postcard-result__nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  z-index: 5;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.page-postcard .postcard-result__back,
.postcard-result__back {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  pointer-events: auto;
}

.postcard-overlay.is-result .postcard-result__back {
  display: flex;
}

.postcard-result__card {
  display: block;
  flex: 0 0 auto;
  width: 356px;
  height: auto;
  aspect-ratio: 356 / 498;
  object-fit: contain;
  overflow: hidden;
  border-radius: 15.7px;
  box-shadow: 0 8px 32px rgba(32, 16, 64, 0.28);
}

.postcard-result__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.postcard-result__new {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Congenial Cyrillic BETA", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.postcard-result__new:hover,
.postcard-result__new:focus-visible {
  opacity: 0.85;
}

.postcard-result__plus {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.2);
}

.postcard-result__spark {
  position: absolute;
  display: block;
}

.postcard-result__spark--lg {
  left: 7px;
  top: 7px;
}

.postcard-result__spark--sm {
  left: 14px;
  top: 14px;
}

.postcard-result__save {
  width: auto;
  min-width: 143px;
  flex: 0 0 auto;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-text-fill-color: #fff;
}

@keyframes postcard-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .page-postcard .fants-scene {
    inset: 0;
    height: auto;
  }

  .page-postcard .fants-scene img {
    object-position: center top;
  }

  .page-postcard .scene-scaler {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .page-postcard .scene {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
    transform: none;
  }

  .page-postcard .scene::after {
    display: none;
  }

  .page-postcard .footer-mob {
    position: relative;
    z-index: 12;
  }

  .page-postcard .fants-back:not(.postcard-result__back) {
    left: max(16px, env(safe-area-inset-left));
    top: max(16px, env(safe-area-inset-top));
    z-index: 11;
  }

  .postcard-panel {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    transform: none;
    padding-top: calc(max(16px, env(safe-area-inset-top)) + 46px);
    padding-bottom: 8px;
  }

  .postcard-logo {
    width: 108px;
    height: 53px;
    margin-bottom: 20px;
  }

  .postcard-title {
    width: min(269px, 100%);
    gap: 0;
    margin-bottom: 0;
    padding: 0.08em 0 0;
    font-size: 40px;
    line-height: 1;
  }

  .postcard-title__stack {
    gap: 0;
  }

  .postcard-title__sm,
  .postcard-title__lg {
    font-size: 40px;
    line-height: 1;
    padding-top: 0;
  }

  .postcard-stage {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(500px, calc(100% - 20px));
    margin: 24px 0 0;
    transform: none;
  }

  .postcard-steps {
    position: relative;
    left: auto;
    top: auto;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    width: 129px;
    height: 32px;
    margin: 0 auto;
  }

  .postcard-envelope {
    width: 100%;
    height: auto;
  }

  .postcard-envelope__body {
    flex: none;
    width: calc(100% - 30px);
    margin: 0 auto;
  }

  .postcard-envelope__tex {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 0;
    width: calc(100% + 30px);
    max-width: none;
    height: 48px;
    transform: translateX(-50%);
    pointer-events: none;
    object-fit: fill;
  }

  .postcard-form {
    padding: 10px 12px 12px;
  }

  .postcard-envelope__pocket {
    width: 100%;
    height: auto;
    margin-top: 0;
    aspect-ratio: 340 / 186;
  }

  .postcard-actions {
    width: auto;
  }

  .postcard-envelope__pocket img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .postcard-card--summary {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
  }

  .postcard-card--summary .postcard-label,
  .postcard-card--summary .postcard-wish-preview {
    flex: none;
  }

  .postcard-choices {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }

  .postcard-choice {
    width: 100%;
  }

  .postcard-chips {
    flex-direction: column;
  }

  .postcard-chip {
    width: 100%;
    height: 30px;
    color: #472c7c;
    -webkit-text-fill-color: #472c7c;
  }

  .postcard-chip.is-selected {
    color: #fff;
    -webkit-text-fill-color: #fff;
  }

  .postcard-chips--inline {
    flex-direction: row;
  }

  .postcard-chips--inline .postcard-chip {
    width: auto;
  }

  .postcard-designs-wrap {
    width: calc(100% + 14px);
    max-width: none;
    margin-right: -14px;
  }

  .postcard-designs-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 42px;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 78%);
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .postcard-designs-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 2px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(71, 44, 124, 0.22);
    color: #7d69ac;
    pointer-events: none;
    transform: translateY(-50%);
    animation: postcard-swipe-hint 1.2s ease-in-out infinite;
  }

  .postcard-designs-wrap.is-hint-hidden::after,
  .postcard-designs-wrap.is-hint-hidden .postcard-designs-hint {
    opacity: 0;
  }

  .postcard-design {
    flex: 0 0 112px;
    width: 112px;
    height: 157px;
    border-radius: 19px;
  }

  .postcard-edit {
    color: #472c7c;
  }

  .postcard-create {
    min-width: 148px;
    white-space: nowrap;
  }

  .postcard-result {
    padding:
      calc(80px + max(16px, env(safe-area-inset-top)))
      max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .postcard-result__nav {
    top: max(50px, calc(env(safe-area-inset-top) + 16px));
  }

  .page-postcard .postcard-result__back,
  .postcard-result__back {
    position: static;
    left: auto;
    top: auto;
    transform: none;
  }

  .postcard-result__card {
    width: min(290px, 78vw, calc((100dvh - 240px) * 356 / 498));
  }

  .postcard-result__actions {
    flex-direction: column;
    width: auto;
    max-width: 100%;
    align-items: center;
  }

  .postcard-result__save {
    width: auto;
    min-width: 143px;
  }
}

@keyframes postcard-swipe-hint {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }

  50% {
    transform: translateY(-50%) translateX(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .postcard-overlay,
  .postcard-wait,
  .postcard-result,
  .postcard-wait__loader,
  .postcard-overlay__star,
  .postcard-designs-hint {
    animation: none;
    transition: none;
  }
}
