:root {
  /* закатная палитра из клипа */
  --bg: #fbf5ea;
  --card: #ffffff;
  --ink: #2e2116;
  --muted: #7b6a58;
  --sun: #f5b301;        /* жёлтый мульчер */
  --sun-dark: #d99a00;
  --sunset: #f08a3c;
  --water-1: #38b2c8;
  --water-2: #0e7c93;
  --deep: #0e5a6b;
  --weeds: #7fae5a;
  --admin: #a9dde7;
  --radius: 22px;
  --shadow: 0 12px 30px -14px rgba(90, 55, 15, .35);

  --v1: #1aa6b7; /* Поповка */
  --v2: #f08a3c; /* Лагуна */
  --v3: #a77bd0; /* Жемчужина */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 900; }
h2 { font-size: 1.35rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

.demo-banner {
  background: var(--sun); color: #4a3500; text-align: center;
  font-weight: 800; font-size: .85rem; padding: 6px 12px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(82vh, 720px);
  display: flex; align-items: flex-start;
  color: #fff;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 62%;
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(46, 24, 6, .62) 0%, rgba(46, 24, 6, .25) 38%, rgba(46, 24, 6, 0) 58%),
    linear-gradient(0deg, var(--bg) 0%, rgba(251, 245, 234, 0) 22%);
}
.hero__inner { position: relative; z-index: 2; padding-top: 36px; padding-bottom: 140px; }
.hero__place {
  display: inline-block; font-weight: 800; font-size: .85rem; letter-spacing: .02em;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px; border-radius: 999px;
}
.hero__title {
  margin-top: 14px;
  font-size: clamp(3rem, 15vw, 5.2rem);
  letter-spacing: -.02em;
  text-shadow: 0 4px 24px rgba(40, 20, 0, .45);
}
.hero__slogan {
  display: inline-block; margin-top: 16px;
  font-weight: 900; font-size: 1.05rem; line-height: 1.3;
  color: var(--ink); background: var(--sun);
  padding: 8px 14px; border-radius: 14px;
  transform: rotate(-1.5deg);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.5);
}

/* ---------- Cards ---------- */
main { position: relative; z-index: 3; margin-top: -110px; display: grid; gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 18px;
}
.card h2 { margin-bottom: 6px; }

/* Total */
.total { text-align: center; padding-top: 0; margin-top: 44px; }
.total__hero { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: -44px; margin-bottom: 10px; }
.total__moose {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: var(--shadow); flex: none;
}
.bubble {
  position: relative; background: var(--sun); color: var(--ink);
  font-weight: 900; font-size: .95rem; line-height: 1.2; text-align: left;
  padding: 8px 12px; border-radius: 14px; margin-top: 30px;
}
.bubble::before {
  content: ""; position: absolute; left: -7px; top: 14px;
  border: 7px solid transparent; border-right-color: var(--sun); border-left: 0;
}
.total__label { font-weight: 800; color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; margin: 0; }
.total__amount {
  font-size: clamp(2.3rem, 11vw, 3.4rem); font-weight: 900; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px;
}
.total__goal { color: var(--muted); font-weight: 700; font-size: 1.05rem; }

.meter { position: relative; margin: 46px 4px 0; }
.meter__track {
  position: relative; height: 26px; border-radius: 999px;
  background: #d9e7c5; overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(60,80,20,.18);
  /* «заросли» — штриховка камыша на незаполненной части */
  background-image: repeating-linear-gradient(100deg, transparent 0 7px, rgba(95,140,50,.35) 7px 9px);
}
.meter__fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(180deg, var(--water-1), var(--water-2));
  border-radius: 999px; overflow: hidden;
}
.meter__wave {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='26' viewBox='0 0 60 26'%3E%3Cpath d='M0 9 Q15 3 30 9 T60 9' stroke='rgba(255,255,255,.5)' stroke-width='2.5' fill='none'/%3E%3Cpath d='M0 18 Q15 12 30 18 T60 18' stroke='rgba(255,255,255,.22)' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") repeat-x;
  animation: wave 3s linear infinite;
}
@keyframes wave { from { background-position: 0 0; } to { background-position: 60px 0; } }
.meter__mulcher {
  position: absolute; bottom: 14px; left: 0; width: 58px; height: 39px;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.25));
  animation: rumble .35s steps(2) infinite;
}
@keyframes rumble { 50% { margin-bottom: 1px; } }
.meter__pct { margin-top: 10px; color: var(--muted); font-weight: 700; }
.meter__pct b { color: var(--deep); font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.total__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.total__stats div { background: var(--bg); border-radius: 16px; padding: 12px 8px; }
.total__stats b { display: block; font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.total__stats span { font-size: .85rem; color: var(--muted); }

.intro { padding: 2px 6px; font-size: 1.05rem; color: #4d3c2b; }

/* Pond */
.pond { margin: 14px 0 12px; }
.pond svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .95rem; }
.legend li { display: flex; align-items: center; gap: 10px; }
.sw { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.sw--admin { background: var(--admin); }
.sw--people { background: var(--water-1); }
.sw--weeds { background: var(--weeds); }

/* Villages */
.section-title { margin: 8px 4px 12px; }
.split {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: #ece2d2; margin-bottom: 14px;
}
.split span { height: 100%; transition: flex-grow 1.4s ease; }
.villages { display: grid; gap: 12px; }
.village {
  position: relative; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 18px 16px 22px; overflow: hidden;
}
.village::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c);
}
.village__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.village__name { font-size: 1.2rem; font-weight: 900; }
.village__share { font-weight: 900; color: var(--c); font-size: 1.1rem; }
.village__sum { font-size: 1.6rem; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.village__bar { height: 8px; background: #f1eadf; border-radius: 999px; margin: 10px 0 8px; overflow: hidden; }
.village__bar i { display: block; height: 100%; width: 0; background: var(--c); border-radius: 999px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.village__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--muted); }
.village__meta a { color: var(--deep); font-weight: 800; }

/* Video */
.video {
  position: relative; aspect-ratio: 9 / 16; width: 100%; max-width: 380px; max-height: 80vh;
  margin: 14px auto 0; border-radius: 18px; overflow: hidden; background: #000;
}
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-card { text-align: center; }

/* Help */
.help p { margin: 4px 0 16px; }
.chats { display: grid; gap: 10px; margin-bottom: 10px; }
.chats:empty { display: none; }
.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 900; font-size: 1.05rem; color: var(--ink); text-decoration: none;
  background: var(--sun);
  padding: 15px 20px; border-radius: 999px;
  box-shadow: 0 8px 18px -8px rgba(217,154,0,.8);
}
.btn--tg { background: #2aabee; color: #fff; box-shadow: 0 8px 18px -8px rgba(42,171,238,.8); }
.btn--max { background: linear-gradient(90deg, #6a5cff, #b04dff); color: #fff; box-shadow: 0 8px 18px -8px rgba(120,80,255,.8); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--sun-dark); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--sunset); outline-offset: 3px; }

.quote { margin: 8px 0 0; text-align: center; }
.quote blockquote { margin: 0; font-size: 1.25rem; font-weight: 900; line-height: 1.3; }
.quote figcaption { color: var(--muted); font-weight: 700; margin-top: 4px; }

.updated { text-align: center; color: var(--muted); font-size: .85rem; margin: 6px 0 4px; }
.footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: .85rem; }

/* Pond SVG animations */
.reed { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 3.5s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.ripple { animation: ripple 3s ease-in-out infinite; }
@keyframes ripple { 0%,100% { opacity: .25; } 50% { opacity: .6; } }

@media (min-width: 640px) {
  .card { padding: 28px; }
  .villages { grid-template-columns: repeat(3, 1fr); }
  .village__sum { font-size: 1.4rem; }
  .btn { width: auto; display: inline-flex; }
  .chats { display: flex; flex-wrap: wrap; }
  .hero__inner { padding-top: 64px; }
  .hero__img { object-position: 50% 40%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
