:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f0f2f5;
  --panel-alt: #ffffff;
  --panel-2: #e4e8ef;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-teal: #0d9488;
  --up: #dc2626;
  --down: #11a656;
  --border: rgba(15, 23, 42, 0.12);
  --warn: #b45309;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

.model-ver {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--muted);
}

.disclaimer {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.82rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel--allow-dropdown {
  overflow: visible;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.fusion-headline {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
}

.fusion-headline.fusion-up { color: var(--up); }
.fusion-headline.fusion-down { color: var(--down); }
.fusion-headline.fusion-warn { color: var(--warn); }

.fusion-sections {
  display: grid;
  gap: 10px;
}

.fusion-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.fusion-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.fusion-signal {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  margin-left: 6px;
}

.fusion-signal.up { color: var(--up); background: #fef2f2; }
.fusion-signal.down { color: var(--down); background: #f0fdf4; }

.fusion-card-detail {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.status { font-size: 0.92rem; }
.status.warn { color: var(--warn); }
.status.error { color: #b91c1c; font-weight: 600; }

.narrative-error {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.5;
}

#narrativePanel.is-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fffbfb;
}

/* 雪球帖：头像左栏，正文紧贴用户名下一行，无段间空行 */
#narrativePanel .narrative-text,
#narrativePanel .feed-post-text {
  margin: 0;
  line-height: 1.5;
  white-space: normal;
}

#narrativePanel .narrative-highlights,
#narrativePanel .feed-post-highlights {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

#narrativePanel .narrative-highlights li,
#narrativePanel .feed-post-highlights li {
  margin-bottom: 2px;
}

#narrativePanel .narrative-highlights li:last-child,
#narrativePanel .feed-post-highlights li:last-child {
  margin-bottom: 0;
}

#techPanel .feed-tech-subhead {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

#techPanel .feed-tech-subhead--minor {
  margin-top: 14px;
}

#techPanel .feed-tech-pattern-intro {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.5;
}

#techPanel .feed-tech-indicators,
#techPanel .feed-tech-patterns {
  margin: 0 0 4px;
}

#techPanel .feed-tech-indicators li,
#techPanel .feed-tech-patterns li {
  margin-bottom: 4px;
  font-size: 0.92rem;
  line-height: 1.55;
}

#techPanel .feed-tech-indicators li:last-child,
#techPanel .feed-tech-patterns li:last-child {
  margin-bottom: 0;
}

#techPanel .feed-tech-empty {
  margin: 0 0 4px;
  font-size: 0.88rem;
}

#techPanel .feed-tech-block {
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

#techPanel .feed-tech-block--last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#fusionPanel .feed-fusion-lead {
  margin: 0 0 10px;
  font-weight: 600;
  line-height: 1.5;
}

#fusionPanel .feed-fusion-sections--flat {
  margin-left: 0;
  gap: 0;
}

#fusionPanel .feed-fusion-flat {
  margin: 0;
}

#fusionPanel .feed-fusion-flat li {
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}

#fusionPanel .feed-fusion-flat li:last-child {
  margin-bottom: 0;
}

.fusion-signal--inline {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 0.05em;
}

.narrative-text {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.narrative-highlights {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.narrative-highlights li {
  margin-bottom: 4px;
}

.narrative-facts {
  margin: 8px 0 12px;
  font-size: 0.84rem;
}

.narrative-facts summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  user-select: none;
}

.narrative-facts-body {
  margin-top: 10px;
}

.narrative-disclaimer {
  margin: 0;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.summary-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.summary-card .label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.summary-card .value {
  font-size: 1.05rem;
  font-weight: 600;
}

.summary-card .value.up { color: var(--up); }
.summary-card .value.down { color: var(--down); }

.chart-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 420px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chart-toolbar button {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.chart-toolbar button:hover {
  border-color: var(--accent);
}

.chart-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.subcharts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
}

@media (max-width: 768px) {
  .subcharts { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 16px; }
}

.subcharts > div {
  min-width: 0;
  overflow: hidden;
}

.subchart {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  min-height: 160px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.subchart-title {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: fixed;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.indicator-table th,
.indicator-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: break-word;
}

.indicator-table th:nth-child(1),
.indicator-table td:nth-child(1) { width: 22%; }

.indicator-table th:nth-child(2),
.indicator-table td:nth-child(2) { width: 28%; }

.indicator-table th:nth-child(3),
.indicator-table td:nth-child(3) { width: 50%; }

.indicator-table th {
  color: var(--muted);
  font-weight: 500;
  background: var(--panel-2);
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.search-row input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.search-row input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.search-row button {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.86rem;
  cursor: pointer;
}

.search-row button:hover:not(:disabled) {
  border-color: var(--accent);
}

.search-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-row .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search-row .btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.search-row .btn-accent {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #fff;
}

.search-row .btn-accent:hover:not(:disabled) {
  background: #0f766e;
  border-color: #0f766e;
}

.search-combobox {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}

.search-combobox--grow {
  flex: 1 1 280px;
}

.search-combobox input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.search-combobox input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  max-height: 300px;
  overflow-y: auto;
}

.search-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 12px 12px 0 0;
}

.search-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}

.search-dropdown__item:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.search-dropdown__item:hover,
.search-dropdown__item.selected {
  background: rgba(37, 99, 235, 0.06);
}

.search-dropdown__item .match {
  color: #ea580c;
  font-style: normal;
  font-weight: 600;
}

.search-dropdown__code {
  color: var(--muted);
}

.search-dropdown__empty {
  padding: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.search-hit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.88rem;
}

.search-hit:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.search-hit.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.search-hit .code {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.catalog-chip {
  background: #fff;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.catalog-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.muted-inline {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 10px;
}

.section-sub {
  margin: 14px 0 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.pattern-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.pattern-card .name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.pattern-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pattern-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #f8fafc;
}

.pattern-tag.bias-up {
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--up);
  background: #fef2f2;
}

.pattern-tag.bias-down {
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--down);
  background: #f0fdf4;
}

.pattern-tag.valid {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
  background: #eff6ff;
}

.pattern-card .note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.pattern-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 8px 0;
}

.pattern-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: fixed;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.pattern-table th,
.pattern-table td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: break-word;
}

.pattern-table th {
  color: var(--muted);
  font-weight: 500;
  background: var(--panel-2);
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

code {
  font-size: 0.85em;
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
}

.watchlist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.watchlist-head h2 {
  margin: 0;
}

.watchlist-storage-note {
  margin: 0.35rem 0 0;
  font-size: 12px;
}

.watchlist-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.watchlist-add-row input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.watchlist-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.watchlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.watchlist-table th,
.watchlist-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.watchlist-table th.col-name,
.watchlist-table td.col-name {
  text-align: left;
}

.watchlist-table th.col-act,
.watchlist-table td.col-act {
  text-align: center;
  width: 72px;
}

.watchlist-table thead th {
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.watchlist-table tbody tr:last-child td {
  border-bottom: none;
}

.watchlist-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

.watchlist-stock-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.watchlist-stock-link:hover .watchlist-stock-name {
  color: var(--accent);
}

.watchlist-stock-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.watchlist-stock-code {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.watchlist-pending {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  color: var(--warn);
  font-weight: 500;
}

.watchlist-remove-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.watchlist-remove-btn:hover {
  border-color: #fca5a5;
  color: #b91c1c;
}

.detail-back-row {
  margin: 0 0 12px;
}

.detail-back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.detail-back-link:hover {
  text-decoration: underline;
}

.num-up { color: var(--up); }
.num-down { color: var(--down); }

/* —— 个股详情（雪球式：行情头 + K 线 + 底部 Tab 流） —— */

body.jishu-detail-mode .site-main {
  padding-top: 12px;
}

body.jishu-detail-mode .wrap {
  padding: 0;
}

.stock-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stock-detail-toolbar {
  margin-bottom: 0;
  padding: 10px 16px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.stock-detail-toolbar .detail-back-link {
  display: inline-block;
  margin-bottom: 0;
}

.stock-detail-search-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
}

.stock-detail-status {
  margin: 0 4px;
  font-size: 0.82rem;
}

.stock-quote-hero {
  margin-bottom: 0;
  padding: 20px 24px;
  background: #fff;
  border-radius: 12px;
}

.stock-quote-hero--compact {
  padding: 12px 16px 14px;
}

.stock-quote-hero--compact .stock-quote-head {
  margin-bottom: 12px;
}

.stock-quote-hero--compact .stock-quote-grid {
  padding-top: 10px;
}

.stock-quote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.stock-quote-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.stock-quote-cell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.stock-quote-cell .label {
  flex-shrink: 0;
  color: var(--muted);
}

.stock-quote-cell .val {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text, #1e293b);
}

.stock-quote-cell .val.up { color: var(--up); }
.stock-quote-cell .val.down { color: var(--down); }

.stock-quote-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.stock-quote-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stock-quote-head-row--bottom {
  align-items: baseline;
}

.stock-quote-head-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.stock-quote-title {
  min-width: 0;
  flex: 1 1 auto;
}

.stock-quote-watch-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 20px;
  min-height: 32px;
  border: 1px solid #287dff;
  border-radius: 999px;
  background: #fff;
  color: #287dff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stock-quote-watch-btn:hover:not(:disabled):not(.is-added) {
  background: rgba(40, 125, 255, 0.06);
}

.stock-quote-watch-btn.is-added {
  padding: 6px 22px;
  border-color: transparent;
  background: #f0f2f5;
  color: #287dff;
}

.stock-quote-watch-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.stock-quote-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: #333;
  letter-spacing: 0.01em;
}

.stock-quote-name-text {
  flex: 0 1 auto;
  min-width: 0;
}

.stock-quote-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.stock-quote-tag {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.333;
  color: #307fff;
  background: #eef5ff;
  white-space: nowrap;
}

.stock-quote-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.stock-quote-price {
  display: inline-flex;
  align-items: baseline;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stock-quote-currency {
  margin-right: 0;
  font-size: 0.68em;
  font-weight: 700;
  line-height: 1;
}

.stock-quote-price.up,
.stock-quote-chg.up { color: var(--up); }

.stock-quote-price.down,
.stock-quote-chg.down { color: var(--down); }

.stock-quote-chg {
  font-size: 0.875rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stock-quote-time {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #aaa;
  white-space: nowrap;
}

/* —— 十大股东表格 —— */

.stock-detail-holders {
  margin-top: 12px;
  padding: 12px 16px;
}

.holders-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.holders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.5;
}

.holders-table th,
.holders-table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.holders-table th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.holders-table tbody tr:hover {
  background: var(--hover-bg, rgba(0,0,0,0.03));
}

.holders-rank {
  text-align: center;
  color: var(--muted);
}

.holders-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stock-detail-footnotes {
  margin-top: 12px;
  padding: 12px 16px 4px;
  border-top: 1px solid var(--border);
}

.stock-detail-footnote {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

/* —— 雪球式 K 线工作区 —— */

.stock-chart-workspace {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
}

.stock-chart-workspace.chart-workspace--wheel {
  box-shadow: inset 0 0 0 1px rgba(24, 129, 235, 0.35);
}

.chart-period-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid #e8e8e8;
  min-height: 40px;
  background: #fff;
}

.chart-period-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chart-period-tabs::-webkit-scrollbar {
  display: none;
}

.chart-period-tab {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #333;
  font-size: 0.8125rem;
  padding: 0 12px;
  line-height: 40px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.chart-period-tab:hover:not(:disabled) {
  color: #1881eb;
}

.chart-period-tab.is-active {
  color: #1881eb;
  font-weight: 500;
}

.chart-period-tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: #1881eb;
  border-radius: 1px 1px 0 0;
}

.chart-period-tab:disabled {
  color: #bbb;
  cursor: default;
}

.chart-period-divider {
  width: 1px;
  height: 14px;
  background: #ddd;
  margin: 0 6px;
  align-self: center;
}

.chart-tool-muted {
  font-size: 0.8125rem;
  color: #999;
  white-space: nowrap;
}

.chart-tool-btn {
  border: none;
  background: transparent;
  color: #1881eb;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.chart-tool-btn:hover {
  opacity: 0.85;
}

.chart-workspace-body {
  display: flex;
  align-items: stretch;
  min-height: 440px;
}

.chart-workspace-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px 12px;
}

.chart-workspace-aside {
  flex: 0 0 168px;
  width: 168px;
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  background: #fafbfc;
}

.aside-panel-title {
  margin: 0;
  padding: 10px 12px 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
}

.aside-panel-hint {
  margin: 0;
  padding: 0 12px 8px;
  font-size: 0.68rem;
  color: #999;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aside-quote-panel {
  border-bottom: none;
}

.quote-aside-grid {
  padding: 6px 12px 10px;
}

.quote-aside-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  line-height: 1.4;
}

.quote-aside-row .label {
  color: #888;
}

.quote-aside-row .val {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.quote-aside-row .val.up { color: var(--up); }
.quote-aside-row .val.down { color: var(--down); }

.chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  min-height: 28px;
  padding: 4px 2px 6px;
  font-size: 0.78rem;
  color: #666;
}

.chart-legend-row em {
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.legend-ma {
  margin-right: 8px;
  font-weight: 500;
}

.legend-avg em {
  color: #f59e0b;
}

.legend-last.up em,
.legend-last.up {
  color: var(--up);
}

.legend-last.down em,
.legend-last.down {
  color: var(--down);
}

.chart-ma-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.chart-ma-toolbar button {
  background: #f5f6f8;
  border: 1px solid transparent;
  color: #666;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.chart-ma-toolbar button:hover {
  border-color: #1881eb;
  color: #1881eb;
}

.chart-ma-toolbar button.active {
  background: #e8f3ff;
  color: #1881eb;
  border-color: #1881eb;
}

.chart-period-notice {
  padding: 48px 24px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  background: #f9fafb;
  border-radius: 8px;
  margin: 8px 0;
}

.chart-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
}

.chart-pane {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.chart-pane--main {
  position: relative;
}

.chart-pane-chart {
  position: relative;
}

.chart-crosshair-tip {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 5;
  min-width: 148px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.chart-crosshair-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  line-height: 1.55;
}

.chart-crosshair-label {
  flex-shrink: 0;
  color: #666;
}

.chart-crosshair-val {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #333;
}

.chart-crosshair-val.up { color: var(--up); }
.chart-crosshair-val.down { color: var(--down); }

.chart-pane:last-child {
  border-bottom: none;
}

.chart-sub-box {
  margin: 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}

.chart-sub-box[hidden] {
  display: none;
}

.chart-pane-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 26px;
  padding: 6px 8px 4px;
  font-size: 0.72rem;
  color: #666;
  background: #fff;
}

.chart-pane-legend--vol {
  gap: 8px;
  padding: 5px 8px;
  min-height: 28px;
  background: #f5f6f8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-legend-vol-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}

.chart-legend-vol-items .legend-ma-item--vol {
  color: #555;
  font-weight: 500;
}

.legend-ma-label {
  color: #888;
  margin-right: 2px;
}

.legend-ma-item {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-wrap--primary {
  min-height: 280px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.chart-wrap--sub {
  min-height: 72px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.chart-indicator-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafbfc;
}

.chart-ind-btn {
  border: none;
  background: transparent;
  color: #666;
  font-size: 0.78rem;
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
}

.chart-ind-btn:hover {
  color: #1881eb;
}

.chart-ind-btn.is-active {
  color: #1881eb;
  font-weight: 600;
}

.chart-ind-btn.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: #1881eb;
}

.feed-tech-block--charts .subcharts--stacked {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .chart-workspace-aside {
    flex: 0 0 168px;
    width: 168px;
  }
}

@media (max-width: 768px) {
  .chart-workspace-body {
    flex-direction: column;
  }

  .chart-workspace-main {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .chart-workspace-aside {
    flex: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-quote-panel {
    flex: 1 1 160px;
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
  }
}



@media (max-width: 720px) {
  .stock-quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .stock-quote-head-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .stock-quote-head-actions {
    margin-left: auto;
  }

  .stock-quote-time {
    white-space: normal;
  }
}

.stock-quote-empty {
  margin: 0;
}

.stock-chart-card {
  margin-bottom: 0;
  padding: 16px;
  background: #fff;
}

.stock-feed-shell {
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.stock-feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.stock-feed-head-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.stock-feed-head-hint {
  font-size: 0.78rem;
}

.stock-feed-stream {
  min-height: 120px;
}

.feed-post-methodology,
.jishu-aside-methodology {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.feed-post-methodology summary,
.jishu-aside-methodology summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.analysis-methodology-body {
  margin-top: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.analysis-train-meta-list {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-feed-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.post-feed-pager-info {
  font-size: 0.82rem;
  color: var(--muted);
}

.post-feed-pager-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.post-feed-pager-btn:hover:not(:disabled) {
  border-color: var(--link, #0067b8);
  color: var(--link, #0067b8);
}

.post-feed-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.feed-post--stream {
  background: #fff;
}

.feed-post--archive {
  background: #fcfcfc;
}

.feed-post-disclaimer {
  margin-top: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.feed-post-text--pre {
  white-space: pre-wrap;
}

.feed-post-permalink {
  margin-top: 10px;
  font-size: 0.78rem;
}

.feed-post-permalink a {
  color: var(--link);
  text-decoration: none;
}

.feed-post-permalink a:hover {
  text-decoration: underline;
}

.feed-post-time a.feed-post-link,
a.feed-post-link {
  color: var(--link, #0067b8);
  text-decoration: none;
  margin-left: 2px;
}

.feed-post-time a.feed-post-link:hover,
a.feed-post-link:hover {
  text-decoration: underline;
}

.feed-post[hidden] {
  display: none !important;
}

#techPanel {
  display: none !important;
}

.feed-post {
  padding: 16px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 0;
  align-items: start;
}

.feed-post:last-child {
  border-bottom: none;
}

.feed-post-head {
  display: contents;
}

.feed-avatar {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: start;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.feed-avatar--ai {
  background: linear-gradient(135deg, #1881eb, #2563eb);
}

.feed-avatar--fusion {
  background: linear-gradient(135deg, #0d9488, #059669);
}

.feed-avatar--tech {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.feed-post-meta {
  grid-column: 2;
  grid-row: 1;
  padding-top: 2px;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px;
  line-height: 1.45;
}

.feed-post-author {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.feed-post-time {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-post-time--error { color: #b91c1c; }
.feed-post-time--warn {
  color: var(--warn);
  white-space: normal;
}

.feed-post-body,
.feed-post-empty {
  grid-column: 2;
  grid-row: 2;
  margin-left: 0;
  margin-top: 0;
}

.feed-post-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.feed-post-highlights {
  margin: 8px 0 0;
  padding-left: 1.2em;
  font-size: 0.92rem;
  line-height: 1.55;
}

.feed-post-highlights li {
  margin-bottom: 6px;
}

.feed-post-risk {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.5;
}

.feed-post-facts {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.feed-post-facts summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
}

.feed-post-disclaimer {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.feed-post-hint {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.78rem;
}

.feed-post-empty {
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.88rem;
}

#narrativePanel.is-error .feed-post-hint {
  margin-left: 0;
}

.feed-fusion-headline {
  margin: 0 0 14px;
}

.feed-fusion-sections {
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-fusion-item {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.feed-fusion-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.feed-fusion-item-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.feed-tech-block {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.feed-tech-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.feed-post-body--tech {
  padding-top: 0;
}

.feed-tech-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.summary-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.summary-grid--compact .summary-card {
  padding: 10px 12px;
}

.summary-grid--compact .summary-card .value {
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .stock-quote-price {
    font-size: 2rem;
  }

  .feed-post-body,
  .feed-post-hint,
  .feed-fusion-headline,
  .feed-fusion-sections,
  .feed-post-empty {
    margin-left: 0;
  }
}

/* ===== 股票详情页左右栏布局 ===== */
.stock-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: 16px;
  align-items: start;
}

.stock-detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stock-detail-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
}

/* 股息信息卡片 */
.fh-detail-section .fh-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 8px;
}
.fh-detail-section .fh-detail-head h2 {
  margin: 0;
  font-size: 1rem;
}
.fh-detail-summary {
  font-size: .72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fh-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.fh-detail-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fh-detail-label {
  font-size: .68rem;
  color: #64748b;
}
.fh-detail-value {
  font-size: .82rem;
  font-weight: 700;
  color: #0f172a;
}
.fh-detail-history-wrap {
  overflow-x: auto;
}
.fh-detail-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.fh-detail-history-table th,
.fh-detail-history-table td {
  padding: 5px 6px;
  text-align: right;
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.fh-detail-history-table th:first-child,
.fh-detail-history-table td:first-child {
  text-align: left;
}
.fh-detail-history-table thead th {
  color: #64748b;
  font-weight: 600;
  font-size: .7rem;
}

@media (max-width: 768px) {
  .stock-detail-grid {
    grid-template-columns: 1fr;
  }
  .stock-detail-aside {
    position: static;
  }
}

