:root {
  --bg: #0f1226;
  --bg-soft: #131838;
  --bg-elevated: #171c3d;
  --panel: rgba(23, 28, 61, 0.82);
  --panel-strong: rgba(28, 34, 74, 0.94);
  --panel-quiet: rgba(18, 22, 48, 0.72);
  --line: rgba(232, 180, 76, 0.12);
  --line-strong: rgba(232, 180, 76, 0.3);
  --text: #f5f1e6;
  --text-soft: rgba(245, 241, 230, 0.74);
  --text-dim: rgba(245, 241, 230, 0.52);
  --gold: #e8b44c;
  --gold-strong: #f4ce7a;
  --gold-deep: #8b6620;
  --cyan: #7bc7d9;
  --cyan-deep: #2d7b97;
  --green: #5fc59a;
  --danger: #e38181;
  --shadow: 0 28px 80px rgba(5, 8, 20, 0.52);
  --shadow-soft: 0 16px 42px rgba(5, 8, 20, 0.34);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --ui-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --display-font: "Songti SC", "STSong", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui-font);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(57, 96, 147, 0.22), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(232, 180, 76, 0.08), transparent 28%),
    linear-gradient(180deg, #0b0e1d 0%, var(--bg) 32%, #0d1125 100%);
  overflow-x: hidden;
}

body.modal-open,
body.birth-sheet-open {
  overflow: hidden;
}

body[data-route="landing"] .desktop-nav {
  display: none;
}

body[data-route="landing"] .app-shell {
  grid-template-columns: 1fr;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-strong) 100%);
  color: #1a1408;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, opacity 160ms ease;
  box-shadow: 0 14px 28px rgba(232, 180, 76, 0.2);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

button:disabled,
.button-link:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.ghost {
  border-color: rgba(245, 241, 230, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  box-shadow: none;
}

.small {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 13px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.button-link.ghost {
  border: 1px solid rgba(245, 241, 230, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(245, 241, 230, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(245, 241, 230, 0.34);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(232, 180, 76, 0.62);
  box-shadow: 0 0 0 4px rgba(232, 180, 76, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

input,
select {
  min-height: 50px;
  padding: 12px 14px;
}

textarea {
  min-height: 128px;
  resize: vertical;
  padding: 14px 16px;
}

.muted {
  color: var(--text-dim);
}

.section-eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-halo {
  position: fixed;
  z-index: -3;
  filter: blur(18px);
  pointer-events: none;
}

.halo-left {
  top: 80px;
  left: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(65, 106, 159, 0.24);
}

.halo-right {
  right: -120px;
  bottom: 80px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(232, 180, 76, 0.12);
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 78%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) auto minmax(360px, 0.95fr);
  gap: 18px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 10, 22, 0.76);
  backdrop-filter: blur(22px);
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.brand-button:hover {
  transform: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(232, 180, 76, 0.2), rgba(232, 180, 76, 0.08));
  border: 1px solid rgba(232, 180, 76, 0.32);
  color: var(--gold-strong);
  font-family: var(--display-font);
  font-size: 25px;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 19px;
  line-height: 1.1;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 12px;
}

.header-metrics {
  display: flex;
  gap: 12px;
  justify-self: center;
}

.metric-pill {
  min-width: 98px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-pill span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.metric-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.header-account {
  justify-self: end;
  width: min(100%, 560px);
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(28, 34, 74, 0.82), rgba(15, 18, 38, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.top-auth-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.header-account-copy {
  min-width: 0;
}

.top-auth-summary {
  font-size: 13px;
  line-height: 1.6;
}

.top-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-auth-hint {
  margin-top: 10px;
  font-size: 12px;
}

.site-main {
  padding: 24px;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.desktop-nav {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 18px;
}

.desktop-nav-head,
.nav-wallet-card,
.panel,
.landing-shell,
.chat-card,
.result-card,
.setup-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(27, 32, 69, 0.86), rgba(17, 21, 45, 0.9));
  box-shadow: var(--shadow-soft);
}

.desktop-nav-head {
  padding: 20px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.desktop-nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: rgba(232, 180, 76, 0.12);
  border: 1px solid rgba(232, 180, 76, 0.24);
  color: var(--gold-strong);
  font-family: var(--display-font);
}

.desktop-nav-head h2,
.page-head h1,
.landing-copy h1,
.feature-card h2,
.poster-preview-copy h2,
.panel h2,
.chat-card h2,
.result-card h2,
.setup-card h2,
.wallet-stat-card strong {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 700;
}

.desktop-nav-head p {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 12px;
}

.desktop-nav-links {
  display: grid;
  gap: 10px;
}

.route-button {
  display: grid;
  justify-items: start;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  box-shadow: none;
}

.route-button span {
  font-size: 15px;
}

.route-button em {
  font-style: normal;
  color: var(--text-dim);
  font-size: 12px;
}

.route-button.is-active,
.route-button:hover {
  border-color: rgba(232, 180, 76, 0.22);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.12), rgba(232, 180, 76, 0.04));
}

.nav-wallet-card {
  padding: 22px 20px;
}

.nav-wallet-card h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 28px;
}

.nav-wallet-card p {
  margin: 12px 0 0;
  font-size: 26px;
  color: var(--gold-strong);
}

.nav-wallet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.app-content {
  min-width: 0;
}

.route-panel {
  display: none;
}

.route-panel.is-active {
  display: block;
}

.landing-shell {
  padding: clamp(24px, 4vw, 42px);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.landing-copy {
  padding: 18px 6px 8px;
}

.landing-kicker {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.landing-copy h1 {
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.22;
}

.landing-copy p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.8;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.free-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 180, 76, 0.2);
  background: rgba(232, 180, 76, 0.08);
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 700;
}

.free-chip {
  margin-top: 20px;
}

.landing-stage {
  display: grid;
  gap: 16px;
}

.stage-card {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(232, 180, 76, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(232, 180, 76, 0.14);
}

.stage-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stage-row:last-child {
  border-bottom: 0;
}

.stage-row span {
  color: var(--text-dim);
  font-size: 13px;
}

.stage-row strong {
  text-align: right;
  font-size: 15px;
}

.hero-actions {
  display: grid;
  gap: 12px;
}

.hero-actions button {
  justify-content: flex-start;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.feature-card,
.poster-mock,
.result-overview-card,
.wallet-stat-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card-accent {
  background: linear-gradient(180deg, rgba(232, 180, 76, 0.13), rgba(255, 255, 255, 0.02));
  border-color: rgba(232, 180, 76, 0.18);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(232, 180, 76, 0.1);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.feature-card h2 {
  margin-top: 18px;
  font-size: 26px;
}

.feature-card p {
  margin: 14px 0 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 14px;
}

.poster-preview-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(135deg, rgba(23, 28, 61, 0.84), rgba(16, 20, 42, 0.9));
}

.poster-preview-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.poster-preview-copy p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.poster-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.poster-mock span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.poster-mock strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  font-family: var(--display-font);
}

.poster-mock p {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: clamp(30px, 3.6vw, 40px);
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.setup-card {
  position: sticky;
  top: 108px;
  padding: 24px;
}

.setup-card-head,
.panel-head,
.chat-header,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.field-stack {
  display: grid;
  gap: 14px;
}

.panel-field {
  display: grid;
  gap: 8px;
}

.panel-field span,
.toggle-group > span {
  font-size: 13px;
  color: var(--text-soft);
}

.toggle-group {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-button {
  min-width: 82px;
  padding: 11px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
}

.toggle-button.is-active {
  border-color: rgba(232, 180, 76, 0.28);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.18), rgba(232, 180, 76, 0.06));
  color: var(--gold-strong);
}

.mode-card-grid {
  display: grid;
  gap: 10px;
}

.mode-card {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
}

.mode-card small {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.mode-card.is-active {
  border-color: rgba(232, 180, 76, 0.28);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.14), rgba(255, 255, 255, 0.03));
}

.setup-summary {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 13px;
}

.setup-preferences {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
}

.setup-preferences strong {
  font-size: 13px;
}

.setup-preference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-preference-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 199, 217, 0.18);
  background: rgba(123, 199, 217, 0.08);
  color: #b8e3ee;
  font-size: 12px;
  line-height: 1.4;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.workbench-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.birth-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.birth-summary-bar span {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
}

.birth-summary-bar strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.mobile-workbench-switch {
  display: none;
}

.segment-button {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
}

.segment-button.is-active {
  border-color: rgba(232, 180, 76, 0.24);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.18), rgba(255, 255, 255, 0.04));
  color: var(--gold-strong);
}

.chat-card,
.result-card,
.panel {
  padding: 22px;
}

.chat-status-cluster,
.memory-status-badges,
.memory-badges,
.native-pay-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 12px;
}

.memory-badge.green {
  border-color: rgba(95, 197, 154, 0.24);
  color: #8bdeba;
}

.memory-badge.accent {
  border-color: rgba(232, 180, 76, 0.28);
  color: var(--gold-strong);
}

.memory-badge.high,
.memory-badge.danger {
  border-color: rgba(227, 129, 129, 0.24);
  color: #f4a4a4;
}

.memory-badge.medium {
  border-color: rgba(123, 199, 217, 0.24);
  color: #a6ddeb;
}

.memory-badge.muted {
  color: var(--text-dim);
}

.messages {
  height: 600px;
  margin-top: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(245, 241, 230, 0.12);
}

.message {
  max-width: 86%;
  padding: 16px 18px;
  border-radius: 24px;
  white-space: normal;
  line-height: 1.75;
  font-size: 14px;
}

.message .meta {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
}

.message.user {
  align-self: flex-end;
  border-bottom-right-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.94), rgba(244, 206, 122, 0.92));
  color: #1a1408;
}

.message.assistant {
  align-self: flex-start;
  border-bottom-left-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.message-body {
  min-width: 0;
}

.message-body.plain-text {
  white-space: pre-wrap;
}

.markdown-content {
  display: grid;
  gap: 0.8em;
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content > :last-child {
  margin-bottom: 0;
}

.markdown-content p {
  margin: 0;
  white-space: pre-wrap;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 0;
  font-family: var(--display-font);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.markdown-content h1 {
  font-size: 24px;
}

.markdown-content h2 {
  font-size: 21px;
}

.markdown-content h3 {
  font-size: 18px;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 16px;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 0.4em;
}

.markdown-content li {
  margin: 0;
}

.markdown-content blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(232, 180, 76, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.markdown-content pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(6, 8, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.markdown-content code {
  padding: 0.14em 0.38em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

.markdown-content pre code {
  padding: 0;
  background: transparent;
  color: var(--text);
  white-space: pre;
}

.markdown-content a {
  color: var(--gold-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.markdown-content hr {
  margin: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.message-actions,
.artifact-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  white-space: normal;
}

.conversation-empty {
  margin: auto;
  max-width: 320px;
  text-align: center;
  color: var(--text-dim);
}

.conversation-empty strong {
  display: block;
  color: var(--text);
  font-family: var(--display-font);
  font-size: 24px;
}

.conversation-empty p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.composer {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.composer-shortcuts,
.inline-actions,
.account-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-preview {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(232, 180, 76, 0.14);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.06), rgba(255, 255, 255, 0.03));
  display: grid;
  gap: 10px;
}

.composer-preview.muted {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.composer-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.composer-preview-head strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.composer-preview-head span {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.composer-preview-actions {
  display: flex;
  justify-content: flex-end;
}

.composer textarea {
  margin-top: 14px;
}

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.status {
  color: var(--text-dim);
  font-size: 13px;
}

.result-overview-grid,
.wallet-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.result-overview-card span,
.wallet-stat-card span {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
}

.result-overview-card strong,
.wallet-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.result-brief-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(232, 180, 76, 0.14);
  background: linear-gradient(180deg, rgba(22, 27, 58, 0.9), rgba(13, 16, 35, 0.9));
  display: grid;
  gap: 16px;
}

.result-brief-head {
  align-items: center;
}

.analysis-snapshot {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.82;
}

.analysis-snapshot.markdown-content {
  gap: 0.68em;
}

.analysis-snapshot.markdown-content p {
  white-space: pre-wrap;
}

.analysis-artifact-actions {
  display: grid;
  gap: 10px;
}

.analysis-artifact-actions .artifact-actions,
.analysis-artifact-actions .message-actions {
  margin-top: 0;
}

.analysis-artifact-actions .artifact-open {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

.analysis-artifact-actions .artifact-open-text {
  white-space: normal;
}

.artifact-empty {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 13px;
}

.result-follow-up {
  display: grid;
  gap: 10px;
}

.follow-up-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-step-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.analysis-step-button[data-tone="accent"] {
  border-color: rgba(232, 180, 76, 0.24);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.18), rgba(255, 255, 255, 0.04));
  color: var(--gold-strong);
}

.artifacts {
  margin-top: 18px;
}

.artifact-banner {
  display: grid;
  gap: 12px;
}

.artifact-banner .label {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.artifact-banner-hint {
  margin-top: -4px;
  color: var(--text-dim);
  font-size: 12px;
}

.artifact-item {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.artifact-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.artifact-title strong {
  display: block;
  display: flex;
  align-items: center;
  gap: 8px;
}

.artifact-kind {
  display: inline-flex;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 12px;
}

.artifact-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(244, 206, 122, 0.46);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.28), rgba(39, 214, 224, 0.16));
  color: var(--gold-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.artifact-open:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 206, 122, 0.8);
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.42), rgba(39, 214, 224, 0.2));
}

.artifact-open-icon,
.artifact-title-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  color: inherit;
}

.artifact-open-text {
  white-space: nowrap;
}

.artifact-path {
  display: none;
}

.wallet-summary-panel,
.wallet-pricing-panel,
.wallet-package-panel,
.account-summary-panel,
.account-login-panel,
.account-session-panel {
  margin-top: 18px;
}

.pricing-grid,
.package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.commerce-item,
.package-card {
  display: grid;
  justify-items: start;
  gap: 6px;
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
}

.commerce-item span,
.package-card span,
.package-card small {
  color: var(--text-dim);
  font-size: 13px;
}

.package-card em {
  font-style: normal;
  color: var(--gold-strong);
  font-size: 15px;
}

.stack {
  display: grid;
  gap: 12px;
}

.plan-item,
.insight-item,
.memory-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.72;
  font-size: 13px;
}

.plan-item strong,
.insight-item strong,
.memory-card strong {
  color: var(--text);
}

.memory-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.memory-card-meta {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.memory-action {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
}

.memory-action.accent {
  border-color: rgba(232, 180, 76, 0.2);
  color: var(--gold-strong);
}

.memory-action.danger {
  border-color: rgba(227, 129, 129, 0.22);
  color: #f4a4a4;
}

.workspace-switcher {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace-tab {
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: none;
}

.workspace-tab.is-active {
  background: linear-gradient(135deg, rgba(232, 180, 76, 0.9), rgba(244, 206, 122, 0.92));
  color: #1a1408;
}

.workspace-side-group {
  display: none;
}

.workspace-side-group.is-active {
  display: grid;
  gap: 18px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-helper {
  margin: 12px 0 0;
  line-height: 1.7;
  font-size: 13px;
}

.mobile-tabbar {
  display: none;
}

.mobile-only-button {
  display: none;
}

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.pay-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 16, 0.72);
  backdrop-filter: blur(10px);
}

.pay-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  margin: min(8vh, 80px) auto 0;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(28, 34, 74, 0.96), rgba(14, 17, 36, 0.98));
  box-shadow: var(--shadow);
}

.pay-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.pay-qr-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
}

.pay-qr-shell img {
  display: block;
  width: min(100%, 280px);
  height: auto;
}

.native-pay-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.native-pay-status[data-tone="green"] {
  color: #8bdeba;
}

.native-pay-status[data-tone="accent"] {
  color: var(--gold-strong);
}

.native-pay-status[data-tone="medium"] {
  color: #a6ddeb;
}

.native-pay-status[data-tone="high"] {
  color: #f4a4a4;
}

.pay-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 981px) {
  .site-header {
    grid-template-columns: minmax(220px, 0.68fr) auto minmax(300px, 0.82fr);
    gap: 14px;
    padding: 12px 22px;
  }

  .brand-button {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    margin-top: 3px;
    font-size: 11px;
  }

  .header-metrics {
    gap: 10px;
  }

  .metric-pill {
    min-width: 88px;
    padding: 9px 14px;
    border-radius: 16px;
  }

  .metric-pill span {
    font-size: 10px;
  }

  .metric-pill strong {
    margin-top: 2px;
    font-size: 17px;
  }

  .header-account {
    width: min(100%, 500px);
    padding: 12px 14px;
    border-radius: 20px;
  }

  .top-auth-main {
    gap: 10px;
    align-items: center;
  }

  .top-auth-summary {
    font-size: 12px;
    line-height: 1.35;
  }

  .top-auth-summary .plan-item.auth-summary {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.35;
  }

  .top-auth-summary .plan-item.auth-summary strong {
    font-size: 14px;
  }

  .top-auth-summary .plan-item.auth-summary span {
    color: var(--text-dim);
    font-size: 12px;
  }

  .top-auth-summary .memory-badges {
    gap: 6px;
    margin-top: 6px;
  }

  .top-auth-summary .memory-badge {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .top-auth-actions {
    gap: 6px;
  }

  .top-auth-hint {
    margin-top: 6px;
    font-size: 11px;
  }

  .header-account-copy .section-eyebrow {
    display: none;
  }

  .site-main {
    padding: 18px 22px 22px;
  }

  .app-shell {
    gap: 18px;
  }

  .desktop-nav {
    top: 86px;
  }

  .landing-shell {
    padding: clamp(18px, 2.4vw, 28px);
  }

  .landing-hero {
    gap: 18px;
  }

  .landing-copy {
    padding: 10px 0 4px;
  }

  .landing-kicker {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .landing-copy h1 {
    font-size: clamp(32px, 4.4vw, 52px);
    line-height: 1.14;
  }

  .landing-copy p {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.72;
  }

  .landing-actions {
    gap: 10px;
    margin-top: 20px;
  }

  .free-chip {
    margin-top: 16px;
  }

  .landing-stage {
    gap: 12px;
  }

  .stage-card {
    padding: 18px;
    border-radius: 22px;
  }

  .stage-row {
    padding: 10px 0;
  }

  .stage-row span {
    font-size: 12px;
  }

  .stage-row strong {
    font-size: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .feature-grid {
    gap: 16px;
    margin-top: 18px;
  }
}

@media (max-width: 1200px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-metrics {
    justify-self: start;
  }

  .header-account {
    justify-self: stretch;
    width: 100%;
  }

  .workbench-layout {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .site-main {
    padding: 18px 18px 92px;
  }

  body[data-route="landing"] .mobile-tabbar {
    display: none;
  }

  body[data-route="landing"] .site-main {
    padding-bottom: 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .desktop-nav {
    display: none;
  }

  .landing-hero,
  .feature-grid,
  .poster-preview-grid,
  .wallet-stat-grid,
  .result-overview-grid,
  .pricing-grid,
  .package-grid,
  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .workbench-layout {
    grid-template-columns: 1fr;
  }

  .setup-card {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    z-index: 32;
    max-height: min(84vh, 760px);
    overflow-y: auto;
    transform: translateY(calc(100% + 24px));
    transition: transform 200ms ease;
  }

  body.birth-sheet-open .setup-card {
    transform: translateY(0);
  }

  body.birth-sheet-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 31;
    background: rgba(4, 6, 16, 0.68);
    backdrop-filter: blur(8px);
  }

  .mobile-only-button {
    display: inline-flex;
  }

  .mobile-workbench-switch {
    display: flex;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .messages {
    height: calc(100vh - 420px);
    min-height: 320px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 22;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 12, 26, 0.88);
    backdrop-filter: blur(18px);
  }

  .mobile-tab {
    padding: 11px 8px;
    border-radius: 16px;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    box-shadow: none;
  }

  .mobile-tab.is-active {
    background: linear-gradient(135deg, rgba(232, 180, 76, 0.16), rgba(232, 180, 76, 0.08));
    color: var(--gold-strong);
  }

  .birth-summary-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .poster-preview-copy {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 16px 14px;
    gap: 14px;
  }

  .site-main {
    padding: 14px 14px 92px;
  }

  .landing-shell,
  .panel,
  .chat-card,
  .result-card,
  .setup-card,
  .poster-preview-card {
    border-radius: 24px;
  }

  .header-metrics {
    width: 100%;
    justify-content: space-between;
  }

  .metric-pill {
    flex: 1;
    min-width: 0;
  }

  .top-auth-main,
  .panel-head,
  .chat-header,
  .result-head,
  .page-head {
    grid-template-columns: 1fr;
  }

  .top-auth-actions,
  .panel-head,
  .chat-header,
  .result-head,
  .page-head {
    display: grid;
  }

  .top-auth-actions {
    justify-content: stretch;
  }

  .message {
    max-width: 100%;
  }

  .composer {
    padding: 16px;
  }

  .composer-bar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .workbench-main[data-workbench-view-state="chat"] [data-workbench-pane="result"],
  .workbench-main[data-workbench-view-state="result"] [data-workbench-pane="chat"] {
    display: none;
  }

  .workbench-main[data-workbench-view-state="chat"] [data-workbench-pane="chat"],
  .workbench-main[data-workbench-view-state="result"] [data-workbench-pane="result"] {
    display: block;
  }
}

/* UI folder alignment: 星河命理.dc.html */
:root {
  --bg: #0f1226;
  --bg-soft: #12152c;
  --bg-elevated: #171b3d;
  --panel: #1c2046;
  --panel-strong: #141733;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(232, 180, 76, 0.32);
  --text: #f5f1e6;
  --text-soft: rgba(245, 241, 230, 0.66);
  --text-dim: rgba(245, 241, 230, 0.5);
  --gold: #e8b44c;
  --gold-strong: #f4ce7a;
  --green: #5fc4a6;
  --danger: #e8664f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.24);
  --radius-xl: 20px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ui-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display-font: "Noto Serif SC", "Songti SC", "STSong", serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

.page-halo,
.page-grid {
  display: none;
}

button {
  border-radius: 999px;
  background: var(--gold);
  box-shadow: none;
}

.ghost,
.button-link.ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text);
}

input,
select,
textarea {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f1226;
}

.section-eyebrow,
.landing-kicker {
  letter-spacing: 0;
  text-transform: none;
}

.header-landing-cta {
  display: none;
}

body[data-route="landing"] .site-main {
  padding: 0;
}

body[data-route="landing"] .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 18, 38, 0.78);
  backdrop-filter: blur(10px);
}

body[data-route="landing"] .brand-button {
  gap: 11px;
}

body[data-route="landing"] .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  color: transparent;
  background: radial-gradient(circle at 30% 30%, #f4ce7a, #e8b44c 58%, #b8863a 100%);
  box-shadow: 0 0 0 1px rgba(232, 180, 76, 0.4), 0 0 18px rgba(232, 180, 76, 0.32);
}

body[data-route="landing"] .brand-copy strong {
  font-family: var(--display-font);
  font-size: 20px;
}

body[data-route="landing"] .brand-copy small,
body[data-route="landing"] .header-metrics,
body[data-route="landing"] .header-account {
  display: none;
}

body[data-route="landing"] .header-landing-cta {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 11px 22px;
  font-size: 14px;
}

body[data-route="landing"] .app-shell {
  display: block;
}

body[data-route="landing"] .app-content {
  width: 100%;
}

.landing-shell {
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  padding: 0;
}

.landing-hero {
  display: block;
  padding: 86px clamp(20px, 5vw, 64px) 72px;
  background-image:
    radial-gradient(rgba(245, 241, 230, 0.44) 1px, transparent 1px),
    radial-gradient(rgba(245, 241, 230, 0.26) 1px, transparent 1px);
  background-size: 130px 130px, 84px 84px;
  background-position: 0 0, 44px 30px;
}

.landing-copy {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.landing-kicker {
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.landing-copy h1 {
  font-size: 56px;
  line-height: 1.26;
}

.landing-copy p {
  max-width: 580px;
  margin: 20px auto 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.8;
}

.landing-actions {
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.landing-actions button {
  min-height: 52px;
  padding: 15px 30px;
  font-size: 16px;
}

.free-chip {
  margin-top: 28px;
  min-height: 36px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.free-chip strong {
  color: var(--gold-strong);
}

.landing-stage {
  display: none;
}

.feature-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px) 68px;
  gap: 22px;
}

.feature-card,
.poster-mock,
.result-overview-card,
.wallet-stat-card,
.panel,
.chat-card,
.result-card,
.setup-card,
.package-card,
.commerce-item,
.plan-item,
.insight-item,
.memory-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: none;
}

.feature-card {
  padding: 30px 26px;
}

.feature-card-accent {
  border-color: var(--line-strong);
  background: linear-gradient(160deg, #231d3f, var(--panel));
}

.feature-badge {
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(232, 180, 76, 0.12);
  color: var(--gold);
  font-size: 12px;
}

.feature-card h2 {
  margin-top: 14px;
  font-size: 19px;
}

.feature-card p {
  margin-top: 12px;
  color: rgba(245, 241, 230, 0.62);
  font-size: 14.5px;
  line-height: 1.7;
}

.poster-preview-card {
  max-width: 1120px;
  margin: 0 auto 72px;
  padding: 52px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: none;
}

.poster-preview-copy {
  align-items: center;
}

.poster-preview-copy h2 {
  font-size: 32px;
  line-height: 1.35;
}

.poster-preview-copy p {
  max-width: 520px;
  color: rgba(245, 241, 230, 0.62);
}

.poster-preview-grid {
  justify-content: center;
  grid-template-columns: 224px;
}

.poster-preview-grid .poster-mock {
  min-height: 330px;
  border-radius: 20px;
  border-color: rgba(232, 180, 76, 0.3);
  background: linear-gradient(180deg, #1b1f42, #141733);
  text-align: center;
  box-shadow: var(--shadow);
}

.poster-preview-grid .poster-mock:nth-child(2) {
  display: none;
}

@media (min-width: 981px) {
  body:not([data-route="landing"]) .site-header {
    display: none;
  }

  body:not([data-route="landing"]) .site-main {
    padding: 0;
  }

  body:not([data-route="landing"]) .app-shell {
    min-height: 100vh;
    grid-template-columns: 246px minmax(0, 1fr);
    gap: 0;
  }

  .desktop-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    gap: 6px;
    padding: 24px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-soft);
  }

  .desktop-nav-head {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 10px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .desktop-nav-mark {
    width: 32px;
    height: 32px;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    color: transparent;
    background: radial-gradient(circle at 30% 30%, #f4ce7a, #e8b44c 58%, #b8863a);
  }

  .desktop-nav-head h2 {
    font-size: 18px;
  }

  .desktop-nav-head p {
    display: none;
  }

  .desktop-nav-links {
    gap: 6px;
  }

  .route-button {
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon meta";
    column-gap: 12px;
    row-gap: 2px;
    width: 100%;
    min-height: 48px;
    justify-items: stretch;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(245, 241, 230, 0.62);
    text-align: left;
  }

  .route-button .route-icon {
    grid-area: icon;
    width: 21px;
    height: 21px;
    align-self: center;
  }

  .route-button span {
    grid-area: title;
    font-size: 15px;
    font-weight: 500;
  }

  .route-button em {
    grid-area: meta;
    display: none;
  }

  .route-button.is-active,
  .route-button:hover {
    border: 0;
    background: rgba(232, 180, 76, 0.12);
    color: var(--gold-strong);
  }

  .nav-wallet-card {
    margin-top: auto;
    padding: 16px;
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-wallet-card h3 {
    font-size: 13px;
    color: var(--text-dim);
    font-family: var(--ui-font);
  }

  .nav-wallet-card p {
    margin-top: 4px;
    font-family: var(--display-font);
    font-size: 24px;
  }

  .nav-wallet-meta {
    display: grid;
    gap: 10px;
    margin-top: 8px;
  }

  .nav-wallet-meta button {
    width: 100%;
    border-radius: 10px;
    border-color: rgba(232, 180, 76, 0.3);
    background: rgba(232, 180, 76, 0.14);
    color: var(--gold-strong);
  }

  .workbench-page .page-head {
    display: none;
  }

  .workbench-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 30px 48px;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
  }

  .setup-card {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px 22px;
    border-radius: 20px;
    background: var(--bg-elevated);
  }

  .setup-card-head {
    margin-bottom: 22px;
  }

  .setup-card h2 {
    font-size: 20px;
  }

  .workbench-main {
    gap: 22px;
  }

  .birth-summary-bar {
    display: none;
  }

  .chat-card {
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: var(--panel-strong);
  }

  .chat-header {
    display: none;
  }

  .messages {
    flex: 1;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 24px 26px;
    gap: 14px;
  }

  .message {
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 14.5px;
    line-height: 1.7;
  }

  .message.assistant {
    border-top-left-radius: 4px;
    background: var(--panel);
  }

  .message.user {
    border-bottom-right-radius: 4px;
    background: #2a2f5c;
    border: 1px solid rgba(232, 180, 76, 0.18);
    color: var(--text);
  }

  .conversation-empty {
    position: relative;
    align-self: flex-start;
    max-width: 84%;
    margin: 0;
    padding: 13px 16px 13px 56px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px 16px 16px 16px;
    background: var(--panel);
    text-align: left;
    color: rgba(245, 241, 230, 0.9);
  }

  .conversation-empty::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f4ce7a, #e8b44c 60%, #b8863a);
  }

  .conversation-empty strong {
    font-family: var(--ui-font);
    font-size: 14.5px;
    font-weight: 700;
  }

  .conversation-empty p {
    margin-top: 6px;
    color: rgba(245, 241, 230, 0.68);
    font-size: 14.5px;
    line-height: 1.7;
  }

  .composer {
    flex-shrink: 0;
    margin: 0;
    padding: 14px 28px 18px;
    border-width: 1px 0 0;
    border-radius: 0;
    background: transparent;
  }

  .composer textarea {
    min-height: 46px;
    max-height: 120px;
    margin: 0;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14.5px;
  }

  .composer-bar {
    margin-top: 10px;
  }

  #sendButton {
    height: 46px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
  }

  .result-card {
    padding: 24px;
    border-radius: 20px;
    background: var(--bg-elevated);
  }

  .result-head .section-eyebrow,
  .chat-header .section-eyebrow,
  .page-head .section-eyebrow,
  .setup-card-head .section-eyebrow {
    display: none;
  }

  .result-overview-grid {
    display: none;
  }

  .wallet-page,
  .memory-page,
  .account-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 44px 40px;
  }
}

@media (max-width: 980px) {
  body {
    background: var(--bg);
  }

  body[data-route="landing"] .site-header {
    padding: 14px 18px;
  }

  body[data-route="landing"] .header-landing-cta {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
  }

  body:not([data-route="landing"]) .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: none;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(15, 18, 38, 0.92);
    backdrop-filter: blur(10px);
  }

  body:not([data-route="landing"]) .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: transparent;
    background: radial-gradient(circle at 30% 30%, #f4ce7a, #e8b44c 58%, #b8863a);
  }

  body:not([data-route="landing"]) .brand-copy strong {
    font-size: 17px;
  }

  body:not([data-route="landing"]) .brand-copy small,
  body:not([data-route="landing"]) .header-account,
  body:not([data-route="landing"]) .metric-pill:first-child {
    display: none;
  }

  body:not([data-route="landing"]) .header-metrics {
    width: auto;
  }

  body:not([data-route="landing"]) .metric-pill {
    min-width: auto;
    padding: 6px 12px;
    border-radius: 999px;
    border-color: rgba(232, 180, 76, 0.28);
    background: rgba(232, 180, 76, 0.12);
    color: var(--gold-strong);
  }

  body:not([data-route="landing"]) .metric-pill span {
    display: none;
  }

  body:not([data-route="landing"]) .metric-pill strong {
    margin: 0;
    font-size: 13px;
  }

  .site-main {
    padding: 0 0 78px;
  }

  .app-shell {
    display: block;
  }

  .landing-hero {
    padding: 62px 20px 54px;
  }

  .landing-copy h1 {
    font-size: 38px;
  }

  .landing-copy p {
    font-size: 15px;
  }

  .feature-grid {
    padding: 0 20px 48px;
  }

  .poster-preview-card {
    margin: 0 20px 54px;
    padding: 28px;
  }

  .workbench-page .page-head {
    display: none;
  }

  .workbench-layout {
    display: block;
  }

  .birth-summary-bar {
    margin: 0;
    padding: 14px 18px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: var(--bg-elevated);
  }

  .mobile-workbench-switch {
    margin: 12px 18px 4px;
    padding: 4px;
    border-radius: 12px;
    background: transparent;
  }

  .segment-button {
    border-radius: 10px;
  }

  .workbench-main {
    display: block;
  }

  .workbench-pane {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .chat-card {
    display: block;
  }

  .chat-header,
  .result-head {
    display: none;
  }

  .messages {
    height: auto;
    min-height: calc(100vh - 290px);
    margin: 0;
    padding: 20px 18px 150px;
  }

  .composer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 64px;
    z-index: 35;
    margin: 0;
    padding: 12px 18px 14px;
    border-width: 1px 0 0;
    border-radius: 0;
    background: var(--bg);
  }

  .composer textarea {
    min-height: 44px;
    max-height: 110px;
    margin: 0;
    border-radius: 12px;
    background: var(--bg-elevated);
  }

  .composer-bar {
    flex-direction: row;
    align-items: center;
    margin-top: 8px;
  }

  #sendButton {
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  .setup-card {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1002;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    background: var(--panel-strong);
  }

  body.birth-sheet-open .composer,
  body.birth-sheet-open .mobile-tabbar {
    display: none;
  }

  .wallet-page,
  .memory-page,
  .account-page {
    padding: 24px 18px 96px;
  }

  .mobile-tabbar {
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    background: rgba(15, 18, 38, 0.94);
  }

  .mobile-tab {
    border-radius: 10px;
  }

  .mobile-tab.is-active {
    background: transparent;
    color: var(--gold-strong);
  }
}

.messages .conversation-empty {
  position: relative;
  align-self: flex-start;
  max-width: 88%;
  margin: 0;
  padding: 13px 16px 13px 56px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px 16px 16px 16px;
  background: var(--panel);
  text-align: left;
  color: rgba(245, 241, 230, 0.9);
}

.messages .conversation-empty::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f4ce7a, #e8b44c 60%, #b8863a);
}

.messages .conversation-empty strong {
  display: block;
  color: inherit;
  font-family: var(--ui-font);
  font-size: 14.5px;
  font-weight: 700;
}

.messages .conversation-empty p {
  margin: 6px 0 0;
  color: rgba(245, 241, 230, 0.68);
  font-size: 14.5px;
  line-height: 1.7;
}

.setup-card-head .section-eyebrow {
  display: none;
}
