/* kind.fun: black screen, neon light, dithered pixels and a little glitch. */

:root {
  --bg: #000;
  --surface: #08080c;
  --surface-2: #101018;
  --line: #1f1d2b;
  --text: #f2f0ff;
  --muted: #8f8aa6;
  --pink: #ff2bd6;
  --cyan: #2bf0ff;
  --lime: #c6ff3d;
  --up: #c6ff3d;
  --down: #ff3b6b;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  /* stepped "pixel" corners */
  --notch: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* faint CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--pixel); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; }
h3 { font-family: var(--body); font-weight: 700; }
p, dl, dd { margin: 0; }
sub { font-size: 0.7em; vertical-align: -0.25em; line-height: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.up { color: var(--up); }
.down { color: var(--down); }

/* clip-path hides outlines, so notched controls get an inset focus ring */
:is(.btn, .wallet-button, .tabs button, .seg button, .chips button, .wallet-option, .token-card):focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--cyan);
}

#app { flex: 1; width: min(1240px, 100% - 40px); margin: 0 auto; outline: none; }

/* ---------- glitch helpers ---------- */

.glitchy:hover, .token-card:hover h3, .btn:hover:not(:disabled) {
  text-shadow: -2px 0 var(--cyan), 2px 0 var(--pink);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px max(20px, calc((100% - 1240px) / 2));
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; font: 700 22px/1 var(--pixel); text-transform: lowercase; }
.brand-tld { color: var(--pink); }
.brand-dot {
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.topnav { display: flex; gap: 4px; }
.topnav a { padding: 8px 14px; color: var(--muted); font-weight: 500; }
.topnav a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--lime); }
.topnav a[aria-current="page"]::before { content: "> "; font-family: var(--mono); }

.wallet-button {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 0;
  clip-path: var(--notch);
  background: var(--pink);
  color: #000;
  font-weight: 700;
  white-space: nowrap;
  transition: filter 0.15s;
}
.wallet-button:hover { filter: brightness(1.15); }
.wallet-button.connected { background: var(--surface-2); color: var(--text); }
.wallet-bal { color: var(--lime); font-family: var(--mono); font-size: 14px; }

/* ---------- shared pieces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  clip-path: var(--notch);
  font-weight: 700;
  transition: filter 0.15s, opacity 0.2s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn-big { padding: 16px 28px; font-size: 17px; }
.btn-primary { background: var(--lime); color: #000; }
.btn-danger { background: var(--down); color: #000; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:disabled { opacity: 0.4; }

.panel { background: var(--surface); border: 1px solid var(--line); }

.lede { color: var(--muted); font-size: 18px; max-width: 32em; }
.ticker { color: var(--cyan); font-family: var(--mono); font-weight: 600; }

.logo { flex: none; border-radius: 22%; overflow: hidden; }
.logo svg { display: block; width: 100%; height: 100%; }
.logo-md { width: 52px; height: 52px; }
.logo-lg { width: 88px; height: 88px; box-shadow: 0 0 30px rgba(255, 43, 214, 0.35); }
.logo-xl { width: min(260px, 60vw); aspect-ratio: 1; height: auto; }

.tabs { display: flex; gap: 4px; }
.tabs button {
  padding: 8px 14px;
  border: 0;
  background: var(--surface-2);
  clip-path: var(--notch);
  color: var(--muted);
  font: 600 14px var(--mono);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-pressed="true"] { background: var(--cyan); color: #000; }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.section-head p { color: var(--muted); }

/* ---------- home ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 24px;
  padding: 40px 0 48px;
}
.hero-title { font-size: clamp(34px, 4.8vw, 66px); }
.neon {
  position: relative;
  display: inline-block;
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255, 43, 214, 0.7);
}
.neon::before, .neon::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.8;
  pointer-events: none;
}
.neon::before { color: var(--cyan); animation: glitch-a 3.2s steps(1) infinite; }
.neon::after { color: var(--lime); animation: glitch-b 3.2s steps(1) infinite; }
@keyframes glitch-a {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); translate: 0 0; }
  90% { clip-path: inset(20% 0 55% 0); translate: -6px 0; }
  94% { clip-path: inset(60% 0 10% 0); translate: 5px 0; }
}
@keyframes glitch-b {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); translate: 0 0; }
  92% { clip-path: inset(45% 0 30% 0); translate: 6px 0; }
  96% { clip-path: inset(5% 0 80% 0); translate: -4px 0; }
}

.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 40px; }
.hero-stats dt { color: var(--muted); font-size: 14px; }
.hero-stats dd { font: 700 26px/1.2 var(--mono); }

.hero-stage { position: relative; }
.hero-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  image-rendering: pixelated;
}
.stage-hint { margin-top: 4px; text-align: center; color: var(--muted); font: 13px var(--mono); }
.hero-stage.no-webgl { display: none; }

.causes { padding: 32px 0 64px; }
.cause-board { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 32px; }
.cause-row {
  display: grid;
  grid-template-columns: 30px 150px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.cause-icon { font-size: 22px; }
.cause-name { font-weight: 600; }
/* segmented, pixel-style progress bar */
.cause-bar { height: 12px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 8px, transparent 8px 10px); }
.cause-bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--lime) 0 8px, transparent 8px 10px);
  filter: drop-shadow(0 0 6px rgba(198, 255, 61, 0.5));
  transition: width 0.6s steps(12);
}
.cause-raised { font-family: var(--mono); font-weight: 600; min-width: 70px; text-align: right; }

.feed { padding-bottom: 88px; }
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.token-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.15s, transform 0.15s;
}
.token-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--pink), inset 0 0 40px rgba(255, 43, 214, 0.12); }
.token-card.pulse { animation: pulse 0.6s steps(3); }
@keyframes pulse { from { box-shadow: inset 0 0 0 2px var(--lime); } }

.card-top { display: flex; align-items: center; gap: 12px; }
.card-name { min-width: 0; flex: 1; }
.card-name h3 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name .ticker { font-size: 13px; }
.change { font: 600 14px var(--mono); }

.spark { display: block; width: 100%; height: 40px; overflow: visible; }
.spark path { fill: none; stroke-width: 2; stroke-linejoin: miter; }
.spark.up path { stroke: var(--up); }
.spark.down path { stroke: var(--down); }

.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-stats dt { color: var(--muted); font-size: 13px; }
.card-stats dd { font: 600 15px var(--mono); }

.card-cause { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.card-cause strong { color: var(--lime); font-weight: 600; white-space: nowrap; }
.yours {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 1px 8px;
  background: var(--pink);
  color: #000;
  font: 700 13px var(--pixel);
}
.token-card:has(.yours) .change { margin-right: 56px; }

/* ---------- launch ---------- */

.launch { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; padding: 48px 0 88px; }
.launch-preview {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
}
.preview-glow {
  position: absolute;
  inset: 5% 15% 35%;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 43, 214, 0.35), rgba(43, 240, 255, 0.12) 50%, transparent 70%);
  filter: blur(30px);
}
.launch-preview .logo-xl { margin-bottom: 16px; box-shadow: 0 0 60px rgba(198, 255, 61, 0.25); }
.logo.pop { animation: pop 0.4s steps(4); }
@keyframes pop {
  0% { transform: scale(0.7); filter: hue-rotate(180deg); }
  100% { transform: scale(1); }
}
.preview-name { font: 700 30px/1.15 var(--pixel); text-transform: uppercase; }
.preview-ticker { font-size: 18px; margin-bottom: 14px; }

.launch-form { padding: 32px; display: flex; flex-direction: column; gap: 22px; clip-path: var(--notch); border: 0; box-shadow: inset 0 0 0 1px var(--line); }
.launch-form h1 { font-size: clamp(28px, 3.4vw, 42px); }
.launch-form .lede { font-size: 16px; margin-top: -8px; }

.field-row { display: grid; grid-template-columns: 1fr 160px; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span:first-child, .cause-picker legend { color: var(--muted); font-size: 14px; font-weight: 500; }
.field input, .amount-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: #000;
  font-size: 17px;
  font-weight: 600;
}
.field input:focus, .amount-input:focus-within { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 18px rgba(43, 240, 255, 0.25); }
.field-ticker input { font-family: var(--mono); text-transform: uppercase; color: var(--cyan); }

.cause-picker { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cause-picker legend { margin-bottom: 8px; padding: 0; }
.cause-option input { position: absolute; opacity: 0; pointer-events: none; }
.cause-option-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  height: 100%;
  padding: 14px;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--notch);
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
}
.cause-option-icon { grid-row: span 2; font-size: 22px; }
.cause-option-name { font-weight: 600; }
.cause-option-blurb { color: var(--muted); font-size: 13px; line-height: 1.4; }
.cause-option:hover .cause-option-body { box-shadow: inset 0 0 0 1px var(--muted); }
.cause-option input:checked + .cause-option-body { background: rgba(198, 255, 61, 0.07); box-shadow: inset 0 0 0 2px var(--lime); }
.cause-option input:focus-visible + .cause-option-body { outline: 2px solid var(--cyan); outline-offset: 2px; }

.fee-note { color: var(--muted); }
.fee-note strong { color: var(--text); }
.form-error { color: var(--down); }
.form-error:empty { display: none; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- token page ---------- */

.token-page { padding: 40px 0 88px; }
.token-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.token-head h1 { font-size: clamp(26px, 4vw, 46px); }
.token-head h1 .ticker { font-size: 0.42em; text-transform: none; vertical-align: middle; }
.token-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; color: var(--muted); font-size: 15px; }
.cause-chip { padding: 4px 12px; color: #000; background: var(--lime); font-weight: 700; clip-path: var(--notch); }

.token-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "chart trade" "stats trade" "cause trade" "trades trade";
  grid-template-rows: auto auto auto 1fr;
  gap: 14px;
}
.chart-panel { grid-area: chart; padding: 24px; }
.trade-panel { grid-area: trade; align-self: start; position: sticky; top: 90px; }
.token-stats { grid-area: stats; }
.cause-panel { grid-area: cause; }
.trades-panel { grid-area: trades; }

.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 18px; }
.big-price { font: 700 clamp(30px, 4vw, 44px)/1.1 var(--mono); letter-spacing: -0.03em; }
.price-change { font: 600 15px var(--mono); margin-top: 4px; }

.chart { position: relative; height: 320px; padding-right: 96px; padding-bottom: 28px; }
.chart.up { color: var(--up); }
.chart.down { color: var(--down); }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: miter; }
.chart-y { position: absolute; top: 0; right: 0; bottom: 28px; width: 88px; }
.chart-y span { position: absolute; right: 0; translate: 0 -50%; color: var(--muted); font: 13px var(--mono); }
.chart-x { position: absolute; left: 0; right: 96px; bottom: 0; display: flex; justify-content: space-between; color: var(--muted); font: 13px var(--mono); }

.cross { position: absolute; inset: 0 96px 28px 0; pointer-events: none; }
.cross-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: repeating-linear-gradient(to bottom, var(--text) 0 3px, transparent 3px 6px); opacity: 0.6; }
.cross-dot { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; translate: -50% -50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.cross-tip {
  position: absolute;
  left: var(--x);
  top: 0;
  translate: 12px 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--cyan);
  color: var(--text);
  white-space: nowrap;
  font: 600 14px var(--mono);
}
.cross-tip span { color: var(--muted); font-weight: 400; font-size: 13px; }
.cross.flip .cross-tip { translate: calc(-100% - 12px) 0; }

.trade-panel { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.seg button { padding: 11px; border: 0; background: var(--surface-2); clip-path: var(--notch); color: var(--muted); font: 700 15px var(--pixel); text-transform: uppercase; }
.seg [data-side="buy"][aria-pressed="true"] { background: var(--lime); color: #000; }
.seg [data-side="sell"][aria-pressed="true"] { background: var(--down); color: #000; }

.amount-input { display: flex; align-items: center; gap: 10px; }
.amount-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0; font: 700 22px var(--mono); }
.amount-input input::-webkit-inner-spin-button { appearance: none; }
.amount-input .unit { color: var(--cyan); font-family: var(--mono); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { flex: 1; padding: 8px 10px; border: 0; background: var(--surface-2); clip-path: var(--notch); font: 600 14px var(--mono); }
.chips button:hover:not(:disabled) { background: var(--line); color: var(--cyan); }
.chips button:disabled { opacity: 0.4; }

.quote { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #000; border: 1px dashed var(--line); font-size: 15px; }
.quote div { display: flex; justify-content: space-between; gap: 12px; }
.quote dt { color: var(--muted); }
.quote dd { font-family: var(--mono); font-weight: 600; text-align: right; }
.quote .give { color: var(--lime); }

.trade-submit { width: 100%; }
.balance { color: var(--muted); font-size: 14px; text-align: center; }
.balance strong { color: var(--text); }
.sim-note { color: var(--muted); font-size: 13px; text-align: center; }

.token-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.token-stats .panel { padding: 18px; }
.token-stats dt { color: var(--muted); font-size: 14px; }
.token-stats dd { font: 700 22px/1.3 var(--mono); }

.cause-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-color: rgba(198, 255, 61, 0.35);
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.06), transparent 60%), var(--surface);
}
.cause-panel-icon { display: grid; place-items: center; width: 60px; height: 60px; background: rgba(198, 255, 61, 0.1); clip-path: var(--notch); font-size: 30px; }
.cause-panel h2 { font-size: 20px; }
.cause-panel p { color: var(--muted); margin-top: 4px; }
.cause-panel-raised { text-align: right; }
.cause-panel-raised strong { display: block; font: 700 30px/1.1 var(--pixel); color: var(--lime); text-shadow: 0 0 18px rgba(198, 255, 61, 0.5); }
.cause-panel-raised span { color: var(--muted); font-size: 14px; }

.trades-panel { padding: 22px 24px; overflow-x: auto; }
.trades-panel h2 { font-size: 20px; margin-bottom: 12px; }
.trades-table { width: 100%; border-collapse: collapse; font: 14px var(--mono); }
.trades-table th { text-align: left; color: var(--muted); font: 500 14px var(--body); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.trades-table td { padding: 10px 10px 10px 0; border-bottom: 1px dashed var(--line); white-space: nowrap; }
.trades-table td:first-child { color: var(--muted); }
.trades-table tr.mine td { background: rgba(255, 43, 214, 0.07); }
.trades-table tr.mine td:first-child { color: var(--pink); font-weight: 600; }
.no-trades { text-align: center; color: var(--muted); padding: 28px 0 !important; }

.empty { padding: 120px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.empty h1 { font-size: clamp(32px, 5vw, 56px); }

/* ---------- wallet dialog & toast ---------- */

.wallet-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--text);
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 1px var(--pink);
}
.wallet-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.wallet-dialog-body { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.wallet-dialog h2 { font-size: 22px; }
.wallet-note, .wallet-connected-as { color: var(--muted); font-size: 15px; }
.wallet-note strong { color: var(--lime); }
.wallet-address { font: 14px var(--mono); word-break: break-all; padding: 12px; background: #000; color: var(--cyan); }
.wallet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wallet-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  background: #000;
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 1px var(--line);
}
.wallet-option:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--pink); }
.wallet-option:disabled { opacity: 0.45; }
.wallet-option-name { font-weight: 600; }
.wallet-option-state { color: var(--muted); font: 13px var(--mono); }
.wallet-actions { display: flex; gap: 10px; justify-content: flex-end; }
.wallet-cancel { align-self: flex-end; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--lime), 0 0 24px rgba(198, 255, 61, 0.3);
  font: 600 14px var(--mono);
  translate: -50% 160%;
  opacity: 0;
  transition: translate 0.3s steps(5), opacity 0.2s;
  pointer-events: none;
}
.toast.show { translate: -50% 0; opacity: 1; }

.footer { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stage { order: -1; max-width: min(400px, 52vh); width: 100%; justify-self: center; }
  .token-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "chart" "trade" "stats" "cause" "trades";
    grid-template-rows: none;
  }
  .trade-panel { position: static; }
  .token-stats { grid-template-columns: repeat(2, 1fr); }
  .launch { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .launch-preview { position: relative; top: 0; padding: 20px; }
  .launch-preview .logo-xl { width: 180px; }
  .cause-board { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #app { width: calc(100% - 28px); }
  .topbar { gap: 12px; padding: 12px 14px; }
  .topnav a { padding: 8px 8px; }
  .wallet-button { padding: 9px 14px; font-size: 14px; }
  .wallet-button .wallet-bal { display: none; }
  .hero { padding: 16px 0 32px; }
  .hero-actions .btn { flex: 1; }
  .cause-row { grid-template-columns: 26px 1fr auto; }
  .cause-bar { grid-column: 2 / -1; grid-row: 2; }
  .field-row, .cause-picker { grid-template-columns: 1fr; }
  .launch-form { padding: 22px; }
  .token-head { gap: 14px; }
  .logo-lg { width: 64px; height: 64px; }
  .chart-panel { padding: 18px; }
  .chart { height: 240px; padding-right: 78px; }
  .chart-y { width: 74px; }
  .chart-x, .cross { right: 78px; }
  .cause-panel { grid-template-columns: auto 1fr; }
  .cause-panel-raised { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 420px) {
  .brand { font-size: 18px; }
  .topnav a[data-nav="home"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
