/* ============================================================
   МРВ 2026 — главная страница
   Композиция: фон → декор → центральная колонка → пергамент с формой
   ============================================================ */

body.home {
  --u: clamp(12.85px, min(1vw, 1.7vh), 18.9px);
  --paper-w: clamp(380px, calc(var(--u) * 28.5), 540px);
  --strip-h: clamp(112px, 16vh, 190px);
  --ink: #4e3b2e;
  --muted: #8d705c;
  --burgundy: #7d2230;
  --cream: #f6ead8;
  background: #163228;
  color: var(--cream);
}

body.home .bg {
  background: #163228 url("/image/bg.jpg") center / cover no-repeat;
}

body.home .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0) 38%, rgba(3, 14, 10, 0.26) 100%),
    linear-gradient(180deg, rgba(3, 15, 10, 0.12), transparent 24%, transparent 82%, rgba(3, 15, 10, 0.1));
}

body.home .scene {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

body.home .home-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

body.home .home-decor img {
  pointer-events: none;
  user-select: none;
}

/* ---------- красная бумага сверху ---------- */

body.home .top-red {
  position: absolute;
  z-index: 1;
  width: calc(var(--u) * 84);
  height: auto;
  left: calc(var(--u) * -30);
  top: calc(var(--u) * -23.7);
  transform: none;
  transform-origin: 0 0;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.22));
}

/* ---------- красная бумага снизу ----------
   Два крупных фрагмента PNG в естественных пропорциях.
   Левый задаёт длинный спуск к центру, правый (зеркальный)
   поднимается к правому краю, как в референсе. */

body.home .bottom-red-wrap {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  pointer-events: none;
}

body.home .bottom-red {
  position: absolute;
  bottom: calc(var(--u) * -8.2);
  height: auto;
  width: calc(var(--u) * 60);
  max-width: none;
  filter: drop-shadow(0 -8px 12px rgba(0, 0, 0, 0.16));
}

body.home .br-left {
  left: -2vw;
  transform: rotate(-5deg);
  transform-origin: 50% 80%;
  -webkit-mask-image: linear-gradient(90deg, #000 0 90%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 90%, transparent 100%);
}

body.home .br-right {
  right: -2vw;
  bottom: calc(var(--u) * -4);
  transform: scaleX(-1) rotate(6deg);
  transform-origin: 50% 80%;
  -webkit-mask-image: linear-gradient(270deg, #000 0 90%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 0 90%, transparent 100%);
}

/* ---------- подарки и лента ---------- */

body.home .gift {
  position: absolute;
  z-index: 3;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.28));
}

body.home .gift-bottom-wrap {
  display: contents;
}

body.home .gift-top {
  width: clamp(270px, 19.5vw, 380px);
  left: clamp(-96px, -4.6vw, -44px);
  top: clamp(-76px, -5.4vh, -38px);
}

body.home .gift-bottom {
  width: clamp(220px, 15.6vw, 305px);
  right: clamp(-92px, -4.6vw, -42px);
  bottom: clamp(-66px, -5.6vh, -28px);
  transform: rotate(4deg);
  transform-origin: 100% 100%;
}

body.home .ribbon {
  position: absolute;
  z-index: 2;
  width: clamp(270px, 24vw, 470px);
  height: auto;
  right: -2.2vw;
  top: 22.3%;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.26));
}

/* ---------- звёзды ---------- */

body.home .star {
  position: absolute;
  z-index: 2;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(231, 201, 138, 0.28));
}

body.home .s1  { width: 2.45vw; left: 48.74%; top: 2.34%; }
body.home .s2  { width: 1.73vw; left: 68.72%; top: 7.23%; }
body.home .s3  { width: 3.29vw; left: 91.99%; top: 9.14%; }
body.home .s4  { width: 2.15vw; left: 27.45%; top: 14.67%; }
body.home .s5  { width: 1.32vw; left: 71.47%; top: 15.83%; }
body.home .s6  { width: 2.33vw; left: 15.25%; top: 23.38%; }
body.home .s7  { width: 2.33vw; left: 75.18%; top: 24.76%; }
body.home .s8  { width: 1.5vw;  left: 66.03%; top: 34.54%; }
body.home .s9  { width: 2.39vw; left: 27.03%; top: 37.73%; }
body.home .s10 { width: 2.45vw; left: 14.05%; top: 43.15%; }
body.home .s11 { width: 3.05vw; left: 72.07%; top: 48.46%; }
body.home .s12 { width: 2.75vw; left: 7.72%;  top: 58.55%; }
body.home .s13 { width: 1.67vw; left: 29.84%; top: 61.32%; }
body.home .s14 { width: 1.67vw; left: 24.52%; top: 70.35%; }
body.home .s15 { width: 1.5vw;  left: 87.2%;  top: 70.56%; }
body.home .s16 { width: 1.2vw;  left: 12.08%; top: 71.31%; }
body.home .s17 { width: 2.03vw; left: 73.68%; top: 73.22%; }
body.home .s18 { width: 1.32vw; left: 71.41%; top: 86.29%; }
body.home .s19 { width: 0.9vw;  left: 5.8%;   top: 22.6%; opacity: 0.85; }
body.home .s20 { width: 1vw;    left: 83.6%;  top: 22.2%; opacity: 0.85; }
body.home .s21 { width: 1.05vw; left: 80.3%;  top: 39.6%; opacity: 0.8; }
body.home .s22 { width: 0.9vw;  left: 3.5%;   top: 49.2%; opacity: 0.8; }

/* ---------- центральная колонка ---------- */

body.home .invite {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(46px, 8vh, 96px) 16px clamp(18px, 4vh, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.home .invite-head {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- бумажная плашка «Регистрация» ---------- */

body.home .reg-strip {
  position: relative;
  display: block;
  width: min(calc(var(--paper-w) * 0.765), 24.5vw);
  aspect-ratio: 545 / 153;
  margin: 0;
  padding: 0;
  background: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.24));
}

body.home .reg-strip-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

body.home .reg-strip span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-top: 1%;
  color: #5a3c2a;
  font-family: Tinos, "Times New Roman", serif;
  font-size: calc(var(--paper-w) * 0.083);
  line-height: 1;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 0 rgba(255, 242, 220, 0.28);
  transform: none;
}

/* ---------- заголовок ---------- */

body.home .invite-title {
  display: block;
  width: 100%;
  margin: calc(var(--paper-w) * -0.035) 0 0;
  font-weight: 400;
  text-align: center;
  line-height: 1;
}

body.home .line-youth,
body.home .line-evening {
  display: block;
  color: #f4e7d2;
  font-family: Tinos, "Times New Roman", serif;
  font-weight: 400;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  letter-spacing: 0.004em;
}

body.home .line-youth {
  font-size: calc(var(--paper-w) * 0.112);
  line-height: 0.92;
  letter-spacing: 0.012em;
}

body.home .line-script {
  display: block;
  margin: calc(var(--paper-w) * -0.01) 0 calc(var(--paper-w) * -0.027);
  color: #f3e0c2;
  font-family: "Good Vibes Pro", "Segoe Script", cursive;
  font-size: calc(var(--paper-w) * 0.212);
  font-weight: 400;
  line-height: 0.74;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

body.home .line-evening {
  margin-top: calc(var(--paper-w) * -0.012);
  font-size: calc(var(--paper-w) * 0.148);
  line-height: 0.86;
}

/* ---------- дата и время ---------- */

body.home .when-art {
  display: block;
  width: min(calc(var(--paper-w) * 0.775), 25vw);
  height: auto;
  margin: calc(var(--paper-w) * 0.012) auto 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

/* ---------- пергамент и форма ---------- */

body.home .registration-form {
  --paper-panel-inset: 12.5% 15.63% 12.5% 14.37%;
  position: relative;
  z-index: 5;
  width: var(--paper-w);
  aspect-ratio: 600 / 634;
  margin: calc(var(--paper-w) * 0.028) auto 0;
  container-type: inline-size;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32));
}

body.home .registration-form::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: var(--paper-panel-inset);
  background: #e4c8a9;
  pointer-events: none;
}

body.home .paper-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

body.home .paper-content {
  position: absolute;
  z-index: 2;
  inset: var(--paper-panel-inset);
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

body.home #reg-form {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 2cqw 2.75cqw;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 2.5cqw, 10px);
}

body.home #reg-form[hidden],
body.home .pay-step[hidden] {
  display: none !important;
}

/* ---------- поля ---------- */

body.home .field {
  position: relative;
  flex: 0 0 clamp(30px, 8.5cqw, 38px);
  height: clamp(30px, 8.5cqw, 38px);
  min-height: 0;
  margin: 0;
}

body.home .field > label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 3cqw;
  background: linear-gradient(180deg, rgba(202, 157, 108, 0.22), rgba(166, 116, 70, 0.2));
  border: 1px solid rgba(112, 77, 48, 0.5);
  border-radius: 2.4cqw;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 225, 0.18),
    inset 0 -1px 2px rgba(100, 65, 37, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.home .field > label:focus-within {
  border-color: rgba(102, 66, 39, 0.72);
  background: linear-gradient(180deg, rgba(213, 173, 128, 0.3), rgba(174, 125, 77, 0.27));
}

body.home .field.invalid > label {
  border-color: rgba(125, 34, 48, 0.85);
  background: linear-gradient(180deg, rgba(255, 246, 236, 0.72), rgba(246, 218, 205, 0.6));
}

body.home .field-icon {
  width: clamp(13px, 4.8cqw, 19px);
  height: clamp(13px, 4.8cqw, 19px);
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.9;
}

body.home .field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  color-scheme: light;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(14px, 4.4cqw, 18px);
  line-height: 1;
}

body.home .field input::placeholder {
  color: #76583f;
  opacity: 1;
}

body.home .field-error {
  position: absolute;
  left: 2cqw;
  top: calc(100% + 1px);
  z-index: 3;
  max-width: 96%;
  min-height: 0;
  margin: 0;
  padding: 0 3px;
  background: rgba(244, 231, 210, 0.94);
  color: #8a2432;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, 2.4cqw, 12px);
  line-height: 1.1;
  pointer-events: none;
}

body.home .field-error:empty {
  display: none;
}

/* ---------- кнопка ---------- */

body.home .submit {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(42px, calc(var(--paper-w) * 0.103), 53px);
  min-height: 42px;
  margin: clamp(5px, calc(var(--paper-w) * 0.016), 10px) 0 0;
  padding: 0 calc(var(--paper-w) * 0.04);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f2635 0%, #68101f 100%);
  color: #f8ead7;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(17px, calc(var(--paper-w) * 0.043), 23px);
  line-height: 1;
  box-shadow:
    0 10px 18px rgba(70, 12, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body.home .submit-icon {
  width: clamp(13px, calc(var(--paper-w) * 0.03), 17px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

body.home #reg-form .submit {
  flex: 0 0 auto;
  height: clamp(42px, 12cqw, 53px);
  min-height: 42px;
  margin: auto 0 0;
  padding: 0 5.5cqw;
  background: #69110B;
  box-shadow: 0 10px 18px rgba(70, 12, 20, 0.28);
  font-size: clamp(17px, 5.5cqw, 23px);
}

body.home #reg-form .submit:hover {
  filter: none;
}

body.home #reg-form .submit-icon {
  width: clamp(13px, 3.6cqw, 17px);
}

/* ---------- ошибка формы ---------- */

body.home .form-error {
  min-height: 0;
  margin: 0;
  padding: 2px 4px 0;
  color: #8a2432;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, calc(var(--paper-w) * 0.026), 13px);
  line-height: 1.2;
}

body.home .form-error[hidden] {
  display: none;
}

body.home #reg-form .consent-row {
  flex: 0 0 auto;
  min-width: 0;
  margin-top: auto;
}

body.home #reg-form .submit {
  margin: 0;
}

body.home #reg-form .consent-check {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 2.4cqw;
  color: var(--muted);
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, 3cqw, 12px);
  line-height: 1.2;
  cursor: pointer;
}

body.home #reg-form .consent-check input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin: 1px 0 0;
  padding: 0;
  appearance: none;
  display: grid;
  place-content: center;
  border: 1px solid rgba(112, 77, 48, 0.5);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(202, 157, 108, 0.22), rgba(166, 116, 70, 0.2));
  cursor: pointer;
}

body.home #reg-form .consent-check input::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid #f8ead7;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
}

body.home #reg-form .consent-check input:checked {
  border-color: #69110B;
  background: #69110B;
}

body.home #reg-form .consent-check input:checked::after {
  transform: rotate(45deg) scale(1);
}

body.home #reg-form .consent-check input:focus-visible {
  outline: 2px solid rgba(105, 17, 11, 0.45);
  outline-offset: 2px;
}

body.home #reg-form .consent-row.invalid .consent-check {
  color: #8a2432;
}

body.home #reg-form .consent-error {
  max-width: calc(100% - 2.4cqw - 15px);
  margin: 2px 0 0 calc(15px + 2.4cqw);
  padding: 0;
  color: #8a2432;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, 2.6cqw, 12px);
  line-height: 1.1;
}

body.home #reg-form .consent-error[hidden] {
  display: none;
}

body.home #reg-form.consent-invalid {
  gap: 2px;
}

/* ---------- шаг оплаты ---------- */

body.home .pay-step {
  width: 100%;
  height: 100%;
  padding: 0 2.75cqw 2cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: clamp(3px, 1.1cqw, 6px);
}

body.home .pay-title {
  margin: 0;
  color: #5b3d2b;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(22px, 6.3cqw, 34px);
  font-weight: 400;
  line-height: 1;
}

body.home .pay-subtitle {
  max-width: 100%;
  margin: 0;
  color: #6d5646;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(11px, 4.1cqw, 16px);
  line-height: 1.15;
}

body.home .pay-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  justify-items: center;
  gap: clamp(6px, 3cqw, 18px);
}

body.home .pay-prices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 4.5cqw, 26px);
}

body.home .pay-price {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.home .pay-amount {
  color: #5b3d2b;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(26px, 13cqw, 46px);
  line-height: 1;
}

body.home .pay-period {
  margin-top: clamp(2px, 1.2cqw, 6px);
  color: #6d5646;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(11px, 5cqw, 18px);
  line-height: 1.1;
  white-space: nowrap;
}

body.home .pay-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1.8cqw, 9px);
}

body.home .qr-frame {
  width: clamp(88px, 42cqw, 165px);
  aspect-ratio: 1;
  margin: 0;
  padding: 7px;
  display: grid;
  place-items: center;
  background: #fffaf2;
  border-radius: calc(var(--paper-w) * 0.025);
  box-shadow: 0 8px 18px rgba(90, 60, 30, 0.18);
}

body.home .qr-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

body.home .qr-missing {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1.5px dashed #b89a7e;
  border-radius: 6px;
  background: #fbf3e6;
  color: #8d705c;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(13px, calc(var(--paper-w) * 0.034), 17px);
  line-height: 1.15;
}

body.home .qr-missing[hidden] {
  display: none;
}

body.home .qr-missing img {
  width: 30px;
  height: auto;
  opacity: 0.8;
}

body.home .pay-link-text {
  margin: 0;
  color: #6d5646;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(11px, 3cqw, 15px);
  line-height: 1.15;
}

body.home .pay-link-text a {
  color: #7d2230;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.home .payment-upload {
  position: relative;
  width: 100%;
  min-width: 0;
  height: clamp(34px, 8vw, 40px);
}

body.home .payment-upload-trigger,
body.home .payment-upload-selected {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed rgba(112, 77, 48, 0.48);
  border-radius: 7px;
  background: rgba(228, 200, 169, 0.34);
  color: #6d5646;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(11px, 3.8cqw, 14px);
  line-height: 1;
}

body.home .payment-upload-trigger {
  cursor: pointer;
}

body.home .payment-upload-trigger[hidden] {
  display: none;
}

body.home .payment-upload-trigger:hover,
body.home .payment-replace:hover {
  color: #69110B;
  border-color: rgba(105, 17, 11, 0.65);
}

body.home .payment-upload-trigger:disabled,
body.home .payment-replace:disabled {
  opacity: 0.65;
  cursor: progress;
}

body.home .upload-mark {
  color: #69110B;
  font-size: 18px;
  line-height: 1;
}

body.home .payment-upload-selected {
  justify-content: flex-start;
  border-style: solid;
}

body.home .payment-upload-selected[hidden] {
  display: none;
}

body.home .payment-file-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #4e3b2e;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.home .payment-replace {
  flex: 0 0 auto;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: #7d2230;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, 3cqw, 12px);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

body.home #pay-error {
  width: 100%;
  min-height: 14px;
  margin: 0;
  padding: 0;
  color: #8a2432;
  font-family: Tinos, "Times New Roman", serif;
  font-size: clamp(10px, 2.4cqw, 12px);
  line-height: 1.1;
}

body.home #pay-error[hidden] {
  display: none;
}

body.home .pay-step.payment-error-visible {
  gap: 2px;
}

body.home #paid-button {
  width: 100%;
  margin: 0;
  background: #69110B;
}

body.home #paid-button:hover,
body.home #paid-button:focus-visible {
  background: #69110B;
  filter: none;
}

body.home #paid-button:disabled {
  background: #69110B;
  opacity: 1;
  cursor: progress;
  box-shadow: inset 0 0 0 2px rgba(248, 234, 215, 0.45);
}

/* ============================================================
   Планшет и телефон
   ============================================================ */

@media (max-width: 899px) {
  body.home {
    --paper-w: 93vw;
  }

  body.home .scene {
    min-height: max(100vh, 183.844vw);
    min-height: max(100svh, 183.844vw);
  }

  body.home .home-decor {
    inset: auto;
    left: 50%;
    top: 0;
    right: auto;
    bottom: auto;
    width: 122.56vw;
    height: 183.844vw;
    overflow: visible;
    transform: translateX(-50%);
  }

  body.home .invite {
    position: absolute;
    left: 50%;
    top: 0;
    width: 122.56vw;
    height: 183.844vw;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
    transform: translateX(-50%);
  }

  body.home .invite-head {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-align: left;
  }

  body.home .top-red {
    left: -54.3945%;
    top: -21.3542%;
    width: 132.2266%;
    height: 69.401%;
    max-width: none;
    object-fit: contain;
    transform: none;
    filter: none;
  }

  body.home .gift-top {
    left: -42.996%;
    top: -22.738%;
    width: 87.98%;
    height: 40.67%;
    object-fit: contain;
    transform: none;
    filter: none;
  }

  body.home .gift-bottom {
    left: 58.8867%;
    top: 83.5938%;
    right: auto;
    bottom: auto;
    width: 63.4766%;
    height: 39.6901%;
    object-fit: contain;
    transform: none;
    filter: none;
  }

  body.home .gift-bottom-wrap {
    display: block;
    position: absolute;
    left: 0;
    top: auto;
    right: auto;
    bottom: calc(100% - 100vh);
    bottom: calc(100% - 100svh);
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body.home .ribbon {
    display: block;
    left: 79.3%;
    top: 32.9427%;
    right: auto;
    bottom: auto;
    width: 24.25%;
    height: 22.6%;
    object-fit: contain;
    transform: none;
    filter: none;
  }

  body.home .bottom-red-wrap {
    left: 0;
    top: auto;
    right: auto;
    bottom: calc(100% - 100vh);
    bottom: calc(100% - 100svh);
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body.home .bottom-red {
    left: -17.3828%;
    top: 83.138%;
    bottom: auto;
    right: auto;
    width: 123.6328%;
    height: auto;
    max-width: none;
    transform: none;
    filter: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  body.home .br-left {
    left: -17.3828%;
    top: 83.138%;
    bottom: auto;
    transform: none;
  }

  body.home .br-right {
    display: none;
  }

  body.home .reg-strip {
    position: absolute;
    left: 24.6094%;
    top: 12.6953%;
    width: 53.2227%;
    height: 9.9609%;
    aspect-ratio: auto;
    margin: 0;
    filter: none;
  }

  body.home .reg-strip span {
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 8vw;
    line-height: 1;
    white-space: nowrap;
    transform: none;
  }

  body.home .invite-title {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: left;
  }

  body.home .title-copy {
    position: absolute;
    inset: 0;
    transform: scale(0.845);
    transform-origin: 52.88% 28.2868%;
  }

  body.home .line-youth {
    position: absolute;
    left: 28.16%;
    top: 19.987%;
    width: 44.7266%;
    height: 5.9245%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9.45vw;
    line-height: 1;
    white-space: nowrap;
  }

  body.home .line-script {
    position: absolute;
    left: 12.1094%;
    top: 24.2188%;
    width: 75.8789%;
    height: 9.2448%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17.35vw;
    line-height: 1;
    white-space: nowrap;
  }

  body.home .line-evening {
    position: absolute;
    left: 49.1486%;
    top: 30.6301%;
    width: 20.4102%;
    height: 6.7057%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.7vw;
    line-height: 1;
    white-space: nowrap;
  }

  body.home .when-art {
    position: absolute;
    left: 24.2188%;
    top: 38.2813%;
    width: 51.2695%;
    height: 4.6224%;
    margin: 0;
    object-fit: contain;
    filter: none;
  }

  body.home .registration-form {
    position: absolute;
    left: 12.1094%;
    top: 43.8802%;
    width: 75.8789%;
    height: auto;
    aspect-ratio: 600 / 634;
    margin: 0;
  }

  body.home .field-error {
    font-size: 10px;
  }

  body.home .field {
    flex: 0 0 40px;
    height: 40px;
  }

  body.home .star {
    display: block;
  }

  /* звёзды в мобильной композиции */

  body.home .s1  { width: 6.1vw; left: 47.5%; top: 8.5%; }
  body.home .s2  { width: 2.8vw; left: 81.8%; top: 10.9%; }
  body.home .s3  { width: 2.3vw; left: 93.3%; top: 15.2%; }
  body.home .s4  { width: 2.3vw; left: 84.8%; top: 21.5%; }
  body.home .s5  { width: 2.8vw; left: 6.2%;  top: 27.1%; }
  body.home .s6  { width: 2.8vw; left: 75.4%; top: 33.5%; }
  body.home .s7  { width: 2.8vw; left: 26.4%; top: 34.7%; }
  body.home .s8  { width: 3.9vw; left: 59.6%; top: 40.6%; }
  body.home .s9  { width: 3.3vw; left: 29.8%; top: 40.6%; }
  body.home .s10 { width: 2.8vw; left: 11.8%; top: 41.6%; }
  body.home .s11 { width: 2.8vw; left: 5.6%;  top: 52%; }
  body.home .s12 { width: 2.8vw; left: 92%;   top: 60%; }
  body.home .s13 { width: 2.8vw; left: 4%;    top: 67%; }
  body.home .s14 { width: 2.8vw; left: 94%;   top: 71%; }
  body.home .s15 { width: 2.8vw; left: 7%;    top: 80%; }
  body.home .s16 { width: 2.8vw; left: 91%;   top: 80%; }
  body.home .s17,
  body.home .s18,
  body.home .s19,
  body.home .s20,
  body.home .s21,
  body.home .s22 { display: none; }

  body.home .s1 {
    left: 45.9961%;
    top: 6.3802%;
    width: 9.1797%;
    height: 6.3802%;
    object-fit: contain;
  }
}

@media (max-width: 420px) {
  body.home .field {
    flex: 0 0 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.home .star {
    animation: twinkle 4.2s ease-in-out infinite;
  }

  body.home .s2,
  body.home .s6,
  body.home .s10,
  body.home .s14,
  body.home .s18,
  body.home .s22 { animation-delay: -1.5s; }

  body.home .s3,
  body.home .s7,
  body.home .s11,
  body.home .s15,
  body.home .s19 { animation-delay: -2.4s; }

  body.home .s4,
  body.home .s8,
  body.home .s12,
  body.home .s16,
  body.home .s20 { animation-delay: -3.2s; }
}

/* ============================================================
   Desktop Figma frame: 1920×1080
   One uniformly-scaled 16:9 stage; all listed coordinates are
   percentages of this frame. Mobile rules above are unchanged.
   ============================================================ */

@media (min-width: 900px) {
  body.home {
    --u: max(1vw, 1.7777778vh);
  }

  body.home .bg {
    background: #163228 url("/image/bg.png") center / cover no-repeat;
  }

  body.home .home-decor,
  body.home .invite {
    position: absolute;
    inset: auto;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: calc(var(--u) * 100);
    height: calc(var(--u) * 56.25);
    min-height: 0;
    transform: translate(-50%, -50%);
  }

  body.home .home-decor {
    overflow: hidden;
  }

  body.home .invite {
    margin: 0;
    padding: 0;
    display: block;
  }

  body.home .invite-head {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-align: left;
  }

  body.home .top-red {
    left: -8.958333%;
    top: calc(-16.491667% - var(--u) * 1.041667);
    width: 55.829167%;
    height: 50.559259%;
    max-width: none;
    object-fit: contain;
    transform: rotate(2.04deg);
    transform-origin: 50% 50%;
    filter: none;
  }

  body.home .bottom-red-wrap {
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body.home .bottom-red {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 65.9375%;
    height: 39.074074%;
    max-width: none;
    object-fit: contain;
    filter: none;
    -webkit-mask-image: none;
    mask-image: none;
    transform-origin: 50% 50%;
  }

  body.home .br-left {
    left: -8.958333%;
    top: 65.740741%;
    transform: rotate(4.49deg);
  }

  body.home .br-right {
    left: 50.383333%;
    top: 70.5%;
    right: auto;
    bottom: auto;
    transform: scaleX(-1) rotate(4.49deg);
  }

  body.home .gift {
    filter: none;
    object-fit: contain;
  }

  body.home .gift-top {
    left: -31.09375%;
    top: -32.962963%;
    width: 54.895833%;
    height: 67.777778%;
    transform: none;
  }

  body.home .gift-bottom {
    left: 74.322917%;
    top: 64.814815%;
    right: auto;
    bottom: auto;
    width: 40.517708%;
    height: 70.557407%;
    transform: rotate(4.46deg);
    transform-origin: 50% 50%;
  }

  body.home #reg-form .field {
    flex: 0 0 calc(var(--u) * 2.916667);
    height: calc(var(--u) * 2.916667);
  }

  body.home .ribbon {
    left: 85.1675%;
    top: 27.19213%;
    right: auto;
    bottom: auto;
    width: 12.531771%;
    height: 31.050926%;
    object-fit: contain;
    transform: rotate(-68.12deg);
    transform-origin: 50% 50%;
    filter: none;
  }

  body.home .star {
    filter: none;
    animation: none;
  }

  body.home .s1 {
    left: 48.333333%;
    top: 1.296296%;
    right: auto;
    width: 3.333333%;
    height: 6.851852%;
    object-fit: contain;
  }

  body.home .s2  { width: calc(var(--u) * 1.73); }
  body.home .s3  { width: calc(var(--u) * 3.29); }
  body.home .s4  { width: calc(var(--u) * 2.15); }
  body.home .s5  { width: calc(var(--u) * 1.32); }
  body.home .s6  { width: calc(var(--u) * 2.33); }
  body.home .s7  { width: calc(var(--u) * 2.33); }
  body.home .s8  { width: calc(var(--u) * 1.5); }
  body.home .s9  { width: calc(var(--u) * 2.39); }
  body.home .s10 { width: calc(var(--u) * 2.45); }
  body.home .s11 { width: calc(var(--u) * 3.05); }
  body.home .s12 { width: calc(var(--u) * 2.75); }
  body.home .s13 { width: calc(var(--u) * 1.67); }
  body.home .s14 { width: calc(var(--u) * 1.67); }
  body.home .s15 { width: calc(var(--u) * 1.5); }
  body.home .s16 { width: calc(var(--u) * 1.2); }
  body.home .s17 { width: calc(var(--u) * 2.03); }
  body.home .s18 { width: calc(var(--u) * 1.32); }
  body.home .s19 { width: calc(var(--u) * 0.9); }
  body.home .s20 { width: var(--u); }
  body.home .s21 { width: calc(var(--u) * 1.05); }
  body.home .s22 { width: calc(var(--u) * 0.9); }

  body.home .reg-strip {
    position: absolute;
    left: 39.114583%;
    top: 7.12963%;
    width: 21.302083%;
    height: 9.715741%;
    aspect-ratio: auto;
    margin: 0;
    filter: none;
  }

  body.home .reg-strip span {
    inset: auto;
    left: 18.581907%;
    top: 20.96636%;
    width: 65.036675%;
    height: 55.227768%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: calc(var(--u) * 2.614583);
    line-height: 1;
    white-space: nowrap;
    transform: none;
  }

  body.home .invite-title {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: left;
  }

  body.home .title-copy {
    position: absolute;
    inset: 0;
    transform: none;
  }

  body.home .line-youth {
    position: absolute;
    left: 42.746875%;
    top: 16.203704%;
    width: 14.453646%;
    height: 5.092593%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--u) * 2.533333);
    line-height: 1;
    white-space: nowrap;
  }

  body.home .line-script {
    position: absolute;
    left: 35.885417%;
    top: 20.762963%;
    width: 27.395833%;
    height: 8.546296%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--u) * 4.8816);
    line-height: 1;
    white-space: nowrap;
  }

  body.home .line-evening {
    position: absolute;
    left: 47.304167%;
    top: 26.64537%;
    width: 6.595833%;
    height: 5.740741%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--u) * 2.828125);
    line-height: 1;
    white-space: nowrap;
  }

  body.home .when-art {
    position: absolute;
    left: 39.791667%;
    top: 33.981481%;
    width: 20.46875%;
    height: 5.1%;
    margin: 0;
    object-fit: contain;
    filter: none;
  }

  body.home .registration-form {
    position: absolute;
    left: 34.322917%;
    top: 38.518519%;
    width: 31.332813%;
    height: 58.240741%;
    aspect-ratio: auto;
    margin: 0;
  }
}
