/* Brainrot – short videos traded as coins, every coin on its own numbered channel.
   A wall of screens on a pale periwinkle wall: each coin is a dark, slightly rounded CRT screen with its channel number
   in the corner like a TV's on-screen display. Calm white panels, ink type, one hot-pink accent for the main action.
   Tenor Sans for headings, Roboto Flex for text and tabular figures; channel numbers in Roboto Flex, condensed and heavy. */
@font-face { font-family: 'Tenor Sans'; src: url(/fonts/tenor-sans.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Roboto Flex'; src: url(/fonts/roboto-flex.woff2) format('woff2'); font-weight: 400 900; font-stretch: 25% 100%; font-display: swap; }

:root {
  --bg: #e4e2ee;            /* periwinkle wall */
  --surface: #ffffff;
  --raised: #f4f3f8;
  --line: #d3d0e0;
  --line-2: #bcb8cc;
  --ink: #15131c;
  --ink-2: #4d4a5a;
  --ink-3: #7b7889;
  --accent: #d42a6f;        /* rot pink: main action, mark ground */
  --accent-hi: #e03a7d;
  --screen: #0d0c11;        /* tube black behind every video */
  --bezel: #23212a;
  --osd: #f5f3ff;
  --up: #11804e;
  --down: #c4362c;

  --f-head: 'Tenor Sans', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --f-text: 'Roboto Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --t-xs: 12px; --t-sm: 13.5px; --t-md: 15px; --t-lg: 18px; --t-xl: 24px; --t-2xl: 32px; --t-3xl: 60px;
  --r: 12px; --r-s: 8px;
  --header-h: 68px;
  --gutter: 32px;
  --max: 1360px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.5 var(--f-text); -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--f-head); font-weight: 400; letter-spacing: -.01em; }
h3 { font-family: var(--f-text); font-weight: 700; }
.num, .wallet-btn .bal, .amount input, .presets button, .code, .addr, .chn { font-variant-numeric: tabular-nums lining-nums; }
.num { font-weight: 650; }
.up { color: var(--up); } .down { color: var(--down); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tick { font-weight: 700; color: var(--ink-2); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); font-size: var(--t-xs); white-space: nowrap; }
.chg { font-weight: 700; }
/* channel numbers: condensed, heavy, tabular – the TV's on-screen display */
.chn { font-family: var(--f-text); font-stretch: 42%; font-weight: 800; letter-spacing: .02em; line-height: 1; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(228,226,238,.94); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: var(--header-h); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--s-5); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.mark { width: 32px; height: 32px; color: var(--ink); }
.word { font: 400 29px/1 var(--f-head); letter-spacing: -.02em; padding-bottom: 2px; }
.nav { display: flex; gap: 2px; margin-left: var(--s-2); }
.nav a { font-weight: 650; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: rgba(21,19,28,.05); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.tune { flex: 0 1 320px; min-width: 200px; margin: 0; }
.tune label { position: relative; display: block; }
.tune .ch { position: absolute; left: 6px; top: 6px; height: 28px; padding: 0 7px; border-radius: 6px; background: var(--screen); color: var(--osd); display: grid; place-items: center; font: 800 14px/1 var(--f-text); font-stretch: 42%; letter-spacing: .04em; }
.tune input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px 0 48px; outline: none; font-size: 14px; }
.tune input::placeholder { color: var(--ink-3); }
.tune input:focus { border-color: var(--ink-3); }
.spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px; border: 0;
  font: 700 15px/1 var(--f-text); white-space: nowrap; transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.16), 0 1px 0 rgba(21,19,28,.2); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-dark, .btn-light { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(21,19,28,.25); }
.btn-dark:hover, .btn-light:hover { background: #2b2834; }
.btn-line, .btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 rgba(21,19,28,.06); }
.btn-line:hover, .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-3), 0 1px 0 rgba(21,19,28,.06); }
.btn-buy { background: var(--up); color: #fff; box-shadow: 0 1px 0 rgba(21,19,28,.2); }
.btn-buy:hover { background: #0d6c42; }
.btn-sell { background: var(--down); color: #fff; box-shadow: 0 1px 0 rgba(21,19,28,.2); }
.btn-sell:hover { background: #a92e25; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn-big { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-s { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.wallet-btn .addr { color: #b6b2c4; font-weight: 600; margin-left: 2px; font-size: 14px; }
.btn-ghost.wallet-btn { background: var(--surface); color: var(--ink); }
.btn-ghost.wallet-btn .addr { color: var(--ink-3); }

main { padding: 0 var(--gutter) 96px; max-width: var(--max); margin: 0 auto; }

/* ---------- screens: every video sits in a dark CRT screen ---------- */
.screen { position: relative; background: var(--bezel); padding: 6px; border-radius: 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 22px 40px -30px rgba(21,19,28,.7); }
.screen .shot { border-radius: 14px / 16px; aspect-ratio: 9 / 16; }
.screen .shot::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,0) 38%), radial-gradient(120% 90% at 50% 50%, rgba(0,0,0,0) 62%, rgba(0,0,0,.38)); }
.osd { position: absolute; z-index: 3; left: 12px; top: 12px; color: var(--osd); font-size: 21px; padding: 4px 7px 3px; border-radius: 6px; background: rgba(13,12,17,.62); pointer-events: none; }
.osd small { font-size: .62em; margin-right: .18em; opacity: .85; }
.osd-r { left: auto; right: 16px; font-size: 18px; }

/* ---------- wall (home) ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: var(--s-7); align-items: center; padding: 52px 0 8px; }
.hero-text h1 { font-size: var(--t-3xl); line-height: 1.02; margin: 0 0 20px; }
.hero-text p { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0 0 28px; max-width: 54ch; }
.hero-act { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-keys { margin: 18px 0 0; color: var(--ink-3); font-size: var(--t-sm); }
.hero-keys kbd { font: 800 13px/1 var(--f-text); font-stretch: 42%; background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; color: var(--ink); }
.hero-feat:empty { display: none; }

.onnow { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: center; }
.onnow .body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; align-self: stretch; }
.on-label { margin: 0; font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); }
.on-ch { font-size: 44px; color: var(--ink); }
.on-name { font: 400 28px/1.08 var(--f-head); margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
a.on-name:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.on-sub { display: flex; gap: 12px; align-items: center; margin: 0; flex-wrap: wrap; font-size: var(--t-sm); color: var(--ink-2); }
.on-data { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.on-act { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; align-items: center; flex-wrap: wrap; }
.on-act .btn { flex: 1 1 auto; }
.onnow.trendfeat .on-act .btn { flex: 0 0 auto; }

.sec { margin-top: 52px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--t-2xl); line-height: 1.05; margin: 0; }
.sec-note { color: var(--ink-3); font-size: var(--t-sm); font-weight: 600; }
.sec-link { margin-left: auto; font-size: var(--t-sm); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
#trend:empty, #wallsec:empty { display: none; }
.sorts { margin-left: auto; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.sorts button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 7px; font-weight: 700; font-size: 14px; color: var(--ink-3); }
.sorts button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* the wall of screens */
.wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 26px 20px; }
.tv { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tv > a.screen, .tv > div.screen { display: block; }
.tv-cap { display: grid; gap: 4px; padding: 0 4px; }
.tv-name { margin: 0; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.tv-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.tv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--t-sm); min-width: 0; }
.tv-row .mc { font-size: var(--t-lg); font-weight: 700; }
.tv .by .v { margin-left: auto; color: var(--ink); font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.tv-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.tv-act .watch { font-size: var(--t-sm); }

.by { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: var(--t-sm); min-width: 0; }
.by svg { width: 15px; height: 15px; flex: none; }
.by > span, .by > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.by a, .creator h3 a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

dt { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
dd { margin: 0; font-weight: 700; }
dd.big, .big { font-size: 26px; line-height: 1.05; font-weight: 700; letter-spacing: -.01em; }
.curve-row { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.cbar { flex: 1; height: 6px; border-radius: 3px; background: #e9e7f1; overflow: hidden; min-width: 40px; }
.cbar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }

/* channel guide (table) */
.tbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rows { list-style: none; margin: 0; padding: 0; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 16px 0 0; border-top: 1px solid var(--line); }
.trow:hover { background: #faf9fd; }
.row-link, .row-h { display: grid; grid-template-columns: 58px 36px minmax(0, 1fr) 92px 66px 96px 112px 40px; align-items: center; gap: 14px; padding: 10px 0 10px 16px; }
.row-h { grid-template-columns: 58px 36px minmax(0, 1fr) 92px 66px 96px 112px 40px 84px; padding: 10px 16px 10px 16px; font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); }
.row-h > span:nth-child(n+4):nth-child(-n+6), .row-h > span:nth-child(8) { text-align: right; }
.r-ch { display: grid; place-items: center; height: 30px; border-radius: 7px; background: var(--screen); color: var(--osd); font-size: 17px; }
.thumb { width: 36px; height: 50px; border-radius: 5px; overflow: hidden; background: var(--screen); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-name { display: grid; gap: 2px; min-width: 0; }
.row-name b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name > span { display: flex; gap: 10px; min-width: 0; font-size: var(--t-sm); }
.row-name em { font-style: normal; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name em.tick { color: var(--ink-2); flex: none; }
.r-mc { font-weight: 700; text-align: right; font-size: 16px; }
.r-chg, .r-vol, .r-age { text-align: right; }
.r-vol { color: var(--ink-2); font-weight: 600; }
.r-age { color: var(--ink-3); font-weight: 600; font-size: var(--t-sm); }
.r-curve { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); }
.trow .btn-s { width: 84px; }

.empty-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 44px 24px; text-align: center; color: var(--ink-2); }
.empty-panel h2, .empty-panel h3 { font: 400 26px/1.1 var(--f-head); color: var(--ink); margin: 0 0 8px; }
.empty-panel p { margin: 0 0 18px; }
.empty { padding: 80px 0; text-align: center; color: var(--ink-2); }
.empty h2 { font-size: var(--t-2xl); color: var(--ink); margin: 0 0 8px; }
.empty .btn { margin-top: 16px; }

.page-head { padding: 52px 0 24px; max-width: 760px; }
.page-head h1 { font-size: 50px; line-height: 1.02; margin: 0 0 12px; }
.page-head p { color: var(--ink-2); font-size: 17px; margin: 0; }

/* ---------- video shots (official players) ---------- */
.shot { position: relative; background: var(--screen); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.shot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .35s ease; }
.shot.live iframe { opacity: 1; }
.shot .catch { position: absolute; inset: 0; z-index: 2; }
.shot .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); }
.shot .noimg svg { width: 40px; height: 40px; }
.sound { position: absolute; z-index: 3; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(13,12,17,.72); color: #fff; display: grid; place-items: center; }
.sound svg { width: 17px; height: 17px; }
.bar { height: 6px; border-radius: 3px; background: #e9e7f1; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.flash { animation: flash 1.1s ease; }
@keyframes flash { 0% { background-color: #f9d9e6; } 100% { background-color: transparent; } }
.ext-i { width: 10px; height: 10px; margin-left: 4px; vertical-align: 0; flex: none; }
.watch { display: inline-flex; align-items: center; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* tune overlay (type a number anywhere) */
.osd-tune { position: fixed; z-index: 60; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: calc(var(--header-h) + 16px); background: var(--screen); color: var(--osd); border-radius: 12px; padding: 12px 18px 10px; font: 800 44px/1 var(--f-text); font-stretch: 42%; letter-spacing: .04em; box-shadow: 0 20px 40px -20px rgba(13,12,17,.7); font-variant-numeric: tabular-nums; }
.osd-tune small { font-size: 22px; margin-right: 8px; opacity: .8; }
.osd-tune .miss { display: block; font: 600 13px/1.3 var(--f-text); letter-spacing: 0; margin-top: 6px; color: #c9c5d8; }

/* ---------- surf (feed) ---------- */
body.feed-on { background: #dddbe8; }
body.feed-on main { padding: 0; max-width: none; }
.feed { height: calc(100dvh - var(--header-h) - 1px); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed .empty-panel { max-width: 520px; margin: 64px auto; }
.slide { position: relative; height: calc(100dvh - var(--header-h) - 1px); scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-7); padding: 20px var(--gutter); overflow: hidden; }
.slide .gate { grid-column: 2; height: calc(100dvh - var(--header-h) - 40px); width: auto; }
.gate { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - 2 * var(--gutter)); background: var(--screen); border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 6px var(--bezel), 0 30px 60px -36px rgba(21,19,28,.7); }
.gate .shot { height: 100%; width: 100%; }
.slide-ch { grid-column: 1; justify-self: end; align-self: start; margin-top: 8px; text-align: right; }
.slide-ch .chn { font-size: 84px; color: var(--ink); display: block; }
.slide-ch span { color: var(--ink-3); font-size: var(--t-sm); font-weight: 600; }
.slide-info { grid-column: 3; align-self: end; max-width: 360px; padding: 20px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.slide-info .name { font-size: 28px; line-height: 1.08; margin: 6px 0 16px; overflow-wrap: anywhere; }
.slide-info .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0 0 18px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick .btn { height: 42px; padding: 0 14px; }
.slide-info .by { margin-top: 16px; flex-wrap: wrap; }
.overlay-info { display: none; }
.feed-hint { position: fixed; left: var(--gutter); bottom: var(--gutter); color: var(--ink-3); font-size: var(--t-sm); max-width: 300px; }

/* ---------- coin page ---------- */
.chbar { display: flex; align-items: center; gap: 12px; padding-top: 24px; }
.chbar .here { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink-3); font-size: var(--t-sm); font-weight: 600; }
.chbar a { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: var(--t-sm); max-width: 280px; min-width: 0; }
.chbar a:hover { border-color: var(--ink-3); }
.chbar a .r-ch { height: 26px; padding: 0 6px; font-size: 15px; flex: none; }
.chbar a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chbar a.next { padding: 0 8px 0 14px; }
.coin { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; padding-top: 16px; }
.coin .gate { height: auto; width: 100%; aspect-ratio: 9 / 16; max-width: 354px; position: sticky; top: calc(var(--header-h) + 24px); margin: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.coin-head { padding: var(--s-5); display: flex; gap: var(--s-5); align-items: flex-end; flex-wrap: wrap; justify-content: space-between; }
.ch-name { flex: 1 1 240px; min-width: 0; display: grid; gap: 6px; }
.ch-name .line1 { display: flex; align-items: baseline; gap: 12px; }
.ch-name .chn { font-size: 26px; color: var(--accent); }
.coin-head h1 { font-size: 40px; line-height: 1.02; margin: 0; overflow-wrap: anywhere; }
.ch-data { display: flex; gap: 28px; margin: 0; }
.ch-data dd { font-size: var(--t-lg); }
.chart-wrap { padding: 0 var(--s-3) var(--s-3); }
.tfs { display: flex; gap: 4px; padding: 0 var(--s-4) var(--s-2); }
.tfs button { border: 0; background: transparent; padding: 7px 11px; border-radius: 7px; font-weight: 700; font-size: 14px; color: var(--ink-3); }
.tfs button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
#chart { height: 340px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 var(--s-4); }
.tabs button { border: 0; background: none; padding: 14px 12px 12px; font-weight: 700; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tabbody { padding: var(--s-4) var(--s-5) var(--s-5); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.list li:last-child { border-bottom: 0; }
.addr { font-size: var(--t-sm); color: var(--ink-2); }
.list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; margin-bottom: var(--s-3); }
.comment-form input { flex: 1; min-width: 0; height: 42px; border-radius: 10px; border: 1px solid var(--line); padding: 0 14px; background: var(--raised); outline: none; }
.comment-form input:focus { border-color: var(--ink-3); background: var(--surface); }

.trade { padding: var(--s-4); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; height: 40px; border-radius: 7px; background: transparent; font-weight: 700; color: var(--ink-2); }
.seg button[aria-pressed="true"].b { background: var(--up); color: #fff; }
.seg button[aria-pressed="true"].s { background: var(--down); color: #fff; }
.amount { margin: var(--s-4) 0 var(--s-2); position: relative; }
.amount input { width: 100%; height: 54px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); padding: 0 64px 0 16px; font-size: 22px; font-weight: 700; outline: none; }
.amount input:focus { border-color: var(--ink-3); background: var(--surface); }
.amount span { position: absolute; right: 16px; top: 17px; font-weight: 700; color: var(--ink-2); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.presets button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; height: 32px; padding: 0 10px; font-weight: 700; font-size: 14px; }
.presets button:hover { border-color: var(--ink-3); }
.receive { font-size: var(--t-sm); color: var(--ink-2); min-height: 20px; margin-bottom: var(--s-3); }
.trade .btn { width: 100%; height: 50px; font-size: var(--t-lg); }
.feeline { margin: 10px 0 0; font-size: var(--t-xs); color: var(--ink-3); text-align: center; }
.curve { margin-top: var(--s-5); font-size: var(--t-sm); color: var(--ink-2); }
.curve .bar { height: 8px; border-radius: 4px; margin: 8px 0 6px; }
.creator { margin-top: var(--s-4); padding: var(--s-4); }
.creator h3 { margin: 0 0 6px; font-size: var(--t-md); }
.creator p { margin: 0 0 var(--s-3); color: var(--ink-2); font-size: var(--t-sm); }
.creator .links { display: flex; gap: 8px; flex-wrap: wrap; }
.creator .addr { overflow-wrap: anywhere; line-height: 1.4; }
.creator .btn { height: 36px; font-size: var(--t-sm); padding: 0 12px; border-radius: 8px; }
.removed { display: grid; place-items: center; height: 100%; color: #b6b2c4; font-size: var(--t-sm); text-align: center; padding: 20px; }

/* ---------- launch ---------- */
.launch { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-7); align-items: start; padding-top: 40px; }
.launch form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px 24px; }
.launch h1 { font-size: 44px; line-height: 1; margin: 0 0 var(--s-2); }
.launch .next-ch { margin: 0 0 var(--s-5); color: var(--ink-2); font-size: var(--t-sm); }
.launch .next-ch .chn { font-size: 18px; color: var(--ink); }
.field { display: block; margin-bottom: var(--s-4); }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.field small { color: var(--ink-3); font-weight: 500; }
.field input, .field textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); padding: 0 14px; height: 50px; outline: none; font-size: 16px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field textarea { height: 92px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink-3); background: var(--surface); }
.paste { position: relative; }
.paste input { height: 58px; font-size: 17px; padding-right: 104px; }
.paste .btn { position: absolute; right: 8px; top: 8px; height: 42px; }
.platforms { display: flex; gap: 14px; color: var(--ink-3); font-size: var(--t-sm); margin-top: 8px; align-items: center; flex-wrap: wrap; }
.platforms span { display: inline-flex; gap: 6px; align-items: center; }
.platforms span.on { color: var(--ink); font-weight: 700; }
.platforms svg { width: 16px; height: 16px; }
.two { display: grid; grid-template-columns: 1fr 160px; gap: var(--s-3); }
.launch .gate { height: auto; width: calc(100% - 12px); margin: 6px; aspect-ratio: 9 / 16; position: sticky; top: calc(var(--header-h) + 24px); }
.launch .gate .blank { display: grid; place-items: center; height: 100%; color: #8e8a9c; font-size: 14px; text-align: center; padding: 24px; }
.msg { min-height: 22px; font-size: var(--t-sm); margin: 6px 0 var(--s-3); color: var(--ink-2); }
.msg.err { color: var(--down); }
.msg a { text-decoration: underline; }
.fine { color: var(--ink-3); font-size: var(--t-xs); margin: var(--s-4) 0 0; line-height: 1.6; }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -24px rgba(21,19,28,.45); }
dialog::backdrop { background: rgba(21,19,28,.45); }
.dlg { padding: var(--s-5); }
.dlg h2 { font-size: 28px; line-height: 1.05; margin: 0 0 var(--s-3); }
.dlg p { color: var(--ink-2); margin: 0 0 var(--s-4); font-size: var(--t-sm); }
.dlg .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: var(--s-4); flex-wrap: wrap; }
.wallets { display: grid; gap: 8px; }
.wallets button { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; text-align: left; }
.wallets button:hover { border-color: var(--ink-3); }
.wallets img { width: 28px; height: 28px; border-radius: 8px; }
.wallets > a.btn { display: flex; justify-content: center; margin-top: 8px; width: 100%; }
.code { font-size: 22px; font-weight: 700; background: var(--raised); border: 1px dashed var(--line-2); padding: 16px; border-radius: 10px; text-align: center; letter-spacing: .03em; user-select: all; }
.radio { display: grid; gap: 6px; margin-bottom: var(--s-3); }
.radio label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: var(--t-sm); }
.radio input { accent-color: var(--ink); }
.dlg textarea, .dlg input[type=text] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--raised); margin-bottom: 8px; outline: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 100; box-shadow: 0 14px 30px -12px rgba(21,19,28,.5); max-width: calc(100vw - 24px); }
.toast.good b { color: #ff9cc3; }
.foot { margin-top: 72px; padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-xs); display: flex; gap: var(--s-4); flex-wrap: wrap; justify-content: space-between; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }
body.feed-on .foot { display: none; }
.mobile-nav { display: none; }
.short-l { display: none; }

/* CA strip (only when the coin exists) */
.castrip { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 36px; padding: 6px var(--gutter); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.castrip .live { color: #ff9cc3; }
.castrip .ca { border: 1px solid rgba(255,255,255,.3); background: transparent; color: inherit; font: inherit; padding: 4px 8px; border-radius: 6px; display: inline-flex; gap: 10px; cursor: pointer; font-variant-numeric: tabular-nums; }
.castrip .ca b { color: #ff9cc3; }
.castrip .ca .short { display: none; }
.castrip a { text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; }
.castrip .bb { font-weight: 500; color: #cfcbdc; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .r-curve, .row-h > span:nth-child(7) { display: none; }
  .row-link { grid-template-columns: 58px 36px minmax(0, 1fr) 92px 66px 96px 40px; }
  .row-h { grid-template-columns: 58px 36px minmax(0, 1fr) 92px 66px 96px 40px 84px; }
}
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .hero-feat { max-width: 640px; }
  .coin { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .coin .side { grid-column: 2; }
  .tune { flex-basis: 240px; min-width: 160px; }
  .slide-ch { display: none; }
}
@media (max-width: 960px) { .tune { display: none; } }
@media (max-width: 860px) {
  :root { --header-h: 60px; --gutter: 16px; }
  .top-in { gap: 10px; }
  .mark { width: 28px; height: 28px; }
  .word { font-size: 25px; }
  .nav { display: none; }
  .top-in .btn { height: 38px; padding: 0 13px; font-size: 14px; }
  .top-in .launch-btn .long { display: none; }
  .top-in .launch-btn .short-l { display: inline; }
  .wallet-btn .addr { display: none; }
  .hero { padding-top: 28px; gap: 24px; }
  .hero-text h1 { font-size: 40px; }
  .hero-text p { font-size: 16px; margin-bottom: 20px; }
  .hero-act .btn { flex: 1 1 auto; height: 46px; padding: 0 16px; font-size: 15px; }
  .hero-keys { display: none; }
  .onnow { grid-template-columns: 138px minmax(0, 1fr); gap: 12px; align-items: start; }
  .onnow .screen { padding: 4px; border-radius: 14px; }
  .onnow .screen .shot { border-radius: 10px / 12px; }
  .onnow .osd { left: 8px; top: 8px; font-size: 15px; }
  .onnow .body { padding: 14px; gap: 6px; border-radius: 14px; }
  .on-ch { font-size: 30px; }
  .on-name { font-size: 20px; -webkit-line-clamp: 2; }
  .on-data { gap: 10px 12px; padding-top: 10px; margin-top: 2px; }
  .on-data dd.big { font-size: 20px; }
  .on-data > div:nth-child(n+3) { display: none; }
  .on-act .btn { height: 38px; font-size: 13px; padding: 0 10px; }
  .sec { margin-top: 36px; }
  .sec-head h2 { font-size: 26px; }
  .sec-note { display: none; }
  .sorts { margin-left: 0; width: 100%; }
  .sorts button { flex: 1; padding: 0 6px; }
  .row-h { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .trow .btn-s { display: none; }
  .row-link { grid-template-columns: 50px 36px minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; }
  .row-link .r-ch { grid-row: 1 / span 2; }
  .r-vol, .r-age { display: none; }
  .row-link .thumb { grid-row: 1 / span 2; }
  .row-link .row-name { grid-row: 1 / span 2; }
  .r-mc { grid-column: 4; grid-row: 1; font-size: 15px; }
  .r-chg { grid-column: 4; grid-row: 2; font-size: 14px; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .screen { padding: 4px; border-radius: 15px; }
  .screen .shot { border-radius: 11px / 13px; }
  .osd { left: 8px; top: 8px; font-size: 16px; padding: 3px 6px 2px; }
  .osd-r { right: 11px; font-size: 14px; }
  .tv-name { font-size: 14px; }
  .tv-row .mc { font-size: 16px; }
  .tv .by .v { display: none; }
  .tv-act .btn { flex: 1; }
  .tv-act .watch { display: none; }
  .page-head { padding: 28px 0 18px; }
  .page-head h1 { font-size: 36px; }
  .page-head p { font-size: 15px; }
  .chbar { padding-top: 14px; gap: 8px; }
  .chbar .here { display: none; }
  .chbar a { flex: 1 1 0; max-width: none; }
  .chbar a.next { justify-content: flex-end; }
  .coin { grid-template-columns: 1fr; gap: var(--s-3); padding-top: 12px; }
  .coin .mid { display: contents; }
  .coin .gate { order: 1; position: relative; top: 0; max-width: calc(100% - 12px); height: min(58dvh, 560px); width: auto; margin: 6px auto; }
  .coin .p-chart { order: 2; } .coin .side { order: 3; } .coin .p-tabs { order: 4; margin-top: 0 !important; }
  .coin .side { grid-column: 1; }
  .coin-head { padding: var(--s-4); gap: var(--s-4); }
  .coin-head h1 { font-size: 30px; }
  .ch-data { gap: 20px; flex-wrap: wrap; }
  .launch { grid-template-columns: 1fr; gap: var(--s-5); padding-top: 16px; }
  .launch form { padding: 20px 16px; }
  .launch h1 { font-size: 34px; }
  .launch .gate { position: relative; top: 0; width: 60%; margin: 6px auto; order: -1; }
  .launch .gate:has(.blank) { display: none; }
  .two { grid-template-columns: 1fr 120px; }
  .slide { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .feed .gate { grid-column: 1; height: 100%; width: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .slide-info { display: none; }
  .overlay-info { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 70px 16px 16px; background: linear-gradient(transparent, rgba(13,12,17,.92)); color: #fff; }
  .overlay-info .name { font: 400 24px/1.08 var(--f-head); margin: 0; overflow-wrap: anywhere; }
  .overlay-info .meta { display: flex; gap: 12px; align-items: baseline; font-size: var(--t-sm); margin: 6px 0 12px; flex-wrap: wrap; }
  .overlay-info .meta .num { font-weight: 700; }
  .overlay-info .meta .up { color: #4fd49a; } .overlay-info .meta .down { color: #ff8a7d; }
  .overlay-info .meta .src { color: #fff; text-decoration: underline; text-underline-offset: 3px; position: relative; z-index: 4; }
  .overlay-info .nocoin { color: #cfcbdc; font-size: 12px; }
  .overlay-info .quick .btn { height: 42px; padding: 0 12px; flex: 1; }
  .overlay-info .quick .btn-line { flex: 0 0 auto; }
  .gate .sound { bottom: auto; top: 12px; right: 12px; }
  .feed-hint { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 4px; }
  .mobile-nav a svg { width: 22px; height: 22px; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); }
  body.feed-on .feed, body.feed-on .slide { height: calc(100dvh - var(--header-h) - 1px - 62px - env(safe-area-inset-bottom)); }
  .castrip { gap: 10px; padding: 6px 12px; font-size: 12px; }
  .castrip .ca .full, .castrip .bb { display: none; }
  .castrip .ca .short { display: inline; }
  .osd-tune { top: calc(var(--header-h) + 10px); font-size: 36px; }
  .guide-tune { display: block !important; }
}
@media (max-width: 400px) {
  .onnow { grid-template-columns: 122px minmax(0, 1fr); }
  .top-in .btn { padding: 0 11px; }
  .hero-text h1 { font-size: 36px; }
}
.guide-tune { display: none; margin: 0 0 16px; max-width: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 860px) { .toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }
