/* ===== Tokens (from reference/d.css) ===== */
:root {
  --ph-primary: rgb(19, 19, 32);
  --ph-muted: rgb(157, 193, 198);
  --ph-line: rgb(239, 242, 247);
  --ph-accent: rgb(87, 188, 207);
  --ph-white: rgb(255, 255, 255);
  --ph-accent-deep: rgb(71, 171, 190);
  --ph-accent-tint-1: rgb(220, 249, 255);
  --ph-accent-tint-2: rgb(240, 253, 255);
  --ph-accent-tint-3: rgb(235, 252, 255);
  --ph-accent-soft: rgb(177, 199, 203);
  --ph-ink-2: rgb(38, 42, 45);
  --ph-ink-3: rgb(36, 38, 43);
  --ph-grey-1: rgb(194, 194, 194);
  --ph-grey-2: rgb(218, 218, 218);
  --ph-grey-3: rgb(238, 238, 238);
  --ph-grey-4: rgb(217, 217, 217);
  --ph-grey-5: rgb(192, 192, 192);
  --ph-lavender-1: rgb(206, 206, 221);
  --ph-lavender-2: rgb(229, 229, 239);
  --ph-lavender-3: rgb(216, 216, 231);
  --ph-lavender-4: rgb(141, 141, 173);
  --ph-success: rgb(0, 211, 78);
  --ph-mint: rgb(0, 213, 183);
  --ph-warning: rgb(255, 149, 0);
  --ph-danger: rgb(209, 5, 42);
  --ph-gradient-accent: linear-gradient(108.818deg, rgb(87, 188, 207) -1.01%, rgb(71, 171, 190) 101.01%);
  --ph-gradient-tint: linear-gradient(145.741deg, rgb(220, 249, 255) 4.74%, rgb(240, 253, 255) 93.92%);

  --font-display: "Comfortaa", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --type-display-xl: 700 64px/1.1 var(--font-display);
  --type-display-l: 700 52px/1.1 var(--font-display);
  --type-display-m: 700 38px/1.1 var(--font-display);
  --type-display-s: 700 30px/1.2 var(--font-display);
  --type-display-xs: 700 22px/1.2 var(--font-display);
  --type-number-l: 400 36px/1.1 var(--font-display);
  --type-number-m: 600 20px/1.3 var(--font-display);
  --type-number-s: 600 16px/1.2 var(--font-display);
  --type-title: 500 22px/1.1 var(--font-body);
  --type-subtitle: 500 18px/1.2 var(--font-body);
  --type-body-l: 500 16px/1.2 var(--font-body);
  --type-body: 500 14px/1.2 var(--font-body);
  --type-body-strong: 600 14px/1.2 var(--font-body);
  --type-label: 600 16px/1.2 var(--font-body);
  --type-caption: 500 12px/1.2 var(--font-body);
  --type-caption-strong: 600 12px/1.2 var(--font-body);
  --type-micro: 500 10px/1 var(--font-body);
  --type-micro-strong: 600 10px/1.2 var(--font-body);

  --radius-chip: 12px;
  --radius-button: 16px;
  --radius-button-lg: 24px;
  --radius-row: 22px;
  --radius-tile: 26px;
  --radius-card: 40px;
  --radius-card-sm: 20px;
  --radius-card-md: 30px;
  --radius-hero: 38px;
  --radius-pill: 100px;
  --stroke-card: inset 0 0 0 1px var(--ph-line);
  --stroke-card-site: inset 0 0 0 1px var(--ph-grey-3);
  --stroke-accent: inset 0 0 0 1px var(--ph-accent);
  --shadow-float: 2px 2px 24px 0 rgba(18, 63, 73, 0.2);
  --shadow-card: 6px 6px 44px 0 rgba(0, 0, 0, 0.1);
  --blur-glass: blur(34px);

  --bp: 1024px;
}

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/comfortaa-cyrillic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/comfortaa-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  background: var(--ph-white);
  color: var(--ph-primary);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-width: 320px;
}

a {
  color: var(--ph-accent);
}

a:hover {
  color: var(--ph-accent-deep);
}

button,
input {
  font-family: var(--font-body);
}

input::placeholder {
  color: var(--ph-grey-1);
}

:focus-visible {
  outline: 2px solid var(--ph-accent);
  outline-offset: 2px;
}

.ev-antispam {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Buttons ===== */
.ev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: opacity 0.15s;
  white-space: nowrap;
  text-align: center;
}

.ev-btn:disabled,
.ev-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ev-btn--accent {
  background: var(--ph-gradient-accent);
  color: var(--ph-white);
}

.ev-btn--xl {
  width: 100%;
  height: 68px;
  padding: 0 14px;
  border-radius: var(--radius-button-lg);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  white-space: normal;
}

.ev-btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* ===== Progress ===== */
.ev-progress {
  overflow: hidden;
  background: var(--ph-accent-tint-1);
}

.ev-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--ph-gradient-accent);
  transition: width 0.6s ease;
}

.ev-progress--sm {
  height: 6px;
  border-radius: 6px;
}

.ev-progress--sm .ev-progress__bar {
  border-radius: 6px;
}

.ev-progress--hero {
  height: 8px;
  border-radius: 8px;
  margin-top: 10px;
}

.ev-progress--hero .ev-progress__bar {
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .ev-progress__bar,
  .ev-tile.is-flash,
  .ev-switch__knob {
    transition: none !important;
  }
}

/* ===== Layout (mobile-first) ===== */
.ev-page {
  min-height: 100vh;
}

.ev-main {
  width: 100%;
}

.ev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "pay"
    "donations"
    "foot";
  gap: 0;
  padding: 0 0 32px;
}

.ev-hero { grid-area: hero; }
.ev-pay-wrap { grid-area: pay; }
.ev-donations { grid-area: donations; }
.ev-foot { grid-area: foot; }

/* ===== Header ===== */
.ev-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ph-line);
}

.ev-header__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 12px 0 10px;
  max-width: 1362px;
  margin: 0 auto;
}

.ev-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ph-primary);
  min-width: 0;
  flex: 1 1 auto;
}

.ev-header__logo {
  height: 50px;
  width: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.ev-header__divider {
  width: 1px;
  height: 30px;
  background: var(--ph-line);
  flex-shrink: 0;
}

.ev-header__titles {
  min-width: 0;
}

.ev-header__title {
  display: block;
  font: var(--type-caption-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-header__subtitle {
  display: block;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-header__subtitle--desk {
  display: none;
}

.ev-header__progress {
  display: none;
}

.ev-header__help {
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: 13px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  min-width: 44px;
  min-height: 38px;
}

/* ===== Hero ===== */
.ev-hero {
  position: relative;
}

.ev-hero__banner {
  background: var(--ph-gradient-accent);
  color: #fff;
  padding: 24px 20px 52px;
  border-radius: 0 0 32px 32px;
}

.ev-statusbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 9px;
  font: var(--type-micro-strong);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: var(--blur-glass);
}

.ev-statusbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

.ev-statusbar[data-state="live"] .ev-statusbar__dot {
  animation: ev-pulse 1.6s ease-in-out infinite;
}

@keyframes ev-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .ev-statusbar[data-state="live"] .ev-statusbar__dot {
    animation: none;
  }
}

.ev-hero__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.ev-hero__lead {
  margin: 10px 0 0;
  line-height: 1.45;
  opacity: 0.92;
}

.ev-hero__stats {
  margin: -30px 16px 0;
  position: relative;
  z-index: 2;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(46, 120, 135, 0.14), inset 0 0 0 1px var(--ph-grey-3);
  padding: 16px;
}

.ev-hero__card-top {
  display: flex;
  justify-content: space-between;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
}

.ev-hero__sum-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.ev-hero__sum {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ph-primary);
  white-space: nowrap;
}

.ev-hero__sum-of {
  font: var(--type-caption);
  color: var(--ph-lavender-4);
  white-space: nowrap;
}

.ev-hero__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.ev-tile {
  border-radius: 14px;
  background: var(--ph-accent-tint-2);
  padding: 8px 10px;
  min-width: 0;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.ev-tile.is-flash {
  background: var(--ph-accent-tint-1);
  box-shadow: inset 0 0 0 1px var(--ph-accent);
}

.ev-tile__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ph-primary);
  white-space: nowrap;
}

.ev-tile__label {
  font-size: 10px;
  color: var(--ph-lavender-4);
  margin-top: 3px;
}

.ev-tile--percent {
  display: none;
}

.ev-tile__label-full,
.ev-tile__remaining-full {
  display: none;
}

.ev-tile__label-short,
.ev-tile__remaining-short {
  display: inline;
}

.ev-hero__live {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 16px 0;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
}

.ev-hero__live.is-error {
  color: var(--ph-lavender-4);
  opacity: 0.85;
}

.ev-hero__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ph-success);
  flex-shrink: 0;
}

.ev-hero__live.is-error .ev-hero__live-dot {
  background: var(--ph-warning);
}

/* ===== Pay form ===== */
.ev-pay-wrap {
  padding: 36px 16px 0;
}

.ev-pay {
  position: relative;
  border-radius: 26px;
  background: var(--ph-gradient-tint);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ev-pay > .ev-pay__head,
.ev-pay > .ev-pay__autopay,
.ev-pay > .ev-field--name,
.ev-pay > .ev-check--policy,
.ev-pay > .form-response,
.ev-pay > .ev-pay__finished {
  /* on mobile some desktop-only bits stay but head/avg shown differently */
}

.ev-pay__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 0 4px;
}

.ev-pay__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ev-pay__sub {
  display: none;
  margin: 4px 0 0;
  font: var(--type-micro);
  color: var(--ph-muted);
}

.ev-pay__avg {
  display: none;
  text-align: right;
}

.ev-pay__avg-value {
  font: var(--type-number-s);
  color: var(--ph-accent);
}

.ev-pay__avg-label {
  font: var(--type-micro);
  color: var(--ph-muted);
}

.ev-pay__autopay {
  display: none;
  align-items: center;
  gap: 12px;
  border: 0;
  text-align: left;
  border-radius: 20px;
  padding: 12px 14px;
  background: var(--ph-accent-tint-2);
  width: 100%;
}

.ev-pay__autopay-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ph-accent);
  flex-shrink: 0;
}

.ev-pay__autopay-title {
  display: block;
  font: var(--type-caption-strong);
}

.ev-pay__autopay-sub {
  display: block;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
  margin-top: 3px;
}

.ev-switch {
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: var(--ph-lavender-2);
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.ev-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}

.ev-switch[aria-checked="true"] {
  background: var(--ph-accent);
}

.ev-switch[aria-checked="true"] .ev-switch__knob {
  left: 19px;
}

.ev-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 14px;
  background: var(--ph-accent-tint-2);
}

.ev-seg__item {
  position: relative;
  cursor: pointer;
}

.ev-seg__item input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ev-seg__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 11px;
  font: var(--type-caption-strong);
  color: var(--ph-primary);
  background: transparent;
  min-height: 38px;
}

.ev-seg__item input:checked + span {
  background: var(--ph-primary);
  color: #fff;
}

.ev-seg__item input:focus-visible + span {
  outline: 2px solid var(--ph-accent);
  outline-offset: 2px;
}

.ev-pay__regular {
  display: grid;
  gap: 10px;
}

.ev-pay__regular[hidden] {
  display: none !important;
}

.ev-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
  line-height: 1.4;
}

.ev-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ev-check__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--ph-lavender-2);
  box-shadow: inset 0 0 0 1px var(--ph-lavender-3);
  position: relative;
}

.ev-check input:checked + .ev-check__box {
  background: var(--ph-accent);
  box-shadow: none;
}

.ev-check input:checked + .ev-check__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ev-check--policy {
  display: flex;
}

.ev-field {
  height: 46px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--ph-lavender-2);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  background: #fff;
}

.ev-field__input {
  flex: 1 1 0%;
  min-width: 0;
  border: 0;
  outline: 0;
  font: var(--type-caption);
  background: transparent;
}

.ev-field__input:disabled {
  opacity: 0.45;
}

.ev-field__label {
  font: var(--type-caption);
  color: var(--ph-lavender-4);
  white-space: nowrap;
}

.ev-field--tel {
  display: none;
}

.ev-pay:not(.ev-pay--hide-tel) .ev-field--tel,
.ev-pay.ev-pay--regular .ev-field--tel {
  display: flex;
}

.ev-field__anon {
  display: flex;
  align-items: center;
  gap: 6px;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.ev-field__anon-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ev-field__anon-box {
  color: var(--ph-lavender-3);
  display: grid;
  place-items: center;
}

.ev-field__anon-input:checked ~ .ev-field__anon-box svg rect {
  fill: var(--ph-accent);
}

.ev-portions {
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px var(--ph-lavender-2);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  background: #fff;
}

.ev-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-stepper__btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  background: var(--ph-accent-tint-2);
  color: var(--ph-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
}

.ev-stepper__center {
  flex: 1 1 0%;
  text-align: center;
}

.ev-stepper__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.ev-stepper__input {
  width: 2ch;
  border: 0;
  outline: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ph-primary);
  background: transparent;
  padding: 0;
}

.ev-stepper__value span {
  font: var(--type-caption-strong);
}

.ev-stepper__hint {
  font-size: 10px;
  color: var(--ph-muted);
  margin-top: 2px;
}

.ev-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ev-preset {
  border: 0;
  cursor: pointer;
  height: 48px;
  min-height: 44px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #fff;
  color: var(--ph-primary);
  box-shadow: inset 0 0 0 1px var(--ph-line);
  padding: 0 2px;
}

.ev-preset.is-active {
  background: var(--ph-primary);
  color: #fff;
  box-shadow: none;
}

.ev-preset__n {
  font-size: 12px;
  white-space: nowrap;
}

.ev-preset__n::after {
  content: none;
}

/* Mobile: short labels like "1", "5" — hide "порция/порций" via CSS on short */
.ev-preset__n {
  font-size: 12px;
}

.ev-preset[data-portions="1"] .ev-preset__n { font-size: 0; }
.ev-preset[data-portions="1"] .ev-preset__n::before { content: "1"; font-size: 12px; }
.ev-preset[data-portions="5"] .ev-preset__n { font-size: 0; }
.ev-preset[data-portions="5"] .ev-preset__n::before { content: "5"; font-size: 12px; }
.ev-preset[data-portions="10"] .ev-preset__n { font-size: 0; }
.ev-preset[data-portions="10"] .ev-preset__n::before { content: "10"; font-size: 12px; }
.ev-preset[data-portions="30"] .ev-preset__n { font-size: 0; }
.ev-preset[data-portions="30"] .ev-preset__n::before { content: "30"; font-size: 12px; }

.ev-preset__sum {
  font-size: 10px;
  opacity: 0.7;
}

.ev-sum {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  border-radius: 14px;
  background: var(--ph-accent-tint-2);
  padding: 0 14px;
}

.ev-sum__label {
  font: var(--type-caption);
  color: var(--ph-lavender-4);
  white-space: nowrap;
}

.ev-sum__label {
  font-size: 0;
}

.ev-sum__label::before {
  content: "Своя сумма";
  font: var(--type-caption);
  color: var(--ph-lavender-4);
}

.ev-sum__input {
  flex: 1 1 0%;
  min-width: 0;
  border: 0;
  outline: 0;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ph-primary);
  background: transparent;
}

.ev-sum__rub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.ev-portions__hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  font: var(--type-caption);
  color: var(--ph-primary);
  line-height: 1.35;
}

.ev-portions__hint svg {
  color: var(--ph-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.ev-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ev-method {
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.ev-method input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ev-method__card {
  height: 56px;
  min-height: 44px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ph-line);
  padding: 6px 8px;
}

.ev-method input:checked + .ev-method__card {
  background: var(--ph-accent-tint-2);
  box-shadow: inset 0 0 0 1.5px var(--ph-accent);
}

.ev-method input:focus-visible + .ev-method__card {
  outline: 2px solid var(--ph-accent);
  outline-offset: 2px;
}

.ev-method__icon {
  height: 16px;
  width: 70%;
  max-width: 60px;
  object-fit: contain;
  display: block;
}

.ev-method__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.ev-method__name {
  font: var(--type-micro);
  color: var(--ph-lavender-4);
}

.ev-method__desc {
  display: none;
}

.ev-pay__submit + .ev-pay__finished {
  margin: 0;
}

.ev-pay__finished {
  margin: 0;
  text-align: center;
  font: var(--type-caption);
  color: var(--ph-lavender-4);
}

.ev-pay.is-finished .ev-pay__submit {
  display: none;
}

.ev-pay.is-finished .ev-pay__finished {
  display: block;
}

.form-response {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(209, 5, 42, 0.08);
  color: var(--ph-danger);
  font: var(--type-caption);
}

.form-response[hidden] {
  display: none !important;
}

.form-response.is-ok {
  background: rgba(0, 211, 78, 0.1);
  color: var(--ph-primary);
}

.ev-pay .ev-check--policy + .form-response,
.ev-pay .ev-methods + .ev-check--policy {
  /* keep cascade stable */
}

.ev-check--policy {
  align-items: flex-start;
}

.ev-check--policy .ev-check__text {
  font: var(--type-caption);
  color: var(--ph-lavender-4);
  line-height: 1.4;
}

.ev-pay > .ev-seg {
  background: var(--ph-accent-tint-2);
}

.ev-pay > .ev-portions,
.ev-pay > .ev-field--name,
.ev-pay > .ev-field--tel {
  background: #fff;
}

.ev-pay > .ev-methods,
.ev-pay > .ev-check--policy,
.ev-pay > .form-response {
  background: transparent;
}

.ev-pay > .ev-pay__submit {
  background: var(--ph-gradient-accent);
}

/* ===== Donations ===== */
.ev-donations {
  padding: 36px 16px 0;
}

.ev-donations__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ev-donations__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ev-donations__sub {
  display: none;
  margin: 10px 0 0;
  font: var(--type-body);
  color: var(--ph-lavender-4);
}

.ev-donations__count {
  font: var(--type-caption-strong);
  color: var(--ph-accent);
  white-space: nowrap;
}

.ev-donations__table {
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px var(--ph-grey-3);
  padding: 4px 14px;
}

.ev-donations__cols {
  display: none;
}

.ev-donations__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ev-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar name sum"
    "avatar meta sum";
  column-gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--ph-line);
  font: var(--type-caption);
}

.ev-row:last-child {
  border-bottom: 0;
}

.ev-row__avatar {
  grid-area: avatar;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ph-accent-tint-2);
  color: var(--ph-accent-deep);
  display: grid;
  place-items: center;
  font: var(--type-caption-strong);
  flex-shrink: 0;
}

.ev-row[data-anon="1"] .ev-row__avatar {
  background: var(--ph-line);
  color: var(--ph-lavender-4);
}

.ev-row__name {
  grid-area: name;
  font: var(--type-caption-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: end;
}

.ev-row__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 0;
  font: var(--type-micro);
  color: var(--ph-lavender-4);
  margin-top: 3px;
  align-self: start;
}

.ev-row__time::after {
  content: " · ";
}

.ev-row__portions::after {
  content: " порций";
}

.ev-row__method {
  display: none;
}

.ev-row__sum {
  grid-area: sum;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ph-accent-deep);
  white-space: nowrap;
  justify-self: end;
}

.ev-donations__more {
  margin-top: 12px;
  width: 100%;
  height: 56px;
  min-height: 44px;
  border-radius: 20px;
  border: 0;
  cursor: pointer;
  background: var(--ph-accent-tint-2);
  font: var(--type-caption-strong);
  color: var(--ph-primary);
}

.ev-donations__more[hidden] {
  display: none !important;
}

/* ===== Footer ===== */
.ev-foot {
  margin: 36px 16px 0;
  border-radius: 24px;
  background: var(--ph-accent-tint-2);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.ev-foot__logo {
  width: 52px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 4px;
  flex-shrink: 0;
}

.ev-foot__title {
  font: var(--type-caption-strong);
}

.ev-foot__text {
  color: var(--ph-lavender-4);
  margin-top: 4px;
  line-height: 1.4;
  font-size: 12px;
}

/* ===== Desktop ≥ 1024px ===== */
@media (min-width: 1024px) {
  .ev-header__inner {
    height: 100px;
    padding: 0 20px;
    gap: 24px;
  }

  .ev-header__brand {
    flex: 0 1 auto;
    gap: 14px;
  }

  .ev-header__logo {
    height: 80px;
    width: 96px;
  }

  .ev-header__divider {
    height: 40px;
  }

  .ev-header__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .ev-header__subtitle--mob {
    display: none;
  }

  .ev-header__subtitle--desk {
    display: block;
    font: var(--type-micro);
    color: var(--ph-muted);
    margin-top: 5px;
  }

  .ev-header__progress {
    display: block;
    width: 280px;
    margin-left: auto;
  }

  .ev-header__progress-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
  }

  .ev-header__raised {
    font: var(--type-number-s);
  }

  .ev-header__meta {
    font: var(--type-micro);
    color: var(--ph-muted);
  }

  .ev-header__progress .ev-progress {
    margin-top: 8px;
  }

  .ev-header__help {
    height: 48px;
    padding: 0 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
    margin-left: 0;
  }

  .ev-main {
    max-width: 1362px;
    margin: 0 auto;
    padding: 24px 20px 0;
  }

  .ev-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-areas:
      "hero pay"
      "donations pay"
      "foot foot";
    gap: 24px;
    align-items: start;
    padding: 0;
  }

  .ev-hero__banner {
    border-radius: 50px;
    padding: 48px 52px 0;
  }

  .ev-statusbar {
    height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    gap: 8px;
    font: var(--type-caption-strong);
    backdrop-filter: none;
  }

  .ev-statusbar__dot {
    width: 8px;
    height: 8px;
  }

  .ev-hero__title {
    margin-top: 20px;
    font-size: 64px;
    line-height: 1.05;
  }

  .ev-hero__lead {
    margin-top: 16px;
    max-width: 560px;
    opacity: 0.94;
  }

  .ev-hero {
    display: flex;
    flex-direction: column;
    border-radius: 50px;
    overflow: hidden;
    background: var(--ph-gradient-accent);
  }

  .ev-hero__banner {
    padding: 48px 52px 0;
    border-radius: 0;
    background: transparent;
  }

  .ev-hero__stats {
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 52px 48px;
    color: #fff;
  }

  .ev-hero__card-top {
    display: none;
  }

  .ev-hero__sum-block {
    margin-top: 44px;
    gap: 14px;
  }

  .ev-hero__sum {
    font-size: 72px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fff;
  }

  .ev-hero__sum-of {
    font: var(--type-title);
    color: #fff;
    opacity: 0.9;
  }

  .ev-progress--hero {
    height: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.28);
    margin-top: 20px;
  }

  .ev-progress--hero .ev-progress__bar {
    border-radius: 14px;
    background: #fff;
  }

  .ev-hero__tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
  }

  .ev-tile {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    padding: 14px 16px;
  }

  .ev-tile.is-flash {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  }

  .ev-tile__value {
    font-size: 24px;
    line-height: 1.1;
    color: #fff;
  }

  .ev-tile__label {
    font: var(--type-caption);
    color: #fff;
    opacity: 0.9;
    margin-top: 4px;
  }

  .ev-tile--percent {
    display: block;
  }

  .ev-tile__label-full,
  .ev-tile__remaining-full {
    display: inline;
  }

  .ev-tile__label-short,
  .ev-tile__remaining-short {
    display: none;
  }

  .ev-hero__live {
    margin: 12px 4px 0;
    color: var(--ph-lavender-4);
  }

  /* Pay sticky */
  .ev-pay-wrap {
    position: sticky;
    top: 124px;
    padding: 0;
    align-self: start;
  }

  .ev-pay {
    border-radius: 40px;
    background: #fff;
    box-shadow: 6px 6px 44px rgba(0, 0, 0, 0.08), inset 0 0 0 1px var(--ph-grey-3);
    padding: 28px;
    gap: 14px;
  }

  .ev-pay__title {
    font-size: 18px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0;
  }

  .ev-pay__sub {
    display: block;
  }

  .ev-pay__avg {
    display: block;
  }

  .ev-pay__autopay {
    display: flex;
  }

  .ev-seg {
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
  }

  .ev-seg__item span {
    height: 36px;
    border-radius: 12px;
  }

  .ev-field {
    height: 46px;
    border-radius: 16px;
  }

  .ev-stepper__btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    min-width: 30px;
    min-height: 30px;
  }

  .ev-stepper__input {
    font-size: 24px;
    width: auto;
    min-width: 1.2ch;
  }

  .ev-preset {
    height: 46px;
  }

  .ev-preset[data-portions] .ev-preset__n {
    font-size: 11px;
  }

  .ev-preset[data-portions] .ev-preset__n::before {
    content: none;
  }

  .ev-preset[data-portions="1"] .ev-preset__n,
  .ev-preset[data-portions="5"] .ev-preset__n,
  .ev-preset[data-portions="10"] .ev-preset__n,
  .ev-preset[data-portions="30"] .ev-preset__n {
    font-size: 11px;
  }

  .ev-sum__label {
    font-size: unset;
  }

  .ev-sum__label::before {
    content: none;
  }

  .ev-sum__label {
    font: var(--type-caption);
    color: var(--ph-lavender-4);
  }

  .ev-methods {
    grid-template-columns: 1fr 1fr;
  }

  .ev-method__card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 50px;
    height: auto;
    border-radius: 16px;
    padding: 8px 10px;
    text-align: left;
  }

  .ev-method__icon {
    width: 52px;
    height: 20px;
    max-width: none;
    flex-shrink: 0;
  }

  .ev-method__text {
    align-items: flex-start;
    flex: 1 1 0%;
    min-width: 0;
  }

  .ev-method__name {
    display: block;
    font: var(--type-caption-strong);
    color: var(--ph-primary);
  }

  .ev-method__desc {
    display: block;
    font: var(--type-micro);
    color: var(--ph-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ev-pay > .ev-seg {
    background: var(--ph-accent-tint-2);
  }

  .ev-pay > .ev-pay__submit {
    background: var(--ph-gradient-accent);
  }

  .ev-pay > .ev-check--policy,
  .ev-pay > .ev-methods,
  .ev-pay > .form-response {
    background: transparent;
  }

  /* Donations table */
  .ev-donations {
    padding: 36px 0 0;
  }

  .ev-donations__head {
    gap: 20px;
    margin-bottom: 0;
  }

  .ev-donations__title {
    font-size: 38px;
    line-height: 1.1;
  }

  .ev-donations__sub {
    display: block;
  }

  .ev-donations__count {
    color: var(--ph-accent-deep);
  }

  .ev-donations__table {
    margin-top: 20px;
    border-radius: 30px;
    box-shadow: var(--stroke-card-site);
    padding: 0;
    overflow: hidden;
  }

  .ev-donations__cols {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 160px 140px 140px 140px;
    gap: 16px;
    padding: 14px 24px;
    font: var(--type-micro);
    color: var(--ph-muted);
    background: var(--ph-accent-tint-2);
  }

  .ev-donations__cols span:last-child {
    text-align: right;
  }

  .ev-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 160px 140px 140px 140px;
    grid-template-areas: none;
    gap: 16px;
    padding: 12px 24px;
    align-items: center;
    border-top: 1px solid var(--ph-line);
  }

  .ev-row__avatar,
  .ev-row__name,
  .ev-row__meta,
  .ev-row__time,
  .ev-row__portions,
  .ev-row__method,
  .ev-row__sum {
    grid-area: auto;
    margin-top: 0;
    align-self: center;
  }

  .ev-row:first-child {
    border-top: 0;
  }

  .ev-row__meta {
    display: contents;
  }

  .ev-row__time::after,
  .ev-row__portions::after {
    content: none;
  }

  .ev-row__name {
    font-weight: 600;
    align-self: center;
  }

  .ev-row__time {
    color: var(--ph-muted);
  }

  .ev-row__method {
    display: block;
    color: var(--ph-lavender-4);
  }

  .ev-row__sum {
    text-align: right;
    font: var(--type-number-s);
    justify-self: stretch;
  }

  .ev-donations__more {
    margin-top: 12px;
  }

  .ev-foot {
    margin: 64px 0;
    border-radius: 50px;
    background: var(--ph-gradient-tint);
    padding: 36px 44px;
    gap: 24px;
  }

  .ev-foot__logo {
    width: 96px;
    height: 80px;
    border-radius: 24px;
    padding: 8px;
  }

  .ev-foot__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .ev-foot__text {
    font: var(--type-body);
    margin-top: 8px;
  }
}

/* Slightly wider pay column on large screens */
@media (min-width: 1200px) {
  .ev-layout {
    grid-template-columns: minmax(0, 1fr) 460px;
  }
}

.ev-donations__empty {
  margin: 16px 0 0;
  padding: 28px 20px;
  text-align: center;
  font: var(--type-body);
  color: var(--ph-lavender-4);
  background: var(--ph-accent-tint-2);
  border-radius: var(--radius-row);
}


/* --- Правки по макету формы --- */
.ev-pay__autopay-text {
  flex: 1 1 0%;
  min-width: 0;
}
.ev-pay__autopay .ev-switch {
  margin-left: auto;
}

.ev-seg--sm {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

/* «Анонимно»: пустой квадрат, галочка только когда отмечено */
.ev-field__anon-box svg rect {
  fill: #fff;
  stroke: var(--ph-lavender-3);
  stroke-width: 1.2;
}
.ev-field__anon-box svg path {
  opacity: 0;
}
.ev-field__anon-input:checked ~ .ev-field__anon-box svg rect {
  fill: #444445;
  stroke: #444445;
}
.ev-field__anon-input:checked ~ .ev-field__anon-box svg path {
  opacity: 1;
}

/* Согласие с офертой — как в макете: акцентная галочка + текст */
.ev-check--policy {
  align-items: center;
  gap: 8px;
}
.ev-check--policy .ev-check__box {
  width: 16px;
  height: 16px;
  margin-top: 0;
  border-radius: 5px;
}
.ev-check--policy input:checked + .ev-check__box::after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
}
.ev-check--policy .ev-check__text {
  font: var(--type-caption);
  color: var(--ph-primary);
}
.ev-check--policy .ev-check__text a {
  color: var(--ph-accent);
}

/* Логотипы способов оплаты */
.ev-method__icon {
  object-fit: contain;
}

/* --- Периоды автоплатежа и согласие: точно как в макете --- */
.ev-pay > .ev-seg.ev-seg--sm,
.ev-seg.ev-seg--sm {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.ev-seg--sm .ev-seg__item span {
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
  padding: 0 4px;
  white-space: nowrap;
  font: var(--type-micro-strong);
  color: var(--ph-primary);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ph-line);
}
.ev-seg--sm .ev-seg__item input:checked + span {
  background: var(--ph-accent-tint-2);
  color: var(--ph-accent-deep);
  box-shadow: inset 0 0 0 1.5px var(--ph-accent);
}

.ev-check--policy {
  gap: 8px;
  align-items: flex-start;
}
.ev-check--policy .ev-check__text {
  font: var(--type-micro);
  line-height: 1.4;
  color: var(--ph-lavender-4);
}
.ev-check--policy .ev-check__text a {
  color: var(--ph-accent);
  text-decoration: underline;
}
.ev-check--policy .ev-check__box {
  margin-top: -1px;
}

/* ===== Вечер: фон шапки (картинка + градиент), форма «сколько человек» ===== */
.ev-hero--image .ev-hero__banner {
  background-color: var(--ph-accent);
  background-image:
    linear-gradient(rgba(46, 140, 160, 0.35) 0%, rgba(30, 110, 130, 0.82) 60%, rgba(25, 95, 115, 0.94) 100%),
    var(--ev-hero-img);
  background-size: auto, cover;
  background-position: 0 0, center 25%;
  background-repeat: no-repeat;
  padding-top: 150px;
}

@media (min-width: 1024px) {
  .ev-hero--image {
    background-color: var(--ph-accent);
    background-image:
      linear-gradient(rgba(46, 140, 160, 0.35) 0%, rgba(30, 110, 130, 0.82) 60%, rgba(25, 95, 115, 0.94) 100%),
      var(--ev-hero-img);
    background-size: auto, cover;
    background-position: 0 0, center 25%;
    background-repeat: no-repeat;
  }

  .ev-hero--image .ev-hero__banner {
    background: transparent;
    padding-top: 150px;
  }
}

.ev-pay .ev-portions__caption {
  text-align: center;
  font: var(--type-caption);
  color: var(--ph-lavender-4);
  margin-bottom: 8px;
}

.ev-pay .ev-stepper {
  gap: 12px;
}

.ev-pay .ev-stepper__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--ph-accent);
  color: #fff;
}

.ev-pay .ev-stepper__center {
  flex: 1 1 0%;
  min-width: 0;
}

.ev-pay .ev-stepper__value {
  display: block;
}

.ev-pay .ev-stepper__input {
  display: block;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border: 2px solid var(--ph-accent);
  border-radius: 14px;
  font-size: 24px;
  text-align: center;
  background: #fff;
  min-width: 0;
}

.ev-pay .ev-preset {
  height: 40px;
  min-height: 40px;
  border-radius: 14px;
  flex-direction: row;
}

.ev-pay .ev-preset .ev-preset__n {
  font-size: 13px;
  font-weight: 700;
}

.ev-pay .ev-preset .ev-preset__n::before {
  content: none;
}

.ev-pay .ev-preset[data-portions] .ev-preset__n {
  font-size: 13px;
}

@media (min-width: 1024px) {
  .ev-hero__title {
    font-size: clamp(34px, 3.4vw, 64px);
    overflow-wrap: break-word;
  }
}
