:root {
  color-scheme: dark;
  --bg: #071510;
  --bg-2: #0c221b;
  --panel: rgba(10, 32, 26, 0.78);
  --line: rgba(146, 214, 176, 0.18);
  --ink: #f3fff6;
  --muted: #b7d2c4;
  --mint: #8dffc8;
  --mint-2: #d7ffe9;
  --gold: #f2c14e;
  --gold-2: #ffe7a8;
  --coral: #ff7d92;
  --paper: #f6ecd4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --sans: "Outfit", system-ui, sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(64, 168, 112, 0.35), transparent 60%),
    radial-gradient(700px 420px at -10% 18%, rgba(242, 193, 78, 0.14), transparent 55%),
    radial-gradient(800px 500px at 50% 120%, rgba(20, 70, 52, 0.45), transparent 50%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='140' viewBox='0 0 220 140'><path d='M-10 70c28-28 52-28 80 0s52 28 80 0 52-28 80 0' fill='none' stroke='%238dffc8' stroke-opacity='.22' stroke-width='1.2'/><path d='M-10 98c28-22 52-22 80 0s52 22 80 0 52-22 80 0' fill='none' stroke='%23f2c14e' stroke-opacity='.16' stroke-width='1'/><path d='M-10 42c28-22 52-22 80 0s52 22 80 0 52-22 80 0' fill='none' stroke='%238dffc8' stroke-opacity='.12' stroke-width='1'/></svg>");
  animation: drift 28s linear infinite;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255,255,255,.7) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}
header, main { position: relative; z-index: 2; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  padding: 0 28px;
  background: rgba(7, 21, 16, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 15px;
}
.brand b { color: var(--gold-2); font-weight: 700; }
.logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(242, 193, 78, 0.45);
  box-shadow: 0 0 0 4px rgba(141, 255, 200, 0.08), 0 8px 24px rgba(0,0,0,.35);
}
nav { display: flex; gap: 26px; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
}
nav a:hover { color: var(--mint); }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(141, 255, 200, 0.28);
  background: rgba(20, 64, 48, 0.72);
  color: var(--mint-2);
  border-radius: 999px;
  padding: 8px 12px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge i, .market-live i, .round-clock i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation: live-pulse 1.6s ease-in-out infinite;
}

main { max-width: 1240px; margin: 0 auto; padding: 0 28px 48px; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 36px;
  align-items: center;
  padding: 42px 0 18px;
  min-width: 0;
}
.stage-copy { min-width: 0; max-width: 100%; }
.eyebrow, small {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
h1 {
  margin: 14px 0 12px;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 7vw, 108px);
  line-height: 0.86;
  letter-spacing: 0.01em;
}
h1 em {
  font-style: normal;
  color: var(--gold-2);
  text-shadow: 0 0 32px rgba(242, 193, 78, 0.28);
}
.stage p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.beats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 8px;
  max-width: 560px;
}
.beats div {
  padding: 12px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 28, 22, 0.55);
}
.beats b {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: rgba(215, 255, 233, 0.45);
}
.beats span { display: block; font-weight: 700; margin-top: 2px; }
.beats small { display: block; margin-top: 3px; color: var(--muted); letter-spacing: 0.04em; font-size: 11px; }
body[data-phase="open"] [data-beat="open"],
body[data-phase="locked"] [data-beat="locked"],
body[data-phase="sync"] [data-beat="sync"] {
  border-color: rgba(242, 193, 78, 0.7);
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.16), rgba(8, 28, 22, 0.4));
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.15);
}
body[data-phase="open"] [data-beat="open"] b,
body[data-phase="locked"] [data-beat="locked"] b,
body[data-phase="sync"] [data-beat="sync"] b { color: var(--gold); }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 22px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, #d7a428);
  color: #241806;
  font: 750 15px/1 var(--sans);
  letter-spacing: 0.01em;
  box-shadow: 0 10px 30px rgba(242, 193, 78, 0.22), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .16s ease, filter .16s ease;
}
.button { margin-top: 22px; }
button:hover:not(:disabled), .button:hover { transform: translateY(-2px); filter: brightness(1.05); }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.poster {
  margin: 0;
  justify-self: end;
  width: min(100%, 460px);
  padding: 16px 16px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 28%),
    var(--paper);
  color: #1b2418;
  border-radius: 28px;
  transform: rotate(-2.4deg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 236, 190, 0.4);
}
.poster figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.14em;
}
.orb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.orb img {
  width: 86%;
  height: 86%;
  object-fit: cover;
  border-radius: 22px;
  position: relative;
  z-index: 1;
  animation: hypurr-float 5.5s ease-in-out infinite;
  box-shadow: 0 16px 40px rgba(7, 40, 30, 0.28);
}
.orbit {
  position: absolute;
  inset: 2%;
  border: 1.5px dashed rgba(27, 74, 52, 0.45);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}
.orbit.second {
  inset: -4%;
  border-style: solid;
  border-color: rgba(27, 74, 52, 0.18);
  animation-duration: 42s;
  animation-direction: reverse;
}
.seal {
  position: absolute;
  right: 4%;
  bottom: 6%;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  color: #3a2508;
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--gold) 42%, #c4891e);
  box-shadow: 0 10px 24px rgba(0,0,0,.25), inset 0 0 0 4px rgba(122, 74, 12, 0.35);
  transform: rotate(8deg);
}
.seal b {
  font-family: var(--display);
  font-size: 34px;
  line-height: 0.8;
  letter-spacing: 0.04em;
}
.seal b span { display: block; font-size: 16px; letter-spacing: 0.16em; }
.seal small { letter-spacing: 0.14em; font-size: 9px; color: #5c3d0e; }

.mission {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr auto;
  gap: 18px;
  align-items: end;
  margin-top: 8px;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 48, 38, 0.9), rgba(8, 24, 19, 0.92));
  box-shadow: 0 16px 50px rgba(0,0,0,.22);
}
.mission small { color: var(--muted); letter-spacing: 0.12em; }
.price-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#live-price {
  font-family: var(--display);
  font-size: clamp(56px, 6vw, 84px);
  line-height: 0.85;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.market-change {
  font: 600 13px/1 var(--mono);
  letter-spacing: 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.positive { color: var(--mint); }
.negative { color: var(--coral); }
.price-up { animation: price-rise 1.1s ease-out; }
.price-down { animation: price-fall 1.1s ease-out; }
.hunt-clock { min-width: 220px; }
.clock { display: block; }
.clock-kicker {
  display: block;
  color: var(--gold);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.clock-digits {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(64px, 7vw, 92px);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.hunt-clock.urgent .clock-digits {
  color: var(--gold-2);
  animation: tick 1s steps(2, end) infinite;
}
.hunt-clock.locked .clock-kicker { color: var(--mint); }
.round-progress {
  height: 6px;
  margin-top: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}
.round-progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #67be98, var(--mint), var(--gold));
  box-shadow: 0 0 16px rgba(141, 255, 200, 0.7);
  transition: width 1s linear;
}
.mission-meta { display: grid; justify-items: end; gap: 10px; align-content: end; }

.metrics {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0 22px;
}
.metrics > div {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 26, 21, 0.72);
}
.metrics small { color: var(--muted); }
.metrics strong {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.metrics span { color: var(--muted); font-size: 13px; }
.metric-points {
  background:
    radial-gradient(300px 120px at 0% 0%, rgba(242, 193, 78, 0.2), transparent 60%),
    rgba(8, 26, 21, 0.72) !important;
  border-color: rgba(242, 193, 78, 0.35) !important;
}
.metric-points strong { color: var(--gold-2); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 16px;
}
.panel {
  position: relative;
  margin-bottom: 16px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  scroll-margin-top: 92px;
}
.panel:hover { border-color: rgba(141, 255, 200, 0.32); }
h2 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.9;
}
.muted { color: var(--muted); margin: 0 0 8px; }
.section-head, .row, .slip-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.scope { overflow: hidden; }
.scope::before, .scope::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(242, 193, 78, 0.7);
  pointer-events: none;
}
.scope::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.scope::after { right: 12px; bottom: 12px; border-left: 0; border-top: 0; }
#arena.sealed { box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.55), 0 18px 50px rgba(242, 193, 78, 0.08); }
#arena.closed { border-color: rgba(141, 255, 200, 0.28); }

.chart { position: relative; margin-top: 8px; }
.chart svg {
  display: block;
  width: 100%;
  height: 250px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(141, 255, 200, 0.05), transparent 30%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(141, 255, 200, 0.08) 40px),
    #071812;
}
.chart::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 250px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(141, 255, 200, 0.07), transparent);
  animation: scan 4.8s linear infinite;
}
.row { margin-top: 8px; color: var(--muted); }
.row small { letter-spacing: 0.08em; }

.slip {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(246, 236, 212, 0.08), transparent 40%),
    rgba(4, 16, 13, 0.55);
  border: 1px dashed rgba(242, 193, 78, 0.45);
}
.slip-head { margin-bottom: 4px; }
.slip-head b { color: var(--gold-2); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
label { display: block; margin: 10px 0 8px; color: var(--mint-2); font-size: 13px; font-weight: 600; }
input {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(141, 255, 200, 0.24);
  background: #061410;
  color: var(--ink);
  padding: 16px 16px;
  font: 500 22px/1 var(--mono);
  letter-spacing: 0;
}
input.wallet { font-size: 16px; letter-spacing: 0.01em; padding: 14px 16px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row input { flex: 1; }
.input-row button { min-height: 60px; padding-inline: 22px; white-space: nowrap; }
.subnote { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow: auto; }
th, td { padding: 13px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th {
  color: var(--muted);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
td { font-variant-numeric: tabular-nums; }
td:last-child { color: var(--mint); font-family: var(--mono); font-size: 13px; }
tbody tr:hover { background: rgba(141, 255, 200, 0.05); }
#leaders { counter-reset: rank; }
#leaders tr { counter-increment: rank; }
#leaders td:first-child::before {
  content: counter(rank, decimal-leading-zero);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font: 600 11px/1 var(--mono);
}
#leaders tr:nth-child(1) td:first-child::before { background: var(--gold); color: #2a1c06; }
#leaders tr:nth-child(2) td:first-child::before { background: #d5ddd8; color: #1c2420; }
#leaders tr:nth-child(3) td:first-child::before { background: #d08958; color: #2a140c; }
#leaders tr.empty td:first-child::before,
#entries tr.empty td:first-child::before { content: none; display: none; }
.funding { border-color: rgba(242, 193, 78, 0.4); }

.integration {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
}
.integration b {
  color: var(--mint);
  font: 600 11px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}
.integration .pending { color: var(--gold); }

#history:empty, #history { color: var(--muted); }
#history > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0 12px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  font-size: 14px;
}

.rules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.rules div {
  padding: 16px;
  border-radius: 16px;
  background: rgba(4, 16, 13, 0.45);
  border: 1px solid var(--line);
}
.rules b {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold-2);
}
.rules b span {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}
.rules p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 4px 12px;
  color: var(--muted);
  font-size: 13px;
}
footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--gold-2); }

#status {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(560px, 92vw);
  padding: 14px 18px;
  border-radius: 999px;
  background: #14281f;
  color: var(--gold-2);
  border: 1px solid rgba(242, 193, 78, 0.45);
  box-shadow: 0 16px 50px rgba(0,0,0,.4);
  font-weight: 650;
}
#status:empty { display: none; }

@keyframes hypurr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 220px 80px; }
}
@keyframes scan {
  from { transform: translateY(-30%); }
  to { transform: translateY(80%); }
}
@keyframes tick {
  50% { opacity: 0.72; }
}
@keyframes price-rise {
  0% { color: #fff; text-shadow: 0 0 18px var(--mint); }
  100% { color: inherit; text-shadow: none; }
}
@keyframes price-fall {
  0% { color: #ffd0d8; text-shadow: 0 0 18px var(--coral); }
  100% { color: inherit; text-shadow: none; }
}

@media (max-width: 980px) {
  .stage, .layout, .rules, .metrics { grid-template-columns: 1fr 1fr; }
  .mission { grid-template-columns: 1fr 1fr; }
  .mission-meta { justify-items: start; grid-column: 1 / -1; }
  .poster { justify-self: center; }
  .rules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  header { height: auto; padding: 12px 16px; flex-wrap: wrap; }
  nav { order: 3; width: 100%; gap: 16px; padding-bottom: 4px; }
  .badge { display: none; }
  main { padding: 0 14px 36px; }
  .stage, .layout, .metrics, .rules, .beats { grid-template-columns: 1fr; }
  .stage { display: flex; flex-direction: column-reverse; align-items: stretch; padding-top: 18px; gap: 8px; min-width: 0; }
  .poster { width: min(100%, 300px); margin: 12px auto 0; transform: none; justify-self: center; }
  .poster figcaption { font-size: 22px; letter-spacing: 0.08em; }
  h1 { font-size: 52px; }
  .stage p { font-size: 16px; }
  .mission { grid-template-columns: 1fr; }
  #live-price { font-size: 64px; }
  .clock-digits { font-size: 72px; }
  .input-row { flex-direction: column; align-items: stretch; }
  .input-row button { width: 100%; }
  footer { flex-direction: column; align-items: flex-start; }
  .chart svg, .chart::after { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
