:root {
  --bg: #08080b;
  --panel: #131219;
  --panel-2: #1a1922;
  --panel-3: #22212c;
  --line: #24232d;
  --line-2: #33313e;
  --text: #f4f2f7;
  --muted: #a19eac;
  --dim: #6d6a78;
  --o: #ff9028;
  --p: #e7588b;
  --v: #b35bc5;
  --grad: linear-gradient(90deg, var(--o), var(--p) 52%, var(--v));
  --up: #3ddc84;
  --down: #ff5f6d;
  --side: 244px;
  --r: 18px;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 'DM Sans', system-ui, -apple-system, sans-serif; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
canvas { display: block; }
svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.xs { width: 14px; height: 14px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.hide { display: none !important; }
::selection { background: rgba(231, 88, 139, .4); }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

/* ---------- shell ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; gap: 22px; padding: 26px 12px 18px;
  border-right: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 12px; }
.brand img { width: 34px; height: 34px; }
.brand span { font-weight: 800; font-size: 25px; letter-spacing: -.05em; line-height: 1; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 12px; border-radius: 12px;
  font-size: 15px; font-weight: 500; color: var(--text); text-align: left; position: relative;
}
.nav a:hover, .nav button:hover { background: var(--panel); }
.nav a.on { font-weight: 800; }
.nav a.on svg.i { stroke-width: 2.4; }
.nav .badge { position: absolute; left: 30px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 2px var(--bg); }
.nav .nav-create svg.i { color: var(--o); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-foot .x { font-family: var(--mono); font-size: 12px; color: var(--dim); padding: 0 12px; }
.side-foot .x:hover { color: var(--muted); }
.demo-tag { font-family: var(--mono); font-size: 11px; color: var(--dim); padding: 0 12px; line-height: 1.5; }
.demo-tag b { color: var(--o); font-weight: 500; }

.topbar, .tabbar { display: none; }
.view { margin-left: var(--side); min-height: 100vh; min-height: 100dvh; }

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 11px; font-weight: 700; font-size: 14px; white-space: nowrap; background: var(--panel-2); border: 1px solid var(--line-2);
  transition: filter .15s, background .15s;
}
.btn:hover { background: var(--panel-3); }
.btn.g { background: var(--grad); border: 0; color: #fff; }
.btn.g:hover { filter: brightness(1.08); }
.btn.lg { height: 50px; font-size: 16px; border-radius: 13px; padding: 0 22px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.on { background: var(--panel); color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap;
}
.chip.t { background: var(--grad); color: #fff; border: 0; font-family: var(--mono); font-weight: 500; }
.tick { font-family: var(--mono); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line-2);
  outline: none; transition: border-color .15s;
}
textarea.input { height: auto; min-height: 76px; padding: 11px 14px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--p); }
.input-pre { position: relative; }
.input-pre > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-pre > .input { padding-left: 30px; }
.hint { font-size: 12px; color: var(--dim); }
.hint.err { color: var(--down); }
.hint.ok { color: var(--up); }

/* avatar with the gradient story ring */
.av { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative; display: block; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.av.ring { padding: calc(var(--s) * .055); background: var(--grad); }
.av.ring img { border: calc(var(--s) * .045) solid var(--bg); }
.av.seen { padding: calc(var(--s) * .04); background: var(--line-2); }
.av.seen img { border: calc(var(--s) * .05) solid var(--bg); }
.wav { --s: 34px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; font-size: calc(var(--s) * .52); line-height: 1; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--p); text-transform: uppercase; }
.h-xl { font-size: clamp(36px, 4.4vw, 56px); line-height: .98; letter-spacing: -.055em; font-weight: 800; margin: 10px 0 14px; }
.h-l { font-size: 28px; line-height: 1.05; letter-spacing: -.045em; font-weight: 800; margin: 0; }
.lede { color: var(--muted); font-size: 16px; margin: 0; max-width: 34ch; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-h h3 { margin: 0; font-size: 12px; font-family: var(--mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sec-h a, .sec-h button { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sec-h a:hover, .sec-h button:hover { color: var(--text); }
.empty { padding: 34px 18px; text-align: center; color: var(--dim); font-size: 14px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); }
.seg button { height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--panel-3); color: var(--text); }
.prog { height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.skel { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 500px) 320px; gap: 64px; justify-content: center; padding: 28px 28px 80px; }
.pitch { overflow: hidden; margin-bottom: 22px; position: relative; }
.pitch img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.pitch .body { padding: 16px 18px 18px; }
.pitch h1 { font-size: 21px; line-height: 1.12; letter-spacing: -.035em; margin: 0 0 8px; font-weight: 800; }
.pitch p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.pitch .x-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 70px; flex: none; }
.story span { font-size: 12px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.feed-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.feed-tabs button { height: 42px; font-weight: 600; color: var(--dim); position: relative; }
.feed-tabs button.on { color: var(--text); }
.feed-tabs button.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }

.post { padding: 14px 0 22px; border-bottom: 1px solid var(--line); }
.post-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-h .who { min-width: 0; flex: 1; line-height: 1.2; }
.post-h .who a { font-weight: 700; font-size: 14px; }
.post-h .who div { font-size: 12.5px; color: var(--dim); }
.post-h .mc { text-align: right; font-size: 12.5px; line-height: 1.25; }
.post-h .mc b { display: block; font-size: 13.5px; }
.media { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); aspect-ratio: 4 / 5; cursor: pointer; }
.media canvas { width: 100%; height: 100%; }
.media .bar { position: absolute; left: 10px; right: 10px; top: 10px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.media .bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.media .kind { position: absolute; right: 10px; top: 20px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.acts { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.acts > button { display: grid; place-items: center; }
.acts > button:hover { color: var(--muted); }
.acts .grow { flex: 1; }
.liked svg.i { fill: var(--p); stroke: var(--p); }
.likes { font-weight: 700; font-size: 14px; }
.cap { margin: 4px 0; font-size: 14px; }
.cap a { font-weight: 700; margin-right: 5px; }
.post .more { font-size: 13.5px; color: var(--dim); }
.post .aud { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.feed-end { padding: 30px 0; text-align: center; color: var(--dim); font-size: 13px; }

.rail { display: flex; flex-direction: column; gap: 26px; padding-top: 6px; }
.rail .list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 11px; padding: 8px 0; min-width: 0; }
.row .nm { min-width: 0; flex: 1; line-height: 1.25; }
.row .nm b { font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm span { font-size: 12.5px; color: var(--dim); }
.row .rt { text-align: right; font-size: 13px; line-height: 1.25; }
.row .rt span { font-size: 12px; }
.rank { font-family: var(--mono); font-size: 12.5px; color: var(--p); width: 22px; }
.trend { font-family: var(--mono); font-size: 11.5px; color: var(--up); }
.rail-foot { font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rail-foot a:hover { color: var(--muted); }

/* notifications look (live list + panel) */
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.note + .note { margin-top: 8px; }
.note .tx { flex: 1; min-width: 0; line-height: 1.3; }
.note .tx b { display: block; font-size: 14px; font-weight: 700; }
.note .tx span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note time { font-size: 11.5px; color: var(--dim); align-self: flex-start; }
.note .bolt { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #2b2410; color: #ffd23f; flex: none; }
.note.new { border-color: var(--line-2); }

/* ---------- reels viewer ---------- */
.reels { height: 100vh; height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.reels::-webkit-scrollbar { display: none; }
.reel-slot { height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px 0; }
.reel-card { position: relative; height: 100%; max-height: 900px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.reel-card canvas { width: 100%; height: 100%; }
.r-top { position: absolute; left: 0; right: 0; top: 0; padding: 12px 14px; }
.r-top .bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; margin-bottom: 12px; }
.r-top .bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.r-who { display: flex; align-items: center; gap: 9px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.r-who b { font-size: 14px; display: block; line-height: 1.15; }
.r-who span { font-size: 12px; opacity: .8; }
.r-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.r-bot p { margin: 0 0 6px; font-weight: 600; font-size: 15px; max-width: 86%; }
.r-bot .aud { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .9; margin-bottom: 10px; }
.r-bot .pills { display: flex; gap: 8px; align-items: center; }
.r-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .9); font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: #fff; }
.r-pill.mc { border-color: transparent; background: rgba(0, 0, 0, .4); }
.r-acts { display: flex; flex-direction: column; gap: 18px; align-items: center; align-self: flex-end; padding-bottom: 10px; }
.r-acts button, .r-acts a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.r-acts .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; }
.r-acts .ic:hover { background: var(--panel-3); }
.r-acts .buy .ic { background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; }
.reels-hint { position: fixed; right: 26px; bottom: 26px; display: flex; flex-direction: column; gap: 8px; }
.reels-hint button { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; }

/* ---------- pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 34px 32px 90px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-h h1 { margin: 0; font-size: 34px; letter-spacing: -.05em; line-height: 1; font-weight: 800; }
.page-h p { margin: 6px 0 0; color: var(--muted); }
.search { position: relative; width: 280px; max-width: 100%; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search .input { padding-left: 38px; background: var(--panel); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
.cc { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.cc:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cc-top { display: flex; align-items: center; gap: 12px; }
.cc-top .nm { flex: 1; min-width: 0; line-height: 1.2; }
.cc-top .nm b { display: block; font-size: 16px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-top .nm span { font-size: 13px; color: var(--dim); }
.cc-top .chg { font-family: var(--mono); font-size: 12.5px; }
.cc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cc p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.cc .spark { height: 44px; width: 100%; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-stats div { line-height: 1.2; }
.cc-stats span { display: block; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.cc-stats b { font-size: 15px; }
.cc .prog-l { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); font-family: var(--mono); margin-bottom: 6px; }

/* ---------- coin profile ---------- */
.c-head { display: grid; grid-template-columns: 170px 1fr; gap: 34px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.c-head .av { justify-self: center; }
.c-l1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.c-l1 h1 { margin: 0 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.c-stats { display: flex; gap: 28px; margin-bottom: 14px; font-size: 15px; }
.c-stats b { font-weight: 800; }
.c-name { font-weight: 800; font-size: 16px; margin-bottom: 6px; letter-spacing: -.02em; }
.c-bio { margin: 8px 0 10px; max-width: 56ch; }
.c-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; color: var(--muted); }
.c-meta button, .c-meta a { display: inline-flex; align-items: center; gap: 6px; }
.c-meta button:hover, .c-meta a:hover { color: var(--text); }
.c-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.c-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.mkt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.mkt div { background: var(--panel); padding: 13px 16px; line-height: 1.25; }
.mkt span { display: block; font-size: 11.5px; color: var(--dim); font-family: var(--mono); margin-bottom: 3px; }
.mkt b { font-size: 18px; letter-spacing: -.02em; }
.chart-box { padding: 14px 16px 10px; margin-bottom: 14px; }
.chart-box .tb { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; flex-wrap: wrap; }
.chart-box canvas { width: 100%; height: 300px; }
.tabs { display: flex; gap: 28px; border-top: 1px solid var(--line); justify-content: center; margin-top: 6px; }
.tabs button { height: 50px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); position: relative; }
.tabs button.on { color: var(--text); }
.tabs button.on::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1.5px; background: var(--text); }
.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rtile { position: relative; aspect-ratio: 9 / 16; background: var(--panel); overflow: hidden; border-radius: 4px; cursor: pointer; }
.rtile canvas { width: 100%; height: 100%; }
.rtile .meta { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 10px; font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.rtile .meta span { display: inline-flex; align-items: center; gap: 4px; }
.rtile .kind { position: absolute; right: 8px; top: 8px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--dim); font-family: var(--mono); font-size: 11.5px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.hbar { height: 4px; border-radius: 4px; background: var(--panel-3); margin-top: 5px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--grad); }
.trade { padding: 16px; }
.trade .seg { width: 100%; margin-bottom: 14px; }
.trade .seg button { flex: 1; }
.trade .seg button.on.buy { background: rgba(61, 220, 132, .14); color: var(--up); }
.trade .seg button.on.sell { background: rgba(255, 95, 109, .14); color: var(--down); }
.presets { display: flex; gap: 6px; margin: 10px 0 12px; }
.presets button { flex: 1; height: 32px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; }
.presets button:hover { background: var(--panel-3); }
.quote { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.quote div { display: flex; justify-content: space-between; }
.quote b { color: var(--text); font-weight: 600; }
.bond { padding: 16px; }
.bond .l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.bond p { margin: 9px 0 0; font-size: 12.5px; color: var(--dim); }
.creator-box { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.creator-box p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- create ---------- */
.create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 64px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 48px 36px 90px; min-height: 100vh; min-height: 100dvh; position: relative; }
.create::before { content: ''; position: absolute; right: 8%; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); background: radial-gradient(closest-side, rgba(179, 91, 197, .16), transparent); pointer-events: none; }
.create-l { align-self: center; }
.steps { display: flex; gap: 6px; margin-top: 28px; }
.steps i { width: 26px; height: 4px; border-radius: 4px; background: var(--panel-3); }
.steps i.on { background: var(--grad); }
.form { padding: 20px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.arch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.arch button { height: 64px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.arch button:hover { border-color: var(--dim); }
.arch button.on { border-color: transparent; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.face-row { display: flex; gap: 14px; align-items: flex-end; }
.face-up { width: 72px; height: 72px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.2; color: var(--muted); flex: none; position: relative; overflow: hidden; }
.face-up:hover { border-color: var(--dim); }
.face-up.has { border: 0; padding: 3px; background: var(--grad); }
.face-up.has img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2.5px solid var(--panel); }
.face-up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.face-alt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.face-alt span { font-size: 12px; color: var(--dim); margin-right: 2px; }
.face-alt button { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 1.5px solid transparent; }
.face-alt button.on { border-color: var(--p); }
.face-alt img { width: 100%; height: 100%; }
.voice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.voice button { height: 34px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.voice button.on { background: var(--panel-3); color: var(--text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.links { border-top: 1px solid var(--line); padding-top: 14px; }
.links summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
.links summary::-webkit-details-marker { display: none; }
.links[open] summary { margin-bottom: 12px; }
.links .field + .field { margin-top: 10px; }
.preview-strip { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.preview-strip .pv { aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--panel-2); position: relative; }
.preview-strip .pv canvas { width: 100%; height: 100%; }
.preview-strip p { margin: 0; font-size: 13px; color: var(--muted); }
.preview-strip b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.summary { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.back { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.back:hover { color: var(--text); }

/* launch flow */
.launch-card { width: min(470px, 100%); padding: 22px; }
.launch-card .hd { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.launch-card .hd b { font-size: 22px; letter-spacing: -.03em; display: block; line-height: 1.1; }
.launch-card .hd span { font-size: 13px; color: var(--muted); }
.lsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lsteps li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--dim); transition: color .2s; }
.lsteps li.on, .lsteps li.done { color: var(--text); }
.lsteps .ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.lsteps li.done .ck { background: #22c27a; border-color: #22c27a; color: #08080b; }
.lsteps li.on .ck { border-color: var(--p); border-top-color: transparent; animation: spin .8s linear infinite; }
.lsteps li.fail .ck { border-color: var(--down); color: var(--down); }
@keyframes spin { to { transform: rotate(360deg); } }
.launch-err { margin-top: 14px; font-size: 13px; color: var(--down); }

.live { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding: 40px 24px 90px; position: relative; overflow: hidden; }
.live::before { content: ''; position: absolute; left: 50%; top: 30%; width: 640px; height: 640px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(179, 91, 197, .22), transparent); pointer-events: none; }
.live h1 { position: relative; margin: 0; font-size: clamp(44px, 7vw, 88px); letter-spacing: -.06em; font-weight: 800; line-height: 1; text-align: center; }
.live h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-row { position: relative; display: grid; grid-template-columns: 300px minmax(0, 360px); gap: 24px; align-items: center; }
.pcard { padding: 20px; }
.pcard .t { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pcard .t b { font-size: 30px; letter-spacing: -.04em; display: block; line-height: 1.05; }
.pcard .t span { color: var(--muted); font-size: 14px; }
.pcard p { margin: 12px 0 16px; font-size: 14px; }
.pcard .bt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dots i { position: absolute; width: 7px; height: 7px; border-radius: 50%; animation: drift 6s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateY(-18px); } }

/* ---------- calls ---------- */
.calls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; max-width: 1120px; margin: 0 auto; padding: 40px 32px; min-height: 100vh; min-height: 100dvh; align-items: center; }
.most { margin-top: 26px; padding: 14px 16px; max-width: 360px; }
.most .row { padding: 7px 0; }
.chat { display: flex; flex-direction: column; height: min(760px, calc(100dvh - 80px)); overflow: hidden; }
.chat-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-h b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.chat-h b::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.chat-h span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; color: var(--muted); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 11px; align-items: flex-start; }
.msg .who { font-family: var(--mono); font-size: 11.5px; color: var(--dim); display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.msg .who a { color: var(--muted); }
.msg .dev { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(231, 88, 139, .16); color: var(--p); }
.msg .txt { font-size: 14.5px; word-break: break-word; }
.call-card { display: flex; align-items: center; gap: 11px; margin-top: 4px; padding: 9px 12px; border-radius: 13px; min-width: 240px; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.call-card .nm { flex: 1; line-height: 1.2; }
.call-card .nm b { display: block; font-size: 15px; }
.call-card .nm span { font-size: 12px; color: var(--dim); }
.call-card .called { font-size: 12.5px; font-weight: 600; color: #ffb648; display: inline-flex; align-items: center; gap: 4px; }
.chat-in { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: center; }
.chat-in .input { flex: 1; background: var(--bg); }
.chat-in .call-sel { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); background: var(--panel-2); white-space: nowrap; }
.chat-in .call-sel.on { border-color: var(--p); color: var(--p); }
.chat-in .input-wrap { flex: 1; position: relative; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 11px; padding-right: 5px; }
.chat-in .input-wrap .input { border: 0; height: 42px; }
.chat-in .input-wrap:focus-within { border-color: var(--p); }

/* ---------- me ---------- */
.me-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.me-head .addr { font-family: var(--mono); font-size: 18px; }
.me-head .bal { color: var(--muted); font-size: 14px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.box { padding: 6px 16px; }
.box .row + .row { border-top: 1px solid var(--line); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(4, 4, 6, .72); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(420px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 22px; position: relative; animation: rise .2s; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.035em; }
.modal > p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal .x-close { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.modal .x-close:hover { background: var(--panel-2); color: var(--text); }
.wl { display: flex; flex-direction: column; gap: 8px; }
.wl button, .wl a { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 600; }
.wl button:hover, .wl a:hover { background: var(--panel-3); }
.wl img { width: 30px; height: 30px; border-radius: 8px; }
.wl .tag { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.wl .dot-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-3); }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(4, 4, 6, .5); animation: fade .15s; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slide .2s; z-index: 71; }
.drawer.left { right: auto; left: var(--side); border-left: 0; border-right: 1px solid var(--line); animation: slideL .2s; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes slideL { from { transform: translateX(-30px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.drawer-h .x-close { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.drawer-b { flex: 1; overflow-y: auto; padding: 14px 18px; }
.drawer-f { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.drawer-f .input { flex: 1; }
.cmt { display: flex; gap: 11px; padding: 9px 0; }
.cmt .who { font-size: 12px; color: var(--dim); font-family: var(--mono); display: flex; gap: 6px; align-items: center; }
.cmt .txt { font-size: 14px; }
.ntabs { display: flex; gap: 6px; padding: 12px 18px 0; }

.viewer { display: flex; gap: 16px; align-items: center; height: min(860px, calc(100dvh - 40px)); }
.viewer .reel-card { height: 100%; }
.viewer .r-acts { align-self: flex-end; }

.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; padding: 11px 16px; border-radius: 12px; background: var(--panel-3); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: rise .2s; max-width: min(440px, calc(100vw - 32px)); }
.toast.err { border-color: rgba(255, 95, 109, .5); }
.toast a { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .home { grid-template-columns: minmax(0, 500px) 290px; gap: 40px; }
}
@media (max-width: 1100px) {
  :root { --side: 76px; }
  .side { padding: 26px 10px 18px; align-items: center; }
  .brand span, .nav span.lb, .side-foot .x, .demo-tag { display: none; }
  .brand { padding: 0; }
  .nav a, .nav button { width: 52px; justify-content: center; padding: 0; }
  .nav .badge { left: 30px; }
  .side-foot .wallet-full { display: none; }
  .home { grid-template-columns: minmax(0, 500px); }
  .rail { display: none; }
  .c-body, .me-grid { grid-template-columns: minmax(0, 1fr); }
  .c-side { position: static; }
  .create { grid-template-columns: minmax(0, 1fr); gap: 30px; max-width: 560px; }
  .create::before { display: none; }
  .calls { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 620px; align-items: start; }
}
@media (min-width: 1101px) { .side-foot .wallet-mini { display: none; } }
@media (max-width: 760px) {
  :root { --side: 0px; }
  .side { display: none; }
  .view { margin-left: 0; padding-bottom: 64px; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 40; height: 56px; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(8, 8, 11, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; }
  .topbar .brand img { width: 28px; height: 28px; }
  .topbar .brand span { display: inline; font-size: 22px; }
  .topbar-acts { display: flex; align-items: center; gap: 6px; }
  .topbar-acts > button { width: 38px; height: 38px; display: grid; place-items: center; position: relative; }
  .topbar-acts .badge { position: absolute; right: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--p); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(8, 8, 11, .96); border-top: 1px solid var(--line); justify-content: space-around; align-items: center; }
  .tabbar a { width: 56px; height: 48px; display: grid; place-items: center; }
  .tabbar a.on svg.i { stroke-width: 2.4; }
  .home { padding: 12px 16px 40px; }
  .page { padding: 22px 16px 60px; }
  .page-h h1 { font-size: 28px; }
  .search { width: 100%; }
  .reels, .reel-slot { height: calc(100dvh - 56px - 58px - env(safe-area-inset-bottom)); }
  .reel-slot { padding: 0; gap: 0; position: relative; }
  .reel-card { border-radius: 0; border: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
  .r-acts { position: absolute; right: 10px; bottom: 90px; gap: 14px; }
  .r-acts .ic { width: 44px; height: 44px; background: rgba(0, 0, 0, .35); }
  .r-bot p { max-width: 78%; }
  .reels-hint { display: none; }
  .c-head { grid-template-columns: 90px 1fr; gap: 18px; align-items: start; }
  .c-head .av { --s: 86px !important; }
  .c-l1 h1 { font-size: 19px; }
  .c-stats { gap: 18px; font-size: 14px; }
  .mkt { grid-template-columns: repeat(2, 1fr); }
  .chart-box canvas { height: 230px; }
  .tabs { gap: 18px; }
  .create { padding: 22px 16px 60px; min-height: 0; }
  .arch { grid-template-columns: repeat(2, 1fr); }
  .voice { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
  .calls { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; min-height: 0; height: calc(100dvh - 56px - 64px - env(safe-area-inset-bottom)); }
  .chat { flex: 1; min-height: 0; height: auto; }
  .calls-l .eyebrow { display: none; }
  .calls-l .most { display: none; }
  .calls-l .lede { display: none; }
  .calls-l .h-xl { font-size: 32px; margin-bottom: 0; }
  .live-row { grid-template-columns: minmax(0, 1fr); }
  .drawer.left { left: 0; }
  .drawer { width: 100%; top: auto; height: 78dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; animation: up .2s; }
  @keyframes up { from { transform: translateY(30px); opacity: 0; } }
  .viewer { height: calc(100dvh - 24px); }
  .viewer .r-acts { position: absolute; right: 22px; bottom: 100px; }
  .toasts { bottom: 76px; }
  .me-head .addr { font-size: 15px; }
}

/* ---------- live additions ---------- */
.chip.off { color: #ffb24d; border-color: rgba(255, 144, 40, .45); background: rgba(255, 144, 40, .08); font-family: var(--mono); font-weight: 500; }
.off-dot { font-family: var(--mono); font-size: 11px; color: #ffb24d; font-weight: 500; }
video.rvid { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.fees { padding: 16px; margin-bottom: 24px; }
.fee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.fee-row div { line-height: 1.25; }
.fee-row span { display: block; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.fee-row b { font-size: 17px; }
.creator-box .btn input[type=file] { display: none; }
.admin-login { max-width: 380px; margin: 12vh auto 0; padding: 26px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.admin-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.box-pad { padding: 16px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 600; margin-left: auto; text-align: right; }
.ofc { padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.ofc:last-child { border-bottom: 0; }
.hint.err { color: var(--down); }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } .admin-side { position: static; } }

/* ---------- profiles, stories, admin tokens ---------- */
.drawer-wrap { z-index: 85; }
.drawer { z-index: 86; }
.toasts { z-index: 95; }
.ulink { color: inherit; }
.ulink:hover { color: var(--text); text-decoration: underline; }
.uname-t { font-family: 'DM Sans', sans-serif; font-size: 22px; letter-spacing: -.03em; }
.uname { padding: 16px; margin-bottom: 26px; display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.uname-row { display: flex; gap: 8px; }
.me-head .bal button { font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.c-av { display: block; justify-self: center; border-radius: 50%; }
.c-av:hover .av { filter: brightness(1.08); }
.hidden-bar { margin-bottom: 18px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; color: #ffb24d; background: rgba(255, 144, 40, .08); border: 1px solid rgba(255, 144, 40, .35); }
.tbl tr.is-hidden td { opacity: .5; }
.tbl tr.is-hidden td:last-child { opacity: 1; }
.story-v { position: relative; display: flex; align-items: center; gap: 16px; height: min(860px, calc(100dvh - 40px)); }
.sv-card { height: 100%; }
.sv-media { position: absolute; inset: 0; }
.sv-media canvas { width: 100%; height: 100%; }
.sv-bars { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 4px; z-index: 3; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sv-bars b { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.sv-top { position: absolute; left: 12px; right: 12px; top: 22px; z-index: 3; }
.sv-bot { z-index: 3; }
.sv-tap { position: absolute; top: 14%; bottom: 26%; z-index: 2; }
.sv-prev { left: 0; width: 32%; }
.sv-next { right: 0; width: 68%; }
.sv-acts .r-acts { padding-bottom: 10px; }
.sv-x { position: absolute; top: -6px; right: -46px; width: 36px; height: 36px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; }
.overlay.rl { padding: 0; }
.rl-box { width: 100%; }
.rl-x { position: fixed; top: 18px; right: 22px; z-index: 2; }
@media (max-width: 760px) {
  .story-v { height: 100dvh; width: 100%; gap: 0; }
  .sv-card { width: 100%; border-radius: 0; border: 0; aspect-ratio: auto; }
  .sv-acts .r-acts { position: absolute; right: 10px; bottom: 90px; z-index: 4; }
  .sv-x { top: 34px; right: 12px; z-index: 5; background: rgba(0, 0, 0, .4); }
  .overlay:has(.story-v) { padding: 0; }
  .rl-box, .rl-box .reel-slot { height: 100dvh; }
  .uname-row { flex-wrap: wrap; }
}
