/* ===========================================================
   «Є привід» · стиль «Хлопчик чи дівчинка?» (gender party)
   Нюдовий беж і карамель, білі рвані краї, полароїд,
   гірлянди з прапорців, зірочки, голосування і скретч-картка.
   =========================================================== */
:root {
  --paper: #FFFDFA;
  --sand: #F3ECE3;
  --caramel: #8A6447;
  --caramel-2: #6E4C35;
  --ink: #5A4334;
  --muted: #9A8576;
  --boy: #8FB1D3;
  --girl: #E9B3A8;
  --head: 'Oswald', 'Arial Narrow', sans-serif;
  --script: 'Great Vibes', cursive;
  --body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }

.backdrop { display: none; }
.sheet { max-width: 560px; margin: 0 auto; background: var(--paper); position: relative; overflow: hidden; }
.blk { padding: 54px 26px; text-align: center; position: relative; }
.blk p { margin: 0 0 12px; font-size: 15px; }
.it { font-style: italic; color: var(--caramel); }

/* Високий тонкий заголовок карамельного кольору */
.h { font-family: var(--head); font-weight: 300; color: var(--caramel); font-size: 40px; line-height: 1.05; margin: 0 0 14px; letter-spacing: .01em; }

/* Кнопка-«пігулка» з карамельним градієнтом */
.btn {
  display: inline-block;
  min-width: 240px;
  margin-top: 16px;
  padding: 13px 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #A07A5C, #6E4C35);
  color: #fff;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px rgba(110,76,53,.25);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 24px rgba(110,76,53,.3); }

/* Гірлянда з прапорців */
.bunting { display: block; width: 100%; height: 70px; }

/* Зірочки поруч із заголовками */
.star { display: inline-block; vertical-align: middle; }

/* ---------- 1. Обкладинка ---------- */
.hero { padding: 40px 0 0; }
.hero .kick { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero .title { position: relative; display: inline-block; font-family: var(--head); font-weight: 400; text-transform: uppercase; font-size: clamp(46px, 13vw, 64px); line-height: 1; margin: 6px 0 22px; background: linear-gradient(180deg, #A47B5A, #6E4C35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .title .s1 { position: absolute; left: -26px; top: -8px; }
.hero .title .s2 { position: absolute; right: -24px; bottom: -6px; }
.to { font-size: 14px; color: var(--caramel); margin: -10px 0 16px; }

/* Фото на всю ширину з білими рваними краями */
.cover { position: relative; }
.cover .ph img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
/* Полароїд у кутку */
.polaroid { position: absolute; right: 7%; bottom: 7%; width: 42%; background: #fff; padding: 8px 8px 34px; box-shadow: 0 12px 30px rgba(60,40,25,.3); --r: 6deg; transform: rotate(var(--r)); }
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.polaroid .cap { position: absolute; left: 0; right: 0; bottom: 4px; font-family: var(--script); font-size: 24px; color: var(--caramel); text-align: center; line-height: 1; }

/* ---------- 2. Звернення ---------- */
.date { font-family: var(--head); font-weight: 300; font-size: 38px; color: var(--caramel); margin: 18px 0 8px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.line { display: block; width: min(100%, 320px); height: 170px; margin: 10px auto 0; }

/* На телефоні колонки одна під одною з відступом */
.two > div + div { margin-top: 44px; }

/* ---------- 3. Голосування ---------- */
.vote { background: var(--sand); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.choice {
  border: 0;
  border-radius: 22px;
  padding: 20px 10px 16px;
  font: inherit;
  font-family: var(--head);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .02em;
  color: #fff;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .2s;
}
.choice small { display: block; font-family: var(--body); font-size: 12px; letter-spacing: .06em; opacity: .9; margin-top: 2px; }
.choice.boy { background: linear-gradient(160deg, #A9C6E2, #7EA2C8); }
.choice.girl { background: linear-gradient(160deg, #F1C6BC, #DE9F92); }
.choice:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.choice.mine { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--caramel); }
.voted .choice:not(.mine) { opacity: .55; }
/* Смуга з результатом */
.bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; margin-top: 22px; background: #fff; }
.bar i { display: block; height: 100%; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.bar .b { background: var(--boy); }
.bar .g { background: var(--girl); }
.score { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; color: var(--ink); }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ---------- 4. Локація ---------- */
.places { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin: 18px 0 14px; }
.places img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.places img:first-child { aspect-ratio: auto; height: 100%; }
.venue { font-style: italic; color: var(--caramel); margin: 0; }
.addr { font-size: 13px; color: var(--muted); }

/* ---------- 5. Програма ---------- */
.prog { list-style: none; padding: 0; margin: 10px 0 0; }
.prog li { padding: 10px 0; }
.prog b { display: block; font-weight: 600; color: var(--caramel); font-size: 17px; }
.prog span { font-size: 15px; }

/* ---------- 6. Дрес-код ---------- */
.stars { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }

/* ---------- 7. Скретч-картка ---------- */
.scratch { position: relative; width: min(100%, 320px); aspect-ratio: 1.6; margin: 20px auto 6px; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 30px rgba(110,76,53,.18); }
.scratch .under { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(120deg, #DCE8F3, #FBE3DD); padding: 16px; }
.scratch .under b { font-family: var(--head); font-weight: 400; font-size: 30px; color: var(--caramel-2); line-height: 1.1; }
.scratch .under span { font-size: 13px; color: var(--ink); margin-top: 6px; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .8s ease; }
.scratch.done canvas { opacity: 0; pointer-events: none; }
.hint { font-size: 12px; color: var(--muted); }
/* Конфеті після відкриття */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(260px) rotate(540deg); opacity: 0; } }

/* ---------- 8. Побажання ---------- */
.wishes p { max-width: 360px; margin-left: auto; margin-right: auto; }

/* ---------- 9. Таймер ---------- */
.count { display: flex; justify-content: center; gap: 16px; margin-top: 12px; }
.count b { display: block; font-family: var(--head); font-weight: 300; font-size: 40px; color: var(--caramel); line-height: 1; }
.count small { font-size: 12px; color: var(--muted); }

/* ---------- 10. Анкета ---------- */
.formcard { margin-top: 18px; text-align: left; background: #fff; border-radius: 20px; padding: 22px 18px; box-shadow: 0 10px 28px rgba(110,76,53,.1); }

/* ---------- 11. Фінал ---------- */
.final { padding-bottom: 0; }
.final .script { font-family: var(--script); font-size: 46px; color: var(--caramel); line-height: 1.05; transform: rotate(-6deg); margin: 10px 0 20px; }
.final .pic { position: relative; width: 70%; margin: 0 auto; }
.final .pic img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 0 0; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 20px 28px; letter-spacing: .06em; }

/* ---------- Комп'ютер ---------- */
@media (min-width: 900px) {
  body { background: #E9E3DA; }
  .backdrop { display: block; position: fixed; inset: -40px; background: var(--bg) center / cover no-repeat; filter: blur(18px) brightness(.95) saturate(.7); opacity: .6; z-index: -1; }
  .sheet { max-width: 1080px; margin: 50px auto; border-radius: 24px; box-shadow: 0 30px 80px rgba(80,60,40,.25); }
  .blk { padding: 76px 90px; }
  .blk p { font-size: 16px; }
  .h { font-size: 52px; }
  .hero .title { font-size: 92px; }
  .cover .ph img { aspect-ratio: 16 / 8; object-position: 50% 40%; }
  .polaroid { width: 22%; right: 9%; }

  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; text-align: center; }
  .two > div { min-width: 0; }
  .two > div + div { margin-top: 0; }
  .line { height: 210px; }
  .choices { max-width: 520px; margin-left: auto; margin-right: auto; }
  .bar, .score { max-width: 520px; margin-left: auto; margin-right: auto; }
  .formcard { max-width: 560px; margin-left: auto; margin-right: auto; }
  .count b { font-size: 56px; }
  .count { gap: 30px; }
  .final .pic { width: 340px; }
  .places { max-width: 640px; margin: 22px auto 16px; grid-template-columns: 1fr 1fr; }
  .places img, .places img:first-child { aspect-ratio: 4 / 5; height: auto; }
}
