/* =====================================================================
   PLINKO UI — the machine, meter, slots, panels, history, result card,
   odds list, treasury panels. Uses the tokens from style.css.
   ===================================================================== */

/* ---------- the hero ball (persistent object on the stage) ---------- */
.ball {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, rgba(255,255,255,0) 32%),
    radial-gradient(circle at 68% 74%, var(--accent-2) 0%, rgba(184,255,92,0) 46%),
    radial-gradient(circle at 50% 50%, #eef2fb 0%, #c9d2e7 55%, #7f8fb8 100%);
  box-shadow: inset -14px -18px 34px rgba(24,21,32,.28), 0 40px 80px -30px rgba(24,21,32,.5);
  animation: ballFloat 5s ease-in-out infinite;
}
@keyframes ballFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.ball__ticker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 3rem);
  letter-spacing: -.04em;
  color: var(--ink);
  opacity: .82;
}
html.lite .ball { animation: none; }

/* ---------- hero: the full-width fuel meter under the CTAs (all widths) ---------- */
.hero__meter { margin-top: 28px; }
.numbers__grid > *, .machine__grid > *, .machine__side > *, .machine__main > * { min-width: 0; }

/* ---------- board (canvas + slots) ---------- */
.plinko { position: relative; width: 100%; }
.plinko__canvas { width: 100%; display: block; border-radius: 22px; }
.plinko__slots { display: grid; gap: 4px; margin-top: 6px; }
.slot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 2px 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  text-align: center;
  transition: transform .5s var(--ease), background .4s, box-shadow .4s;
  overflow: hidden;
}
.slot > * { position: relative; }
.slot__icon { font-size: 18px; line-height: 1; }
.slot__label { font-family: var(--font-display); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.slot__pct { font-size: 10px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.slot.is-hit { transform: translateY(-6px) scale(1.04); background: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 18px 40px -16px var(--c); }
.plinko--preview .plinko__canvas { border-radius: 16px; }
.plinko--preview .plinko__slots { gap: 2px; margin-top: 4px; }
.plinko--preview .slot { padding: 5px 0 4px; border-radius: 8px; gap: 0; }
.plinko--preview .slot__label, .plinko--preview .slot__pct { display: none; }
.plinko--preview .slot__icon { font-size: 12px; }
.plinko.is-ready .plinko__canvas { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 30px 80px -30px rgba(108,92,255,.7); }

/* ---------- hopper meter ---------- */
.meter { display: flex; flex-direction: column; gap: 12px; --pct: 0; }
.meter__chamber {
  position: relative;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24,21,32,.06), rgba(24,21,32,.14));
  border: 1px solid var(--ink-line);
  overflow: hidden;
}
.meter__fill {
  position: absolute; inset: 0;
  width: calc(var(--pct) * 100%);
  background: linear-gradient(90deg, var(--accent) 0%, #8f83ff 60%, var(--accent-2) 100%);
  transition: width 1s var(--ease-out);
}
.meter__wave {
  position: absolute; top: -6px; right: -10px;
  width: 22px; height: 120%;
  background: rgba(255,255,255,.35);
  transform: skewX(-14deg);
  animation: meterShimmer 2.4s linear infinite;
}
.meter__wave--2 { right: 6px; width: 8px; opacity: .6; animation-duration: 3.1s; }
@keyframes meterShimmer { 0% { opacity: .1; } 50% { opacity: .55; } 100% { opacity: .1; } }
.meter__ticks { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); pointer-events: none; }
.meter__ticks i { border-right: 1px solid rgba(24,21,32,.12); }
.meter__ticks i:last-child { border: 0; }
.meter__chips { position: absolute; inset: 0; pointer-events: none; }
.meter__chip {
  position: absolute; top: 0;
  font-family: var(--font-display); font-size: 11px; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 100px;
  background: var(--ink); color: var(--paper);
  white-space: nowrap;
}
.meter__ready {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper);
  background: repeating-linear-gradient(-45deg, rgba(24,21,32,.92) 0 14px, rgba(24,21,32,.78) 14px 28px);
  opacity: 0; transition: opacity .4s;
}
.meter.is-ready .meter__ready { opacity: 1; animation: readyPulse 1.2s ease-in-out infinite; }
@keyframes readyPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.meter.is-near .meter__chamber { box-shadow: 0 0 0 1px var(--accent), 0 0 30px -6px var(--accent); animation: nearPulse 1.6s ease-in-out infinite; }
@keyframes nearPulse { 0%,100% { box-shadow: 0 0 0 1px var(--accent), 0 0 20px -8px var(--accent); } 50% { box-shadow: 0 0 0 1px var(--accent), 0 0 34px -4px var(--accent); } }
.meter.is-pulse .meter__chamber { transform: scale(1.01); }
.meter__stats { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.meter__stat b { display: block; font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.9rem); letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.meter__stat--pct b { color: var(--accent); }
.meter__hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
.meter--compact { gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px solid var(--ink-line); backdrop-filter: none; }
.meter--compact .meter__chamber { height: 34px; border-radius: 10px; }
.meter--compact .meter__stat b { font-size: 1.05rem; }
.meter--compact .meter__hint { font-size: 11px; }
.meter--compact .meter__ready { font-size: 10px; }
.meter--compact .label { font-size: 10px; }

/* ---------- machine section ---------- */
.machine { padding: clamp(80px, 12vh, 150px) 0; }
.machine__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.machine__jackpot { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: 0 0 auto; }
.machine__jackpot b { font-family: var(--font-display); font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -.02em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.machine__jackpot span { font-size: 12px; color: var(--ink-soft); }
.machine__jackpot .label { color: var(--ink); }
.machine__jackpotLast { font-variant-numeric: tabular-nums; }
.machine__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 24px; align-items: start; }
.machine__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.machine__frame {
  padding: clamp(14px, 2vw, 24px);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 40px 80px -50px rgba(24,21,32,.45);
  display: flex; flex-direction: column; gap: 16px;
}
.machine__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn--drop { padding: 20px 34px; font-size: 14px; }
.btn--drop:disabled { opacity: .4; cursor: not-allowed; }
.btn--drop.is-armed { background: var(--accent); animation: armed 1.1s ease-in-out infinite; }
@keyframes armed { 0%,100% { box-shadow: 0 0 0 0 rgba(108,92,255,.5); } 50% { box-shadow: 0 0 0 12px rgba(108,92,255,0); } }
.machine__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 100px;
  border: 1px solid var(--ink-line);
  font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent-2)); }

.demo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border: 1px dashed var(--ink-line); border-radius: 16px; }
.demo__note { flex: 1 1 260px; font-size: 12px; color: var(--ink-soft); margin: 0; }
.demo__controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.switch input { display: none; }
.switch span { width: 36px; height: 20px; border-radius: 100px; background: var(--ink-line); position: relative; transition: background .3s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch em { font-style: normal; font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pill--select { appearance: none; -webkit-appearance: none; background: transparent; padding-right: 30px; cursor: pointer; }
.demo .pill { border-color: var(--ink-line); color: var(--ink); }
.demo .pill:hover { border-color: var(--ink); }

/* ---------- side panels ---------- */
.machine__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { padding: clamp(18px, 2vw, 26px); border-radius: var(--radius); background: var(--paper); box-shadow: 0 30px 60px -50px rgba(24,21,32,.4); }
.panel h3 { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.2; margin-top: 6px; }

/* ---------- section helpers ---------- */
.section__desc { max-width: 52ch; color: var(--ink-soft); font-size: 15px; }
.hist, .numbers { padding: clamp(80px, 12vh, 150px) 0; }
.hist__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }

/* odds — a top-down list in the side panel */
.oddl { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.oddl__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 104px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--ink-line); }
.oddl__row:first-child { border-top: 0; padding-top: 6px; }
.oddl__icon { font-size: 18px; line-height: 1; text-align: center; }
.oddl__name { display: block; font-family: var(--font-display); font-size: 14px; letter-spacing: .02em; }
.oddl__desc { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-soft); }
.oddl__bar { display: block; height: 4px; margin-top: 8px; border-radius: 100px; background: var(--ink-line); overflow: hidden; }
.oddl__bar b { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--c); border-radius: 100px; }
.oddl__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.oddl__pct { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.oddl__sofar { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.oddl__note { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); }

/* history */
.hist__list { display: flex; flex-direction: column; border-top: 1px solid var(--ink-line); }
.hrow { border-bottom: 1px solid var(--ink-line); }
.hrow__main {
  /* fixed column widths so every row lines up (an `auto` column made the
     columns drift a few px from row to row depending on the time text) */
  width: 100%; display: grid; grid-template-columns: 104px 190px 110px minmax(0, 1fr) 104px 36px; gap: 16px; align-items: center;
  padding: 18px 0; text-align: left; font-size: 14px;
}
.hrow__id { font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); }
.hrow__outcome { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; }
.hrow__outcome em { font-style: normal; color: var(--ink-soft); }
.hrow__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.hrow__amt { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.hrow__amt em { font-style: normal; color: var(--accent); }
.hrow__note { color: var(--ink-soft); font-size: 13px; }
.hrow__when { font-size: 12px; color: var(--ink-soft); white-space: nowrap; text-align: right; }
.hrow__plus { position: relative; width: 28px; height: 28px; border: 1px solid var(--ink-line); border-radius: 50%; justify-self: end; }
.hrow__plus::before, .hrow__plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 1px; background: currentColor; transform: translate(-50%,-50%); transition: transform .4s var(--ease); }
.hrow__plus::after { transform: translate(-50%,-50%) rotate(90deg); }
.hrow.is-open .hrow__plus::after { transform: translate(-50%,-50%) rotate(0); }
.hrow__details { height: 0; overflow: hidden; }
.hrow__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 4px 0 18px; font-size: 13px; }
.hrow__grid b { display: block; margin-top: 4px; font-weight: 500; }
.hrow__verify { display: inline-block; margin-bottom: 20px; font-family: var(--font-display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; }

/* stats */
.stats--protocol { margin-top: 40px; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink-line); }

/* ---------- treasury panel (beside the board) ---------- */
.tp__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tp__total { text-align: right; }
.tp__total b { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tp__bar { display: flex; gap: 2px; height: 10px; margin-top: 14px; border-radius: 100px; overflow: hidden; background: var(--ink-line); }
.tp__seg { display: block; height: 100%; transition: width .8s var(--ease); }
.tp__seg--core { background: var(--ink); }
.tp__seg--plinko { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tp__seg--jackpot { background: #38d6ff; }
.tp__seg--ops { background: rgba(24,21,32,.35); }
.tp__rows { display: flex; flex-direction: column; margin-top: 12px; }
.tp__row { padding: 12px 0; border-top: 1px solid var(--ink-line); --c: var(--ink); --share: 0; }
.tp__row--plinko { --c: var(--accent); }
.tp__row--jackpot { --c: #38d6ff; }
.tp__row--ops { --c: rgba(24,21,32,.45); }
.tp__rowHead { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.tp__pct { margin-left: auto; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tp__amt { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.tp__amt b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tp__avail { font-size: 11px; color: var(--ink-soft); }
.tp__line { height: 4px; border-radius: 100px; background: var(--ink-line); margin-top: 8px; overflow: hidden; position: relative; }
.tp__line i { display: block; height: 100%; width: calc(var(--share) * 100%); background: var(--c); transition: width .8s var(--ease); }
.tp__note { margin: 8px 0 0; font-size: 11px; color: var(--ink-soft); }
/* protected: striped, locked, quiet */
.tp__row.is-locked { padding: 12px 10px; margin: 0 -10px; border-radius: 10px; border-top: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(24,21,32,.045) 8px 16px); }
.tp__row.is-locked .tp__note { color: var(--ink); font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
/* fuel: the live one */
.tp__row.is-active { padding: 14px 12px; margin: 8px -12px 0; border-radius: 14px; border-top: 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.tp__row.is-active .tp__amt b { font-size: 1.75rem; color: var(--accent); }
.tp__row.is-active .tp__line i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tp__row.is-active .tp__line::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: fuelShimmer 2.2s linear infinite; }
@keyframes fuelShimmer { from { left: -30%; } to { left: 100%; } }
.tp.is-ready .tp__row.is-active { animation: armed 1.1s ease-in-out infinite; }
.tp__split { margin-top: 14px; font-size: 11px; color: var(--ink-soft); }
.tp__net { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--ink-soft); flex-wrap: wrap; }
.tp__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6a3d; }
.tp.is-live .tp__dot { background: var(--accent-2); box-shadow: 0 0 0 0 rgba(184,255,92,.6); animation: pulse 1.8s infinite; }
.tp__contract { margin-top: 10px; }
.tp__link { display: inline-block; margin-top: 14px; font-family: var(--font-display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; }
.tp--compact .tp__row.is-locked { margin-top: 8px; }

/* ---------- treasury explainer section ---------- */
.tx { padding: clamp(80px, 12vh, 150px) 0; }
.tx__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.txp__flow { display: grid; grid-template-columns: 220px 60px 1fr; gap: 20px; align-items: stretch; }
.txp__fee { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 24px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.txp__fee b { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.txp__fee .label { color: rgba(255,255,255,.6); }
.txp__feeNote { font-size: 12px; color: rgba(255,255,255,.6); }
.txp__arrow { display: flex; flex-direction: column; justify-content: space-around; padding: 12px 0; }
.txp__arrow i { display: block; height: 2px; background: var(--ink-line); position: relative; }
.txp__arrow i::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-right: 2px solid var(--ink-line); border-top: 2px solid var(--ink-line); transform: rotate(45deg); }
.txp__buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.txp__bucket { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: 18px; border: 1px solid var(--ink-line); --c: var(--ink); }
.txp__bucket--plinko { --c: var(--accent); }
.txp__bucket--jackpot { --c: #38d6ff; }
.txp__bucketHead { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.txp__split b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.03em; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.txp__split span { font-size: 12px; color: var(--ink-soft); }
.txp__note { font-size: 13px; color: var(--ink-soft); flex: 1; margin: 0; }
.txp__live { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ink-line); }
.txp__live b { font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.txp__bucket.is-locked { background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(24,21,32,.045) 8px 16px); border-color: var(--ink); }
.txp__bucket.is-locked .txp__note { color: var(--ink); font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.txp__bucket.is-active { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.txp__bucket.is-active.is-ready { animation: armed 1.1s ease-in-out infinite; }
.txp__rules { margin-top: 32px; padding: 24px; border-radius: var(--radius); background: var(--paper); }
.txp__rules ol { margin: 12px 0 0; padding-left: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; font-size: 14px; }
.txp__rules li { padding-left: 4px; }
/* the result card must never hide the custom cursor: keep the cursor on top and light over the dark card */
body.is-modal .cursor { background: var(--paper); }
body.is-modal .cursor .cursor__label { color: var(--ink); }
.stats--protocol .stat__value { font-size: clamp(1.6rem, 2.6vw, 2.6rem); }
.stats--protocol .stat__label { font-size: 13px; color: var(--ink-soft); }
.tstat__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--ink-line); }
.tstat__row b { display: block; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tstat__net { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; flex-wrap: wrap; }
.tstat__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6a3d; }
.is-live .tstat__dot { background: var(--accent-2); box-shadow: 0 0 0 0 rgba(184,255,92,.6); animation: pulse 1.8s infinite; }
.tstat__contract { width: 100%; }


/* events */
.events__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.evcard { padding: 20px; border-radius: 18px; border: 1px solid var(--ink-line); display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: border-color .3s; }
.evcard:hover { border-color: var(--ink); }
.evcard__name { font-family: var(--font-display); font-size: 15px; }
.evcard__desc { font-size: 13px; color: var(--ink-soft); flex: 1; }
.evcard__trigger { font-family: var(--font-display); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.evcard.is-active { border-color: var(--ink); background: color-mix(in srgb, #ffc93c 18%, transparent); }

/* event banner (under the header) */
.evt {
  position: fixed; left: 50%; top: 84px; z-index: 690;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--ink); color: var(--paper);
  font-size: 13px; white-space: nowrap; max-width: calc(100% - 2 * var(--gutter));
}
.evt__pulse { width: 8px; height: 8px; border-radius: 50%; background: #ffc93c; box-shadow: 0 0 0 0 rgba(255,201,60,.6); animation: pulse 1.4s infinite; }
.evt__name { font-family: var(--font-display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.evt__desc { opacity: .7; overflow: hidden; text-overflow: ellipsis; }

/* dramatic event mode: warmer, darker, louder */
body.is-event { --bg-1: #f6e7d7; --bg-2: #f1dcc4; --bg-3: #fbefe3; --accent: #ff6a3d; --accent-2: #ffc93c; }
body.is-event .machine__frame, body.is-event .panel { background: #fff7ee; }
body.is-event .meter__fill { background: linear-gradient(90deg, #ff6a3d, #ffc93c); }

/* ---------- result card (modal) ---------- */
.result { position: fixed; inset: 0; z-index: 960; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s; }
.result.is-open { visibility: visible; opacity: 1; }
.result__backdrop { position: absolute; inset: 0; background: rgba(24,21,32,.55); }
.result__card {
  position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px; border-radius: 28px; overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--c) 55%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, #221f31 0%, #141220 100%);
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.7);
  --ink-line: rgba(255,255,255,.18); --ink-soft: rgba(255,255,255,.65);
}
.result__top { width: 100%; display: flex; justify-content: space-between; color: rgba(255,255,255,.6); }
.result__landed { margin-top: 26px; color: rgba(255,255,255,.6); }
.result__icon { font-size: clamp(3rem, 12vw, 4.4rem); line-height: 1; margin-top: 12px; filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--c) 60%, transparent)); }
.result__outcome { font-size: clamp(2rem, 8vw, 3rem); margin-top: 10px; color: var(--c); }
.result__amount { margin-top: 8px; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .02em; }
.result__note { margin-top: 8px; font-size: 13px; color: rgba(255,255,255,.65); max-width: 30ch; }
.result__how { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: rgba(255,255,255,.5); max-width: 36ch; }
.result__foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); padding-top: 14px; }
.result__actions { width: 100%; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.result__actions .btn--outline { color: var(--paper); border-color: rgba(255,255,255,.4); }
.result__actions .btn--ghost { color: var(--paper); }
.result__actions .btn--pill:not(.btn--outline):not(.btn--ghost) { background: var(--paper); color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .footer__grid--simple { grid-template-columns: 1fr 1fr; }
  .footer__grid--simple .footer__contract { grid-column: 1 / -1; }
  .events__grid { grid-template-columns: repeat(2, 1fr); }
  .numbers__grid { grid-template-columns: 1fr; }
  .stats--protocol { grid-template-columns: repeat(2, 1fr); }
  .txp__flow { grid-template-columns: 1fr; }
  .txp__arrow { flex-direction: row; padding: 0 12px; height: 28px; align-items: center; gap: 12px; }
  .txp__arrow i { flex: 1; height: 2px; }
  .txp__arrow i::after { right: -1px; top: -3px; transform: rotate(135deg); }
  .txp__buckets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .machine__grid { grid-template-columns: 1fr; }
  .machine__head { flex-direction: column; align-items: flex-start; }
  .machine__jackpot { align-items: flex-start; text-align: left; }
  .hrow__main { grid-template-columns: 90px minmax(0, 1fr) 84px 28px; row-gap: 4px; }
  .hrow__note { display: none; }
  .hrow__amt { text-align: right; }
  .hrow__when { grid-column: 2; font-size: 11px; text-align: left; }
  .hrow__plus { grid-column: 4; grid-row: 1 / span 2; }   /* the + sits in the right column, centred over both lines */
  .hrow__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__grid--simple { grid-template-columns: 1fr; }
  .stats--protocol { grid-template-columns: 1fr 1fr; }
  .hist__head, .tx__head { flex-direction: column; align-items: flex-start; }
  .txp__buckets { grid-template-columns: 1fr; }
  .txp__rules ol { grid-template-columns: 1fr; }
  .machine__frame { padding: 12px; border-radius: 18px; }
  .plinko__slots { gap: 2px; }
  .slot { padding: 7px 0 6px; border-radius: 7px; }
  .slot__icon { font-size: 14px; }
  .slot__label, .slot__pct { display: none; }           /* 13 slots on a phone: icons only, odds live in the odds panel */
  .machine__bar { flex-direction: column; align-items: stretch; }
  .btn--drop { width: 100%; }
  .machine__chips { justify-content: center; }
  .meter__stats { grid-template-columns: 1fr 1fr; }
  .meter__stat--pct { grid-column: 1 / -1; }
  .evt { top: 72px; font-size: 12px; }
  .evt__desc { display: none; }
  .result__card { aspect-ratio: auto; padding: 22px; }
}

/* the drop control is a status pill now (the machine drops by itself) */
.btn--drop { pointer-events: none; opacity: .6; }
.btn--drop.is-armed, .btn--drop.is-playing { opacity: 1; }

/* ---------- ball celebration (OUTCOME scene) ---------- */
.hero__visual::after {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  border: 3px solid var(--accent-2); opacity: 0; pointer-events: none;
}
.hero__visual.is-celebrating::after { animation: ballRing 1.4s ease-out infinite; }
.hero__visual.is-celebrating .ball { box-shadow: inset -14px -18px 34px rgba(24,21,32,.28), 0 0 60px 6px rgba(184,255,92,.45), 0 40px 80px -30px rgba(24,21,32,.5); }
@keyframes ballRing { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
html.lite .hero__visual.is-celebrating::after { animation: none; }
.confetti { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 10px; height: 14px; margin: -7px 0 0 -5px; border-radius: 2px; background: var(--c); will-change: transform, opacity; }

/* claim — holders collect their jackpot share */
.claimsec { padding: clamp(80px, 12vh, 150px) 0; }
.claimsec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.claim { padding: clamp(22px, 3vw, 34px); }
.claim__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.claim__wallet b { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.claim__status { margin: 18px 0 0; font-size: 14px; color: var(--ink-soft); }
.claim__list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink-line); }
.claim__list:empty { border-top: 0; margin: 0; }
.claim__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 160px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--ink-line); }
.claim__row b { display: block; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.claim__row span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }
.claim__share b { color: var(--accent); font-size: 1.35rem; }
.claim__share small { font-size: 12px; color: var(--ink-soft); font-family: var(--font-body, inherit); margin-left: 8px; letter-spacing: 0; }
.claim__row.is-out .claim__share b { color: var(--ink-soft); }
.claim__action { text-align: right; }
.claim__row .claim__done { margin: 0; font-family: var(--font-display); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.claim__done a { border-bottom: 1px solid currentColor; }
.claim__demo { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); }
.claim.is-connected .claim__connect { background: var(--paper); color: var(--ink); border: 1px solid var(--accent-2); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .claim__row { grid-template-columns: 1fr 1fr; }
  .claim__action { grid-column: 1 / -1; text-align: left; }
}
