/* rayfun tokens. Phone first.
   v0.9.0 (owner, 2026-11-05: "change the current design to the actual OG pump.fun UI"): the 2024 king-of-the-hill
   board, measured from the Wayback captures in design-refs/ (README.md there): slate page #1b1d28, near-white text,
   light-green #86efac inputs / pills / dropdowns with black text, borderless cards with a white ring on a fresh trade,
   blue form labels and a blue "Create coin", green buy / red sell, bracket links, Inter everywhere.
   Layout and feel only: no pump.fun logo, name or copy text. The Raydium-coloured v0.5-v0.8 skin is in
   classic-backup-2026-11-05-v0.8.0/. Token names are kept so the pages' inline styles keep working. */
:root {
  --bg: #1b1d28;        /* page (measured) */
  --bg-deep: #14161f;
  --panel: #2e303a;     /* trade box, modal, thread posts */
  --inset: #1b1d28;     /* inputs sunk into a panel */
  --card: transparent;
  --chip: #2a2c38;
  --chip-hi: #3a3d4c;
  --line: #3b3f4f;      /* hairlines */
  --edge: none;
  --text: #f8fafc;
  --muted: #94a3b8;     /* slate-400: "replies: 7", "Created by" */
  --dim: #64748b;
  --up: #86efac;        /* green-300: market cap, pills, inputs */
  --down: #f87171;      /* red-400 */
  --green: var(--up);
  --green-hi: #4ade80;  /* green-400: the buy tab + "place trade" */
  --green-ink: #000;
  --blue: #60a5fa;      /* form labels + links */
  --cyan: #93c5fd;      /* old name: light blue links / hovers */
  --teal: #86efac;
  --blue-btn: #86efac;  /* old name: every main button is the light green */
  --create: #1d6cf6;    /* the blue "Create coin" */
  --ll: linear-gradient(180deg, #ffd43b 0%, #ff922b 55%, #f76707 100%);   /* king of the hill: yellow to orange */
  --purple: #93c5fd;
  --purple-line: #3b3f4f;
  --purple-tint: #2a2c38;
  --title: none;
  --row: #22242f;
  --row-alt: transparent;
  --red: var(--down);
  --yellow: #facc15;    /* king of the hill bar */
  --ring: #f8fafc;      /* card ring on a fresh trade */
  --radius: 6px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--font);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg);
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left)); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; }
.brk::before { content: "["; } .brk::after { content: "]"; }
.brk { color: var(--text); white-space: nowrap; }
.brk:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.green { color: var(--up); }
.hidden { display: none !important; }
.gtxt, .lltxt, .ptxt { color: var(--up); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 1px solid var(--text); outline-offset: 0; }

/* ---- nav: tiny logo, bracket links, [connect wallet] on the right ---- */
.nav { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; line-height: 1.3; color: var(--up); letter-spacing: .01em; }
.logo img { height: 24px; width: auto; }   /* the Og.Fun wordmark, cut out of its background (brand/ogfun-source.webp) */
.nav-links { display: flex; flex-wrap: wrap; gap: 2px 10px; max-width: 220px; }
.nav-links .brk { color: var(--text); }
.nav-links .house { color: var(--up); }
.nav-right { margin-left: auto; }
.nav-right .ow-btn { gap: 0; height: auto; padding: 0; border: 0; border-radius: 0; font: 14px/1.45 var(--font); color: var(--text); background: none; }
.nav-right .ow-btn::before { content: "["; } .nav-right .ow-btn::after { content: "]"; }
.nav-right .ow-btn img { display: none; }
.nav-right .ow-btn:hover { text-decoration: underline; }

/* ---- ticker pills: a trade is light green, a launch is light blue; both jump in with a shake ---- */
.tickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 36px; margin: 6px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 4px; background: var(--up); color: #000; font-size: 14px; max-width: 100%; }
.pill.make { background: #93c5fd; }
.pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.pill b { font-weight: 600; }
.pill a:hover { text-decoration: underline; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-1deg); } 40% { transform: translateX(6px) rotate(1deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anim .shake { animation: shake .45s ease-in-out; }

/* ---- board head ---- */
.start { display: block; width: max-content; max-width: 100%; text-align: center; font-size: 24px; font-weight: 500; margin: 18px auto 14px; color: var(--text); }
.start:hover { font-weight: 700; text-decoration: none; }
.koth-title { text-align: center; font-weight: 900; font-style: italic; font-size: 28px; letter-spacing: -.02em; margin: 6px auto 8px; width: max-content; max-width: 100%;
  background: var(--ll); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 6px 2px 2px;
  filter: drop-shadow(0 2px 0 #7a2e00); }
.koth { display: flex; justify-content: center; margin-bottom: 18px; }
.koth .card { max-width: 420px; border: 1px solid transparent; }
.koth .card-img { width: 128px; height: 128px; }
.search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 12px; }
.search input { flex: 1; min-width: 0; height: 44px; border-radius: var(--radius); border: 0; background: var(--up); color: #000; padding: 0 10px; font-size: 16px; }
.search input::placeholder { color: #47604f; }
.search button { height: 44px; padding: 0 14px; border-radius: var(--radius); background: var(--up); color: #000; font-size: 16px; }
.search button:hover { background: var(--green-hi); }
.wrap { max-width: 1280px; margin: 0 auto; }
.tabs { display: flex; gap: 18px; font-size: 16px; margin: 6px 0 10px; }
.tabs button { color: var(--dim); padding-bottom: 4px; border-bottom: 3px solid transparent; }
.tabs button:hover { color: var(--muted); }
.tabs button.on { color: var(--up); border-bottom-color: var(--up); }
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 12px; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.sel { position: relative; }
.sel select { appearance: none; -webkit-appearance: none; width: 100%; height: 40px; border: 0; border-radius: var(--radius); background: var(--up); color: #000; padding: 0 34px 0 12px; font-size: 15px; }
.sel select option { background: #fff; color: #000; }
.sel::after { content: ""; position: absolute; right: 14px; top: 15px; width: 7px; height: 7px; border-right: 1.5px solid #000; border-bottom: 1.5px solid #000; transform: rotate(45deg); pointer-events: none; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--text); }
.tog { display: inline-flex; gap: 4px; align-items: center; }
.tog button { padding: 1px 5px; border-radius: 4px; color: var(--dim); }
.tog button.on { background: var(--up); color: #000; }

/* ---- card grid: no boxes, a white border on hover and on a fresh trade ---- */
.grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.card { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px; border: 1px solid transparent; background: none; max-height: 300px; overflow: hidden; }
.card:hover { border-color: var(--ring); }
.card.fresh { border-color: var(--ring); }
.card-img { width: 128px; height: 128px; object-fit: contain; object-position: top; color: var(--muted); font-size: 13px; overflow: hidden; }
.card-txt { min-width: 0; display: grid; gap: 2px; font-size: 12px; }
.by { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.by a, .green-name { color: var(--muted); }
.by a:hover { text-decoration: underline; }
.mc { color: var(--up); display: flex; gap: 6px; flex-wrap: wrap; }
.badge { color: var(--up); }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--up); color: #000; font-weight: 600; justify-self: start; }
.tag.warn { background: #fde68a; color: #000; }
.tag.lock { background: var(--chip-hi); color: var(--text); }
.desc { font-size: 14px; color: var(--muted); word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.desc b { color: var(--text); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; grid-column: 1 / -1; line-height: 1.7; }
.qa-note { text-align: center; font-size: 12px; color: #000; background: #fcd34d; padding: 4px 8px; border-radius: 4px; margin: 6px auto; max-width: 720px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 28px 0; font-size: 16px; color: var(--text); }
.pager button:disabled { color: var(--dim); cursor: default; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--dim); padding: 20px 0 16px; margin-top: 12px; }

/* ---- modal (how it works, buy-on-create): slate box, white hairline ---- */
.mback { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; }
.modal { width: min(512px, 100%); background: var(--bg); border: 1px solid var(--text); border-radius: 8px; padding: 20px 16px; text-align: center; max-height: 92dvh; overflow: auto; }
.modal h2 { font-size: 18px; margin: 0 0 12px; }
.modal p { font-size: 16px; margin: 0 0 14px; }
.modal .steps p { margin: 0 0 14px; color: #e2e8f0; }
.modal .go { display: block; width: 100%; border: 2px solid var(--text); border-radius: 8px; padding: 10px; font-weight: 600; margin-top: 8px; background: none; color: var(--text); }
.modal .go:hover { background: var(--panel); text-decoration: none; }

/* ---- forms (create): blue labels, dark inputs, the blue button ---- */
.col { max-width: 420px; margin: 0 auto; }
.goback { display: block; width: max-content; margin: 24px auto 18px; text-align: center; font-size: 22px; color: var(--text); }
.f { display: grid; gap: 4px; margin-bottom: 14px; }
.f label { color: var(--blue); font-weight: 600; font-size: 14px; }
.f input, .f textarea, .f select { width: 100%; background: #2a2a3b; border: 1px solid #475569; border-radius: var(--radius); padding: 10px 12px; font-size: 16px; color: var(--text); }
.f input::placeholder, .f textarea::placeholder { color: var(--dim); }
.f textarea { min-height: 90px; resize: vertical; }
.f .hint { font-size: 12px; color: var(--muted); }
.more { color: var(--blue); font-size: 14px; margin-bottom: 14px; }
.more:hover { text-decoration: underline; }
.btn-blue { display: block; width: 100%; background: var(--create); color: #fff; border-radius: var(--radius); padding: 12px; font-size: 16px; }
.btn-blue:hover:not(:disabled) { background: #1a5fd8; }
.btn-blue:disabled { opacity: .5; cursor: default; }
.cost { font-size: 14px; margin-top: 10px; color: var(--text); }
.msg { font-size: 14px; margin-top: 12px; word-break: break-word; }
.msg.err { color: var(--down); }
.msg.ok { color: var(--up); }

@media (min-width: 768px) {
  body { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .nav-links { max-width: 320px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selects { width: auto; display: flex; }
  .sel select { width: auto; min-width: 150px; }
  .controls { flex-wrap: nowrap; }
  .toggles { display: grid; gap: 2px; }
  .modal { padding: 24px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* wallet popup (wallet.js) */
body .ow-m { background: var(--bg); border: 1px solid var(--text); border-radius: 8px; color: var(--text); font: 14px/1.5 var(--font); }
body .ow-w { background: var(--panel); border-radius: var(--radius); border-color: transparent; color: var(--text); font: 500 15px/1 var(--font); }
body .ow-w:hover { border-color: var(--text); }
body .ow-w em { color: var(--up); }
body .ow-w em, body .ow-f { font-family: var(--font); }
body .ow-x { border-radius: var(--radius); }
body .ow-dd { background: var(--panel); border-radius: var(--radius); border-color: var(--line); }

/* ---- coin page ---- */
.coin-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.coin-head img { width: 64px; height: 64px; object-fit: cover; flex: none; }
.coin-head h1 { font-size: 16px; margin: 0 0 2px; font-weight: 700; color: var(--text); }
.coin-head .row { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.coin-head .row b { color: var(--up); font-weight: 600; }
.coin { display: grid; grid-template-columns: 1fr; gap: 16px; }
.coin-r { display: grid; gap: 14px; align-content: start; grid-row: 1; }
.chart { position: relative; height: 300px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; text-align: center; padding: 12px; }
.sec-h { font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.trades { font-size: 12px; }
.trades table { width: 100%; border-collapse: collapse; }
.trades th { text-align: left; color: var(--muted); font-weight: 400; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.trades td { padding: 8px 4px; border-bottom: 1px solid var(--row); white-space: nowrap; }
.trades .b { color: var(--up); } .trades .s { color: var(--down); }
.trades a:hover { text-decoration: underline; }
.trades .tagx { color: var(--yellow); font-size: 11px; }
/* the trade box: green buy / red sell, the green "place trade" */
.tbox { background: var(--panel); border-radius: 8px; padding: 14px; display: grid; gap: 10px; }
.ttabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ttabs button { height: 40px; border-radius: 4px; background: #1f2937; color: var(--muted); font-weight: 600; }
.ttabs .tb.on { background: var(--green-hi); color: #000; }
.ttabs .ts.on { background: var(--down); color: #000; }
.grad-note { text-align: center; font-size: 13px; color: var(--up); }
.tin { display: flex; align-items: center; background: var(--inset); border: 1px solid #475569; border-radius: var(--radius); }
.tin:focus-within { border-color: var(--text); }
.tin input { flex: 1; min-width: 0; background: none; border: 0; padding: 12px; font-size: 16px; outline: none; }
.tin input::placeholder { color: var(--dim); }
.tin span { padding: 0 12px; color: var(--text); font-size: 13px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { font-size: 12px; padding: 4px 8px; border-radius: 4px; background: var(--bg); color: var(--muted); }
.quick button:hover { background: #111827; color: var(--text); }
.tq { font-size: 12px; min-height: 16px; color: var(--muted); }
.place { height: 44px; border-radius: 4px; background: var(--green-hi); color: #000; font-weight: 600; font-size: 15px; }
.place:hover:not(:disabled) { background: var(--up); }
.place.sell { background: var(--down); color: #000; }
.place:disabled { opacity: .5; cursor: default; }
.info { font-size: 13px; color: var(--muted); display: grid; gap: 4px; word-break: break-word; }
.info .links { display: flex; gap: 10px; flex-wrap: wrap; }
.prog-h { font-size: 14px; margin-bottom: 6px; color: var(--text); }
.bar { height: 14px; background: #374151; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--up); border-radius: 999px; transition: width .4s; }
.bar.kh i { background: var(--yellow); }
.prog p { font-size: 12px; margin: 6px 0 0; color: var(--muted); }
.holders { margin: 0; padding: 0 0 0 22px; font-size: 13px; display: grid; gap: 3px; color: var(--text); }
.holders li span { float: right; }
.holders a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .coin { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
  .coin-r { grid-row: auto; }
  .chart { height: 420px; }
}

/* thread + trades tabs (coin page) */
.ltabs { display: flex; gap: 8px; margin: 14px 0 8px; }
.ltabs button { color: var(--muted); padding: 3px 8px; border-radius: 4px; }
.ltabs button.on { background: var(--up); color: #000; }
.thread { display: grid; gap: 4px; }
.post { background: var(--panel); border-radius: 4px; padding: 6px 8px; font-size: 13px; }
.post .ph { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.post .ph .who { color: #000; background: #a5f3fc; padding: 0 5px; border-radius: 3px; }
.post .ph .dev { color: var(--up); }
.post .ph .snp { color: var(--yellow); }
.post .ph button { color: var(--muted); font-size: 12px; }
.post .ph button:hover { text-decoration: underline; }
.post .ref { color: var(--blue); font-size: 12px; }
.post .bd { white-space: pre-wrap; word-break: break-word; }
.tpost { display: grid; gap: 6px; margin-top: 10px; }
.tpost textarea { width: 100%; min-height: 70px; background: #2a2a3b; border: 1px solid #475569; border-radius: var(--radius); padding: 10px; font-size: 16px; resize: vertical; }
.tpost textarea::placeholder { color: var(--dim); }
.tpost .brk { justify-self: start; }

/* tables elsewhere (rewards ledger) */
.lg th { color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--line); }
.lg td { border-bottom: 1px solid var(--row); }

/* one ticker, one coin (v0.8.0): the original's badge, the warning on a later copy, the create-page hint */
.tag.og { background: none; color: var(--up); border: 1px solid var(--up); }
.copywarn { border: 1px solid var(--down); background: rgba(248, 113, 113, .1); color: var(--text); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; line-height: 1.45; }
.copywarn b { color: var(--down); }
.f .hint.ok { color: var(--up); }
.f .hint.bad { color: var(--down); }

/* ogpump: the line under the nav */
.tagline { text-align: center; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.tagline b { color: var(--up); font-weight: 600; }
.ext { display: block; text-align: center; font-size: 13px; color: var(--muted); }

/* ogpump: the king's pot line */
.potline { text-align: center; margin: -8px auto 16px; font-size: 13px; color: var(--muted); max-width: 560px; }
.potline b { color: var(--yellow); font-weight: 600; }
