@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090a0d;
  --bg-2: #10131a;
  --card: #141821;
  --card-2: #1b2030;
  --line: rgba(244, 232, 210, 0.1);
  --text: #f6f1e7;
  --muted: #9c9588;
  --gold: #e4b15a;
  --gold-2: #f3d7a1;
  --ink: #14110c;
  --up: #3dbe8b;
  --down: #ef5d6c;
  --teal: #7ed0c2;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: Outfit, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#splash {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; align-content: center; gap: 8px;
  background: #07080b;
  transition: opacity 0.28s ease;
}
#splash.out { opacity: 0; pointer-events: none; }
#splash-skip {
  position: absolute; top: 18px; right: 18px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.splash-mark { position: relative; width: 112px; height: 112px; }
.splash-mark .mark { width: 112px; height: 112px; }
.mark-plate { fill: #14110c; }
.mark-ring { fill: none; stroke: #e4b15a; stroke-width: 1.6; }
.mark-base, .mark-arc { fill: none; stroke-linecap: round; }
.mark-base { stroke: #f6e6c4; stroke-width: 2.2; }
.mark-arc { stroke: #e4b15a; stroke-width: 3.4; stroke-dasharray: 80; stroke-dashoffset: 80; }
.mark-node, .mark-peak { fill: #f6e6c4; transform-box: fill-box; transform-origin: center; }
#splash.play .mark-arc { animation: draw 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
#splash.play .mark-node { animation: spark 0.35s 0.55s ease both; }
#splash.play .mark-peak { animation: spark 0.4s 0.75s ease both; }
#splash.play .splash-word { animation: rise 0.55s 0.45s ease both; }
#splash.play .splash-sub { animation: rise 0.55s 0.6s ease both; }
.splash-word { margin: 14px 0 0; font-size: 40px; letter-spacing: -0.04em; font-weight: 600; }
.splash-sub { margin: 0; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spark { from { transform: scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero {
  display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 28px; align-items: center;
  padding: 8px 0 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.hero-logo { width: 100%; height: auto; }
.hero h1 { margin: 6px 0 8px; font-size: 34px; letter-spacing: -0.045em; font-weight: 600; }
.hero-points { margin: 8px 0 16px; padding-left: 18px; color: var(--muted); }
.hero-points li { margin: 4px 0; }
.hero-note { margin: 10px 0 0; }
.pair-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-block; vertical-align: middle; flex: none; object-fit: cover; }
.chip, .pill, .pair, .callout { display: inline-flex; align-items: center; gap: 6px; }
.chip, .pair { display: inline-flex; }
.pair { text-align: left; }
.pair span { display: block; }
.callout { display: flex; flex-wrap: wrap; align-items: center; }

#app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  background: #0c0e13;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.03em; }
.brand img { border-radius: 10px; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-nav a, .tabbar a {
  padding: 10px 12px; border-radius: 12px; color: var(--muted);
}
.rail-nav a.active, .tabbar a.active { background: var(--card); color: var(--text); }
.rail-foot { margin-top: auto; color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px rgba(61,190,139,0.15); }
.stage { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 22px; position: sticky; top: 0; z-index: 5;
  background: rgba(9,10,13,0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.search { flex: 1; }
.search input, .field input, .field textarea, .field select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; outline: none;
}
.search input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(228,177,90,0.7); }
#view { padding: 8px 22px 48px; flex: 1; }
.foot, .tabbar { display: none; }
.foot { gap: 16px; padding: 18px 22px 28px; color: var(--muted); font-size: 13px; }
.tabbar {
  position: sticky; bottom: 0; grid-column: 1 / -1;
  background: #0c0e13; border-top: 1px solid var(--line);
  justify-content: space-around; padding: 6px 8px 10px;
}
.tabbar a { font-size: 12px; }

.btn {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--gold); color: var(--ink); border-color: transparent; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.copy-ca { min-height: 44px; min-width: 44px; }
.btn.wide { width: 100%; }

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 12px 0 18px; }
.page-head h1 { margin: 0; font-size: 34px; letter-spacing: -0.04em; font-weight: 600; }
.lede { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }

.chips, .tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.chip, .tab {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 12px; cursor: pointer; white-space: nowrap;
}
.chip.on, .tab.on { background: var(--text); color: #111; border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card, .coin {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 40%), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.coin { display: flex; flex-direction: column; gap: 12px; min-height: 168px; transition: transform 0.15s ease, border-color 0.15s ease; }
.coin-link { color: inherit; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.socials { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.social {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text); background: var(--bg-2);
}
.social svg { width: 16px; height: 16px; }
.coin .social { width: 28px; height: 28px; }
.social:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.coin:hover { transform: translateY(-2px); border-color: rgba(228,177,90,0.45); }
.coin-top, .row { display: flex; align-items: center; gap: 10px; }
.coin-top .grow, .grow { flex: 1; min-width: 0; }
.coin strong { display: block; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.mcap { font-size: 28px; letter-spacing: -0.04em; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.pill {
  border-radius: 999px; padding: 4px 8px; font-size: 12px;
  background: rgba(228,177,90,0.12); color: var(--gold-2); border: 1px solid rgba(228,177,90,0.25);
}
.marklet {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 600; color: #14110c; flex: none;
}

.layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { color: var(--muted); font-size: 13px; }
.slider { accent-color: var(--gold); width: 100%; }
.split { display: grid; grid-template-columns: 1.2fr 1.2fr 4fr 4fr; height: 10px; border-radius: 999px; overflow: hidden; }
.split i:nth-child(1) { background: #f3d7a1; }
.split i:nth-child(2) { background: #e4b15a; }
.split i:nth-child(3) { background: #7ed0c2; }
.split i:nth-child(4) { background: #8ea2ff; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 13px; color: var(--muted); }
.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pair {
  text-align: left; border: 1px solid var(--line); background: var(--bg-2);
  border-radius: 14px; padding: 10px; cursor: pointer;
}
.pair.on { border-color: var(--gold); background: rgba(228,177,90,0.08); }
.pair b { display: block; }
.pair small { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 18px; margin-top: 4px; }
.chart-wrap { height: 320px; }
canvas { width: 100%; height: 100%; display: block; }
.side { display: flex; background: var(--bg-2); border-radius: 12px; padding: 4px; }
.side button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px; cursor: pointer; }
.side button.on.buy { background: var(--up); color: #062216; }
.side button.on.sell { background: var(--down); color: #2a0a10; }
.trades { display: flex; flex-direction: column; }
.trade { display: grid; grid-template-columns: 72px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.callout { border-left: 3px solid var(--gold); padding: 8px 12px; color: var(--muted); background: rgba(228,177,90,0.05); border-radius: 0 12px 12px 0; }
.empty { padding: 36px 8px; color: var(--muted); }
.token-hero { display: flex; gap: 14px; align-items: center; }
.ca-line {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2);
}
.ca-line .tiny { flex: none; }
.ca-full {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.token-hero img, .token-hero .marklet { width: 56px; height: 56px; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
th { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
code { font-family: var(--mono); font-size: 0.92em; }
#toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--text); color: #14110c; padding: 10px 14px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: 0.2s ease; z-index: 20; font-weight: 500;
}
#toast.on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 980px) {
  #app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .tabbar, .foot { display: flex; }
  .layout, .stats { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page-head h1, .hero h1 { font-size: 28px; }
  .hero { grid-template-columns: 1fr; gap: 12px; }
  .top { padding: 12px; }
  #view { padding: 8px 12px 24px; }
}
@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .splash-word { font-size: 32px; }
  .ca-line { flex-wrap: wrap; }
  .ca-full {
    flex-basis: calc(100% - 88px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  #splash { display: none !important; }
  .coin, #splash, #toast { transition: none; animation: none; }
}
