html { font-synthesis: none; }  /* у Prata одно начертание — без искусственного полужирного */
/* Сайт Fiorito Eleganza для поисковиков (site_pages.py, templates/site/).
   Те же цвета и шрифты, что у мини-приложения. */

/* Шрифты — со своего сервера (webapp/fonts, лицензия OFL): без двух лишних
   соединений с Google при открытии и без зависимости от его доступности. */
@font-face { font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/prata-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/prata-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #14231C;
  --surface: #1E3328;
  --surface-2: #24402F;
  --line: rgba(201, 161, 90, 0.22);
  --ivory: #F6ECE4;
  --ivory-dim: #C9CCC5;
  --gold: #C9A15A;
  --gold-soft: #E3C58E;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, .brand, .card-title { font-family: 'Prata', Georgia, serif; font-weight: 400; letter-spacing: 0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; margin: 0 0 14px; }
h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 18px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 35, 28, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; }
.brand { font-size: 22px; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--gold); }
.header-nav { display: flex; gap: 18px; align-items: center; font-size: 14px; font-weight: 600; }
.header-nav a { text-decoration: none; color: var(--ivory-dim); }
.header-nav a:hover { color: var(--ivory); }
.header-nav .header-tg { color: var(--ink); background: var(--gold); padding: 7px 14px; border-radius: 999px; }
@media (max-width: 420px) { .header-nav { gap: 12px; } .header-nav a:nth-child(2) { display: none; } }
/* iPhone SE и уже: «Каталог» убираем, иначе кнопка Telegram уезжала за край */
@media (max-width: 359px) { .brand { font-size: 20px; } .header-nav a:first-child { display: none; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ivory-dim); padding-top: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* Заголовок страницы */
.page-head { padding-top: 26px; padding-bottom: 8px; }
.lead { color: var(--ivory-dim); max-width: 760px; margin: 0 0 22px; font-size: 17px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px; border-radius: 14px;
  font-weight: 700; font-size: 15px; text-decoration: none; text-align: center;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { border: 1px solid var(--line); color: var(--ivory); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); }
.btn-wide { width: 100%; }

/* Подборки-чипы */
.chips { display: flex; gap: 10px; overflow-x: auto; padding-top: 22px; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; gap: 8px; align-items: center;
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ivory);
}
.chip span { color: var(--gold); font-weight: 700; }
.chip:hover { border-color: var(--gold); }

/* Сетка композиций */
.group-title { margin-top: 34px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid rgba(246, 236, 228, 0.06);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line); }
.card-photo { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; background: var(--ivory); color: var(--ink);
}
/* Цена прижата к низу карточки: в соседних карточках цены на одной линии,
   даже если название в одну строку, а рядом в две */
.card-body { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 16px; }
.card-title { font-size: 17px; line-height: 1.25; }
.card-meta { color: var(--ivory-dim); font-size: 12.5px; margin-top: 4px; }
.card-price { color: var(--gold); font-weight: 700; font-size: 17px; margin-top: auto; padding-top: 8px; }
.card-price s, .price s { color: var(--ivory-dim); font-weight: 500; font-size: 0.8em; margin-right: 6px; }
/* Две узкие колонки на iPhone SE: названия в 2 строки, а не в 3 */
@media (max-width: 359px) { .card-body { padding: 10px 12px 14px; } .card-title { font-size: 15px; } }

/* Страница композиции */
.product { display: grid; gap: 26px; padding-top: 20px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; } }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 4; }
.gallery-main .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; background: #000; }
.gallery-main video.slide { object-fit: contain; }
.gallery-main .slide.active { opacity: 1; z-index: 1; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb {
  position: relative; flex: 0 0 72px; height: 96px; padding: 0; border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); cursor: pointer;
}
.thumb.active { border-color: var(--gold); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-video {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ivory); font-size: 22px; background: rgba(0, 0, 0, 0.35); z-index: 1;
}
.info h1 { margin-top: 4px; }
.meta { color: var(--ivory-dim); font-size: 14px; }
.price { color: var(--gold); font-family: 'Prata', Georgia, serif; font-size: 34px; margin: 16px 0 10px; }
.desc { font-size: 17px; color: var(--ivory); margin: 0 0 18px; }
.occasions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.buy { display: grid; gap: 10px; margin-bottom: 22px; }
@media (min-width: 900px) { .info { position: sticky; top: 86px; } }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--ivory-dim); font-size: 14.5px; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 3px; }
.facts a { color: var(--gold-soft); }

/* Отзывы и обещания */
.reviews { margin-top: 48px; }
.review-list { display: grid; gap: 14px; }
@media (min-width: 720px) { .review-list { grid-template-columns: repeat(3, 1fr); } }
.review { margin: 0; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(246, 236, 228, 0.06); }
.review p { margin: 8px 0 0; font-size: 15px; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.promise { display: grid; gap: 12px; margin-top: 44px; margin-bottom: 48px; }
@media (min-width: 720px) { .promise { grid-template-columns: repeat(3, 1fr); } }
.promise div { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); }
.promise strong { display: block; font-family: 'Prata', Georgia, serif; font-size: 20px; color: var(--gold); font-weight: 400; }
.promise span { color: var(--ivory-dim); font-size: 14px; }

/* Цены */
.price-block { margin-top: 30px; }
.price-block.two { display: grid; gap: 30px; }
@media (min-width: 820px) { .price-block.two { grid-template-columns: 1fr 1fr; } }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.price-table th, .price-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid rgba(246, 236, 228, 0.06); }
.price-table th { color: var(--ivory-dim); font-size: 13px; font-weight: 600; }
.price-table td + td { color: var(--gold); font-weight: 700; }
.price-note { margin: -4px 0 16px; color: var(--ivory-dim); font-size: 14px; line-height: 1.5; }
.note { color: var(--ivory-dim); margin-top: 22px; }
.note a { color: var(--gold-soft); }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 26px; background: #101c16; }
.footer-grid { display: grid; gap: 26px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid p { color: var(--ivory-dim); font-size: 14px; }
.footer-grid a { display: block; color: var(--ivory-dim); text-decoration: none; font-size: 14px; margin: 6px 0; }
.footer-grid a:hover { color: var(--gold); }
.footer-title { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.footer-bottom { color: var(--ivory-dim); font-size: 12.5px; margin-top: 22px; }

/* Страница видео-поздравления (/p/<token>) */
.greeting-page { min-height: 100vh; background: radial-gradient(120% 70% at 50% 0%, #24402F 0%, #14231C 60%); }
.greet { width: 100%; max-width: 560px; margin: 0 auto; padding: 34px 16px 44px; text-align: center; }
.greet-brand { font-family: 'Prata', Georgia, serif; font-size: 22px; letter-spacing: 0.02em; }
.greet-brand span { color: var(--gold); }
.greet-title { font-size: clamp(30px, 8vw, 40px); margin: 22px 0 22px; }
.greet-media {
  border-radius: 24px; overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.greet-media video { display: block; width: 100%; max-height: 72vh; background: #000; }
.greet-media-audio { background: var(--surface); padding: 30px 18px 22px; }
.greet-audio-icon {
  width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--ink); font-size: 44px;
}
.greet-media audio { width: 100%; }
.greet-fallback { color: var(--ivory-dim); font-size: 14px; margin: 14px 0 0; }
.greet-fallback a { color: var(--gold-soft); }
.greet-caption {
  font-family: 'Prata', Georgia, serif; font-size: 22px; line-height: 1.4;
  margin: 26px 6px 6px; white-space: pre-line;
}
.greet-note { color: var(--ivory-dim); font-size: 14.5px; margin: 16px 6px 0; }
.greet-cta {
  margin-top: 40px; padding: 24px 18px; border-radius: 22px;
  border: 1px solid var(--line); background: rgba(30, 51, 40, 0.65); display: grid; gap: 12px;
}
.greet-cta h2 { margin: 0; font-size: 26px; }
.greet-cta p { margin: 0 0 6px; color: var(--ivory-dim); font-size: 15px; }

/* Праздничные страницы */
.countdown {
  display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--gold); font-weight: 700; font-size: 13.5px; letter-spacing: 0.02em;
}
.preorder {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 26px; padding: 18px 20px;
  border-radius: var(--radius); background: linear-gradient(135deg, rgba(201, 161, 90, 0.16), rgba(201, 161, 90, 0.04));
  border: 1px solid var(--line);
}
.preorder-mark { color: var(--gold); font-size: 22px; line-height: 1.2; }
.preorder strong { display: block; font-size: 16.5px; margin-bottom: 4px; }
.preorder span { color: var(--ivory-dim); font-size: 14.5px; }
.chip-holiday { border-color: var(--gold); }
.faq { margin-top: 44px; }
.faq details { border-bottom: 1px solid rgba(246, 236, 228, 0.08); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; color: var(--gold); font-size: 22px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ivory-dim); margin: 10px 0 0; }
.footer-title-gap { margin-top: 18px; }

/* «Подарок по ссылке» (/g/<token>): раскрытие подарка, адрес и время, ответ отправителю */
.gift-page { min-height: 100vh; background: radial-gradient(120% 60% at 50% 0%, #24402F 0%, #14231C 62%); }
.gift-page [hidden] { display: none !important; }
.gift-page button { font-family: inherit; cursor: pointer; }
.gift-page button.btn:not(.btn-ghost) { border: 0; }
.gift { width: 100%; max-width: 560px; margin: 0 auto; padding: 26px 16px calc(40px + env(safe-area-inset-bottom)); }
.gift-brand { text-align: center; font-family: 'Prata', Georgia, serif; font-size: 21px; letter-spacing: 0.02em; }
.gift-brand span { color: var(--gold); }
.gift-preview {
  margin-bottom: 16px; padding: 10px 14px; border-radius: 14px; text-align: center;
  border: 1px dashed var(--gold); background: rgba(201, 161, 90, 0.12); color: var(--gold-soft); font-size: 13.5px;
}
.gift-eyebrow { color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.gift-letter {
  position: relative; overflow: hidden; margin-top: 18px; padding: 30px 22px 26px; text-align: center;
  border-radius: 26px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(246, 236, 228, 0.08), rgba(201, 161, 90, 0.07));
}
.gift-letter::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(227, 197, 142, 0.18), transparent);
}
.gift-title { position: relative; font-size: clamp(30px, 8vw, 40px); margin: 10px 0 2px; }
.gift-message { position: relative; font-family: 'Prata', Georgia, serif; font-size: 21px; line-height: 1.45; margin: 16px 0 0; white-space: pre-line; }
.gift-sign { position: relative; color: var(--gold-soft); font-style: italic; font-size: 17px; margin: 14px 0 0; }
.gift-bouquet { margin-top: 16px; }
.gift-photo {
  aspect-ratio: 3 / 4; border-radius: 24px; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.gift-photo img { width: 100%; height: 100%; object-fit: cover; }
.gift-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.gift-items span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.gift-surprise {
  display: grid; justify-items: center; gap: 6px; padding: 28px 20px; text-align: center;
  border-radius: 24px; border: 1px dashed var(--line); background: rgba(30, 51, 40, 0.5);
}
.gift-surprise svg { width: 78px; height: 78px; animation: giftFloat 3.2s ease-in-out infinite; }
.gift-surprise strong { font-family: 'Prata', Georgia, serif; font-weight: 400; font-size: 22px; }
.gift-surprise span { color: var(--ivory-dim); font-size: 14.5px; }
.gift-card {
  margin-top: 16px; padding: 22px 18px; border-radius: 24px;
  border: 1px solid var(--line); background: rgba(30, 51, 40, 0.72);
}
.gift-card h2 { font-size: 25px; margin: 0 0 6px; }
.gift-hint { color: var(--ivory-dim); font-size: 14.5px; margin: 0 0 14px; }
.gift-hint a { color: var(--gold-soft); }
.gift-when { margin: 8px 0 4px; font-size: 26px; line-height: 1.25; }
.gift-steps { list-style: none; margin: 18px 0 16px; padding: 0; }
.gift-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 18px; color: var(--ivory-dim); font-size: 15px; }
.gift-step:last-child { padding-bottom: 0; }
.gift-step:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: rgba(246, 236, 228, 0.12);
}
.gift-step.done:not(:last-child)::after { background: var(--gold); }
.gift-step-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(246, 236, 228, 0.2); background: var(--ink); }
.gift-step.done { color: var(--ivory); }
.gift-step.done .gift-step-dot { border-color: var(--gold); background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%2314231C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.gift-step.current { color: var(--gold-soft); font-weight: 700; }
.gift-step.current .gift-step-dot { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(201, 161, 90, 0.18); animation: giftPulse 1.8s ease-in-out infinite; }
.gift-greeting-btn, .gift-live-btn { margin-top: 10px; }
.gift-live-btn { white-space: normal; line-height: 1.3; }
.gf-label { display: block; margin: 16px 0 7px; color: var(--ivory-dim); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.gf-optional { font-weight: 500; opacity: 0.7; }
.gf-input {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(246, 236, 228, 0.14); background: rgba(20, 35, 28, 0.75); color: var(--ivory);
  font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.gf-input::placeholder { color: rgba(201, 204, 197, 0.55); }
.gf-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 161, 90, 0.18); }
.gf-input + .gf-input { margin-top: 8px; }
.gf-input.invalid { border-color: #E0866F; }
.gf-days { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 440px) { .gf-days { grid-template-columns: repeat(4, 1fr); } }
.gf-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gf-chip {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 8px;
  border-radius: 12px; border: 1px solid rgba(246, 236, 228, 0.14); background: transparent; color: var(--ivory);
  font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.gf-chip.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.gf-chip:disabled { opacity: 0.32; cursor: default; }
.gf-slot-wide { grid-column: 1 / -1; }
.gf-day-other input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.gf-error { margin: 12px 0 0; color: #F0A28E; font-size: 14px; }
.gf-confirm { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(201, 161, 90, 0.12); font-size: 14.5px; }
.gf-confirm p { margin: 0; }
.gf-confirm-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 12px; }
.gf-confirm-actions .btn { min-height: 44px; padding: 0 10px; font-size: 14px; }
.gf-submit { margin-top: 18px; font-size: 16px; }
.gift-privacy { margin: 12px 0 0; color: var(--ivory-dim); font-size: 13px; text-align: center; }
.gift-decline {
  display: block; margin: 16px auto 0; padding: 6px; border: 0; background: none; cursor: pointer;
  color: var(--ivory-dim); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px;
}
.gift-reactions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 12px; }
.gift-reaction {
  min-height: 52px; border-radius: 14px; border: 1px solid rgba(246, 236, 228, 0.14); background: rgba(20, 35, 28, 0.75);
  font-size: 24px; cursor: pointer; transition: transform 0.15s, border-color 0.15s;
}
.gift-reaction:active { transform: scale(0.92); }
.gift-reaction:hover { border-color: var(--gold); }
.gift-thanks-text { min-height: 84px; resize: vertical; }
.gift-thanks-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.gift-photo-pick {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px;
  border-radius: 12px; border: 1px dashed var(--line); color: var(--gold-soft); font-weight: 700; font-size: 14.5px; cursor: pointer;
}
.gift-photo-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.gift-done { text-align: center; padding: 8px 0 4px; }
.gift-done-heart { display: inline-block; font-size: 44px; animation: giftPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.gift-done h2 { margin: 8px 0 6px; }
.gift-done .gift-hint { margin: 0; }
.gift-cta {
  display: grid; gap: 12px; margin-top: 22px; padding: 24px 18px; border-radius: 22px; text-align: center;
  border: 1px solid var(--line); background: rgba(30, 51, 40, 0.65);
}
.gift-cta h2 { margin: 0; font-size: 26px; }
.gift-cta p { margin: 0 0 6px; color: var(--ivory-dim); font-size: 15px; }
.gift-contact { margin: 22px 0 0; text-align: center; color: var(--ivory-dim); font-size: 13.5px; }
.gift-contact a { color: var(--gold-soft); }
.fade-up { animation: giftFadeUp 0.7s ease both; animation-delay: var(--d, 0s); }

/* Коробка: появляется первой, по касанию раскрывается с лепестками */
.gift-intro {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 32%, #2C4D3A 0%, #14231C 66%);
  transition: opacity 0.6s ease, visibility 0.6s;
}
.gift-seen .gift-intro { display: none; }
.gift-intro.gone { opacity: 0; visibility: hidden; }
.gift-intro-inner { width: 100%; max-width: 420px; }
.gift-intro-eyebrow { color: var(--gold); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12.5px; font-weight: 700; }
.gift-intro-title { font-size: clamp(30px, 8.6vw, 44px); line-height: 1.15; margin: 12px 0 0; }
.gift-box-wrap { position: relative; width: min(60vw, 240px); aspect-ratio: 1; margin: 18px auto 14px; }
.gift-box {
  position: relative; z-index: 2; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; animation: giftFloat 3.2s ease-in-out infinite;
}
.gift-box svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.45)); }
.gift-lid { transform-box: fill-box; transform-origin: 50% 100%; animation: giftWiggle 3.2s ease-in-out infinite; }
.gift-body { transform-box: fill-box; transform-origin: 50% 100%; }
.gift-glow {
  position: absolute; z-index: 1; left: 50%; top: 52%; width: 70%; height: 70%; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6); opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 228, 170, 0.95), rgba(227, 197, 142, 0.35) 55%, transparent);
}
.gift-burst { position: absolute; z-index: 3; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.petal {
  position: absolute; left: -6px; top: -9px; width: 12px; height: 18px; border-radius: 12px 0 12px 0; opacity: 0;
  animation: petalFly 1.5s cubic-bezier(0.15, 0.7, 0.3, 1) var(--delay, 0s) forwards;
}
.petal-round { width: 9px; height: 9px; border-radius: 50%; }
.gift-open-btn { min-width: 220px; font-size: 16px; }
.gift-intro-hint { margin: 10px 0 0; color: var(--ivory-dim); font-size: 13px; }
.gift-intro-title, .gift-intro-eyebrow, .gift-open-btn, .gift-intro-hint { transition: opacity 0.3s ease, transform 0.3s ease; }
.opening .gift-intro-title, .opening .gift-intro-eyebrow, .opening .gift-open-btn, .opening .gift-intro-hint { opacity: 0; transform: translateY(8px); }
.opening .gift-box, .opening .gift-lid { animation: none; }
.opening .gift-lid { animation: giftLidOpen 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.opening .gift-body { animation: giftBodyOut 0.7s ease 0.45s forwards; }
.opening .gift-glow { animation: giftGlow 1.1s ease forwards; }
@keyframes giftFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes giftWiggle {
  0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg); } 82% { transform: rotate(4deg); }
  88% { transform: rotate(-2deg); } 94% { transform: rotate(1deg); }
}
@keyframes giftLidOpen { 35% { transform: translate(-4px, -40px) rotate(-10deg); } 100% { transform: translate(-10px, -150px) rotate(-28deg); opacity: 0; } }
@keyframes giftBodyOut { to { transform: scale(0.88) translateY(12px); opacity: 0; } }
@keyframes giftGlow { 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } }
@keyframes petalFly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.5); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}
@keyframes giftFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes giftPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(201, 161, 90, 0.22); } 50% { box-shadow: 0 0 0 9px rgba(201, 161, 90, 0.06); } }
@keyframes giftPop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gift-box, .gift-lid, .gift-surprise svg, .fade-up, .gift-step.current .gift-step-dot { animation: none; }
}
