:root {
  --bg: #07090d;
  --bg-2: #0d1117;
  --card: #10151d;
  --card-2: #151b25;
  --line: #222b38;
  --text: #e8edf4;
  --muted: #8592a6;
  --accent: #1d9bf0;
  --accent-2: #7cf29c;
  --danger: #ff6b6b;
  --radius: 16px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(29, 155, 240, 0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(124, 242, 156, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: rgba(7, 9, 13, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 17px var(--display); letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; margin: -2px -4px 0 -6px; }
.spacer { flex: 1; }

.featured {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; font-size: 13.5px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(29, 155, 240, 0.12), rgba(124, 242, 156, 0.12));
}
.featured .tag { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11.5px; color: var(--accent-2); }
.featured code { font: 12.5px ui-monospace, monospace; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.featured button, .featured a { font: 600 12.5px var(--body); color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }

.hero { padding: 56px 0 32px; }
.hero h1 { font: 700 clamp(34px, 6vw, 60px)/1.02 var(--display); margin: 0 0 16px; letter-spacing: -0.02em; }
.accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0; }
.lead b { color: var(--text); font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
h2 { font: 700 20px var(--display); margin: 0 0 18px; }
.eyebrow { font: 600 11px var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.launch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.side { display: grid; gap: 20px; position: sticky; top: 84px; }

.form { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ticker { width: 150px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.field small { color: var(--muted); font-size: 12.5px; }
.field small b { color: var(--text); font-weight: 600; }
.counter { font-style: normal; color: var(--muted); font-weight: 400; }
input, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.18); }
input.invalid { border-color: var(--danger); }
.prefix { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; }
.prefix i { font-style: normal; color: var(--muted); padding-left: 12px; }
.prefix input { border: 0; background: transparent; box-shadow: none; padding-left: 4px; text-transform: uppercase; }
.prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.18); }

.drop {
  display: grid; place-items: center; height: 168px; cursor: pointer; overflow: hidden;
  border: 1.5px dashed var(--line); border-radius: 14px; background: var(--bg-2);
  color: var(--muted); text-align: center; font-size: 13px; transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(29, 155, 240, 0.06); }
.drop b { color: var(--text); font-size: 15px; }
.drop img { width: 100%; height: 100%; object-fit: contain; }

.socials { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.socials legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.socials legend em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.links-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.links-row:empty { display: none; }
.link-chip { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.link-chip:hover { text-decoration: none; border-color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check b { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px var(--body); color: var(--text); cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 14px;
  transition: transform 0.08s, filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #33b3ff); border-color: transparent; color: #fff; }
.btn.big { padding: 14px 18px; font-size: 16px; border-radius: 13px; }
.btn.x { background: #fff; color: #000; border-color: #fff; }

.error { margin: 0; padding: 10px 12px; border-radius: 10px; color: #ffd0d0; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35); font-size: 13.5px; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--card-2); object-fit: cover; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.user-chip .handle { font-weight: 600; font-size: 14px; }

.coin-tile { display: flex; gap: 14px; align-items: center; }
.coin-img {
  width: 64px; height: 64px; border-radius: 14px; flex: none; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--muted); font: 700 22px var(--display);
}
.coin-img img { width: 100%; height: 100%; object-fit: cover; }
.coin-name { margin: 0; font: 700 18px var(--display); word-break: break-word; }
.coin-sym { margin: 2px 0 0; color: var(--accent-2); font-weight: 600; }
.coin-desc { color: var(--muted); font-size: 14px; margin: 14px 0 6px; white-space: pre-wrap; word-break: break-word; }

.bar { display: flex; height: 38px; border-radius: 10px; overflow: hidden; font-weight: 600; font-size: 13px; }
.bar-user { display: flex; align-items: center; padding: 0 12px; background: linear-gradient(90deg, var(--accent), #33b3ff); color: #fff; }
.bar-dev { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--card-2); color: var(--muted); }
.facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; color: var(--muted); }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.facts b { color: var(--text); font-weight: 600; }

.recent { margin-top: 56px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { display: block; color: var(--text); padding: 16px; }
.tile:hover { text-decoration: none; border-color: #33415a; }
.tile .coin-img { width: 52px; height: 52px; }
.tile .coin-name { font-size: 16px; }
.tile .by { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.pill { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: rgba(124, 242, 156, 0.12); color: var(--accent-2); }
.pill.official { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #04121c; font-weight: 700; }
.featured-tile { border-color: rgba(124, 242, 156, 0.45); box-shadow: 0 0 40px rgba(124, 242, 156, 0.08); }
.pill.warn { background: rgba(255, 196, 0, 0.12); color: #ffd34d; }

.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 8, 0.72); backdrop-filter: blur(6px); }
.modal { width: min(440px, 100%); text-align: center; padding: 28px; }
.modal h3 { font: 700 24px var(--display); margin: 14px 0 6px; }
.modal .coin-img { width: 88px; height: 88px; margin: 0 auto; border-radius: 20px; }
.modal .actions { display: grid; gap: 10px; margin-top: 20px; }
.mint { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font: 12.5px ui-monospace, monospace; text-align: left; }
.mint code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mint button { background: none; border: 0; color: var(--accent); font: 600 12px var(--body); cursor: pointer; }

.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.steps li.active { color: var(--text); }
.steps li.done { color: var(--accent-2); }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 11px; }
.steps li.active .dot { border-color: var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps li.done .dot { border-color: var(--accent-2); background: var(--accent-2); color: #04121c; }
@keyframes spin { to { transform: rotate(360deg); } }

.coin-view { padding: 40px 0 8px; }
.coin-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.coin-hero .coin-img { width: 110px; height: 110px; border-radius: 24px; }
.coin-hero .coin-name { font-size: 32px; }
.coin-hero .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.open-tab { display: none; }

/* Compact layout when embedded as an X player card.
   X renders the card in a frame with page scrolling off, so the page is exactly one frame tall
   and <main> is its own scroll container. */
body.embed { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.embed .topbar, body.embed .featured { flex: none; }
body.embed main {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  width: 100%; padding: 12px 12px 20px;
}
body.embed .hero, body.embed .split, body.embed .recent { display: none; }
body.embed .launch-grid { grid-template-columns: 1fr; gap: 12px; }
body.embed .side { position: static; order: -1; gap: 12px; }
body.embed .card { padding: 14px; }
body.embed .form { gap: 12px; }
body.embed h2 { font-size: 17px; margin-bottom: 4px; }
body.embed .drop { height: 110px; }
body.embed .preview .eyebrow { margin-bottom: 8px; }
body.embed .preview .coin-img { width: 48px; height: 48px; border-radius: 12px; }
body.embed .preview .coin-name { font-size: 16px; }
body.embed .preview .coin-desc { margin: 8px 0 4px; font-size: 13px; }
body.embed .coin-view { padding: 0 0 12px; }
body.embed .topbar { position: static; padding: 8px 10px; gap: 6px; }
body.embed .brand { font-size: 13px; gap: 6px; white-space: nowrap; min-width: 0; }
body.embed .brand-mark { width: 24px; height: 24px; margin: 0; }
body.embed .open-tab { display: inline-flex; }
body.embed .open-tab, body.embed #auth-slot .btn { font-size: 12.5px; padding: 6px 10px; white-space: nowrap; }
body.embed .user-chip { gap: 6px; }
body.embed .user-chip .handle { display: none; }
body.embed .avatar { width: 26px; height: 26px; }
body.embed .featured { padding: 6px 10px; font-size: 12px; gap: 6px; }
body.embed .featured code { display: none; }
body.embed main { scrollbar-width: thin; scrollbar-color: #2a3442 transparent; }
@media (max-width: 420px) {
  body.embed #app-name { display: none; }
}

@media (max-width: 860px) {
  .launch-grid { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
  .split { display: none; }
}
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; }
  main { padding: 0 16px 60px; }
  .row { flex-direction: column; }
  .ticker { width: 100%; }
  .user-chip .handle { display: none; }
}
