:root {
  --plum: #3A1D6E;
  --violet: #6B3FC0;
  --gold: #F7C04A;
  --pink: #FF8FA8;
  --cream: #FFF7EC;
  --ink: #2A1A4A;
  --muted: #5B4A75;
  --line: #EADFF5;
  --lilac: #EDE4FA;
  --white: #FFFFFF;
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--plum); }
a:hover { color: var(--violet); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: 26px; font-weight: 900; color: var(--plum); }
p { margin: 0; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
/* Лише верх/низ: інакше перебиває бічні відступи .wrap і блоки прилипають до країв екрана */
.section { padding-top: 28px; padding-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Шапка */
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 20px; color: var(--plum); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 18px; border-radius: var(--radius);
  font: inherit; font-weight: 900; font-size: 20px; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer; width: 100%;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #F2B02A; color: var(--ink); }
.btn-plum { background: var(--plum); color: var(--white); }
.btn-plum:hover { background: #2C1556; color: var(--white); }
.btn-line { background: var(--white); color: var(--plum); border-color: var(--plum); font-weight: 800; font-size: 18px; min-height: 52px; }
.btn-ghost { background: transparent; color: var(--white); border-color: #8F6FD6; font-weight: 700; font-size: 18px; min-height: 52px; }
.btn-ghost:hover { color: var(--white); border-color: var(--white); }
.btn-viber { background: #7360F2; color: var(--white); font-size: 18px; min-height: 54px; }
.btn-tg { background: #1D8BC2; color: var(--white); font-size: 18px; min-height: 54px; }
.btn-wa { background: #1FA855; color: var(--white); font-size: 18px; min-height: 54px; }
.btn-ms { background: #0A7CFF; color: var(--white); font-size: 18px; min-height: 54px; }
.btn-ms:hover { color: var(--white); filter: brightness(.94); }
.btn-viber:hover, .btn-tg:hover, .btn-wa:hover { color: var(--white); filter: brightness(.94); }
.btn-small { width: auto; min-height: 44px; font-size: 16px; padding: 0 12px; border-radius: 12px; }

/* Перший екран */
.hero { background: var(--plum); color: var(--white); padding: 28px 0 32px; }
.hero h1 { font-size: 32px; font-weight: 900; }
.hero p { font-size: 19px; color: #EDE4FA; }
.badge { align-self: flex-start; background: var(--gold); color: var(--plum); font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 999px; }
.price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-line .big { font-size: 34px; font-weight: 900; color: var(--gold); }

/* Відео */
.video-box { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--violet); }
.video-box video { width: 100%; height: 100%; display: block; }
.video-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--white); font-weight: 700; text-align: center; padding: 16px; }

/* Картки */
.card { background: var(--white); border-radius: var(--radius); padding: 16px 18px; }
.trust { display: flex; gap: 12px; align-items: center; font-weight: 700; }
.trust svg { flex: 0 0 26px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--gold); font-weight: 900; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

.pack { background: var(--white); border: 2px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pack.popular { border: 3px solid var(--gold); }
.pack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pack-head strong { font-size: 21px; }
.pack-head .sum { font-size: 26px; font-weight: 900; color: var(--plum); white-space: nowrap; }
.pill { align-self: flex-start; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 999px; }

details.faq { background: var(--white); border-radius: 14px; padding: 14px 16px; }
details.faq summary { font-weight: 800; cursor: pointer; min-height: 32px; }
details.faq p { margin-top: 8px; color: var(--muted); }

.help { background: var(--lilac); border-radius: 18px; padding: 20px; }
.help h2 { font-size: 22px; }

.foot { padding: 28px 0 130px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: flex; flex-direction: column; gap: 6px; }

/* Липка кнопка */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 20; }
.sticky .btn { max-width: 600px; margin: 0 auto; }

/* Вітрина */
.occasion { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.occasion .ico { flex: 0 0 56px; height: 56px; border-radius: 14px; background: var(--lilac); display: flex; align-items: center; justify-content: center; }
.occasion.soon { opacity: .75; }

/* Анкета */
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--violet); border-radius: 999px; transition: width .25s; }
.step-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.step-head a, .linkbtn { font-weight: 700; background: none; border: 0; font: inherit; color: var(--plum); text-decoration: underline; cursor: pointer; padding: 8px 0; min-height: 44px; }
label.lbl, .lbl { font-weight: 800; display: block; }
.field { font: inherit; font-size: 20px; width: 100%; min-height: 56px; padding: 0 16px; border: 2px solid var(--violet); border-radius: 14px; background: var(--white); color: var(--ink); }
textarea.field { min-height: 96px; padding: 12px 16px; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 54px; padding: 6px 10px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--white); font-weight: 800; cursor: pointer; user-select: none;
}
.choice input:checked + span { border: 3px solid var(--violet); background: var(--lilac); color: var(--plum); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .choice span { min-height: 46px; border-radius: 999px; font-size: 16px; padding: 6px 14px; }
.kid { border: 2px solid var(--line); border-radius: 18px; padding: 16px; background: #FFFCF7; }
.kid h3 { font-size: 20px; color: var(--plum); margin-bottom: 4px; }

.row-opt { display: flex; align-items: center; gap: 12px; background: var(--white); border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; min-height: 56px; cursor: pointer; }
.row-opt input { width: 24px; height: 24px; accent-color: var(--violet); flex: 0 0 24px; }
.row-opt .t { flex: 1; }
.row-opt.sel { border: 3px solid var(--gold); }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--lilac); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph button { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(42,26,74,.8); color: var(--white); font-size: 20px; cursor: pointer; }

.bar { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); margin-top: 24px; z-index: 10; }
.bar .total { display: flex; justify-content: space-between; font-weight: 900; font-size: 20px; margin-bottom: 8px; }

.alert { background: #FFE9EC; color: #8A1530; border-radius: 14px; padding: 14px 16px; font-weight: 700; }
.ok { background: #E6F6EC; color: #1F5E36; border-radius: 14px; padding: 14px 16px; font-weight: 700; }

.legal h1 { font-size: 28px; color: var(--plum); margin: 24px 0 12px; }
.legal h2 { font-size: 21px; margin: 22px 0 8px; }
.legal p, .legal li { margin: 0 0 10px; }

/* Адмінка */
.admin table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--white); }
.admin th, .admin td { border: 1px solid var(--line); padding: 8px; vertical-align: top; text-align: left; }
.admin .wrap { max-width: 1200px; }

@media (min-width: 720px) {
  .hero h1 { font-size: 40px; }
}

/* ===== v2: сторінка Миколая за макетом ===== */
.center { text-align: center; }
.gold { color: var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 6px; }
.hero-magic { position: relative; overflow: hidden; background: linear-gradient(180deg, #2B1456 0%, #3A1D6E 55%, #4B2A8A 100%); }
.hero-magic .wrap { position: relative; z-index: 1; }
.hero-magic h1 { line-height: 1.15; }
.flake { position: absolute; top: 0; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .75; animation: kp-snow 10s linear infinite; }
.spark { position: absolute; animation: kp-twinkle 2.6s ease-in-out infinite; }
.hero-shot { position: relative; display: block; border-radius: 18px; overflow: hidden; animation: kp-floaty 5s ease-in-out infinite; }
.hero-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-shot .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; animation: kp-pulse 2s ease-out infinite; }
.hero-shot .cap { position: absolute; left: 10px; bottom: 10px; background: rgba(20,10,40,.72); color: #fff; font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
@keyframes kp-twinkle { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes kp-snow { 0% { transform: translateY(-20px); } 100% { transform: translateY(900px); } }
@keyframes kp-floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes kp-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(247,192,74,.55); } 70% { box-shadow: 0 0 0 16px rgba(247,192,74,0); } }
@media (prefers-reduced-motion: reduce) {
  .flake, .spark, .hero-shot, .hero-shot .play { animation: none; }
}

.trust3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 18px; }
.trust3 > div { background: var(--white); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 14px; font-weight: 800; line-height: 1.25; }
.trust3 svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--lilac); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { font: inherit; font-weight: 800; min-height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.seg button small { font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button[aria-selected="true"] { border: 3px solid var(--violet); background: var(--lilac); color: var(--plum); }
.video-box { background: #1b0f33; }
.video-box video { object-fit: contain; }

.moment { background: var(--white); border-radius: 18px; overflow: hidden; }
.moment.magic { border: 3px solid var(--gold); }
.moment img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.m-body { padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.m-ico { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--plum); display: flex; align-items: center; justify-content: center; }
.moment.magic .m-ico { background: var(--gold); }
.tag { font-size: 13px; font-weight: 800; background: var(--gold); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

.need { display: flex; gap: 12px; align-items: center; background: var(--white); border-radius: 14px; padding: 12px 14px; }
.need svg { flex: 0 0 40px; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--lilac); }
.need-magic { border: 2px dashed var(--gold); }
.need-magic svg { background: #FFF1CC; }

.how { display: flex; gap: 14px; align-items: flex-start; }
.how svg { flex: 0 0 48px; width: 48px; height: 48px; padding: 13px; border-radius: 50%; background: var(--plum); }
.how strong { font-size: 19px; }

.pill { display: inline-flex; align-items: center; gap: 6px; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks svg { flex: 0 0 20px; margin-top: 2px; }
.note { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--muted); }

/* ===== v2: анкета на 5 кроків (макет Order1–Order5) ===== */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.wiz { padding-bottom: 210px; }
.wiz .step-sec { padding-top: 10px; gap: 14px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.wiz-back { display: inline-flex; align-items: center; gap: 2px; font: inherit; font-weight: 800; color: var(--plum); background: none; border: 0; padding: 8px 4px 8px 0; min-height: 44px; cursor: pointer; text-decoration: none; }
.wiz-title { display: flex; align-items: center; gap: 12px; }
.wiz-title h1, .wiz-h { margin: 0; font-size: 24px; font-weight: 900; color: var(--plum); line-height: 1.2; }
.wiz-ico { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--plum); display: flex; align-items: center; justify-content: center; }
.wiz-ico.gold-bg { background: var(--gold); }
.kidbox { gap: 14px; }
.kidbox + .kidbox { border-top: 2px dashed var(--line); padding-top: 16px; }
.kid-head { display: flex; justify-content: space-between; align-items: center; }
.kid-head .kid-title { font-size: 20px; color: var(--plum); }
.voc { background: var(--white); border-radius: 14px; padding: 12px 14px; }
.voc-row { display: flex; gap: 8px; }
.voc-row .field { flex: 1; min-width: 0; min-height: 52px; font-size: 19px; border-color: var(--line); background: var(--cream); }
.voc-play { flex: 0 0 56px; min-height: 52px; border-radius: 12px; border: 0; background: var(--plum); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.voc-play:disabled { opacity: .6; }
.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.grid5 .choice span { min-height: 50px; padding: 4px; border-radius: 12px; }
.add-kid { font-size: 17px; flex-wrap: wrap; gap: 4px 8px; }
.add-kid .muted { font-weight: 700; }
.grp { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; }
.chips2 { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 16px; font-weight: 700; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; line-height: 1.2; text-align: left; }
.chip[aria-pressed="true"] { border-color: var(--violet); background: var(--lilac); color: var(--plum); font-weight: 800; }
.chip.city { font-size: 15px; min-height: 40px; padding: 4px 12px; }
.facts .field { min-height: 50px; font-size: 17px; padding: 0 12px; border-color: var(--line); background: var(--cream); }
.facts .field:focus { border-color: var(--violet); background: var(--white); outline: none; }
.says { display: flex; gap: 10px; align-items: flex-start; background: var(--plum); color: var(--white); border-radius: 16px; padding: 12px 14px; }
.says svg { flex: 0 0 22px; margin-top: 2px; }
.says-t { font-family: Caveat, Nunito, cursive; font-size: 22px; line-height: 1.2; }
.shot { position: relative; border-radius: 16px; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.shot .cap { position: absolute; left: 10px; bottom: 10px; background: rgba(20,10,40,.75); color: #fff; font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.btn-violet { background: var(--violet); color: var(--white); font-size: 19px; }
.btn-violet:hover { background: #5A31AA; color: var(--white); }
.photos .ph-add { display: flex; align-items: center; justify-content: center; border: 3px dashed var(--violet); background: var(--white); cursor: pointer; }
.tips > div { background: var(--white); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; font-weight: 800; line-height: 1.25; }
.linkbtn.center { align-self: center; font-weight: 800; }
.ex-head { display: flex; align-items: center; gap: 10px; }
.ex-head img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; flex: 0 0 72px; }
.pp { position: relative; display: block; height: 84px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--lilac); cursor: pointer; }
.pp input { position: absolute; opacity: 0; }
.pp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(42,26,74,.7); color: #fff; font-size: 13px; font-weight: 800; text-align: center; padding: 2px; }
.pp-any { display: flex; align-items: center; justify-content: center; background: var(--white); border-style: dashed; }
.pp-any span { position: static; background: none; color: var(--muted); }
.pp:has(input:checked) { border: 3px solid var(--violet); }
.pp:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.letter-prev { display: flex; align-items: center; gap: 12px; }
.letter-prev img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
.sum-row { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.sum-row svg { flex: 0 0 20px; }
.summary strong#sumTitle { font-size: 18px; }
.row-opt.off { opacity: .45; cursor: not-allowed; }
.row-opt.plain { border-color: transparent; }
.row-opt.plain svg { flex: 0 0 22px; }
.choice.ch span { flex-direction: column; gap: 2px; min-height: 64px; font-size: 15px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; }
.agree input { width: 24px; height: 24px; flex: 0 0 24px; accent-color: var(--violet); margin: 0; }
.wizbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 -6px 18px rgba(42,26,74,.06); }
.wizbar .wrap { padding-top: 0; }
.wizbar .total { display: flex; justify-content: space-between; font-weight: 900; font-size: 20px; }
.wizbar .btn { min-height: 58px; }
.helplink { font-weight: 700; padding: 4px 0; }
.wiz .alert[hidden] { display: none !important; }

/* ===== v2: «Дякуємо» (макет Done) ===== */
.done-hero { position: relative; margin-bottom: 52px; }
.done-bg { display: block; width: 100%; height: 210px; object-fit: cover; }
.done-ava { position: absolute; left: 50%; bottom: -46px; width: 96px; height: 96px; margin-left: -48px; border-radius: 50%; border: 4px solid var(--cream); animation: kp-floaty 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .done-ava { animation: none; } }
.done h1 { font-size: 27px; font-weight: 900; color: var(--plum); text-align: center; }
.track .tr { display: flex; gap: 12px; align-items: center; }
.track .dot { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--line); display: flex; align-items: center; justify-content: center; }
.track .dot.ok { background: #2E8B57; }
.track .dot.now { background: var(--gold); }
.track .later { color: #8A7AA5; }
.numbox { background: var(--lilac); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.numbox strong { font-size: 22px; letter-spacing: 1px; }

/* Іконки в кнопках не стискаються; довгий текст (номер) переходить на новий рядок цілим */
.btn svg { flex-shrink: 0; }
.btn { flex-wrap: wrap; row-gap: 0; }
.btn-small { flex-wrap: nowrap; }
