@import url("https://fonts.googleapis.com/css2?family=Geologica:wght@400;500;600;700;800&display=swap");

:root {
  /* Макет elka 8:263 — токены Figma */
  --Bg-Bg_primary: #f4f8fd;
  --bg: var(--Bg-Bg_primary, #f4f8fd);
  --navy: #297287;
  --navy-2: #297287;
  --text: #244b58;
  --text-secondary: #8eb5c2;
  --blue: #ed7c17;
  --blue-2: #ed7c17;
  --blue-soft: #b8d4db;
  --blue-muted: #8eb5c2;
  --blue-card: #e0edf0;
  --blue-pill: rgba(41, 114, 135, 0.35);
  --overlay: rgba(162, 182, 206, 0.6);
  --white: #f4f8fd;
  --border: #b8d4db;
  --radius-btn: 12900px;
  --radius-card: 24px;
  --radius-input: 12px;
  --header-h: 100px;
  --font-display: "Geologica", system-ui, sans-serif;
  --font-body: "Geologica", system-ui, sans-serif;
  --section-gap: 120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
#how,
#donate,
.how,
.donate {
  scroll-margin-top: calc(var(--header-h) + 16px);
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1320px, calc(100% - 120px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: relative;
  width: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  min-height: var(--header-h);
  background: var(--bg);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 106px;
}
.logo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}
.logo img {
  width: 48px;
  height: auto;
}
.nav-links {
  display: flex;
  gap: 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
}
.nav-links button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}
.stats {
  display: none; /* временно скрыто */
  align-items: center;
  gap: 32px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: center;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--navy);
  line-height: 30px;
  white-space: nowrap;
}
.stat-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
  white-space: nowrap;
}
.stat-br {
  display: none;
}
.stat-sep {
  display: none;
}
.burger {
  display: none;
  width: 52px;
  height: 52px;
  border: 2px solid var(--blue-soft);
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger img {
  width: 24px;
  height: 24px;
}

/* Hero — фон + ёлка одна композиция; ёлка прижата к низу фона (не sticky) */
.hero {
  position: relative;
  width: 100%;
  margin: 0 0 120px;
  height: calc(100vw * 2000 / 1440);
  min-height: calc(100vw * 2000 / 1440);
  border-radius: 0;
  overflow: hidden;
  background: #0a1f46;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-bg--tablet,
.hero-bg--mobile {
  display: none;
}
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hero-star {
  position: absolute;
  width: var(--s, 3px);
  height: var(--s, 3px);
  margin: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 calc(var(--s, 3px) * 1.6) calc(var(--s, 3px) * 0.35) rgba(210, 230, 255, 0.85),
    0 0 calc(var(--s, 3px) * 4) calc(var(--s, 3px) * 0.8) rgba(160, 190, 255, 0.35);
  animation: star-pulse var(--dur, 3.2s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.hero-star::before,
.hero-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 100%
  );
  pointer-events: none;
}
.hero-star::before {
  width: calc(var(--s, 3px) * 5.5);
  height: 1px;
  transform: translate(-50%, -50%);
}
.hero-star::after {
  width: 1px;
  height: calc(var(--s, 3px) * 5.5);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
}
.hero-star--bright {
  --s: 4px;
}
@keyframes star-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-star {
    animation: none;
    opacity: 0.75;
  }
}
.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  touch-action: pan-y;
  cursor: grab;
  z-index: 1;
}
.hero-scene.is-dragging {
  cursor: grabbing;
}
.hero-tree-stage {
  position: absolute;
  /* зазор под CTA на 1440 (макушка не касается кнопки); bottom:0 */
  top: 510px;
  bottom: 0;
  left: 50%;
  width: 70.22%;
  height: auto;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.tree-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.snow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
}
.snow i {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: snowfall linear infinite;
}
@keyframes snowfall {
  0% {
    transform: translateY(-10px) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(780px) translateX(40px);
    opacity: 0.2;
  }
}
.hero-copy {
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.hero-copy--center {
  left: 50%;
  top: 100px;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 48px));
  align-items: center;
  text-align: center;
}
/* при скролле вдоль ёлки остаются только кнопка и ёлка под ней */
.hero.is-scrolled .hero-title,
.hero.is-scrolled .hero-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.hero.is-scrolled .hero-copy--center {
  top: 24px;
}
.hero.is-scrolled .hero-lead {
  gap: 0;
}
.hero-lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.hero.is-zoomed .hero-copy {
  opacity: 0;
  pointer-events: none;
}
.hero.is-zoomed .hero-cta {
  pointer-events: none;
}
.hero-cta {
  position: static;
  transform: none;
  pointer-events: auto;
  white-space: nowrap;
  min-width: 188px;
  transition: opacity 0.2s ease;
}
.hero-cta.is-sticky-deferred {
  opacity: 0;
  pointer-events: none;
}
.hero-break {
  display: none;
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 82px;
  line-height: 82px;
  color: var(--white);
  text-align: center;
}
.hero-text {
  margin: 0;
  max-width: 502px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--white);
  text-align: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: scale(0.98);
}
/* Sticky CTA: desktop 100px от низа экрана; tablet/mobile — 48px */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: max(100px, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  min-width: 188px;
  min-height: 64px;
  padding: 23px 32px;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 10px 28px rgba(20, 40, 70, 0.28);
  /* не используем opacity+hidden — transition зависает на 0 */
  display: none;
}
.sticky-cta.is-visible {
  display: inline-flex;
}
.sticky-cta:active {
  transform: translateX(-50%) scale(0.98);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  padding: 12px 24px;
  border: 0;
  border-radius: 900px;
  background: var(--blue-pill);
  backdrop-filter: blur(30px);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}
.tree-tooltip {
  position: absolute;
  z-index: 8;
  width: max-content;
  max-width: min(280px, calc(100% - 32px));
  padding: 16px;
  border-radius: 16px;
  background: #f4f8fd;
  box-shadow: none;
  color: #123880;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  pointer-events: none;
  opacity: 0;
  /* низ тултипа — над верхом игрушки, без пересечения */
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.15s ease;
  will-change: left, top;
}
.tree-tooltip.is-visible {
  opacity: 1;
}
.tree-tooltip p {
  margin: 0;
}
.tree-tooltip p + p {
  margin-top: 0;
}

/* Donate — макет elka: одна колонка + ряд игрушек */
.donate {
  position: relative;
  z-index: 1;
  padding: 0 0 var(--section-gap);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.donate-top {
  width: min(676px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.donate-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  line-height: 52px;
  color: var(--navy);
  text-align: center;
}
.donate-lead {
  margin: 0;
  max-width: 554px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
  text-align: center;
}
.field-label {
  display: block;
  width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
  text-align: center;
}
.field-label--wish {
  margin-top: 0;
}
.amounts {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.amount-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-input);
  background: var(--blue-card);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
  white-space: nowrap;
}
.amount-btn.is-active {
  background: var(--navy);
  color: var(--white);
}
.custom-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 50px;
  width: 233px;
  flex: 0 0 233px;
  padding: 0 16px;
  border: 2px solid var(--blue-soft);
  border-radius: var(--radius-input);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
}
.custom-amount.is-active {
  border-color: var(--navy);
}
.custom-amount input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--navy);
  font: inherit;
  min-width: 0;
}
.custom-amount input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}
.custom-amount span {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
}

/* Комментарий: скрыт → клик → textarea (макеты 8:263 / 8:405) */
.wish-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.wish-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
  text-align: center;
}
/* Figma 8:330 — пунктир ~6px / зазор ~4px, цвет #297287 */
.wish-toggle::after {
  content: "";
  display: block;
  width: min(410px, 100%);
  height: 1px;
  background-color: transparent;
  background-image: linear-gradient(
    to right,
    var(--navy) 0,
    var(--navy) 6px,
    transparent 6px,
    transparent 10px
  );
  background-size: 10px 1px;
  background-repeat: repeat-x;
  background-position: left center;
}
.wish-block.is-open .wish-toggle {
  display: none;
}
.wish-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 1101px) {
  .wish-panel[hidden] {
    display: none !important;
  }
}
.field-label-br {
  display: none;
}
.wish {
  width: 100%;
  min-height: 120px;
  height: 120px;
  margin: 0;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  text-align: left;
  outline: none;
  resize: vertical;
}
.wish::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}
.wish:focus {
  border-color: var(--navy);
}

.ornament-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ornament-title {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
}
/* превью для tree.js — вне потока, не видно в макете */
.ornament-preview-wrap {
  position: absolute;
  width: 220px;
  height: 220px;
  left: -9999px;
  top: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.ornament-preview {
  width: 100%;
  height: 100%;
}
.ornament-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.ornament-loader {
  display: none !important;
}
.ornament-loader-spin {
  display: none;
}
@keyframes ornament-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Карусель игрушек — на всю ширину экрана (макет 1:90) */
.ornament-rail {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  position: relative;
}
.ornament-grid {
  display: flex;
  gap: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none;
  scroll-behavior: auto;
  padding: 8px var(--carousel-pad, 24px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x;
  /* отдельный слой — меньше лагов при свайпе */
  transform: translateZ(0);
}
.ornament-grid.is-dragging {
  cursor: grabbing;
  user-select: none;
  touch-action: none;
  scroll-behavior: auto;
}
.ornament-grid::-webkit-scrollbar {
  display: none;
}
/* Размер плитки — макеты desktop/tablet/mobile: 220×220 */
.ornament-tile {
  --ornament-tile-size: 220px;
  flex: 0 0 var(--ornament-tile-size);
  width: var(--ornament-tile-size);
  height: var(--ornament-tile-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: pan-x;
  -webkit-user-drag: none;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}
.ornament-tile.is-active {
  border: 0;
}
.ornament-tile-poster,
.ornament-tile-3d {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ornament-tile-poster {
  object-fit: contain;
  transition: opacity 0.45s ease;
}
.ornament-tile-3d {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.ornament-tile.is-live .ornament-tile-3d {
  opacity: 1;
}
.ornament-tile.is-live .ornament-tile-poster {
  opacity: 0;
}
/* Figma 8:999 — вопросик на ангеле в карусели */
.angel-help {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ed7c17;
  color: #fcfbfb;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
  cursor: help;
  pointer-events: auto;
  touch-action: manipulation;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.angel-help:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
/* Figma 8:1019 — тултип ангела: 342×102, стрелка pr 24, body 86 */
.angel-tip {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 342px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.angel-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.angel-tip[hidden] {
  display: none !important;
}
.angel-tip-arrow-row {
  position: relative;
  width: 100%;
  height: 16px;
  z-index: 1;
  margin-bottom: -1px;
  pointer-events: none;
}
.angel-tip-arrow {
  position: absolute;
  top: 1.33px;
  left: 0;
  display: block;
  width: 24px;
  height: 14.67px;
  margin: 0;
  transform: translateX(-50%);
}
.angel-tip-body {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 86px;
  padding: 8px 16px;
  border-radius: 12px;
  background: #e0edf0;
  backdrop-filter: blur(30px);
}
.angel-tip-body p {
  margin: 0;
  width: 310px;
  max-width: 100%;
  color: #244b58;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-align: left;
}

.ornament-controls {
  width: min(676px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 8px;
}
/* Figma 8:349 — цвета gap 16, до кнопки 32, кнопка→legal 24 */
.ornament-colors {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.ornament-colors:has(#color-dots[hidden]) {
  display: none;
}
.ornament-pay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.color-label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--navy);
  text-align: center;
}
.color-dots {
  position: static;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 24px;
}
.color-dots[hidden] {
  display: none !important;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  padding: 0;
  box-sizing: content-box;
}
.color-dot.is-active {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}
.color-dot[data-color="blue"] {
  background: #6ba5df;
}
.color-dot[data-color="gold"] {
  background: #fbab2e;
}
.color-dot[data-color="red"] {
  background: #d40c04;
}
.color-dot[data-color="green"] {
  background: #158e29;
}
.color-dot[data-color="white"] {
  background: #f7f4ee;
  box-shadow: inset 0 0 0 1px rgba(20, 40, 70, 0.28);
}
.color-dot[data-color="brown"] {
  background: #8d5a3b;
}
.color-dot[data-color="ginger"] {
  background: #e08a3c;
}
.color-dot[data-color="sand"] {
  background: #e6d3b4;
  box-shadow: inset 0 0 0 1px rgba(20, 40, 70, 0.18);
}
.color-dot[data-color="bear"],
.color-dot[data-color="snowman"],
.color-dot[data-color="horse"] {
  width: 28px;
  height: 28px;
  background-color: #e7eef8;
  background-size: 78%;
  background-repeat: no-repeat;
  background-position: center;
}
.angel-hint {
  display: none;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--blue-card);
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  max-width: 100%;
}
.angel-hint.is-highlight {
  display: block;
}
.pay-btn {
  width: 100%;
  white-space: nowrap;
  min-height: 64px;
  padding: 20px 28px;
}
.legal {
  margin: 0;
  max-width: 550px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text);
  text-align: center;
}
.legal a {
  color: var(--navy);
  font-weight: 500;
}

/* How it works */
.how {
  position: relative;
  z-index: 1;
  padding: 0 0 120px;
  overflow: visible;
}
.how-grid,
.how-card {
  overflow: visible;
}
.how .container {
  width: min(1376px, calc(100% - 64px));
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.how h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  line-height: 52px;
  color: var(--navy);
  text-align: center;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.how-card {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}
.how-card--plain {
  min-height: 240px;
}
.how-card:hover,
.how-card:focus-within {
  background: var(--blue-card);
  border-color: transparent;
}
.how-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  color: var(--navy);
}
.how-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
}

/* Footer — макет 8:518 (1440×283) */
.site-footer {
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 0 32px 32px;
  overflow: visible;
  width: min(1440px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
}
.footer-grid {
  display: grid;
  /* 8:518: brand@32, docs@533, nav@999, правый хвост 63 — доли свободного места */
  grid-template-columns: 307px 194fr 251px 215fr 346px 63fr;
  align-items: start;
  column-gap: 0;
  row-gap: 0;
  grid-template-areas:
    "brand . docs . nav ."
    "copy  . .    . made .";
  position: relative;
  z-index: 1;
  min-height: 251px;
}
.footer-brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 307px;
}
.footer-brand .logo {
  width: 64px;
  height: 64px;
}
.footer-brand .logo img {
  width: 48px;
  height: auto;
}
.footer-brand p {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
}
.footer-brand-note {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  color: var(--navy);
}
.footer-col--docs {
  grid-area: docs;
  width: 251px;
}
.footer-col--nav {
  grid-area: nav;
  width: 346px;
}
.footer-col h4 {
  margin: 0 0 33px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
}
.footer-col a,
.footer-col button {
  display: block;
  margin-bottom: 12px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
}
.footer-col a:last-child,
.footer-col button:last-child {
  margin-bottom: 0;
}
.footer-copy {
  grid-area: copy;
  margin: 48px 0 0;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
  white-space: nowrap;
  width: max-content;
}
.footer-made {
  grid-area: made;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.footer-made p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text);
}
.footer-philgood img {
  width: 127px;
  height: auto;
  display: block;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  /* Figma: rgba(162,182,206,0.6) + blur 30 поверх Bg_primary */
  background:
    linear-gradient(var(--overlay), var(--overlay)),
    var(--Bg-Bg_primary, #f4f8fd);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(740px, 100%);
  background: var(--Bg-Bg_primary, #f4f8fd);
  border-radius: 32px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.modal-close {
  align-self: flex-end;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: 24px;
  background: transparent;
  backdrop-filter: blur(7.5px);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.modal-close img {
  width: 24px;
  height: 24px;
}
.modal-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.modal-logo img {
  width: 74px;
  height: auto;
}
.modal-card h2 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  line-height: 52px;
  color: var(--text);
}
.modal-card .modal-text {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text);
}
.modal-body-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
  width: 100%;
}
.modal-texts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.modal-actions .btn-primary {
  width: 100%;
  min-height: 64px;
  text-decoration: none;
}
.modal-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.modal-actions-row .btn-secondary {
  flex: 1;
  min-height: 64px;
  padding: 12px 24px;
  background: var(--blue-card);
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  text-decoration: none;
  backdrop-filter: blur(30px);
}
.about-btn-br {
  display: none;
}

/* Figma 8:237 — попап «О фонде» desktop */
.modal-card--about {
  align-items: stretch;
}
.modal-about-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Figma 8:31 — попап «Спасибо» desktop */
.modal-card--thanks {
  align-items: stretch;
}
.modal-card--thanks .modal-body-stack {
  gap: 24px;
}
.modal-card--thanks .modal-text {
  max-width: 592px;
}
.modal-card--thanks .thanks-hyphen,
.modal-card--thanks .thanks-title-br {
  display: none;
}
/* Figma 8:52 — попап «Поделиться» desktop */
.modal-card--share {
  align-items: stretch;
}
.modal-card--share .modal-body-stack {
  gap: 0;
}
.share-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 900px;
  background: var(--blue);
  backdrop-filter: blur(30px);
  cursor: pointer;
  text-decoration: none;
  color: #fef1ec;
}
.share-btn img {
  display: block;
  width: auto;
  height: auto;
  max-width: 24px;
  max-height: 26px;
}
.share-btn[data-share="vk"] img {
  width: 21px;
  height: 12px;
}
.share-btn[data-share="tg"] img {
  width: 21px;
  height: 17px;
}
.share-btn[data-share="ok"] img {
  width: 17px;
  height: 26px;
}
.share-btn[data-share="wa"] img,
.share-btn[data-share="max"] img {
  width: 24px;
  height: 24px;
}

/* Mobile menu — макет 8:743 */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  background: var(--bg);
  padding: 0;
}
.mobile-menu.is-open {
  display: flex;
}
.mobile-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 16px 4px 16px 16px;
  flex: none;
}
.mobile-menu-top .logo {
  width: 44px;
  height: 44px;
}
.mobile-menu-top .logo img {
  width: 33px;
}
.mobile-menu-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 64px;
  padding: 0 16px 48px;
  width: min(343px, calc(100% - 32px));
  margin: 0 auto;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu nav button,
.mobile-menu nav a {
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.mobile-stats {
  display: none; /* временно скрыто */
  flex-direction: column;
  gap: 32px;
  width: 100%;
}
.mobile-stats .stat-item {
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  width: 100%;
}
.mobile-stats .stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 32px;
  color: var(--navy);
}
.mobile-stats .stat-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text);
  white-space: nowrap;
  max-width: none;
}

/* Tablet — макет 8:765 (768) */
@media (max-width: 1100px) {
  :root {
    --header-h: 96px;
  }
  .container {
    width: calc(100% - 48px);
  }
  .site-header {
    min-height: 96px;
    padding: 16px 24px;
  }
  .logo {
    width: 44px;
    height: 44px;
  }
  .logo img {
    width: 33px;
  }
  .header-left {
    gap: 32px;
    flex-shrink: 0;
  }
  .nav-links {
    display: flex;
    gap: 24px;
    font-size: 16px;
    line-height: 22px;
  }
  .burger {
    display: none;
  }
  .stats {
    gap: 16px;
  }
  .stat-value {
    font-size: 18px;
    line-height: 24px;
  }
  .stat-label {
    font-size: 12px;
    line-height: 18px;
    max-width: 116px;
    white-space: normal;
  }
  .stat-br {
    display: inline;
  }
  .hero {
    width: 100%;
    /* макет 8:765: hero 768×1040 */
    height: calc(100vw * 1040 / 768);
    min-height: calc(100vw * 1040 / 768);
    margin-bottom: 100px;
    border-radius: 0;
  }
  .hero-bg--desktop {
    display: none;
  }
  .hero-stars {
    display: none;
  }
  /* Figma 8:908 / 8:948 — bottom 48px */
  .sticky-cta {
    bottom: max(48px, env(safe-area-inset-bottom, 0px));
  }
  .hero-bg--tablet {
    display: block;
    inset: auto;
    left: 0;
    top: -10.09%;
    width: 100%;
    height: 110.76%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
  }
  .hero-bg--mobile {
    display: none;
  }
  .hero-tree-stage {
    left: 50%;
    right: auto;
    width: 57.46%;
    max-width: none;
    height: 64%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
  }
  .hero-copy--center {
    top: 48px;
    width: min(720px, calc(100% - 48px));
    gap: 24px;
  }
  .hero-lead {
    gap: 24px;
  }
  .hero-title {
    font-size: 50px;
    line-height: 50px;
  }
  .hero-text {
    font-size: 14px;
    line-height: 22px;
    max-width: 400px;
  }
  .hero-cta {
    min-height: 64px;
    padding: 0 32px;
    font-size: 18px;
  }
  /* Donate form — макет 8:808 */
  .donate {
    padding-bottom: 100px;
    gap: 24px;
  }
  .donate-top {
    width: min(720px, calc(100% - 48px));
    gap: 0;
  }
  .donate-title {
    margin: 0 0 24px;
    font-size: 50px;
    line-height: 50px;
  }
  .donate-lead {
    margin: 0 0 32px;
    max-width: 536px;
  }
  .field-label {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 1px;
  }
  .wish-toggle {
    display: none;
  }
  .wish-panel {
    display: flex;
    width: 100%;
  }
  .wish-block {
    margin-top: 24px;
  }
  .amounts {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .amount-btn {
    flex: 1 1 0;
    height: auto;
    padding: 13px 16px;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 1px;
  }
  .custom-amount {
    flex: 0 0 233px;
    width: 233px;
    height: auto;
    padding: 13px 16px;
  }
  .custom-amount span {
    font-size: 16px;
    line-height: 22px;
  }
  .ornament-tile {
    --ornament-tile-size: 220px;
  }
  .ornament-grid {
    gap: 0;
  }
  .ornament-rail {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  .ornament-controls {
    width: min(720px, calc(100% - 48px));
  }
  .ornament-preview-wrap {
    left: -9999px;
    width: 220px;
    height: 220px;
  }
  .pay-btn {
    white-space: nowrap;
    min-height: 64px;
    font-size: 16px;
  }
  /* How — макет 8:867 */
  .how {
    padding-bottom: 100px;
  }
  .how .container {
    width: min(720px, calc(100% - 48px));
    gap: 32px;
  }
  .how h2 {
    font-size: 50px;
    line-height: 50px;
    font-weight: 800;
  }
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .how-card {
    min-height: 280px;
    height: 280px;
    padding: 24px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: transparent;
    justify-content: space-between;
  }
  .how-card h3 {
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .how-card p {
    font-size: 14px;
    line-height: 22px;
  }
  .site-footer {
    padding: 0 24px 24px;
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    gap: 40px 48px;
    min-height: 0;
    grid-template-areas:
      "brand brand"
      "docs  nav"
      "made  made"
      "copy  copy";
  }
  .footer-copy {
    white-space: normal;
    width: auto;
  }
  .footer-brand {
    max-width: 273px;
  }
  .footer-col--docs,
  .footer-col--nav {
    width: auto;
  }
  .footer-made {
    margin-top: 0;
  }
  .footer-copy {
    margin-top: 0;
  }
  /* Figma 8:165 — попап «О фонде» tablet */
  .modal-card--about {
    width: min(660px, 100%);
    padding: 32px;
    border-radius: 24px;
    gap: 24px;
  }
  .modal-card--about .modal-about-main {
    gap: 24px;
  }
  .modal-card--about .modal-body-stack {
    gap: 24px;
  }
  .modal-card--about h2 {
    font-size: 40px;
    line-height: 44px;
    font-weight: 800;
  }
  .modal-card--about .modal-text {
    font-size: 14px;
    line-height: 22px;
  }
  .modal-card--about .modal-actions {
    gap: 8px;
  }
  .modal-card--about .modal-actions .btn-primary,
  .modal-card--about .modal-actions-row .btn-secondary {
    min-height: 54px;
    font-size: 16px;
    line-height: 22px;
    padding: 12px 24px;
    text-align: center;
  }
  /* Figma 8:143 — попап «Спасибо» tablet */
  .modal-card--thanks {
    width: min(660px, 100%);
    padding: 32px;
    border-radius: 24px;
    gap: 24px;
  }
  .modal-card--thanks h2 {
    font-size: 40px;
    line-height: 44px;
    font-weight: 800;
  }
  .modal-card--thanks .modal-text {
    max-width: 498px;
    font-size: 14px;
    line-height: 22px;
  }
  .modal-card--thanks .modal-actions {
    gap: 8px;
  }
  .modal-card--thanks .modal-actions .btn-primary,
  .modal-card--thanks .modal-actions-row .btn-secondary {
    min-height: 54px;
    font-size: 16px;
    line-height: 22px;
    padding: 12px 24px;
  }
  /* Figma 8:209 — попап «Поделиться» tablet */
  .modal-card--share {
    width: min(660px, 100%);
    padding: 32px;
    border-radius: 24px;
    gap: 24px;
  }
  .modal-card--share h2 {
    font-size: 40px;
    line-height: 44px;
    font-weight: 800;
  }
  .modal-card--share .share-btn {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }
}

/* Mobile — макет 8:683 хедер + меню 8:743 */
@media (max-width: 767px) {
  :root {
    --header-h: 68px;
  }
  .container {
    width: calc(100% - 32px);
  }
  .site-header {
    min-height: 68px;
    padding: 16px 4px 16px 16px;
  }
  .site-header .logo {
    width: 44px;
    height: 44px;
  }
  .site-header .logo img {
    width: 33px;
  }
  .nav-links {
    display: none;
  }
  .site-header .stats {
    display: none;
  }
  .burger {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 10px;
  }
  .hero {
    width: 100%;
    margin-bottom: 64px;
    border-radius: 0;
    /* высота/ёлка как на планшете до 500px — иначе огромный зазор */
  }
  .hero-copy--center {
    left: 50%;
    right: auto;
    top: 48px;
    width: calc(100% - 32px);
    transform: translateX(-50%);
    gap: 24px;
  }
  .hero-lead {
    align-items: center;
    gap: 24px;
  }
  .hero-break {
    display: block;
  }
  .hero-title {
    font-size: 36px;
    line-height: 40px;
  }
  .hero-text {
    font-size: 14px;
    line-height: 20px;
    max-width: none;
  }
  /* Figma 8:710 — 188×64, px 32 / py 22–23, text 14/20 */
  .hero-cta {
    min-width: 188px;
    min-height: 64px;
    padding: 22px 32px;
    font-size: 14px;
    line-height: 20px;
  }
  /* Figma 8:712 / 8:741 — bottom 48px */
  .sticky-cta {
    min-width: 188px;
    min-height: 64px;
    padding: 22px 32px;
    font-size: 14px;
    line-height: 20px;
    bottom: max(48px, env(safe-area-inset-bottom, 0px));
  }
  /* Donate form — макет 8:598 */
  .donate {
    padding-bottom: 64px;
    gap: 24px;
  }
  .donate-top {
    width: calc(100% - 32px);
    gap: 0;
  }
  .donate-title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 34px;
  }
  .donate-lead {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 20px;
  }
  .field-label {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
  }
  .field-label-br {
    display: block;
  }
  .wish-toggle {
    display: none;
  }
  r .wish-panel {
    display: flex;
    width: 100%;
  }
  .wish-block {
    margin-top: 24px;
  }
  .wish-panel .field-label {
    font-size: 14px;
    line-height: 20px;
  }
  .amounts {
    flex-wrap: wrap;
    gap: 8px 4px;
  }
  .amount-btn {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    padding: 14px 8px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1px;
  }
  .custom-amount {
    flex: 1 1 100%;
    width: 100%;
    height: auto;
    padding: 13px 16px;
  }
  .custom-amount span {
    font-size: 14px;
    line-height: 20px;
  }
  .ornament-tile {
    --ornament-tile-size: 220px;
  }
  .ornament-grid {
    gap: 0;
  }
  .ornament-rail {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  .ornament-controls {
    width: calc(100% - 32px);
    gap: 24px;
  }
  .ornament-pay {
    gap: 16px;
  }
  .ornament-preview-wrap {
    left: -9999px;
  }
  .pay-btn {
    white-space: normal;
    min-height: 54px;
    font-size: 15px;
    padding: 16px 20px;
  }
  .how {
    padding-bottom: 64px;
  }
  .how .container {
    width: calc(100% - 32px);
    gap: 32px;
  }
  .how-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .how h2 {
    font-size: 32px;
    line-height: 32px;
    font-weight: 800;
  }
  .how-card {
    min-height: 200px;
    height: 200px;
    padding: 24px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: transparent;
    justify-content: space-between;
  }
  .how-card h3 {
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: 1px;
  }
  .how-card p {
    font-size: 14px;
    line-height: 20px;
  }
  /* Footer — макет 8:664 */
  .site-footer {
    padding: 0 16px 24px;
    width: 100%;
  }
  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: none;
    margin: 0;
    gap: 16px;
  }
  .footer-brand p {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
    gap: 40px;
    min-height: 0;
    text-align: left;
    grid-template-areas:
      "brand"
      "docs"
      "nav"
      "made"
      "copy";
  }
  .footer-col--docs,
  .footer-col--nav {
    width: 100%;
  }
  .footer-col h4 {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1px;
    text-align: left;
  }
  .footer-col a,
  .footer-col button {
    margin-bottom: 12px;
    text-align: left;
    font-size: 14px;
    line-height: 20px;
  }
  /* как на планшете: «Сделано с любовью» + лого philgood */
  .footer-made {
    display: flex;
    margin-top: 0;
    align-items: flex-start;
  }
  .footer-copy {
    margin-top: 0;
    text-align: left;
    white-space: normal;
    width: auto;
    font-size: 14px;
    line-height: 20px;
  }
  .modal-card {
    padding: 24px;
    border-radius: 24px;
    gap: 24px;
  }
  .modal-actions-row {
    flex-direction: column;
  }
  /* Figma 8:121 — попап «О фонде» mobile fullscreen */
  .modal--about {
    padding: 0;
    align-items: stretch;
  }
  .modal--about .modal-backdrop {
    background: var(--Bg-Bg_primary, #f4f8fd);
    backdrop-filter: none;
  }
  .modal-card--about {
    width: 100%;
    max-width: none;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 68px 16px 40px;
    gap: 32px;
    justify-content: center;
    box-sizing: border-box;
  }
  .modal-card--about .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
  }
  .modal-card--about .modal-about-main {
    gap: 24px;
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--about .modal-body-stack {
    gap: 24px;
  }
  .modal-card--about h2 {
    font-size: 30px;
    line-height: 34px;
    font-weight: 600;
  }
  .modal-card--about .modal-text {
    font-size: 14px;
    line-height: 20px;
  }
  .modal-card--about .modal-actions {
    gap: 8px;
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--about .modal-actions .btn-primary,
  .modal-card--about .modal-actions-row .btn-secondary {
    min-height: 54px;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 24px;
    white-space: normal;
  }
  .modal-card--about .about-btn-br {
    display: block;
  }
  /* Figma 8:80 — попап «Спасибо» mobile fullscreen */
  .modal--thanks {
    padding: 0;
    align-items: stretch;
  }
  .modal--thanks .modal-backdrop {
    background: var(--Bg-Bg_primary, #f4f8fd);
    backdrop-filter: none;
  }
  .modal-card--thanks {
    width: 100%;
    max-width: none;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 68px 16px 40px;
    gap: 32px;
    justify-content: center;
    box-sizing: border-box;
  }
  .modal-card--thanks .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
  }
  .modal-card--thanks .modal-body-stack {
    gap: 16px;
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--thanks h2 {
    font-size: 30px;
    line-height: 34px;
    font-weight: 600;
  }
  .modal-card--thanks .thanks-hyphen,
  .modal-card--thanks .thanks-title-br {
    display: inline;
  }
  .modal-card--thanks .thanks-title-br {
    display: block;
  }
  .modal-card--thanks .modal-text {
    max-width: none;
    font-size: 14px;
    line-height: 20px;
  }
  .modal-card--thanks .modal-actions {
    gap: 8px;
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--thanks .modal-actions .btn-primary,
  .modal-card--thanks .modal-actions-row .btn-secondary {
    min-height: 54px;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 24px;
    white-space: normal;
  }
  /* Figma 8:97 — попап «Поделиться» mobile fullscreen */
  .modal--share {
    padding: 0;
    align-items: stretch;
  }
  .modal--share .modal-backdrop {
    background: var(--Bg-Bg_primary, #f4f8fd);
    backdrop-filter: none;
  }
  .modal-card--share {
    width: 100%;
    max-width: none;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 68px 16px 40px;
    gap: 32px;
    justify-content: center;
    box-sizing: border-box;
  }
  .modal-card--share .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
  }
  .modal-card--share .modal-body-stack {
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--share h2 {
    font-size: 30px;
    line-height: 34px;
    font-weight: 600;
  }
  .modal-card--share .share-grid {
    width: min(343px, 100%);
    margin: 0 auto;
  }
  .modal-card--share .share-btn {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }
}

/* Mobile hero — макет 8:682 (375), фон + композиция только ≤500px */
@media (max-width: 500px) {
  .hero {
    height: calc(100vw * 850 / 375);
    min-height: calc(100vw * 850 / 375);
  }
  .hero-bg--desktop,
  .hero-bg--tablet {
    display: none;
  }
  .hero-bg--mobile {
    display: block;
    inset: auto;
    left: 0;
    top: -12.35%;
    width: 204.8%;
    height: 135.51%;
    max-width: none;
    object-fit: cover;
    object-position: left center;
  }
  .hero-tree-stage {
    left: 50%;
    right: auto;
    width: 91.47%;
    max-width: none;
    height: 62%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
  }
  .hero-title {
    font-size: 32px;
    line-height: 32px;
  }
}

body.modal-open {
  overflow: hidden;
}
