:root {
  --bg: #090909;
  --ink: #f5f5f5;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.22);
  --bone: #f5f5f5;
  --sell: #e36a62;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: -0.011em;
}
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  right: -30vw;
  top: -14vh;
  width: min(78vw, 920px);
  height: min(78vw, 920px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  right: -16vw;
  top: 12vh;
  width: min(52vw, 640px);
  height: min(52vw, 640px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::placeholder { color: #6f6c64; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -40px; background: var(--ink); color: #111; padding: 8px 12px; z-index: 30; }
.skip:focus { top: 12px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.top, main, .foot, #toast { position: relative; z-index: 1; }

.top {
  position: sticky; top: 0; z-index: 20; height: 60px;
  display: flex; align-items: center;
  background: rgba(9, 9, 9, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 28px; width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.03em;
}
.brand svg { width: 22px; height: 22px; color: var(--ink); }
.nav-links { display: flex; gap: 18px; }
.nav-links a {
  text-decoration: none; color: var(--muted); padding: 4px 0; font-size: 0.92rem;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: #fff; box-shadow: inset 0 -1px 0 #fff; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu { display: none; }

.solid, .connect, .ghost, .text-btn, .sell-btn { border-radius: 999px; }
.solid, .connect {
  background: var(--ink); color: #161513; font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border: 0; white-space: nowrap;
}
.solid:hover, .connect:hover { background: #fff; }
.connect:disabled, .solid:disabled {
  opacity: 0.72; cursor: default;
}
.connect:disabled:hover, .solid:disabled:hover { background: transparent; }
.solid:disabled:hover { background: var(--ink); }
.ghost, .text-btn {
  background: transparent; border: 1px solid var(--line-2); color: var(--ink);
  padding: 10px 16px; text-decoration: none;
}
.ghost:hover { border-color: var(--ink); }
.text-btn { color: var(--muted); margin-top: 12px; padding: 6px 0; border: 0; border-radius: 0; }
.sell-btn { background: var(--sell); color: white; font-weight: 500; width: 100%; border: 0; padding: 12px; margin-top: 10px; }
.ticket .solid, .launch-go { width: 100%; margin-top: 8px; padding: 13px; }

.page { padding: 36px 0 88px; }
.kicker, .foot-label, .idx {
  margin: 0 0 14px; color: #fff; font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
}
h1, h2, h3 { font-weight: 600; margin: 0; color: #fff; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.8rem, 5.6vw, 4.8rem); line-height: 0.98; }
h2 { font-size: 1.7rem; line-height: 1.1; }
.muted, .fine { color: var(--muted); }
.lede { color: #e8e8e8; line-height: 1.55; font-size: 1.05rem; max-width: 34rem; margin: 18px 0 0; }

.stage { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 48px; align-items: end; margin: 18px 0 36px; }
.stage.is-live h1 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.specs { margin: 0; display: grid; gap: 0; }
.specs div {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.specs div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: 0.86rem; }
.specs dd { margin: 0; font-family: var(--mono); font-size: 0.84rem; }

.pulse {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.pulse div { padding: 16px 0; }
.pulse b { display: block; font-family: var(--mono); font-size: 1.2rem; font-weight: 500; }
.pulse span { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; }
.tape {
  display: flex; gap: 18px; overflow: auto; margin: -12px 0 18px;
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
}
.tape a { text-decoration: none; white-space: nowrap; }
.tape a:hover { color: var(--ink); }

.blank, .panel, .sheet, .ticket, .chart-box, .market {
  background: transparent;
}
.board-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 8px 0 22px; }
.board-top h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.board-top .lede { margin-top: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.card {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: start;
  border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.card:hover { background: rgba(255, 255, 255, 0.03); }
.card img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; background: #1c1b18; }
.card a { color: inherit; text-decoration: none; }
.card-name { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-name strong { color: #fff; font-weight: 600; }
.card-body p { margin: 6px 0 8px; color: var(--muted); font-size: 0.88rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.card-meta b { color: #fff; font-weight: 500; font-family: var(--mono); }
.coin-blurb { margin: 12px 0 0; font-size: 0.98rem; }
.blank {
  display: block;
  padding: 32px 0 8px;
  border-top: 1px solid var(--line);
}
.blank > div { max-width: 36rem; }
.blank h2 { margin-bottom: 8px; }
.blank p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 8px 0 0; flex-wrap: wrap; }
.toolbar input, .field input, .field textarea, .field select, .thread textarea, .slip select {
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  border-radius: 0; padding: 10px 0; outline: none; width: 100%;
}
.toolbar input { width: min(240px, 100%); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.seg { display: flex; gap: 16px; flex-wrap: wrap; }
.seg button, .tf button, .tabs button, .side button, .presets button, .icon-btn {
  border: 0; background: transparent; color: var(--muted); border-radius: 0; padding: 6px 0;
}
.seg button[aria-pressed="true"], .tf button[aria-pressed="true"], .tabs button[aria-pressed="true"] {
  color: #fff; box-shadow: inset 0 -1px 0 #fff;
}
.side button, .presets button, .icon-btn { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.side button[data-side="buy"][aria-pressed="true"] { background: var(--ink); color: #161513; border-color: transparent; }
.side button[data-side="sell"][aria-pressed="true"] { background: var(--sell); color: white; border-color: transparent; }

.market { border-top: 1px solid var(--line); }
.row, .market-head {
  display: grid; grid-template-columns: 48px 1.6fr 0.7fr 0.6fr 1.1fr 40px;
  gap: 14px; align-items: center; padding: 14px 0;
}
.market-head {
  color: var(--muted); font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.row { border-bottom: 1px solid var(--line); }
.row:hover { background: rgba(255, 255, 255, 0.03); }
.thumb, .who img, .pos img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #1c1b18;
}
.who img { width: 72px; height: 72px; }
.row a { color: inherit; text-decoration: none; }
.row strong { display: block; font-size: 1.02rem; font-weight: 600; color: #fff; }
.sub, .ticker { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.num { font-family: var(--mono); font-size: 0.86rem; }
.track { height: 2px; background: rgba(243, 241, 234, 0.1); overflow: hidden; margin-bottom: 6px; }
.track.fat { height: 2px; margin: 14px 0; }
.track i { display: block; height: 100%; background: #fff; }
.icon-btn[aria-pressed="true"] { color: #fff; border-color: #fff; }
.badge {
  margin-left: 8px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: #fff; vertical-align: 3px;
}

.king {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 0; margin-bottom: 8px; text-decoration: none; color: inherit;
  border-top: 1px solid #fff; border-bottom: 1px solid var(--line);
}
.king img { width: 48px; height: 48px; border-radius: 50%; }
.king h2 { font-size: 1.45rem; }
.metrics { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.84rem; margin-top: 6px; }
.metrics b { color: var(--ink); font-family: var(--mono); font-weight: 500; }

.terminal { display: grid; grid-template-columns: 1.45fr 0.7fr; gap: 40px; align-items: start; }
.who { display: flex; gap: 16px; align-items: center; margin: 10px 0 18px; }
.who h1 { font-size: clamp(2.6rem, 4vw, 4rem); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pills span, .pills a, .pills button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 4px 9px; font-family: var(--mono); font-size: 0.7rem; text-decoration: none;
}
.pills button[aria-pressed="true"] { color: #111; background: #fff; border-color: transparent; }
.chart-box, .ticket, .sheet { padding: 0; }
.chart-box { border-top: 1px solid var(--line); padding-top: 12px; }
.ticket {
  border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.03);
}
.chart-head, .ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chart-wrap { height: 280px; margin-top: 8px; }
canvas { width: 100%; height: 100%; }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 8px; }
.presets { display: flex; gap: 6px; margin-top: 10px; }
.presets button { flex: 1; }
.slip { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 0.86rem; }
.slip select { width: 72px; padding: 4px 0; text-align: right; }
.quote-box { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.quote-box div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; color: var(--muted); font-size: 0.88rem; }
.quote-box b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.warn { color: var(--sell); font-size: 0.84rem; }
.up { color: #fff; }
.down { color: var(--sell); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 20px; margin: 22px 0 8px; }
.stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.stats b { display: block; font-family: var(--mono); font-size: 1rem; font-weight: 500; }
.stats span { color: var(--muted); font-size: 0.75rem; }
.tabs { display: flex; gap: 18px; margin: 18px 0 4px; border-bottom: 1px solid var(--line); }
.line, .hold, .note { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.line { grid-template-columns: 64px 1fr 1fr 72px; }
.hold { grid-template-columns: 1.2fr 1fr 72px; }
.note { grid-template-columns: 1fr; }
.note small { color: var(--muted); }
.thread { display: flex; gap: 8px; margin: 12px 0; }
.thread textarea { min-height: 44px; resize: vertical; }

.stack { display: grid; gap: 0; }
.sheet { border-top: 1px solid var(--line); padding: 22px 0 8px; }
.sheet h2 { font-size: 1.25rem; margin: 0 0 16px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 0.84rem; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.field textarea { min-height: 88px; resize: vertical; }
.hint { color: var(--sell); min-height: 1.1em; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: start; margin-top: 28px; }
.ticket { position: sticky; top: 84px; }
.preview-card img { width: 64px; height: 64px; border-radius: 50%; margin: 8px 0 12px; }
.preview-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
input[type="range"] { accent-color: #fff; padding: 8px 0; }
input[type="file"] { border: 0; padding: 6px 0 10px; }
.panel { padding: 36px 0; border-top: 1px solid var(--line); text-align: left; max-width: 36rem; }
.panel h2 { margin-bottom: 8px; }
.panel .solid { margin-top: 18px; }
.pos {
  display: grid; grid-template-columns: 48px 1.4fr repeat(3, 0.7fr); gap: 12px; align-items: center;
  padding: 14px 0; margin-top: 0; text-decoration: none; border-bottom: 1px solid var(--line);
}
.docs { display: grid; grid-template-columns: 140px 1fr; gap: 48px; }
.toc { position: sticky; top: 88px; display: grid; align-content: start; }
.toc button { text-align: left; border: 0; background: transparent; color: var(--muted); padding: 7px 0; font-size: 0.95rem; }
.toc button:hover { color: var(--ink); }
.prose h1 { font-size: clamp(2.6rem, 5vw, 4rem); margin-bottom: 8px; }
.prose h2 { margin: 32px 0 8px; font-size: 1.45rem; scroll-margin-top: 84px; }
.prose p, .prose li { color: #e4e4e4; line-height: 1.65; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; width: 34%; }
code { font-family: var(--mono); font-size: 0.84em; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 0.7fr 0.8fr; gap: 24px; }
.brand-foot { font-weight: 600; font-size: 1.05rem; margin: 0 0 8px; color: #fff; }
.foot a { display: block; color: var(--muted); text-decoration: none; margin: 6px 0; }
.foot a:hover { color: var(--ink); }
.status { list-style: none; margin: 0; padding: 0; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.status li + li { margin-top: 6px; }

#toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #161513; border-radius: 999px; padding: 10px 14px;
  opacity: 0; pointer-events: none; transition: 0.2s ease; max-width: min(460px, calc(100% - 24px));
  font-size: 0.9rem;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 900px) {
  .stage, .terminal, .split, .docs, .foot-grid { grid-template-columns: 1fr; }
  .board-top { display: grid; align-items: start; }
  .pulse { grid-template-columns: 1fr 1fr; }
  .ticket, .toc { position: static; }
  .market-head { display: none; }
  .row, .pos, .line, .hold { grid-template-columns: 40px 1fr; }
  .row .num, .row .track-cell { grid-column: 2; }
  .blank { flex-direction: column; align-items: flex-start; }
  body::before, body::after { right: -40vw; opacity: 0.7; }
}
@media (max-width: 720px) {
  .wrap, .top-inner { width: min(1120px, calc(100% - 28px)); }
  .menu { display: inline-flex; margin-left: auto; background: transparent; color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 12px; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: #090909; border-bottom: 1px solid var(--line); padding: 8px 16px 14px; flex-direction: column;
  }
  .nav-links.is-open { display: flex; }
  .nav-create { display: none; }
  h1 { font-size: 2.8rem; }
  .fields, .stats { grid-template-columns: 1fr; }
}

.menu { display: none; }
body {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 280px;
  grid-template-rows: 52px 34px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: #0c0d10;
}
body::before, body::after { display: none; }
.rail {
  grid-column: 1; grid-row: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0 12px; border-right: 1px solid var(--line); background: #101114;
}
.rail svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.rail a {
  color: #9b9ca4; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; text-decoration: none;
}
.rail a[aria-current="page"], .rail a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.rail .mark img { width: 30px; height: 30px; object-fit: contain; display: block; }
.rail-plus {
  margin-top: auto; background: #3ddc97; color: #06281a; font-size: 1.7rem; line-height: 1; font-weight: 600;
}
.rail-plus:hover { color: #06281a; background: #67e8b4; }
.topbar {
  grid-column: 2 / -1; grid-row: 1; position: static; height: auto;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-bottom: 1px solid var(--line); background: #0c0d10;
}
.search { flex: 1; }
.topbar input, #q {
  width: 100%; background: #17181d; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 8px 14px;
}
.net { color: var(--muted); font-family: var(--mono); font-size: 0.7rem; white-space: nowrap; }
.marquee {
  grid-column: 2 / -1; grid-row: 2;
  display: flex; gap: 16px; align-items: center; overflow: auto;
  padding: 0 14px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.74rem; color: #bdbec4;
}
.marquee a { text-decoration: none; white-space: nowrap; }
.marquee b { color: #3ddc97; font-weight: 500; }
#view { grid-column: 2; grid-row: 3; overflow: auto; position: relative; z-index: 1; }
.trend {
  grid-column: 3; grid-row: 3; overflow: auto; position: relative; z-index: 1;
  border-left: 1px solid var(--line); padding: 14px 12px; background: #0e0f12;
}
#view .wrap { width: min(680px, calc(100% - 28px)); }
.page { padding: 12px 0 40px; }
.feed-title, h1.feed-title { font-size: 1.15rem; margin: 16px 0 8px; }
.desk { display: flex; gap: 16px; border-bottom: 1px solid var(--line); }
.desk button { border: 0; background: transparent; color: var(--muted); border-radius: 0; padding: 10px 0; }
.desk button[aria-pressed="true"] { color: #fff; box-shadow: inset 0 -2px 0 #3ddc97; }
.desk-empty { color: var(--muted); font-size: 0.86rem; }
.desk-row { display: flex; gap: 8px; overflow: auto; padding: 10px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 0.82rem;
}
.chip img, .ava { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ava { width: 40px; height: 40px; }
.post { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post header { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: 0.82rem; }
.post header strong { color: #fff; }
.post p { margin: 4px 0 8px; color: #eee; }
.embed {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; text-decoration: none; background: #141519;
}
.embed img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.embed b { display: block; color: #fff; }
.embed span { color: var(--muted); font-size: 0.8rem; }
.embed em, .trend-row em, .board-line b, .chip b { color: #3ddc97; font-family: var(--mono); font-weight: 500; font-style: normal; }
.trend-label { margin: 0 0 8px; color: #fff; font-weight: 600; }
.trend-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 0; text-decoration: none;
}
.trend-row img, .board-line img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.trend-row b { display: block; color: #fff; font-weight: 600; }
.trend-row i { color: var(--muted); font-style: normal; font-size: 0.78rem; }
.board-list { margin-top: 8px; }
.board-line {
  display: grid; grid-template-columns: 24px 36px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.ticket .solid, .launch-go, .side button[data-side="buy"][aria-pressed="true"] { background: #3ddc97; color: #06281a; }
.pills button[aria-pressed="true"] { background: #3ddc97; color: #06281a; }

body[data-page="ai"] { grid-template-columns: 68px minmax(0, 1fr); }
body[data-page="ai"] .trend, body[data-page="ai"] .marquee { display: none; }
body[data-page="ai"] .topbar { grid-column: 2; }
body[data-page="ai"] #view { grid-column: 2; grid-row: 2 / span 2; background: #0c0d10; }
.ai-page {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 0; padding: 28px 24px;
}
.ai-page[data-empty="no"] { align-items: center; justify-content: center; }
.ai-shell {
  width: min(760px, 100%);
  display: flex; flex-direction: column;
  background: #17181f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.ai-page[data-empty="no"] .ai-shell {
  width: min(820px, 100%); height: auto; max-height: 100%; min-height: 0;
}
.ai-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.ai-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
}
.ai-mark img { width: 34px; height: 34px; object-fit: contain; display: block; }
.ai-bar strong { display: block; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; }
.ai-bar em { display: block; margin-top: 1px; color: var(--muted); font-style: normal; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ai-log {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 22px 8px;
}
.ai-page[data-empty="no"] .ai-log { flex: 1; min-height: 0; overflow: auto; padding-bottom: 18px; }
.ai-empty { width: 100%; text-align: center; }
.ai-empty h1 { font-size: clamp(2.2rem, 4vw, 3.1rem); line-height: 1.02; margin-bottom: 10px; }
.ai-empty p { margin: 0 auto 22px; color: #b7b7b7; font-size: 1.02rem; max-width: 26rem; }
.ai-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-prompts button {
  display: grid; gap: 8px; text-align: left;
  min-height: 108px; padding: 14px 14px 16px;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: #101114; color: #fff;
}
.ai-prompts button span {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #3ddc97;
}
.ai-prompts button strong { font-weight: 500; font-size: 0.98rem; letter-spacing: -0.02em; line-height: 1.35; }
.ai-prompts button:hover { border-color: rgba(61, 220, 151, 0.8); background: #14161c; }
.ai-turn { width: fit-content; max-width: min(34rem, 86%); }
.ai-turn p { margin: 0; padding: 12px 14px; line-height: 1.45; }
.ai-turn.you { align-self: end; }
.ai-turn.you p { background: #3ddc97; color: #06281a; border-radius: 18px 18px 6px 18px; font-weight: 500; }
.ai-turn.arc { align-self: start; display: flex; align-items: flex-end; gap: 10px; }
.ai-turn.arc .ai-mark, .ai-turn.arc .ai-mark img { width: 28px; height: 28px; }
.ai-turn.arc p { background: #1c1d24; border: 1px solid var(--line); color: #fff; border-radius: 6px 18px 18px 18px; }
.ai-compose {
  display: flex; align-items: flex-end; gap: 8px;
  margin: 0 14px 14px; padding: 8px 8px 8px 16px;
  background: #0e0f13; border: 1px solid var(--line-2); border-radius: 18px;
}
.ai-compose:focus-within { border-color: rgba(61, 220, 151, 0.75); }
.ai-compose textarea {
  flex: 1; min-height: 46px; max-height: 140px; resize: none;
  border: 0; background: transparent; padding: 12px 0; line-height: 1.4; color: #f5f5f5;
}
.ai-compose textarea:focus { outline: none; }
.ai-send {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #3ddc97; color: #06281a;
}
.ai-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-send:hover { background: #67e8b4; }

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; height: auto; overflow: auto; }
  .rail { grid-row: auto; grid-column: 1; flex-direction: row; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-plus { margin-top: 0; margin-left: auto; }
  .topbar, .marquee, #view, .trend { grid-column: 1; grid-row: auto; border-left: 0; }
  #view, .trend { overflow: visible; }
  body[data-page="ai"] { grid-template-columns: 1fr; height: 100vh; overflow: hidden; }
  body[data-page="ai"] .topbar, body[data-page="ai"] #view { grid-column: 1; }
  body[data-page="ai"] #view { grid-row: auto; overflow: auto; }
  .ai-page { height: calc(100vh - 120px); padding: 12px; }
  .ai-prompts { grid-template-columns: 1fr; }
  .ai-prompts button { min-height: 0; }
}
