/* Wepster Pay (/pay/): 5. Де приймати оплату. Токени, основа й телефон — style/pay.css.

   Бенто з шести сценаріїв: головні канали (онлайн, офлайн, чат) — вгорі й більші, три сценарії — рядом нижче.
   У кожній картці маленький живий фрагмент інтерфейсу, намальований у HTML/CSS. Наведення піднімає картку
   (CSS), а мікрорух фрагмента грає, поки на картці клас .is-play: його ставить js/pay-ways.js, коли на картку
   навели мишку, а на тачскринах — коли картка в кадрі. Фрагменти — декор (aria-hidden), той самий зміст є в
   тексті картки.
   ≥1280px — бенто 12 колонок; 768–1279 — дві колонки; ≤767 — горизонтальна карусель зі snap. */

/* =====================================================================
   СІТКА
   ===================================================================== */

.py-wh {
  --wh-gap: 14px;
  --wh-pad: 22px;
  --wh-r1: clamp(236px, 28svh, 290px);
  --wh-r2: clamp(208px, 24svh, 232px);
  --wh-qr: clamp(64px, 8.2svh, 88px);
  --wh-on-accent: #1d4d33;

  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: var(--wh-r1) var(--wh-r2);
  gap: var(--wh-gap);
  margin-top: clamp(22px, 3.2svh, 36px);
}

.py-wh-c--online { grid-column: 1 / span 5; grid-row: 1; }
.py-wh-c--offline { grid-column: 6 / span 4; grid-row: 1; }
.py-wh-c--chat { grid-column: 10 / span 3; grid-row: 1 / span 2; }
.py-wh-c--regular { grid-column: 1 / span 3; grid-row: 2; }
.py-wh-c--prepay { grid-column: 4 / span 3; grid-row: 2; }
.py-wh-c--creators { grid-column: 7 / span 3; grid-row: 2; }

.py-wh-c:nth-child(2) { --i: 1; }
.py-wh-c:nth-child(3) { --i: 2; }
.py-wh-c:nth-child(4) { --i: 3; }
.py-wh-c:nth-child(5) { --i: 4; }
.py-wh-c:nth-child(6) { --i: 5; }

/* =====================================================================
   КАРТКА
   ===================================================================== */

.py-wh-c {
  --i: 0;

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--wh-pad) var(--wh-pad) 0;
  overflow: hidden;
  border-radius: var(--py-r-card);
  background: var(--c-panel);
  transition: transform .5s var(--py-ease), box-shadow .5s var(--py-ease);
}

.py-wh-t {
  font-size: clamp(21px, 1.7vw, 25px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.py-wh-p {
  max-width: 34em;
  margin-top: 6px;
  color: var(--c-soft);
  font-size: 14.5px;
  line-height: 1.42;
}

/* фрагмент інтерфейсу: займає решту картки; нижній і бічні краї картки його обрізають, як у бенто */
.py-wh-ui {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0;
}

/* вільне місце — над фрагментом; якщо його мало, фрагмент виходить униз, під край картки, а не на текст */
.py-wh-ui > :first-child {
  margin-top: auto;
}

.py-wh-ui b {
  font-weight: 700;
}

.py-wh-ui svg {
  display: block;
}

/* чіп статусу: однаковий у «Регулярно» й «Передоплата» */
.py-wh-chip {
  justify-self: end;
  padding: 4px 11px;
  border-radius: var(--py-r-chip);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.py-wh-chip.is-paid {
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

.py-wh-chip.is-soon,
.py-wh-chip.is-wait {
  background: var(--c-bg);
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1.5px var(--c-cost);
}

/* два чіпи в одній клітинці: за наведення «Скоро» змінюється на «Оплачено» */
.py-wh-flip {
  display: inline-grid;
}

.py-wh-flip > .py-wh-chip {
  grid-area: 1 / 1;
}

.py-wh-flip > .is-paid {
  opacity: 0;
  transform: scale(.7);
}

/* =====================================================================
   ОНЛАЙН: кошик у вікні браузера
   ===================================================================== */

.py-wh-c--online {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  column-gap: 22px;
}

.py-wh-c--online > .py-wh-t,
.py-wh-c--online > .py-wh-p,
.py-wh-c--online > .py-wh-links {
  grid-column: 1;
}

.py-wh-c--online > .py-wh-t { grid-row: 1; }
.py-wh-c--online > .py-wh-p { grid-row: 2; }

.py-wh-c--online > .py-wh-links {
  grid-row: 3;
  align-self: end;
  padding-bottom: var(--wh-pad);
}

.py-wh-c--online > .py-wh-ui {
  grid-column: 2;
  grid-row: 1 / -1;
  margin-top: 0;
}

/* де ще живе посилання: чіпи під текстом */
.py-wh-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.py-wh-links span {
  padding: 5px 10px;
  border-radius: var(--py-r-chip);
  background: var(--c-bg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.py-wh-win {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: var(--c-bg);
}

.py-wh-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  background: var(--c-ghost);
  color: var(--c-soft);
  font-size: 11px;
  font-weight: 600;
}

.py-wh-bar b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-cost);
}

.py-wh-bar span {
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: var(--py-r-chip);
  background: var(--c-bg);
}

.py-wh-cart {
  display: grid;
  gap: 16px;
  padding: 16px 14px 18px;
}

.py-wh-lines {
  display: grid;
  gap: 6px;
}

.py-wh-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--c-soft);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.py-wh-lines dt,
.py-wh-lines dd {
  min-width: 0;
}

.py-wh-lines .is-sum {
  margin-top: 6px;
  color: var(--c-ink);
  font-size: 16px;
  font-weight: 800;
}

.py-wh-pay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 46px;
  padding: 0 7px 0 12px;
  border-radius: 14px;
  background: var(--c-btn-bg);
  color: var(--c-btn-ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
}

.py-wh-pay::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--c-ink);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.py-wh-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-dot-bg);
  color: var(--c-dot-ink);
}

.py-wh-dot svg {
  width: 14px;
  height: 14px;
}

.py-wh-cur {
  position: absolute;
  right: 56px;
  bottom: 14px;
  z-index: 2;
  width: 26px;
  height: 26px;
  opacity: 0;
  pointer-events: none;
}

/* =====================================================================
   ОФЛАЙН: чек, табличка з QR і NFC-наліпка
   ===================================================================== */

.py-wh-objs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}

.py-wh-rcp {
  position: relative;
  z-index: 0;
  flex: none;
  width: 96px;
  margin-right: -10px;
  padding: 10px 10px 20px;
  background: var(--c-bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), 91.6% 100%, 83.3% calc(100% - 6px), 75% 100%, 66.6% calc(100% - 6px), 58.3% 100%, 50% calc(100% - 6px), 41.6% 100%, 33.3% calc(100% - 6px), 25% 100%, 16.6% calc(100% - 6px), 8.3% 100%, 0 calc(100% - 6px));
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  transform: rotate(-6deg);
  transform-origin: 50% 100%;
}

.py-wh-rcp > b {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.py-wh-rcp > span {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  white-space: nowrap;
  color: var(--c-soft);
  font-variant-numeric: tabular-nums;
}

.py-wh-rcp > svg {
  width: 40px;
  height: 40px;
  margin: 6px auto 0;
}

.py-wh-plate {
  position: relative;
  z-index: 1;
  flex: none;
  width: calc(var(--wh-qr) + 32px);
  padding: 12px 12px 10px;
  border-radius: 18px;
  background: var(--c-bg);
  text-align: center;
  transform: rotate(3deg);
}

.py-wh-qr {
  position: relative;
  display: block;
  width: var(--wh-qr);
  height: var(--wh-qr);
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 8px;
}

.py-wh-qr > svg {
  width: 100%;
  height: 100%;
}

.py-wh-coin {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid var(--c-gain);
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-gain);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

/* промінь сканера: мʼятна смуга з темним краєм, у спокої не видно */
.py-wh-scan {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 16px;
  border-bottom: 2px solid var(--c-gain);
  background: linear-gradient(to bottom, rgba(94, 242, 160, 0), rgba(94, 242, 160, .55));
  opacity: 0;
}

.py-wh-plate-t {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}

.py-wh-nfc {
  position: relative;
  z-index: 2;
  display: grid;
  flex: none;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-left: -12px;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-accent);
  transform: rotate(12deg);
}

.py-wh-nfc svg {
  width: 44px;
  height: 44px;
}

/* =====================================================================
   У ЧАТІ: голосове → рахунок → оплачено (мʼятна картка)
   ===================================================================== */

.py-wh-c--chat {
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

.py-wh-c--chat .py-wh-p {
  color: var(--wh-on-accent);
}

.py-wh-chat {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5svh, 14px);
  padding-bottom: var(--wh-pad);
}

.py-wh-day {
  align-self: center;
  padding: 3px 11px;
  border-radius: var(--py-r-chip);
  background: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 700;
}

.py-wh-b {
  display: grid;
  gap: 7px;
  max-width: 92%;
  padding: 12px 14px;
  font-size: 13.5px;
}

.py-wh-b--out {
  align-self: flex-end;
  border-radius: 18px 18px 6px;
  background: var(--c-ink);
  color: var(--c-bg);
}

.py-wh-b--in {
  align-self: flex-start;
  border-radius: 18px 18px 18px 6px;
  background: var(--c-bg);
  color: var(--c-ink);
}

.py-wh-b--in > b {
  font-size: 15px;
}

.py-wh-b--in > span:not(.py-wh-send) {
  color: var(--c-soft);
  font-size: 12.5px;
}

.py-wh-vrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.py-wh-vplay {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

.py-wh-vplay svg {
  width: 15px;
  height: 15px;
  margin-left: 1px;
}

.py-wh-wave {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 2px;
  height: 28px;
  color: var(--c-accent);
}

.py-wh-wave span {
  display: block;
  width: 3px;
  height: 40%;
  border-radius: 2px;
  background: currentcolor;
}

.py-wh-wave span:nth-child(3n) { height: 85%; }
.py-wh-wave span:nth-child(3n + 1) { height: 55%; }
.py-wh-wave span:nth-child(4n) { height: 100%; }
.py-wh-wave span:nth-child(5n) { height: 30%; }

.py-wh-vrow b {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.py-wh-vtext {
  color: #e4e4e0;
  font-size: 13px;
  line-height: 1.35;
}

.py-wh-send {
  display: block;
  margin-top: 3px;
  padding: 10px;
  border-radius: 12px;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.py-wh-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 14px;
  font-weight: 700;
}

.py-wh-toast svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--c-accent);
}

/* =====================================================================
   РЕГУЛЯРНО: місяць із рахунками й нагадуванням
   ===================================================================== */

.py-wh-month {
  width: 100%;
  padding: 11px 14px 0;
  border-radius: 18px 18px 0 0;
  background: var(--c-bg);
}

.py-wh-mh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  margin-bottom: 4px;
  font-size: 13px;
}

.py-wh-bell {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-panel);
}

.py-wh-bell svg {
  width: 14px;
  height: 14px;
}

.py-wh-it {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 31px;
  font-size: 13px;
  font-weight: 600;
}

.py-wh-it > .py-wh-d {
  color: var(--c-soft);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   ПЕРЕДОПЛАТА: бронь столика
   ===================================================================== */

.py-wh-tk {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 16px 18px;
  border-radius: 18px 18px 0 0;
  background: var(--c-bg);
}

.py-wh-tk-ic {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
}

.py-wh-tk-ic b {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.py-wh-tk-ic span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.py-wh-tk-b {
  display: grid;
  gap: 7px;
  min-width: 0;
  justify-items: start;
}

.py-wh-tk-b > b {
  font-size: 16px;
}

.py-wh-tk-b .py-wh-chip {
  justify-self: start;
}

/* =====================================================================
   КРЕАТОРАМ: сума донату
   ===================================================================== */

.py-wh-give {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px 14px 12px;
  border-radius: 18px 18px 0 0;
  background: var(--c-bg);
}

.py-wh-amts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding: 3px;
  border-radius: var(--py-r-chip);
  background: var(--c-panel);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.py-wh-amts > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 32px;
  white-space: nowrap;
}

.py-wh-sel {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  z-index: 0;
  width: calc((100% - 6px) / 3);
  border-radius: var(--py-r-chip);
  background: var(--c-accent);
  transform: translateX(100%);
}

.py-wh-gbtn {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 14px;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 13px;
  font-weight: 700;
}

/* =====================================================================
   РЯДОК-ОБІЦЯНКА
   ===================================================================== */

.py-promise {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 28px;
  margin-top: clamp(18px, 2.6svh, 28px);
  padding: clamp(18px, 2.4svh, 26px) 30px;
  border-radius: var(--py-r-card);
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-size: var(--py-fs-3);
  line-height: 1.3;
  letter-spacing: -.01em;
}

.py-promise > span:first-child {
  font-weight: 800;
}

.py-promise > span:last-child {
  font-weight: 600;
}

/* =====================================================================
   ВУЖЧІ Й НИЖЧІ ЕКРАНИ: щільніше, щоб текст і фрагмент не наїжджали
   ===================================================================== */

@media (max-width: 1366px) and (min-width: 1280px) {
  .py-wh {
    --wh-pad: 20px;
  }


  .py-wh-p {
    font-size: 14px;
  }

  .py-wh-cart {
    padding-inline: 12px;
  }

  .py-wh-pay {
    font-size: 12px;
  }

  .py-wh-dot {
    width: 30px;
    height: 30px;
  }
}

/* 1280–1399: у лівій колонці лишається два чіпи, а вікно трохи ширше, щоб підпис кнопки не переносився */
@media (max-width: 1399px) and (min-width: 1280px) {
  .py-wh-c--online {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  }

  .py-wh-links span:nth-child(3) {
    display: none;
  }
}

@media (min-width: 768px) and (max-height: 800px) {
  .py-wh-day {
    display: none;
  }
}

/* =====================================================================
   МІКРОРУХ І ПОЯВА
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .py-wh-flip > .py-wh-chip {
    transition: opacity .3s ease, transform .5s var(--py-ease);
  }

  .py-wh-sel {
    transition: transform .6s var(--py-ease);
  }

  .py-wh-c.is-play .py-wh-flip > .is-paid {
    opacity: 1;
    transform: none;
    transition-delay: .12s;
  }

  .py-wh-c.is-play .py-wh-flip > :not(.is-paid) {
    opacity: 0;
    transform: scale(.7);
  }

  /* Онлайн: курсор доїжджає до кнопки й тисне її */
  .py-wh-c--online.is-play .py-wh-cur {
    animation: py-wh-cur 1.7s var(--py-ease) both;
  }

  .py-wh-c--online.is-play .py-wh-pay {
    animation: py-wh-press 1.7s var(--py-ease) both;
  }

  .py-wh-c--online.is-play .py-wh-pay::after {
    animation: py-wh-ripple 1.7s ease-out both;
  }

  .py-wh-dot {
    transition: transform .35s var(--py-ease);
  }

  .py-wh-c--online.is-play .py-wh-dot {
    transform: translateX(2px);
  }

  /* Офлайн: промінь проходить по QR, NFC-хвилі мерехтять по черзі */
  .py-wh-c--offline.is-play .py-wh-scan {
    animation: py-wh-scan 1.5s ease-in-out infinite;
  }

  .py-wh-c--offline.is-play .py-wh-nfc path {
    animation: py-wh-arc 1.3s ease-in-out infinite;
  }

  .py-wh-c--offline.is-play .py-wh-nfc .a2 {
    animation-delay: .18s;
  }

  .py-wh-c--offline.is-play .py-wh-nfc .a3 {
    animation-delay: .36s;
  }

  /* У чаті: хвиля голосового грає, кнопка в рахунку натискається */
  .py-wh-c--chat.is-play .py-wh-wave span {
    animation: py-wh-wave .8s ease-in-out infinite;
  }

  .py-wh-c--chat.is-play .py-wh-wave span:nth-child(3n + 2) {
    animation-delay: .12s;
  }

  .py-wh-c--chat.is-play .py-wh-wave span:nth-child(3n) {
    animation-delay: .24s;
  }

  .py-wh-c--chat.is-play .py-wh-send {
    animation: py-wh-pop 1.6s var(--py-ease) .5s both;
  }

  /* У чаті, само після каскаду (js/pay-ways.js, wherePlayChat): голосове грає → з'являється рахунок → «Ірина оплатила».
     Місце під рахунок і плашку зарезервоване (opacity, не display), висота картки не міняється */
  .py-wh-c--chat.is-seq .py-wh-b--in,
  .py-wh-c--chat.is-seq .py-wh-toast {
    opacity: 0;
    transform: translateY(10px);
  }

  .py-wh-c--chat.is-seq .py-wh-b--in,
  .py-wh-c--chat.is-seq .py-wh-toast {
    transition: opacity .45s ease-out, transform .7s var(--py-ease);
  }

  .py-wh-c--chat.is-seq.is-bill .py-wh-b--in,
  .py-wh-c--chat.is-seq.is-paid .py-wh-toast {
    opacity: 1;
    transform: none;
  }

  .py-wh-c--chat.is-voice .py-wh-wave span {
    animation: py-wh-wave .8s ease-in-out 3;
  }

  .py-wh-c--chat.is-voice .py-wh-wave span:nth-child(3n + 2) {
    animation-delay: .12s;
  }

  .py-wh-c--chat.is-voice .py-wh-wave span:nth-child(3n) {
    animation-delay: .24s;
  }

  /* Регулярно: дзвіночок гойдається, «Скоро» стає «Оплачено» */
  .py-wh-bell svg {
    transform-origin: 50% 12%;
  }

  .py-wh-c--regular.is-play .py-wh-bell svg {
    animation: py-wh-ring 1s ease-in-out .1s both;
  }

  /* Креаторам: вибір суми їде на наступну, кнопка натискається */
  .py-wh-c--creators.is-play .py-wh-sel {
    transform: translateX(200%);
  }

  .py-wh-c--creators.is-play .py-wh-gbtn {
    animation: py-wh-pop 1s var(--py-ease) .55s both;
  }

  /* Поява: картки сходинкою з «посадкою», фрагменти доїжджають слідом. Класи ставить js/pay-ways.js
     лише коли блок ще нижче екрана; після появи знімає, щоб не заважати наведенню */
  .py-wh.is-armed .py-wh-c {
    opacity: 0;
    transform: translateY(28px) scale(.965);
  }

  .py-wh.is-armed .py-wh-ui {
    opacity: 0;
    transform: translateY(20px);
  }

  .py-wh.is-armed.is-in .py-wh-c {
    opacity: 1;
    transform: none;
    transition:
      opacity .6s ease-out calc(var(--i) * 70ms),
      transform .85s var(--py-ease) calc(var(--i) * 70ms),
      box-shadow .5s var(--py-ease);
  }

  .py-wh.is-armed.is-in .py-wh-ui {
    opacity: 1;
    transform: none;
    transition:
      opacity .6s ease-out calc(var(--i) * 70ms + 180ms),
      transform .9s var(--py-ease) calc(var(--i) * 70ms + 180ms);
  }

  /* рядок-обіцянка (data-once: js/motion.js його не чіпає) з'являється цілим, останнім у каскаді */
  .py-wh.is-armed ~ .py-promise {
    opacity: 0;
    transform: translateY(24px);
  }

  .py-wh.is-armed.is-in ~ .py-promise {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease-out .55s, transform .85s var(--py-ease) .55s;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .py-wh-c:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px -28px rgba(41, 41, 41, .42);
  }
}

@keyframes py-wh-cur {
  0% { opacity: 0; transform: translate(60px, 46px); }
  30% { opacity: 1; transform: translate(0, 0); }
  40% { transform: translate(0, 0) scale(.82); }
  50% { transform: translate(0, 0) scale(1); }
  84% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(10px, 8px); }
}

@keyframes py-wh-press {
  0%, 36% { transform: none; }
  42% { transform: scale(.955); }
  58%, 100% { transform: none; }
}

@keyframes py-wh-ripple {
  0%, 38% { opacity: 0; transform: scale(1); }
  42% { opacity: .45; }
  80%, 100% { opacity: 0; transform: scale(1.12, 1.45); }
}

@keyframes py-wh-scan {
  0% { opacity: 0; transform: translateY(-4px); }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--wh-qr) - 14px)); }
}

@keyframes py-wh-arc {
  0%, 100% { opacity: .25; }
  45% { opacity: 1; }
}

@keyframes py-wh-wave {
  0%, 100% { transform: scaleY(.45); }
  50% { transform: scaleY(1.2); }
}

@keyframes py-wh-pop {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(.93); }
  60% { transform: scale(1.04); }
}

@keyframes py-wh-ring {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-13deg); }
  45% { transform: rotate(9deg); }
  60% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
}

/* =====================================================================
   ПЛАНШЕТ: дві колонки, чат на дві висоти
   ===================================================================== */

@media (max-width: 1279px) {
  .py-wh {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .py-wh-c--online { grid-column: 1 / -1; grid-row: 1; min-height: 260px; }
  .py-wh-c--offline { grid-column: 1; grid-row: 2; min-height: 270px; }
  .py-wh-c--chat { grid-column: 2; grid-row: 2 / span 2; }
  .py-wh-c--regular { grid-column: 1; grid-row: 3; min-height: 230px; }
  .py-wh-c--prepay { grid-column: 1; grid-row: 4; min-height: 210px; }
  .py-wh-c--creators { grid-column: 2; grid-row: 4; min-height: 210px; }
}

/* =====================================================================
   ТЕЛЕФОН: карусель з «прилипанням»
   ===================================================================== */

.py-wh-dots {
  display: none;
}

/* ТЕЛЕФОН (до 767px): стрічка з шести карток, що гортається; наступна картка визирає на 38px.
   Висота картки — від вмісту (картки рівняються за найвищою), а не фіксована: більший шрифт нічого не обрізає. */
@media (max-width: 767px) {
  .py-wh {
    --wh-pad: 20px;

    display: flex;
    gap: 12px;
    /* поле стрічки з запасом під повну тінь картки (наведення мишкою: 0 24px 44px -28px, до 40px вниз, 16px вбік):
       запас компенсують від'ємні відступи, тож розкладка й положення карток ті самі */
    margin: 12px calc(-1 * var(--py-x)) -46px;
    padding: 20px var(--py-x) 52px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--py-x);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .py-wh::-webkit-scrollbar {
    display: none;
  }

  .py-wh-c,
  .py-wh-c--online,
  .py-wh-c--offline,
  .py-wh-c--regular,
  .py-wh-c--prepay,
  .py-wh-c--creators,
  .py-wh-c--chat {
    flex: 0 0 min(82vw, 340px);
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    scroll-snap-align: start;
  }

  .py-wh-t {
    font-size: var(--py-fs-3);
  }

  .py-wh-p {
    font-size: var(--py-fs-4);
    line-height: 1.4;
  }

  .py-wh-c--online {
    display: flex;
  }

  .py-wh-c--online > .py-wh-links {
    display: none;
  }

  .py-wh-c--online > .py-wh-ui {
    margin-top: 14px;
  }

  .py-wh-c--online .py-wh-cart {
    gap: 12px;
    padding-bottom: 16px;
  }

  .py-wh {
    --wh-qr: 96px;
  }

  .py-wh-rcp {
    width: 90px;
    padding-inline: 9px;
  }

  .py-wh-nfc {
    width: 68px;
    height: 68px;
  }

  /* курсор мишки — для десктопа, на телефоні його нема */
  .py-wh-ui .py-wh-cur {
    display: none;
  }

  .py-wh-day,
  .py-wh-toast {
    display: none;
  }

  .py-wh-dots {
    display: flex;
    justify-content: center;
    margin-top: 0;
  }

  .py-wh-dots button {
    position: relative;
    width: var(--py-tap);
    height: var(--py-tap);
  }

  .py-wh-dots button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--c-cost);
    transition: transform .3s ease-out, background-color .3s ease-out;
  }

  /* глобальна жовта пляма кнопок сайту (main.css) на крапках зайва */
  .py-wh-dots button:not(.x):hover,
  .py-wh-dots button:not(.x):active {
    color: inherit;
  }

  .py-wh-dots button:not(.x):hover::before,
  .py-wh-dots button:not(.x):active::before {
    top: 50%;
    right: auto;
    left: 50%;
    width: 8px;
    height: 8px;
    padding: 0;
    margin: -4px 0 0 -4px;
    transform: none;
    z-index: auto;
    background: var(--c-cost);
  }

  .py-wh-dots button.is-on::before,
  .py-wh-dots button.is-on:not(.x):hover::before {
    background: var(--c-ink);
    transform: scale(1.35);
  }

  .py-promise {
    display: block;
    padding: 20px 22px;
    font-size: var(--py-fs-3);
  }

  .py-promise > span {
    display: block;
  }

  .py-promise > span:first-child {
    margin-bottom: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .py-wh-c,
  .py-wh-dots button::before {
    transition: none !important;
  }
}
