/* =====================================================================
   Дизайн-система витрины сертификатов
   ===================================================================== */
:root {
  --mist: #edefea;
  --paper: #fafaf7;
  --ink: #1b201d;
  --ink-2: #3b423d;
  --muted: #6a716b;
  --line: #d8dcd4;
  --line-soft: #e5e8e1;
  --foil: #b49a62;
  --ok: #1f7a4d;
  --warn: #a4471a;

  --brand: #4a5d52;
  --brand-deep: color-mix(in srgb, var(--brand) 82%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, var(--paper));

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Onest", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-card: 18px;
  --r-ui: 12px;
  --r-sm: 8px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-1: 0 1px 2px rgba(27, 32, 29, .05);
  --shadow-2: 0 2px 4px rgba(27, 32, 29, .04), 0 18px 40px -22px rgba(27, 32, 29, .28);
  --shadow-card: 0 1px 1px rgba(27, 32, 29, .06), 0 24px 48px -28px rgba(27, 32, 29, .45);

  --gutter: clamp(16px, 4.2vw, 48px);
  --maxw: 1240px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
body.menu-open, body.modal-open { overflow: hidden; }

/* ---------- типографика ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 6.6vw, 88px);
  line-height: .98;
  letter-spacing: -.015em;
  margin: 0;
}
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.04;
  letter-spacing: -.01em;
  margin: 0;
}
.h3 { font-size: 19px; font-weight: 600; line-height: 1.3; margin: 0; letter-spacing: -.005em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 34em; margin: 0; }
.kicker { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- раскладка ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 680px; }
.section-head--split { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.2fr 1fr; gap: 48px; } }

/* ---------- кнопки ---------- */
.btn {
  --btn-bg: var(--brand-deep);
  --btn-fg: #fff;
  --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid var(--btn-bd); border-radius: var(--r-ui);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: .005em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease),
              transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { --btn-bg: color-mix(in srgb, var(--brand-deep) 84%, #000); transform: translateY(-1px); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--brand-deep) 80%, transparent); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; transition-duration: .08s; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; transform: none; box-shadow: none; }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line); }
.btn-ghost:hover { --btn-bg: var(--paper); --btn-bd: var(--ink); box-shadow: none; }
.btn-light { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.btn-light:hover { --btn-bg: #fff; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); }
.btn-wa { --btn-bg: #1faa59; }
.btn-wa:hover { --btn-bg: #198f4a; box-shadow: 0 10px 22px -12px rgba(25, 143, 74, .7); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-wide { width: 100%; }
.btn-text {
  background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px;
  transition: text-decoration-color .2s var(--ease);
}
.btn-text:hover { text-decoration-color: currentColor; }

/* ---------- верхняя навигация ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--mist) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-nav.is-scrolled { border-bottom-color: var(--line); }
.site-nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brandmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brandmark-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.brandmark-mono {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--brand-deep); color: #fff; font-family: var(--serif); font-size: 22px; line-height: 1;
}
.brandmark-name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a.nav-link { text-decoration: none; font-size: 15px; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav-menu a.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.nav-menu a.nav-link:hover { color: var(--ink); }
.nav-menu a.nav-link:hover::after { transform: scaleX(1); }
.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; cursor: pointer;
  position: relative; border-radius: 10px;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 899px) {
  :root { --nav-h: 60px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; left: 0; right: 0; top: var(--nav-h); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: var(--mist);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .4s var(--ease-out), visibility 0s linear .4s;
    overflow-y: auto;
  }
  .menu-open .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-menu a.nav-link {
    font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--ink);
    padding: 18px 0; border-bottom: 1px solid var(--line);
  }
  .nav-menu a.nav-link::after { display: none; }
  .nav-menu .btn { margin-top: 28px; min-height: 56px; }
}

/* ---------- карточка сертификата ---------- */
.cert {
  --c-bg: #1f3428; --c-fg: #f3ecdc; --c-muted: color-mix(in srgb, var(--c-fg) 72%, transparent);
  --c-mark-bg: #efe8da; --c-mark-fg: #1f3428; --c-chip: rgba(255, 255, 255, .14); --c-chip-bd: rgba(255, 255, 255, .28);
  --art-w: 56%; --art-pos: center; --px: 0; --py: 0;
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  aspect-ratio: 1.586; width: 100%;
  border-radius: clamp(14px, 4.2cqw, 28px);
  background: var(--c-bg); color: var(--c-fg);
  box-shadow: 0 1px 1px rgba(20, 24, 21, .08), 0 18px 36px -22px rgba(20, 24, 21, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform: perspective(1100px) rotateX(calc(var(--py) * -5deg)) rotateY(calc(var(--px) * 7deg)) translateY(var(--lift, 0px)) scale(var(--press, 1));
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cert-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: var(--art-w); z-index: -2;
  background-image: var(--art); background-size: cover; background-position: var(--art-pos);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%); mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) scale(1.06);
  transition: transform .8s var(--ease-out);
}
.cert-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cert--photo .cert-art { background: none; }
.cert-shine {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; border-radius: inherit;
  background:
    radial-gradient(circle at calc(50% + var(--px) * 55%) calc(50% + var(--py) * 55%), rgba(255, 246, 220, .32), transparent 46%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .10) 46%, transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 210, .38), inset 0 0 28px rgba(255, 236, 200, .12);
  mix-blend-mode: soft-light; transition: opacity .5s var(--ease-out);
}
.cert-body {
  position: absolute; inset: 0; padding: 6.4cqw 6.4cqw 6cqw; display: flex; flex-direction: column; justify-content: space-between;
  max-width: 62%; z-index: 1;
}
.cert-brand { display: flex; align-items: center; gap: 2.2cqw; min-width: 0; }
.cert-mark, .cert-logo { flex: none; width: 6.6cqw; height: 6.6cqw; min-width: 22px; min-height: 22px; border-radius: 1.6cqw; }
.cert-mark { display: grid; place-items: center; background: var(--c-mark-bg); color: var(--c-mark-fg); font-family: var(--serif); font-size: max(13px, 4.2cqw); line-height: 1; }
.cert-logo { object-fit: cover; }
.cert-name { font-weight: 500; font-size: max(11px, 3.3cqw); letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-copy { display: grid; gap: 1.6cqw; }
.cert-kind { font-size: max(10px, 2.9cqw); color: var(--c-muted); }
.cert-title { font-family: var(--serif); font-weight: 400; font-size: 8.6cqw; line-height: .98; letter-spacing: -.012em; text-wrap: balance; }
.cert-tagline { font-size: max(10px, 2.75cqw); line-height: 1.35; color: var(--c-muted); max-width: 30ch; }
.cert-amount {
  position: absolute; z-index: 2; top: 5.6cqw; right: 5.6cqw;
  padding: 1.1cqw 2.6cqw; border-radius: 999px; font-family: var(--serif); font-size: max(13px, 4.4cqw); line-height: 1.15; white-space: nowrap;
  background: var(--c-chip); border: 1px solid var(--c-chip-bd); color: var(--c-fg);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.cert--lg .cert-body { padding: 6.4cqw; }

/* оформления: картинка + палитра. Своё фото можно положить вместо файла с тем же именем. */
:is(.cert, .design-swatch)[data-design="classic"] { --art: url("/static/designs/classic.webp"); --c-bg: #1d3327; --c-fg: #f3ecdc; --art-w: 40%; }
:is(.cert, .design-swatch)[data-design="newyear"] { --art: url("/static/designs/newyear.webp"); --c-bg: #161d18; --c-fg: #f6ecd3; --c-mark-bg: #f2e7cf; --c-mark-fg: #161d18; --art-w: 52%; }
:is(.cert, .design-swatch)[data-design="march8"] { --art: url("/static/designs/march8.webp"); --c-bg: #f1c9c6; --c-fg: #33191e; --c-mark-bg: #33191e; --c-mark-fg: #f6dad8; --c-chip: rgba(255, 255, 255, .5); --c-chip-bd: rgba(255, 255, 255, .7); --art-w: 60%; }
:is(.cert, .design-swatch)[data-design="birthday"] { --art: url("/static/designs/birthday.webp"); --c-bg: #f1e7da; --c-fg: #26231f; --c-mark-bg: #24392d; --c-mark-fg: #f1e7da; --c-chip: rgba(255, 255, 255, .58); --c-chip-bd: rgba(255, 255, 255, .8); --art-w: 54%; }
:is(.cert, .design-swatch)[data-design="nauryz"] { --art: url("/static/designs/nauryz.webp"); --c-bg: #1f4331; --c-fg: #f4ecd8; --art-w: 62%; --art-pos: right center; }
:is(.cert, .design-swatch)[data-design="feb23"] { --art: url("/static/designs/feb23.webp"); --c-bg: #16243b; --c-fg: #f1ead8; --c-mark-bg: #e7cf91; --c-mark-fg: #16243b; --art-w: 100%; }
.cert[data-design="feb23"] .cert-art { -webkit-mask-image: none; mask-image: none; }
.cert--photo .cert-art { --art-w: 58%; }

/* наведение: подъём, лёгкий 3D-наклон, блик по краям, параллакс иллюстрации */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cert.is-hover { --lift: -6px; transition-duration: .18s, .5s; box-shadow: 0 2px 4px rgba(20, 24, 21, .08), 0 34px 60px -26px rgba(20, 24, 21, .6), inset 0 0 0 1px rgba(255, 255, 255, .08); }
  .cert.is-hover .cert-shine { opacity: 1; }
  .cert.is-hover .cert-art { transition-duration: .25s; }
}
.cert.is-pressed { --press: 1.03; --lift: -2px; transition-duration: .25s; }
@media (prefers-reduced-motion: reduce) { .cert, .cert-art { transition: none; transform: none; } }

.cert-art img { display: none; }
.cert--photo .cert-art img { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .cert.is-swap .cert-art { animation: art-swap .7s var(--ease-out); }
  .cert.is-swap .cert-copy { animation: copy-swap .55s var(--ease-out); }
  @keyframes art-swap { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; } }
  @keyframes copy-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* плавный переход «карточка → страница сертификата» */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(36px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.hero-copy { display: grid; gap: 26px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 10px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.trust li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.trust svg { width: 18px; height: 18px; flex: none; color: var(--brand-deep); }

.fan { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1.15; }
.fan .cover { position: absolute; width: 74%; left: 13%; top: 26%; box-shadow: var(--shadow-card); transform-origin: 50% 120%; }
.fan .cover:nth-child(1) { transform: rotate(-9deg) translate(-12%, -2%); }
.fan .cover:nth-child(2) { transform: rotate(4deg) translate(9%, -10%); }
.fan .cover:nth-child(3) { transform: rotate(-1.5deg) translate(0, 14%); }
.fan--1 .cover:nth-child(1) { transform: rotate(-4deg); top: 18%; }
.fan--2 .cover:nth-child(1) { transform: rotate(-7deg) translate(-8%, -6%); }
.fan--2 .cover:nth-child(2) { transform: rotate(4deg) translate(8%, 10%); }
@media (prefers-reduced-motion: no-preference) {
  .fan .cover { animation: fan-in 1.1s var(--ease-out) both; }
  .fan .cover:nth-child(2) { animation-delay: .12s; }
  .fan .cover:nth-child(3) { animation-delay: .24s; }
  @keyframes fan-in { from { opacity: 0; transform: translateY(40px) rotate(0deg) scale(.96); } }
}
@media (max-width: 959px) {
  .fan { max-width: 440px; aspect-ratio: 1.3; }
  .fan .cover { width: 70%; left: 15%; top: 22%; }
}

/* ---------- каталог ---------- */
.catalog { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.product {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: calc(var(--r-card) + 6px);
  padding: 10px 10px 20px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s var(--ease);
}
.product-media { position: relative; display: block; border-radius: var(--r-card); text-decoration: none; }
.product-body { display: grid; gap: 8px; padding: 18px 10px 0; flex: 1; align-content: start; }
.product-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.product-price { font-family: var(--serif); font-size: 26px; line-height: 1; white-space: nowrap; }
.product-desc {
  margin: 0; color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 18px 10px 0; }
.product-actions .btn { min-height: 48px; }
.tag {
  position: absolute; top: 20px; left: 20px; z-index: 2;
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-1);
}
@media (hover: hover) {
  .product:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line); }
}
.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-card); color: var(--muted); }

/* ---------- преимущества ---------- */
.perks { display: grid; gap: 0 clamp(24px, 3vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .perks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.perk { padding: 26px 0 32px; border-top: 1px solid var(--ink); display: grid; gap: 10px; align-content: start; }
.perk svg { width: 26px; height: 26px; color: var(--brand-deep); margin-bottom: 8px; }
.perk p { margin: 0; color: var(--muted); font-size: 15px; max-width: 30ch; }

/* ---------- как это работает ---------- */
.band { background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 900px) { .steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; padding: 0 0 32px; }
.step::before {
  counter-increment: step; content: counter(step);
  grid-row: span 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--ink); display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; background: var(--paper); position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; left: 22px; top: 44px; bottom: 0; width: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { padding-top: 10px; }
.step p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
@media (min-width: 900px) {
  .step { grid-template-columns: 1fr; padding: 0; }
  .step::before { grid-row: auto; margin-bottom: 22px; }
  .step::after { left: 56px; right: -32px; top: 22px; bottom: auto; width: auto; height: 1px; }
  .step h3 { padding-top: 0; }
}

/* ---------- для кого ---------- */
.occasions { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .occasions { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; } }
.occasion { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.occasion-title { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; margin: 0; }
.occasion p { margin: 0; color: var(--muted); font-size: 15px; max-width: 46ch; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; gap: 40px; }
@media (min-width: 960px) { .faq-wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 80px; align-items: start; } .faq-wrap .section-head { position: sticky; top: calc(var(--nav-h) + 32px); margin: 0; } }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-size: 18px; font-weight: 500; min-height: 64px;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 14px no-repeat;
  transition: transform .35s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body { overflow: hidden; }
.faq-body p { margin: 0 0 24px; color: var(--ink-2); max-width: 60ch; }

/* ---------- финальный призыв ---------- */
.final {
  background: var(--ink); color: var(--paper);
  border-radius: calc(var(--r-card) + 10px);
  padding: clamp(36px, 6vw, 80px);
  display: grid; gap: 40px; align-items: center; overflow: hidden;
}
@media (min-width: 900px) { .final { grid-template-columns: 1.2fr .8fr; } }
.final .lede { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.final .cover { max-width: 380px; margin: 0 auto; transform: rotate(-4deg); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }

/* ---------- футер ---------- */
.site-footer { padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: clamp(72px, 10vw, 136px); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }

/* ---------- липкая кнопка на телефоне ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .45s var(--ease-out);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta .btn { width: 100%; min-height: 54px; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
.has-sticky { padding-bottom: 84px; }
@media (min-width: 900px) { .has-sticky { padding-bottom: 0; } }

/* ---------- модальное окно ---------- */
dialog.modal {
  border: 0; padding: 0; margin: auto; color: var(--ink); background: var(--paper);
  width: min(560px, calc(100% - 32px)); max-height: min(88vh, 860px); max-height: min(88dvh, 860px);
  border-radius: calc(var(--r-card) + 6px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
  overflow: hidden;
}
dialog.modal::backdrop { background: rgba(20, 24, 21, .48); backdrop-filter: blur(3px); }
.modal-inner { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 24px; display: grid; gap: 20px; }
.modal-body { padding: 0 10px; display: grid; gap: 14px; }
.modal-close {
  position: absolute; top: 22px; right: 22px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--paper); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease);
}
.modal-close:hover { transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; }
.modal-facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.modal-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.modal-facts li span:first-child { color: var(--muted); }
.modal-actions { display: grid; gap: 10px; padding: 0 10px; }
@media (prefers-reduced-motion: no-preference) {
  dialog.modal[open] { animation: modal-in .45s var(--ease-out); }
  dialog.modal[open]::backdrop { animation: fade-in .3s var(--ease); }
  dialog.modal.is-closing { animation: modal-out .22s var(--ease) forwards; }
  dialog.modal.is-closing::backdrop { animation: fade-out .22s var(--ease) forwards; }
  @keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
  @keyframes modal-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes fade-out { to { opacity: 0; } }
}
@media (max-width: 599px) {
  dialog.modal {
    width: 100%; max-width: none; margin: auto 0 0; max-height: 92vh; max-height: 92dvh;
    border-radius: 24px 24px 0 0;
  }
  .modal-inner { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes modal-in { from { transform: translateY(100%); } }
    @keyframes modal-out { to { transform: translateY(100%); } }
  }
}

/* ---------- появление при прокрутке ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- страница покупки ---------- */
.page-head { padding: clamp(24px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.back {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-size: 15px;
  min-height: 44px; width: fit-content; transition: color .2s var(--ease);
}
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.checkout { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 48px; }
@media (min-width: 960px) { .checkout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .checkout-preview { position: sticky; top: calc(var(--nav-h) + 24px); } }
.checkout-preview { display: grid; gap: 18px; }
.preview-note { display: grid; gap: 4px; padding: 0 4px; }
.preview-msg { font-family: var(--serif); font-size: 22px; line-height: 1.3; margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.facts-inline { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0 4px; margin: 0; list-style: none; color: var(--muted); font-size: 14px; }

.panel-card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: calc(var(--r-card) + 6px);
  padding: clamp(20px, 3.4vw, 36px);
}
.field { display: grid; gap: 8px; margin: 0 0 20px; }
.field label, .field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-weight: 400; color: var(--muted); }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 54px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-ui);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.amount-input { font-family: var(--serif) !important; font-size: 30px !important; min-height: 64px !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.form-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 0; margin: 4px 0 18px; border-top: 1px solid var(--line); }
.form-total b { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1; }
.fineprint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.checkout-bar { display: none; }
@media (max-width: 959px) {
  .checkout-submit { display: none; }
  .checkout-bar {
    display: flex; align-items: center; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .checkout-bar-total { display: grid; line-height: 1.15; min-width: 0; }
  .checkout-bar-total b { font-family: var(--serif); font-weight: 400; font-size: 24px; white-space: nowrap; }
  .checkout-bar .btn { flex: 1; min-height: 54px; }
  .checkout-page { padding-bottom: 96px; }
}

/* ---------- сообщения ---------- */
.flash { padding: 14px 18px; border-radius: var(--r-ui); margin: 16px 0; font-weight: 500; font-size: 15px; border: 1px solid transparent; }
.flash-ok { background: #e6f2ea; color: var(--ok); border-color: #cfe5d7; }
.flash-warn { background: #f7ece4; color: var(--warn); border-color: #ecd6c7; }
.warn-text { color: var(--warn); font-weight: 600; }

/* ---------- страница сертификата ---------- */
.gift-page { max-width: 520px; margin: 0 auto; padding: clamp(20px, 5vw, 56px) 0 64px; display: grid; gap: 16px; }
.gift {
  --c-bg: var(--brand-deep); --c-fg: #fff;
  --c-acc: color-mix(in srgb, var(--foil) 80%, #fff);
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--c-bg); color: var(--c-fg); border-radius: calc(var(--r-card) + 6px);
  padding: clamp(22px, 6vw, 34px); text-align: center; box-shadow: var(--shadow-card);
}
.gift::before { content: ""; position: absolute; inset: 10px; border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--c-acc) 45%, transparent); z-index: -1; }
.gift .cover-pattern { right: -30%; top: 22%; width: 90%; opacity: .22; transform: none; }
.gift-off { filter: grayscale(.85); }
.gift-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; text-align: left; }
.gift-biz { font-weight: 600; }
.gift-to { margin-top: 26px; font-size: 16px; opacity: .85; }
.gift-amount { font-family: var(--serif); font-size: clamp(52px, 14vw, 72px); line-height: 1; margin-top: 6px; letter-spacing: -.01em; }
.gift-title { font-weight: 500; margin-top: 8px; opacity: .92; }
.gift-msg { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin: 18px auto 0; max-width: 24em; overflow-wrap: anywhere; }
.gift-qr { background: #fff; width: min(220px, 70%); aspect-ratio: 1; margin: 26px auto 12px; border-radius: 14px; padding: 12px; }
.gift-qr img { width: 100%; height: 100%; }
.gift-code { font-family: var(--mono); font-size: 18px; letter-spacing: .08em; }
.gift-meta { font-size: 14px; opacity: .85; margin-top: 8px; }
.gift-addr { font-size: 14px; opacity: .7; margin-top: 4px; }
.gift-actions { display: grid; gap: 10px; }
.pay-amount { font-family: var(--serif); font-size: clamp(48px, 12vw, 64px); line-height: 1; margin: 6px 0 4px; }
.pay-steps { list-style: none; counter-reset: pay; margin: 24px 0; padding: 0; display: grid; gap: 18px; }
.pay-steps li { counter-increment: pay; display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.pay-steps li::before {
  content: counter(pay); width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ink);
  display: grid; place-items: center; font-family: var(--serif); font-size: 17px;
}
.code-box { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-pill { font-family: var(--mono); font-size: 16px; letter-spacing: .06em; padding: 6px 12px; border-radius: var(--r-sm); background: var(--mist); border: 1px solid var(--line); }
.waiting { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-ui); background: var(--mist); font-size: 14px; color: var(--ink-2); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 1.6s var(--ease) infinite; } @keyframes pulse { 50% { opacity: .3; transform: scale(.8); } } }

/* =====================================================================
   Кабинет бизнеса и админка (совместимые классы)
   ===================================================================== */
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px var(--gutter) 72px; }
.wrap.wide { max-width: 1200px; }
.narrow { max-width: 440px; margin: 48px auto; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap { gap: 8px; }
.lead { font-size: 17px; color: var(--ink-2); }
.wrap h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 5vw, 44px); line-height: 1.08; margin: 16px 0 12px; }
.wrap h2 { font-size: 20px; font-weight: 600; margin: 40px 0 14px; letter-spacing: -.01em; }
.wrap h3 { font-size: 16px; font-weight: 600; margin: 18px 0 6px; }
.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: clamp(16px, 3vw, 24px); margin: 14px 0; }
.form label { display: block; font-weight: 600; font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }
.form input, .form textarea, .form select {
  display: block; width: 100%; margin-top: 8px; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-ui); font: inherit; font-size: 16px; background: #fff; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--brand-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.form input[type=color] { height: 50px; padding: 4px; }
.form .check { display: flex; gap: 10px; align-items: center; }
.form .check input { width: 20px; min-height: 20px; height: 20px; margin: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; align-items: end; }
.grid-form label, .grid-form > div { margin-bottom: 18px; }
.price-big { font-family: var(--serif); font-size: 44px; line-height: 1; margin: 4px 0; }
.mt { margin-top: 12px; }

.topnav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--mist) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topnav .bar { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); transition: background-color .2s var(--ease); }
.nav-links a:hover { background: var(--paper); color: var(--ink); }
.nav-links a.is-active { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.topnav .nav-toggle { display: none; }
@media (max-width: 980px) {
  .topnav .nav-toggle { display: block; }
  .nav-links {
    position: fixed; left: 0; right: 0; top: 60px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--mist); padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s var(--ease), transform .35s var(--ease-out), visibility 0s linear .35s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a { padding: 16px 4px; font-size: 18px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-links a.is-active { box-shadow: none; background: none; }
}

.linkbox { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.linkbox a { word-break: break-all; font-family: var(--mono); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-ui); padding: 16px 18px; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin-top: 6px; }
.stat small { color: var(--muted); }
.pill { background: var(--brand-deep); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 13px; vertical-align: middle; }
.list { display: grid; gap: 8px; }
.item { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-ui); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.item-off { opacity: .55; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-card); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--mist); }
.s-active { background: #e3f0e8; color: var(--ok); }
.s-pending { background: #f6eedb; color: #8a5a00; }
.s-redeemed { background: var(--mist); color: var(--muted); }
.s-expired, .s-cancelled { background: #f6e6e2; color: #a12a1a; }
.reader { width: 100%; max-width: 360px; margin: 0 auto 12px; border-radius: var(--r-ui); overflow: hidden; }

/* сервисная главная */
.service-hero { padding: clamp(48px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); display: grid; gap: 24px; max-width: 760px; }
.service-points { display: grid; gap: 0 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .service-points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Дополнительные элементы витрины
   ===================================================================== */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-icon { width: 20px; height: 20px; flex: none; }
.mt { margin-top: 12px; }
.section--tight { padding-top: clamp(40px, 6vw, 72px); }
.section--final { padding-bottom: 0; }
.hero-title { max-width: 11em; }
.nav-cta { margin-left: 4px; }
.site-nav--simple .container { gap: 12px; }
.nav-back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: 15px; min-height: 44px; white-space: nowrap; }
.nav-back svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.nav-back:hover svg { transform: translateX(-3px); }
@media (max-width: 420px) { .nav-back span { display: none; } }
.brandmark--footer { margin-bottom: 14px; }
.footer-note { max-width: 32ch; margin: 0; }
.footer-line { display: flex; align-items: center; gap: 10px; }
.footer-line svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.product-price small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-right: 2px; }
.product-body .h3 { min-width: 0; overflow-wrap: anywhere; }
.h2--modal { font-size: clamp(28px, 4vw, 36px); }
.modal-body--form { padding: 24px 10px 0; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field select.input, select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.file-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px dashed var(--line); border-radius: var(--r-ui); cursor: pointer; font-size: 15px; color: var(--ink-2); transition: border-color .2s var(--ease), color .2s var(--ease); width: fit-content; }
.file-pick:hover { border-color: var(--ink); color: var(--ink); }
.file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-pick svg { width: 18px; height: 18px; }
.file-pick:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

/* кнопка поддержки */
.support-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 45;
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 0; cursor: pointer; font-weight: 600; font-size: 15px;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .55); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease);
}
.support-fab svg { width: 20px; height: 20px; }
.support-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .6); }
@media (max-width: 899px) {
  .support-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .support-fab span { display: none; }
  .store .support-fab { bottom: calc(18px + env(safe-area-inset-bottom)); transition: bottom .45s var(--ease-out), transform .3s var(--ease-out); }
  .store:has(.sticky-cta.is-visible) .support-fab { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 959px) { .checkout-page .support-fab { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* звёзды */
.stars { display: inline-flex; gap: 2px; vertical-align: -3px; }
.stars svg { width: 16px; height: 16px; }
.stars svg path { fill: var(--foil); stroke: none; }
.stars svg.off path { fill: var(--line); }
.stars svg.half path { fill: color-mix(in srgb, var(--foil) 55%, var(--line)); }
.stars--lg svg { width: 22px; height: 22px; }
.trust .stars svg { width: 15px; height: 15px; color: inherit; }

/* отзывы на витрине */
.rating-summary { display: flex; align-items: center; gap: 18px; }
.rating-big { font-family: var(--serif); font-size: clamp(56px, 7vw, 80px); line-height: .9; }
.reviews { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: 1fr; }
@media (min-width: 720px) { .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.review { margin: 0; padding: 26px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: calc(var(--r-card) + 4px); display: grid; gap: 14px; align-content: start; }
.review blockquote { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.38; color: var(--ink); overflow-wrap: anywhere; }
.review figcaption { display: grid; gap: 2px; font-size: 14px; }
.review-reply { border-left: 2px solid var(--brand); padding: 2px 0 2px 14px; font-size: 14px; color: var(--ink-2); }
.review-reply p { margin: 4px 0 0; }
.review-box { margin-top: 18px; display: grid; gap: 10px; }
.review-own { margin: 0; font-family: var(--serif); font-size: 20px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; color: var(--line); transition: color .15s var(--ease), transform .15s var(--ease); }
.star-input label svg { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--foil); }
.star-input label:active { transform: scale(.9); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* переписка с поддержкой */
.thread-page { max-width: 720px; margin: 0 auto; padding-bottom: 64px; }
.chat { display: grid; gap: 12px; margin: 18px 0; }
.msg { display: flex; }
.msg--mine { justify-content: flex-end; }
.msg-bubble { max-width: min(560px, 86%); padding: 11px 15px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line-soft); }
.msg--mine .msg-bubble { background: var(--brand-deep); border-color: transparent; color: #fff; border-bottom-right-radius: 6px; }
.msg--theirs .msg-bubble { border-bottom-left-radius: 6px; }
.msg-bubble p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.msg-author { font-size: 12px; font-weight: 600; opacity: .75; }
.msg-time { display: block; font-size: 11.5px; opacity: .6; margin-top: 6px; }
.msg-image img { margin-top: 8px; max-width: min(240px, 100%); max-height: 240px; border-radius: 10px; object-fit: cover; }
.chat-compose { display: grid; gap: 12px; }
.chat-compose textarea { width: 100%; min-height: 96px; padding: 14px 16px; font: inherit; border: 1px solid var(--line); border-radius: var(--r-ui); resize: vertical; background: #fff; }
.chat-compose textarea:focus { outline: none; border-color: var(--brand-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.chat-compose-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.status.s-t-new, .status.s-t-in_progress { background: #f6eedb; color: #8a5a00; }
.status.s-t-waiting { background: var(--mist); }
.status.s-t-resolved { background: #e3f0e8; color: var(--ok); }

/* ошибка */
.error-page { min-height: 60vh; display: grid; place-content: center; justify-items: start; gap: 18px; max-width: 560px; margin: 0 auto; padding: 48px 0; }
.error-code { font-family: var(--serif); font-size: clamp(80px, 16vw, 140px); line-height: .9; color: var(--line); }

/* сегменты (кабинет заведения) */
.seg { display: inline-flex; flex-wrap: wrap; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { font-size: 14px; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.seg a.is-active { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.item--stack { display: grid; justify-content: stretch; gap: 8px; }
.item--stack p { margin: 0; }
.panel-app .wrap { padding-top: 16px; }

/* узкие экраны: карточки и кнопки без выхода за край */
.product, .product-body, .product-actions { min-width: 0; }
.product-actions .btn { min-width: 0; padding: 0 16px; }
@media (max-width: 380px) {
  .product-actions { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .product-row { flex-wrap: wrap; gap: 4px 12px; }
}

/* модальное окно: блоки не сжимаются, прокручивается всё окно */
.modal-inner { display: flex; flex-direction: column; gap: 20px; }
.modal-inner > * { flex-shrink: 0; }

/* размытие фона навигации на псевдоэлементе: иначе фиксированное мобильное меню
   привязывается к шапке (backdrop-filter создаёт новый containing block) */
.site-nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; }
.site-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--mist) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.menu-open .site-nav::before { background: var(--mist); }
.topnav { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; }
.topnav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--mist) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* плавающая кнопка поддержки не должна перекрывать контент на телефоне */
@media (max-width: 899px) {
  body:not(.owner) #main { padding-bottom: 88px; }
}
@media (max-width: 959px) {
  .checkout-page .support-fab { display: none; }
}
.help-line { margin-top: 10px; font-size: 14px; color: var(--muted); }

[hidden] { display: none !important; }

/* ---------- выбор оформления при покупке ---------- */
.design-pick { display: block; border: 0; padding: 0; margin: 0 0 20px; min-width: 0; min-inline-size: 0; }
.design-pick legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.design-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.design-opt { position: relative; display: grid; gap: 6px; cursor: pointer; min-width: 0; font-weight: 400; }
.design-opt input { position: absolute; opacity: 0; pointer-events: none; }
.design-swatch {
  display: block; aspect-ratio: 1.586; border-radius: 10px; position: relative; overflow: hidden;
  background: var(--c-bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.design-swatch::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: var(--art-w); background: var(--art) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.design-swatch[data-design="feb23"]::after { -webkit-mask-image: none; mask-image: none; }
.design-name { font-size: 13px; line-height: 1.2; color: var(--ink-2); }
.design-opt:hover .design-swatch { transform: translateY(-2px); }
.design-opt input:checked + .design-swatch { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.design-opt input:checked ~ .design-name { color: var(--ink); font-weight: 600; }
.design-opt input:focus-visible + .design-swatch { outline: 2px solid var(--brand); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .design-swatch { transition: none; } }

/* ---------- печать сертификата ---------- */
@media print {
  @page { size: A5 portrait; margin: 10mm; }
  body { background: #fff !important; }
  .site-nav, .topnav, .support-fab, .gift-actions, .review-box, .print-hide, .skip-link, .flash, dialog { display: none !important; }
  .gift-page { padding: 0; max-width: none; }
  .gift { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  #main { padding: 0 !important; }
}
.gift-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 440px) { .gift-actions-row { grid-template-columns: 1fr; } }

/* ---------- главная для заведений ---------- */
.calc-wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .calc-wrap { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 80px; align-items: start; } }
.calc { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .calc { grid-template-columns: 1fr 1fr; } .calc-out, .calc > p { grid-column: 1 / -1; } }
.calc-out { margin: 4px 0 16px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.calc-out > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.calc-out dt { color: var(--ink-2); }
.calc-out dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.calc-out .calc-main dt { font-weight: 600; color: var(--ink); }
.calc-out .calc-main dd { font-family: var(--serif); font-size: clamp(30px, 4vw, 40px); font-weight: 400; line-height: 1; }

.price-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-item { display: grid; gap: 6px; padding: 28px; border-radius: var(--r-card); background: var(--mist); color: var(--ink-2); }
.price-item--main { background: var(--ink); color: color-mix(in srgb, var(--paper) 75%, transparent); }
.price-big { font-family: var(--serif); font-size: clamp(48px, 7vw, 72px); line-height: 1; color: var(--ink); }
.price-item--main .price-big { color: var(--paper); }

@media (min-width: 900px) { .lead-box { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; } }
.lead-form, .lead-done { background: var(--paper); color: var(--ink); border-radius: calc(var(--r-card) + 4px); padding: clamp(20px, 3.4vw, 32px); }
.lead-form .field:last-of-type { margin-bottom: 20px; }
.lead-form .fineprint { margin-top: 12px; }
.lead-done { display: grid; gap: 8px; justify-items: start; }
.lead-done svg { width: 40px; height: 40px; color: var(--ok); }
.lead-done p { margin: 0; color: var(--ink-2); }

/* ---------- документы ---------- */
.legal { max-width: 760px; padding-top: clamp(32px, 6vw, 72px); }
.legal h1 { margin-bottom: 6px; }
.legal h2 { margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; max-width: 70ch; }
.legal ul { padding-left: 20px; }
.legal-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.nav-link.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.footer-docs { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-docs a { color: inherit; }

/* ---------- табличка с QR для кассы ---------- */
.poster-tools { display: grid; gap: 14px; margin: 12px 0 24px; }
.poster-tools p { margin: 6px 0 0; max-width: 60ch; }
.poster-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.seg-switch a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.seg-switch a.is-active { background: var(--ink); color: var(--paper); }
.poster-stage { display: grid; justify-items: center; padding: 8px 0 48px; }
.poster {
  --pw: min(100%, 520px);
  width: var(--pw); aspect-ratio: 148 / 210; container-type: inline-size;
  background: #fff; color: var(--ink); border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 30px 60px -30px rgba(27, 32, 29, .35);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.poster-in {
  height: 100%; padding: 6cqw 8cqw 5cqw; display: flex; flex-direction: column; align-items: center; text-align: center;
  border-top: 2.4cqw solid var(--brand-deep);
}
.poster-a4 .poster { aspect-ratio: 210 / 297; }
.poster-top { display: flex; align-items: center; gap: 2.4cqw; }
.poster-logo { width: 9cqw; height: 9cqw; border-radius: 50%; object-fit: cover; }
.poster-mono { width: 9cqw; height: 9cqw; border-radius: 50%; background: var(--brand-deep); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 5cqw; }
.poster-name { font-weight: 600; font-size: 4.2cqw; }
.wrap .poster-title, .poster-title { font-family: var(--serif); font-weight: 400; font-size: 9.5cqw; line-height: 1; margin: 5cqw 0 0; letter-spacing: -.01em; }
.poster-sub { font-size: 3.6cqw; line-height: 1.35; color: var(--ink-2); margin: 2.5cqw 0 0; max-width: 80%; }
.poster-qr { width: 46cqw; aspect-ratio: 1; margin: 5cqw 0 0; padding: 3.5cqw; border-radius: 3cqw; border: .5cqw solid var(--brand-deep); }
.poster-qr svg { width: 100%; height: 100%; display: block; }
.poster-scan { font-weight: 600; font-size: 3.8cqw; margin: 3.5cqw 0 0; }
.poster-url { font-size: 3.2cqw; color: var(--muted); margin: 1cqw 0 0; overflow-wrap: anywhere; }
.poster-steps { list-style: none; counter-reset: ps; margin: auto 0 0; padding: 4cqw 0 0; display: flex; gap: 4cqw; justify-content: center; border-top: .3cqw solid var(--line); width: 100%; }
.poster-steps li { counter-increment: ps; font-size: 3cqw; color: var(--ink-2); display: flex; align-items: center; gap: 1.4cqw; }
.poster-steps li::before { content: counter(ps); width: 5cqw; height: 5cqw; border-radius: 50%; background: var(--brand-deep); color: #fff; display: grid; place-items: center; font-size: 2.8cqw; font-weight: 600; flex: none; }
@media print {
  .poster-app .topnav, .poster-app .print-hide, .poster-app .support-fab { display: none !important; }
  .poster-app, .poster-app body { background: #fff !important; }
  .poster-app #main, .poster-app .wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .poster-stage { padding: 0; display: block; }
  .poster { width: 148mm; height: 209mm; aspect-ratio: auto; box-shadow: none; border-radius: 0; margin: 0; }
  .poster-a4 .poster { width: 210mm; height: 296mm; }
}
.lead-box .final-copy .h2 { margin-bottom: 16px; }
.offers-head { flex-wrap: wrap; gap: 12px; align-items: center; }
.offers-head h1 { margin-bottom: 0; }
/* на телефоне кнопка поддержки не перекрывает кнопки оплаты и сертификата — вместо неё ссылка внизу */
.gift-help { text-align: center; }
@media (max-width: 720px) { .gift-view .support-fab { display: none; } }

/* ---------- страница предложения: условия ---------- */
.offer-terms { margin: 4px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.offer-terms > div { display: grid; grid-template-columns: minmax(110px, .38fr) 1fr; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.offer-terms dt { color: var(--muted); font-size: 14px; }
.offer-terms dd { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 420px) { .offer-terms > div { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: no-preference) {
  .checkout-preview .cert { animation: cert-enter .8s var(--ease-out) both; }
  .checkout > section { animation: panel-enter .7s .12s var(--ease-out) both; }
  @keyframes cert-enter { from { opacity: 0; transform: perspective(1100px) translateY(18px) rotateX(6deg) scale(.97); } }
  @keyframes panel-enter { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- страница сертификата: карточка + билет с QR ---------- */
.gift-stage { display: grid; gap: 0; }
.gift-card { position: relative; z-index: 1; }
.gift-card .cert { box-shadow: 0 2px 4px rgba(20, 24, 21, .08), 0 30px 60px -28px rgba(20, 24, 21, .6); }
.ticket {
  position: relative; margin: -14px 10px 0; padding: 34px clamp(18px, 6vw, 34px) 26px;
  background: var(--paper); border: 1px solid var(--line-soft); border-top: 0; border-radius: 0 0 22px 22px;
  text-align: center; box-shadow: 0 18px 40px -30px rgba(20, 24, 21, .45);
}
.ticket::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; border-top: 1.5px dashed var(--line); }
.gift-greet { font-family: var(--serif); font-size: clamp(26px, 7vw, 34px); line-height: 1.1; margin-top: 8px; color: var(--ink); }
.ticket-to { margin-top: 6px; color: var(--muted); }
.ticket-title { margin-top: 10px; font-weight: 600; }
.ticket-msg { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin: 12px auto 0; max-width: 24em; overflow-wrap: anywhere; color: var(--ink-2); }
.ticket-qr { background: #fff; width: min(210px, 70%); aspect-ratio: 1; margin: 22px auto 12px; border-radius: 14px; padding: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ticket-qr img { width: 100%; height: 100%; display: block; }
.ticket-meta { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.ticket-addr { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- ожидание оплаты: подарок «упакован» ---------- */
.sealed { position: relative; margin: 0 0 6px; }
.sealed-card { position: relative; border-radius: clamp(14px, 4.2cqw, 28px); overflow: hidden; }
.sealed .cert { filter: saturate(.9) brightness(.97); }
.sealed figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }
.seal-ribbon { position: absolute; z-index: 4; pointer-events: none;
  background: linear-gradient(90deg, #4a1220, #8d2a3c 30%, #c3586b 48%, #8a2638 64%, #45101c); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.seal-v { top: 0; bottom: 0; left: 62%; width: 7.5%; }
.seal-h { left: 0; right: 0; top: 46%; height: 11%; background: linear-gradient(180deg, #4a1220, #8d2a3c 30%, #c3586b 48%, #8a2638 64%, #45101c); }
.seal-bow { position: absolute; z-index: 5; left: 65.75%; top: 51.5%; width: 0; height: 0; pointer-events: none; }
.seal-bow i { position: absolute; width: clamp(52px, 13vw, 84px); height: clamp(34px, 8.5vw, 56px); top: calc(clamp(34px, 8.5vw, 56px) / -2); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 35%, #d77587, #8f2a3c 55%, #4b1120); box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
.seal-bow i:first-child { right: 2px; transform: rotate(-18deg); }
.seal-bow i:last-child { left: 2px; transform: rotate(18deg); }
.seal-bow::after { content: ""; position: absolute; width: 22px; height: 22px; left: -11px; top: -11px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #d77587, #7c2033); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: no-preference) {
  .sealed .cert::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 244, 214, .35) 50%, transparent 65%); background-size: 250% 100%;
    animation: seal-shimmer 2.8s ease-in-out infinite; }
  .sealed .seal-bow { animation: seal-breathe 2.8s ease-in-out infinite; }
  @keyframes seal-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
  @keyframes seal-breathe { 50% { transform: scale(1.06); } }
}

/* ---------- раскрытие подарка после подтверждения оплаты ---------- */
.reveal-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 9vw, 52px); line-height: 1; text-align: center; margin: 6px 0 22px; letter-spacing: -.01em; }
.reveal-glow { position: absolute; z-index: -1; left: 50%; top: 50%; width: 140%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.4);
  background: radial-gradient(circle, rgba(255, 220, 140, .75), rgba(255, 200, 110, .25) 35%, transparent 62%); opacity: 0; pointer-events: none; }
.reveal-box { position: absolute; inset: 0; z-index: 6; border-radius: clamp(14px, 4.2cqw, 28px); overflow: hidden; pointer-events: none; }
.reveal-box .lid { position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: linear-gradient(135deg, #f4ece0, #e3d4bd); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.reveal-box .lid::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(176, 140, 76, .35) 14px 15px); }
.lid-l { left: 0; } .lid-r { right: 0; }
.reveal-box .seal-v { left: 46.25%; }
.reveal-box .seal-bow { left: 50%; top: 51.5%; }
.is-reveal .reveal-box { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .is-reveal .reveal-box { display: block; animation: box-away 0s 2.1s forwards; }
  .is-reveal .reveal-box .seal-ribbon, .is-reveal .reveal-box .seal-bow { animation: ribbon-off .55s .45s var(--ease-out) forwards; }
  .is-reveal .lid-l { animation: lid-l 1s .85s cubic-bezier(.7, 0, .2, 1) forwards; }
  .is-reveal .lid-r { animation: lid-r 1s .85s cubic-bezier(.7, 0, .2, 1) forwards; }
  .is-reveal .reveal-glow { animation: glow 2.2s .9s var(--ease-out) forwards; }
  .is-reveal .gift-card { animation: card-rise 1s var(--ease-out) both; }
  .is-reveal .gift-card .cert { animation: card-light 1.4s .9s var(--ease-out) both; }
  .is-reveal .reveal-title { animation: fade-up .9s 1.6s var(--ease-out) both; }
  .is-reveal .ticket { animation: fade-up .9s 1.9s var(--ease-out) both; }
  .is-reveal ~ .gift-actions, .is-reveal ~ p, .is-reveal ~ .review-box { animation: fade-up .8s 2.2s var(--ease-out) both; }
  @keyframes ribbon-off { to { opacity: 0; transform: scale(1.15); } }
  @keyframes lid-l { to { transform: translateX(-104%) rotate(-4deg); } }
  @keyframes lid-r { to { transform: translateX(104%) rotate(4deg); } }
  @keyframes box-away { to { visibility: hidden; } }
  @keyframes glow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
  @keyframes card-rise { from { opacity: 0; transform: translateY(30px) scale(.92); } }
  @keyframes card-light { from { filter: brightness(1.25) saturate(1.1); } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
}
@media print {
  .ticket { box-shadow: none; break-inside: avoid; }
  .gift-card .cert { box-shadow: none; transform: none; }
  .reveal-box, .reveal-glow, .reveal-title { display: none !important; }
}

/* кабинет: сертификаты с превью оформления */
.item--offer { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px 18px; align-items: center; }
.item--offer .offer-thumb { grid-row: span 2; }
.offer-thumb .cert { border-radius: 10px; }
.offer-info { min-width: 0; overflow-wrap: anywhere; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.design-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.design-form select { max-width: 100%; }
.input-small { min-height: 38px; padding: 6px 34px 6px 12px; font-size: 14px; width: auto; }
@media (max-width: 560px) { .item--offer { grid-template-columns: 1fr; } .item--offer .offer-thumb { grid-row: auto; max-width: 320px; } }
