:root {
  --bg: #050607;
  --ink: #f3efe6;
  --ink-2: rgba(243, 239, 230, 0.64);
  --ink-3: rgba(243, 239, 230, 0.38);
  --line: rgba(243, 239, 230, 0.10);
  --line-2: rgba(243, 239, 230, 0.18);
  --gold: #e9c27a;
  --green: #5ee39d;
  --panel: rgba(10, 12, 13, 0.72);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pad: clamp(18px, 3.2vw, 44px);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; scrollbar-color: #2a2c2b var(--bg); }
body { margin: 0; font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
::selection { background: rgba(94, 227, 157, 0.3); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232524; border-radius: 10px; border: 2px solid var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; cursor: grab; outline: none; }
#stage:active { cursor: grabbing; }
@media (pointer: coarse) { #stage { touch-action: pan-y; } }

/* ---------------------------------------------------------------- loader */
.loader { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; transition: opacity .9s ease, visibility .9s; }
.loader.gone { opacity: 0; visibility: hidden; }
.loader-in { display: grid; justify-items: center; gap: 22px; }
.loader-in img { opacity: .9; animation: breathe 2.4s ease-in-out infinite; }
.loader-bar { width: 132px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s ease; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .6; } }

/* ---------------------------------------------------------------- top bar */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 18px var(--pad); pointer-events: none; }
.top > * { pointer-events: auto; }
.top::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(5, 6, 7, .55), rgba(5, 6, 7, 0)); pointer-events: none; z-index: -1; opacity: 0; transition: opacity .4s; }
.top.scrolled::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 10px; font: 400 25px/1 var(--serif); letter-spacing: .005em; }
.brand img { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5)); }
.nav { display: flex; gap: 26px; margin-left: 18px; }
.nav a { font-size: 13.5px; color: var(--ink-2); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ca { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(8, 9, 10, .45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font: 500 12.5px var(--mono); color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s; }
.ca:hover { border-color: rgba(243, 239, 230, .35); color: var(--ink); }
.ca-l { color: var(--ink-3); }
.ca[hidden] { display: none; }
.ca.copied #caText { color: var(--green); }
.buy { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #0a0b0b; font-weight: 500; font-size: 13.5px; transition: transform .2s ease, background .2s; }
.buy:hover { background: #fff; transform: translateY(-1px); }
.buy.off { background: rgba(243, 239, 230, .14); color: var(--ink-2); pointer-events: none; }

/* ---------------------------------------------------------------- hero overlay */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; z-index: 10; pointer-events: none; }
.pot { position: absolute; left: 50%; bottom: clamp(26px, 6.5vh, 70px); transform: translateX(-50%); text-align: center; }
.pot-label, .clock-label { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.pot-sol { margin-top: 8px; font: 400 clamp(56px, 8.4vw, 118px)/.92 var(--serif); letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-shadow: 0 6px 40px rgba(0, 0, 0, .55); }
.pot-sol small { font: 500 clamp(13px, 1.2vw, 16px) var(--mono); letter-spacing: .08em; color: var(--ink-2); margin-left: .5em; vertical-align: .5em; }
.pot-usd { margin-top: 10px; font: 400 15px var(--mono); color: var(--ink-2); }
.clock { position: absolute; left: var(--pad); bottom: clamp(26px, 6.5vh, 70px); }
.clock-time { display: flex; gap: 16px; margin-top: 10px; }
.clock-time span { display: grid; justify-items: start; }
.clock-time b { font: 400 34px/1 var(--serif); font-variant-numeric: tabular-nums; min-width: 1.15em; }
.clock-time i { font: 500 10px var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.drops { position: absolute; right: var(--pad); bottom: clamp(26px, 6.5vh, 70px); margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; justify-items: end; min-width: 200px; }
.drops li { font: 400 12.5px var(--mono); color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; animation: dropIn .55s cubic-bezier(.2, .8, .2, 1) both; transition: opacity 1.2s; }
.drops li b { color: var(--gold); font-weight: 500; }
.drops li.old { opacity: .35; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } }
.hint { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 10px; transition: opacity 1s; }
.hint.gone { opacity: 0; }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }

/* ---------------------------------------------------------------- content sheet */
.sheet { position: relative; z-index: 10; background: linear-gradient(rgba(5, 6, 7, 0), var(--bg) 140px); padding-top: 80px; }
.block { max-width: 1180px; margin: 0 auto; padding: 90px var(--pad); }
.block h2 { margin: 0; font: 400 clamp(40px, 5.6vw, 76px)/1 var(--serif); letter-spacing: -.012em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 60px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.steps article { background: var(--bg); padding: 30px 28px 34px; }
.steps .n { font: 500 12px var(--mono); color: var(--ink-3); letter-spacing: .1em; }
.steps h3 { margin: 38px 0 10px; font: 500 18px/1.3 var(--sans); }
.steps p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.link { display: inline-block; margin-top: 16px; font-size: 13.5px; color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s; }
.link:hover { border-color: var(--ink); }

.math { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; margin-top: 80px; align-items: start; }
.math h3 { margin: 0 0 22px; font: 500 18px var(--sans); }
.formula { font: 400 clamp(24px, 2.6vw, 34px)/1.2 var(--serif); color: var(--ink-2); }
.formula span { color: var(--ink); }
.math p { color: var(--ink-2); margin: 18px 0 0; max-width: 520px; }
.rules { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 520px; }
.rules li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 14.5px; }
.rules li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 1px; background: var(--gold); }
.ex { border: 1px solid var(--line); border-radius: 18px; padding: 28px; background: linear-gradient(180deg, rgba(243, 239, 230, .03), rgba(243, 239, 230, 0)); }
.ex-h { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 26px; }
.ex-row { display: flex; align-items: baseline; gap: 10px; }
.ex-row .who { flex: 1; color: var(--ink-2); font-size: 14px; }
.ex-row .pts { font: 400 30px/1 var(--serif); font-variant-numeric: tabular-nums; }
.ex-row .unit { font: 500 11px var(--mono); color: var(--ink-3); }
.ex-bar { height: 3px; background: var(--line); border-radius: 3px; margin: 12px 0 24px; overflow: hidden; }
.ex-bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.ex-bar i.b { background: var(--ink-3); }
.ex-note { font-size: 13.5px !important; margin: 0 !important; }

.block-h { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.board-meta { font: 400 13px var(--mono); color: var(--ink-3); }
.board-meta span { color: var(--ink-2); }
.table-wrap { margin-top: 40px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.board { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th { text-align: left; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(243, 239, 230, .02); }
.board td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board tr:last-child td { border-bottom: 0; }
.board .r { text-align: right; }
.board td.rank { color: var(--ink-3); font: 400 13px var(--mono); width: 54px; }
.board td.w { font: 400 13px var(--mono); }
.board td.w a { color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .2s; }
.board td.w a:hover { border-color: var(--ink-3); }
.board td.dim { color: var(--ink-2); }
.board td.gets { color: var(--gold); }
.board tr.me td { background: rgba(94, 227, 157, .07); }
.board tr.fresh td { animation: rowIn .8s ease both; }
@keyframes rowIn { from { background: rgba(233, 194, 122, .08); } }
.board .empty td { text-align: center; color: var(--ink-3); padding: 40px; }
.pager { display: flex; justify-content: center; margin-top: 22px; }
.pager button, .me-form button { height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 13.5px; transition: border-color .2s, background .2s; }
.pager button:hover, .me-form button:hover { border-color: var(--ink-2); background: rgba(243, 239, 230, .04); }

.me-form { display: flex; gap: 10px; margin-top: 36px; max-width: 680px; }
.me-form input { flex: 1; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(243, 239, 230, .03); color: var(--ink); font: 400 14px var(--mono); outline: none; transition: border-color .2s; }
.me-form input:focus { border-color: rgba(243, 239, 230, .45); }
.me-form input::placeholder { color: var(--ink-3); }
.me-form button { height: 52px; padding: 0 28px; background: var(--ink); color: #0a0b0b; border-color: var(--ink); font-weight: 500; }
.me-form button:hover { background: #fff; }
.me-out { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; max-width: 880px; }
.me-out > div { padding: 22px 24px; border-right: 1px solid var(--line); }
.me-out > div:last-child { border-right: 0; }
.me-out .k { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.me-out .v { margin-top: 10px; font: 400 32px/1 var(--serif); font-variant-numeric: tabular-nums; }
.me-out .v.gold { color: var(--gold); }
.me-out .s { margin-top: 6px; font: 400 12.5px var(--mono); color: var(--ink-3); }
.me-out.msg { display: block; padding: 22px 24px; color: var(--ink-2); }

.foot { max-width: 1180px; margin: 0 auto; padding: 40px var(--pad) 50px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 9px; font: 400 21px var(--serif); }
.foot-links { display: flex; gap: 24px; font-size: 13.5px; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .math { grid-template-columns: 1fr; gap: 40px; }
  .me-out { grid-template-columns: repeat(2, 1fr); }
  .me-out > div:nth-child(2) { border-right: 0; }
  .me-out > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .top { padding: 14px 16px; gap: 10px; }
  .brand { font-size: 22px; }
  .ca { display: none !important; }
  .buy { height: 34px; padding: 0 14px; font-size: 12.5px; }
  .pot { bottom: 150px; width: 100%; }
  .clock { left: 0; right: 0; bottom: 34px; display: grid; justify-items: center; }
  .clock-time b { font-size: 28px; }
  .drops { display: none; }
  .hint { top: 76px; }
  .block { padding: 64px 16px; }
  .board th.hide-s, .board td.hide-s { display: none; }
  .board th, .board td { padding: 12px 10px; }
  .board td.rank { width: 34px; }
  .me-form { flex-direction: column; }
  .me-form button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hint-dot, .loader-in img { animation: none; }
}

/* ?clean: the room alone, for the share image */
body.clean .top, body.clean .hero > * { display: none !important; }
.pager[hidden], .me-out[hidden] { display: none; }
