:root {
  color-scheme: dark;
  --bg: #111312;
  --panel: #1b1f1d;
  --panel-2: #232824;
  --line: #343b36;
  --ink: #f4f6f0;
  --muted: #aeb8af;
  --gold: #d8a235;
  --gold-2: #f1d17a;
  --green: #22c55e;
  --red: #ef4444;
  --gray: #6b7280;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.page {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 46px 0 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.dual-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.market-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.market-card.gold {
  border-color: rgba(216, 162, 53, 0.58);
}

.market-card.silver {
  border-color: rgba(209, 213, 219, 0.42);
}

.market-card h2 {
  margin-bottom: 12px;
}

.market-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-price {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #131714;
}

.market-price span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.market-price strong {
  font-size: 24px;
}

.market-card p {
  margin-top: 12px;
  line-height: 1.6;
}

.kpi-card {
  min-height: 118px;
}

.kpi-card span,
.silver-strip span,
.gold-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.kpi-card strong,
.silver-strip strong,
.gold-strip strong {
  display: block;
  color: #f4f6f0;
  font-size: 27px;
  line-height: 1.18;
}

.kpi-card small,
.gold-strip small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.kpi-card.good strong {
  color: #86efac;
}

.kpi-card.bad strong {
  color: #fca5a5;
}

.silver-strip,
.gold-strip {
  display: grid;
  gap: 8px;
  align-items: center;
}

.silver-strip {
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: rgba(209, 213, 219, 0.34);
}

.silver-strip p {
  grid-column: 1 / -1;
  margin-top: 0;
  color: #e7ece8;
}

.gold-strip {
  grid-column: span 2;
  border-color: rgba(216, 162, 53, 0.42);
}

.gold-strip strong {
  color: var(--gold-2);
  font-size: 22px;
}

.silver-plate-panel {
  margin-bottom: 14px;
  border-color: rgba(209, 213, 219, 0.32);
}

.silver-plate-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 10px;
  margin-top: 12px;
}

.silver-plate-inputs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.silver-plate-analysis {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.silver-risk-first,
.silver-plate-advice,
.silver-plate-outlook div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #121613;
  line-height: 1.6;
}

.silver-risk-first {
  border-color: rgba(216, 162, 53, 0.34);
  color: #f4f6f0;
}

.silver-report-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(216, 162, 53, 0.08), rgba(15, 18, 16, 0.98));
}

.silver-report-section h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 15px;
}

.silver-report-section p {
  margin: 0;
  color: #eef2ed;
  line-height: 1.7;
}

.silver-sentiment-meter {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(209, 213, 219, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.silver-sentiment-meter span,
.silver-sentiment-meter small {
  color: var(--muted);
}

.silver-sentiment-meter b {
  font-size: 22px;
}

.silver-driver-list {
  margin: 0;
  padding-left: 20px;
  color: #e7ece8;
  line-height: 1.7;
}

.silver-driver-list li + li {
  margin-top: 6px;
}

.silver-plate-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.silver-plate-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #151916;
}

.silver-plate-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.silver-plate-grid b {
  display: block;
  font-size: 19px;
  color: #f4f6f0;
}

.silver-plate-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.silver-plate-outlook {
  display: grid;
  gap: 8px;
}

.silver-plate-advice.good {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

.silver-plate-advice.bad {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.silver-plate-advice p {
  margin-top: 6px;
  color: #e7ece8;
  line-height: 1.6;
}

.intel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.radar-status,
.tech-alert-status {
  margin: 12px 0;
  color: #e7ece8;
  line-height: 1.55;
}

.macro-brief {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.macro-brief h2 {
  margin-bottom: 10px;
}

.macro-brief-status {
  display: grid;
  gap: 10px;
}

.macro-metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  background: #151916;
}

.macro-metric.good {
  border-color: rgba(34, 197, 94, 0.48);
}

.macro-metric.bad {
  border-color: rgba(239, 68, 68, 0.48);
}

.macro-metric span {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 6px;
}

.macro-metric p {
  color: #f4f6f0;
  line-height: 1.6;
}

.macro-metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.radar-list,
.tech-alert-list {
  display: grid;
  gap: 10px;
}

.radar-item,
.tech-alert,
.scenario-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #151916;
}

.radar-item strong,
.scenario-item strong {
  display: block;
  line-height: 1.5;
}

.radar-item p,
.scenario-item p {
  margin-top: 6px;
  line-height: 1.6;
  color: #e7ece8;
}

.scenario-item.bullish {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.09);
}

.scenario-item.bearish {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.radar-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.radar-tag {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 950;
}

.radar-item.bullish {
  border-color: rgba(239, 68, 68, 0.45);
}

.radar-item.bullish .radar-tag {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.radar-item.bearish {
  border-color: rgba(34, 197, 94, 0.45);
}

.radar-item.bearish .radar-tag {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.radar-item.neutral .radar-tag {
  background: rgba(156, 163, 175, 0.16);
  color: #d1d5db;
}

.skeleton-line {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #222822, #303830, #222822);
  background-size: 180% 100%;
  animation: skeleton 1.2s infinite linear;
}

.skeleton-line.short {
  width: 64%;
}

@keyframes skeleton {
  from { background-position: 180% 0; }
  to { background-position: -180% 0; }
}

.tech-alert {
  color: #f4f6f0;
  line-height: 1.55;
}

.tech-alert.bullish,
.tech-alert.trend {
  border-color: rgba(216, 162, 53, 0.46);
}

.weekend-scenario {
  margin-top: 12px;
  color: var(--muted);
}

.weekend-scenario summary {
  cursor: pointer;
  color: var(--gold-2);
  font-weight: 900;
}

.scenario-item {
  margin-top: 10px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
}

p,
small,
.muted {
  color: var(--muted);
}

button {
  border: 0;
  border-radius: 7px;
  min-height: 40px;
  padding: 0 16px;
  background: var(--gold);
  color: #171717;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--gold-2);
}

input {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #111512;
  color: #fff;
  font-size: 14px;
}

select {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #111512;
  color: #fff;
  font-size: 14px;
}

img,
svg {
  max-width: 100%;
}

.summary-card,
.manual-card,
.panel,
.chat-panel,
.event-section,
.action-card,
.plain-card,
.decision-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-card {
  padding: 20px;
  margin-bottom: 14px;
  border-color: rgba(216, 162, 53, 0.55);
  box-shadow: 0 0 0 1px rgba(216, 162, 53, 0.12);
}

.summary-title {
  color: var(--gold-2);
  font-size: 21px;
  font-weight: 950;
  margin-bottom: 10px;
}

.summary-line {
  font-size: 18px;
  line-height: 1.72;
}

.manual-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) repeat(3, minmax(145px, 1fr)) 116px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
}

.manual-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.action-card {
  padding: 18px;
}

.action-card.good {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(27, 31, 29, 0.96));
}

.action-card.bad {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(27, 31, 29, 0.96));
}

.action-card.neutral {
  border-color: rgba(156, 163, 175, 0.4);
}

.action-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.action-text {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.42;
  font-weight: 950;
}

.action-detail {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.plain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.decision-panel {
  border: 1px solid rgba(216, 162, 53, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(216, 162, 53, 0.1), var(--panel));
  padding: 18px;
  margin-bottom: 14px;
}

.decision-panel.good {
  border-color: rgba(34, 197, 94, 0.48);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(24, 29, 25, 0.98));
}

.decision-panel.bad {
  border-color: rgba(239, 68, 68, 0.48);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(24, 29, 25, 0.98));
}

.decision-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.decision-kicker {
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 950;
  margin-bottom: 7px;
}

.decision-head h2 {
  font-size: 28px;
  line-height: 1.25;
}

.decision-action {
  min-width: 168px;
  border-radius: 7px;
  padding: 10px 12px;
  text-align: center;
  font-size: 18px;
  font-weight: 950;
  background: #121613;
  border: 1px solid var(--line);
}

.decision-action.good {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}

.decision-action.bad {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.decision-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.decision-summary-grid div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #131714;
}

.decision-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.decision-summary-grid b {
  display: block;
  color: #f4f6f0;
  font-size: 19px;
  line-height: 1.35;
}

.decision-summary-grid b.good {
  color: #86efac;
}

.decision-summary-grid b.bad {
  color: #fca5a5;
}

.decision-summary-grid b.neutral {
  color: #d1d5db;
}

.price-zone-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121613;
  margin-bottom: 14px;
}

.price-zone-table th,
.price-zone-table td {
  padding: 11px 10px;
}

.price-zone-table td:first-child {
  color: var(--gold-2);
  font-weight: 900;
}

.driver-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.driver-strip span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #151916;
  color: #e7ece8;
  line-height: 1.5;
}

.boss-summary {
  border-radius: 7px;
  padding: 13px 14px;
  background: rgba(216, 162, 53, 0.12);
  color: #f4f6f0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.65;
}

.plain-card {
  padding: 16px;
}

.plain-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.plain-title {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
}

.plain-body {
  margin-top: 8px;
  color: #d7ded8;
  line-height: 1.62;
}

.good .plain-title,
.up {
  color: var(--green);
}

.bad .plain-title,
.down {
  color: var(--red);
}

.neutral .plain-title,
.side {
  color: #d1d5db;
}

.event-section,
.panel,
.chat-panel {
  padding: 16px;
  margin-bottom: 14px;
}

.summary-strip {
  margin: 12px 0;
  padding: 12px;
  border-radius: 7px;
  background: var(--panel-2);
  color: #e7ece8;
  line-height: 1.65;
}

.event-list,
.news-list {
  display: grid;
  gap: 10px;
}

.event-item,
.news-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #151916;
}

.event-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 72px 72px 88px;
  gap: 12px;
  align-items: center;
}

.event-item time {
  color: var(--gold-2);
  font-weight: 900;
}

.event-item small,
.news-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.news-rank {
  margin-bottom: 7px;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
}

.news-title {
  margin-top: 6px;
  color: #f4f6f0;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.55;
}

.impact {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 9px;
  background: #2b312d;
  color: #d1d5db;
  font-size: 12px;
}

.impact.high {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.event-status,
.direction {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.event-status {
  background: #2b312d;
  color: #d1d5db;
}

.event-status.done {
  background: rgba(216, 162, 53, 0.17);
  color: var(--gold-2);
}

.direction.good {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.direction.bad {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.direction.neutral {
  background: rgba(156, 163, 175, 0.16);
  color: #d1d5db;
}

.news-holdings {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.bottom-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.bottom-workspace .chat-panel,
.bottom-workspace .panel {
  margin-bottom: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compact-head {
  align-items: start;
}

.compact-head p {
  margin-top: 5px;
  line-height: 1.55;
}

.site-form {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  margin: 12px 0;
}

.site-result {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #121613;
  color: #e7ece8;
  line-height: 1.6;
}

.boss-line {
  margin: 12px 0;
  color: var(--gold-2);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 900;
}

.boss-line span,
.boss-line em,
.boss-line small {
  display: block;
}

.boss-line strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.22;
}

.boss-line em {
  margin-top: 7px;
  color: #f4f6f0;
  font-style: normal;
  font-size: 15px;
}

.boss-line small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.holding-mobile-cards {
  display: none;
}

.holding-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #121613;
}

.holding-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #f4f6f0;
}

.holding-card span {
  color: var(--gold-2);
  font-weight: 900;
}

.holding-card p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.holding-card strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 800;
}

.holding-editor {
  margin-top: 12px;
  color: var(--muted);
}

.cognition-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cognition-box h3 {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 17px;
}

.cognition-list {
  display: grid;
  gap: 9px;
}

.cognition-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #121613;
}

.cognition-item span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(216, 162, 53, 0.16);
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
}

.cognition-item p {
  color: #f4f6f0;
  line-height: 1.58;
}

.cognition-item.featured {
  border-color: rgba(216, 162, 53, 0.32);
}

.cognition-more {
  color: var(--muted);
}

.cognition-more summary {
  cursor: pointer;
  color: var(--gold-2);
  font-weight: 900;
  margin: 4px 0 8px;
}

.silver-trend-panel {
  min-width: 0;
}

.trend-summary {
  margin: 12px 0;
  line-height: 1.65;
  color: #e7ece8;
}

.trend-chart {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121613;
  overflow: hidden;
  touch-action: pan-y;
}

.trend-chart.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 250px;
}

.chart-bg {
  fill: #121613;
}

.grid-line {
  stroke: #2e352f;
  stroke-width: 1;
}

.axis-label {
  fill: #aeb8af;
  font-size: 12px;
}

.price-line {
  fill: none;
  stroke: #cfd5dd;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-dot {
  fill: #f4f6f0;
  stroke: #111312;
  stroke-width: 2;
  cursor: pointer;
}

.price-dot.active {
  fill: var(--gold-2);
  stroke: var(--gold);
}

.trend-tip {
  min-height: 44px;
  margin-top: 10px;
  color: #f4f6f0;
  line-height: 1.55;
}

.trend-tip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.holding-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.messages {
  min-height: 190px;
  max-height: 420px;
  overflow-y: auto;
  margin: 12px 0;
  display: grid;
  gap: 10px;
}

.msg {
  max-width: 88%;
  padding: 12px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.msg.user {
  justify-self: end;
  background: var(--gold);
  color: #111;
  font-weight: 700;
}

.msg.bot {
  justify-self: start;
  background: #222822;
  color: #fff;
  border: 1px solid var(--line);
}

.msg.bot.ai {
  border-color: rgba(216, 162, 53, 0.42);
}

.msg.bot.thinking {
  color: var(--muted);
  position: relative;
}

.msg.bot.thinking::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 6px;
  margin-left: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), transparent);
  animation: skeleton 1s infinite linear;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
}

footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.module-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid rgba(216, 162, 53, 0.2);
  border-radius: 12px;
  background: rgba(17, 19, 18, 0.92);
  backdrop-filter: blur(10px);
}

.module-tab {
  min-height: 46px;
  background: #171b18;
  color: #e7ece8;
  border: 1px solid var(--line);
}

.module-tab.active {
  background: linear-gradient(135deg, rgba(216, 162, 53, 0.95), rgba(241, 209, 122, 0.92));
  color: #15120a;
  border-color: rgba(241, 209, 122, 0.65);
}

.module-screen {
  display: none;
}

.module-screen.active {
  display: block;
}

.placeholder-module .panel {
  min-height: 260px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.loan-hero {
  border-color: rgba(216, 162, 53, 0.36);
  background: linear-gradient(135deg, rgba(216, 162, 53, 0.16), #181d19 62%);
}

.loan-hero span {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 8px;
}

.loan-hero h2 {
  font-size: 28px;
  line-height: 1.25;
}

.loan-hero p {
  margin-top: 8px;
  line-height: 1.65;
}

.loan-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: start;
}

.loan-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.loan-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.loan-form button {
  margin-top: 4px;
}

.loan-result.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
}

.loan-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.loan-result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #121613;
}

.loan-result-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.loan-result-card b {
  color: #f4f6f0;
  font-size: 18px;
  line-height: 1.4;
}

.loan-boss-line {
  margin-top: 12px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(216, 162, 53, 0.12);
  color: #f4f6f0;
  line-height: 1.65;
  font-weight: 850;
}

.loan-analysis-title {
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 8px;
}

.loan-boss-line p {
  margin-top: 8px;
  color: #f4f6f0;
}

.loan-tip-list {
  display: grid;
  gap: 10px;
}

.loan-tip-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #121613;
  color: #e7ece8;
  line-height: 1.6;
}

.loan-summary-panel {
  border-color: rgba(216, 162, 53, 0.3);
}

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

.loan-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #121613;
}

.loan-summary-card > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.loan-summary-card b {
  color: #f4f6f0;
  font-size: 19px;
  line-height: 1.35;
}

.loan-profit-good {
  color: var(--gold-2);
}

.loan-profit-bad {
  color: var(--red);
}

.loan-summary-card b .loan-profit-good {
  color: var(--gold-2);
  font-size: inherit;
  line-height: inherit;
}

.loan-summary-card b .loan-profit-bad {
  color: var(--red);
  font-size: inherit;
  line-height: inherit;
}

.loan-book-panel .panel-head p {
  margin-top: 5px;
  line-height: 1.55;
}

.loan-table-wrap {
  margin-top: 12px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.loan-table {
  min-width: 1160px;
}

.destination-table {
  min-width: 920px;
}

.loan-table th,
.loan-table td {
  padding: 8px 7px;
  vertical-align: middle;
}

.loan-table input {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
}

.auto-value {
  display: block;
  min-width: 96px;
  color: #f4f6f0;
  font-weight: 850;
}

.muted-auto {
  color: var(--muted);
}

.destination-value-cell {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.destination-value-cell label {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.destination-value-cell input {
  min-height: 34px;
}

.loan-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.loan-table td:nth-child(5),
.loan-table td:nth-child(6),
.loan-table td:nth-child(7),
.loan-table td:nth-child(8) {
  color: #e7ece8;
}

.destination-name-cell {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.tiny-btn,
.inline-delete {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

.tiny-btn.danger,
.inline-delete {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.tiny-btn.danger:hover,
.inline-delete:hover {
  background: rgba(239, 68, 68, 0.28);
}

.loan-mobile-list {
  display: none;
}

.loan-mobile-total {
  display: none;
}

.loan-mobile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #121613;
}

.loan-mobile-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.loan-mobile-card b {
  color: var(--gold-2);
  line-height: 1.35;
}

.loan-mobile-card button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.loan-mobile-card p {
  margin-top: 8px;
  line-height: 1.55;
  color: #f4f6f0;
}

.loan-mobile-card small {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.loan-mobile-edit {
  display: none;
  margin-top: 10px;
  gap: 8px;
}

.loan-mobile-edit label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.loan-mobile-edit input {
  width: 100%;
  min-height: 38px;
}

.loan-table tfoot td {
  border-bottom: 0;
  background: rgba(216, 162, 53, 0.1);
  color: var(--gold-2);
  font-size: 16px;
}

.stock-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.stock-hero button {
  width: auto;
  min-width: 132px;
}

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

.stock-decision-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: start;
}

.execution-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  align-items: start;
}

.execution-grid .backtest-panel {
  grid-column: 1 / -1;
}

.market-bottom-grid {
  grid-template-columns: minmax(260px, 0.72fr) minmax(260px, 0.72fr) minmax(360px, 1.1fr);
  align-items: start;
}

.market-analysis-panel {
  border-color: rgba(216, 162, 53, 0.38);
}

.stock-primary-panel {
  border-color: rgba(216, 162, 53, 0.5);
}

.stock-risk-panel {
  border-color: rgba(239, 68, 68, 0.34);
}

.stock-risk-panel .stock-strategy-box {
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.stock-table {
  min-width: 1040px;
}

.fund-table {
  min-width: 1320px;
}

.fund-table td:nth-child(10) {
  min-width: 260px;
  color: #e7ece8;
  line-height: 1.5;
}

.fund-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.stock-table td:nth-child(8) {
  min-width: 220px;
  color: #e7ece8;
  line-height: 1.5;
}

.stock-strategy-box {
  margin-top: 12px;
  display: grid;
  gap: 9px;
  color: #e7ece8;
  line-height: 1.6;
}

.stock-strategy-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #121613;
}

.stock-strategy-line .tiny-btn {
  margin-top: 9px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.stock-strategy-line.red-alert {
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(239, 68, 68, 0.12);
}

.stock-strategy-line.muted-strategy {
  opacity: 0.62;
  filter: grayscale(0.45);
}

.anomaly-item.hot-signal {
  border-color: rgba(34, 197, 94, 0.72);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(216, 162, 53, 0.1));
}

.anomaly-item.watch-signal {
  border-color: rgba(216, 162, 53, 0.5);
  background: rgba(216, 162, 53, 0.08);
}

.anomaly-item p,
.anomaly-item small {
  display: block;
  margin-top: 6px;
  color: #e7ece8;
  line-height: 1.55;
}

.stock-risk-summary {
  border: 1px solid rgba(216, 162, 53, 0.32);
  border-radius: 8px;
  padding: 12px;
  background: rgba(216, 162, 53, 0.1);
  color: #f4f6f0;
  font-weight: 850;
  line-height: 1.6;
}

.stock-risk-summary.red-alert {
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(239, 68, 68, 0.12);
}

.stock-sell-input {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
}

.stock-select-line {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
}

.stock-pool-grid {
  display: grid;
  gap: 10px;
}

.stock-pool-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #121613;
}

.stock-pool-grid b {
  color: var(--gold-2);
}

.stock-pool-grid p {
  margin-top: 7px;
  line-height: 1.55;
  color: #e7ece8;
}

.trade-log-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.trade-log-form input,
.trade-log-form select {
  width: 100%;
}

.sandbox-form {
  grid-template-columns: 1fr 170px;
}

.stock-log-table {
  min-width: 1180px;
}

.saved-at {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .hero,
  .dual-market-grid,
  .intel-grid,
  .market-price-grid,
  .manual-card,
  .action-grid,
  .plain-grid,
  .decision-head,
  .decision-summary-grid,
  .driver-strip,
  .news-holdings,
  .bottom-workspace,
  .event-item,
  .site-form,
  .loan-grid,
  .stock-grid,
  .trade-log-form,
  .sandbox-form {
    grid-template-columns: 1fr;
  }

  .silver-strip,
  .gold-strip {
    grid-column: auto;
  }

  .silver-strip {
    grid-template-columns: 1fr;
  }

  .silver-plate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    display: grid;
  }

  .decision-head {
    display: grid;
  }

  .decision-action {
    width: 100%;
  }

  .impact,
  .event-status,
  .direction {
    justify-self: start;
  }

  h1 {
    font-size: 25px;
  }

  .action-text {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100%, calc(100vw - 18px));
    padding: 16px 0 22px;
  }

  .hero {
    gap: 12px;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  button {
    width: 100%;
    min-height: 44px;
  }

  input {
    min-height: 44px;
    font-size: 16px;
  }

  select {
    min-height: 44px;
    font-size: 16px;
  }

  .module-nav {
    grid-template-columns: repeat(4, minmax(78px, 1fr));
    gap: 7px;
    margin-bottom: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .module-tab {
    width: auto;
    min-height: 42px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .market-card,
  .summary-card,
  .manual-card,
  .decision-panel,
  .panel,
  .chat-panel,
  .event-section {
    padding: 12px;
    border-radius: 7px;
  }

  .market-price strong {
    font-size: 21px;
  }

  .silver-plate-inputs,
  .silver-plate-grid {
    grid-template-columns: 1fr;
  }

  .silver-sentiment-meter {
    grid-template-columns: 1fr;
  }

  .summary-title {
    font-size: 18px;
  }

  .summary-line {
    font-size: 15px;
    line-height: 1.7;
  }

  .decision-head h2 {
    font-size: 22px;
  }

  .decision-summary-grid b {
    font-size: 17px;
  }

  .boss-summary {
    font-size: 15px;
  }

  .driver-strip span,
  .macro-metric,
  .radar-item,
  .news-item,
  .event-item,
  .tech-alert,
  .scenario-item,
  .cognition-item {
    padding: 10px;
  }

  .event-item {
    gap: 8px;
  }

  .price-zone-table,
  table {
    min-width: 640px;
  }

  .messages {
    max-height: 340px;
  }

  .msg {
    max-width: 94%;
  }

  .news-holdings {
    gap: 10px;
  }

  .news-list {
    gap: 8px;
  }

  .news-item {
    padding: 11px;
  }

  .news-rank {
    font-size: 12px;
  }

  .news-title {
    font-size: 15px;
  }

  .summary-strip {
    padding: 10px;
    font-size: 14px;
  }

  .holding-mobile-cards {
    display: grid;
    gap: 8px;
  }

  .table-wrap table {
    display: none;
  }

  .boss-line {
    font-size: 15px;
  }

  .boss-line strong {
    font-size: 24px;
  }

  .cognition-item:not(.featured) {
    margin-top: 8px;
  }

  .chat-panel p {
    line-height: 1.55;
    font-size: 14px;
  }

  .messages {
    min-height: 160px;
  }

  .msg {
    padding: 11px;
    font-size: 14px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .loan-hero h2 {
    font-size: 22px;
  }

  .loan-result-grid {
    grid-template-columns: 1fr;
  }

  .stock-hero {
    display: grid;
  }

  .stock-hero button {
    width: 100%;
  }

  .loan-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .loan-summary-card {
    padding: 10px;
  }

  .loan-summary-card b {
    font-size: 16px;
  }

  .loan-book-panel .panel-head {
    gap: 8px;
  }

  .loan-mobile-list {
    display: grid;
    gap: 8px;
  }

  .loan-mobile-edit {
    display: grid;
  }

  .loan-mobile-total {
    display: block;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid rgba(216, 162, 53, 0.32);
    border-radius: 8px;
    background: rgba(216, 162, 53, 0.1);
    color: var(--gold-2);
    line-height: 1.5;
  }

  .loan-table-wrap .table-scroll {
    display: none;
  }

  footer {
    font-size: 12px;
  }
}

/* Option C: mobile-first clear-card interface */
.hero,
.market-card,
.summary-card,
.manual-card,
.decision-panel,
.panel,
.chat-panel,
.event-section {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.hero {
  padding: 18px;
  border: 1px solid rgba(216, 162, 53, 0.18);
  border-radius: 10px;
  background: #171b18;
}

.hero button,
.manual-card button,
.chat-form button,
.site-form button,
#refreshRadarBtn,
#loadSilverTrendBtn {
  border-radius: 9px;
}

.market-card,
.summary-card,
.decision-panel,
.panel,
.chat-panel,
.event-section {
  border-radius: 10px;
}

.decision-panel {
  padding: 20px;
  background: #181d19;
  border-color: rgba(241, 209, 122, 0.38);
}

.decision-kicker,
.summary-title,
.market-card h2,
.panel h2 {
  letter-spacing: 0;
}

.decision-head h2 {
  max-width: 780px;
}

.decision-action {
  background: rgba(216, 162, 53, 0.12);
  border-color: rgba(241, 209, 122, 0.28);
  color: var(--gold-2);
}

.summary-line.compact {
  font-size: 16px;
}

.summary-line.compact small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.manual-card {
  background: #151916;
}

.manual-card > div strong {
  color: var(--gold-2);
}

.news-holdings .panel:nth-child(2) {
  border-color: rgba(241, 209, 122, 0.28);
}

@media (min-width: 981px) {
  .page {
    width: min(1180px, calc(100vw - 36px));
  }

  .decision-panel {
    margin-top: 2px;
  }
}

@media (max-width: 640px) {
  body {
    background: #101310;
  }

  .hero {
    padding: 14px;
  }

  .hero button {
    margin-top: 2px;
  }

  .dual-market-grid,
  .intel-grid,
  .news-holdings,
  .bottom-workspace {
    gap: 10px;
  }

  .dual-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 104px;
  }

  .kpi-card strong,
  .silver-strip strong {
    font-size: 22px;
  }

  .silver-strip,
  .gold-strip {
    grid-column: span 2;
  }

  .gold-strip strong {
    font-size: 19px;
  }

  .market-card p {
    font-size: 14px;
  }

  .decision-panel {
    padding: 14px;
  }

  .decision-kicker {
    font-size: 13px;
  }

  .decision-head h2 {
    font-size: 21px;
  }

  .decision-action {
    font-size: 17px;
  }

  .decision-summary-grid {
    gap: 8px;
  }

  .decision-summary-grid div {
    padding: 10px;
  }

  .driver-strip {
    gap: 8px;
  }

  .summary-card {
    border-color: rgba(241, 209, 122, 0.35);
  }

  .summary-line.compact {
    font-size: 15px;
  }

  .manual-card {
    gap: 10px;
  }

  .panel-head {
    display: grid;
  }

  .panel-head button {
    margin-top: 8px;
  }

  .cognition-box {
    margin-top: 12px;
  }
}

/* Scheme D: sandstone investment UI */
:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: #fff9ef;
  --panel-2: #f7efe2;
  --line: #dfd2bf;
  --ink: #27211a;
  --muted: #6f665a;
  --gold: #c18416;
  --gold-2: #8f5f17;
  --green: #1f7a4d;
  --red: #a33a2a;
  --gray: #8e8e88;
}

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

.page {
  width: min(1180px, calc(100vw - 28px));
  padding-top: 14px;
}

.hero,
.market-card,
.summary-card,
.manual-card,
.decision-panel,
.panel,
.chat-panel,
.event-section,
.action-card,
.plain-card,
.loan-summary-card,
.stock-strategy-line,
.stock-risk-summary,
.silver-risk-first,
.silver-report-section,
.silver-plate-advice,
.silver-plate-outlook div,
.silver-plate-grid div,
.radar-item,
.news-item,
.event-item,
.holding-card,
.loan-mobile-card {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

.hero,
.loan-hero,
.decision-panel,
.decision-panel.good,
.decision-panel.bad,
.summary-card,
.manual-card,
.summary-strip,
.silver-report-section,
.stock-risk-summary {
  background: var(--panel);
  box-shadow: none;
}

.hero {
  border-color: var(--line);
  background: transparent;
}

.module-nav {
  background: rgba(255, 249, 239, 0.96);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(79, 55, 20, 0.08);
}

.module-tab {
  background: #f1e8d8;
  color: #3f372d;
  border: 1px solid transparent;
  border-radius: 9px;
}

.module-tab.active {
  background: #ffe8b8;
  border-color: rgba(193, 132, 22, 0.46);
  color: var(--gold-2);
}

button,
.tiny-btn,
.inline-delete {
  background: #ffe8b8;
  border: 1px solid rgba(193, 132, 22, 0.36);
  color: #5a3b0c;
  box-shadow: none;
}

button:hover,
.tiny-btn:hover,
.inline-delete:hover {
  background: #f8d889;
}

input,
select,
textarea {
  background: #fffaf2;
  border-color: #d7c6ad;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #958a7c;
}

h1,
h2,
h3,
.panel h2,
.market-card h2,
.summary-title,
.decision-kicker,
.loan-analysis-title {
  color: var(--ink);
}

p,
small,
.compact-head p,
.market-card p,
.plain-body,
.radar-status,
.tech-alert-status,
.trend-summary,
.site-result,
.saved-at,
.loan-table small,
.fund-table small,
.news-item p,
.event-item p,
.stock-strategy-line p,
.stock-strategy-line small,
.silver-plate-grid small,
.silver-report-section p,
.silver-sentiment-meter span,
.silver-sentiment-meter small,
.silver-driver-list,
.silver-risk-first,
.loan-boss-line,
.boss-line,
.msg {
  color: #473f35;
}

.muted-auto,
.module-tab,
.kpi-card span,
.market-price span,
.loan-summary-card > span,
.silver-plate-grid span,
.gold-strip span,
.silver-strip span {
  color: var(--muted);
}

.kpi-card strong,
.silver-strip strong,
.gold-strip strong,
.market-price strong,
.loan-summary-card b,
.silver-plate-grid b,
.summary-line,
.decision-head h2,
.portfolio-table b,
.boss-line strong {
  color: var(--ink);
}

.market-card.gold,
.decision-panel,
.summary-card,
.loan-summary-panel,
.market-analysis-panel,
.news-holdings .panel:nth-child(2) {
  border-color: rgba(193, 132, 22, 0.34);
}

.market-card.silver,
.silver-plate-panel {
  border-color: #cbc2b4;
}

.up,
.good .plain-title,
.loan-profit-good {
  color: var(--green);
}

.down,
.bad .plain-title,
.loan-profit-bad,
.stock-strategy-line.red-alert,
.stock-risk-summary.red-alert {
  color: var(--red);
}

.stock-strategy-line.red-alert,
.stock-risk-summary.red-alert,
.silver-plate-advice.bad {
  background: #fff0ec;
  border-color: rgba(163, 58, 42, 0.3);
}

.decision-panel.good,
.silver-plate-advice.good,
.anomaly-item.hot-signal {
  background: #eef8ef;
  border-color: rgba(31, 122, 77, 0.28);
}

.decision-panel.bad {
  background: #fff0ec;
  border-color: rgba(163, 58, 42, 0.3);
}

.summary-strip,
.manual-card,
.trend-chart,
.messages,
.stock-strategy-line.muted-strategy,
.cognition-item,
.loan-tip-list div,
.destination-table tfoot td,
.loan-table tfoot td {
  background: var(--panel-2);
}

table {
  color: var(--ink);
}

th {
  background: #efe3d1;
  color: #5e5347;
}

td {
  color: var(--ink);
}

.loan-table input,
.trade-log-form input,
.trade-log-form select,
.chat-form input,
.site-form input {
  min-height: 42px;
}

.manual-card button,
.chat-form button,
.site-form button,
#refreshRadarBtn,
#loadSilverTrendBtn,
#refreshBtn,
#manualPriceBtn,
#refreshFundBtn,
#refreshStockBtn,
#addLoanRowBtn,
#addLoanDestinationBtn,
#saveLoanBookBtn,
#addStockHoldingBtn,
#addFundHoldingBtn {
  min-height: 42px;
}

.msg.bot,
.msg.local,
.msg.ai {
  background: #efe3d1;
  color: var(--ink);
}

.msg.user {
  background: #ffe8b8;
  color: #30220b;
}

.market-label {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: #4c4236 !important;
  font-weight: 900;
}

.asset-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 10px;
  border: 1px solid rgba(39, 33, 26, 0.14);
  background: #efe3d1;
  color: #3b3024;
}

.asset-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gold-icon,
.trend-icon {
  background: #ffe8b8;
  color: #6a450d;
  border-color: rgba(193, 132, 22, 0.36);
}

.silver-icon {
  background: #e8e6df;
  color: #3d4549;
  border-color: rgba(111, 116, 118, 0.28);
}

.usd-icon,
.fx-icon,
.dxy-icon {
  background: #e5edf0;
  color: #20343d;
  border-color: rgba(57, 83, 95, 0.18);
}

.market-card small,
.silver-strip small,
.gold-strip small,
.loan-result-card span,
.loan-mobile-card span,
.destination-value-cell label,
.loan-mobile-edit label,
.loan-form label,
.manual-card label,
.holding-editor,
.trend-tip span,
.event-status,
.direction.neutral,
.cognition-more,
.fund-table small,
.loan-table small {
  color: #655b4f !important;
}

.market-price,
.loan-result-card,
.holding-card,
.cognition-item,
.trend-chart,
.summary-strip,
.messages,
.stock-strategy-line.muted-strategy,
.loan-tip-list div,
.event-status,
.direction.neutral,
.scenario-item,
.tech-alert,
.stock-strategy-line,
.anomaly-item,
.trade-log-card,
.backtest-card,
.fund-card,
.loan-mobile-card {
  background: #f7efe2 !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.loan-result-card b,
.holding-card div,
.holding-card p,
.cognition-item p,
.trend-summary,
.trend-tip,
.decision-factor,
.decision-summary-grid b,
.event-card,
.event-title,
.stock-strategy-line strong,
.stock-strategy-line p,
.stock-strategy-line small,
.loan-boss-line,
.radar-item strong,
.radar-item p,
.radar-item small,
.tech-alert strong,
.tech-alert p,
.scenario-item strong,
.scenario-item p {
  color: var(--ink) !important;
}

.radar-tag,
.event-status.done,
.direction.up,
.direction.down,
.direction.neutral {
  color: #33281a !important;
  border: 1px solid rgba(39, 33, 26, 0.12);
  font-weight: 950;
}

.radar-item.bullish .radar-tag,
.direction.up,
.event-status.done {
  background: #ffe0d8 !important;
  color: #7b251c !important;
}

.radar-item.bearish .radar-tag,
.direction.down {
  background: #ddf2e4 !important;
  color: #145c39 !important;
}

.radar-item.neutral .radar-tag,
.direction.neutral {
  background: #ede4d6 !important;
  color: #4f463b !important;
}

.action-card.good,
.plain-card.good,
.scenario-item.bullish,
.tech-alert.bullish,
.stock-strategy-line.green-alert,
.anomaly-item.hot-signal {
  background: #eef8ef !important;
  border-color: rgba(31, 122, 77, 0.3) !important;
  color: var(--ink) !important;
}

.action-card.bad,
.plain-card.bad,
.scenario-item.bearish,
.tech-alert.bearish,
.stock-strategy-line.red-alert,
.stock-risk-summary.red-alert {
  background: #fff0ec !important;
  border-color: rgba(163, 58, 42, 0.3) !important;
  color: var(--ink) !important;
}

.loan-boss-line,
.cognition-item span,
.summary-line,
.loan-analysis-title,
.cognition-box h3,
.cognition-more summary {
  color: #7a510f !important;
}

.chart-bg {
  fill: #f7efe2;
}

.grid-line {
  stroke: #d8cbb9;
}

.axis-label {
  fill: #5f5549;
}

.price-dot {
  fill: #8f5f17;
  stroke: #fff9ef;
}

/* Scheme D contrast pass: dark surfaces use white text, light surfaces use dark text. */
.decision-panel,
.decision-panel.good,
.decision-panel.bad {
  background: #fff9ef !important;
  color: var(--ink) !important;
  border-color: rgba(193, 132, 22, 0.36) !important;
}

.decision-panel .decision-kicker,
.decision-panel h2,
.decision-panel .decision-head h2 {
  color: var(--ink) !important;
}

.decision-action {
  background: #fff1d4 !important;
  color: #7a510f !important;
  border-color: rgba(193, 132, 22, 0.32) !important;
}

.decision-action.good {
  background: #e7f6ec !important;
  color: #145c39 !important;
  border-color: rgba(31, 122, 77, 0.32) !important;
}

.decision-action.bad {
  background: #ffe4dd !important;
  color: #7b251c !important;
  border-color: rgba(163, 58, 42, 0.32) !important;
}

.decision-summary-grid div,
.price-zone-wrap,
.driver-strip span {
  background: #111711 !important;
  color: #fffaf0 !important;
  border-color: rgba(255, 249, 239, 0.18) !important;
}

.decision-summary-grid span,
.decision-summary-grid div span,
.driver-strip span small {
  color: #dfd4c2 !important;
}

.decision-summary-grid b,
.decision-summary-grid b.neutral,
.decision-summary-grid div b,
.driver-strip span,
.price-zone-table th,
.price-zone-table td {
  color: #fffaf0 !important;
}

.decision-summary-grid b.good,
.price-zone-table td:first-child {
  color: #f1b83c !important;
}

.decision-summary-grid b.bad {
  color: #ffb2a6 !important;
}

.price-zone-table th {
  background: #1c221c !important;
  color: #efe4d0 !important;
}

.price-zone-table td {
  background: #111711 !important;
}

.price-zone-table tr + tr td,
.price-zone-table th {
  border-color: rgba(255, 249, 239, 0.18) !important;
}

.boss-summary,
.summary-strip {
  background: #fff1d4 !important;
  color: var(--ink) !important;
  border: 1px solid rgba(193, 132, 22, 0.2);
}

.boss-summary *,
.summary-strip * {
  color: inherit;
}

.summary-card,
.panel,
.event-section,
.manual-card,
.chat-panel {
  color: var(--ink) !important;
}

.summary-card p,
.summary-card small,
.panel p,
.panel small,
.event-section p,
.event-section small,
.manual-card label {
  color: #473f35 !important;
}

.hero {
  background: #fff9ef !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.hero h1,
.hero p,
.hero strong {
  color: var(--ink) !important;
}

.loan-hero {
  background: #fff9ef !important;
  color: var(--ink) !important;
}

#goldModule {
  display: flex;
  flex-direction: column;
}

#dualMarketGrid {
  order: 1;
}

#decisionPanel {
  order: 2;
}

#todayConclusion {
  order: 3;
}

.news-holdings {
  order: 4;
}

.news-holdings .panel:nth-child(2) {
  order: 1;
}

.news-holdings .panel:nth-child(1) {
  order: 2;
}

.silver-plate-panel {
  order: 5;
}

.intel-grid {
  order: 6;
}

.manual-card {
  order: 7;
}

.event-section {
  order: 8;
}

.bottom-workspace {
  order: 9;
}

.dual-market-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.news-holdings {
  align-items: start;
}

@media (max-width: 980px) {
  .dual-market-grid,
  .news-holdings,
  .intel-grid,
  .bottom-workspace,
  .stock-grid,
  .loan-grid,
  .market-bottom-grid,
  .execution-grid {
    grid-template-columns: 1fr;
  }

  .news-holdings .panel:nth-child(2) {
    order: 1;
  }

  .news-holdings .panel:nth-child(1) {
    order: 2;
  }
}

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

  .page {
    width: min(100%, calc(100vw - 16px));
    padding-top: 10px;
  }

  .module-nav {
    top: 0;
    padding: 6px;
  }

  .hero,
  .market-card,
  .summary-card,
  .manual-card,
  .decision-panel,
  .panel,
  .chat-panel,
  .event-section {
    padding: 13px;
    border-radius: 10px;
  }

  .loan-summary-cards {
    grid-template-columns: 1fr;
  }

  .kpi-card strong,
  .silver-strip strong,
  .gold-strip strong {
    font-size: 22px;
  }
}
