:root {
  --ink: #12111c;
  --ink-2: #1b1a29;
  --ink-3: #262438;
  --line: rgba(255, 255, 255, .09);
  --text: #f5f1e8;
  --muted: #a9a4bd;
  --sun: #f9d77a;
  --sky-1: #f9e7a8; --sky-2: #f8d39a; --sky-3: #f4b591; --sky-4: #ec9a98; --sky-5: #c98bb0; --sky-6: #8f7cc0; --sky-7: #6a68ad;
  --good: #8fe3a5;
  --bad: #ff9a8a;
  --r: 18px;
  --pixel: "Silkscreen", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 16px/1.5 "Geist", system-ui, sans-serif; font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: .92em; overflow-wrap: anywhere; }
.px { font-family: var(--pixel); letter-spacing: .02em; }
.muted { color: var(--muted); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* header */
.top {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px max(16px, calc((100% - 1180px) / 2));
}
.top.solid { position: sticky; top: 0; background: rgba(18, 17, 28, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.brand canvas, .brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.on-sky .brand { color: #241a36; }
.top nav { display: flex; gap: 6px; align-items: center; }
.link { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; }
.link:hover { background: rgba(255, 255, 255, .08); }
.on-sky .link { color: #2b2140; }
.on-sky .link:hover { background: rgba(255, 255, 255, .35); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #15131f; font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.dark { background: var(--ink-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ink { background: #241a36; color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--sky-1); display: flex; flex-direction: column; }
.hero canvas.scene { order: 2; }
.hero canvas.scene { width: 100%; height: auto; aspect-ratio: 360 / 170; image-rendering: pixelated; }
.hero-copy {
  width: min(1180px, 100% - 32px); margin-inline: auto; padding: clamp(96px, 12vw, 150px) 0 clamp(8px, 2vw, 24px);
  color: #21182f; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px 48px; align-items: end;
}
.hero-copy h1 { margin: 0; font-size: clamp(36px, 5.4vw, 76px); line-height: 1; letter-spacing: -.04em; font-weight: 650; }
.hero-copy p { margin: 0 0 18px; font-size: clamp(16px, 1.4vw, 19px); color: #3a2c4e; }
.hero-copy .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-copy .btn.light { background: rgba(255, 255, 255, .55); color: #21182f; }
@media (max-width: 760px) { .hero-copy { grid-template-columns: 1fr; padding-top: 88px; } }

/* sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; font-weight: 620; line-height: 1.1; }
.head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
h1.page-title { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; margin: 0 0 8px; font-weight: 650; line-height: 1.05; }

.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); }
.empty { padding: 28px; color: var(--muted); text-align: center; }

/* coin cards */
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.coin { display: block; text-decoration: none; padding: 16px; transition: border-color .15s ease, transform .15s ease; }
.coin:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.coin .who { display: flex; gap: 12px; align-items: center; }
.coin .who img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--ink-3); }
.coin .who b { display: block; font-size: 17px; font-weight: 600; }
.coin .who span { color: var(--muted); font-size: 14px; }
.faces { display: flex; flex-wrap: wrap; gap: 2px; margin: 14px 0 12px; }
.faces canvas { width: 24px; height: 24px; image-rendering: pixelated; }
.stats { display: flex; gap: 18px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.stats b { color: var(--text); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--ink-3); color: var(--muted); }
.status.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

/* fee split */
.split { display: grid; grid-template-columns: 50fr 30fr 20fr; gap: 6px; margin: 8px 0 18px; }
.split > div { border-radius: 14px; padding: 18px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; }
.split .a { background: var(--sky-2); color: #2a1d12; }
.split .b { background: var(--sky-4); color: #2e1320; }
.split .c { background: var(--sky-6); color: #160f2b; }
.split strong { font-size: clamp(30px, 4vw, 52px); letter-spacing: -.04em; line-height: 1; font-weight: 650; }
.split span { font-size: 15px; font-weight: 500; }
.split em { font-style: normal; font-size: 13px; opacity: .75; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } .split > div { min-height: 0; gap: 10px; } }

/* seats grid */
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 2px; }
.seatwall { width: 100%; image-rendering: pixelated; border-radius: 12px; background: var(--ink-2); cursor: pointer; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.feed li:first-child { border-top: 0; }
.feed canvas { width: 28px; height: 28px; image-rendering: pixelated; flex: none; }
.feed time { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* forms */
label { display: block; font-size: 14px; font-weight: 550; margin: 0 0 6px; }
input[type=text], textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
}
input[type=text]:focus, textarea:focus { border-color: rgba(249, 215, 122, .7); }
textarea { min-height: 110px; resize: vertical; }
.help { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.form { padding: 22px; display: grid; gap: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.drop { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 14px; cursor: pointer; }
.drop img, .drop .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--ink-3); flex: none; }
.drop input { display: none; }

.launch { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .launch { grid-template-columns: 1fr; } }
.side { padding: 22px; position: sticky; top: 84px; }
.side h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.02em; }
.crewgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.crewgrid a { text-decoration: none; text-align: center; font-size: 11px; color: var(--muted); }
.crewgrid canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: var(--ink-3); border-radius: 10px; padding: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#status { min-height: 24px; font-size: 14px; color: var(--muted); margin-top: 12px; }
#status.err { color: var(--bad); }
.wallets { display: grid; gap: 8px; margin-top: 10px; }
.wallets .btn { justify-content: flex-start; }
.wallets img { width: 20px; height: 20px; }

/* coin page */
.coinhead { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.coinhead img { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--ink-3); text-decoration: none; color: var(--text); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { border: 0; background: var(--ink-3); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.tabs button[aria-pressed=true] { background: #fff; color: #15131f; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.piece { overflow: hidden; display: flex; flex-direction: column; }
.piece .media { background: var(--ink-3); aspect-ratio: 1; }
.piece .media img, .piece .media video { width: 100%; height: 100%; object-fit: cover; }
.piece .media iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.piece .text { padding: 18px; font-size: 16px; line-height: 1.45; flex: 1; white-space: pre-wrap; }
.piece .by { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.piece .by canvas { width: 24px; height: 24px; image-rendering: pixelated; }
.piece .by a { color: var(--text); text-decoration: none; }
.piece .by .kept { margin-left: auto; color: var(--good); }
.piece .by .dropped { margin-left: auto; }
.piece.dropped { opacity: .55; }
.notice { padding: 14px 16px; border-radius: 14px; background: rgba(249, 215, 122, .1); border: 1px solid rgba(249, 215, 122, .3); font-size: 14px; margin-bottom: 18px; }

/* agent page */
.agenthead { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; }
.agenthead canvas { width: 200px; height: 200px; image-rendering: pixelated; background: linear-gradient(var(--sky-1), var(--sky-4) 60%, var(--sky-6)); border-radius: 24px; padding: 24px; }
@media (max-width: 560px) { .agenthead { grid-template-columns: 1fr; } }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }

footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
