/* launchameme — near-black, one electric accent, product-shot framing. */
:root {
  --bg: #0a0a0b;
  --bg-2: #0f0f11;
  --card: #141416;
  --card-2: #1a1a1d;
  --card-3: #212125;
  --line: #242428;
  --line-2: #313136;
  --ink: #f4f4f2;
  --ink-2: #c7c7cb;
  --muted: #8a8a92;
  --accent: #c8ff2e;
  --accent-ink: #0a0a0b;
  --accent-soft: rgba(200, 255, 46, .1);
  --good: #5be38a;
  --bad: #ff6b5b;
  --display: Geist, "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: Geist, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --r: 20px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px rgba(0,0,0,.35);
  /* names the docs stylesheet still uses */
  --paper-2: var(--card-2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* a faint grid and one soft glow behind the hero — texture, not decoration */
body::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 980px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(620px 360px at 50% 0%, rgba(200,255,46,.10), transparent 70%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}
main, .top, .foot { position: relative; z-index: 1; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px/1 var(--body); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  padding: 11px 18px; border-radius: 999px; cursor: pointer;
  background: var(--card-2); color: var(--ink); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s, transform .15s, color .15s;
}
.btn:hover { border-color: #4a4a52; background: var(--card-3); }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover, .btn.accent:hover { background: #d6ff5c; border-color: #d6ff5c; }
.btn.ghost { background: transparent; }
.btn.lg { padding: 15px 24px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.connected { font-family: var(--mono); font-size: 13px; }

/* ---------- header: a floating pill ---------- */
.top {
  position: sticky; top: 14px; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  width: min(1180px, calc(100% - 28px)); margin: 14px auto 0;
  padding: 9px 9px 9px 16px;
  background: rgba(20,20,22,.82); border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: block; }
.wordmark { font: 700 18px/1 var(--display); letter-spacing: -0.04em; }
.wordmark b { color: var(--accent); font-weight: 700; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.top-nav a:hover { color: var(--ink); background: var(--card-2); }

/* ---------- hero ---------- */
.hero { max-width: 1100px; margin: 0 auto; padding: 110px 24px 40px; text-align: center; display: grid; justify-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--card);
  font: 500 13px/1 var(--mono); color: var(--ink-2); letter-spacing: .02em;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(200,255,46,.14); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(200,255,46,0); } }
.hero h1 { margin-top: 26px; font-size: clamp(46px, 9vw, 116px); font-weight: 800; letter-spacing: -0.06em; line-height: .92; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { margin-top: 26px; max-width: 640px; color: var(--ink-2); font-size: 19px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }

/* contract address */
.ca {
  display: flex; align-items: center; gap: 12px; margin-top: 30px; width: min(620px, 100%);
  padding: 8px 8px 8px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card);
}
.ca-label { font: 500 11px/1 var(--mono); letter-spacing: .14em; color: var(--muted); }
.ca code { flex: 1 1 auto; min-width: 0; text-align: left; font: 500 13px/1 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ca.pending code { color: var(--muted); cursor: default; }
.ca-copy {
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink-2); white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ca-copy:hover { border-color: var(--ink-2); color: var(--ink); }
.ca-copy.done { background: var(--good); border-color: var(--good); color: #062b12; }
.ca #ca-buy { padding: 10px 15px; font-size: 13.5px; border-radius: 10px; }

.stat-pills { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0 0; padding: 0; }
.stat-pills li { display: flex; align-items: baseline; gap: 9px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20,20,22,.6); }
.stat-pills span { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-pills b { font: 700 16px/1 var(--display); letter-spacing: -0.02em; }

/* ---------- the loop ---------- */
.loop { max-width: 1180px; margin: 0 auto; padding: 36px 24px 56px; scroll-margin-top: 90px; }
.loop-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.loop-steps li { padding: 22px 24px; display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--line); }
.loop-steps li:first-child { border-left: 0; }
.loop-steps .n { font: 500 12px/1 var(--mono); color: var(--accent); }
.loop-steps b { font: 700 19px/1.2 var(--display); letter-spacing: -0.03em; margin-top: 4px; }
.loop-steps .d { color: var(--muted); font-size: 14.5px; }

/* ---------- sections ---------- */
.studio, .tracker, .feed-section, .canon { max-width: 1180px; margin: 0 auto; padding: 0 24px 96px; scroll-margin-top: 90px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); letter-spacing: -0.045em; }
.section-sub { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr); gap: 18px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 22px; letter-spacing: -0.035em; }
.meta { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.launch-panel { position: sticky; top: 90px; }

/* toolbar: one horizontal strip above the canvas */
.tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tool {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 11px;
  color: var(--ink-2); cursor: pointer; transition: background .12s, color .12s;
}
.tool:hover { background: var(--card-3); color: var(--ink); }
.tool.on { background: var(--accent); color: var(--accent-ink); }
.tool:disabled { opacity: .28; cursor: default; background: transparent; }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool.sep { width: 1px; height: 24px; align-self: center; background: var(--line-2); border: 0; border-radius: 0; margin: 0 6px; pointer-events: none; padding: 0; }

/* the canvas sits on a dotted stage like a product on a table */
.pad-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 34px 24px;
  background: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px) 0 0 / 20px 20px, var(--bg-2);
}
.pad-wrap {
  position: relative; width: min(100%, 520px); aspect-ratio: 1;
  background: var(--pad-bg, #fff);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 70px rgba(0,0,0,.55);
  transition: box-shadow .15s;
}
.pad-wrap.drag { box-shadow: 0 0 0 3px var(--accent), 0 30px 70px rgba(0,0,0,.55); }
.pad-wrap.checker {
  background-image: linear-gradient(45deg, #d8d8dc 25%, transparent 25%), linear-gradient(-45deg, #d8d8dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8d8dc 75%), linear-gradient(-45deg, transparent 75%, #d8d8dc 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; background-color: #fff;
}
.pad-canvas, .pad-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad-overlay { touch-action: none; cursor: crosshair; }
.pad-text { position: absolute; z-index: 3; background: transparent; border: 1px dashed #2f6bff; border-radius: 4px; padding: 0 2px; margin: 0; resize: none; overflow: hidden; white-space: pre; outline: none; }

/* shown while a logo / sticker is being placed */
.place-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; max-width: calc(100% - 20px);
  background: rgba(20,20,22,.94); border: 1px solid var(--line-2); border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: rise .18s ease both;
}
.place-bar[hidden] { display: none; }
/* while placing, the stage grows so the bar sits under the canvas instead of over it */
.pad-stage:has(.place-bar:not([hidden])) { padding-bottom: 82px; }
.place-hint { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; margin-right: 4px; }
.pill { font: 600 13px/1 var(--body); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.pill:hover { background: var(--card-3); }
.pill.on { border-color: var(--accent); color: var(--accent); }
.pill.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.pad-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px 28px; padding: 18px 22px 20px; border-top: 1px solid var(--line); }
.ctrl-wide { grid-column: 1 / -1; order: 4; }
.ctrl label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ctrl output { color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.colour-row { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); cursor: pointer; padding: 0; background: var(--c); transition: transform .12s, box-shadow .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent); }
#color { width: 30px; height: 30px; padding: 2px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 50%; cursor: pointer; flex: none; }
#color::-webkit-color-swatch-wrapper { padding: 0; }
#color::-webkit-color-swatch { border: 0; border-radius: 50%; }
.bg-picks { display: flex; gap: 7px; }
.bgpick { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--c); cursor: pointer; padding: 0; transition: transform .12s, box-shadow .12s; }
.bgpick:hover { transform: translateY(-1px); }
.bgpick.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent); }
.bgpick.checker { background-image: linear-gradient(45deg, #cfcfd4 25%, transparent 25%), linear-gradient(-45deg, #cfcfd4 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cfcfd4 75%), linear-gradient(-45deg, transparent 75%, #cfcfd4 75%); background-size: 10px 10px; background-position: 0 0, 0 5px, 5px -5px, -5px 0; background-color: #fff; }

/* assets: upload / meme faces / emoji */
.assets { border-top: 1px solid var(--line); padding: 16px 22px 22px; }
.assets-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 14px; }
.assets-tabs button { background: none; border: 0; color: var(--muted); font: 600 13px/1 var(--body); padding: 9px 15px; border-radius: 999px; cursor: pointer; transition: background .12s, color .12s; }
.assets-tabs button:hover { color: var(--ink); }
.assets-tabs button.on { background: var(--card-3); color: var(--ink); }
.dropzone {
  display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px 16px; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--bg-2); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card-3); color: var(--accent); margin-bottom: 4px; }
.dz-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-title { font: 600 15px/1.3 var(--body); }
.dz-sub { font-size: 13px; color: var(--muted); }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sticker { aspect-ratio: 1; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.sticker:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent); }
.sticker img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emoji-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.emoji { aspect-ratio: 1; font-size: 22px; line-height: 1; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; padding: 0; transition: background .12s, transform .12s; }
.emoji:hover { background: var(--card-3); transform: scale(1.08); }

/* ---------- launch form ---------- */
.form { padding: 20px 22px 22px; display: grid; gap: 16px; }
.row.two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.field > span { display: flex; gap: 8px; align-items: baseline; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.field i { font-style: normal; text-transform: none; letter-spacing: .02em; opacity: .75; }
.field output { color: var(--ink); }
input:not([type=range]):not([type=color]):not([type=file]), textarea {
  width: 100%; font: 400 15px/1.4 var(--body); color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #5b5b62; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,255,46,.14); }
textarea { resize: vertical; min-height: 84px; }
.socials summary { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.socials summary::-webkit-details-marker { display: none; }
.socials summary::before { content: '+'; font-size: 15px; color: var(--accent); }
.socials[open] summary::before { content: '–'; }
.socials[open] summary { margin-bottom: 12px; }
.socials .field { display: block; margin-bottom: 12px; }
.sol-input { position: relative; }
.sol-input input { padding-right: 52px !important; font-family: var(--mono) !important; }
.sol-input .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 12px var(--mono); color: var(--muted); }
.fineprint { color: var(--muted); font-size: 13px; line-height: 1.55; }
.form-status { padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--bg-2); border: 1px solid var(--line-2); }
.form-status.err { border-color: rgba(255,107,91,.45); background: rgba(255,107,91,.08); color: #ff9c90; }
.form-status.ok { border-color: rgba(91,227,138,.45); background: rgba(91,227,138,.08); color: var(--good); }

.fees { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0; background: var(--bg-2); }
.fees legend { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 6px; margin-left: -6px; }
.fee-lead { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.fee-choice { display: flex; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-top: 12px; }
.fee-choice button { flex: 1; background: transparent; border: 0; color: var(--muted); font: 600 13px var(--body); padding: 9px 10px; border-radius: 999px; cursor: pointer; transition: background .12s, color .12s; }
.fee-choice button.on { background: var(--ink); color: var(--bg); }
.fee-split { margin-top: 14px; display: grid; gap: 12px; }
.fee-split input:not([type=range]) { font-family: var(--mono) !important; font-size: 12px !important; }
.fee-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.fee-note b { color: var(--ink); font-weight: 600; }

/* ---------- meme tracker ---------- */
.faucet-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 14px; }
.stat { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.stat.hot { background: linear-gradient(160deg, rgba(200,255,46,.14), rgba(200,255,46,.02) 60%), var(--card); border-color: rgba(200,255,46,.28); }
.stat dt { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 12px 0 0; font: 700 38px/1 var(--display); letter-spacing: -0.045em; }
.stat.hot dd:not(.sub) { color: var(--accent); }
.stat dd.sub { margin-top: 9px; font: 400 13.5px/1.4 var(--body); color: var(--muted); letter-spacing: 0; }
.faucet-rule { margin: 0 2px 18px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tracker .you { margin: 0 0 14px; padding: 13px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(200,255,46,.25); color: var(--ink); font-size: 14.5px; }
.board-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.board { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th { text-align: left; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.board td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.board tr:last-child td { border-bottom: 0; }
.board tbody tr { transition: background .12s; }
.board tbody tr:hover td { background: rgba(255,255,255,.02); }
.board tr.me td { background: var(--accent-soft); }
.board .rank { width: 56px; font: 500 13px var(--mono); color: var(--muted); }
.board .num { text-align: right; font-family: var(--mono); font-size: 13.5px; }
.board td.paid { color: var(--good); }
.board .addr { font-family: var(--mono); font-size: 13.5px; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.board .addr:hover { color: var(--accent); border-bottom-color: var(--accent); }
.board .tag { margin-left: 8px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 4px 7px; }
.board-foot { margin: 12px 4px 0; font: 500 12px var(--mono); color: var(--muted); }

/* ---------- launched here ---------- */
.feed-tools { display: flex; align-items: center; gap: 14px; }
.live { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a4a52; }
.live-dot.on { background: var(--good); box-shadow: 0 0 0 3px rgba(91,227,138,.16); }
.tabs { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 13px var(--body); padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: background .12s, color .12s; }
.tabs button.on { background: var(--card-3); color: var(--ink); }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.coin {
  display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; transition: transform .18s, border-color .18s;
}
.coin:hover { transform: translateY(-3px); border-color: #3f3f46; }
.coin .art { aspect-ratio: 1; width: 100%; object-fit: contain; background: #fff; display: block; }
.coin .info { padding: 14px 16px 16px; display: grid; gap: 4px; }
.coin .name { font: 700 16.5px/1.2 var(--display); letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .ticker { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .04em; }
.coin .stats { display: flex; justify-content: space-between; align-items: baseline; margin-top: 9px; padding-top: 10px; border-top: 1px solid var(--line); font: 500 12px var(--mono); color: var(--muted); }
.coin .mc { color: var(--accent); font-size: 13px; }
.coin .shared { font: 500 11px/1 var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 5px 9px; justify-self: start; margin-top: 4px; }
.coin.fresh { animation: rise .5s cubic-bezier(.2,.8,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 64px 0; }
.feed-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- the lore ---------- */
.canon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.canon-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.canon-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; display: block; }
.canon-text { padding: 16px 18px 18px; }
.canon-text h3 { font-size: 18px; letter-spacing: -0.03em; }
.canon-meta { margin-top: 6px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.canon-text p:last-child { margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* ---------- footer ---------- */
.foot { max-width: 1180px; margin: 0 auto; padding: 32px 24px 56px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 16px 24px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .brand-mark { width: 26px; height: 26px; }
.foot-links { display: flex; gap: 20px; justify-self: end; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--ink); }
.foot-note { grid-column: 1/-1; color: #6a6a72; font-size: 13px; }

/* ---------- modal + toast ---------- */
#modal-layer:not(:empty) { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); width: min(430px, 100%); padding: 24px; display: grid; gap: 16px; animation: rise .22s ease both; }
.modal h3 { font-size: 22px; }
.modal p { color: var(--muted); font-size: 14.5px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-row { display: flex; align-items: center; gap: 12px; padding: 14px 15px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font: 600 15px var(--body); transition: border-color .12s, background .12s; }
.wallet-row:hover { border-color: var(--accent); }
.wallet-row .tag { margin-left: auto; font: 500 11px var(--mono); color: var(--muted); }
.modal .launched-art { width: 100%; border-radius: 14px; background: #fff; }
.modal .row { display: flex; gap: 10px; }
.modal .row .btn { flex: 1; }
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300;
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 13px 20px; font-weight: 500;
  font-size: 14.5px; box-shadow: 0 20px 50px rgba(0,0,0,.5); max-width: min(92vw, 460px); animation: rise .2s ease both;
}
#toast.err { background: var(--bad); color: #2a0703; }
[hidden] { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .studio { grid-template-columns: 1fr; }
  .launch-panel { position: static; }
  .canon-grid { grid-template-columns: repeat(2, 1fr); }
  .pad-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top { gap: 10px; padding: 7px 7px 7px 12px; top: 10px; }
  .top-nav { display: none; }
  #connect { margin-left: auto; padding: 9px 13px; font-size: 13.5px; }
  .wordmark { font-size: 16px; }
  .hero { padding: 72px 16px 28px; }
  .hero .sub { font-size: 16.5px; }
  .ca { gap: 8px; padding: 7px 7px 7px 12px; }
  .ca code { font-size: 12px; }
  .loop, .studio, .tracker, .feed-section, .canon { padding-left: 16px; padding-right: 16px; }
  .loop-steps { grid-template-columns: 1fr; }
  .loop-steps li { border-left: 0; border-top: 1px solid var(--line); }
  .loop-steps li:first-child { border-top: 0; }
  .pad-stage { padding: 18px 12px; }
  .tools { padding: 8px 10px; gap: 2px; }
  .tool { width: 36px; height: 36px; }
  .tool.sep { margin: 0 3px; }
  .pad-controls { grid-template-columns: 1fr 1fr; padding: 16px; }
  .pad-controls .ctrl:nth-child(4) { grid-column: 1 / -1; }
  .swatch { width: 28px; height: 28px; }
  .emoji-grid { grid-template-columns: repeat(8, 1fr); }
  /* on a phone the bar drops below the canvas as one row, so it never covers the image */
  .place-bar { position: static; transform: none; margin: 14px auto 0; padding: 5px; gap: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pad-stage:has(.place-bar:not([hidden])) { padding-bottom: 18px; }
  .place-hint { display: none; }
  .pill { padding: 9px 9px; font-size: 12px; }
  .faucet-stats { grid-template-columns: 1fr; }
  .stat dd { font-size: 32px; }
  .board th, .board td { padding: 11px 12px; }
  .board th:nth-child(3), .board td:nth-child(3) { display: none; }
  .canon-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .foot { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .place-bar { gap: 3px; padding: 4px; }
  .pill { padding: 8px 7px; font-size: 11.5px; }
}

/* ---------- sell ---------- */
#sell { margin-left: 4px; }
.sell-modal { width: min(520px, 100%); }
.sell-list { display: grid; gap: 8px; max-height: min(56vh, 460px); overflow-y: auto; }
.sell-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.sell-art { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; }
.sell-meta { display: grid; gap: 3px; min-width: 0; }
.sell-meta b { font: 700 15px/1.2 var(--display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-meta span { font: 500 12px/1.3 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-pcts { display: flex; gap: 4px; }
.sell-pcts .pill { padding: 8px 11px; font-size: 12.5px; }
.sell-pcts .pill:disabled { opacity: .45; cursor: default; }
.sell-empty { color: var(--muted); font-size: 14px; padding: 18px 4px; text-align: center; }
@media (max-width: 720px) {
  #sell { margin-left: auto; padding: 9px 13px; font-size: 13.5px; }
  #sell + #connect { margin-left: 0; }
  .sell-row { grid-template-columns: 40px minmax(0, 1fr); }
  .sell-art { width: 40px; height: 40px; }
  .sell-pcts { grid-column: 1 / -1; }
  .sell-pcts .pill { flex: 1; }
}
@media (max-width: 380px) {
  .wordmark { display: none; }
}
