/* =========================================================
   style.css: how everything LOOKS.

   Design rules this file follows (the "not vibecoded" part):
   - Restraint: mint green is only for the jackpot, tickets and the main button,
     so it means something when you see it.
   - Two fonts, clear jobs: Bricolage Grotesque for headlines (800)
     and reading, JetBrains Mono for numbers and wallets (so the
     data reads like a ledger).
   - Flat panels + thin 1px lines. No glows on text, no dashed
     borders, no fake 3D.
   - Left-aligned text, on a consistent spacing scale.

   Written "mobile-first": plain rules are for a ~360px phone,
   @media (min-width: ...) blocks adjust for bigger screens.

   Sections:
     1. Design tokens      7. How it works
     2. Base               8. Live winners
     3. Shared pieces      9. Launchpad
                          10. Footer
     4. Top bar           11. Bigger screens
     5. Hero + jackpot    12. Reduced motion
     6. Meter, draw, stream, feed
   ========================================================= */


/* ---------- 1. Design tokens ----------
   CSS variables: define once, use everywhere as var(--name). */
:root {
  /* pump.fun-style palette: near-black with a green tint, mint accent */
  --bg:          #0E1311;  /* page background */
  --bg-deep:     #080C0A;  /* inside of the meter, inputs */
  --surface:     #151D19;  /* panels, one step lighter than the page */
  --edge:        #2A3A31;  /* stronger borders */
  --line:        rgba(220, 255, 232, .10);  /* hairline dividers */
  --accent:      #7CF29C;  /* mint green: the jackpot, tickets, main button */
  --accent-lite: #B6FFC8;
  --accent-dark: #2DB960;
  --red:         #D7262E;  /* live state only; white text on it */
  --ink:         #EAF5EE;  /* main text */
  --muted:       #9DB5A6;  /* secondary text, ~8:1 on the background */

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(.2, .7, .2, 1);   /* fast start, soft landing */

  --radius: 12px;
  /* Spacing scale: using only these keeps the rhythm consistent */
  --s1: .5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
  --s5: 4rem;
}


/* ---------- 2. Base ---------- */

/* Make width/height include padding and border. Much easier to reason about. */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;           /* turned off for reduced motion, section 12 */
  scroll-padding-top: var(--s2);     /* scrolled-to headings don't touch the screen edge */
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;                   /* 16px: minimum readable size on phones */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over the whole page, like an old printed ticket.
   An SVG noise filter drawn once, fixed in place, at very low opacity.
   pointer-events: none lets clicks pass straight through it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

/* The HTML "hidden" attribute only works if no CSS rule sets "display".
   .live-badge sets display, which would beat it, so make "hidden" win. */
[hidden] { display: none !important; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.03em;
  margin: 0;
}
h2 { font-size: clamp(1.6rem, 5.5vw, 2.25rem); }
h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .35rem; }
p  { margin: 0; }

a { color: inherit; }

/* Visible keyboard focus. :focus-visible shows only for keyboard users. */
:focus-visible {
  outline: 2px solid var(--accent-lite);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: -4rem;
  z-index: 50;
  padding: .75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { top: var(--s2); }


/* ---------- 3. Shared pieces ---------- */

/* Centers content, caps its width, and gives phones a side gutter. */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Every main section: same vertical padding + a hairline on top. */
.section {
  padding-block: var(--s5);
  border-top: 1px solid var(--line);
}
.section h2 { margin-bottom: var(--s3); }

/* Buttons: flat, solid, clear. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;                  /* comfortable tap size */
  padding: 0 1.25rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--accent-lite); }

/* Secondary button: outline only */
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--edge);   /* inset shadow = border that doesn't change size */
}
.btn--ghost:hover { background: var(--surface); }

/* Red "Live" badge with a pulsing dot. White text on red passes contrast. */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .65rem;
  background: var(--red);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  border-radius: 6px;
}
.live-badge::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}


/* ---------- 4. Top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--accent);
  text-decoration: none;
}
/* The ticket-and-ball logo (assets/logo.svg) */
.brand__mark { width: 36px; height: 24px; flex: none; }

.topbar__nav {
  display: none;                     /* shown from tablet width up (section 11) */
  gap: var(--s3);
}
.topbar__nav a {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.topbar__nav a:hover { color: var(--ink); }
.ticker {
  margin-left: auto;                 /* pushes it to the far right */
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
}


/* ---------- 5. Hero + jackpot ----------
   Copy on the left, the live jackpot card on the right,
   then the stream and fee feed as a second row. */
.hero { padding-block: var(--s4) var(--s5); }

.hero__grid {
  display: grid;
  gap: var(--s4);
  padding-block: var(--s3) var(--s4);
}

/* "Jackpot filling · 3.27 / 5 SOL": live data at the top, links to the card */
.hero__live {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 36px;
  margin-bottom: var(--s2);
  padding: 0 .85rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  transition: box-shadow .15s;
}
.hero__live:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.hero__live strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hero__live-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(124, 242, 156, .6);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(124, 242, 156, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(124, 242, 156, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 242, 156, 0); }
}

/* Page-load entrance: each .rise element slides up in turn.
   --i (set in the HTML) staggers them 90ms apart. */
.rise { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero h1 { font-size: clamp(3rem, 11vw, 6rem); }
.hero__explain {
  margin-top: var(--s3);
  max-width: 34rem;                  /* ~65 characters per line: easy to read */
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: var(--muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: var(--s4);
}
/* Each button grows to fill the row; on phones they stack at full width */
.hero__actions .btn { flex: 1 1 12rem; }

/* The jackpot card */
.jackpot {
  padding: var(--s3);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.jackpot__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: var(--s2);
}
.jackpot__title {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Key facts: three small label/value pairs in a row */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  margin: var(--s3) 0 0;
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
}
.facts dt { font-size: .75rem; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-size: .9rem; white-space: nowrap; }


/* ---------- 6. Meter, draw, stream, feed ---------- */
/* Second row of the hero: stream and fee feed side by side on desktop */
.live-row {
  display: grid;
  gap: var(--s3);
  align-items: start;
}

/* The big "3.27 / 5 SOL" readout */
.pot__amount {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: var(--s3);
  line-height: .9;
}
#pot-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 18vw, 7rem);
  letter-spacing: -.04em;
  color: var(--accent);
  /* tabular-nums: all digits the same width, so the number doesn't jiggle as it ticks */
  font-variant-numeric: tabular-nums;
}
.pot__target { font-family: var(--font-mono); font-size: clamp(1rem, 4vw, 1.35rem); color: var(--muted); }

/* The meter: a slim pill. script.js sets --fill from 0 to 100. */
.meter {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--line);
}
.meter__fill {
  --fill: 0;
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% * var(--fill) / 100);
  border-radius: 999px;
  background: var(--accent);
  transition: width .7s var(--ease-out);
}
/* The falling-coin effect doesn't fit a slim bar, so it's switched off */
.meter__coins { display: none; }

.pot__status {
  margin-top: .75rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
}

/* Draw result panel. min-height reserves space so nothing jumps
   when the winner text appears. */
.draw {
  position: relative;
  min-height: 6.5rem;
  margin-top: var(--s3);
  padding: var(--s2) 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: box-shadow .2s, background-color .2s;
}
.draw__label  { font-size: .9rem; color: var(--muted); }
.draw__wallet {
  margin-top: .15rem;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 6vw, 1.75rem);
  font-weight: 700;
}
.draw__prize  { margin-top: .15rem; font-weight: 700; color: var(--accent); }

/* Pot states. script.js toggles these classes on <section class="pot">. */
.pot.is-live .meter { box-shadow: inset 0 0 0 2px var(--red); }
.pot.is-live .draw { box-shadow: inset 0 0 0 1px var(--red); }
.pot.is-live .draw__wallet { color: var(--muted); }   /* the cycling "slot machine" addresses */

.pot.has-winner .draw {
  background: rgba(124, 242, 156, .1);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.pot.has-winner .draw__wallet { color: var(--accent-lite); animation: pop .4s ease-out; }
@keyframes pop {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* Celebration: small coins burst from the result panel.
   Each gets a random --dx/--dy from script.js. */
.burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: burst 1s ease-out forwards;
}
@keyframes burst {
  from { transform: translate(0, 0);                opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}


/* Live fee feed */
.feed {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.feed__title {
  margin: 0;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
.feed__list {
  list-style: none;
  margin: 0;
  padding: .25rem 0;
  min-height: 11.5rem;               /* room for 5 rows, so the page doesn't grow as rows arrive */
}
.feed__row {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .4rem 1rem;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.feed__row.is-new { animation: feedIn .5s var(--ease-out); }
@keyframes feedIn {
  from { opacity: 0; transform: translateY(-6px); background: rgba(124, 242, 156, .12); }
  to   { opacity: 1; transform: none; background: transparent; }
}
.feed__amt  { color: var(--accent); font-weight: 700; min-width: 7.5ch; }
.feed__who  { margin-left: auto; color: var(--muted); }   /* wallet on the right */

/* Stream window */
.stream {
  align-self: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s;
}
.stream__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  font-weight: 600;
}
.stream__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--muted);
  opacity: .5;
}
.stream__viewers { margin-left: auto; color: var(--muted); font-weight: 500; }

/* The 16:9 video area. aspect-ratio keeps the shape at any width. */
.stream__screen {
  aspect-ratio: 16 / 8;
  display: grid;
  place-items: center;               /* centers the message both ways */
  padding: var(--s2);
  text-align: center;
}
.stream__msg { max-width: 22ch; color: var(--muted); font-weight: 500; }

/* LIVE state: [data-state="live"] matches the attribute script.js sets. */
.stream[data-state="live"] { box-shadow: inset 0 0 0 2px var(--red); }
.stream[data-state="live"] .stream__dot {
  background: var(--red);
  opacity: 1;
  animation: pulse 1s ease-in-out infinite;
}
.stream[data-state="live"] .stream__viewers { color: var(--ink); }
.stream[data-state="live"] .stream__screen {
  background: radial-gradient(circle at 50% 50%, rgba(124, 242, 156, .16), transparent 70%);
}
.stream[data-state="live"] .stream__msg {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.5rem);
}


/* ---------- 7. How it works ----------
   We hide the list's default "1." numbers and draw our own with a
   CSS counter, so we can style them ("01", "02"...). */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;               /* start a counter named "step" at 0 */
  display: grid;
  gap: var(--s3);
}
.step {
  counter-increment: step;           /* +1 for every list item */
  position: relative;
  padding: var(--s3);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.step::before {
  content: counter(step, decimal-leading-zero);  /* prints 01, 02, 03... */
  position: absolute;                /* top-right corner, level with the icon */
  top: var(--s3);
  right: var(--s3);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--accent);
}
.step p { color: var(--muted); }
.step__icon {
  width: 28px;
  height: 28px;
  margin-bottom: .75rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ---------- 8. Live winners ---------- */
.winners__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: var(--s3);
}
.section .winners__head h2 { margin: 0; }
.winners__live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
}
.winners__stats {
  max-width: 40rem;
  margin: 0 0 var(--s3);
  padding-top: 0;
  border-top: 0;
}
.winners__stats dd { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.winners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
}
.winner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .25rem var(--s2);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.winner__no {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
  font: 700 .85rem var(--font-mono);
  color: var(--muted);
}
.winner__wallet { font: 700 1.05rem var(--font-mono); }
.winner__prize {
  grid-row: span 2;
  font: 800 1.35rem var(--font-display);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.winner__meta { font-size: .85rem; color: var(--muted); }

/* The newest winner: green edge, and it slides in */
.winner.is-new {
  box-shadow: inset 0 0 0 1px var(--accent);
  animation: pop .5s var(--ease-out);
}
.winner.is-new .winner__no { background: var(--accent); color: var(--bg); box-shadow: none; }

.winners__empty {
  padding: var(--s3);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  text-align: center;
}


/* ---------- 9. Launchpad ---------- */
.launch__lede {
  margin: calc(-1 * var(--s2)) 0 var(--s4);
  max-width: 38rem;
  color: var(--muted);
}

.pad {
  display: grid;
  gap: var(--s4);
  align-items: start;
}

/* The form */
.maker {
  display: grid;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.maker__row { display: grid; gap: var(--s3); }

.field label,
.choices legend {
  display: block;
  margin-bottom: .5rem;
  padding: 0;
  font-weight: 600;
}
.field__opt { font-weight: 400; font-size: .85rem; color: var(--muted); }

.field input[type="text"],
.field input[type="url"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: .75rem 1rem;
  font: 500 1rem var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  border: 1px solid var(--edge);
  border-radius: 10px;
  transition: border-color .15s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #5E7468; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent-lite); outline-offset: 3px; }
.field input[aria-invalid="true"] { border-color: #FF9A9A; }

/* Ticker: a fixed "$" drawn in front of the input */
.field__ticker { position: relative; }
.field__ticker::before {
  content: "$";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--muted);
  pointer-events: none;
}
.field__ticker input {
  padding-left: 1.9rem !important;
  font-family: var(--font-mono) !important;
  text-transform: uppercase;
}

/* File picker: style the "Choose file" button part */
.field input[type="file"] {
  width: 100%;
  font: 500 .9rem var(--font-body);
  color: var(--muted);
}
.field input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: .75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--ink);
  font: 600 .9rem var(--font-body);
  cursor: pointer;
}

/* Radio chips: the real radio is hidden visually but still there,
   so keyboard arrows and screen readers work as normal. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.choices legend { width: 100%; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
  font: 500 .9rem var(--font-mono);
  cursor: pointer;
  transition: box-shadow .15s, background-color .15s;
}
.choice span:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:checked + span { background: var(--accent); color: var(--bg); box-shadow: none; font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--accent-lite); outline-offset: 3px; }

.maker__submit { width: 100%; border: 0; font: 700 1.05rem var(--font-body); cursor: pointer; min-height: 52px; }
.maker__msg { min-height: 1.5em; margin-top: calc(-1 * var(--s2)); font-size: .9rem; color: var(--muted); }
.maker__msg.is-ok { color: var(--accent); }
.maker__msg.is-error { color: #FF9A9A; }

/* The preview card */
.preview__label {
  margin-bottom: .6rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.coin {
  padding: var(--s3);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.coin__head { display: flex; align-items: center; gap: var(--s2); }
.coin__img {
  width: 72px;
  height: 72px;
  flex: none;
  object-fit: contain;
  padding: 8px;
  border-radius: 14px;
  background: var(--bg-deep);
}
.coin__img.is-photo { object-fit: cover; padding: 0; }   /* uploaded images fill the square */
.coin__name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;          /* long names wrap instead of overflowing */
}
.coin__ticker { font-family: var(--font-mono); color: var(--accent); overflow-wrap: anywhere; }
.coin__desc {
  margin-top: var(--s2);
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-line;            /* keep line breaks typed in the description */
}
.coin__pot { margin-top: var(--s3); }
.coin__pot-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
}
.coin__pot-row strong { color: var(--accent); }
.coin__track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--line);
}
.coin__fill { width: 0; height: 100%; }
.coin__facts { margin-top: var(--s3); }
.coin__x {
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* How launching works: numbered cards */
.buy {
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
  counter-reset: buy;
  display: grid;
  gap: var(--s2);
}
.buy__step {
  counter-increment: buy;
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 3.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.buy__step::before {
  content: counter(buy);
  position: absolute;
  left: 1.1rem;
  top: 1.05rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font: 700 .85rem var(--font-mono);
}
.buy__step p { color: var(--muted); }


/* ---------- 9b. Admin speed panel ----------
   Only built by script.js when the URL has ?dev=KEY, so visitors
   never get it. Floats in the bottom-right corner. */
.admin {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: min(20rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1rem;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge), 0 12px 32px rgba(0, 0, 0, .5);
}
.admin__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .6rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin__opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
}
.admin__opt {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--ink);
  font: 600 .85rem var(--font-mono);
  cursor: pointer;
}
.admin__opt:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.admin__opt[aria-pressed="true"] { background: var(--accent); color: var(--bg); box-shadow: none; }
.admin__opt:disabled { opacity: .5; cursor: wait; }
.admin__note { margin-top: .6rem; font-size: .8rem; color: var(--muted); }
.admin__toggle {
  min-height: 44px;
  padding: 0 .75rem;
  margin: -.6rem -.5rem -.6rem 0;    /* big tap area without making the title taller */
  border: 0;
  background: none;
  color: var(--accent);
  font: 600 .75rem var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.admin__title--sub { margin: .9rem 0 .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.admin__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  padding: .35rem 0;
}
.admin__add small { font: 500 .65rem var(--font-body); color: var(--muted); }
.admin__random {
  width: 100%;
  margin-top: .4rem;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.admin__custom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem;
  margin-top: .4rem;
}
.admin__custom input {
  min-width: 0;
  min-height: 44px;
  padding: 0 .75rem;
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: var(--bg-deep);
  color: var(--ink);
  font: 500 .9rem var(--font-mono);
}
.admin__custom input:focus { border-color: var(--accent); outline: none; }
.admin__custom .admin__opt { padding: 0 1rem; }

/* Hidden visually, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.admin__reset {
  width: 100%;
  min-height: 44px;
  margin-top: .75rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--edge);
  color: #FF9A9A;
  font: 600 .85rem var(--font-body);
  cursor: pointer;
}
.admin__reset:hover { box-shadow: inset 0 0 0 1px #FF9A9A; }
.admin__reset.is-armed { background: #FF9A9A; color: var(--bg); box-shadow: none; }
.admin__reset:disabled { cursor: wait; }

/* Collapsed: just the title row, as a small tab */
.admin.is-collapsed { width: auto; padding-block: .6rem; }
.admin.is-collapsed .admin__title { margin: 0; gap: 1rem; }
.admin.is-collapsed > :not(.admin__title:first-child) { display: none; }
.admin__note.is-error { color: #FF9A9A; }


/* ---------- 10. Footer ---------- */
.footer {
  padding-block: var(--s4);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s3);
}
.footer__links { display: flex; gap: var(--s3); }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                  /* tap size, even for short links */
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.footer__links a:hover { color: var(--ink); }


/* Scroll reveal: sections start slightly lowered and transparent,
   then script.js adds .is-visible when they scroll into view.
   Only applies when JS is running (the "js" class on <html>). */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }


/* ---------- 11. Bigger screens ---------- */

/* Tablets and up */
@media (min-width: 720px) {
  :root { --s5: 5.5rem; }
  .wrap { padding-inline: 2rem; }

  .topbar__nav { display: flex; }
  .hero__actions .btn { flex: 0 0 auto; }   /* natural width once there's room */

  .steps { grid-template-columns: 1fr 1fr; }


  .buy { grid-template-columns: repeat(3, 1fr); }
  .winners { grid-template-columns: repeat(2, 1fr); }
  .maker__row { grid-template-columns: 1fr 1fr; }

}

/* Desktop */
@media (min-width: 1000px) {
  /* Hero: copy on the left (7 of 12 columns), jackpot card on the right (5) */
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    align-items: end;
    column-gap: var(--s4);
    padding-top: var(--s4);
  }
  .jackpot { padding: 1.75rem; }

  /* Stream and fee feed on the same 7 / 5 split */
  .live-row { grid-template-columns: 7fr 5fr; column-gap: var(--s4); }

  /* Launchpad: form on the left, preview on the right (stays in view while scrolling) */
  .pad { grid-template-columns: 7fr 5fr; column-gap: var(--s4); }
  .pad__side { position: sticky; top: var(--s2); }

  /* Steps become one joined strip with dividers */
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .step { background: none; box-shadow: none; border-radius: 0; }
  .step + .step { border-left: 1px solid var(--line); }
}


/* ---------- 12. Reduced motion ----------
   Some people get dizzy from motion and turn on "Reduce motion"
   in their OS. We stop looping animations and make the rest
   near-instant. script.js also skips the falling coins,
   slot-machine effect and coin burst. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }   /* never hide content */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
