:root {
  --bg: #f4f1e8;
  --panel: rgba(255, 252, 246, 0.94);
  --panel-strong: #fffaf0;
  --line: rgba(64, 45, 26, 0.12);
  --text: #2a2218;
  --muted: #7b6a58;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --gold: #b7791f;
  --danger: #b45309;
  --shadow: 0 22px 60px rgba(58, 43, 28, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(183, 121, 31, 0.12), transparent 24%),
    radial-gradient(circle at left 15%, rgba(15, 118, 110, 0.12), transparent 26%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
}

a {
  color: var(--accent);
}

.app-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero,
.panel,
.stat-card,
.command-strip,
.lane-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 32px;
  padding: 28px 30px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.eyebrow,
.panel-kicker,
.stat-label,
.lane-note,
.subpanel-note,
.theme-meta,
.author-meta,
.idea-meta,
.score-caption,
.stat-note {
  color: var(--muted);
}

.eyebrow,
.panel-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  margin: 0 0 10px;
}

.hero h1,
.panel h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
}

.hero-text {
  max-width: 760px;
  margin: 14px 0 0;
  line-height: 1.7;
  color: #47392a;
}

.hero-actions,
.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.window-switcher,
.hero-buttons,
.meta-row,
.feed-meta,
.feed-tags,
.symbol-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.window-chip,
.ghost-button,
.toolbar-button,
.symbol-chip,
.pill,
.search-form button,
.mini-form button {
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.window-chip,
.toolbar-button,
.symbol-chip,
.pill,
.ghost-button {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
}

.window-chip,
.toolbar-button,
.symbol-chip,
.pill {
  background: rgba(90, 72, 53, 0.08);
  color: var(--text);
}

.window-chip.is-active,
.toolbar-button.is-active,
.symbol-chip.is-active,
.ghost-button:hover,
.symbol-chip:hover,
.pill:hover,
.toolbar-button:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(15, 118, 110, 0.08);
  text-decoration: none;
  color: var(--accent);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.1;
}

.stat-note {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.command-strip {
  margin-top: 18px;
  border-radius: var(--radius-xl);
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.search-form,
.mini-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-form {
  flex: 1 1 560px;
}

.mini-form {
  flex: 1 1 280px;
}

.search-form input,
.mini-form input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(90, 72, 53, 0.16);
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 16px;
  color: var(--text);
  outline: none;
}

.search-form button,
.mini-form button {
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  padding: 14px 18px;
  white-space: nowrap;
}

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

.panel,
.lane-panel {
  border-radius: var(--radius-xl);
  padding: 20px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header,
.subpanel-header,
.lane-header,
.hot-symbol-top,
.score-row,
.symbol-header,
.idea-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.panel-header.compact {
  margin-bottom: 16px;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(183, 121, 31, 0.12);
  color: #8a5a16;
  font-size: 13px;
}

.subpanel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hot-symbols-list,
.theme-list,
.feed-list,
.author-list,
.trade-ideas-list,
.lane-feed {
  display: grid;
  gap: 12px;
}

.hot-symbol-card,
.feed-card,
.author-card,
.idea-card,
.theme-card,
.symbol-card {
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid rgba(74, 56, 38, 0.08);
  padding: 16px;
}

.hot-symbol-card,
.symbol-chip,
.pill,
.feed-card {
  cursor: pointer;
}

.hot-symbol-card:hover,
.feed-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(58, 43, 28, 0.08);
}

.hot-symbol-card h3,
.feed-card h3,
.theme-card h3,
.author-card strong,
.idea-card h3,
.symbol-card h3 {
  margin: 0;
}

.hot-symbol-rank {
  font-size: 12px;
  color: var(--muted);
}

.score {
  font-size: 28px;
  font-weight: 700;
}

.score-caption,
.feed-meta,
.author-meta,
.idea-meta {
  font-size: 13px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(54, 42, 28, 0.07);
  color: #5f4a35;
}

.feed-symbol {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.feed-body,
.idea-reason,
.hero-text,
.drawer-section p {
  line-height: 1.7;
}

.feed-body {
  margin-top: 10px;
  color: #4c3c2e;
}

.feed-tags {
  margin-top: 12px;
}

.theme-bar {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(90, 72, 53, 0.08);
  overflow: hidden;
}

.theme-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c48a2d 0%, #0f766e 100%);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.compact-card {
  padding: 14px;
}

.compact-list {
  margin-top: 14px;
}

.empty-state {
  border-radius: 16px;
  border: 1px dashed rgba(90, 72, 53, 0.18);
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.tone-bullish,
.tone-positive {
  color: var(--accent);
}

.tone-bearish,
.tone-negative {
  color: var(--danger);
}

.detail-drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.detail-drawer.is-open {
  pointer-events: auto;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 14, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.detail-drawer.is-open .drawer-scrim {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100%;
  background: #fffaf2;
  box-shadow: -24px 0 50px rgba(38, 27, 18, 0.18);
  padding: 26px 24px;
  transform: translateX(100%);
  transition: transform 200ms ease;
  overflow: auto;
}

.detail-drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(90, 72, 53, 0.08);
  cursor: pointer;
  font-size: 22px;
}

.drawer-content {
  margin-top: 24px;
}

.drawer-section + .drawer-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .stats-grid,
  .dashboard-grid,
  .lane-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 14px;
  }

  .hero,
  .command-strip {
    padding: 18px;
  }

  .hero,
  .hero-actions {
    flex-direction: column;
  }

  .stats-grid,
  .dashboard-grid,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .search-form,
  .mini-form {
    flex: 1 1 100%;
  }

  .search-form,
  .mini-form,
  .panel-header,
  .subpanel-header,
  .lane-header,
  .symbol-header,
  .idea-header {
    flex-direction: column;
  }
}
