/* Layout: top bar with a hazard stripe, market stats strip, then 3 panes: coins list | coin (chart + basket + history) | launch/edit ticket. Stacks on phones. */
:root {
  --bg: #e7e1d3; --pane: #f7f3ea; --pane-2: #ece6d8; --line: #cdc3ad; --text: #221f1a; --muted: #6f6758;
  --up: #2f7d46; --down: #c0392b; --accent: #e8590c; --accent-ink: #fff8f0; --warn: #a86e00; --stripe: #f2b705; --stripe-2: #221f1a;
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --head: "Archivo Narrow", "Archivo", ui-sans-serif, sans-serif;
  --mono: "Courier Prime", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141517; --pane: #1c1e21; --pane-2: #24272b; --line: #33373d; --text: #ebe5d8; --muted: #9a917f;
  --up: #4cc274; --down: #ff6b5b; --accent: #ff7a1a; --accent-ink: #1a0d02; --warn: #f2b705; --stripe-2: #141517; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #141517; --pane: #1c1e21; --pane-2: #24272b; --line: #33373d; --text: #ebe5d8; --muted: #9a917f;
  --up: #4cc274; --down: #ff6b5b; --accent: #ff7a1a; --accent-ink: #1a0d02; --warn: #f2b705; --stripe-2: #141517; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); margin: 0; }
body { font-family: var(--sans); font-size: 13px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }

.demo { padding: 6px 16px; background: var(--pane-2); color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 56px; background: var(--pane); }
.hazard { height: 8px; background: repeating-linear-gradient(-45deg, var(--stripe) 0 12px, var(--stripe-2) 12px 24px); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--head); font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.brand small { font-family: var(--head); font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 10px; }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 18px 10px 15px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 3px; padding: 9px 14px; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 rgb(0 0 0 / .25); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--text); box-shadow: none; }
.btn.sell { background: var(--stripe); color: #221f1a; }
.btn:disabled { opacity: .45; cursor: default; }

.stats { display: flex; gap: 28px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--pane-2); overflow-x: auto; white-space: nowrap; }
.stats .sym { font-family: var(--head); font-size: 20px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.stat { display: grid; gap: 2px; }
.stat span:first-child { color: var(--muted); font-family: var(--head); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

.grid { display: grid; grid-template-columns: minmax(440px, 1.1fr) minmax(0, 1.4fr) 330px; gap: 12px; padding: 12px; min-height: calc(100vh - 160px); }
.grid > section { background: var(--pane); min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgb(0 0 0 / .35); }
.ph { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 2px solid var(--text); font-family: var(--head); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.ph .seg { display: flex; gap: 2px; }
.ph .seg button { background: none; border: 0; color: var(--muted); padding: 2px 8px; cursor: pointer; font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.ph .seg button.on { color: var(--accent-ink); background: var(--accent); border-radius: 2px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-family: var(--head); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 6px 10px; }
td { padding: 8px 10px; border-top: 1px dashed var(--line); }
th.r, td.r { text-align: right; }
tr.mkt { cursor: pointer; }
tr.mkt:hover td, tr.mkt.on td { background: var(--pane-2); }
tr.mkt.on td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.scroll { overflow: auto; }
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sortbar > span { color: var(--muted); font-family: var(--head); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-right: 2px; }
.sortbar button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 5px 11px; min-height: 30px; cursor: pointer; font-family: var(--head); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.sortbar button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sortbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.mig { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--up); color: var(--up); border-radius: 2px; font-size: 9px; font-family: var(--head); font-weight: 700; letter-spacing: .06em; vertical-align: 2px; }
#mkts td { padding: 11px 10px; font-size: 14px; }

.chart { height: 280px; position: relative; border-bottom: 1px solid var(--line); background-image: radial-gradient(var(--line) 1.2px, transparent 1.4px); background-size: 18px 18px; }
.chart canvas { width: 100%; height: 100%; display: block; }
.block { padding: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 5px 9px 5px 20px; border: 1.5px solid var(--text); border-radius: 2px 10px 10px 2px; background: var(--pane-2); display: inline-flex; gap: 6px; align-items: center; position: relative; }
.chip::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; border: 1.5px solid var(--text); background: var(--pane); }
.chip.cur { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--pane)); }
.chip.cur::before { border-color: var(--accent); }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.tag { font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 2px 7px; border-radius: 2px; border: 2px solid currentColor; white-space: nowrap; transform: rotate(-2deg); display: inline-block; }
.tag.lock { color: var(--down); } .tag.open { color: var(--up); }

.lp { max-width: 1120px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) 16px 64px; display: grid; gap: 24px; }
.lp-head h1 { font-family: var(--head); font-size: clamp(32px, 5vw, 56px); line-height: 1; margin: 0 0 8px; text-transform: uppercase; letter-spacing: -.01em; }
.lp-head p { color: var(--muted); margin: 0; font-size: 16px; max-width: 60ch; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lp-card { background: var(--pane); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 14px -10px rgb(0 0 0 / .35); }
.lp .ticket { padding: 24px; gap: 18px; }
.lp .field label { font-size: 12px; }
.lp .field input, .lp .field select { font-size: 16px; padding: 12px 10px; }
.lp .btn#go { font-size: 16px; padding: 16px 22px; }
.lp .kv { font-size: 14px; }
.lp-prev { position: sticky; top: 16px; padding: 0 20px 20px; display: grid; gap: 14px; }
.lp-prev .ph { margin: 0 -20px; padding: 12px 20px; }
.lp-prev .coin { display: flex; gap: 14px; align-items: center; }
.lp-prev .pic { width: 64px; height: 64px; border-radius: 4px; background: var(--pane-2) center / cover; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 22px; color: var(--muted); }
.lp-prev .nm { font-family: var(--head); font-size: 24px; font-weight: 700; }
.lp-prev ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .lp-grid { grid-template-columns: 1fr; } .lp-prev { position: static; } }
.ticket { padding: 14px 12px; display: grid; gap: 10px; background-image: linear-gradient(var(--pane), var(--pane)); }
.field { display: grid; gap: 4px; }
.field label { color: var(--muted); font-family: var(--head); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.field input, .field select, .field textarea { background: var(--pane-2); border: 0; border-bottom: 1.5px solid var(--text); border-radius: 0; padding: 8px 6px; width: 100%; font-family: var(--mono); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two > * { min-width: 0; }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-bottom: 1px dotted var(--line); padding-bottom: 4px; }
.kv span:first-child { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); line-height: 1.45; }
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(360px, calc(100vw - 32px)); background: var(--pane); border: 1.5px solid var(--text); border-left: 6px solid var(--accent); padding: 10px 12px; border-radius: 3px; font-family: var(--mono); }
.toast.err { border-left-color: var(--down); }
.confirm { border: 2px dashed var(--down); border-radius: 3px; padding: 10px; display: grid; gap: 8px; }

@media (max-width: 1100px) { .grid { grid-template-columns: minmax(360px, 1fr) minmax(0, 1fr); } .grid > section:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; padding: 12px 16px; } .topbar { gap: 10px; } .brand small { display: none; } .chart { height: 220px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Landing */
[hidden] { display: none !important; }
.brand { cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
.landing { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) 16px 64px; display: grid; gap: 40px; }
.eyebrow { font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-family: var(--head); font-weight: 700; text-transform: uppercase; line-height: .92; letter-spacing: -.01em; font-size: clamp(48px, 9vw, 124px); margin: 14px 0 0; text-wrap: balance; }
.hero h1 .strike { position: relative; white-space: nowrap; }
.hero h1 .strike::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .09em; background: var(--down); transform: rotate(-3deg); }
.hero h1 em { font-style: normal; color: var(--accent); text-transform: none; }
.hero p { font-size: clamp(17px, 2vw, 22px); line-height: 1.45; max-width: 46ch; margin: 22px 0 0; color: var(--muted); }
.hero p strong { color: var(--text); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta .btn { font-size: 16px; padding: 14px 22px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { background: var(--pane); border: 1px solid var(--line); border-radius: 4px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.step b { font-family: var(--head); font-size: 44px; line-height: 1; color: var(--accent); }
.step h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: 16px; margin: 0; }
.step p { margin: 0; color: var(--muted); line-height: 1.45; }
.fine { font-size: 12px; color: var(--muted); max-width: 70ch; line-height: 1.5; border-top: 1px dashed var(--line); padding-top: 16px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* Empty market (no coins launched yet). */
.empty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.empty { padding: 28px 16px 20px; border-bottom: 1px solid var(--line); }
.empty h2 { font-family: var(--head); font-size: clamp(26px, 3.4vw, 40px); line-height: 1; margin: 6px 0 10px; text-transform: uppercase; letter-spacing: -.01em; }
.empty p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 52ch; }
.empty p strong { color: var(--text); }
.empty .cta { margin-top: 16px; }
.steps.mini { padding: 12px; gap: 10px; }
.steps.mini .step { padding: 12px; }
.steps.mini .step b { font-size: 22px; }
.steps.mini .step h3 { font-size: 15px; margin: 4px 0; }


/* "Opens after launch" cover over the Launch page while LAUNCHES_OPEN is off. */
.lp.closed { position: relative; }
.lp.closed:not(.peek) .lp-body { filter: blur(3px) grayscale(.4); opacity: .45; pointer-events: none; user-select: none; }
.lp.closed.peek .lp-soon { display: none; }
.lp-soon.ready { cursor: pointer; }
.lp-soon-hint { margin-top: 22px; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); opacity: 0; transition: opacity .4s; }
.lp-soon.ready .lp-soon-hint { opacity: 1; }
.lp-soon-bar { display: none; border: 1px solid var(--line); border-left: 4px solid var(--stripe); background: var(--pane); padding: 12px 14px; font-size: 14px; color: var(--muted); border-radius: 4px; }
.lp.closed.peek .lp-soon-bar { display: block; }
.lp .btn#go:disabled { opacity: .55; cursor: not-allowed; }
.lp-soon { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: center; padding: clamp(40px, 10vw, 120px) 16px 16px; }
.lp-soon-card { width: min(760px, 100%); background: var(--pane); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); }
.lp-soon-card .hazard { height: 16px; }
.lp-soon-body { padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 48px); text-align: center; }
.lp-soon .eyebrow { font-family: var(--head); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; color: var(--accent); margin-bottom: 14px; }
.lp-soon h2 { font-family: var(--head); font-size: clamp(40px, 8vw, 84px); line-height: .95; text-transform: uppercase; margin: 0 0 18px; letter-spacing: -.01em; }
.lp-soon p { color: var(--muted); font-size: 16px; margin: 0 auto; max-width: 46ch; }

/* "Select reward pair" window, laid out like pump.fun's custom pair picker. */
.add-pair { justify-self: start; }
body.pm-open { overflow: hidden; }
.pm-overlay { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .6); display: flex; align-items: flex-start; justify-content: center; padding: clamp(16px, 6vh, 64px) 16px 16px; }
.pm { width: min(520px, 100%); max-height: calc(100vh - 2 * clamp(16px, 6vh, 64px)); display: flex; flex-direction: column; background: var(--pane); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .7); overflow: hidden; }
.pm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.pm-head h2 { margin: 0; font-family: var(--head); font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.pm-x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.pm-search { margin: 0 16px; background: var(--pane-2); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; font-size: 15px; }
.pm-search:focus { outline: none; border-color: var(--accent); }
.pm-tabs { display: flex; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.pm-tabs button { background: var(--pane-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.pm-tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pm-list { overflow-y: auto; flex: 1; min-height: 200px; border-top: 1px solid var(--line); }
.pm-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; cursor: pointer; color: var(--text); }
.pm-row:hover:not(:disabled), .pm-row:focus-visible { background: var(--pane-2); }
.pm-row:disabled { cursor: default; opacity: .6; }
.pm-row.busy { opacity: 1; background: var(--pane-2); }
.pm-img { position: relative; width: 36px; height: 36px; }
.pm-img img { position: absolute; inset: 0; z-index: 1; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--pane-2); }
.pm-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 13px; color: var(--muted); background: var(--pane-2); border: 1px solid var(--line); }
.pm-name, .pm-num { display: grid; gap: 2px; min-width: 0; }
.pm-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-name small, .pm-num small { color: var(--muted); font-size: 12px; }
.pm-num { text-align: right; justify-items: end; }
.pm-num b { font-family: var(--mono); font-size: 14px; }
.pm-none { padding: 16px; color: var(--muted); font-size: 13px; }
