#marketSentimentPanel {
  --emotion-cold: #2879b7;
  --emotion-cool: #64a7c6;
  --emotion-neutral: #d5a52a;
  --emotion-warm: #e77b43;
  --emotion-hot: #d84b43;
  --emotion-ink: #0b315d;
  --emotion-paper: #f8fbff;
}

.daily-emotion-overview {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.7fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.daily-emotion-hero,
.daily-emotion-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 71, 122, .06);
}

.daily-emotion-hero {
  display: flex;
  min-height: 292px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border-color: #0a5fb5;
  background:
    radial-gradient(circle at 84% 22%, rgba(40, 151, 255, .58), transparent 34%),
    linear-gradient(135deg, #07316d 0%, #075db8 58%, #0878dc 100%);
  box-shadow: 0 14px 32px rgba(3, 67, 138, .22);
}

.daily-emotion-hero.is-extreme-cold { border-color: #096b86; background: radial-gradient(circle at 84% 22%, rgba(59, 201, 214, .34), transparent 34%), linear-gradient(135deg, #062f46 0%, #075c78 58%, #087f91 100%); }
.daily-emotion-hero.is-cold { border-color: #0a5fb5; background: radial-gradient(circle at 84% 22%, rgba(40, 151, 255, .58), transparent 34%), linear-gradient(135deg, #07316d 0%, #075db8 58%, #0878dc 100%); }
.daily-emotion-hero.is-neutral { border-color: #735d24; background: radial-gradient(circle at 84% 22%, rgba(236, 191, 73, .36), transparent 34%), linear-gradient(135deg, #293b51 0%, #526071 55%, #806b32 100%); }
.daily-emotion-hero.is-warm { border-color: #b94d25; background: radial-gradient(circle at 84% 22%, rgba(255, 171, 80, .42), transparent 34%), linear-gradient(135deg, #6d2d24 0%, #b54a2b 58%, #dc7136 100%); }
.daily-emotion-hero.is-hot { border-color: #a52736; background: radial-gradient(circle at 84% 22%, rgba(255, 113, 125, .4), transparent 34%), linear-gradient(135deg, #641b32 0%, #a9263b 58%, #d94745 100%); }

.daily-emotion-hero-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 12px;
}

.daily-emotion-hero-copy span,
.daily-emotion-panel > header span {
  grid-column: 1 / -1;
  color: var(--blue);
  font: 800 11px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
}

.daily-emotion-hero-copy span { color: #b9dbff; }

.daily-emotion-hero-copy strong {
  color: #fff;
  font: 800 clamp(58px, 6vw, 86px)/.95 "Arial Narrow", "Microsoft YaHei", sans-serif;
  letter-spacing: -.06em;
}

.daily-emotion-hero-copy em {
  margin-bottom: 8px;
  color: #ffd45e;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.daily-emotion-meter {
  height: 12px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(3, 34, 79, .72);
}

.daily-emotion-meter span {
  display: block;
  height: 100%;
  border-right: 4px solid #fff;
  background: linear-gradient(90deg, #7ee65d, #f6d43a 60%, #ff9b38);
  box-shadow: 5px 0 0 rgba(1, 31, 72, .9);
}

.daily-emotion-hero.is-partial .daily-emotion-meter { filter: grayscale(.65); opacity: .55; }

.daily-emotion-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #d6e9ff;
  font-size: 11px;
  font-weight: 700;
}

.daily-emotion-hero p {
  margin: 22px 0 0;
  color: #edf6ff;
  font-size: 14px;
  line-height: 1.7;
}

.daily-emotion-current-phase { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: baseline; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(213, 235, 255, .24); }
.daily-emotion-current-phase span { color: #b9dbff; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.daily-emotion-current-phase strong { color: #ffd45e; font-size: 16px; }

.daily-emotion-panel { margin-bottom: 14px; padding: 20px; }
.daily-emotion-history-panel { min-width: 0; min-height: 292px; margin-bottom: 0; padding-right: 0; padding-left: 0; }
.daily-emotion-history-panel > header,
.daily-emotion-history-panel > .daily-emotion-stage-legend { margin-right: 20px; margin-left: 20px; }
.daily-emotion-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.daily-emotion-panel > header h3 { margin: 4px 0 0; color: var(--emotion-ink); font-size: 20px; }
.daily-emotion-panel > header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.daily-emotion-range { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9fd; }
.daily-emotion-range button { min-width: 54px; min-height: 36px; border: 0; border-radius: 7px; background: transparent; color: #526d8d; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.daily-emotion-range button.active { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(38, 103, 210, .2); }
.daily-emotion-range button:focus-visible,
[data-daily-emotion-date]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.daily-emotion-chart-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.daily-emotion-chart { display: block; width: 100%; min-width: 680px; height: 160px; }
.daily-emotion-chart-phases rect { opacity: .16; }
.daily-emotion-chart-phases .is-ice { fill: #2879b7; }
.daily-emotion-chart-phases .is-chaos { fill: #78889b; }
.daily-emotion-chart-phases .is-rise { fill: #d5a52a; }
.daily-emotion-chart-phases .is-high-volatility { fill: #e77b43; }
.daily-emotion-chart-phases .is-ebb { fill: #358266; }
.daily-emotion-chart-phases .is-unknown { fill: #cbd5e1; }
.daily-emotion-chart-grid line { stroke: #dce7f2; stroke-width: 1; stroke-dasharray: 3 5; }
.daily-emotion-chart-grid text { fill: #7a8ea6; font: 10px ui-monospace, Consolas, monospace; }
.daily-emotion-chart-lines polyline { fill: none; stroke: var(--emotion-hot); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.daily-emotion-point { cursor: pointer; }
.daily-emotion-point circle { fill: #fff; stroke: #cbd5e1; stroke-width: 3; }
.daily-emotion-point.is-ice circle { fill: #2879b7; stroke: #2879b7; }
.daily-emotion-point.is-chaos circle { fill: #78889b; stroke: #78889b; }
.daily-emotion-point.is-rise circle { fill: #d5a52a; stroke: #d5a52a; }
.daily-emotion-point.is-high-volatility circle { fill: #e77b43; stroke: #e77b43; }
.daily-emotion-point.is-ebb circle { fill: #358266; stroke: #358266; }
.daily-emotion-point.active circle { stroke: #fff; filter: drop-shadow(0 0 5px rgba(35, 71, 113, .5)); }
.daily-emotion-point:focus circle { stroke: var(--blue); stroke-width: 4; }
.daily-emotion-history-empty { display: grid; min-height: 130px; place-items: center; color: var(--muted); font-size: 14px; text-align: center; }
.daily-emotion-stage-legend { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 5px; margin-top: 8px; }
.daily-emotion-stage-legend > span { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 2px 6px; align-items: start; min-width: 0; padding: 7px; border-radius: 6px; background: #f6f9fd; }
.daily-emotion-stage-legend i { grid-row: 1 / 3; width: 8px; height: 100%; min-height: 25px; border-radius: 4px; background: #cbd5e1; }
.daily-emotion-stage-legend .is-ice i { background: #2879b7; }
.daily-emotion-stage-legend .is-chaos i { background: #78889b; }
.daily-emotion-stage-legend .is-rise i { background: #d5a52a; }
.daily-emotion-stage-legend .is-high-volatility i { background: #e77b43; }
.daily-emotion-stage-legend .is-ebb i { background: #358266; }
.daily-emotion-stage-legend strong { color: var(--emotion-ink); font-size: 10px; white-space: nowrap; }
.daily-emotion-stage-legend small { color: #71839a; font-size: 9px; line-height: 1.45; }

#marketSentimentPanel .daily-emotion-history-panel > header h3 { color: var(--emotion-ink) !important; }
#marketSentimentPanel .daily-emotion-history-panel > header p { color: #61758e !important; }
[data-color-mode="dark"] .daily-emotion-hero p,
[data-color-mode="dark"] .daily-emotion-current-phase small { color: #d6e9ff; }
[data-color-mode="dark"] .daily-emotion-panel { border-color: #2f4058; background: #101a2a; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
[data-color-mode="dark"] #marketSentimentPanel .daily-emotion-history-panel > header h3 { color: #e9f1ff !important; }
[data-color-mode="dark"] .daily-emotion-range { border-color: #34465f; background: #162238; }
[data-color-mode="dark"] .daily-emotion-range button { color: #a9bad1; }
[data-color-mode="dark"] .daily-emotion-chart-grid line { stroke: #304159; }
[data-color-mode="dark"] .daily-emotion-chart-grid text { fill: #91a4bf; }
[data-color-mode="dark"] .daily-emotion-stage-legend > span { background: #17253a; }
[data-color-mode="dark"] .daily-emotion-stage-legend strong { color: #e4ecf8; }
[data-color-mode="dark"] .daily-emotion-stage-legend small,
[data-color-mode="dark"] .daily-emotion-history-empty { color: #9cadc4; }

.sentiment-original-overview { grid-template-columns: 1fr; }
.sentiment-original-overview .sentiment-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .daily-emotion-overview { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .daily-emotion-overview { grid-template-columns: 1fr; }
  .daily-emotion-hero { min-height: 260px; padding: 18px; }
  .daily-emotion-hero-copy strong { font-size: 62px; }
  .daily-emotion-panel { padding: 16px 12px; }
  .daily-emotion-history-panel { padding-right: 0; padding-left: 0; }
  .daily-emotion-history-panel > header,
  .daily-emotion-history-panel > .daily-emotion-stage-legend { margin-right: 12px; margin-left: 12px; }
  .daily-emotion-panel > header { align-items: stretch; flex-direction: column; }
  .daily-emotion-range button { min-height: 44px; flex: 1; }
  .daily-emotion-chart-scroll.is-5-day .daily-emotion-chart,
  .daily-emotion-chart-scroll.is-10-day .daily-emotion-chart { min-width: 100%; }
  .daily-emotion-chart-scroll.is-20-day .daily-emotion-chart { min-width: 660px; }
  .daily-emotion-stage-legend { grid-template-columns: 1fr; }
  .sentiment-original-overview .sentiment-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .daily-emotion-range button { transition: none; }
}
