:root{
  --bg:#24130d;
  --card:#f6f1ea;
  --ink:#221f1d;
  --muted:#6d645c;
  --accent:#8b1e2d;
  --shadow: 0 24px 60px rgba(0,0,0,.35);
  --radius: 20px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  position: relative;
  isolation: isolate;
  background: var(--bg) url('/assets/fon1.JPG') center top / cover no-repeat;
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}

code{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}

.page{
  display:grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  padding: 22px 20px;
  position:relative;
}

.card--single{ padding: 0; }
.card-part{ padding: 22px 20px; }
.card-part + .card-part{ border-top: 1px solid rgba(0,0,0,.08); }

.card-part--left{
  background:
    linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.0)),
    var(--card);
}

.polaroids{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  justify-content:center;
  margin: 28px auto 18px;
}

.polaroid{
  width: 330px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  padding: 14px 14px 16px;
  position: relative;
  transform: rotate(-10deg) translateY(18px);
  z-index: 2;
}
.polaroid--tilt{
  margin-left: 0;
  transform: rotate(11deg) translateY(30px);
  z-index: 1;
}
.polaroid__label{
  position: absolute;
  top: -72px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Bad Script", "Comic Sans MS", cursive;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #6b3f2a;
  font-size: 40px;
  margin-bottom: 0;
  white-space: nowrap;
}
.polaroid .polaroid__label{
  top: -66px;
  transform: translateX(-50%) rotate(-2deg);
  font-size: 40px;
}
.polaroid .polaroid__label::after{
  content: "";
  position: absolute;
  left: 6px;
  top: 54px;
  width: 38px;
  height: 46px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 46'%3E%3Cpath d='M33 5 C21 7 14 13 14 22 C14 30 11 34 11 39' fill='none' stroke='%236b3f2a' stroke-width='2.1' stroke-linecap='round'/%3E%3Cpath d='M11 39 L6 34 M11 39 L17 34' fill='none' stroke='%236b3f2a' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: rotate(-10deg);
}
.polaroid .polaroid__label::before{
  content: none;
}
.polaroid--tilt .polaroid__label{
  top: -72px;
  transform: translateX(-50%) rotate(2deg);
  font-size: 42px;
}
.polaroid--tilt .polaroid__label::after{
  content: "";
  position: absolute;
  left: 6px;
  top: 56px;
  width: 38px;
  height: 46px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 46'%3E%3Cpath d='M33 4 C24 6 19 10 17 15 C15 20 17 24 15 28 C13 31 9 33 11 39' fill='none' stroke='%236b3f2a' stroke-width='2.1' stroke-linecap='round'/%3E%3Cpath d='M11 39 L6 34 M11 39 L17 34' fill='none' stroke='%236b3f2a' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: rotate(-10deg);
}
.polaroid__img{
  border-radius: 10px;
  overflow:hidden;
  background:#eee;
  height: 245px;
}
.polaroid__img img{
  width:100%;
  height:100%;
  object-fit: cover;
  image-rendering: auto;
  display:block;
}
.polaroid__name{
  margin-top: 8px;
  font-family: "Bad Script", "Comic Sans MS", cursive;
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1;
  text-align: center;
  color: #5f4a3f;
}
.polaroid .polaroid__name{
  display: block;
  transform: rotate(-1deg);
}
.polaroid--tilt .polaroid__name{
  display: block;
  transform: rotate(1deg);
}
.headline{
  font-family: "Bad Script", "Comic Sans MS", cursive;
  font-size: 34px;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
  color: #6b3f2a;
  text-align: center;
}

.intro{
  margin: 0 auto 16px;
  max-width: 760px;
  color: #5f4a3f;
  font-family: "Bad Script", "Comic Sans MS", cursive;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.55;
  white-space: normal;
  text-align: center;
}
.intro-em{
  font-weight: 700;
}

.date{
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 14px;
  margin-top: 10px;
}
.date__label{
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.date__grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items:center;
  text-align:center;
  margin-bottom: 10px;
}
.dow{
  font-size: 12px;
  color: rgba(0,0,0,.45);
  letter-spacing:.04em;
}
.day{
  font-size: 14px;
  color: rgba(0,0,0,.55);
  padding: 6px 0;
  border-radius: 10px;
}
.day--heart{
  position:relative;
  color:#fff;
  background: var(--accent);
  font-weight: 700;
}
.date__year{
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  letter-spacing:.08em;
  color: rgba(0,0,0,.55);
}

.footer{
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  color: rgba(0,0,0,.7);
}

.section-title{
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  margin: 6px 0 10px;
  letter-spacing:.04em;
}
.text{
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.55;
}
.text--muted{ color: var(--muted); }

.kv{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 12px 12px;
  margin-bottom: 14px;
  background: rgba(255,255,255,.55);
}
.kv__row{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,.12);
}
.kv__row:last-child{border-bottom:0}
.kv__row span{ color: var(--muted); }
.kv__row b{ font-weight: 700; }

.map{
  margin: 10px 0 18px;
}
.map__stub{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background:
    radial-gradient(600px 240px at 30% 20%, rgba(139,30,45,.12), transparent 60%),
    radial-gradient(520px 220px at 70% 70%, rgba(0,0,0,.06), transparent 60%),
    rgba(255,255,255,.55);
  height: 180px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.map__pin{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(139,30,45,.18);
  position:absolute;
  left: 62%;
  top: 45%;
}
.map__text{
  max-width: 320px;
  text-align:center;
  padding: 0 12px;
  color: var(--muted);
  line-height: 1.4;
}
.map__link{
  display:block;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.65);
  color: var(--accent);
  text-decoration:none;
  font-weight: 700;
  text-align:center;
}
.map__link:hover{ filter: brightness(0.98); }

.palette{
  display:flex;
  gap: 10px;
  margin: 6px 0 18px;
}
.swatch{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--sw);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.flash{
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
}
.flash--ok{ border-color: rgba(34,160,98,.35); }
.flash--error{ border-color: rgba(187,30,53,.35); }

.form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.field span{
  font-size: 13px;
  color: var(--muted);
}
input, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.75);
  outline:none;
  font: inherit;
}
input:focus, textarea:focus{
  border-color: rgba(139,30,45,.45);
  box-shadow: 0 0 0 4px rgba(139,30,45,.10);
}
.row{
  display:grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 12px;
}
.radio{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.55);
}
.radio legend{
  font-size: 13px;
  color: var(--muted);
  padding: 0 6px;
}
.radio label{
  margin-right: 14px;
}

.btn{
  appearance:none;
  border:0;
  border-radius: 999px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #a22537, var(--accent));
  color:#fff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 18px 34px rgba(139,30,45,.28);
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.02); }
.btn:active{ transform: translateY(1px); }

.hint{
  margin-top: 12px;
  font-size: 12.5px;
  color: rgba(0,0,0,.55);
}

@media (min-width: 880px){
  /* Оставляем вертикальную компоновку (1 колонка) даже на широких экранах */
  .page{ grid-template-columns: 1fr; padding: 28px; gap: 0; }
  .card-part{ padding: 26px 24px; }
  .polaroid{ width: 390px; }
  .polaroid__img{ height: 290px; }
  .polaroid{
    transform: rotate(-11deg) translateY(16px);
  }
  .polaroid--tilt{
    margin-left: 0;
    transform: rotate(12deg) translateY(38px);
  }
}

