:root {
  color-scheme: dark;
  --bg: #1c1c1e;
  --base: #242428;
  --panel: rgba(248, 113, 113, 0.18);
  --panel-strong: rgba(248, 113, 113, 0.28);
  --text: #e5e5e5;
  --muted: rgba(229, 229, 229, 0.62);
  --faint: rgba(229, 229, 229, 0.28);
  --primary: #f14d42;
  --red: #f87171;
  --green: #4ade80;
  --blue: #60a5fa;
  --orange: #fb923c;
  --violet: #a78bfa;
}

html:not(.dark) {
  color-scheme: light;
  --bg: #f6f7fb;
  --base: #ffffff;
  --panel: rgba(239, 68, 68, 0.10);
  --panel-strong: rgba(239, 68, 68, 0.16);
  --text: #20242c;
  --muted: rgba(56, 65, 80, 0.62);
  --faint: rgba(56, 65, 80, 0.20);
  --primary: #ef4444;
  --red: #dc2626;
  --green: #16851f;
  --blue: #2563eb;
  --orange: #ea580c;
  --violet: #7c3aed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.30), transparent),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html:not(.dark) body {
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.16), transparent),
    linear-gradient(180deg, #fff7f7 0%, var(--bg) 42%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
}

.shell {
  min-height: 100vh;
  overflow-x: hidden;
  padding: 20px clamp(16px, 4vw, 72px) 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0 18px;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(241, 77, 66, 0.24);
  color: var(--red);
  font-weight: 900;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

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

.auth-pill {
  display: grid;
  min-width: 88px;
  cursor: pointer;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(163, 163, 163, 0.12);
  color: var(--muted);
  text-align: left;
}

.auth-pill.is-logged {
  background: rgba(248, 113, 113, 0.16);
  color: var(--text);
}

.auth-pill span {
  font-size: 11px;
}

.auth-pill strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.icon-button,
.search-button,
.tab-button,
.source-action {
  cursor: pointer;
  border-radius: 8px;
  background: rgba(163, 163, 163, 0.12);
  transition: background 0.16s ease, transform 0.16s ease;
}

.icon-button:hover,
.search-button:hover,
.tab-button:hover,
.source-action:hover {
  background: rgba(248, 113, 113, 0.18);
}

.icon-button:disabled,
.search-button:disabled,
.tab-button:disabled,
.source-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.icon-button {
  width: 40px;
  height: 40px;
}

.refresh-pill {
  display: inline-flex;
  min-width: 148px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  padding: 6px 10px;
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.16), rgba(251, 146, 60, 0.06)),
    rgba(163, 163, 163, 0.10);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.refresh-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.32);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.24), rgba(251, 146, 60, 0.09)),
    rgba(163, 163, 163, 0.14);
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.10);
}

.refresh-pill.is-off {
  border-color: rgba(229, 229, 229, 0.10);
  background: rgba(163, 163, 163, 0.10);
}

.refresh-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.10);
}

.refresh-pill.is-on .refresh-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.28);
  animation: refresh-pulse 1.6s ease-out infinite;
}

.refresh-pill.is-off .refresh-dot {
  background: rgba(229, 229, 229, 0.38);
  box-shadow: 0 0 0 4px rgba(229, 229, 229, 0.06);
}

.refresh-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.refresh-line {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.refresh-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-count {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.refresh-meta {
  overflow: hidden;
  max-width: 112px;
  color: rgba(229, 229, 229, 0.46);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.dark) .refresh-pill {
  border-color: rgba(239, 68, 68, 0.16);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(234, 88, 12, 0.05)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

html:not(.dark) .refresh-pill.is-off {
  background: rgba(255, 255, 255, 0.62);
}

html:not(.dark) .refresh-meta {
  color: rgba(56, 65, 80, 0.46);
}

.search-button {
  display: flex;
  min-width: min(460px, 42vw);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  color: var(--muted);
  text-align: left;
}

kbd {
  border-radius: 6px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 22px;
}

.tab-button {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: var(--muted);
}

.tab-button.active {
  background: rgba(248, 113, 113, 0.28);
  color: var(--text);
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.10);
}

.hero-strip {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(220px, 0.8fr) minmax(220px, 0.78fr) minmax(150px, 0.45fr);
  gap: 14px;
  margin-bottom: 22px;
}

.metric {
  position: relative;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 16px;
  background: rgba(163, 163, 163, 0.10);
  cursor: default;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric:first-child {
  background: rgba(248, 113, 113, 0.18);
}

.metric:hover,
.metric:focus-within {
  transform: translateY(-2px);
  border-color: rgba(248, 113, 113, 0.20);
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(248, 113, 113, 0.20), transparent 62%),
    rgba(163, 163, 163, 0.13);
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.10);
}

.metric:first-child:hover,
.metric:first-child:focus-within {
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(248, 113, 113, 0.24), transparent 62%),
    rgba(248, 113, 113, 0.20);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
}

.metric-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.metric-subnote {
  flex: 0 1 auto;
  overflow: hidden;
  margin-top: 0;
  color: rgba(252, 165, 165, 0.88);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-read-card {
  overflow: visible;
  position: relative;
}

.market-read-card.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.10) 42%, transparent 72%);
  transform: translateX(-100%);
  animation: card-scan 1.2s ease-in-out infinite;
  pointer-events: none;
}

.market-read-compact {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.market-read-theme {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.market-read-subthemes {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
  white-space: nowrap;
}

.theme-primary {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(16px, 1.65vw, 22px);
  font-weight: 900;
  color: var(--red);
  letter-spacing: 0;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-secondary {
  overflow: hidden;
  max-width: 46%;
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(251, 146, 60, 0.12);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-secondary.muted {
  color: var(--muted);
  background: rgba(163, 163, 163, 0.10);
}

.market-read-leader {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
}

.leader-label {
  color: var(--muted);
  font-weight: 500;
}

.leader-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(74, 222, 128, 0.16);
  color: var(--green);
}

.leader-badge.hot {
  background: rgba(248, 113, 113, 0.18);
  color: var(--red);
}

.market-read-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 6px;
  min-width: 0;
}

.market-read-actions {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.market-read-more {
  padding: 3px 9px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.market-read-more:hover {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.36);
  transform: translateY(-1px);
}

.market-read-more svg {
  transition: transform 0.2s ease;
}

.market-read-refresh {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.market-read-refresh:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.36);
  transform: translateY(-1px);
}

.market-read-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

html:not(.dark) .market-read-more,
html:not(.dark) .market-read-refresh {
  border-color: rgba(196, 97, 47, 0.28);
  background: rgba(196, 97, 47, 0.10);
}

html:not(.dark) .market-read-more:hover,
html:not(.dark) .market-read-refresh:hover:not(:disabled) {
  background: rgba(196, 97, 47, 0.18);
  border-color: rgba(196, 97, 47, 0.42);
}

.market-read-popover {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  z-index: 100;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  padding: 0;
  background: rgba(26, 26, 26, 0.88);
  backdrop-filter: blur(24px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(248, 113, 113, 0.12) inset;
  animation: popover-fadein 0.2s ease;
}

html:not(.dark) .market-read-popover {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  border-color: rgba(163, 163, 163, 0.20);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(163, 163, 163, 0.08) inset;
}

@keyframes popover-fadein {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.market-read-popover-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-read-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-read-section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.market-read-phase {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.88;
  line-height: 1.5;
}

.market-read-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.watch-item {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.market-read-risk {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(251, 146, 60, 0.12);
  border-left: 3px solid var(--orange);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.market-read-risk strong {
  color: var(--orange);
  margin-right: 4px;
}


.inline-loader {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--red);
  border-radius: 999px;
  vertical-align: -1px;
  animation: badge-spin 0.72s linear infinite;
}

@keyframes card-scan {
  to {
    transform: translateX(100%);
  }
}

@keyframes refresh-pulse {
  0% {
    opacity: 0.72;
    transform: scale(0.7);
  }

  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.market-stage-card {
  padding: 12px 14px 10px;
  background:
    radial-gradient(ellipse 80% 80% at 20% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.06);
}

.index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.index-name {
  margin-right: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.index-value {
  margin-right: 6px;
  font-size: 14px;
  font-weight: 800;
}

.index-chart {
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.04);
  background-size: 25% 34px, 25% 100%;
}

.index-line {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.index-grid {
  stroke: rgba(255, 255, 255, 0.10);
  vector-effect: non-scaling-stroke;
}

.index-zero {
  stroke: rgba(255, 255, 255, 0.34);
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.index-axis {
  font-size: 9px;
  font-weight: 800;
  text-anchor: end;
}

.index-axis.red {
  fill: var(--red);
}

.index-axis.green {
  fill: var(--green);
}

.index-axis.zero {
  fill: var(--muted);
}

.index-tag-line {
  fill: none;
  stroke-width: 1;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.index-tag-dot {
  stroke: rgba(255, 255, 255, 0.80);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.index-label-box {
  fill: rgba(255, 255, 255, 0.18);
  stroke-width: 0.85;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.index-label-text {
  font-size: 7px;
  line-height: 10px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}

.index-label-hit {
  cursor: help;
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.index-tag.red .index-tag-line,
.index-tag.red .index-label-box {
  stroke: var(--red);
}

.index-tag.red .index-label-box {
  fill: rgba(248, 113, 113, 0.10);
}

.index-tag.red .index-tag-dot,
.index-tag.red .index-label-text {
  fill: var(--red);
}

.index-tag.green .index-tag-line,
.index-tag.green .index-label-box {
  stroke: var(--green);
}

.index-tag.green .index-label-box {
  fill: rgba(34, 197, 94, 0.10);
}

.index-tag.green .index-tag-dot,
.index-tag.green .index-label-text {
  fill: var(--green);
}

.index-tag.orange .index-tag-line,
.index-tag.orange .index-label-box {
  stroke: var(--orange);
}

.index-tag.orange .index-label-box {
  fill: rgba(251, 146, 60, 0.10);
}

.index-tag.orange .index-tag-dot,
.index-tag.orange .index-label-text {
  fill: var(--orange);
}

.index-tag.neutral .index-tag-line,
.index-tag.neutral .index-label-box {
  stroke: rgba(212, 212, 216, 0.72);
}

.index-tag.neutral .index-label-box {
  fill: rgba(212, 212, 216, 0.08);
}

.index-tag.neutral .index-tag-dot,
.index-tag.neutral .index-label-text {
  fill: rgba(228, 228, 231, 0.86);
}

.index-time {
  fill: var(--muted);
  font-size: 10px;
}

.index-time.end {
  text-anchor: end;
}

.sentiment-metric {
  overflow: visible;
  z-index: 2;
  background:
    radial-gradient(ellipse 90% 90% at 80% 0%, rgba(248, 113, 113, 0.22), transparent),
    rgba(163, 163, 163, 0.10);
  backdrop-filter: blur(10px);
}

.sentiment-metric:hover,
.sentiment-metric:focus,
.sentiment-metric:focus-within {
  z-index: 2000;
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(248, 113, 113, 0.24), transparent 62%),
    radial-gradient(ellipse 90% 90% at 80% 0%, rgba(248, 113, 113, 0.22), transparent),
    rgba(163, 163, 163, 0.13);
}

.sentiment-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.sentiment-gauge-wrap {
  flex: 1;
  min-width: 0;
}

.thermometer {
  position: relative;
  display: flex;
  align-items: center;
  width: min(210px, 100%);
  height: 34px;
  padding: 5px 7px 5px 31px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
}

.thermometer-track {
  position: relative;
  flex: 1;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.20),
    inset 0 3px 8px rgba(0, 0, 0, 0.20);
}

.thermometer-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b6f51f 0%, #f5d329 48%, #fb923c 78%, #ef4444 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.42);
}

.thermometer-bulb {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 2;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85), #c7f72c 36%, #a3e635 78%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 0 0 2px rgba(148, 163, 184, 0.40),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.thermometer-scale {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  width: min(210px, 100%);
  margin-top: 7px;
  padding-left: 34px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  opacity: 0.86;
}

.thermometer-scale span {
  text-align: center;
}

.sentiment-score {
  min-width: 58px;
  padding-left: 8px;
  text-align: right;
}

.sentiment-score .metric-value {
  margin-top: 0;
  color: var(--orange);
  font-size: 28px;
}

.sentiment-score .metric-value.sentiment-temp-red {
  color: var(--red);
}

.sentiment-score .metric-value.sentiment-temp-green {
  color: var(--green);
}

.sentiment-score .metric-value.sentiment-temp-neutral {
  color: var(--orange);
}

.sentiment-score-loading {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sentiment-score-loading .inline-loader {
  margin-left: 0;
}

.sentiment-phase {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sentiment-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9999;
  width: min(330px, 82vw);
  padding: 14px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(ellipse 90% 80% at 18% 0%, rgba(248, 113, 113, 0.28), transparent 62%),
    radial-gradient(ellipse 75% 70% at 100% 18%, rgba(249, 115, 22, 0.18), transparent 58%),
    rgba(45, 31, 34, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(16px);
}

.sentiment-metric:hover .sentiment-popover,
.sentiment-metric:focus .sentiment-popover,
.sentiment-metric:focus-within .sentiment-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sentiment-popover-title {
  margin-bottom: 10px;
  font-weight: 800;
}

.sentiment-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.sentiment-stat-row strong {
  color: var(--text);
}

.sentiment-stat-row strong.stat-red,
.stat-red {
  color: var(--red);
}

.sentiment-stat-row strong.stat-green,
.stat-green {
  color: var(--green);
}

.sentiment-stat-row strong.stat-flat,
.stat-flat {
  color: var(--text);
}

.sentiment-model,
.sentiment-source {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 22px;
}

.source-grid.is-reordering {
  user-select: none;
}

.source-card,
.panel {
  min-height: 520px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.22);
  backdrop-filter: blur(6px);
  transition: transform 0.16s ease, opacity 0.16s ease, outline-color 0.16s ease, background 0.16s ease;
}

.source-card[data-color="#22c55e"],
.source-card[data-color="#06b6d4"] {
  background: rgba(74, 222, 128, 0.16);
}

.source-card[data-color="#3b82f6"] {
  background: rgba(96, 165, 250, 0.18);
}

.source-card[data-color="#8b5cf6"] {
  background: rgba(167, 139, 250, 0.18);
}

html:not(.dark) .icon-button,
html:not(.dark) .search-button,
html:not(.dark) .tab-button,
html:not(.dark) .source-action,
html:not(.dark) .theme-button,
html:not(.dark) .ladder-view-button {
  background: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .icon-button:hover,
html:not(.dark) .search-button:hover,
html:not(.dark) .tab-button:hover,
html:not(.dark) .source-action:hover,
html:not(.dark) .theme-button:hover,
html:not(.dark) .ladder-view-button:hover {
  background: rgba(239, 68, 68, 0.12);
}

html:not(.dark) .tab-button.active,
html:not(.dark) .theme-button.active,
html:not(.dark) .ladder-view-button.active {
  background: rgba(239, 68, 68, 0.14);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.10);
}

html:not(.dark) .metric,
html:not(.dark) .panel,
html:not(.dark) .source-card,
html:not(.dark) .theme-stat-grid,
html:not(.dark) .sky-tabs,
html:not(.dark) .board-breakdown {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 38, 38, 0.08);
  box-shadow: 0 16px 36px rgba(31, 41, 55, 0.06);
}

html:not(.dark) .metric:first-child,
html:not(.dark) .sentiment-metric,
html:not(.dark) .source-card[data-color="#ef4444"],
html:not(.dark) .source-card[data-color="#f97316"],
html:not(.dark) .source-card[data-color="#dc2626"],
html:not(.dark) .motion-header,
html:not(.dark) .dragon-panel {
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.16), transparent),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(220, 38, 38, 0.10);
  box-shadow: 0 16px 36px rgba(31, 41, 55, 0.06);
}

html:not(.dark) .sentiment-popover {
  border: 1px solid rgba(220, 38, 38, 0.12);
  background:
    radial-gradient(ellipse 90% 80% at 18% 0%, rgba(239, 68, 68, 0.16), transparent 62%),
    radial-gradient(ellipse 75% 70% at 100% 18%, rgba(249, 115, 22, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(31, 41, 55, 0.16);
}

html:not(.dark) .sentiment-stat-row {
  border-top-color: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .metric:hover,
html:not(.dark) .metric:focus-within {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.14);
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(239, 68, 68, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.10);
}

html:not(.dark) .metric:first-child:hover,
html:not(.dark) .metric:first-child:focus-within,
html:not(.dark) .sentiment-metric:hover,
html:not(.dark) .sentiment-metric:focus,
html:not(.dark) .sentiment-metric:focus-within {
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(239, 68, 68, 0.18), transparent 62%),
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.16), transparent),
    rgba(255, 255, 255, 0.86);
}

html:not(.dark) .market-stage-card {
  background: rgba(255, 255, 255, 0.90);
}

html:not(.dark) .index-chart {
  background:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72);
  background-size: 25% 34px, 25% 100%;
}

html:not(.dark) .index-zero {
  stroke: rgba(15, 23, 42, 0.28);
}

html:not(.dark) .index-grid {
  stroke: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .index-label-box {
  fill: rgba(255, 255, 255, 0.68);
}

html:not(.dark) .index-tag.red .index-label-box {
  fill: rgba(254, 226, 226, 0.72);
}

html:not(.dark) .index-tag.green .index-label-box {
  fill: rgba(220, 252, 231, 0.72);
}

html:not(.dark) .index-tag.orange .index-label-box {
  fill: rgba(255, 237, 213, 0.72);
}

html:not(.dark) .index-tag.neutral .index-tag-line,
html:not(.dark) .index-tag.neutral .index-label-box {
  stroke: rgba(100, 116, 139, 0.66);
}

html:not(.dark) .index-tag.neutral .index-tag-dot,
html:not(.dark) .index-tag.neutral .index-label-text {
  fill: rgba(71, 85, 105, 0.88);
}

html:not(.dark) .source-card[data-color="#22c55e"],
html:not(.dark) .source-card[data-color="#06b6d4"],
html:not(.dark) .source-card[data-color="#3b82f6"],
html:not(.dark) .source-card[data-color="#8b5cf6"] {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.08);
}

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

.source-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.20);
  font-weight: 800;
}

html:not(.dark) .source-logo {
  background: rgba(220, 38, 38, 0.10);
}

.source-title strong,
.panel-title {
  font-size: 20px;
}

.badge {
  border-radius: 5px;
  padding: 1px 6px;
  background: rgba(28, 28, 30, 0.55);
  color: var(--muted);
  font-size: 12px;
}

.live-badge {
  background: rgba(74, 222, 128, 0.16);
  color: var(--green);
}

.fallback-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 146, 60, 0.14);
  color: var(--orange);
}

.badge-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(251, 146, 60, 0.26);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: badge-spin 0.8s linear infinite;
}

@keyframes badge-spin {
  to {
    transform: rotate(360deg);
  }
}

html:not(.dark) .badge {
  background: rgba(15, 23, 42, 0.06);
}

.source-meta,
.tiny {
  color: var(--muted);
  font-size: 12px;
}

.source-action {
  width: 32px;
  height: 32px;
}

.source-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.source-drag-handle {
  cursor: grab;
  color: var(--muted);
}

.source-drag-handle:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.source-drag-handle:active {
  cursor: grabbing;
}

.source-card.is-dragging {
  opacity: 0.48;
  transform: scale(0.965) rotate(0.4deg);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.35);
}

.source-card.is-drop-target {
  outline: 1px dashed rgba(248, 113, 113, 0.76);
  outline-offset: 4px;
  background: rgba(248, 113, 113, 0.30);
  transform: translateY(-2px);
}

.list {
  max-height: 430px;
  overflow: auto;
  border-radius: 16px;
  padding: 8px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.24), transparent),
    rgba(28, 28, 30, 0.72);
}

html:not(.dark) .list,
html:not(.dark) .sky-table {
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.12), transparent),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 38, 38, 0.08);
}

.stock-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  padding: 8px 6px;
  cursor: pointer;
}

.stock-row:hover {
  background: rgba(163, 163, 163, 0.10);
}

html:not(.dark) .stock-row:hover,
html:not(.dark) .sky-cell:hover,
html:not(.dark) .board-card:hover,
html:not(.dark) .dragon-seat:hover,
html:not(.dark) .dragon-stock-row:hover,
html:not(.dark) .dragon-theme:hover {
  background: rgba(239, 68, 68, 0.10);
}

.rank {
  display: grid;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: rgba(163, 163, 163, 0.12);
  color: var(--muted);
  font-size: 13px;
}

.stock-name {
  font-weight: 700;
}

.stock-code,
.stock-reason {
  color: var(--muted);
  font-size: 12px;
}

.stock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  border-radius: 5px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

html:not(.dark) .tag {
  background: rgba(15, 23, 42, 0.06);
}

.tag.hot {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

html:not(.dark) .tag.hot {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.change {
  color: var(--red);
  font-weight: 800;
  text-align: right;
}

.change.negative {
  color: var(--green);
}

.diff {
  margin-left: 6px;
  color: var(--red);
  font-size: 12px;
}

.diff.negative {
  color: var(--green);
}

.theme-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}

.theme-menu {
  display: grid;
  gap: 10px;
  align-self: start;
}

.theme-button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: rgba(163, 163, 163, 0.10);
  color: var(--text);
  text-align: left;
}

.theme-button.active {
  background: rgba(248, 113, 113, 0.22);
}

.theme-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.theme-summary {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.panel {
  min-height: auto;
  background: rgba(163, 163, 163, 0.10);
}

.temperature {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 78%, rgba(255, 255, 255, 0.08) 78% 100%);
  font-size: 30px;
  font-weight: 900;
}

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

.market-motion {
  display: grid;
  gap: 18px;
}

.motion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.22), transparent),
    rgba(239, 68, 68, 0.22);
  color: var(--text);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.motion-title {
  color: #fecaca;
  font-size: 24px;
  font-weight: 900;
}

.motion-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.motion-counts {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 230px;
  justify-content: flex-end;
}

.motion-counts span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.motion-counts strong {
  color: var(--red);
  font-size: 34px;
  line-height: 1;
}

.motion-counts em {
  color: var(--faint);
  font-style: normal;
  font-size: 28px;
}

.motion-counts .green-number {
  color: var(--green);
}

.theme-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(163, 163, 163, 0.10);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-stat {
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.16s ease, transform 0.16s ease;
}

.theme-stat:hover {
  background: rgba(248, 113, 113, 0.18);
  transform: translateY(-1px);
}

.theme-stat strong,
.theme-stat span {
  display: block;
}

.theme-stat strong {
  color: var(--muted);
  font-size: 18px;
}

.theme-stat.red strong {
  color: var(--red);
}

.theme-stat.orange strong {
  color: var(--orange);
}

.theme-stat span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.sky-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 10px;
  background: rgba(163, 163, 163, 0.10);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.ladder-view-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(28, 28, 30, 0.44);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ladder-view-button.active {
  background: rgba(248, 113, 113, 0.20);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(248, 113, 113, 0.10);
}

.ladder-view-button:hover {
  background: rgba(248, 113, 113, 0.16);
  transform: translateY(-1px);
}

.sky-dot {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(229, 229, 229, 0.22);
  border-radius: 50%;
  background: rgba(28, 28, 30, 0.70);
}

.sky-dot.active {
  border-color: rgba(229, 229, 229, 0.22);
  background: var(--red);
  box-shadow: inset 0 0 0 3px rgba(28, 28, 30, 0.88);
}

.sky-table {
  overflow-x: auto;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.20), transparent),
    rgba(28, 28, 30, 0.72);
  color: var(--text);
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sky-row {
  display: grid;
  grid-template-columns: 96px minmax(720px, 1fr);
  gap: 4px;
  border-bottom: 4px solid transparent;
}

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

.sky-level {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  font-size: 24px;
  font-weight: 900;
}

.sky-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 4px;
  background: transparent;
}

.sky-cell {
  position: relative;
  min-height: 118px;
  padding: 18px 12px 12px;
  border-radius: 8px;
  background: rgba(163, 163, 163, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.sky-cell:hover {
  background: rgba(248, 113, 113, 0.14);
  transform: translateY(-1px);
}

.sky-time {
  position: absolute;
  top: 5px;
  right: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sky-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.sky-theme {
  margin-top: 4px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.sky-reason {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sky-class {
  margin-top: 6px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.dragon-panel {
  border-radius: 16px;
  padding: 16px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.20), transparent),
    rgba(239, 68, 68, 0.18);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.dragon-stat {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.dragon-stat span,
.dragon-stat em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.dragon-stat strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--red);
  font-size: 24px;
  line-height: 1;
}

.dragon-stat.orange strong {
  color: var(--orange);
}

.dragon-stat.gray strong {
  color: var(--muted);
}

.dragon-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
}

.dragon-block {
  border-radius: 12px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.dragon-block-title {
  margin-bottom: 10px;
  color: #fecaca;
  font-size: 16px;
  font-weight: 900;
}

.dragon-seat-grid,
.dragon-stock-list,
.dragon-theme-grid {
  display: grid;
  gap: 10px;
}

.dragon-seat {
  border-radius: 8px;
  padding: 12px;
  background: rgba(163, 163, 163, 0.10);
  transition: background 0.16s ease, transform 0.16s ease;
}

.dragon-seat:hover,
.dragon-stock-row:hover,
.dragon-theme:hover {
  background: rgba(248, 113, 113, 0.13);
  transform: translateY(-1px);
}

.dragon-seat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dragon-seat-head strong,
.dragon-seat-head span {
  display: block;
}

.dragon-seat-head span,
.dragon-seat p,
.dragon-stock-row p {
  color: var(--muted);
  font-size: 12px;
}

.dragon-seat-head b {
  color: var(--red);
  white-space: nowrap;
}

.dragon-seat-stock {
  margin: 8px 0 4px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

.dragon-stock-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(163, 163, 163, 0.10);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.dragon-stock-row p {
  grid-column: 1 / -1;
  margin: 0;
}

.dragon-theme-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.dragon-theme {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.48);
  transition: background 0.16s ease, transform 0.16s ease;
}

.dragon-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dragon-risks span {
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.ladder-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}

.ladder-summary {
  align-self: start;
  min-height: auto;
  position: sticky;
  top: 132px;
}

.board-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.compact-taxonomy {
  margin-top: 0;
}

.ladder-stack {
  display: grid;
  gap: 16px;
}

.board-breakdown {
  border-radius: 16px;
  padding: 16px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.16), transparent),
    rgba(163, 163, 163, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ladder-level {
  border-radius: 16px;
  padding: 16px;
  background: rgba(163, 163, 163, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.ladder-level-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.ladder-level-mark {
  display: grid;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.24);
  color: #fecaca;
  font-size: 20px;
  font-weight: 900;
}

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

.board-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.board-card {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.board-card:hover {
  background: rgba(248, 113, 113, 0.12);
  transform: translateY(-1px);
}

.board-reason {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.week-card {
  min-height: auto;
}

.week-themes {
  margin-bottom: 12px;
}

.weekly-evolution {
  display: grid;
  gap: 18px;
}

.weekly-hero .motion-counts {
  min-width: 280px;
}

.weekly-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 120px;
}

.weekly-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.weekly-metric {
  border-radius: 8px;
  padding: 14px;
  background: rgba(163, 163, 163, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.weekly-metric span,
.weekly-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.weekly-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--red);
  font-size: 26px;
  line-height: 1.05;
}

.weekly-briefing {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 12px;
}

.weekly-brief-card {
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.16), rgba(248, 113, 113, 0.04)),
    rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(248, 113, 113, 0.12);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.weekly-brief-card span,
.weekly-brief-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.weekly-brief-card strong {
  display: block;
  margin: 6px 0;
  color: var(--text);
  font-size: 17px;
}

.weekly-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(360px, 1.15fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.weekly-theme-panel,
.weekly-timeline-panel,
.weekly-stock-panel {
  min-height: 0;
}

.weekly-theme-list {
  display: grid;
  gap: 8px;
}

.weekly-theme-button {
  cursor: pointer;
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
  color: var(--text);
  text-align: left;
  transition: background 0.16s ease, transform 0.16s ease;
}

.weekly-theme-button:hover,
.weekly-theme-button.active {
  background: rgba(248, 113, 113, 0.18);
  transform: translateY(-1px);
}

.weekly-theme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.weekly-timeline {
  display: grid;
  gap: 10px;
}

.weekly-day {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.weekly-day.highlight {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(ellipse 80% 80% at 20% 0%, rgba(248, 113, 113, 0.16), transparent 64%),
    rgba(28, 28, 30, 0.52);
}

.weekly-day-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.weekly-day-head span {
  color: var(--muted);
  font-size: 12px;
}

.weekly-day-head b {
  color: var(--red);
}

.weekly-bar {
  height: 8px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.weekly-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

html:not(.dark) .weekly-metric,
html:not(.dark) .weekly-brief-card,
html:not(.dark) .weekly-theme-button,
html:not(.dark) .weekly-day {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .weekly-theme-button:hover,
html:not(.dark) .weekly-theme-button.active,
html:not(.dark) .weekly-day.highlight {
  background:
    radial-gradient(ellipse 80% 80% at 20% 0%, rgba(239, 68, 68, 0.14), transparent 64%),
    rgba(255, 255, 255, 0.72);
}

.smart-radar {
  display: grid;
  gap: 18px;
}

.smart-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.smart-metric {
  border-radius: 8px;
  padding: 14px;
  background: rgba(163, 163, 163, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.smart-metric span,
.smart-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.smart-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--red);
  font-size: 26px;
  line-height: 1.05;
}

.smart-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.smart-temperature-panel,
.smart-mind-panel,
.smart-dragon-panel,
.smart-stock-panel,
.smart-risk-panel {
  min-height: 0;
}

.smart-temp-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.smart-behavior-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.smart-behavior {
  border-radius: 8px;
  padding: 10px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.smart-behavior.active {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.14);
}

.smart-behavior strong,
.smart-behavior span {
  display: block;
}

.smart-behavior span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.smart-mind-map {
  display: grid;
  gap: 10px;
}

.smart-link {
  display: grid;
  grid-template-columns: minmax(112px, 0.8fr) 28px minmax(120px, 1fr) 28px minmax(112px, 0.85fr);
  gap: 8px;
  align-items: center;
}

.smart-node {
  min-height: 58px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(28, 28, 30, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.smart-node span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.seat-node {
  border-color: rgba(248, 113, 113, 0.22);
}

.stock-node {
  border-color: rgba(251, 146, 60, 0.22);
}

.theme-node {
  border-color: rgba(96, 165, 250, 0.24);
}

.smart-connector {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.20), rgba(248, 113, 113, 0.72));
}

.smart-risk-panel {
  grid-column: 1 / -1;
}

html:not(.dark) .smart-metric,
html:not(.dark) .smart-behavior,
html:not(.dark) .smart-node {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .smart-behavior.active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(220, 38, 38, 0.12);
}

.flow-radar {
  display: grid;
  gap: 18px;
}

.flow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.flow-metric {
  border-radius: 8px;
  padding: 14px;
  background: rgba(163, 163, 163, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.flow-metric span,
.flow-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.flow-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--red);
  font-size: 26px;
  line-height: 1.05;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.flow-rank-panel,
.flow-map-panel,
.flow-type-panel,
.flow-stock-panel {
  min-height: 0;
}

.flow-rank-list,
.flow-type-grid {
  display: grid;
  gap: 10px;
}

.flow-rank-item {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.flow-rank-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.flow-rank-head b {
  color: var(--red);
}

.flow-bar {
  height: 8px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.flow-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.flow-factor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.flow-bubble-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.flow-bubble {
  min-height: 118px;
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(248, 113, 113, 0.22), transparent 70%),
    rgba(28, 28, 30, 0.48);
  border: 1px solid rgba(248, 113, 113, 0.12);
}

.flow-bubble.live {
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(96, 165, 250, 0.20), transparent 70%),
    rgba(28, 28, 30, 0.48);
  border-color: rgba(96, 165, 250, 0.18);
}

.flow-bubble.hot {
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(251, 146, 60, 0.22), transparent 70%),
    rgba(28, 28, 30, 0.48);
  border-color: rgba(251, 146, 60, 0.18);
}

.flow-bubble strong,
.flow-bubble span,
.flow-bubble em {
  display: block;
}

.flow-bubble span {
  margin: 8px 0;
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
}

.flow-bubble em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.flow-type-card {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.flow-type-card.live {
  border-color: rgba(96, 165, 250, 0.18);
}

.flow-type-card.hot {
  border-color: rgba(251, 146, 60, 0.18);
}

.flow-type-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.flow-stock-panel {
  grid-column: 1 / -1;
}

html:not(.dark) .flow-metric,
html:not(.dark) .flow-rank-item,
html:not(.dark) .flow-bubble,
html:not(.dark) .flow-type-card {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

.pick-page {
  display: grid;
  gap: 18px;
}

.pick-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pick-metric {
  border-radius: 8px;
  padding: 14px;
  background: rgba(28, 28, 30, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.pick-metric span,
.pick-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pick-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--red);
  font-size: 28px;
}

.pick-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.pick-list {
  display: grid;
  gap: 12px;
}

.pick-card {
  border-radius: 8px;
  padding: 14px;
  background: rgba(28, 28, 30, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.pick-card:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.28);
}

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

.pick-rank {
  margin-right: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pick-score {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.16);
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
}

.pick-factor-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 12px 0;
}

.pick-factor {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.pick-factor div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.pick-factor i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.pick-factor b {
  color: var(--text);
  text-align: right;
}

.pick-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.pick-reason-list span {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(248, 113, 113, 0.10);
  color: var(--muted);
  font-size: 12px;
}

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

.pick-columns strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.pick-columns p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pick-side {
  position: sticky;
  top: 12px;
}

.pick-factor-note {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.pick-factor-note span,
.pick-type-list div {
  border-radius: 8px;
  padding: 10px;
  background: rgba(28, 28, 30, 0.42);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.pick-type-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.pick-type-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.pick-type-list strong {
  color: var(--red);
}

html:not(.dark) .pick-metric,
html:not(.dark) .pick-card,
html:not(.dark) .pick-factor-note span,
html:not(.dark) .pick-type-list div {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

.research-page {
  display: grid;
  gap: 18px;
}

.research-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.research-outline,
.research-sources {
  position: sticky;
  top: 12px;
}

.research-outline nav,
.research-source-list {
  display: grid;
  gap: 8px;
}

.research-outline nav span,
.research-source-list span,
.research-watch p {
  border-radius: 8px;
  padding: 10px;
  background: rgba(28, 28, 30, 0.42);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-actions button {
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(248, 113, 113, 0.16);
  color: var(--text);
}

.research-editor {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  background: rgba(28, 28, 30, 0.58);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.research-editor:focus {
  border-color: rgba(248, 113, 113, 0.32);
}

.research-preview {
  margin-top: 14px;
  border-radius: 8px;
  padding: 16px;
  background: rgba(28, 28, 30, 0.42);
}

.research-preview h2,
.research-preview h3,
.research-preview p,
.research-preview blockquote {
  margin: 0 0 10px;
}

.research-preview h2 {
  font-size: 22px;
}

.research-preview h3 {
  margin-top: 16px;
  color: var(--red);
  font-size: 16px;
}

.research-preview blockquote {
  border-left: 3px solid var(--red);
  padding-left: 10px;
  color: var(--muted);
}

.research-preview li {
  margin: 6px 0 6px 18px;
  color: var(--muted);
  line-height: 1.55;
}

.research-watch {
  margin-top: 14px;
}

.research-watch strong {
  display: block;
  margin-bottom: 8px;
}

html:not(.dark) .research-outline nav span,
html:not(.dark) .research-source-list span,
html:not(.dark) .research-watch p,
html:not(.dark) .research-editor,
html:not(.dark) .research-preview {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

.login-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  border-radius: 16px;
  padding: 20px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.30), transparent),
    rgba(28, 28, 30, 0.98);
  color: var(--text);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

.login-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.login-head h2 {
  margin: 6px 0;
  font-size: 28px;
}

.login-head p,
.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-error {
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.24);
  color: #fecaca;
  font-size: 12px;
}

.login-modes,
.login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
}

.login-modes button,
.login-actions button {
  cursor: pointer;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(163, 163, 163, 0.12);
  color: var(--muted);
}

.login-modes button.active,
.login-actions button:first-child {
  background: rgba(248, 113, 113, 0.20);
  color: var(--text);
}

.login-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.login-actions {
  grid-template-columns: 1fr 1fr;
}

.login-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.login-field span {
  color: var(--muted);
  font-size: 12px;
}

.login-field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  background: rgba(28, 28, 30, 0.58);
  color: var(--text);
}

.admin-page {
  display: grid;
  gap: 18px;
}

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

.admin-source-panel {
  grid-column: 1 / -1;
}

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

.admin-user-card div,
.admin-module-list article,
.admin-source-grid article {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
}

.admin-user-card span,
.admin-module-list span,
.admin-source-grid span,
.admin-source-grid em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-user-card strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.admin-module-list,
.admin-source-grid {
  display: grid;
  gap: 10px;
}

.admin-module-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-module-list b.on {
  color: var(--green);
}

.admin-module-list b.off {
  color: var(--muted);
}

.admin-source-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

html:not(.dark) .login-card,
html:not(.dark) .login-field input,
html:not(.dark) .admin-user-card div,
html:not(.dark) .admin-module-list article,
html:not(.dark) .admin-source-grid article {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

.heatmap-page {
  display: grid;
  gap: 18px;
}

.heatmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(163, 163, 163, 0.10);
}

.heatmap-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.heatmap-segment {
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(28, 28, 30, 0.42);
  color: var(--muted);
}

.heatmap-segment.active,
.heatmap-segment:hover {
  background: rgba(248, 113, 113, 0.18);
  color: var(--text);
}

.heatmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.heatmap-main-panel,
.heatmap-legend-panel {
  min-height: 0;
}

.cloud-replay {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cloud-replay span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(28, 28, 30, 0.36);
  color: var(--muted);
  font-size: 12px;
}

.cloud-replay span.active {
  background: rgba(248, 113, 113, 0.18);
  color: var(--text);
}

.cloud-replay b {
  color: var(--red);
}

.cloud-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cloud-map-head strong,
.cloud-map-head span {
  display: block;
}

.cloud-map-head strong {
  font-size: 18px;
}

.cloud-map-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.cloud-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(46px, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
  min-height: 620px;
}

.cloud-empty {
  grid-column: 1 / -1;
}

.cloud-sector {
  min-width: 0;
  border-radius: 8px;
  padding: 10px;
  background:
    radial-gradient(ellipse 120% 90% at 18% 0%, rgba(248, 113, 113, calc(0.08 + var(--sector-level) * 0.10)), transparent 62%),
    rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cloud-sector.down {
  background:
    radial-gradient(ellipse 120% 90% at 18% 0%, rgba(74, 222, 128, calc(0.07 + var(--sector-level) * 0.09)), transparent 62%),
    rgba(28, 28, 30, 0.42);
}

.cloud-sector.flat {
  background:
    radial-gradient(ellipse 120% 90% at 18% 0%, rgba(163, 163, 163, 0.10), transparent 62%),
    rgba(28, 28, 30, 0.42);
}

.cloud-sector header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cloud-sector header strong,
.cloud-sector header span {
  display: block;
}

.cloud-sector header strong {
  font-size: 14px;
}

.cloud-sector header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.cloud-sector header em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cloud-stock-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 58px;
  grid-auto-flow: dense;
  gap: 6px;
}

.cloud-stock {
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 58px;
  border-radius: 8px;
  padding: 7px;
  background:
    radial-gradient(ellipse 120% 100% at 20% 0%, rgba(255, 255, 255, 0.10), transparent 56%),
    rgba(248, 113, 113, var(--heat-alpha));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.cloud-stock:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.cloud-stock.down {
  background:
    radial-gradient(ellipse 120% 100% at 20% 0%, rgba(255, 255, 255, 0.08), transparent 56%),
    rgba(74, 222, 128, var(--heat-alpha));
}

.cloud-stock.flat {
  background: rgba(163, 163, 163, 0.18);
}

.cloud-stock.xl {
  grid-column: span 3;
  grid-row: span 2;
}

.cloud-stock.lg {
  grid-column: span 2;
  grid-row: span 2;
}

.cloud-stock.md {
  grid-column: span 2;
}

.cloud-stock strong,
.cloud-stock span,
.cloud-stock em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-stock strong {
  font-size: 13px;
}

.cloud-stock span,
.cloud-stock em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-style: normal;
}

.cloud-stock.xl strong,
.cloud-stock.lg strong {
  font-size: 15px;
}

.cloud-stock.xl em,
.cloud-stock.lg em {
  font-size: 13px;
  font-weight: 900;
}

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

.cloud-stat-grid article {
  border-radius: 8px;
  padding: 10px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.cloud-stat-grid span,
.cloud-stat-grid em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.cloud-stat-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-legend-list {
  display: grid;
  gap: 10px;
}

.heatmap-legend-item {
  border-radius: 8px;
  padding: 12px;
  background: rgba(28, 28, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.heatmap-mini-bar {
  display: flex;
  height: 8px;
  margin: 9px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.heatmap-mini-bar .up {
  background: var(--red);
}

.heatmap-mini-bar .down {
  background: var(--green);
}

html:not(.dark) .heatmap-toolbar,
html:not(.dark) .heatmap-segment,
html:not(.dark) .heatmap-legend-item,
html:not(.dark) .cloud-sector,
html:not(.dark) .cloud-stat-grid article {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .cloud-replay span {
  background: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .cloud-replay span.active {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

html:not(.dark) .heatmap-segment.active,
html:not(.dark) .heatmap-segment:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.market-cloud-page {
  padding-bottom: 0;
}

.radar-cloud-host {
  overflow: hidden;
  min-height: calc(100vh - 190px);
  padding: 0 !important;
  /* 覆盖 .panel 的 padding，云图需要占满容器 */
}

.radar-cloud-shell {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
  background:
    radial-gradient(circle at 12% 10%, rgba(248, 113, 113, 0.12), transparent 28%),
    rgba(20, 20, 22, 0.56);
}

.radar-cloud-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)), rgba(20, 20, 22, 0.48);
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.radar-cloud-market-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(0, 0, 0, 0.18);
}

.radar-cloud-market-list button,
.radar-cloud-actions button,
.radar-cloud-replay button,
.radar-cloud-shot {
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.radar-cloud-market-list button {
  height: 30px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: left;
}

.radar-cloud-market-list button.active,
.radar-cloud-market-list button:hover {
  background: rgba(248, 113, 113, 0.18);
  color: var(--text);
}

.radar-cloud-select select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 9px;
  outline: none;
}

.radar-cloud-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 上涨/平盘/下跌三元素网格 */
.radar-cloud-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.radar-cloud-summary-grid div {
  min-width: 0;
  border-radius: 8px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.radar-cloud-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.radar-cloud-summary-grid strong {
  display: block;
  margin-top: 3px;
  overflow: visible;
  /* font-size: clamp(9px, 0.9vw + 6px, 12px); */
  font-size: 11px;
  /* 支持4位数显示 */
  word-break: break-all;
  line-height: 1.3;
}

/* 成交额/加权涨跌/样本纵向堆叠 */
.radar-cloud-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radar-cloud-summary-stack div {
  display: flex;
  align-items: baseline;
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.radar-cloud-summary-stack span {
  color: var(--muted);
  font-size: 11px;
  margin-right: 4px;
  flex-shrink: 0;
}

.radar-cloud-summary-stack strong {
  font-size: 13px;
  line-height: 1.4;
}

.radar-cloud-summary-grid .red,
.radar-cloud-summary-stack .red {
  color: var(--red);
}

.radar-cloud-summary-grid .green,
.radar-cloud-summary-stack .green {
  color: var(--green);
}

.radar-cloud-tip {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
}

.radar-cloud-tip strong {
  font-size: 13px;
}

.radar-cloud-shot,
.radar-cloud-actions button,
.radar-cloud-replay button {
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.16);
  padding: 7px 10px;
  transition: transform 0.16s ease, background 0.16s ease;
}

.radar-cloud-shot:hover,
.radar-cloud-actions button:hover,
.radar-cloud-replay button:hover,
.radar-cloud-replay button.active {
  background: rgba(248, 113, 113, 0.28);
  transform: translateY(-1px);
}

.radar-cloud-main {
  display: grid;
  grid-template-rows: 48px minmax(420px, 1fr) 42px;
  min-width: 0;
}

.radar-cloud-topbar,
.radar-cloud-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.radar-cloud-topbar strong,
.radar-cloud-topbar span {
  display: block;
}

.radar-cloud-topbar strong {
  font-size: 17px;
}

.radar-cloud-topbar span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.radar-cloud-actions,
.radar-cloud-replay,
.radar-cloud-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.radar-cloud-actions button,
.radar-cloud-replay button {
  padding: 5px 9px;
  font-size: 12px;
}

.radar-cloud-canvas-wrap {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    rgba(22, 22, 24, 0.84);
  background-size: 42px 42px;
}

.radar-cloud-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.radar-cloud-canvas-wrap canvas[data-cloud-hover] {
  cursor: grab;
  z-index: 2;
}

.radar-cloud-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(20, 20, 22, 0.58);
  backdrop-filter: blur(14px);
}

.radar-cloud-tooltip {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  display: none;
  width: 286px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(30, 25, 27, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.radar-cloud-tooltip strong {
  display: block;
  font-size: 14px;
}

.radar-cloud-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.radar-cloud-tooltip em {
  font-style: normal;
}

.radar-cloud-tooltip b {
  color: var(--text);
  font-weight: 800;
}

.radar-cloud-footer {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 0;
}

.radar-cloud-replay span {
  color: var(--muted);
  font-size: 12px;
}

.radar-cloud-legend i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 24px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.radar-cloud-shell:fullscreen {
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 100vh;
}

.radar-cloud-shell:fullscreen .radar-cloud-main {
  grid-template-rows: 48px minmax(0, 1fr) 42px;
}

html:not(.dark) .radar-cloud-shell,
html:not(.dark) .radar-cloud-canvas-wrap {
  background-color: rgba(255, 255, 255, 0.72);
}

html:not(.dark) .radar-cloud-side,
html:not(.dark) .radar-cloud-topbar,
html:not(.dark) .radar-cloud-footer {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .radar-cloud-tooltip {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.10);
}

.news-item {
  border-left: 1px solid var(--faint);
  padding-left: 12px;
}

.news-title {
  margin-top: 3px;
}

.empty {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.52);
}

.modal.open {
  display: grid;
}

.command {
  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.30), transparent),
    rgba(28, 28, 30, 0.98);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

.command input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(163, 163, 163, 0.18);
  padding: 16px;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.command-status {
  border-bottom: 1px solid rgba(163, 163, 163, 0.12);
  padding: 8px 16px;
  color: var(--muted);
  font-size: 12px;
}

.command-list {
  max-height: 560px;
  overflow: auto;
  padding: 12px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.command-item:hover {
  background: rgba(163, 163, 163, 0.10);
}

.command-empty {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.stock-detail-modal {
  overflow-x: hidden;
  padding: 16px;
}

.stock-detail {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(1040px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.28), transparent),
    rgba(28, 28, 30, 0.98);
  color: var(--text);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(163, 163, 163, 0.14);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.detail-close:hover {
  background: rgba(248, 113, 113, 0.20);
  color: var(--text);
}

.detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  padding-right: 34px;
}

.detail-eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.detail-head h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

.detail-head h2 span {
  margin-left: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.detail-price {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.detail-price strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.detail-loading,
.detail-error,
.detail-empty {
  margin-top: 16px;
  border-radius: 8px;
  padding: 18px;
  background: rgba(163, 163, 163, 0.10);
  color: var(--muted);
  text-align: center;
}

.detail-error {
  color: var(--orange);
}

.detail-metrics,
.detail-ma-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.detail-metrics div,
.detail-ma-grid div {
  border-radius: 8px;
  padding: 12px;
  background: rgba(163, 163, 163, 0.10);
}

.detail-metrics span,
.detail-ma-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-metrics strong,
.detail-ma-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.detail-chart,
.detail-context {
  margin-top: 14px;
  border-radius: 12px;
  padding: 14px;
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(248, 113, 113, 0.18), transparent),
    rgba(163, 163, 163, 0.10);
}

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

.detail-section-head strong {
  color: #fecaca;
  font-size: 16px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.chart-period,
.chart-tool {
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 10px;
  background: rgba(28, 28, 30, 0.48);
  color: var(--muted);
  cursor: pointer;
}

.chart-period:hover,
.chart-tool:hover,
.chart-period.active,
.chart-tool.active {
  background: rgba(248, 113, 113, 0.20);
  color: var(--text);
}

.interactive-chart {
  position: relative;
  overflow: hidden;
  height: 360px;
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#detail-chart-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}

.chart-indicator-select {
  position: absolute;
  left: 5px;
  bottom: 31px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px;
  background: rgba(28, 28, 30, 0.50);
  color: var(--muted);
  line-height: 1;
}

.chart-indicator-select select {
  width: 50px;
  border: 0;
  border-radius: 5px;
  padding: 2px 12px 2px 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  line-height: 1.2;
  outline: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  display: none;
  min-width: 220px;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(248, 113, 113, 0.12);
  background: rgba(28, 28, 30, 0.56);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.chart-tooltip-title,
.chart-tooltip-change,
.chart-tooltip-meta,
.chart-tooltip-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-tooltip-title {
  margin-bottom: 6px;
}

.chart-tooltip-title strong {
  font-size: 12px;
}

.chart-tooltip-title span {
  font-size: 15px;
  font-weight: 900;
}

.chart-tooltip-change {
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
}

.chart-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-tooltip-grid span,
.chart-tooltip-meta {
  color: var(--muted);
}

.chart-tooltip-grid strong {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.chart-tooltip-meta,
.chart-tooltip-indicator {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  white-space: nowrap;
}

.chart-tooltip-indicator {
  color: var(--muted);
}

.price-up {
  color: var(--red);
}

.price-down {
  color: var(--green);
}

.price-flat {
  color: var(--text);
}

.detail-context p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .actions {
    gap: 8px;
  }

  .refresh-pill {
    min-width: 84px;
    justify-content: center;
  }

  .auth-pill {
    min-width: 64px;
    padding: 7px 8px;
  }

  .refresh-label {
    display: none;
  }

  .refresh-meta {
    display: none;
  }

  .search-button {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }

  .hero-strip,
  .theme-layout,
  .blogger-layout,
  .ladder-layout {
    grid-template-columns: 1fr;
  }

  .ladder-summary {
    position: static;
  }

  .motion-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .motion-counts {
    justify-content: flex-start;
    min-width: 0;
  }

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

  .weekly-metrics,
  .weekly-briefing,
  .weekly-layout,
  .smart-metric-grid,
  .smart-layout,
  .smart-temp-body,
  .smart-behavior-tags,
  .flow-metrics,
  .flow-layout,
  .heatmap-layout,
  .pick-overview,
  .pick-layout,
  .pick-factor-bars,
  .pick-columns,
  .research-layout,
  .admin-layout,
  .admin-user-card {
    grid-template-columns: 1fr;
  }

  .pick-side,
  .research-outline,
  .research-sources {
    position: static;
  }

  .heatmap-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cloud-map {
    grid-template-columns: repeat(6, minmax(38px, 1fr));
    min-height: auto;
  }

  .cloud-sector {
    grid-column: span 3 !important;
  }

  .cloud-sector[style*="span 6"],
  .cloud-sector[style*="span 4"] {
    grid-column: span 6 !important;
  }

  .cloud-stock-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 52px;
  }

  .smart-link {
    grid-template-columns: 1fr;
  }

  .smart-connector {
    width: 2px;
    height: 16px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.20), rgba(248, 113, 113, 0.72));
  }

  .dragon-stat-grid,
  .dragon-layout,
  .dragon-theme-grid {
    grid-template-columns: 1fr;
  }

  .detail-head,
  .detail-metrics,
  .detail-ma-grid {
    grid-template-columns: 1fr;
  }

  .interactive-chart {
    height: 300px;
  }

  .detail-price {
    justify-items: start;
  }

  .detail-head {
    padding-right: 0;
  }

  .sky-row {
    grid-template-columns: 72px minmax(620px, 1fr);
  }

  .sky-level {
    font-size: 20px;
  }

  .source-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .source-card {
    flex: 0 0 min(350px, calc(100vw - 34px));
  }
}

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

.blogger-side {
  min-height: 0;
}

.blogger-feed {
  min-height: 620px;
}

.blogger-groups {
  display: grid;
  gap: 10px;
}

.blogger-group {
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.24);
}

.blogger-group-head {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.blogger-group-head span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blogger-group-head em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.blogger-group-head strong {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.24), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
    rgba(42, 36, 40, 0.58);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -12px 22px rgba(0, 0, 0, 0.13),
    0 12px 22px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.blogger-group-head strong::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid rgba(229, 229, 229, 0.72);
  border-bottom: 1.6px solid rgba(229, 229, 229, 0.72);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.32));
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.blogger-group-head strong::after {
  content: none;
}

.blogger-group.open .blogger-group-head strong::before {
  transform: translateY(2px) rotate(225deg);
}

.blogger-group-head:hover strong {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(54, 45, 50, 0.68);
  transform: translateY(-1px);
}

.blogger-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 10px 0 10px;
}

.blogger-input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(28, 28, 30, 0.54);
  color: var(--text);
  outline: none;
}

.blogger-input:focus {
  border-color: rgba(248, 113, 113, 0.38);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.10);
}

.blogger-add {
  min-width: 68px;
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(248, 113, 113, 0.24);
  color: var(--text);
  cursor: pointer;
}

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

.blogger-list.scrollable {
  max-height: 548px;
  overflow-y: auto;
  padding-right: 4px;
}

.blogger-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid transparent;
  background: rgba(28, 28, 30, 0.42);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.blogger-chip:hover,
.blogger-chip:focus-visible,
.blogger-chip.active {
  border-color: rgba(248, 113, 113, 0.24);
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(248, 113, 113, 0.18), transparent 62%),
    rgba(248, 113, 113, 0.14);
  box-shadow: 0 12px 24px rgba(248, 113, 113, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.blogger-chip.active {
  border-color: rgba(248, 113, 113, 0.36);
}

.blogger-chip strong,
.blogger-block-head strong {
  display: block;
}

.blogger-chip span,
.blogger-block-head span {
  color: var(--muted);
  font-size: 12px;
}

.blogger-error {
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(251, 146, 60, 0.14);
  color: var(--orange);
  font-size: 13px;
}

.blogger-placeholder {
  margin: 10px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.blogger-suggestions {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: 8px;
  padding: 8px;
  background: rgba(38, 26, 28, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.blogger-suggestion {
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.blogger-suggestion:hover {
  background: rgba(248, 113, 113, 0.16);
}

.blogger-suggestion strong {
  display: block;
}

.blogger-suggestion span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.blogger-block {
  margin-top: 14px;
}

.blogger-block:first-of-type {
  margin-top: 0;
}

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

.blogger-profile {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 12px;
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(ellipse 90% 90% at 14% 0%, rgba(248, 113, 113, 0.16), transparent 64%),
    rgba(28, 28, 30, 0.34);
}

.blogger-profile strong {
  display: block;
  margin-bottom: 4px;
}

.blogger-profile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.blogger-article {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blogger-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.blogger-empty {
  min-height: 96px;
}

html:not(.dark) .blogger-input,
html:not(.dark) .blogger-chip,
html:not(.dark) .blogger-group {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .blogger-group-head,
html:not(.dark) .blogger-placeholder,
html:not(.dark) .blogger-suggestion {
  background: rgba(255, 255, 255, 0.64);
}

html:not(.dark) .blogger-group-head strong {
  border-color: rgba(239, 68, 68, 0.12);
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(239, 68, 68, 0.08)),
    rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 20px rgba(239, 68, 68, 0.08);
}

html:not(.dark) .blogger-group-head strong::before {
  border-color: rgba(32, 36, 44, 0.58);
}

html:not(.dark) .blogger-chip:hover,
html:not(.dark) .blogger-chip:focus-visible,
html:not(.dark) .blogger-chip.active {
  border-color: rgba(239, 68, 68, 0.20);
  background:
    radial-gradient(ellipse 90% 90% at 18% 0%, rgba(239, 68, 68, 0.12), transparent 62%),
    rgba(255, 255, 255, 0.76);
}

html:not(.dark) .blogger-profile {
  background:
    radial-gradient(ellipse 90% 90% at 14% 0%, rgba(239, 68, 68, 0.10), transparent 64%),
    rgba(255, 255, 255, 0.72);
}

html:not(.dark) .blogger-suggestions {
  border-color: rgba(239, 68, 68, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(31, 41, 55, 0.12);
}

html:not(.dark) .blogger-add {
  background: rgba(239, 68, 68, 0.14);
  color: var(--red);
}

html:not(.dark) .motion-title,
html:not(.dark) .dragon-block-title {
  color: var(--red);
}

html:not(.dark) .theme-stat {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(220, 38, 38, 0.08);
}

html:not(.dark) .sky-dot {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.12);
}

html:not(.dark) .sky-dot.active {
  background: var(--red);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.92);
}

html:not(.dark) .sky-level,
html:not(.dark) .ladder-level-mark {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

html:not(.dark) .sky-cell,
html:not(.dark) .dragon-stat,
html:not(.dark) .dragon-block,
html:not(.dark) .dragon-seat,
html:not(.dark) .dragon-stock-row,
html:not(.dark) .dragon-theme,
html:not(.dark) .ladder-level,
html:not(.dark) .board-card {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .dragon-risks span {
  background: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .command {
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.16), transparent),
    rgba(255, 255, 255, 0.98);
}

html:not(.dark) .command input {
  border-color: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .command-status {
  border-color: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .command-item:hover {
  background: rgba(239, 68, 68, 0.10);
}

html:not(.dark) .stock-detail {
  background:
    radial-gradient(ellipse 80% 80% at 50% -30%, rgba(239, 68, 68, 0.16), transparent),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(31, 41, 55, 0.18);
}

html:not(.dark) .detail-close,
html:not(.dark) .detail-loading,
html:not(.dark) .detail-error,
html:not(.dark) .detail-empty,
html:not(.dark) .detail-metrics div,
html:not(.dark) .detail-ma-grid div,
html:not(.dark) .detail-chart,
html:not(.dark) .detail-context {
  background: rgba(15, 23, 42, 0.06);
}

html:not(.dark) .detail-section-head strong {
  color: var(--red);
}

html:not(.dark) .interactive-chart {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 38, 38, 0.08);
}

html:not(.dark) .chart-period,
html:not(.dark) .chart-tool,
html:not(.dark) .chart-tooltip {
  background:
    radial-gradient(ellipse 90% 80% at 18% 0%, rgba(239, 68, 68, 0.10), transparent 62%),
    rgba(255, 255, 255, 0.68);
}

html:not(.dark) .chart-tooltip {
  border-color: rgba(220, 38, 38, 0.12);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.14);
}

html:not(.dark) .chart-tooltip-grid,
html:not(.dark) .chart-tooltip-meta,
html:not(.dark) .chart-tooltip-indicator {
  border-top-color: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .chart-indicator-select {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

html:not(.dark) .chart-indicator-select select {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

html:not(.dark) .chart-period:hover,
html:not(.dark) .chart-tool:hover,
html:not(.dark) .chart-period.active,
html:not(.dark) .chart-tool.active {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

@media print {
  body {
    background: #ffffff;
    color: #111827;
  }

  .topbar,
  .tabs,
  .hero-strip,
  .research-outline,
  .research-actions,
  .research-editor,
  .modal {
    display: none !important;
  }

  .shell,
  .panel,
  .research-preview,
  .research-source-list span,
  .research-watch p {
    box-shadow: none !important;
    background: #ffffff !important;
    color: #111827 !important;
  }

  .shell {
    padding: 0;
  }

  .research-layout {
    display: block;
  }

  .research-sources {
    position: static;
    margin-top: 16px;
  }
}

@media (max-width: 860px) {
  .blogger-layout {
    grid-template-columns: 1fr;
  }

  .blogger-feed {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 12px 10px 20px;
  }

  .topbar {
    position: relative;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 0 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

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

  .brand-subtitle {
    overflow: hidden;
    max-width: calc(100vw - 70px);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .search-button {
    min-width: 0;
    width: 100%;
    padding: 9px 11px;
  }

  .refresh-pill,
  .auth-pill,
  .icon-button {
    min-height: 36px;
  }

  .tabs {
    gap: 8px;
    margin: 0 -10px;
    padding: 6px 10px 16px;
    scroll-padding-left: 10px;
  }

  .tab-button {
    padding: 8px 11px;
    font-size: 13px;
  }

  .hero-strip {
    gap: 10px;
    margin-bottom: 14px;
  }

  .metric {
    padding: 12px;
  }

  .index-head {
    align-items: center;
  }

  .index-chart {
    height: 150px;
  }

  .content-grid,
  .source-grid,
  .theme-stat-grid,
  .weekly-metrics,
  .weekly-briefing,
  .flow-metrics,
  .cloud-map,
  .pick-stats,
  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .cloud-map {
    gap: 8px;
  }

  .cloud-map-head,
  .cloud-replay {
    justify-content: flex-start;
  }

  .cloud-sector {
    grid-column: 1 / -1 !important;
    padding: 8px;
  }

  .cloud-stock-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 48px;
  }

  .cloud-stock {
    padding: 6px;
  }

  .cloud-stock.xl,
  .cloud-stock.lg,
  .cloud-stock.md {
    grid-column: span 1;
    grid-row: span 1;
  }

  .cloud-stock strong,
  .cloud-stock.xl strong,
  .cloud-stock.lg strong {
    font-size: 12px;
  }

  .cloud-stock span,
  .cloud-stock em,
  .cloud-stock.xl em,
  .cloud-stock.lg em {
    font-size: 10px;
  }

  .cloud-stat-grid {
    grid-template-columns: 1fr;
  }

  .source-grid {
    display: grid;
  }

  .source-card {
    width: 100%;
    min-width: 0;
  }

  .panel {
    padding: 14px;
  }

  .blogger-side {
    overflow: hidden;
  }

  .blogger-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  .blogger-chip {
    min-width: 0;
  }

  .blogger-profile {
    flex-direction: column;
    gap: 10px;
  }

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

  .blogger-add {
    min-height: 38px;
  }

  .stock-detail {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .detail-close {
    top: 10px;
    right: 10px;
  }

  .chart-toolbar {
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .chart-period,
  .chart-tool {
    flex: 0 0 auto;
    padding: 6px 9px;
    font-size: 13px;
  }

  .interactive-chart {
    height: 280px;
  }

  .chart-tooltip {
    max-width: min(230px, calc(100vw - 44px));
  }
}

@media (max-width: 900px) {

  .radar-cloud-shell,
  .radar-cloud-shell:fullscreen {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 150px);
  }

  .radar-cloud-side {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.8fr);
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  }

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

  .radar-cloud-market-list button {
    height: 32px;
    text-align: center;
    padding: 0 4px;
    font-size: 12px;
  }

  .radar-cloud-summary {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .radar-cloud-tip,
  .radar-cloud-shot {
    display: none;
  }

  .radar-cloud-main {
    grid-template-rows: 48px minmax(520px, 62vh) auto;
  }
}

@media (max-width: 640px) {
  .radar-cloud-host {
    min-height: calc(100vh - 130px);
  }

  .radar-cloud-side {
    grid-template-columns: 1fr;
    padding: 10px;
  }

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

  .radar-cloud-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .radar-cloud-topbar,
  .radar-cloud-footer {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding: 10px;
  }

  .radar-cloud-main {
    grid-template-rows: auto minmax(460px, 58vh) auto;
  }

  .radar-cloud-legend i {
    width: 38px;
    height: 22px;
    font-size: 10px;
  }

  .radar-cloud-tooltip {
    width: min(286px, calc(100vw - 34px));
  }
}

.market-panel-page {
  display: grid;
  gap: 14px;
}

.market-panel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.market-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-panel-title span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #4d8dff;
  box-shadow: 0 0 18px rgba(77, 141, 255, .82);
}

.market-panel-title strong {
  font-size: 18px;
}

.market-panel-title em {
  border: 1px solid;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.market-panel-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.market-panel-hero button,
.market-panel-loading button {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  padding: 8px 12px;
  cursor: pointer;
}

.market-panel-index-grid,
.market-panel-kpis,
.market-panel-core,
.market-panel-hot-grid,
.market-panel-stock-grid {
  display: grid;
  gap: 10px;
}

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

.market-panel-index,
.market-panel-kpi,
.market-panel-card {
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(145deg, rgba(104, 55, 58, .38), rgba(27, 25, 27, .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 16px 40px rgba(0, 0, 0, .22);
}

.market-panel-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-radius: 8px;
  padding: 12px;
}

.market-panel-index strong,
.market-panel-card-head strong,
.market-panel-stock-row strong,
.market-panel-rank-row strong {
  color: var(--text);
}

.market-panel-index span,
.market-panel-card-head span,
.market-panel-stock-row em,
.market-panel-rank-row em,
.market-panel-mini span {
  color: var(--muted);
  font-size: 11px;
}

.market-panel-index-value {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.market-panel-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.market-panel-kpi {
  border-radius: 8px;
  padding: 12px;
}

.market-panel-kpi span,
.market-panel-kpi em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.market-panel-kpi strong {
  display: block;
  margin: 8px 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
}

.market-panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.market-panel-main {
  display: grid;
  gap: 14px;
}

.market-panel-core {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.market-panel-card {
  border-radius: 8px;
  padding: 12px;
}

.market-panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.market-panel-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  height: 112px;
}

.market-panel-bar {
  display: grid;
  grid-template-rows: 18px 1fr 16px;
  justify-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 10px;
}

.market-panel-bar i {
  align-self: end;
  display: block;
  width: 11px;
  border-radius: 999px 999px 2px 2px;
}

.market-panel-bar i.up {
  background: linear-gradient(180deg, #21d982, #127a4b);
}

.market-panel-bar i.down {
  background: linear-gradient(180deg, #ff6666, #9e2929);
}

.market-panel-breadth-track {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.market-panel-breadth-track i.up {
  background: #d64242;
}

.market-panel-breadth-track i.flat {
  background: rgba(255, 255, 255, .25);
}

.market-panel-breadth-track i.down {
  background: #22aa68;
}

.market-panel-breadth-counts,
.market-panel-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.market-panel-mini-grid:not(.three) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-panel-breadth-counts span,
.market-panel-mini,
.market-panel-seal {
  border-radius: 7px;
  background: rgba(255, 255, 255, .055);
  padding: 8px;
}

.market-panel-mini strong {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.market-panel-monitor-block {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.market-panel-monitor-block .market-panel-card-head {
  margin-bottom: 8px;
}

.market-panel-radar-card {
  display: grid;
}

.market-panel-radar {
  width: 100%;
  min-height: 232px;
}

.market-panel-radar-score {
  fill: var(--text);
  font-size: 25px;
  font-weight: 900;
}

.market-panel-radar-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

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

.market-panel-rank-title {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.market-panel-rank-row,
.market-panel-stock-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
  padding: 8px;
  text-align: left;
}

.market-panel-stock-row {
  cursor: pointer;
}

.market-panel-stock-row:hover,
.market-panel-rank-row:hover,
.market-panel-alert:hover {
  background: rgba(255, 255, 255, .08);
}

.market-panel-stock-rows,
.market-panel-alerts,
.market-panel-side {
  display: grid;
  gap: 8px;
}

.market-panel-seal {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.market-panel-ladder-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.market-panel-ladder-row i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
}

.market-panel-ladder-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c83e3e, #ff675f);
}

.market-panel-alert {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  padding: 9px 10px 9px 12px;
  overflow: hidden;
}

button.market-panel-alert {
  cursor: pointer;
}

.market-panel-alert::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #4d8dff;
}

.market-panel-alert.critical::before {
  background: #ff6464;
}

.market-panel-alert.warn::before {
  background: #e0a33a;
}

.market-panel-alert div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.market-panel-alert p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.market-panel-alert em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.panel-up {
  color: #ff6b6b !important;
}

.panel-down {
  color: #28d17c !important;
}

.panel-flat {
  color: var(--text) !important;
}

.panel-accent {
  color: #4d8dff !important;
}

.panel-warn {
  color: #e0a33a !important;
}

.market-panel-loading {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--muted);
}

html:not(.dark) .market-panel-index,
html:not(.dark) .market-panel-kpi,
html:not(.dark) .market-panel-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 242, 242, .68));
  border-color: rgba(126, 55, 55, .12);
}

@media (max-width: 1180px) {

  .market-panel-index-grid,
  .market-panel-core,
  .market-panel-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-panel-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .market-panel-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-panel-index-grid,
  .market-panel-kpis,
  .market-panel-core,
  .market-panel-hot-grid,
  .market-panel-stock-grid,
  .market-panel-rank-grid {
    grid-template-columns: 1fr;
  }
}
