:root {
  color-scheme: dark;
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --yellow: #F5B800;
  --bg: #000000;
  --fg: #ffffff;
  --landing-bg: #000000;
  --landing-text: #ffffff;
  --landing-text-dim: rgba(255, 255, 255, 0.45);
  --landing-bracket: rgba(255, 255, 255, 0.1);
  --landing-terminal-bg: #0A0A0A;
  --landing-terminal-border: rgba(255, 255, 255, 0.06);
  --landing-terminal-header: rgba(255, 255, 255, 0.04);
  --landing-terminal-text: rgba(255, 255, 255, 0.45);
  --landing-btn-text: rgba(255, 255, 255, 0.7);
  --landing-btn-border: rgba(255, 255, 255, 0.2);
  --landing-btn-hover-text: #ffffff;
  --landing-btn-hover-border: rgba(255, 255, 255, 0.4);
  --drawer-label: rgba(255, 255, 255, 0.18);
  --drawer-action: rgba(255, 255, 255, 0.32);
  --drawer-action-hover: rgba(255, 255, 255, 0.7);
  --recent-active: rgba(255, 255, 255, 0.75);
  --recent-inactive: rgba(255, 255, 255, 0.32);
  --recent-active-bg: rgba(255, 255, 255, 0.04);
  --card-container-bg: #0D0D0D;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-border-faint: rgba(255, 255, 255, 0.05);
  --card-header-bg: rgba(255, 255, 255, 0.04);
  --card-text: #ffffff;
  --card-text-muted: rgba(255, 255, 255, 0.7);
  --card-text-dim: rgba(255, 255, 255, 0.45);
  --card-text-faint: rgba(255, 255, 255, 0.3);
  --card-surface: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f0;
  --fg: #111111;
  --landing-bg: #f4f4f0;
  --landing-text: #111111;
  --drawer-label: rgba(0, 0, 0, 0.22);
  --drawer-action: rgba(0, 0, 0, 0.45);
  --drawer-action-hover: rgba(0, 0, 0, 0.82);
  --recent-active: rgba(0, 0, 0, 0.82);
  --recent-inactive: rgba(0, 0, 0, 0.38);
  --recent-active-bg: rgba(0, 0, 0, 0.05);
  --card-container-bg: #f4f4f0;
  --card-bg: rgba(0, 0, 0, 0.03);
  --card-border: rgba(0, 0, 0, 0.1);
  --card-border-faint: rgba(0, 0, 0, 0.06);
  --card-header-bg: rgba(0, 0, 0, 0.04);
  --card-text: #111111;
  --card-text-muted: rgba(0, 0, 0, 0.72);
  --card-text-dim: rgba(0, 0, 0, 0.45);
  --card-text-faint: rgba(0, 0, 0, 0.3);
  --card-surface: rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: var(--landing-bg, #000000);
}

body {
  background: var(--landing-bg, #000000);
  color: var(--landing-text, #ffffff);
  font-family: var(--font-sans), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

button,
input {
  font-family: inherit;
}

@keyframes blink {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes thinking-bounce {
  0%,
  80%,
  100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

.thinking-dot {
  animation: thinking-bounce 1.2s ease-in-out infinite;
}

@keyframes chat-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-reveal {
  animation: chat-reveal 300ms ease forwards;
}

@keyframes chat-reveal-user {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.chat-reveal-user {
  animation: chat-reveal-user 280ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes page-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: none; }
}

.page-shell {
  height: 100%;
  animation: page-in 250ms ease-in-out both;
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.2); }
  50% { transform: scaleY(1); }
}

.eq-bar {
  display: inline-block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #F5B800;
  transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite;
}
.eq-bar:nth-child(1) { animation-delay: 0s; animation-duration: 0.80s; }
.eq-bar:nth-child(2) { animation-delay: 0.15s; animation-duration: 0.95s; }
.eq-bar:nth-child(3) { animation-delay: 0.05s; animation-duration: 0.72s; }
.eq-bar:nth-child(4) { animation-delay: 0.25s; animation-duration: 0.88s; }
.eq-bar:nth-child(5) { animation-delay: 0.10s; animation-duration: 1.00s; }

.brackets {
  position: fixed;
  pointer-events: none;
  z-index: 40;
}

.brackets svg {
  display: block;
}

.header-icons {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.icon-link {
  opacity: 0.4;
  color: #fff;
  transition: opacity 0.2s;
  display: inline-flex;
  position: relative;
}

.icon-link:hover {
  opacity: 1;
}

.icon-frame {
  padding: 4px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  display: flex;
}

.icon-link:hover .icon-frame {
  border-color: var(--yellow);
}

.icon-tip {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.icon-link:hover .icon-tip {
  opacity: 1;
}

.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #000;
  color: #fff;
}

.landing-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.hero-wrap {
  position: relative;
  width: 100%;
  text-align: center;
  line-height: 1;
  user-select: none;
}

.hero-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-spacer {
  font-family: var(--font-display), serif;
  font-weight: 700;
  font-size: clamp(4rem, 18vw, 10rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

.below-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 36rem;
}

.terminal {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono), monospace;
  margin-left: 8px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.08em;
}

.terminal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 148px;
}

.user-row {
  display: flex;
  justify-content: flex-end;
}

.user-bubble {
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  background: rgba(245, 184, 0, 0.07);
  border: 1px solid rgba(245, 184, 0, 0.16);
  border-radius: 14px 14px 4px 14px;
  padding: 9px 14px;
  color: #fff;
  max-width: 85%;
  line-height: 1.4;
}

.ai-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bot-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(245, 184, 0, 0.1);
  border: 1px solid rgba(245, 184, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--font-mono), monospace;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: -0.02em;
}

.ai-bubble {
  font-family: var(--font-mono), monospace;
  font-size: 0.71rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px 14px 14px 14px;
  padding: 9px 13px;
}

.ai-bubble .ai-text {
  white-space: pre-wrap;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 11px;
  background: var(--yellow);
  vertical-align: middle;
  margin-left: 2px;
}

.thinking-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px 14px 14px 14px;
}

.thinking-wrap span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.outline-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.outline-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.oracle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 14px;
  transition: color 0.2s, border-color 0.2s;
}

.oracle-chip:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  flex-shrink: 0;
}

/* Changelog */
.cl-main {
  min-height: 100vh;
  background: #000;
  color: #fff;
}

.cl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.cl-wordmark {
  font-family: var(--font-display), serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
}

.cl-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.cl-hero {
  padding: 48px 0 40px;
}

.cl-kicker {
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
}

.cl-title {
  font-family: var(--font-display), serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: 0.02em;
  margin: 12px 0 16px;
}

.cl-lead {
  font-family: var(--font-mono), monospace;
  font-size: 0.86rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 620px;
  margin: 0;
}

.cl-list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 48px;
}

.cl-entry {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 0;
}

.cl-date {
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  padding-right: 28px;
  padding-top: 4px;
  white-space: nowrap;
}

.cl-body {
  position: relative;
  padding-left: 34px;
  padding-bottom: 56px;
  border-left: 1px dashed rgba(255, 255, 255, 0.14);
}

.cl-dot {
  position: absolute;
  left: -6px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px #000, 0 0 12px rgba(245, 184, 0, 0.5);
}

.cl-h2 {
  font-family: var(--font-display), serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.cl-p {
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 680px;
  margin: 0;
}

.cl-hi {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(245, 184, 0, 0.04);
  border: 1px solid rgba(245, 184, 0, 0.16);
  border-radius: 14px;
  max-width: 680px;
}

.cl-hi-kicker {
  font-family: var(--font-mono), monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}

.cl-hi-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.cl-hi-row {
  display: flex;
  gap: 10px;
}

.cl-hi-gt {
  color: var(--yellow);
  font-family: var(--font-mono), monospace;
  flex-shrink: 0;
}

.cl-hi-text {
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 640px) {
  .cl-entry { grid-template-columns: 1fr !important; }
  .cl-date {
    text-align: left !important;
    padding-right: 0 !important;
    padding-left: 34px !important;
    padding-bottom: 6px !important;
  }
  .cl-header { padding-left: 16px !important; padding-right: 16px !important; }
  .cl-wrap { padding-left: 16px !important; padding-right: 16px !important; }
}

/* Vara */
.vara-main {
  background: #000;
  color: #fff;
  min-height: 100vh;
  padding: 60px 24px 80px;
  font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.vara-inner {
  max-width: 620px;
  margin: 0 auto;
}

.vara-back {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.4);
}

.vara-back:hover { color: rgba(255, 255, 255, 0.7); }

.vara-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 48px 0;
}

.vara-h2 {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.vara-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  transition: color 0.2s, border-color 0.2s;
}

.vara-btn:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.vara-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vara-steps li {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
}

.vara-steps span {
  color: rgba(255, 255, 255, 0.2);
  min-width: 18px;
}

.vara-types {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vara-types > div {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.vara-types code {
  color: rgba(255, 255, 255, 0.8);
  min-width: 80px;
  flex-shrink: 0;
}

.vara-types span { color: rgba(255, 255, 255, 0.4); }

.vara-pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 20px 24px;
  font-size: 0.78rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.75);
  overflow-x: auto;
  margin: 0;
  font-family: inherit;
}

.vara-note {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.2);
}

.vara-body {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 16px;
}

.vara-body code { color: rgba(255, 255, 255, 0.85); }

.vara-id {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
  line-height: 1.6;
}

.vara-foot {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 28px;
}

.vara-foot a {
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.4);
}

.vara-foot a:hover { color: rgba(255, 255, 255, 0.7); }

.toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toast-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.toast-title span { color: #F5B800; font-size: 0.75rem; }

.toast-x {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  padding: 2px;
  line-height: 1;
}

.toast-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toast-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.toast-list li > span:first-child {
  color: #F5B800;
  font-size: 0.65rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.toast-list li > span:last-child {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.76rem;
  line-height: 1.5;
}

.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.wallet-dot.on { background: #F5B800; }
.wallet-dot.warn { background: #ff6b6b; }

.sb-foot .connect-cta,
.connect-cta {
  font-family: var(--font-mono), monospace;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
  padding: 10px 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #000;
  background: #F5B800;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  justify-content: center;
}

.addr-chip {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.addr-chip.warn {
  background: rgba(255, 107, 107, 0.06);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wallet-modal {
  width: 100%;
  max-width: 360px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.wallet-modal h2 {
  font-family: var(--font-display), serif;
  font-size: 1.15rem;
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}

.wallet-modal p {
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 16px;
  line-height: 1.5;
}

.wallet-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
}

.wallet-opt:hover {
  border-color: rgba(245, 184, 0, 0.4);
  background: rgba(245, 184, 0, 0.06);
}

.quote-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}

.quote-head {
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--yellow);
  padding: 12px 16px;
  background: var(--card-header-bg);
  border-bottom: 1px solid var(--card-border-faint);
}

.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
}

.quote-row .k { color: var(--card-text-faint); }
.quote-row .v { color: var(--card-text-muted); }

.quote-exec {
  margin: 8px 16px 16px;
  width: calc(100% - 32px);
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  background: var(--yellow);
  color: #000;
  cursor: pointer;
}

.msg-user {
  display: flex;
  justify-content: flex-end;
}

.msg-user-bubble {
  padding: 10px 18px;
  background: var(--card-surface);
  border-radius: 20px;
  max-width: 70%;
}

@media (max-width: 599px) {
  .msg-user-bubble { max-width: 88%; }
}

.msg-user-bubble p {
  font-family: var(--font-mono), monospace;
  font-size: 0.875rem;
  color: var(--card-text-muted);
  margin: 0;
  word-break: break-word;
}

.msg-ai {
  font-family: var(--font-mono), monospace;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--card-text-muted);
}

.msg-ai p { margin: 0; }

.wallet-needed {
  background: rgba(245, 184, 0, 0.04);
  border: 1px solid rgba(245, 184, 0, 0.18);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
}

.price-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 420px;
}

.price-card .sym {
  font-family: var(--font-display), serif;
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.price-card .px {
  font-family: var(--font-mono), monospace;
  font-size: 1.1rem;
  color: var(--yellow);
  margin: 0;
}

.price-card .chg { font-size: 0.75rem; color: #22c55e; }

.yield-row, .launch-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border-faint);
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
}

.liq-red { color: #ef4444; }
.liq-green { color: #22c55e; }
.liq-amber { color: #F5B800; }

.feedback-link {
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  color: var(--card-text-faint);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.feedback-link:hover { color: var(--card-text-dim); }

.wallet-card {
  margin-bottom: 8px;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(245, 184, 0, 0.05);
  border: 1px solid rgba(245, 184, 0, 0.2);
}

.hidden { display: none !important; }

/* App */
.app-root {
  position: relative;
  height: 100vh;
  width: 100vw;
  background: #000;
  display: flex;
  overflow: hidden;
  color: #fff;
}

[data-theme="light"] .app-root {
  background: #f4f4f0;
  color: #111;
}

.sidebar-rail {
  width: 52px;
  min-width: 52px;
  height: 100%;
  z-index: 10;
  flex-shrink: 0;
  background: #080808;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .sidebar-rail {
  background: #ecece6;
  border-right-color: rgba(0, 0, 0, 0.08);
}

.sidebar-rail.sidebar-open {
  width: 240px;
  min-width: 240px;
}

.sb-top {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  flex-shrink: 0;
  gap: 2px;
}

.sb-icon-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--drawer-action);
  cursor: pointer;
}

.sb-icon-btn:hover { color: var(--drawer-action-hover); background: var(--recent-active-bg); }

.sb-brand {
  font-family: var(--font-display), serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  padding-left: 6px;
  flex: 1;
  opacity: 0;
  transition: opacity 0.12s;
}

[data-theme="light"] .sb-brand { color: #111; }

.sidebar-open .sb-brand,
.sidebar-open .sb-label,
.sidebar-open .sb-scroll {
  opacity: 1;
  pointer-events: auto;
}

.sb-new {
  padding: 0 8px 8px;
  flex-shrink: 0;
}

.sb-new button,
.sb-foot a,
.sb-foot button {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 10px;
  border: none;
  background: none;
  color: var(--drawer-action);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
}

.sb-new button:hover,
.sb-foot a:hover,
.sb-foot button:hover {
  color: var(--drawer-action-hover);
  background: var(--recent-active-bg);
}

.sb-label {
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  opacity: 0;
  transition: opacity 0.12s;
}

.sb-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
}

.sb-scroll::-webkit-scrollbar { display: none; }

.sb-section { padding: 4px 8px 12px; }

.sb-section p {
  font-family: var(--font-mono), monospace;
  font-size: 0.62rem;
  color: var(--drawer-label);
  letter-spacing: 0.08em;
  padding: 0 12px 6px;
  margin: 0;
}

.sb-section button {
  font-family: var(--font-mono), monospace;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-size: 0.72rem;
  color: var(--drawer-action);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  display: block;
}

.sb-section button:hover {
  color: var(--drawer-action-hover);
  background: var(--recent-active-bg);
}

.sb-foot {
  flex-shrink: 0;
  padding: 8px 8px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sb-foot a,
.sb-foot button { color: rgba(255, 255, 255, 0.28); }

[data-theme="light"] .sb-foot a,
[data-theme="light"] .sb-foot button { color: rgba(0, 0, 0, 0.35); }

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.app-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  text-align: center;
  overflow-y: auto;
}

.prompt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 520px;
}

.prompt-pill {
  font-family: var(--font-mono), monospace;
  padding: 6px 14px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.prompt-pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .prompt-pill {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
}

.app-bottom {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 28px 32px;
}

.app-composer-wrap {
  width: 100%;
  max-width: 700px;
}

.feat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.feat-card {
  flex: 1;
  background: var(--recent-active-bg);
  border: 1px solid var(--drawer-label);
  border-radius: 14px;
  padding: 16px;
}

.feat-card .ico { color: var(--drawer-action); margin-bottom: 12px; }

.feat-card h3 {
  font-family: var(--font-mono), monospace;
  font-size: 0.75rem;
  color: var(--drawer-action-hover);
  margin: 0;
  font-weight: 400;
}

.feat-card p {
  font-family: var(--font-mono), monospace;
  font-size: 0.63rem;
  color: var(--drawer-action);
  margin-top: 3px;
}

.feat-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.feat-dots button {
  height: 5px;
  width: 5px;
  border-radius: 999px;
  border: none;
  background: var(--drawer-label);
  cursor: pointer;
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

.feat-dots button.on {
  width: 22px;
  background: var(--yellow);
}

.composer {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(245, 184, 0, 0.18);
  border-radius: 20px;
  padding: 18px 20px 14px;
  box-shadow: 0 0 20px rgba(245, 184, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer:focus-within {
  border-color: rgba(245, 184, 0, 0.4);
  box-shadow: 0 0 28px rgba(245, 184, 0, 0.08);
}

.composer input {
  font-family: var(--font-mono), monospace;
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  caret-color: #fff;
  font-size: 0.95rem;
}

[data-theme="light"] .composer input { color: #111; caret-color: #111; }

.composer input::placeholder { color: rgba(255, 255, 255, 0.15); }
[data-theme="light"] .composer input::placeholder { color: rgba(0, 0, 0, 0.28); }

.composer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.horizon {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.horizon-scroller {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 24px;
}

.horizon-scroller::-webkit-scrollbar { display: none; }

.horizon-pill {
  font-family: var(--font-mono), monospace;
  flex-shrink: 0;
  font-size: 0.58rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.horizon-pill:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.45);
}

.horizon-fade {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

[data-theme="light"] .horizon-fade {
  background: linear-gradient(to right, transparent, rgba(244, 244, 240, 0.95));
}

.tier-btn {
  font-family: var(--font-mono), monospace;
  font-size: 0.6rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(245, 184, 0, 0.35);
  background: rgba(245, 184, 0, 0.06);
  color: rgba(245, 184, 0, 0.85);
  cursor: pointer;
}

.tier-menu {
  position: absolute;
  right: 0;
  bottom: 36px;
  width: 180px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 6px;
  z-index: 30;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tier-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.tier-menu button:hover,
.tier-menu button.on { background: rgba(245, 184, 0, 0.08); color: #fff; }

.tier-menu small {
  display: block;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.58rem;
  margin-top: 2px;
}

.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.send-btn.on {
  background: var(--yellow);
  cursor: pointer;
}

.send-btn.on svg path { stroke: #000; }

.disclaimer {
  font-family: var(--font-mono), monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.15);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.greeting {
  max-width: 520px;
  margin-bottom: 22px;
}

.greeting h1 {
  font-family: var(--font-display), serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #fff;
}

.greeting h1 span { color: var(--yellow); }

.greeting p {
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.chat-log {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: left;
  padding: 28px 0 16px;
  flex: 1;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 296px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: chat-reveal 300ms ease both;
}

.toast-soon {
  width: auto;
  padding: 8px 14px;
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 599px) {
  .sidebar-rail {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    z-index: 10 !important;
    width: 0 !important;
    min-width: 0 !important;
    border-right: none !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }
  .sidebar-rail.sidebar-open {
    width: min(300px, 88vw) !important;
    min-width: min(300px, 88vw) !important;
    pointer-events: auto !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  }
  .mobile-bar {
    display: flex !important;
  }
  .app-bottom { padding: 0 14px 18px; }
  .app-center { padding: 0 14px; }
  .feat-row { flex-direction: column; }
  .toast {
    left: 12px;
    right: 12px;
    bottom: 80px;
    width: auto;
  }
}

.mobile-bar {
  display: none;
  height: 52px;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-bar .word {
  font-family: var(--font-display), serif;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9;
}

.overlay.show { display: block; }

@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
