@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:ital,wght@0,300..700;1,300..700&family=Great+Vibes&family=Marck+Script&display=swap');

/* Base font (first imported font) for all text */
.container,
.container * {
  font-family: "Cormorant Infant", serif !important;
}

/* Second imported font only for "and" */
[action="text22"] {
  font-family: "Great Vibes", cursive !important;
}

/* Second imported font for dear-guest titles */
.dear-guest [action="text1"],
.dear-guest [action="text21"] {
  font-family: "Great Vibes", "Marck Script", cursive !important;
}

.dear-guest [action="text1"] *,
.dear-guest [action="text21"] * {
  font-family: "Great Vibes", "Marck Script", cursive !important;
}

.dear-guest [action="text21"] {
  margin-top: 24px !important;
}

.palette-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 14px 10px 8px;
}

.palette-preview__dot {
  display: block;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background: var(--dot-color);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
}

/* Confirm button */
.dear-guest [action="agreebtn"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: min(260px, 100%);
  min-height: 44px;
  margin: 14px auto 6px !important;
  padding: 10px 18px;
  border: 1px solid rgba(114, 29, 36, 0.18);
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #7f1f1f 0%, #8b2a35 100%) !important;
  box-shadow:
    0 4px 10px rgba(127, 31, 31, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.dear-guest [action="agreebtn"] > div {
  width: 100%;
}

.dear-guest [action="agree_text"] {
  display: block;
  font-size: clamp(15px, 1.8vw, 18px) !important;
  font-family: "Cormorant Infant", serif !important;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fffdf9 !important;
  text-align: center;
}

.dear-guest [action="agreebtn"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    0 7px 14px rgba(127, 31, 31, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dear-guest [action="agreebtn"]:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow:
    0 4px 8px rgba(127, 31, 31, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Hide technical confirmation notice under button */
.dear-guest #textAgree {
  display: none !important;
}

/* Opros block */
#opros {
  background: #eee7e0 !important;
  min-height: calc(100vh - 40px);
  min-height: calc(100svh - 40px);
  padding: 16px;
  box-sizing: border-box;
}

#opros > div {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#opros > div:nth-of-type(1),
#opros > div:nth-of-type(3) {
  display: none !important;
}

#opros > div:nth-of-type(2),
#opros > div:nth-of-type(4) {
  background: #fffdfa;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(74, 45, 30, 0.08);
  padding: 24px 20px;
}

#opros > div:nth-of-type(4) {
  margin-top: 14px;
  padding-top: 14px;
}

#opros > div:nth-of-type(4) > div {
  top: 0 !important;
  margin-top: 0 !important;
}

#opros text_opros {
  display: block;
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
  color: #201d1a;
}

#opros [action="opros"] {
  transform: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#opros [action="questiontxt"] {
  display: block;
  margin: 0 0 14px;
  font-size: 22px !important;
  line-height: 1.24 !important;
  font-family: "Cormorant Infant", serif !important;
  color: #201d1a !important;
}

#opros [action="varianttxt"] {
  font-size: 20px !important;
  line-height: 1.35 !important;
  font-family: "Cormorant Infant", serif !important;
  color: #201d1a !important;
}

#opros [action="varianttxt"] input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

#opros [action="varianttxt"] label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  cursor: pointer;
}

#opros [action="varianttxt"] label i {
  width: 28px;
  height: 28px;
  border: 3px solid #111;
  border-radius: 50%;
  box-sizing: border-box;
  flex: 0 0 28px;
}

#opros [action="varianttxt"] input[type="checkbox"]:checked + label i {
  background: radial-gradient(circle at center, #111 0 8px, transparent 9px);
}

#opros [data-opros] {
  margin-top: 0;
}

#opros [data-opros] + [data-opros] {
  margin-top: 28px;
}

#opros #weddingOpros > div:first-child {
  display: none !important;
}

#opros > div:nth-of-type(4) > div {
  top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#opros > br,
#opros [name="type"] {
  display: none !important;
}

body {
  background-color: #eee7e0;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

html {
  scroll-behavior: auto;
}

.hide {
  display: none;
}

.container {
  width: 100%;
  max-width: 550px;
  margin: 20px auto;
  box-sizing: border-box;
}

.container > .title,
.container > .dear-guest,
.container > #opros {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  margin-top: 0;
}

.schedule-block {
  background: #fffdfa;
  min-height: calc(100vh);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  height: calc(100svh - 40px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  max-height: calc(100svh - 40px);
  padding: 18px 24px 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.schedule-block__title {
  margin: 36px 0 70px;
  text-align: center;
  color: #8a4a57;
  font-family: "Great Vibes", "Marck Script", cursive !important;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.05;
}

.schedule-block__list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 auto;
  gap: 110px;
}

.schedule-block__item {
  display: grid;
  grid-template-columns: 104px 1fr;
  column-gap: 24px;
  align-items: baseline;
}

.schedule-block__time {
  color: #8a4a57;
  font-size: 24px;
  line-height: 1.2;
}

.schedule-block__event {
  color: #8a4a57;
  font-size: 24px;
  line-height: 1.2;
}

.location-block {
  background: #fffdfa;
  padding: 20px 24px 28px;
  box-sizing: border-box;
}

.location-block__title {
  margin: 0 0 10px;
  color: #8a4a57;
  font-size: 44px;
  line-height: 1.1;
  text-align: center;
}

.location-block__subtitle {
  margin: 0 0 14px;
  color: #8a4a57;
  font-size: 22px;
  line-height: 1.3;
  text-align: center;
}

.location-block__map {
  width: 100%;
  height: 280px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(74, 45, 30, 0.14);
}

@media (max-width: 430px) {
  .schedule-block {
    padding: 14px 16px 18px;
  }

  .schedule-block__title {
    font-size: 50px;
    margin-bottom: 10px;
  }

  .schedule-block__item {
    grid-template-columns: 74px 1fr;
    column-gap: 16px;
  }

  .schedule-block__time {
    font-size: 20px;
    line-height: 1.3;
  }

  .schedule-block__event {
    font-size: 21px;
    line-height: 1.3;
  }

  .location-block {
    padding: 16px 16px 22px;
  }

  .location-block__title {
    font-size: 34px;
  }

  .location-block__subtitle {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .location-block__map {
    height: 240px;
    border-radius: 12px;
  }
}

@media (min-width: 768px) {
  .dear-guest,
  #opros {
    position: relative;
    background: transparent !important;
    overflow: visible;
    isolation: isolate;
  }

  .dear-guest::before,
  #opros::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: #eee7e0;
  }
}

/* -------------------------------------------------------------------------- */
/* Desktop: крупнее типографика, блоки 2–4 по высоте контента (не на весь экран) */
/* -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .container {
    max-width: 680px;
    margin: 32px auto 48px;
  }

  .title {
    --hero-scale: 1.12;
    --count-scale: 1.08;
    height: calc(100vh - 56px);
    height: calc(100svh - 56px);
    margin-bottom: 28px;
  }

  .title [textplace="front_text"] {
    min-height: calc(720px * var(--hero-scale));
  }

  .title [action="text24"] {
    font-size: 17px !important;
  }

  .title [action="text16"] {
    font-size: 64px !important;
  }

  .title [action="text22"] {
    font-size: 58px !important;
  }

  .title [action="text23"] {
    font-size: 68px !important;
  }

  .title [action="text25"] {
    font-size: 108px !important;
  }

  .title [action="text15"] {
    font-size: 46px !important;
  }

  .title [action="text18"] {
    font-size: 28px !important;
  }

  .title [action="text19"] {
    font-size: 23px !important;
  }

  .title [action="text26"] {
    font-size: 21px !important;
  }

  .title [action="countdowntext"] {
    font-size: calc(46px * var(--count-scale)) !important;
  }

  .title [action="countdowntext"] week,
  .title [action="countdowntext"] day,
  .title [action="countdowntext"] hour,
  .title [action="countdowntext"] minute,
  .title [action="countdowntext"] second {
    font-size: calc(18px * var(--count-scale));
  }

  /* Блок 2: приглашение — без min-height на весь экран */
  .dear-guest {
    min-height: 0 !important;
    padding: 24px 28px 32px;
  }

  .dear-guest [elemplace="bgbacktext"] {
    padding: 36px 40px 40px;
  }

  .dear-guest [action="text1"] {
    font-size: 52px !important;
  }

  .dear-guest [action="text2"],
  .dear-guest [action="text3"],
  .dear-guest [action="text14"],
  .dear-guest [action="text16"],
  .dear-guest [action="text18"] {
    font-size: 20px !important;
    line-height: 1.55 !important;
  }

  .dear-guest [action="text13"],
  .dear-guest [action="text15"],
  .dear-guest [action="text17"] {
    font-size: 22px !important;
  }

  .dear-guest [action="text21"] {
    font-size: 52px !important;
  }

  .dear-guest [action="palitra_text"] {
    font-size: 20px !important;
  }

  .dear-guest [action="agree_text"] {
    font-size: clamp(17px, 1.4vw, 20px) !important;
  }

  /* Блок 3: опрос */
  #opros {
    min-height: 0 !important;
    padding: 24px 28px 36px;
  }

  #opros text_opros {
    font-size: 28px;
    line-height: 1.3;
  }

  #opros [action="questiontxt"] {
    font-size: 26px !important;
  }

  #opros [action="varianttxt"] {
    font-size: 22px !important;
  }

  /* Блок 4: расписание — высота по контенту */
  .schedule-block {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 36px 40px 44px;
    justify-content: flex-start;
  }

  .schedule-block__title {
    margin: 0 0 40px;
    font-size: 80px;
  }

  .schedule-block__list {
    gap: 40px;
    flex: 0 1 auto;
  }

  .schedule-block__time,
  .schedule-block__event {
    font-size: 28px;
  }

  .schedule-block__item {
    grid-template-columns: 120px 1fr;
    column-gap: 28px;
  }

  /* Карта: чуть крупнее под десктоп */
  .location-block {
    padding: 28px 40px 40px;
  }

  .location-block__title {
    font-size: 52px;
  }

  .location-block__subtitle {
    font-size: 26px;
  }

  .location-block__map {
    height: 360px;
  }

  .palette-preview__dot {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
  }
}

.title {
  position: relative;
  background: #fffdfa !important;
  /* padding: 44px 22px 26px; */
  height: calc(100vh - 40px);
  height: calc(100svh - 40px);
  min-height: 0;
  --hero-scale: 0.97;
  --count-scale: 0.95;
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 20px;
}

.dear-guest {
  position: relative;
  background: #eee7e0 !important;
  min-height: calc(100vh - 40px);
  min-height: calc(100svh - 40px);
  box-sizing: border-box;
  overflow: visible;
  padding: 16px;
}

.dear-guest [elemplace="bgbacktext"] {
  background: #fffdfa !important;
  box-sizing: border-box;
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(74, 45, 30, 0.08);
}

.title [elemplace="bgpattern"] {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Front composition */
.title [textplace="front_text"] {
  position: relative;
  min-height: calc(650px * var(--hero-scale));
  width: calc(100% / var(--hero-scale));
  transform: scale(var(--hero-scale));
  transform-origin: top left;
}

.title [textplace="front_text"] [action] {
  position: absolute !important;
  margin: 0 !important;
}

.title [action="text24"] {
  top: 6px;
  left: 18px;
  font-size: 14px !important;
  letter-spacing: 0.24em !important;
  line-height: 1.32 !important;
  text-transform: uppercase;
}

.title [action="text16"] {
  top: 72px;
  left: 14px;
  font-size: 52px !important;
  letter-spacing: 0.2em !important;
  line-height: 1 !important;
}

.title [action="text22"] {
  top: 132px;
  left: 58px;
  font-size: 48px !important;
  line-height: 1 !important;
}

.title [action="text23"] {
  top: 198px;
  left: 14px;
  font-size: 56px !important;
  letter-spacing: 0.2em !important;
  line-height: 1 !important;
}

.title [action="text25"] {
  top: 268px;
  left: 186px;
  font-size: 92px !important;
  line-height: 0.7 !important;
}

.title [action="text15"] {
  top: 388px;
  left: 178px;
  font-size: 38px !important;
  letter-spacing: 0.07em !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.title [action="text18"] {
  top: 448px;
  left: 178px;
  font-size: 24px !important;
  letter-spacing: 0.26em !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.title [action="text19"] {
  top: 516px;
  left: 178px;
  font-size: 20px !important;
  letter-spacing: 0.17em !important;
  line-height: 1.38 !important;
  text-transform: uppercase;
}

.title [action="text26"] {
  top: 636px;
  left: 178px;
  font-size: 18px !important;
  letter-spacing: 0.2em !important;
  line-height: 1.52 !important;
  text-transform: uppercase;
}

/* Countdown row */
.title #count {
  position: static !important;
  margin-top: auto;
  padding-top: 16px;
}

.title [action="countdowntext"] {
  position: static !important;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 !important;
  font-size: calc(31px * var(--count-scale)) !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em !important;
}

.title [action="countdowntext"] span {
  flex: 1 1 0;
  text-align: center;
}

.title [action="countdowntext"] week,
.title [action="countdowntext"] day,
.title [action="countdowntext"] hour,
.title [action="countdowntext"] minute,
.title [action="countdowntext"] second {
  display: block;
  margin-top: 6px;
  font-size: calc(15px * var(--count-scale));
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

@media (max-width: 520px) {
  .title {
    --hero-scale: 0.92;
    --count-scale: 0.92;
  }
}

@media (max-width: 430px) {
  .title {
    --hero-scale: 0.86;
    --count-scale: 0.88;
    padding: 34px 16px 20px;
  }

  .title [action="text15"],
  .title [action="text18"],
  .title [action="text19"],
  .title [action="text26"] {
    left: 150px;
  }

  .title [action="text18"] {
    letter-spacing: 0.2em !important;
  }

  .title [action="text15"] {
    top: 396px;
  }

  .title [action="text18"] {
    top: 454px;
  }

  .title [action="text19"] {
    top: 530px;
  }

  .title [action="text26"] {
    top: 640px;
    line-height: 1.48 !important;
  }
}

@media (max-height: 760px) {
  .title {
    --hero-scale: 0.76;
    --count-scale: 0.78;
  }

  .title [action="text15"] {
    top: 370px;
  }

  .title [action="text18"] {
    top: 430px;
  }

  .title [action="text19"] {
    top: 490px;
  }

  .title [action="text26"] {
    top: 585px;
    font-size: 15px !important;
    line-height: 1.42 !important;
  }

  .title #count {
    padding-top: 14px;
  }
}

/* Пасхалки: модалки по 5 кликам на имена на первом экране */
body.easter-modal--open {
  overflow: hidden;
}

.easter-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.easter-modal[hidden] {
  display: none;
}

.easter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 12, 0.72);
  cursor: pointer;
}

.easter-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 520px);
  max-height: min(88vh, 720px);
  padding: 12px;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(127, 47, 63, 0.12);
}

.easter-modal__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 640px);
  object-fit: contain;
  border-radius: 10px;
}

.easter-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(138, 74, 87, 0.35);
  border-radius: 9999px;
  background: rgba(255, 253, 250, 0.92);
  color: #6b2a32;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(74, 45, 30, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.easter-modal__close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.easter-modal__close-icon svg {
  display: block;
  flex-shrink: 0;
}

.easter-modal__close:hover {
  background: #fffefa;
  border-color: rgba(138, 74, 87, 0.55);
  color: #4a1e24;
  box-shadow: 0 6px 18px rgba(74, 45, 30, 0.16);
}

.easter-modal__close:active {
  transform: scale(0.94);
}

.easter-modal__close:focus-visible {
  outline: 2px solid rgba(138, 74, 87, 0.65);
  outline-offset: 2px;
}

