:root {
  --bg: #eeeeee;
  --card: #f5f5f5;
  --text: #28456e;
  --muted: #5d6882;
  --dark: #111111;
  --dark-2: #1a1a1d;
  --line: rgba(255,255,255,.12);
  --accent: #ff1d12;
  --soft: #e7edf5;
  --radius: 24px;
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, #0a0a0a 0 48px, var(--bg) 48px calc(100% - 52px), #0a0a0a calc(100% - 52px) 100%);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}
.topbar {
  height: 48px;
  background: #0b0b0b;
  display: flex;
  justify-content: center;
  align-items: center;
}
.brand {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
}
.page-shell { padding: 16px 18px 28px; }
.content-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 565px);
  gap: 28px;
  align-items: start;
  min-width: 0;
}
.left-stack { display: grid; gap: 20px; min-width: 0; }
.card {
  background: var(--card);
  border: 1px solid #dfdfdf;
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  box-shadow: 0 2px 0 rgba(0,0,0,.02);
}
.card h2,
.donation-panel h2,
.amount-section h3,
.support-form label,
.brand,
.supporter-name,
.supporter-message,
.amount-chip,
.selected-box,
.support-btn {
  font-family: var(--font-display);
}
.card h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.05;
}
.card p {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.75;
  max-width: 95%;
  color: #48658f;
  font-weight: 600;
}
.supporters-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.geo-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef1f6;
  font-size: 12px;
  color: #52657f;
  white-space: nowrap;
}
.supporters-list {
  max-height: 380px;
  overflow: auto;
  padding-right: 10px;
}
.supporters-list::-webkit-scrollbar { width: 8px; }
.supporters-list::-webkit-scrollbar-thumb { background: #b1b1b1; border-radius: 999px; }
.supporter-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
  min-width: 0;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
}
.supporter-content { flex: 1; min-width: 0; }
.supporter-name {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.supporter-name span { font-weight: 500; color: #5f7390; }
.supporter-message {
  background: #e8edf6;
  border-radius: 14px;
  min-height: 54px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.25;
  color: #54719b;
  overflow-wrap: anywhere;
}
.donation-panel {
  background: radial-gradient(circle at top center, #23242a 0%, #151515 55%, #111112 100%);
  color: #fff;
  border-radius: 24px;
  padding: 22px 28px 28px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 22px 40px rgba(0,0,0,.14);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.donation-panel h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1.05;
  color: #fff;
}
.donation-panel p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.78);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  max-width: 290px;
}
.hero-figure {
  width: 150px;
  max-width: 30%;
  height: auto;
  object-fit: contain;
  position: relative;
    top: 15px;
}
.amount-section h3 {
  margin: 6px 0 14px;
  font-size: 27px;
  color: #fff;
}
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.amount-chip {
  width: 100%;
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  min-height: 54px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.amount-chip:hover,
.amount-chip:focus-visible { border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.amount-chip.active {
  background: var(--accent);
  border-color: var(--accent);
}
.selected-box {
  margin: 18px 0 14px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  min-height: 60px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255,255,255,.88);
  font-size: 17px;
}
.selected-box strong {
  color: #fff;
  font-size: clamp(24px, 2.3vw, 31px);
  overflow-wrap: anywhere;
}
.support-form label {
  display: block;
  margin: 14px 0 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.support-form .form-row {
  overflow: hidden;
  opacity: 1;
  max-height: 220px;
  transform: translateY(0);
  transition: max-height .28s ease, opacity .22s ease, transform .22s ease, margin .28s ease;
}
.support-form input,
.support-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.03);
  color: #fff;
  padding: 16px 16px;
  font-size: 16px;
  outline: none;
}
.support-form input::placeholder,
.support-form textarea::placeholder { color: rgba(255,255,255,.4); }
.support-form input:focus,
.support-form textarea:focus { border-color: rgba(255,255,255,.3); }

body.checkout-open .support-form label,
body.checkout-open .support-form input,
body.checkout-open .support-form textarea {
  pointer-events: none;
}

body.checkout-open .support-form .form-row {
  opacity: 0;
  max-height: 0;
  margin: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

body.checkout-open #payNowBtn {
  display: none;
}

.support-btn {
  width: 95%;
  margin-top: 22px;
  min-height: 54px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: block;
  margin-inline: auto;
}
.support-btn:hover { filter: brightness(1.05); }
.support-btn:disabled { cursor: not-allowed; }

.support-btn.is-loading {
  opacity: .9;
}

.support-btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: support-btn-spin .8s linear infinite;
}

@keyframes support-btn-spin {
  to { transform: rotate(360deg); }
}

.checkout-embed {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 18px;
  min-height: 320px;
  transition: opacity .24s ease;
}

.checkout-embed.is-preloading {
  opacity: .98;
}

.checkout-embed.is-preloading > :not(.checkout-loading):not(#checkoutTitle) {
  visibility: hidden;
}

.checkout-loading {
  display: grid;
  gap: 12px;
}

.checkout-loading__line,
.checkout-loading__wallet,
.checkout-loading__card,
.checkout-loading__button {
  background: linear-gradient(90deg, rgba(255,255,255,.08) 25%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 75%);
  background-size: 300% 100%;
  animation: checkout-shimmer 1.1s linear infinite;
  border-radius: 12px;
}

.checkout-loading__line--title {
  width: 52%;
  height: 28px;
}

.checkout-loading__line--amount {
  width: 36%;
  height: 18px;
}

.checkout-loading__wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-loading__wallet {
  height: 40px;
}

.checkout-loading__line--divider {
  width: 40%;
  height: 12px;
  justify-self: center;
}

.checkout-loading__card {
  height: 140px;
}

.checkout-loading__button {
  height: 46px;
}

@keyframes checkout-shimmer {
  to { background-position: -200% 0; }
}

.checkout-loading[hidden] {
  display: none;
  pointer-events: none;
}

.checkout-embed h3 {
  margin: 0 28px 8px 0;
  font-family: var(--font-display);
  font-size: 24px;
}

#checkoutTitle {
  scroll-margin-top: 64px;
}

.checkout-modal__amount {
  margin: 0 0 12px;
  color: rgba(255,255,255,.75);
}

.checkout-divider {
  margin: 14px 0;
  text-align: center;
  color: rgba(255,255,255,.6);
  font-size: 14px;
}

#paymentElement {
  margin-bottom: 12px;
}

.checkout-pay-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
}

.checkout-pay-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.checkout-message {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.checkout-message--error {
  background: rgba(255, 64, 64, 0.15);
  border: 1px solid rgba(255, 64, 64, 0.32);
  color: #ffd2d2;
}

.checkout-message--success {
  background: rgba(64, 200, 120, 0.14);
  border: 1px solid rgba(64, 200, 120, 0.34);
  color: #cffff0;
}
@media (max-width: 980px) {
  .content-grid { grid-template-columns: 1fr; }
  .donation-panel { order: -1; }
  .support-form { padding-bottom: 86px; }
  .support-btn {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 12px;
    width: 95%;
    transform: translateX(-50%);
    margin-top: 0;
    z-index: 30;
    box-shadow: 0 8px 22px rgba(0,0,0,.35);
  }
  body.checkout-open .support-form { padding-bottom: 0; }
  body.checkout-open .support-btn {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    transform: none;
    box-shadow: none;
  }
}
@media (max-width: 700px) {
  body { background: linear-gradient(180deg, #0a0a0a 0 48px, var(--bg) 48px 100%); }
  .page-shell { padding-inline: 12px; }
  .card, .donation-panel { padding-inline: 18px; border-radius: 20px; }
  .panel-head { align-items: flex-start; }
  .hero-figure { width: 104px; top: 0;    max-width: 31%;}
  .support-btn { width: 90%; }
  .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-box { flex-direction: column; align-items: flex-start; }
  .supporters-header { flex-direction: column; align-items: flex-start; }
  .card p { max-width: 100%; font-size: 17px; }
  .donation-panel h2 {
        font-size: 20px;
  }
  .donation-panel p {
        font-size: 14px;
  }
  .checkout-embed {
    padding: 16px 14px;
  }
}
