/* Crate — web styles. Dark, green-tinted. */
:root {
  --bg: #050a1c;
  --bg-2: #070e26;
  --panel: #0b1431;
  --panel-2: #0f1a3c;
  --panel-3: #142147;
  --border: #18254d;
  --border-2: #22336a;
  --text: #e9eeff;
  --muted: #8d9ac4;
  --dim: #5a6794;
  --accent: #4c8dff;
  --accent-hi: #78aaff;
  --accent-ink: #04122e;
  --accent-soft: rgba(76, 141, 255, .14);
  --green: #34d399;          /* price gains only */
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, .14);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, .12);
  --blue: #7cc4fa;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --sidebar: 240px;
  --topbar: 64px;
  --gutter: 24px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); }
a.link:hover, .prose a:hover { color: var(--accent-hi); text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; margin: 0; line-height: 1.15; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.amber { color: var(--amber); }
.up { color: var(--green); }
.down { color: var(--red); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 14px; background: var(--bg-2); border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 16px 10px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.legal-links { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--dim); padding-top: 6px; }
.legal-links a:hover { color: var(--text); }
.main { min-width: 0; display: flex; flex-direction: column; }
.view { padding: 24px var(--gutter) 64px; max-width: 1360px; width: 100%; margin: 0 auto; outline: none; min-width: 0; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar);
  display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter);
  background: rgba(5,10,28, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn, .topbar .topbar-logo { display: none; }
.search { position: relative; flex: 1; max-width: 520px; min-width: 0; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border); outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-ico { position: absolute; left: 13px; top: 10px; color: var(--muted); }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; max-height: 420px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.search-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.search-row:hover, .search-row.hl { background: var(--panel-2); }
.search-row .grow { flex: 1; min-width: 0; }
.search-empty { padding: 14px; color: var(--muted); font-size: 14px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ptoken { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); font-size: 13px; }
.ptoken-sym { font-weight: 600; }
.ptoken-price { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.mint-pill { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font: 12px var(--mono); color: var(--muted); }
.mint-pill:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn svg { width: 18px; height: 18px; }
.topbar .top-connect { display: none; }

/* mobile tab bar */
.tabbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 35; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not([disabled]) { background: var(--accent-hi); }
.btn-ghost { background: var(--panel); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(248,113,113,.3); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, .textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.bad { border-color: var(--red); }
.textarea { resize: vertical; min-height: 96px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix { position: absolute; left: 14px; color: var(--muted); pointer-events: none; font-weight: 600; }
.input-wrap .prefix + .input { padding-left: 28px; }
.input-wrap .suffix { position: absolute; right: 12px; color: var(--muted); font-size: 13px; pointer-events: none; }
.input-wrap .input.has-suffix { padding-right: 56px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label { font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.counter { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); }
.hint.bad { color: var(--red); }
.hint.ok { color: var(--accent); }
.hint.warn { color: var(--amber); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.on { background: var(--accent-soft); border-color: rgba(76,141,255,.45); color: var(--accent); }

.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 12px; }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.seg.sm button { height: 30px; font-size: 13px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.tab .count { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--panel-3); color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-tight { padding: 14px; }
.card h3 { font-size: 17px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.stat .v { font: 700 26px/1.2 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-green { background: var(--accent-soft); color: var(--accent); }
.badge-muted { background: var(--panel-3); color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.tok-logo { width: 22px; height: 22px; border-radius: 50%; background: var(--panel-3); object-fit: cover; flex: none; border: 1px solid var(--border-2); }
.tok-logo.sm { width: 16px; height: 16px; }
.tok-logo.lg { width: 32px; height: 32px; }
.tok-fallback { display: inline-flex; align-items: center; justify-content: center; font: 700 9px/1 var(--display); color: var(--muted); }
.coin-img { border-radius: 12px; object-fit: cover; background: var(--panel-3); flex: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid rgba(76,141,255,.22);
  background: radial-gradient(120% 140% at 0% 0%, rgba(76,141,255,.14), transparent 55%), linear-gradient(180deg, #0c1638, #081030);
  padding: 44px 40px; margin-bottom: 28px;
  box-shadow: 0 0 0 1px rgba(76,141,255,.04), 0 30px 80px -30px rgba(76,141,255,.25);
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -.03em; position: relative; z-index: 1; }
.hero h1 .accent { display: block; }
.hero p { position: relative; z-index: 1; color: var(--muted); max-width: 520px; font-size: 16px; margin: 16px 0 24px; }
.hero .btn { position: relative; z-index: 1; }
.hero-waves { position: absolute; right: 0; top: 0; bottom: 0; width: 64%; height: 100%; z-index: 0; pointer-events: none; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats .k { font-size: 12px; color: var(--muted); }
.hero-stats .v { font: 700 18px var(--display); }

/* ---------- board ---------- */
.board-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(76,141,255,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76,141,255,.55); } 70% { box-shadow: 0 0 0 8px rgba(76,141,255,0); } 100% { box-shadow: 0 0 0 0 rgba(76,141,255,0); } }
.filter-bar { margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.filter-bar .chips { flex-wrap: nowrap; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.coin-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); transition: border-color .15s, transform .15s, background .15s; min-width: 0; }
.coin-card:hover { border-color: rgba(76,141,255,.4); background: #101c44; transform: translateY(-2px); }
.coin-card .top { display: flex; gap: 12px; min-width: 0; }
.coin-card .meta { min-width: 0; flex: 1; }
.coin-card .tick { font: 700 16px/1.2 var(--display); display: flex; align-items: center; gap: 8px; min-width: 0; }
.coin-card .tick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-card .name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-card .mcap { font: 700 24px/1 var(--display); font-variant-numeric: tabular-nums; margin-top: 6px; }
.coin-card .mcap small { font: 500 12px var(--font); color: var(--muted); margin-left: 6px; }
.coin-card .line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.coin-card .line b { color: var(--text); font-weight: 600; }
.progress { height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f6bff, var(--accent)); }
.progress.done > i { background: linear-gradient(90deg, #d99a2b, var(--amber)); }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-line { height: 12px; margin: 6px 0; }
.skel-card { height: 196px; border-radius: var(--radius); }

.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--border-2); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.empty svg { width: 36px; height: 36px; color: var(--dim); margin-bottom: 10px; }

/* ---------- coin page ---------- */
.coin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.coin-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.coin-head h1 { font-size: 26px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.coin-head .sub { color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.coin-head .links { display: flex; gap: 8px; margin-left: auto; }
.price-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 18px; }
.price-row .v { font: 700 22px var(--display); font-variant-numeric: tabular-nums; }
.price-row .k { font-size: 12px; color: var(--muted); }
.chart-wrap { height: 380px; position: relative; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.trade-side { position: sticky; top: calc(var(--topbar) + 16px); display: flex; flex-direction: column; gap: 16px; }
.amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.amount-presets .chip { justify-content: center; padding: 0 6px; }
.rewards-list { display: flex; flex-direction: column; gap: 6px; }
.reward-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); font-size: 14px; }
.reward-item.now { border-color: rgba(76,141,255,.5); background: var(--accent-soft); }
.reward-item .n { width: 18px; color: var(--dim); font-size: 12px; text-align: center; }
.countdown { font: 700 28px var(--display); font-variant-numeric: tabular-nums; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 11px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hl td { background: rgba(76,141,255,.04); }
.table tr.you td { background: var(--amber-soft); }
.table .r { text-align: right; }
.table-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

/* ---------- create ---------- */
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.create-form { display: flex; flex-direction: column; gap: 22px; }
.summary { position: sticky; top: calc(var(--topbar) + 16px); }
.upload {
  display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px dashed var(--border-2); border-radius: 14px;
  background: var(--bg-2); cursor: pointer; transition: border-color .15s;
}
.upload:hover, .upload.drag { border-color: var(--accent); }
.upload .thumb { width: 84px; height: 84px; border-radius: 14px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: var(--dim); }
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }
.links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.picker { border: 1px solid var(--border-2); border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.picker-top { padding: 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 10px; max-height: 320px; overflow-y: auto; }
.tile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); text-align: left; min-width: 0; position: relative; }
.tile:hover { border-color: var(--dim); }
.tile.on { border-color: var(--accent); background: var(--accent-soft); }
.tile .t-sym { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-liq { font-size: 12px; color: var(--muted); }
.tile .t-n { position: absolute; top: 6px; right: 8px; font: 700 11px var(--display); color: var(--accent); }
.order-list { display: flex; flex-direction: column; gap: 6px; }
.order-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; cursor: grab; }
.order-item.dragging { opacity: .5; }
.order-item.over { border-color: var(--accent); }
.order-item .grow { flex: 1; min-width: 0; }
.mini-btn { width: 28px; height: 28px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--bg-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mini-btn:hover:not([disabled]) { color: var(--text); }
.mini-btn[disabled] { opacity: .35; }
.mini-btn svg { width: 14px; height: 14px; }
.fee-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 10px 0 12px; }
.fee-bar i { display: block; height: 100%; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.legend .li { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .li span:last-child { margin-left: auto; font-weight: 600; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: #f3d29a; font-size: 13px; border: 1px solid rgba(245,181,68,.25); }
.note svg { color: var(--amber); width: 18px; height: 18px; margin-top: 1px; }
.success { text-align: center; padding: 48px 24px; max-width: 560px; margin: 32px auto; }
.success .ring { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: var(--accent); box-shadow: 0 0 40px rgba(76,141,255,.35); }
.success .ring svg { width: 34px; height: 34px; }
.steps { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 18px 0; }
.step { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.step.active { color: var(--text); }
.step.active .dot { border-color: var(--accent); color: var(--accent); }
.step.done { color: var(--accent); }
.step.done .dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- docs ---------- */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.doc-nav { position: sticky; top: calc(var(--topbar) + 24px); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.doc-nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); border-left: 2px solid transparent; }
.doc-nav a:hover { color: var(--text); }
.doc-nav a.on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.prose { max-width: 760px; }
.prose section { scroll-margin-top: calc(var(--topbar) + 20px); padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.prose section:last-child { border-bottom: 0; }
.prose h1 { font-size: 36px; margin-bottom: 12px; }
.prose h2 { font-size: 24px; margin-bottom: 12px; }
.prose h3 { font-size: 17px; margin: 18px 0 8px; }
.prose p, .prose li { color: #c9d3ee; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); }
.prose .table-scroll { margin: 12px 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.contract { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); margin-bottom: 8px; flex-wrap: wrap; }
.contract .mono { overflow-wrap: anywhere; color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(2,5,16,.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal.wide { max-width: 680px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 20px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); margin-bottom: 8px; text-align: left; }
.wallet-opt:hover { border-color: var(--accent); }
.wallet-opt .w-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 700 15px var(--display); color: #fff; }
.wallet-opt .grow { flex: 1; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--panel-2); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: slide .2s; overflow-wrap: anywhere; }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast a { color: var(--accent); text-decoration: underline; }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .coin-layout, .create-layout { grid-template-columns: minmax(0, 1fr); }
  .trade-side, .summary { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; --topbar: 58px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 84vw); transform: translateX(-100%); transition: transform .22s ease; }
  body.drawer-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .topbar .menu-btn, .topbar .topbar-logo { display: inline-flex; }
  .topbar { gap: 10px; }
  .ptoken { display: none; }
  .topbar .top-connect { display: inline-flex; }
  #xLink { display: none; }
  .view { padding: 16px var(--gutter) calc(88px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(7,14,38,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); background: none; border: 0; padding: 4px 0; }
  .tabbar a.active { color: var(--accent); }
  .tabbar .tab-create span { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: 600 26px/44px var(--display); text-align: center; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .hero { padding: 28px 20px; }
  .hero-waves { width: 100%; opacity: .55; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
  .doc-nav a { white-space: nowrap; border-left: 0; }
  .doc-nav a.on { border-radius: 8px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 26px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .links-grid { grid-template-columns: minmax(0, 1fr); }
  .coin-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-wrap { height: 300px; }
  .card { padding: 16px; }
  .table-scroll { margin: 0 -16px; padding: 0 16px; }
  .coin-head .links { margin-left: 0; }
  .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg button { font-size: 13px; padding: 0 4px; }
}

/* ---------- Crate additions ---------- */
.brand img { border-radius: 9px; }
.nav-ant { width: 20px; height: 20px; display: inline-flex; flex: none; }
.nav-ant img, .nav-ant .tok-logo { width: 20px; height: 20px; }
.site-foot { border-top: 1px solid var(--border); padding: 20px var(--gutter) 28px; color: var(--dim); font-size: 12.5px; max-width: 1360px; width: 100%; margin: 0 auto; }
.site-foot p { margin: 0 0 8px; max-width: 760px; }
.site-foot .links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a:hover { color: var(--text); }
.ipo-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px 6px 6px; margin-bottom: 18px; border-radius: 999px; background: rgba(5,10,28,.6); border: 1px solid rgba(76,141,255,.28); font-size: 13px; color: var(--muted); }
.ipo-badge b { color: var(--text); }
.ipo-badge .sep { color: var(--dim); }
.ant-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.ant-price { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg button .tok-logo { width: 18px; height: 18px; }
.seg button .sub { font-size: 11px; font-weight: 500; color: var(--accent); }
.amount-presets.three { grid-template-columns: repeat(3, 1fr); }
.callout { border: 1px solid rgba(76,141,255,.3); background: radial-gradient(120% 140% at 0% 0%, rgba(76,141,255,.1), transparent 60%), var(--panel); }
@media (max-width: 900px) { .site-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } .view { padding-bottom: 24px; } }
@media (max-width: 600px) {
  #pairSeg button { flex-wrap: wrap; height: auto; min-height: 38px; padding: 5px 4px; column-gap: 5px; row-gap: 0; }
  #pairSeg #antBtn { flex: 1.5; }
  #pairSeg .sub { flex-basis: 100%; text-align: center; }
}

/* "we pay your DEX" offer line in the hero */
.dex-offer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: var(--text); position: relative; z-index: 1; }

/* ---------- Crates ---------- */
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.nft { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--panel); transition: border-color .15s, transform .15s; }
.nft:hover { border-color: rgba(76,141,255,.4); transform: translateY(-2px); }
.nft .art { aspect-ratio: 1; background: var(--panel-3); }
.nft .art img { width: 100%; height: 100%; object-fit: cover; }
.nft .info { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.nft .info b { font-family: var(--display); }
.mint-swap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.mint-arrow { align-self: center; font: 700 26px var(--display); color: var(--accent); }
.send-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.send-row:last-of-type { border-bottom: 0; }
.send-row .tok-logo { width: 32px; height: 32px; font-size: 10px; }
.receive { display: flex; flex-direction: column; gap: 12px; }
.crate-art { aspect-ratio: 1; max-width: 260px; width: 100%; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(76,141,255,.2), transparent 65%), var(--panel-2); border: 1px solid rgba(76,141,255,.25); display: flex; align-items: center; justify-content: center; color: var(--dim); }
.crate-art img { width: 100%; height: 100%; object-fit: cover; }
.crate-art svg { width: 56px; height: 56px; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.steps3 > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
.steps3 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 12px/24px var(--display); text-align: center; }
.owned { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.owned .art { border-radius: 12px; overflow: hidden; background: var(--panel-3); aspect-ratio: 1; }
.owned .art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .mint-swap { grid-template-columns: minmax(0, 1fr); }
  .mint-arrow { transform: rotate(90deg); justify-self: center; }
  .steps3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owned { grid-template-columns: 80px minmax(0, 1fr); }
}

/* ---------- hero waves (logo style) ---------- */
.hero-waves .hw-bands polyline { fill: none; stroke: var(--accent); stroke-width: 46; stroke-linecap: round; stroke-linejoin: round; opacity: .15; }
.hero-waves .hw-bands { animation: hwDrift 28s linear infinite; }
@keyframes hwDrift { from { transform: translateX(0); } to { transform: translateX(-480px); } }
@media (prefers-reduced-motion: reduce) { .hero-waves .hw-bands { animation: none; } }

/* ---------- coin cards (v2) ---------- */
.coin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coin-card { position: relative; overflow: hidden; gap: 0; padding: 16px 18px; min-height: 176px; }
.coin-card:hover { border-color: rgba(76,141,255,.5); background: var(--panel); transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(0,0,0,.7); }
.cc-bg { position: absolute; right: -38px; top: 50%; width: 150px; height: 150px; transform: translateY(-50%); border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 0; }
.cc-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: saturate(.6); }
.cc-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--panel) 0%, rgba(11,20,49,.55) 35%, transparent 70%); }
.cc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cc-top .coin-img { width: 32px !important; height: 32px !important; border-radius: 50%; }
.cc-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge-outline { border: 1px solid rgba(245,181,68,.55); color: var(--amber); background: transparent; }
.cc-tick { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; }
.cc-tick b { font-family: var(--display); white-space: nowrap; }
.cc-tick span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-mcap { font: 700 28px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cc-mcap small { font: 500 12px var(--font); margin-left: 8px; }
@media (max-width: 1180px) { .coin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .coin-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- coin page (v2) ---------- */
.price-row .v.big { font-size: 28px; color: var(--accent); }
.chart-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.route-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 10px 12px; margin-top: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.route-line b { color: var(--text); }
.chart-bar .seg button { flex: none; padding: 0 10px; white-space: nowrap; }
@media (max-width: 600px) { .chart-bar .seg button { padding: 0 7px; } }

/* hero waves: full width, fading out toward the left so the copy sits on clean background */
.hero-waves { left: 0; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 28%, rgba(0,0,0,.35) 50%, #000 80%);
          mask-image: linear-gradient(90deg, transparent 0%, transparent 28%, rgba(0,0,0,.35) 50%, #000 80%); }

/* phones: everything in the hero centred */
@media (max-width: 600px) {
  .hero { text-align: center; padding: 26px 18px; }
  .hero h1 .accent { display: block; }
  .hero p { margin-left: auto; margin-right: auto; }
  .ipo-badge { justify-content: center; margin-left: auto; margin-right: auto; padding: 6px 12px; }
  .ipo-badge .ipo-date { display: none; }
  .dex-offer { justify-content: center; text-align: center; }
  .hero-ctas { justify-content: center; }
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats { justify-content: center; text-align: center; gap: 18px 22px; }
  .hero-waves { width: 100%; opacity: .5;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.6) 55%, #000 100%);
            mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.6) 55%, #000 100%); }
}

/* 3D crates */
.crate-art-3d { position: relative; max-width: 320px; }
.crate-art-3d iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; color: var(--muted); background: rgba(3,7,22,.7); padding: 3px 8px; border-radius: 999px; pointer-events: none; }
button.art { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
button.art .view3d { position: absolute; right: 8px; top: 8px; font: 700 11px var(--display); color: var(--accent); background: rgba(3,7,22,.75); border: 1px solid rgba(76,141,255,.35); padding: 2px 7px; border-radius: 999px; }
.crate3d-modal iframe { width: 100%; aspect-ratio: 1; border: 0; border-radius: 14px; background: #030716; display: block; }
.preview-note { padding: 12px 14px; border: 1px dashed rgba(76,141,255,.35); border-radius: 12px; color: var(--muted); font-size: 14px; }
.preview-note b { color: var(--text); }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* preview card labels: number + fill on one line, traits on the next, never wrapping */
.nft .info.stack { flex-direction: column; align-items: flex-start; gap: 3px; }
.nft .info.stack > * { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* live 3D gallery cards: the poster image shows until the 3D stage is ready */
.art.live3d { position: relative; aspect-ratio: 1; overflow: hidden; }
.art.live3d img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art.live3d .stage { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.art.live3d.is-live .stage { opacity: 1; }
.art.live3d .view3d { position: absolute; right: 8px; top: 8px; z-index: 2; cursor: pointer; font: 700 11px var(--display); color: var(--accent); background: rgba(3,7,22,.75); border: 1px solid rgba(76,141,255,.35); padding: 2px 7px; border-radius: 999px; }
.art.live3d .view3d:hover { background: rgba(76,141,255,.15); }

/* Crates gallery header (minted, burned, paid out, in vaults) + next-drop line + toolbar */
.crate-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.cstat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.cstat .k { font-size: 12px; color: var(--muted); }
.cstat .v { font: 700 24px var(--display); margin-top: 4px; white-space: nowrap; }
.cstat .v .muted { font-size: 16px; }
.cstat .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cstat .bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 8px; }
.cstat .bar i { display: block; height: 100%; background: var(--accent); }
.crate-drop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; }
.crate-drop .k { font-size: 12px; color: var(--muted); }
.crate-drop #cCount { font: 700 20px var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.crate-links { font-size: 12.5px; margin: 10px 2px 16px; }
.crate-links a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-2); }
.crate-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.crate-toolbar .seg { width: auto; }
.crate-toolbar .seg button { padding: 0 14px; }
.crate-toolbar .seg button span { color: var(--muted); font-weight: 500; }
.crate-toolbar #cSearch { max-width: 320px; width: 100%; }
.nft .info.stack .row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; }
.nft .info .earned { color: var(--accent); font-weight: 600; white-space: nowrap; }
.nft .info .owner { font-size: 12.5px; color: var(--muted); }
.nft .info .owner a { color: var(--text); }
.nft .info .mkts { display: flex; gap: 10px; font-size: 12px; }
.nft .info .mkts a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-2); }
.nft .info .mkts a:hover { color: var(--text); }
@media (max-width: 900px) { .crate-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .crate-toolbar #cSearch { max-width: none; } .crate-toolbar .seg { width: 100%; } }

/* 3D viewer modal: Crate + vault breakdown */
.c3-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.crate3d-modal .c3-body iframe { width: 100%; aspect-ratio: 1; border: 0; border-radius: 14px; background: #030716; display: block; }
.c3-panel { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.c3-row { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.c3-row .k { color: var(--muted); }
.c3-row .accent { color: var(--accent); }
.c3-toks { display: flex; flex-direction: column; gap: 6px; }
.c3-tok { display: grid; grid-template-columns: 22px auto 1fr auto 38px; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-2); border-radius: 10px; font-size: 13px; }
.c3-tok img { width: 22px; height: 22px; border-radius: 50%; }
.c3-tok .amt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.c3-tok .usd { font-weight: 600; }
.c3-tok .pct { color: var(--muted); text-align: right; }
@media (max-width: 760px) { .c3-body { grid-template-columns: minmax(0, 1fr); } }
.art.live3d { cursor: pointer; }
.order-item.pinned { opacity: .85; border-style: dashed; }

/* in-app links inside article text: small pill buttons (external links stay plain) */
.prose a[href^="/"] { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px 2px; margin: 0 1px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(76,141,255,.35); color: var(--accent-hi); font-weight: 600; font-size: .92em;
  text-decoration: none; white-space: nowrap; vertical-align: baseline; transition: background .15s, border-color .15s; }
.prose a[href^="/"]:hover { background: rgba(76,141,255,.24); border-color: var(--accent); color: #fff; text-decoration: none; }
.prose a[href^="/"]:not(:has(*))::after { content: "→"; font-size: .9em; opacity: .8; }
.prose a[href^="/"][data-noarrow]::after { content: none; }
/* token label, e.g. $CRATE */
.tkn { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 3px; margin: 0 1px; border-radius: 999px;
  background: var(--panel-3); border: 1px solid var(--border-2); color: var(--text); font-weight: 600; font-size: .92em; white-space: nowrap; vertical-align: baseline; }
.tkn img { width: 16px; height: 16px; border-radius: 5px; }

/* ================= Mint page (modern layout) ================= */
.mx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.mx-head h1 { margin: 4px 0 0; font: 700 clamp(30px, 4vw, 44px)/1.05 var(--display); letter-spacing: -.02em; }
.mx-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.mx-section { margin-top: 28px; }
.mx-h2 { font: 700 22px var(--display); margin: 0 0 14px; letter-spacing: -.01em; }

.mx-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.mx-stage { position: relative; border-radius: 22px; overflow: hidden; min-height: 460px; border: 1px solid var(--border-2);
  background: radial-gradient(90% 70% at 50% 35%, rgba(76,141,255,.22), transparent 70%), linear-gradient(180deg, #0c1638, #050a1c); }
.mx-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(120,170,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(120,170,255,.08) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: radial-gradient(70% 60% at 50% 55%, #000, transparent); -webkit-mask-image: radial-gradient(70% 60% at 50% 55%, #000, transparent); }
.mx-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mx-stage-glow { position: absolute; left: 50%; bottom: 8%; width: 60%; height: 18%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(76,141,255,.35), transparent); filter: blur(6px); pointer-events: none; }
.mx-stage-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.mx-stage-empty svg { width: 64px; height: 64px; }
.mx-stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.mx-stage-top .preview-tag { position: static; }
.mx-num { font: 700 15px var(--display); color: var(--text); background: rgba(3,7,22,.6); border: 1px solid var(--border-2); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.mx-traits { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.mx-traits span { display: inline-flex; gap: 6px; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--text); background: rgba(3,7,22,.65); border: 1px solid var(--border-2); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.mx-traits em { font-style: normal; color: var(--muted); font-weight: 500; }

.mx-panel { display: flex; flex-direction: column; gap: 14px; }
.mx-lede { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.mx-supply { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.mx-supply b { font: 700 20px var(--display); }
.mx-bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 10px; }
.mx-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f6bff, var(--accent-hi)); box-shadow: 0 0 12px rgba(76,141,255,.6); min-width: 6px; }

.mx-checkout { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border-2); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px -30px rgba(76,141,255,.45); }
.mx-label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mx-line { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; }
.mx-line .tok-logo { width: 32px; height: 32px; flex: none; }
.mx-line .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mx-line b { font: 700 16px var(--display); }
.mx-line span:not(.tok-logo) { font-size: 12.5px; color: var(--muted); }
.mx-line.dim { opacity: .75; }
.mx-divider { height: 1px; background: var(--border); margin: 4px 0; }
.mx-receive { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mx-receive b { font: 700 18px var(--display); }
.mx-cta { margin-top: 4px; height: 52px; font-size: 16px; box-shadow: 0 10px 30px -10px rgba(76,141,255,.7); }
.mx-fine { margin: 0; font-size: 12.5px; color: var(--muted); }
.mx-drop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(76,141,255,.3); }
.mx-drop b { font-variant-numeric: tabular-nums; color: var(--accent-hi); }
.mx-drop .tok-logo { width: 16px; height: 16px; vertical-align: -3px; }
.mx-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(76,141,255,.7); animation: mxPulse 1.8s infinite; }
@keyframes mxPulse { 70% { box-shadow: 0 0 0 9px rgba(76,141,255,0); } 100% { box-shadow: 0 0 0 0 rgba(76,141,255,0); } }
@media (prefers-reduced-motion: reduce) { .mx-pulse { animation: none; } }

.mx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.mx-stats > div { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mx-stats .k { font-size: 12px; color: var(--muted); }
.mx-stats .v { font: 700 24px var(--display); white-space: nowrap; }
.mx-stats .v small { font-size: 15px; color: var(--muted); font-weight: 600; }
.mx-stats .v.accent { color: var(--accent-hi); }
.mx-stats .s { font-size: 12px; color: var(--muted); }

.mx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.mx-steps > div { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.mx-steps > div:not(:last-child)::after { content: ""; position: absolute; top: 34px; right: -13px; width: 14px; height: 2px; background: var(--border-2); }
.mx-steps .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font: 700 15px var(--display); color: var(--accent-hi); background: var(--accent-soft); border: 1px solid rgba(76,141,255,.35); margin-bottom: 4px; }
.mx-steps b { font: 700 17px var(--display); }
.mx-steps span:not(.n) { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.mx-rot { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 12px; }
.mx-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; text-align: center; }
.mx-day .d { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mx-day .tok-logo { width: 34px; height: 34px; }
.mx-day b { font: 700 14px var(--display); }
.mx-day.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(76,141,255,.16), var(--panel)); box-shadow: 0 0 0 3px var(--accent-soft); }
.mx-day.soon { opacity: .55; border-style: dashed; }

.mx-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--panel); border: 1px dashed var(--border-2); border-radius: 16px; }
.mx-owned { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.mx-crate { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.mx-crate-art { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.mx-crate-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.mx-crate-art:hover img { transform: scale(1.04); }
.mx-crate-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mx-crate-name { font: 700 17px var(--display); }
.mx-vault { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.mx-vrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-2); border-radius: 10px; font-size: 13px; }

@media (max-width: 1000px) { .mx-hero { grid-template-columns: minmax(0, 1fr); } .mx-stage { min-height: 380px; } .mx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .mx-steps { grid-template-columns: minmax(0, 1fr); } .mx-steps > div::after { display: none; }
  .mx-owned { grid-template-columns: minmax(0, 1fr); } .mx-crate { grid-template-columns: 96px minmax(0, 1fr); }
  .mx-stage { min-height: 320px; } .mx-head { align-items: flex-start; }
}
.mx-drop > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ================= Board: wide hero + live ticker + living cards ================= */
.hero.hero-wide { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr); gap: 28px; align-items: center; padding: 30px 34px; max-width: none; }
.hero.hero-wide h1 { font-size: clamp(32px, 3.6vw, 50px); }
.hero.hero-wide p { margin: 12px 0 18px; max-width: 600px; font-size: 15px; }
.hero.hero-wide .ipo-badge { margin-bottom: 14px; }
.hw-copy, .hw-side { position: relative; z-index: 1; min-width: 0; }
.hw-side { display: flex; flex-direction: column; gap: 12px; }
.hero.hero-wide .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.hero.hero-wide .hero-stats > div { background: rgba(5,10,28,.55); border: 1px solid var(--border-2); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); min-width: 0; }
.hero.hero-wide .hero-stats .v { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero.hero-wide .dex-offer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(245,181,68,.08); border: 1px solid rgba(245,181,68,.28); font-size: 14px; font-weight: 600; }

.ticker { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden; }
.ticker-label { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-hi); flex: none; }
.ticker-track { position: relative; display: flex; overflow: hidden; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-run { display: flex; gap: 22px; padding-right: 22px; flex: none; animation: tickerScroll 40s linear infinite; }
.ticker-track:hover .ticker-run { animation-play-state: paused; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.tk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tk .coin-img { border-radius: 50%; }
.tk b { color: var(--text); }
.tk.buy b:first-of-type { color: var(--green); }
.tk.sell b:first-of-type { color: var(--red); }
.tk .w { font-family: var(--mono); font-size: 12px; }
.tk .t { color: var(--dim); font-size: 12px; }

.coin-card { padding-bottom: 20px; }
.cc-curve { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(76,141,255,.10); z-index: 2; overflow: hidden; }
.cc-curve > i { position: relative; display: block; height: 100%; background: linear-gradient(90deg, #2f6bff, var(--accent-hi)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.cc-curve.done > i { background: linear-gradient(90deg, #c9a23f, #f5d27a); }
.cc-curve.filling > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); animation: curveShine 1.1s ease-out; }
@keyframes curveShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.cc-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.cc-float { position: absolute; bottom: 28px; font: 700 15px var(--display); text-shadow: 0 2px 10px rgba(0,0,0,.6); animation: ccFloat 1.6s ease-out forwards; }
.cc-float.up { color: var(--green); }
.cc-float.down { color: var(--red); }
@keyframes ccFloat { 0% { opacity: 0; transform: translateY(8px) scale(.9); } 15% { opacity: 1; transform: translateY(0) scale(1.05); } 100% { opacity: 0; transform: translateY(-70px) scale(1); } }
.coin-card.pulse-buy { animation: cardBuy 1.3s ease-out; }
.coin-card.pulse-sell { animation: cardSell 1.3s ease-out; }
@keyframes cardBuy { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.0); border-color: var(--border); } 18% { box-shadow: 0 0 0 3px rgba(52,211,153,.35), 0 0 34px -4px rgba(52,211,153,.45); border-color: rgba(52,211,153,.8); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); border-color: var(--border); } }
@keyframes cardSell { 0% { border-color: var(--border); } 18% { border-color: rgba(248,113,113,.6); box-shadow: 0 0 22px -6px rgba(248,113,113,.4); } 100% { border-color: var(--border); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; } .coin-card.pulse-buy, .coin-card.pulse-sell { animation: none; } }

@media (max-width: 1000px) { .hero.hero-wide { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 600px) {
  .hero.hero-wide { padding: 24px 18px; }
  .hero.hero-wide .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero.hero-wide .dex-offer { justify-content: center; text-align: center; }
  .hero.hero-wide .hw-copy { text-align: center; }
}

/* fill wide screens: wider page, coin grid adds columns as space allows */
.view { max-width: 1600px; }
.coin-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 600px) { .coin-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .hero.hero-wide .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero.hero-wide .hero-stats > div { padding: 9px 8px; border-radius: 12px; text-align: center; }
  .hero.hero-wide .hero-stats .k { font-size: 10.5px; }
  .hero.hero-wide .hero-stats .v { font-size: 15px; }
  .hero.hero-wide p { font-size: 14px; }
}

/* ================= Admin ================= */
.ad-gate { max-width: 520px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; }
.ad-gate h1 { margin: 0; }
.ad-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ad-head h1 { margin: 4px 0 0; }
.ad-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ad-section { margin-top: 14px; }
.ad-check { display: flex; flex-direction: column; gap: 8px; }
.ad-check > div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.ad-check > div.ok { color: var(--text); }
.ad-check .dot, .ad-jobs .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--border-2); }
.ad-check .ok .dot, .ad-jobs .ok .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
.ad-jobs .bad .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(248,113,113,.18); }
.ad-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ad-jobs > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; font-size: 13.5px; }
.ad-jobs .err { flex-basis: 100%; color: var(--red); font-size: 12px; }
.ad-table { display: flex; flex-direction: column; }
.ad-table .tr { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ad-table .tr:last-child { border-bottom: 0; }
.ad-table .r { text-align: right; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.ad-table a { color: var(--accent-hi); }
.ad-kv { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ad-kv > div { display: flex; justify-content: space-between; gap: 12px; }
.ad-kv > div > span:first-child { color: var(--muted); }
.ad-copy { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); cursor: pointer; margin-left: 4px; }
.ad-copy:hover { color: var(--text); border-color: var(--accent); }
.ad-form { display: flex; flex-direction: column; gap: 10px; }
.ad-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.ad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 900px) { .ad-grid { grid-template-columns: minmax(0, 1fr); } .ad-table .tr { grid-template-columns: minmax(0, 1fr); } .ad-table .r { justify-content: flex-start; } }
