:root {
  --green: #0b6b3a;
  --green-2: #07522c;
  --green-deep: #03301b;
  --gold: #ffd54a;
  --gold-2: #f59f00;
  --ink: #f4fff9;
  --muted: #bcd9c9;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(120% 80% at 50% 0%, var(--green) 0%, var(--green-deep) 70%);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(22px + env(safe-area-inset-bottom));
  text-align: center;
}

.brand-bar { display: flex; align-items: center; gap: 10px; }
.mascot { width: 44px; height: 44px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.brand { font-size: 24px; font-weight: 800; color: var(--gold); flex: 1 1 auto; text-align: left; }
.brand span { color: #7ef0b0; }
.live-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  color: #062b19; background: var(--gold); border-radius: 999px; padding: 4px 9px;
}
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #d21f1f; display: inline-block; animation: blink 1.2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

h1 { font-size: 25px; line-height: 1.2; margin: 16px 0 8px; }
.sub { color: #d6efe0; font-size: 14.5px; line-height: 1.5; margin: 0 0 16px; }

/* Cash meter */
.meter { margin: 4px 0 18px; }
.meter-bar {
  height: 14px; border-radius: 999px; background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,213,74,.35); overflow: hidden;
}
.meter-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  transition: width .35s cubic-bezier(.2,.8,.25,1);
}
.meter-amounts {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-top: 8px; font-size: 15px; color: var(--muted);
}
.meter-amounts strong { color: var(--gold); font-size: 22px; }
.meter-amounts .goal { color: #9dc4ae; font-size: 13.5px; }

/* Big tappable coin */
.coin {
  position: relative; display: block; margin: 6px auto 10px;
  width: 172px; height: 172px; padding: 0; border: 0; background: transparent;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.coin img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 14px 26px rgba(0,0,0,.5)); }
.coin::after {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  border: 2px solid rgba(255,213,74,.45); animation: ring 1.6s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.18); opacity: 0; } }
.coin.bump img { transform: scale(.92); }
.coin img { transition: transform .12s ease-out; }
.tap-hint {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  background: var(--gold); color: #3a2600; font-weight: 900; font-size: 12px;
  letter-spacing: 1px; border-radius: 999px; padding: 3px 12px;
  box-shadow: var(--shadow);
}

.counter { color: var(--muted); font-size: 13px; margin: 10px 0 12px; }

.action-row { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cta {
  appearance: none; border: 0; border-radius: 14px; padding: 16px;
  font-size: 17px; font-weight: 800; color: #3a2600; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  box-shadow: 0 12px 26px rgba(0,0,0,.35); cursor: pointer;
}
.cta:disabled { opacity: .55; cursor: default; }
.status-pill {
  align-self: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px;
  color: #cfeadd; border: 1px solid rgba(207,234,221,.35);
}
.legal { margin: 12px 0 0; font-size: 11.5px; color: #9dc4ae; }

.modal {
  position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; background: #06351f; border: 2px solid var(--gold);
  border-radius: 16px; padding: 22px 20px; max-width: 340px; width: 100%;
  box-shadow: var(--shadow); animation: pop .25s ease-out;
}
.modal-coin { width: 76px; height: 76px; margin: 0 auto 6px; display: block; }
.modal-card h2 { color: var(--gold); margin: 0 0 8px; font-size: 24px; }
.modal-card p { color: var(--ink); font-size: 15px; line-height: 1.5; }
.modal-card p strong { color: var(--gold); }
.modal-close {
  position: absolute; top: 6px; right: 10px; background: transparent; border: 0;
  color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.modal-card .cta { display: block; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  max-width: 88vw; background: #06351f; color: #eafff2;
  border: 1px solid rgba(255,213,74,.35); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow);
}

@keyframes pop { from { transform: scale(.9); opacity: .6; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .coin::after { animation: none; }
  .meter-bar span { transition: none; }
}
