@font-face { font-family: 'Unbounded'; src: url('../fonts/unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --void: #05040f; --deep: #0c0a2b; --ink: #ece8ff; --mute: #9a94c4; --dim: #5d5888;
  --honey: #ffb627; --honey-2: #ffd36e; --amber: #ff7a00; --violet: #7b5cff; --cyan: #5ee7ff; --red: #ff4d5e; --green: #3dffa8;
  --glass: rgba(16, 12, 44, 0.52); --glass-2: rgba(28, 20, 70, 0.55); --line: rgba(160, 140, 255, 0.18);
  --display: 'Unbounded', system-ui, sans-serif; --body: 'Space Grotesk', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  --r: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button, input { font: inherit; color: inherit; }
a { color: var(--honey-2); }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 45% 50%, transparent 45%, rgba(3, 2, 10, 0.55) 80%, rgba(2, 1, 8, 0.92) 100%); }
.scanlines { position: fixed; inset: 0; pointer-events: none; opacity: .07; background: repeating-linear-gradient(0deg, rgba(255,255,255,.5) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.ui { position: fixed; inset: 0; pointer-events: none; }
.ui > * { pointer-events: auto; }

/* ---------- shared pieces ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(255, 182, 39, .7)); }
.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: .02em; font-size: 18px; }
.wordmark b { color: var(--honey); font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s infinite; }
.dot.warn { background: var(--honey); box-shadow: 0 0 10px var(--honey); }
@keyframes blink { 50% { opacity: .35; } }

.glass { background: linear-gradient(160deg, rgba(40, 28, 100, .55), rgba(10, 8, 30, .62)); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); position: relative; }
.glass::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(255, 182, 39, .55), transparent 35%, transparent 70%, rgba(123, 92, 255, .6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.h-card { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.h-card .hexi { width: 14px; height: 14px; background: var(--honey); clip-path: var(--hex); box-shadow: 0 0 12px var(--honey); }

.btn { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 700; letter-spacing: .03em; text-decoration: none; transition: transform .12s, box-shadow .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn-honey { background: linear-gradient(180deg, #ffd36e, #ffa41b 55%, #ff8a00); color: #1c0f00; box-shadow: 0 0 0 1px rgba(255, 220, 140, .6) inset, 0 8px 30px rgba(255, 150, 20, .45), 0 0 50px rgba(255, 150, 20, .25); }
.btn-honey:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(255, 220, 140, .8) inset, 0 8px 40px rgba(255, 150, 20, .7); }
.btn-ghost { background: rgba(123, 92, 255, .14); color: var(--ink); border: 1px solid rgba(160, 140, 255, .35); }
.btn-x { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-x svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.field { display: flex; align-items: center; gap: 8px; background: rgba(5, 4, 20, .6); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 46px; transition: border-color .2s, box-shadow .2s; }
.field:focus-within { border-color: rgba(255, 182, 39, .7); box-shadow: 0 0 0 3px rgba(255, 182, 39, .15), 0 0 20px rgba(255, 182, 39, .15); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 44px; font-size: 15px; }
.field .pre, .field .suf { color: var(--mute); font-family: var(--mono); font-size: 13px; }
.msg { font-size: 13px; min-height: 18px; margin-top: 8px; color: var(--mute); }
.msg.err { color: var(--red); } .msg.ok { color: var(--green); }

.code-chip { font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: .06em; color: var(--honey-2); text-shadow: 0 0 18px rgba(255, 182, 39, .7); padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(255, 182, 39, .5); background: rgba(255, 160, 20, .07); text-align: center; user-select: all; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--display); font-size: 11px; font-weight: 800; color: #1c0f00; background: var(--honey); clip-path: var(--hex); }
.steps li.done::before { content: '✓'; background: var(--green); }
.steps li.locked { opacity: .45; }
.steps .stack { display: grid; gap: 8px; }
.hint { font-size: 12.5px; color: var(--mute); line-height: 1.45; }

.balance { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; background: linear-gradient(180deg, #fff3c9, var(--honey) 60%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255, 170, 30, .45)); }
.balance small { font-size: 13px; letter-spacing: .1em; -webkit-text-fill-color: var(--honey-2); margin-left: 6px; }
.handle { font-family: var(--display); font-weight: 600; font-size: 15px; }
.verified-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; clip-path: var(--hex); background: var(--honey); color: #1c0f00; font-size: 11px; font-weight: 900; vertical-align: middle; margin-left: 4px; }

/* validator dots */
.vdots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.vdots i { width: 12px; height: 12px; clip-path: var(--hex); background: rgba(123, 92, 255, .25); }
.vdots i.on { background: var(--honey); box-shadow: 0 0 8px var(--honey); animation: pop .4s; }
.vdots i.me { background: #fff3c9; }
@keyframes pop { from { transform: scale(0); } }

/* labels over validators */
#labels { position: fixed; inset: 0; pointer-events: none; }
.vlabel { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(8, 6, 26, .65); border: 1px solid rgba(255, 182, 39, .35); color: var(--honey-2); white-space: nowrap; will-change: transform; transition: opacity .3s; }
.vlabel.me { background: var(--honey); color: #1c0f00; font-weight: 800; border-color: transparent; }

/* waiting overlay */
.waiting { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .8s; }
.waiting.show { opacity: 1; }
.waiting .wbox { text-align: center; padding: 0 20px; transform: translateY(18vh); }
.waiting .wtitle { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 3.6vw, 46px); letter-spacing: .04em; text-transform: uppercase; line-height: 1.08; background: linear-gradient(180deg, #fff, #ffd36e 55%, #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255, 150, 20, .55)); animation: breathe 2.4s ease-in-out infinite; }
.waiting .wtitle .ell::after { content: ''; animation: ell 1.6s steps(4) infinite; }
@keyframes ell { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@keyframes breathe { 50% { filter: drop-shadow(0 0 36px rgba(255, 150, 20, .9)); letter-spacing: .06em; } }
.waiting .wsub { margin-top: 12px; color: var(--mute); font-size: 15px; max-width: 520px; margin-inline: auto; }
.waiting .wbar { margin: 18px auto 0; width: min(360px, 70vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; position: relative; }
.waiting .wbar::after { content: ''; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--honey), transparent); animation: sweep 1.4s ease-in-out infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.waiting .wcta { margin-top: 18px; pointer-events: auto; }
.waiting .count { display: inline-flex; gap: 10px; align-items: center; margin-bottom: 14px; font-family: var(--mono); font-size: 13px; color: var(--honey-2); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 182, 39, .4); background: rgba(40, 20, 0, .4); }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 210px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.feed li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); animation: slidein .45s cubic-bezier(.2, .9, .3, 1.3); }
.feed li .ico { width: 18px; height: 18px; clip-path: var(--hex); flex: none; background: var(--violet); }
.feed li.blk .ico { background: var(--honey); }
.feed li.pay .ico { background: var(--cyan); }
.feed li.me { background: rgba(255, 182, 39, .12); }
.feed li .t { color: var(--mute); margin-left: auto; font-family: var(--mono); font-size: 11px; }
@keyframes slidein { from { transform: translateY(-12px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; transition: .35s cubic-bezier(.2, .9, .3, 1.2); padding: 12px 18px; border-radius: 14px; background: rgba(12, 10, 34, .9); border: 1px solid rgba(255, 182, 39, .5); box-shadow: 0 0 30px rgba(255, 150, 20, .3); font-weight: 600; z-index: 50; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= FULL SITE ================= */
.mode-full .topbar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; }
.mode-full .topbar nav { display: flex; gap: 10px; align-items: center; }
.mode-full .hero-copy { position: fixed; left: 32px; top: 110px; max-width: 560px; pointer-events: none; }
.hero-copy .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .25em; color: var(--honey); text-transform: uppercase; }
.hero-copy h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.3vw, 64px); line-height: .98; letter-spacing: -.01em; margin: 14px 0 16px; text-shadow: 0 0 40px rgba(123, 92, 255, .4); }
.hero-copy h1 em { font-style: normal; background: linear-gradient(90deg, #ffe39a, #ffb627 40%, #ff7a00); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(255, 150, 20, .5)); }
.hero-copy p { text-shadow: 0 2px 18px rgba(0,0,0,.9); color: #c9c3ee; font-size: 16.5px; line-height: 1.55; max-width: 460px; margin: 0; }
.mode-full .stats { position: fixed; left: 32px; bottom: 28px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; right: 440px; max-width: 900px; }
.stat { padding: 14px 16px 16px; }
.stat .v { font-size: 30px; margin-top: 6px; line-height: 1; }
.stat .v small { font-size: 13px; color: var(--mute); margin-left: 3px; font-weight: 500; }
.stat .sub { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.hot .v { color: var(--honey-2); text-shadow: 0 0 16px rgba(255, 182, 39, .6); }
.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.12); color: #fff; text-shadow: 0 0 24px var(--honey); } }
.mode-full .panel { position: fixed; top: 88px; right: 24px; bottom: 24px; width: 392px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; scrollbar-width: none; padding-bottom: 4px; }
.mode-full .panel::-webkit-scrollbar { display: none; }
.card { padding: 18px; }
.idrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.form-grid { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; }

@media (max-width: 900px) {
  body.mode-full { overflow: auto; }
  .mode-full .ui { position: relative; min-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
  .mode-full .topbar, .mode-full .hero-copy, .mode-full .stats, .mode-full .panel { position: static; padding: 0; width: auto; max-width: none; }
  .mode-full .hero-copy { margin-top: 46vh; }
  .mode-full .topbar .pill { white-space: nowrap; font-size: 10.5px; padding: 6px 10px; }
  .mode-full .topbar a.pill { display: none; }
  .mode-full .wordmark { font-size: 16px; }
  .mode-full .stats { grid-template-columns: repeat(2, 1fr); }
  .mode-full .panel { overflow: visible; }
}

/* ================= PLAY (480x480 card) ================= */
.mode-play .ptop { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mode-play .logo svg { width: 26px; height: 26px; }
.mode-play .wordmark { font-size: 13px; }
.chips { display: flex; gap: 6px; margin-top: 8px; }
.chip { padding: 6px 9px 7px; border-radius: 12px; min-width: 64px; }
.chip .label { font-size: 8.5px; letter-spacing: .14em; }
.chip .num { font-size: 17px; display: block; margin-top: 2px; }
.chip.hot .num { color: var(--honey-2); text-shadow: 0 0 12px rgba(255, 182, 39, .7); }
.me-chip { padding: 8px 11px; border-radius: 14px; text-align: right; min-width: 108px; }
.me-chip .handle { font-size: 11.5px; }
.me-chip .balance { font-size: 20px; }
.me-chip .balance small { font-size: 9px; }
.mode-play .pbottom { position: fixed; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-play .pbottom .btn { min-height: 52px; font-size: 15px; border-radius: 14px; }
.mode-play .full-link { position: fixed; right: 12px; bottom: 70px; font-size: 11px; color: var(--mute); text-decoration: none; letter-spacing: .06em; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; max-height: calc(100% - 16px); overflow-y: auto; padding: 14px 14px 16px; transform: translateY(calc(100% + 20px)); transition: transform .38s cubic-bezier(.2, .9, .25, 1.05); z-index: 20; }
.sheet.open { transform: none; }
.sheet .grab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet .close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); cursor: pointer; font-size: 18px; line-height: 1; }
.mode-play .steps { gap: 9px; }
.mode-play .code-chip { font-size: 17px; padding: 8px; }
.mode-play .waiting .wbox { transform: translateY(-6%); }
.waiting .wsub { text-shadow: 0 2px 12px #000, 0 0 4px #000; }
.mode-play .waiting .wtitle { font-size: 21px; }
.mode-play .waiting .wsub { font-size: 12.5px; max-width: 330px; }
.mode-play .waiting .count { font-size: 11px; margin-bottom: 10px; }
.mode-play .toast { bottom: auto; top: 116px; font-size: 13px; z-index: 60; }
.mode-play .form-row { grid-template-columns: 1fr 110px; }

@media (min-width: 901px) { .mode-full .waiting { right: 420px; } .mode-full .waiting .wbox { transform: translateY(-21vh); } .mode-full .waiting .wtitle { font-size: clamp(20px, 2.5vw, 38px); } }

.hero-copy { transition: opacity .8s, transform .8s; }
body.is-waiting .mode-full-only, .mode-full.is-waiting .hero-copy { opacity: 0; transform: translateY(-10px); }

.linkbox { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.mode-play .mode-pill { position: fixed; left: 12px; bottom: 70px; font-size: 9px; padding: 3px 8px; }
