/* Сторінка поповнення: той самий екран, що й у лаунчері (fragment_donate.xml) —
   спосіб оплати, шкала бонусів, «Ви платите / Ви отримуєте», акція X2, бонус за перше
   поповнення. Кольори — з drawable лаунчера (lch_*). */

.topup {
  --tp-bg: rgba(17, 20, 24, 0.86);
  --tp-field: #2c333c;
  --tp-text: #ffffff;
  --tp-muted: rgba(255, 255, 255, 0.6);
  --tp-dim: rgba(255, 255, 255, 0.5);
  --tp-gold: #ffb52c;
  --tp-blue: #00a8f7;
  --tp-orange-1: #ffc53d;
  --tp-orange-2: #ff8a00;
  --tp-red: #ff6632;
  --tp-ok: #7ed44a;
  --tp-err: #ff5b5b;

  width: 100%;
  max-width: 980px;
  margin: 8px auto 40px;
  padding: 0 16px;
  text-align: left;
  color: var(--tp-text);
  font-family: "Montserrat", sans-serif;
}

.topup * {
  user-select: text;
}

/* атрибут hidden сильніший за display у класах (.btn, .who, .method__soon) */
.topup [hidden] {
  display: none !important;
}

.topup__card {
  position: relative;
  background: var(--tp-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px;
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.topup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.topup__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topup__promo {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 8px;
  background: rgba(255, 64, 0, 0.2);
  color: var(--tp-red);
  font-weight: 700;
  font-size: 16px;
}

.topup__promo.is-on {
  display: inline-flex;
}

.x2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 8px;
  background: linear-gradient(0deg, #ff0000, #ff7700);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.topup__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.topup__label {
  display: block;
  margin: 0 0 10px;
  color: var(--tp-dim);
  font-size: 16px;
  font-weight: 600;
}

.topup__section + .topup__section {
  margin-top: 22px;
}

/* ---------- кому поповнюємо ---------- */

.who {
  display: grid;
  gap: 10px;
}

/* поле ID акаунта з плашкою «ID» зліва — як у лаунчері (donateIdPill) */
.who__id {
  position: relative;
  display: block;
}

.who__prefix {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  padding: 5px 10px;
  border-radius: 10px;
  background: linear-gradient(0deg, #007fe9, #69d1ff);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.who .field--id {
  padding-left: 66px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.who .field--id::placeholder {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.4);
}

.field {
  width: 100%;
  height: 58px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--tp-field);
  color: #fff;
  font: 600 17px "Montserrat", sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.field:focus {
  border-color: rgba(0, 168, 247, 0.7);
}

.field.is-bad {
  border-color: var(--tp-err);
}

select.field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background: var(--tp-field)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 16px center;
  cursor: pointer;
}

select.field option {
  background: #1b1f26;
  color: #fff;
  border: 0;
  border-radius: 0;
}

.who__hint {
  grid-column: 1 / -1;
  min-height: 18px;
  font-size: 15px;
  color: var(--tp-muted);
}

.who__hint.is-ok {
  color: var(--tp-ok);
}

.who__hint.is-err {
  color: var(--tp-err);
}

.from-launcher {
  display: none;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tp-field);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tp-muted);
}

.from-launcher b {
  color: #fff;
}

/* ---------- способи оплати ---------- */

.methods {
  display: grid;
  gap: 10px;
}

.method {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 2px solid transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.method svg {
  flex: none;
  width: 40px;
  height: 40px;
}

.method b {
  display: block;
  font-size: 17px;
  font-weight: 800;
}

.method small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--tp-muted);
}

.method[data-kind="ua"] {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 255, 255, 0.05));
}
.method[data-kind="ua"].is-on {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.6), rgba(255, 255, 255, 0.05));
  border-color: #ffd700;
}
.method[data-kind="eu"] {
  background: linear-gradient(90deg, rgba(0, 51, 153, 0.3), rgba(255, 255, 255, 0.05));
}
.method[data-kind="eu"].is-on {
  background: linear-gradient(90deg, rgba(0, 51, 153, 0.6), rgba(255, 255, 255, 0.05));
  border-color: #003399;
}
.method[data-kind="crypto"] {
  background: linear-gradient(90deg, rgba(38, 161, 123, 0.3), rgba(255, 255, 255, 0.05));
}
.method[data-kind="crypto"].is-on {
  background: linear-gradient(90deg, rgba(38, 161, 123, 0.6), rgba(255, 255, 255, 0.05));
  border-color: #26a17b;
}

.method:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* платіж з лаунчера: спосіб уже обрано, змінити не можна, але видно, який */
.method.is-on:disabled {
  cursor: default;
  opacity: 1;
}

/* назва платіжки на картці способу: «monobank», «LiqPay» */
.method__via {
  margin-left: auto;
  flex: none;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.method__soon {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
  color: var(--tp-muted);
}

/* ---------- шкала бонусів ---------- */

.tiers {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding-top: 20px;
}

.tiers__track,
.tiers__fill {
  position: absolute;
  top: 37px;
  height: 8px;
  border-radius: 4px;
}

.tiers__track {
  left: 0;
  right: 0;
  background: var(--tp-field);
}

.tiers__fill {
  left: 0;
  width: 0;
  background: var(--tp-blue);
  transition: width 0.25s ease;
}

.tier {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
}

.tier span {
  position: absolute;
  top: -20px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--tp-dim);
}

.tier i {
  font-style: normal;
}

/* «Від» не влазить у шість колонок крупним шрифтом — лишаємо «500 грн» */
.tier i:first-child {
  display: none;
}

.tier b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 66px;
  height: 42px;
  border-radius: 12px;
  background: var(--tp-field);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s;
}

.tier.is-on b {
  background: linear-gradient(0deg, #007fe9, #69d1ff);
}

/* ---------- суми ---------- */

.sums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sum {
  position: relative;
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 16px;
  border-radius: 16px;
}

.sum--pay {
  background: var(--tp-field);
}

.sum--get {
  background: rgba(255, 181, 44, 0.3);
}

.sum input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #fff;
  font: 800 28px "Montserrat", sans-serif;
}

.sum input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.sum__cur {
  font-size: 26px;
  font-weight: 800;
}

.sum__get {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tp-gold);
  font-size: 28px;
  font-weight: 800;
}

.sum img {
  width: 30px;
  height: 30px;
}

.sum .x2 {
  position: absolute;
  top: -10px;
  right: -6px;
  display: none;
}

.sum .x2.is-on {
  display: inline-flex;
}

.sums__labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.sums__labels span:last-child {
  color: var(--tp-gold);
}

.first-note {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 168, 247, 0.12);
  border: 1px solid rgba(0, 168, 247, 0.35);
  font-size: 15px;
  line-height: 1.45;
}

.first-note.is-on {
  display: flex;
}

.first-note img {
  flex: none;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.first-note b {
  color: var(--tp-gold);
}

/* ---------- кнопка / згода ---------- */

.agree {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 15px;
  color: var(--tp-dim);
  cursor: pointer;
}

.agree input {
  width: 24px;
  height: 24px;
  accent-color: var(--tp-orange-2);
  cursor: pointer;
}

.agree a {
  color: #fff;
  font-weight: 700;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, var(--tp-orange-1), var(--tp-orange-2));
  color: #fff;
  font: 800 20px "Montserrat", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.2s, opacity 0.2s;
}

.btn:hover {
  filter: brightness(1.07);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.6;
}

.btn--blue {
  background: linear-gradient(180deg, #59c2ff, #0f7fff);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
}

.topup__error {
  min-height: 20px;
  margin-top: 10px;
  font-size: 15px;
  color: var(--tp-err);
}

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--tp-dim);
}

/* ---------- оплата набору (?order=) ---------- */

.order {
  max-width: 520px;
  margin: 0 auto;
}

.order__box {
  padding: 22px;
  border-radius: 18px;
  background: var(--tp-field);
}

.order__name {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
}

.order__price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
}

.order__price span {
  color: var(--tp-gold);
  font-size: 38px;
  font-weight: 900;
}

.order__price s {
  color: var(--tp-dim);
  font-size: 22px;
  font-weight: 600;
}

.order__hint {
  margin-top: 14px;
  color: var(--tp-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- результат оплати ---------- */

.result {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 10px 8px;
  text-align: center;
}

.result.is-on {
  display: flex;
}

.result__icon {
  width: 84px;
  height: 84px;
}

.result__title {
  font-size: 30px;
  font-weight: 800;
}

.result__text {
  max-width: 460px;
  color: var(--tp-muted);
  font-size: 17px;
  line-height: 1.5;
}

.result__coins {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tp-gold);
  font-size: 36px;
  font-weight: 800;
}

.result__coins img {
  width: 32px;
  height: 32px;
}

.result .btn {
  max-width: 320px;
}

.spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--tp-blue);
  animation: tp-spin 0.9s linear infinite;
}

@keyframes tp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- «НЕ ВТРАЧАЙ СВІЙ БОНУС!» ---------- */

.bonus-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 20, 24, 0.9);
  backdrop-filter: blur(6px);
}

.bonus-modal.is-on {
  display: flex;
  animation: tp-fade 0.25s ease;
}

@keyframes tp-fade {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

/* Цільна картка в стилі лаунчера: стрічки «БОНУС!» — фоном усередині, обрізані
   скругленням картки й розчинені донизу (раніше висіли прямокутником з рваними краями) */
.bonus-modal__box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: hidden auto;
  padding: 34px 26px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(255, 64, 0, 0.28), transparent 70%),
    linear-gradient(180deg, #1b2029 0%, #111418 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: #fff;
  font-family: "Montserrat", sans-serif;
}

.bonus-modal__ribbons {
  position: absolute;
  top: -6%;
  left: 50%;
  width: 150%;
  max-width: none;
  transform: translateX(-50%) rotate(-4deg);
  pointer-events: none;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 75%);
}

.bonus-modal h2 {
  position: relative;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.bonus-modal p {
  position: relative;
  margin-top: 8px;
  color: var(--tp-muted);
  font-size: 17px;
}

.bonus-modal p b {
  color: var(--tp-gold);
}

.prizes {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
}

.prize {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 0;
  max-width: 170px;
  min-height: 170px;
  padding: 14px 10px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111418;
}

.prize::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--glow, #ee9b00);
  filter: blur(40px);
  opacity: 0.55;
}

.prize img {
  position: relative;
  width: 100%;
  max-width: 110px;
  height: 100px;
  object-fit: contain;
}

.prize span {
  position: relative;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 800;
}

.bonus-modal .btn {
  position: relative;
  margin-top: 10px;
}

/* ---------- адаптив ---------- */

@media (max-width: 860px) {
  .topup__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

/* Телефон: як екран поповнення в лаунчері — на всю ширину, великі поля й кнопки,
   текст не дрібніший за 13px, усе натискається пальцем */
@media (max-width: 560px) {
  .topup {
    margin: 0 auto 24px;
    padding: 0 10px;
  }
  .topup__card {
    padding: 22px 16px 20px;
    border-radius: 22px;
  }
  .topup__head {
    margin-bottom: 18px;
  }
  .topup__title {
    font-size: 25px;
    line-height: 1.15;
  }
  .topup__grid {
    gap: 20px;
  }
  .topup__section + .topup__section {
    margin-top: 20px;
  }
  .who {
    grid-template-columns: minmax(0, 1fr);
  }
  .field {
    height: 60px;
    font-size: 18px;
  }
  .who .field--id {
    font-size: 22px;
  }
  .method {
    padding: 16px;
    border-radius: 18px;
  }
  .method b {
    font-size: 18px;
  }
  .method small {
    font-size: 14px;
  }
  /* вузький екран: назва платіжки — ярлик на верхньому краї картки, заголовок не стискається */
  .method {
    position: relative;
  }
  .method__via {
    position: absolute;
    top: -10px;
    right: 14px;
    padding: 3px 8px;
    font-size: 12px;
    background: #23282f;
    border: 1px solid rgba(255, 255, 255, 0.18);
  }
  .tiers {
    gap: 3px;
    padding-top: 22px;
  }
  .tier b {
    height: 44px;
    font-size: 15px;
    border-radius: 12px;
  }
  .tier span {
    top: -22px;
    font-size: 13px;
  }
  .tier i {
    display: none;
  }
  .tiers__track,
  .tiers__fill {
    top: 40px;
  }
  .sums,
  .sums__labels {
    gap: 8px;
  }
  .sums__labels {
    font-size: 15px;
  }
  .sum {
    height: 66px;
    padding: 0 12px;
  }
  .sum input,
  .sum__get {
    font-size: 24px;
  }
  .sum__cur {
    font-size: 22px;
  }
  .sum img {
    width: 26px;
    height: 26px;
  }
  .btn {
    min-height: 66px;
    font-size: 20px;
    border-radius: 16px;
  }
  .order__box {
    padding: 20px 16px;
  }
  .order__name {
    font-size: 28px;
  }
  .order__price span {
    font-size: 36px;
  }
  .result__title {
    font-size: 27px;
  }
  .bonus-modal h2 {
    font-size: 26px;
  }
  .prizes {
    gap: 8px;
  }
  .prize {
    min-height: 150px;
    border-radius: 22px;
  }
  .prize img {
    height: 84px;
  }
}

/* Зовсім вузькі (320-360px): шкала бонусів ще влазить у рядок */
@media (max-width: 360px) {
  .topup__title {
    font-size: 22px;
  }
  .tier b {
    font-size: 13px;
  }
  .tier span {
    font-size: 12px;
  }
  .sum input,
  .sum__get {
    font-size: 21px;
  }
}

/* Відкрито з гри/лаунчера (donate.js ставить .tp-app): без шапки й підвалу сайту,
   екран поповнення одразу зверху — як у лаунчері */
.tp-app .header,
.tp-app .footer {
  display: none;
}

.tp-app .topup {
  margin-top: 16px;
}

/* ---------- великі екрани ---------- */

/* Сторінка на всю висоту: фон і підвал до низу вікна, без чорної смуги знизу */
.main__page_donate {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main__page_donate > .footer {
  margin-top: auto;
}

/* Верстка сайту розрахована на ~1000px — на 2K/4K вона губилась посеред екрана.
   Збільшуємо шапку, форму й підвал ступенями; висота теж в умові, щоб форма
   (≈850px при масштабі 1) не вилазила за вікно. Фон масштабується сам (від ширини). */
@media (min-width: 1700px) and (min-height: 980px) {
  .main__page_donate > .header,
  .main__page_donate > .topup,
  .main__page_donate > .footer {
    zoom: 1.1;
  }
}

@media (min-width: 2100px) and (min-height: 1050px) {
  .main__page_donate > .header,
  .main__page_donate > .topup,
  .main__page_donate > .footer {
    zoom: 1.3;
  }
}

@media (min-width: 2500px) and (min-height: 1250px) {
  .main__page_donate > .header,
  .main__page_donate > .topup,
  .main__page_donate > .footer {
    zoom: 1.5;
  }
}

@media (min-width: 3000px) and (min-height: 1450px) {
  .main__page_donate > .header,
  .main__page_donate > .topup,
  .main__page_donate > .footer {
    zoom: 1.8;
  }
}

@media (min-width: 3500px) and (min-height: 1700px) {
  .main__page_donate > .header,
  .main__page_donate > .topup,
  .main__page_donate > .footer {
    zoom: 2.1;
  }
}

/* «ДОДАТИ 250 ₴ І ОТРИМАТИ»: у flex-кнопці текст і <span> ставали окремими
   колонками й на телефоні розвалювались — тут звичайний рядок з переносом */
.bonus-modal #bonusAccept {
  display: block;
  padding: 18px 14px;
  line-height: 1.25;
  text-align: center;
}

.bonus-modal #bonusAccept span {
  white-space: nowrap;
}

/* ---------- Каталог «Ціни та товари» (статичний, видно без JS) ---------- */

.catalog {
  margin-top: 28px;
  padding: 28px;
  background: var(--tp-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(14px);
  scroll-margin-top: 16px;
}

.catalog__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.catalog__lead,
.catalog__sub,
.catalog__note,
.catalog__steps {
  color: var(--tp-muted);
  font-size: 14px;
  line-height: 1.55;
}

.catalog__lead b {
  color: var(--tp-text);
}

.catalog a {
  color: var(--tp-blue);
}

.catalog__facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 6px;
  padding: 0;
}

.catalog__facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--tp-field);
  font-size: 14px;
  font-weight: 600;
}

.catalog__facts b {
  color: var(--tp-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.catalog__h {
  margin: 30px 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.catalog__sub {
  margin-bottom: 14px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.cat-grid--coins {
  grid-template-columns: repeat(3, 1fr);
}

.cat-grid--vip {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.cat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: var(--tp-field);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-item img,
.cat-item__gem {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 4px;
}

.cat-item__gem {
  height: 72px;
}

.cat-item h4 {
  font-size: 16px;
  font-weight: 800;
}

.cat-item p {
  flex: 1;
  color: var(--tp-muted);
  font-size: 13px;
  line-height: 1.45;
}

.cat-item__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(126, 212, 74, 0.18);
  color: var(--tp-ok);
  font-size: 13px;
  font-weight: 800;
}

.cat-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-price b {
  color: var(--tp-gold);
  font-size: 20px;
  font-weight: 800;
}

.cat-price small,
.cat-table small {
  color: var(--tp-dim);
  font-size: 12px;
}

.cat-perks {
  list-style: disc;
  flex: 1;
  margin: 0 0 4px;
  padding-left: 18px;
  color: var(--tp-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cat-table td {
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-table td:last-child {
  text-align: right;
}

.cat-table b {
  color: var(--tp-gold);
}

.catalog__steps {
  list-style: decimal;
  padding-left: 20px;
}

.catalog__steps li + li {
  margin-top: 4px;
}

.catalog__note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
  .catalog__facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .catalog {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .catalog__title {
    font-size: 24px;
  }

  .cat-grid,
  .cat-grid--coins {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cat-grid--vip,
  .catalog__facts {
    grid-template-columns: 1fr;
  }

  .cat-item {
    padding: 12px;
  }

  .cat-item img {
    height: 90px;
  }
}
