:root {
  color-scheme: dark;
  --bg: #08111f;
  --surface: #0e192a;
  --surface-2: #142238;
  --line: #22324a;
  --text: #f8fafc;
  --muted: #91a1b8;
  --red: #d3292f;
  --green: #07845e;
  --blue: #2563eb;
  --orange: #ea7a19;
  --amber: #f5b942;
  --tick-rise-bg: #f7c1c1;
  --tick-rise-text: #a32d2d;
  --tick-rise-icon: #fb7185;
  --tick-rise-glow: rgba(239, 68, 68, 0.28);
  --tick-rise-rest: rgba(239, 68, 68, 0.14);
  --tick-rise-edge: rgba(248, 113, 113, 0.95);
  --tick-fall-bg: #c0dd97;
  --tick-fall-text: #3b6d11;
  --tick-fall-icon: #34d399;
  --tick-fall-glow: rgba(16, 185, 129, 0.25);
  --tick-fall-rest: rgba(16, 185, 129, 0.13);
  --tick-fall-edge: rgba(52, 211, 153, 0.95);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --type-h1: clamp(22px, 5.9vw, 34px);
  --type-h2: clamp(18px, 4.8vw, 25px);
  --type-h3: clamp(14px, 3.7vw, 18px);
  --type-body: clamp(14px, 3.7vw, 16px);
  --type-caption: clamp(12px, 3.15vw, 14px);
  --type-micro: clamp(10.5px, 2.75vw, 12px);
  --supporting-text: rgba(226, 232, 240, 0.72);
}

html[data-market="us"] {
  --tick-rise-bg: #c0dd97;
  --tick-rise-text: #3b6d11;
  --tick-rise-icon: #34d399;
  --tick-rise-glow: rgba(16, 185, 129, 0.25);
  --tick-rise-rest: rgba(16, 185, 129, 0.13);
  --tick-rise-edge: rgba(52, 211, 153, 0.95);
  --tick-fall-bg: #f7c1c1;
  --tick-fall-text: #a32d2d;
  --tick-fall-icon: #fb7185;
  --tick-fall-glow: rgba(239, 68, 68, 0.28);
  --tick-fall-rest: rgba(239, 68, 68, 0.14);
  --tick-fall-edge: rgba(248, 113, 113, 0.95);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.16), transparent 42%), var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.market-app {
  margin: 0 auto;
  max-width: 1440px;
  min-height: 100vh;
  padding: 14px 12px calc(24px + var(--safe-bottom));
}

.share-capture {
  background: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.16), transparent 42%), var(--bg);
  margin: -14px -12px -12px;
  padding: 14px 12px 12px;
}

.market-top {
  display: block;
}

.market-meta-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.market-status-group {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.market-status-group .eyebrow {
  flex: 0 1 auto;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}

.eyebrow {
  color: #60a5fa;
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: 0.15em;
  margin: 0 0 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.market-app strong,
.market-app b {
  font-weight: 600;
}

h1 {
  font-size: var(--type-h1);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.title-row {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.title-row h1 {
  flex: 0 1 auto;
  font-size: var(--type-h1);
  margin-bottom: 4px;
  min-width: 0;
}

.version-badge {
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.52);
  border-radius: 999px;
  color: #93c5fd;
  font-size: var(--type-micro);
  font-weight: 600;
  padding: 3px 6px;
}

h2 {
  font-size: var(--type-h2);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.quote-time,
.chart-head p {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.45;
  margin-bottom: 0;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.source-badge {
  align-items: center;
  background: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #cbd5e1;
  display: inline-flex;
  font-size: var(--type-micro);
  font-weight: 600;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  white-space: nowrap;
}

.source-badge::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.source-badge.realtime {
  color: #4ade80;
}

.source-badge.realtime.live-update-pulse {
  animation: live-update-badge-pulse 680ms ease-out both;
}

.source-badge.realtime.live-update-pulse::before {
  animation: live-update-dot-pulse 680ms ease-out both;
}
.source-badge.closed {
  color: #93c5fd;
}
.source-badge.delayed {
  color: #fbbf24;
}

.source-badge.delayed::before {
  animation: delayed-status-breathe 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.38);
}

.source-badge.cache,
.source-badge.source_error {
  color: #fb7185;
}

.refresh-button,
.share-button,
.back-market,
.industry-detail,
.fullscreen-button,
.focus-control-rail button,
.sheet-close {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  min-height: 42px;
}

.refresh-button,
.share-button {
  font-size: 10px;
}

.refresh-button:disabled,
.share-button:disabled,
.back-market:disabled {
  cursor: default;
  opacity: 0.42;
}

.share-button {
  align-items: center;
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(96, 165, 250, 0.46);
  color: #bfdbfe;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.share-button svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.share-button.busy svg {
  animation: share-pulse 0.8s ease-in-out infinite alternate;
}

.update-control {
  align-items: center;
  background: rgba(14, 25, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0;
  height: 28px;
  min-height: 28px;
  min-width: 0;
  padding: 0 2px 0 4px;
}

.refresh-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  justify-content: center;
  height: 26px;
  min-height: 26px;
  padding: 2px 4px;
  white-space: nowrap;
}

.refresh-button.manual .update-status-dot {
  display: none;
}

.update-status-dot {
  background: #4ade80;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
  height: 6px;
  width: 6px;
}

.refresh-button.loading .update-status-dot {
  animation: update-pulse 0.65s ease-in-out infinite alternate;
}

.auto-refresh-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0 1px;
  width: 30px;
}

.auto-refresh-toggle > span {
  background: #475569;
  border-radius: 999px;
  display: block;
  height: 16px;
  position: relative;
  transition: background 0.2s ease;
  width: 28px;
}

.auto-refresh-toggle > span::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 12px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 0.2s ease;
  width: 12px;
}

.auto-refresh-toggle.active > span {
  background: #2563eb;
}

.auto-refresh-toggle.active > span::after {
  transform: translateX(12px);
}

@keyframes share-pulse {
  to {
    opacity: 0.42;
  }
}

@keyframes update-pulse {
  to {
    opacity: 0.3;
  }
}

.market-selector {
  margin-top: 12px;
}

.market-selector button {
  font-size: 14px;
  min-height: 44px;
}

.market-selector button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 5px 16px rgba(37, 99, 235, 0.24);
}

.index-update-time {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
  margin: 7px 2px 0;
}

.index-update-time::before {
  color: #60a5fa;
  content: "◷";
  margin-right: 5px;
}

.index-update-row,
.section-head-meta,
.v5-launcher-head {
  align-items: center;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  min-width: 0;
}

.index-update-row {
  margin: 7px 2px 0;
}

.index-update-row .index-update-time {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-info-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid #38516f;
  border-radius: 50%;
  color: #70abed;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Georgia, serif;
  font-size: 10px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 18px;
}

.section-info-button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.section-info-button:active {
  background: rgba(96, 165, 250, 0.12);
}

.index-panel {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.index-card {
  background: rgba(14, 25, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

.index-card::before {
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.index-card > * {
  position: relative;
  z-index: 1;
}

.index-card-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

.index-card-link:active {
  background: rgba(20, 35, 58, 0.98);
  transform: scale(0.985);
}

.index-card-link:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

@media (hover: hover) {
  .index-card-link:hover {
    background: rgba(20, 35, 58, 0.98);
    border-color: #60a5fa;
  }
}

.index-card.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.index-card-head {
  align-items: flex-start;
  display: flex;
  gap: 5px;
  justify-content: space-between;
  min-width: 0;
}

.index-card-head span {
  color: var(--muted);
  display: -webkit-box;
  font-size: clamp(12.5px, 3.35vw, 15px);
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  overflow: hidden;
  white-space: normal;
}

.index-card-head span b {
  color: #60a5fa;
  font-size: inherit;
  margin-right: 5px;
}

.index-card-head small {
  background: #14233a;
  border-radius: 999px;
  color: #93c5fd;
  flex: 0 0 auto;
  font-size: var(--type-micro);
  font-weight: 600;
  padding: 3px 6px;
}

.index-card-head small.delayed,
.index-card-head small.cache,
.index-card-head small.source_error {
  color: #fbbf24;
}

.index-card strong {
  display: block;
  font-size: clamp(20px, 5.3vw, 25px);
  line-height: 1.2;
  min-width: 0;
}

.index-value-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 36px;
  margin-top: 7px;
}

.index-movement-icon {
  align-items: center;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 33px;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  width: 36px;
}

.index-card[data-update-direction="rise"] .index-movement-icon::before {
  color: var(--tick-rise-icon);
  content: "▲";
}

.index-card[data-update-direction="rise"] {
  background: linear-gradient(to bottom, var(--tick-rise-rest), transparent 72%), rgba(14, 25, 42, 0.98);
  border-color: var(--tick-rise-edge);
  box-shadow: 0 0 12px var(--tick-rise-rest);
}

.index-card[data-update-direction="fall"] .index-movement-icon::before {
  color: var(--tick-fall-icon);
  content: "▼";
}

.index-card[data-update-direction="fall"] {
  background: linear-gradient(to top, var(--tick-fall-rest), transparent 72%), rgba(14, 25, 42, 0.98);
  border-color: var(--tick-fall-edge);
  box-shadow: 0 0 12px var(--tick-fall-rest);
}

.index-card.value-changed-rise {
  animation: index-edge-rise 1.3s ease-out both;
}

.index-card.value-changed-fall {
  animation: index-edge-fall 1.3s ease-out both;
}

.index-card.value-changed-rise::before {
  animation: index-glow-rise 1.3s ease-out both;
  background: linear-gradient(to bottom, var(--tick-rise-glow), transparent 72%);
}

.index-card.value-changed-fall::before {
  animation: index-glow-fall 1.3s ease-out both;
  background: linear-gradient(to top, var(--tick-fall-glow), transparent 72%);
}

.index-card.value-changed .index-movement-icon::before {
  animation: movement-triangle-pop 520ms ease-out both;
}

.index-card.value-changed-rise p {
  animation: movement-number-rise 520ms ease-out both;
}

.index-card.value-changed-fall p {
  animation: movement-number-fall 520ms ease-out both;
}

.index-card p {
  font-size: clamp(13px, 3.35vw, 16px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 3px 0 0;
  white-space: nowrap;
}

.index-card p.up {
  color: #fb7185;
}

.index-card p.down {
  color: #34d399;
}

.index-card p.flat {
  color: var(--muted);
}

.index-card-foot {
  align-items: flex-end;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-top: 5px;
  min-width: 0;
}

.index-card-meta {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.index-mini-chart {
  color: #94a3b8;
  display: block;
  flex: 1 1 auto;
  height: 24px;
  min-width: 46px;
  overflow: hidden;
  position: relative;
}

.index-mini-chart-svg {
  display: block;
  height: 100%;
  shape-rendering: geometricPrecision;
  width: 100%;
}

.index-mini-chart polyline {
  fill: none;
  opacity: 0.96;
  stroke: #94a3b8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.index-mini-chart-baseline {
  opacity: 0.58;
  stroke: #526176;
  stroke-dasharray: 2 2;
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.index-mini-chart-head {
  background: currentColor;
  border: 1px solid #081321;
  border-radius: 50%;
  filter: drop-shadow(0 0 1px currentColor);
  height: 6px;
  left: clamp(5px, var(--chart-point-x), calc(100% - 5px));
  position: absolute;
  top: clamp(5px, var(--chart-point-y), calc(100% - 5px));
  transform: translate(-50%, -50%);
  transform-origin: center;
  width: 6px;
}

.index-card.value-changed .index-mini-chart-head {
  animation: intraday-head-pulse 680ms ease-out both;
  transform-box: fill-box;
  transform-origin: center;
}

.index-card.live-chart .index-mini-chart-head {
  animation: intraday-live-breathe 1.8s ease-in-out infinite;
}

.index-mini-chart.up polyline {
  stroke: var(--tick-rise-icon);
}

.index-mini-chart.up {
  color: var(--tick-rise-icon);
}

.index-mini-chart.down polyline {
  stroke: var(--tick-fall-icon);
}

.index-mini-chart.down {
  color: var(--tick-fall-icon);
}

.index-card-yahoo {
  color: #60a5fa;
  flex: 0 0 auto;
  font-size: var(--type-micro);
  font-weight: 600;
  white-space: nowrap;
}

.index-minute-label {
  color: #93c5fd;
  font-size: var(--type-micro);
  font-weight: 600;
  white-space: nowrap;
}

html[data-market="us"] .index-card p.up {
  color: #34d399;
}

html[data-market="us"] .index-card p.down {
  color: #fb7185;
}

.active-etf-index-card {
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.active-etf-index-card:disabled {
  cursor: default;
}

.active-etf-focus {
  align-items: baseline;
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.active-etf-focus strong {
  color: #f8fafc;
  font-size: clamp(20px, 5.8vw, 25px);
  white-space: nowrap;
}

.active-etf-focus span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.active-etf-caution {
  color: #fbbf24;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.institutional-index-card {
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.institutional-index-card:disabled {
  cursor: default;
}

.institutional-summary {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.institutional-summary > span {
  align-items: baseline;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.institutional-summary small {
  color: var(--muted);
  font-size: clamp(11.5px, 3.05vw, 13px);
  font-weight: 600;
}

.institutional-summary strong {
  font-size: clamp(13px, 3.45vw, 15px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.institutional-summary strong.up {
  color: #fb7185;
}

.institutional-summary strong.down {
  color: #34d399;
}

.institutional-summary strong.flat,
.institutional-date {
  color: var(--muted);
}

.institutional-date {
  font-size: var(--type-micro);
  font-weight: 600;
}

.risk-signals-card,
.industry-heat-card {
  background: rgba(10, 20, 35, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  padding: 12px;
}

.risk-signals-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.signal-component {
  background: radial-gradient(circle at 50% 18%, rgba(37, 99, 235, 0.12), transparent 46%), #0e192a;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  padding: 9px;
}

.signal-component-head {
  align-items: center;
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.signal-component-head small {
  color: #93c5fd;
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-component-head span {
  background: rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: var(--type-micro);
  font-weight: 600;
  padding: 3px 5px;
}

.fear-greed-gauge {
  height: 110px;
  margin: 3px auto 0;
  max-width: 150px;
  overflow: hidden;
  position: relative;
}

.fear-greed-arc {
  height: 90px;
  left: 50%;
  opacity: 0.94;
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  width: 136px;
}

.fear-greed-gauge::after {
  background: #f8fafc;
  border-radius: 999px;
  bottom: 25px;
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.7);
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  transform: rotate(calc(-90deg + var(--signal-score) * 1.8deg));
  transform-origin: 0 50%;
  width: 48px;
  z-index: 1;
}

.fear-greed-value {
  bottom: 1px;
  left: 0;
  position: absolute;
  right: 0;
  text-align: center;
  z-index: 2;
}

.fear-greed-value strong,
.fear-greed-value span {
  display: block;
}

.fear-greed-value strong {
  background: #0e192a;
  border-radius: 7px;
  box-shadow: 0 0 0 5px #0e192a;
  font-size: 30px;
  line-height: 1;
  margin: 0 auto;
  padding: 0 3px;
  width: max-content;
}

.fear-greed-value span {
  color: #86efac;
  font-size: var(--type-caption);
  font-weight: 600;
  margin-top: 2px;
}

.signal-component > p {
  color: var(--muted);
  font-size: var(--type-caption);
  margin: 4px 0 0;
  text-align: center;
}

.risk-score-ring {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 94px;
  justify-content: center;
  margin: 7px auto 5px;
  position: relative;
  width: 94px;
}

.risk-score-ring-canvas {
  height: 94px;
  inset: 0;
  position: absolute;
  width: 94px;
}

.risk-score-ring > div {
  position: relative;
  text-align: center;
  z-index: 1;
}

.risk-score-ring strong,
.risk-score-ring span {
  display: block;
}

.risk-score-ring strong {
  font-size: 30px;
  line-height: 1;
}

.risk-score-ring span {
  color: #86efac;
  font-size: var(--type-caption);
  font-weight: 600;
  line-height: 1.15;
  margin: 4px auto 0;
  max-width: 64px;
  overflow-wrap: anywhere;
}

.risk-score-inputs {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-score-inputs span {
  background: #142238;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--type-micro);
  font-weight: 600;
  padding: 4px 5px;
  text-align: center;
  white-space: nowrap;
}

.signal-component.unavailable {
  opacity: 0.64;
}

.risk-signals-card .insight-period {
  font-size: var(--type-micro);
}

.industry-heat-subtitle {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 600;
  margin: 8px 0 7px;
}

.industry-heat-list {
  display: grid;
  gap: 2px;
}

.industry-heat-row {
  align-items: center;
  border-bottom: 1px solid rgba(34, 50, 74, 0.72);
  display: grid;
  gap: 6px;
  grid-template-columns: 18px minmax(68px, 0.72fr) minmax(70px, 1fr) 45px 66px;
  min-height: 34px;
}

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

.industry-heat-rank {
  color: #93c5fd;
  font-size: var(--type-micro);
  font-weight: 600;
}

.industry-heat-row strong {
  font-size: var(--type-caption);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-heat-bar {
  background: #1a2a42;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.industry-heat-bar i {
  background: #64748b;
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 5px;
}

.industry-heat-row.warming .industry-heat-bar i {
  background: linear-gradient(90deg, #be123c, #fb7185);
}

.industry-heat-row.cooling .industry-heat-bar i {
  background: linear-gradient(90deg, #047857, #34d399);
}

.industry-heat-share {
  font-size: var(--type-caption);
  font-weight: 600;
  text-align: right;
}

.industry-heat-row em {
  color: var(--muted);
  font-size: var(--type-micro);
  font-style: normal;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.industry-heat-row.warming em {
  color: #fda4af;
}

.industry-heat-row.cooling em {
  color: #6ee7b7;
}

.industry-heat-note,
.signal-empty {
  color: var(--supporting-text);
  font-size: var(--type-caption);
  line-height: 1.6;
  margin: 7px 0 0;
}

.active-etf-sheet-list {
  display: grid;
  gap: 6px;
}

.active-etf-sheet-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 8px 10px;
}

.active-etf-sheet-row > span {
  color: #60a5fa;
  font-size: 10px;
  font-weight: 600;
}

.active-etf-sheet-row strong,
.active-etf-sheet-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-etf-sheet-row small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.active-etf-sheet-row em {
  color: #fda4af;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.active-etf-sheet-row.decrease em {
  color: #6ee7b7;
}

.institutional-rank-row {
  cursor: default;
}

.institutional-rank-row .rank-name small {
  font-size: 9px;
}

.institutional-rank-toggle {
  margin: 9px 0;
}

.share-exporting .index-card-head span,
.share-exporting .index-card strong,
.share-exporting .institutional-summary strong {
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.15);
}

.share-exporting .index-card-head span,
.share-exporting .institutional-summary strong,
.share-exporting .industry-heat-row strong {
  font-size: 14px;
}

.share-exporting .index-card-head small,
.share-exporting .index-card-yahoo,
.share-exporting .index-minute-label,
.share-exporting .institutional-date {
  font-size: 11px;
}

.share-exporting .risk-score-inputs span {
  font-size: 12px;
}

.share-exporting .signal-component-head small,
.share-exporting .signal-component-head span,
.share-exporting .signal-component > p,
.share-exporting .industry-heat-row em,
.share-exporting .industry-heat-note,
.share-exporting .institutional-summary small {
  font-size: 12px;
}

.share-exporting .industry-heat-subtitle,
.share-exporting .industry-heat-rank,
.share-exporting .industry-heat-share {
  font-size: 13px;
}

.insight-card {
  background: rgba(10, 20, 35, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  padding: 12px;
}

.market-breadth-card {
  background: rgba(10, 20, 35, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  overflow: hidden;
  padding-top: 12px;
}

.breadth-head {
  padding: 0 12px;
}

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

.insight-head h2,
.rotation-head h2 {
  margin-bottom: 0;
}

.insight-period {
  background: rgba(37, 99, 235, 0.13);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  color: #93c5fd;
  flex: 0 0 auto;
  font-size: var(--type-micro);
  font-weight: 600;
  max-width: 58%;
  padding: 5px 8px;
  text-align: right;
}

.insight-period.improving {
  color: #86efac;
}

.insight-period.weakening {
  color: #fda4af;
}

.pulse-summary {
  font-size: var(--type-body);
  font-weight: 600;
  line-height: 1.5;
  margin: 8px 0 0;
}

.pulse-summary mark {
  background: rgba(96, 165, 250, 0.13);
  border-radius: 4px;
  color: #dbeafe;
  font-weight: 600;
  padding: 1px 3px;
}

.evidence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.evidence-chips span,
.evidence-chips button {
  background: #101d30;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  font: inherit;
  font-size: var(--type-caption);
  font-weight: 600;
  padding: 6px 9px;
}

.evidence-chips button {
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.evidence-chips button:active {
  background: #172942;
  transform: scale(0.97);
}

.evidence-chips button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.evidence-chips .positive {
  border-color: rgba(251, 113, 133, 0.42);
  color: #fda4af;
}

.evidence-chips .negative {
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

html[data-market="us"] .evidence-chips .positive {
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

html[data-market="us"] .evidence-chips .negative {
  border-color: rgba(251, 113, 133, 0.42);
  color: #fda4af;
}

.evidence-chips .warning {
  border-color: rgba(245, 185, 66, 0.42);
  color: #fcd34d;
}

.evidence-chips .realtime {
  color: #86efac;
}

.evidence-chips .delayed,
.evidence-chips .closed {
  color: #93c5fd;
}

.evidence-chips .cache,
.evidence-chips .source_error {
  color: #fda4af;
}

.breadth-bar {
  background: var(--line);
  border-radius: 999px;
  display: flex;
  height: 12px;
  margin: 10px 12px 0;
  overflow: hidden;
}

.breadth-bar span {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 500ms ease;
}

.breadth-bar span:first-child {
  border-radius: 999px 0 0 999px;
}

.breadth-bar span:last-child {
  border-radius: 0 999px 999px 0;
}

.breadth-scale {
  color: var(--muted);
  display: flex;
  font-size: var(--type-micro);
  font-weight: 600;
  justify-content: space-between;
  padding: 5px 12px 0;
}

.breadth-scale span:nth-child(2) {
  color: #64748b;
  text-align: center;
}

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

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

.breadth-flat {
  background-color: #536177;
}

html[data-market="us"] .breadth-up {
  background-color: var(--green);
}

html[data-market="us"] .breadth-down {
  background-color: var(--red);
}

.insight-note {
  color: var(--supporting-text);
  font-size: var(--type-caption);
  line-height: 1.6;
  margin: 2px 0 0;
  padding: 0 12px 9px;
}

.rotation-track {
  align-items: stretch;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr);
  padding: 0 12px 2px;
}

.rotation-track > i {
  align-self: center;
  color: #64748b;
  font-size: 21px;
  font-style: normal;
  text-align: center;
}

.rotation-note {
  color: var(--supporting-text);
  font-size: var(--type-caption);
  line-height: 1.6;
  margin: 8px 12px 0;
}

.rotation-step,
.rotation-track > article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  padding: 9px;
  position: relative;
  text-align: left;
}

.rotation-step {
  cursor: pointer;
  padding-left: 13px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.rotation-step::before {
  background: var(--rotation-accent, #60a5fa);
  content: "";
  inset: 0 auto 0 0;
  opacity: var(--rotation-strength, 0.5);
  position: absolute;
  width: 3px;
}

.rotation-step:hover,
.rotation-step:focus-visible {
  background: #132139;
  outline: none;
  transform: translateY(-1px);
}

.rotation-step:focus-visible {
  box-shadow: 0 0 0 2px #60a5fa;
}

.rotation-step:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
}

.rotation-step small,
.rotation-step strong,
.rotation-step span,
.rotation-track > article small,
.rotation-track > article strong {
  display: block;
}

.rotation-step small,
.rotation-track > article small {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 600;
}

.rotation-step strong,
.rotation-track > article strong {
  font-size: var(--type-h3);
  font-weight: 600;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rotation-step span {
  color: #cbd5e1;
  font-size: var(--type-caption);
  font-weight: 600;
  margin-top: 5px;
}

.rotation-step em {
  color: #60a5fa;
  display: block;
  font-size: var(--type-micro);
  font-style: normal;
  font-weight: 600;
  margin-top: 5px;
}

.industry-rank-title {
  color: #cbd5e1;
  font-size: 12px;
  margin: 16px 0 7px;
}

.rotation-step.cooling {
  border-color: rgba(52, 211, 153, 0.35);
  --rotation-accent: #34d399;
}

.rotation-step.warming,
.rotation-step.spreading {
  border-color: rgba(251, 113, 133, 0.38);
  --rotation-accent: #fb7185;
}

html[data-market="us"] .rotation-step.cooling {
  border-color: rgba(251, 113, 133, 0.38);
  --rotation-accent: #fb7185;
}

html[data-market="us"] .rotation-step.warming,
html[data-market="us"] .rotation-step.spreading {
  border-color: rgba(52, 211, 153, 0.35);
  --rotation-accent: #34d399;
}

.rotation-block {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 11px;
}

.rotation-block .rotation-head {
  padding: 0;
}

.rotation-block .rotation-track {
  padding-left: 0;
  padding-right: 0;
}

.rotation-block .rotation-note {
  margin-left: 0;
  margin-right: 0;
}

.attention-label {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0;
}

.summary-grid {
  background: var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  overflow: hidden;
}

.market-breadth-card .summary-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.summary-card {
  background: rgba(14, 25, 42, 0.98);
  border: 0;
  color: var(--text);
  font: inherit;
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
}

.summary-card.value-changed-rise {
  animation: summary-card-rise 1.3s ease-out both;
}

.summary-card.value-changed-fall {
  animation: summary-card-fall 1.3s ease-out both;
}

.summary-card span {
  color: var(--muted);
  display: block;
  font-size: var(--type-caption);
}

.summary-card strong {
  display: block;
  font-size: var(--type-h2);
  line-height: 1.25;
  margin-top: 2px;
}

.summary-card small {
  color: #60a5fa;
  display: block;
  font-size: var(--type-micro);
  font-weight: 600;
  margin-top: 3px;
}

.breadth-trend {
  color: var(--muted);
  display: block;
  font-size: var(--type-micro);
  font-style: normal;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 3px;
  min-height: 10px;
}

.breadth-trend[hidden] {
  display: none;
}

.breadth-trend[data-direction="rise"] {
  color: var(--tick-rise-icon);
}

.breadth-trend[data-direction="fall"] {
  color: var(--tick-fall-icon);
}

.breadth-trend span {
  color: inherit;
  display: inline;
  font-size: inherit;
}

.summary-rank {
  cursor: pointer;
  position: relative;
}

.summary-rank::after {
  color: #60a5fa;
  content: "›";
  font-size: 18px;
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
}

.summary-card.up strong {
  color: #fb7185;
}
.summary-card.down strong {
  color: #34d399;
}

html[data-market="us"] .summary-card.up strong {
  color: #34d399;
}

html[data-market="us"] .summary-card.down strong {
  color: #fb7185;
}

.control-panel {
  margin-top: 16px;
}

.control-group {
  min-width: 0;
}

.control-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 5px 2px;
}

.segmented {
  background: #091524;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  flex: 1 0 auto;
  font-size: 12px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.segmented button.active {
  background: #1d4ed8;
  color: #fff;
}

#layerTabs button {
  font-size: 14px;
}

.chart-card,
.rotation-card {
  background: rgba(10, 20, 35, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  overflow: hidden;
  position: relative;
}

.chart-card {
  scroll-margin-top: 10px;
}

.chart-head,
.rotation-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px;
}

.back-market {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 8px 10px;
}

.chart-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.industry-detail {
  background: #173a72;
  border-color: #28589d;
  font-size: 12px;
  padding: 8px 10px;
}

.legend {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
  gap: 12px;
  padding: 8px 12px;
}

.legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.legend-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-block;
  height: 10px;
  width: 22px;
}

.legend-chip.down {
  background: var(--green);
}
.legend-chip.flat {
  background: #536177;
}
.legend-chip.up {
  background: var(--red);
}
.legend-chip.positive {
  background: var(--blue);
}
.legend-chip.negative {
  background: var(--orange);
}
.legend-chip.margin-low {
  background: #0e7490;
}
.legend-chip.margin-high {
  background: #9333ea;
}
.legend-chip.us-up {
  background: var(--green);
}
.legend-chip.us-down {
  background: var(--red);
}

.legend-rank-button {
  background: #173a72;
  border: 1px solid #28589d;
  border-radius: 7px;
  color: #dbeafe;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  min-height: 30px;
  padding: 5px 8px;
}

.chart-stage {
  min-width: 0;
  position: relative;
}

.market-chart {
  height: 64vh;
  min-height: 510px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  width: 100%;
}

.fullscreen-button {
  bottom: 12px;
  background: rgba(20, 34, 56, 0.96);
  font-size: 12px;
  min-height: 46px;
  padding: 0 14px;
  position: absolute;
  right: 10px;
  z-index: 5;
}

body.chart-focus-active {
  height: var(--focus-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}

.chart-card.focus-mode {
  background: var(--bg);
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: var(--focus-height, 100dvh);
  inset: 0;
  margin: 0;
  overflow: hidden;
  position: fixed;
  width: var(--focus-width, 100vw);
  z-index: 100;
}

.chart-card.focus-mode .chart-head {
  grid-column: 1;
  grid-row: 1;
  padding-top: calc(10px + var(--safe-top));
}

.chart-card.focus-mode .chart-actions {
  display: none;
}

.chart-card.focus-mode .legend {
  grid-column: 1;
  grid-row: 2;
}

.chart-card.focus-mode .chart-stage {
  grid-column: 1;
  grid-row: 3;
  min-height: 0;
}

.chart-card.focus-mode .market-chart {
  height: 100%;
  min-height: 0;
  touch-action: none;
}

.chart-card.focus-mode .gesture-hint,
.chart-card.focus-mode .market-message {
  display: none;
}

.chart-card.focus-mode .fullscreen-button {
  display: none;
}

.focus-control-rail {
  display: none;
}

.chart-card.focus-mode .focus-control-rail {
  align-items: stretch;
  background: #0b1728;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-column: 2;
  grid-row: 1 / 4;
  justify-content: center;
  padding: calc(12px + var(--safe-top)) 10px calc(12px + var(--safe-bottom));
}

.focus-control-rail button {
  font-size: 12px;
  min-height: 52px;
  padding: 8px;
  width: 100%;
}

.focus-control-rail .focus-exit {
  background: #1d4ed8;
  border-color: #3b82f6;
}

.gesture-hint,
.market-message {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  padding: 8px 12px;
}

.gesture-hint {
  background: #101d30;
  border-top: 1px solid var(--line);
}

.market-message {
  border-top: 1px solid var(--line);
  min-height: 48px;
}

.market-message.error {
  color: #fda4af;
}

.rotation-card {
  padding-bottom: 10px;
}

.rotation-head .section-head-meta > span {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 600;
}

.rotation-grid {
  display: grid;
  gap: 12px;
  padding: 0 12px;
}

.rotation-grid h3 {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.rotation-list {
  display: grid;
  gap: 6px;
}

.rotation-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 8px 10px;
}

.rotation-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strengthening .rotation-row span {
  color: #fb7185;
}
.weakening .rotation-row span {
  color: #34d399;
}

.sheet-backdrop {
  background: rgba(0, 0, 0, 0.54);
  inset: 0;
  position: fixed;
  z-index: 40;
}

.bottom-sheet {
  background: #0e192a;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
  left: 0;
  max-height: min(76vh, 680px);
  overflow-y: auto;
  padding: 8px 14px calc(18px + var(--safe-bottom));
  position: fixed;
  right: 0;
  transform: translateY(105%);
  transition: transform 0.24s ease;
  z-index: 50;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  background: #526176;
  border-radius: 999px;
  height: 4px;
  margin: 0 auto 10px;
  width: 44px;
}

.sheet-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.sheet-close {
  font-size: 24px;
  height: 42px;
  min-width: 42px;
}

.sheet-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.detail-metrics {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.detail-metric {
  background: var(--surface);
  padding: 10px;
}

.detail-metric small {
  color: var(--muted);
  display: block;
  font-size: 10px;
}

.detail-metric strong {
  display: block;
  font-size: 15px;
  margin-top: 3px;
}

.stock-list {
  display: grid;
  gap: 7px;
}

.rank-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}

.rank-list {
  display: grid;
  gap: 7px;
}

.rank-sort-toggle {
  background: #091524;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
}

.rank-sort-toggle button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  min-height: 38px;
}

.rank-sort-toggle button.active {
  background: #5b21b6;
  color: #fff;
}

.rank-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 9px 11px;
  text-align: left;
  width: 100%;
}

.rank-index {
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
}

.rank-name {
  min-width: 0;
}

.rank-name strong,
.rank-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.rank-change {
  font-size: 14px;
  font-weight: 600;
}

.rank-change.up {
  color: #fb7185;
}

.rank-change.down {
  color: #34d399;
}

.rank-change.margin {
  color: #d8b4fe;
}

html[data-market="us"] .rank-change.up {
  color: #34d399;
}

html[data-market="us"] .rank-change.down {
  color: #fb7185;
}

.rank-sentinel {
  color: var(--muted);
  font-size: 11px;
  min-height: 38px;
  padding: 10px;
  text-align: center;
}

.stock-list button,
.external-link {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 46px;
  padding: 9px 11px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.stock-list small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.external-link {
  background: #1d4ed8;
  border-color: #2563eb;
  font-weight: 600;
  justify-content: center;
}

.layer-note {
  background: rgba(234, 122, 25, 0.1);
  border: 1px solid rgba(234, 122, 25, 0.34);
  border-radius: 9px;
  color: #fdba74;
  font-size: 11px;
  line-height: 1.5;
  padding: 9px 10px;
}

.sentiment-detail-score {
  align-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(13, 26, 43, 0.92));
  border: 1px solid #28589d;
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
}

.sentiment-detail-score > strong {
  font-size: 34px;
  line-height: 1;
  min-width: 54px;
}

.sentiment-detail-score > span {
  color: var(--text-primary);
  font-size: 16px;
}

.sentiment-detail-score > small {
  color: var(--text-muted);
  font-size: 11px;
  grid-column: 1 / -1;
  margin-top: 7px;
}

.sentiment-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.sentiment-detail-section h3 {
  color: var(--text-primary);
  font-size: 15px;
  margin: 0 0 8px;
}

.sentiment-detail-section > p,
.sentiment-usage-list {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.sentiment-detail-section > p {
  margin: 6px 0 0;
}

.sentiment-market-note {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
}

.sentiment-factor-list {
  display: grid;
  gap: 7px;
}

.sentiment-factor-row {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.sentiment-factor-row > div > strong,
.sentiment-factor-value > strong {
  color: var(--text-primary);
  display: block;
  font-size: 13px;
}

.sentiment-factor-row p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.sentiment-factor-value {
  min-width: 70px;
  text-align: right;
}

.sentiment-factor-value small {
  color: #7eb7f5;
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.sentiment-formula {
  background: #081321;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 8px;
  padding: 10px;
}

.sentiment-formula small,
.sentiment-formula strong,
.sentiment-formula p {
  display: block;
}

.sentiment-formula small {
  color: var(--text-muted);
  font-size: 11px;
}

.sentiment-formula strong {
  color: #93c5fd;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 5px;
}

.sentiment-formula p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 5px 0 0;
}

.sentiment-scale-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sentiment-scale-list span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  padding: 8px;
}

.sentiment-scale-list span:last-child {
  grid-column: 1 / -1;
}

.sentiment-scale-list b {
  color: #93c5fd;
  display: block;
  margin-bottom: 2px;
}

.sentiment-usage-list {
  margin: 0;
  padding-left: 20px;
}

.sentiment-usage-list li + li {
  margin-top: 6px;
}

.maintenance-calculator {
  background: #101d30;
  border: 1px solid #28589d;
  border-radius: 10px;
  padding: 11px;
}

.maintenance-calculator h3 {
  font-size: 14px;
  margin-bottom: 5px;
}

.maintenance-calculator > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 9px;
}

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

.calculator-fields label {
  color: var(--muted);
  font-size: 10px;
}

.calculator-fields input {
  background: #08111f;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  display: block;
  font: inherit;
  margin-top: 4px;
  min-height: 40px;
  padding: 8px;
  width: 100%;
}

.ratio-input {
  align-items: center;
  display: flex;
  gap: 5px;
}

.ratio-input input {
  flex: 1;
  min-width: 0;
}

.maintenance-calculator > button {
  background: #1d4ed8;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  margin-top: 9px;
  min-height: 42px;
  width: 100%;
}

.maintenance-calculator .calculator-result {
  margin: 8px 0 0;
}

.calculator-result.safe {
  color: #34d399;
}

.calculator-result.warning {
  color: #fbbf24;
}

.calculator-result.danger {
  color: #fb7185;
}

@media (min-width: 720px) {
  .market-app {
    padding: 18px 18px 32px;
  }

  .share-capture {
    margin: -18px -18px -12px;
    padding: 18px 18px 12px;
  }

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

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

  .pulse-summary {
    font-size: 17px;
  }

  .market-chart {
    height: 68vh;
    min-height: 560px;
  }

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

  .bottom-sheet {
    border-radius: 18px 0 0 18px;
    bottom: 0;
    left: auto;
    max-height: 100vh;
    top: 0;
    transform: translateX(105%);
    width: min(420px, 92vw);
  }

  .bottom-sheet.open {
    transform: translateX(0);
  }
}

@media (max-width: 380px) {
  .market-app {
    padding-left: 8px;
    padding-right: 8px;
  }

  .chart-actions {
    max-width: 154px;
  }

  .title-row {
    gap: 4px;
  }

  .market-meta-row {
    gap: 5px;
  }

  .market-status-group {
    gap: 5px;
  }

  .market-status-group .eyebrow {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .source-badge {
    font-size: 11px;
    min-height: 26px;
    padding: 4px 6px;
  }

  .source-badge::before {
    height: 6px;
    width: 6px;
  }

  .top-actions {
    gap: 4px;
  }

  .title-row h1 {
    font-size: 22px;
  }

  .version-badge {
    padding-left: 5px;
    padding-right: 5px;
  }

  .refresh-button {
    padding-left: 3px;
    padding-right: 3px;
  }

  .auto-refresh-toggle {
    padding-left: 0;
    padding-right: 0;
    width: 28px;
  }

  .share-button {
    height: 32px;
    min-height: 32px;
    width: 32px;
  }
}

@keyframes movement-triangle-pop {
  0% {
    transform: scale(0.9);
  }
  48% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes summary-card-rise {
  0% {
    background-color: var(--tick-rise-bg);
    box-shadow:
      inset 2px 0 0 var(--tick-rise-edge),
      inset -2px 0 0 var(--tick-rise-edge);
  }
  100% {
    background-color: rgba(14, 25, 42, 0.98);
    box-shadow: none;
  }
}

@keyframes summary-card-fall {
  0% {
    background-color: var(--tick-fall-bg);
    box-shadow:
      inset 2px 0 0 var(--tick-fall-edge),
      inset -2px 0 0 var(--tick-fall-edge);
  }
  100% {
    background-color: rgba(14, 25, 42, 0.98);
    box-shadow: none;
  }
}

@keyframes delayed-status-breathe {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0);
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes intraday-head-pulse {
  0% {
    opacity: 0.25;
    transform: translate(-50%, -50%) scale(0.72);
  }
  48% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.42);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes intraday-live-breathe {
  0%,
  100% {
    opacity: 0.58;
    transform: translate(-50%, -50%) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@keyframes live-update-badge-pulse {
  0% {
    background: rgba(74, 222, 128, 0.32);
    border-color: rgba(134, 239, 172, 0.92);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.38);
  }
  55% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }
  100% {
    background: rgba(148, 163, 184, 0.13);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: none;
  }
}

@keyframes live-update-dot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.72);
    transform: scale(1.45);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(74, 222, 128, 0);
    transform: scale(1);
  }
}

@keyframes movement-number-rise {
  0% {
    transform: translateY(3px);
  }
  48% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes movement-number-fall {
  0% {
    transform: translateY(-3px);
  }
  48% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes index-glow-rise {
  0% {
    opacity: 0.86;
    transform: translateY(-38%);
  }
  100% {
    opacity: 0;
    transform: translateY(35%);
  }
}

@keyframes index-glow-fall {
  0% {
    opacity: 0.86;
    transform: translateY(38%);
  }
  100% {
    opacity: 0;
    transform: translateY(-35%);
  }
}

@keyframes index-edge-rise {
  0%,
  45% {
    border-color: var(--tick-rise-edge);
    box-shadow:
      inset 2px 0 0 var(--tick-rise-edge),
      inset -2px 0 0 var(--tick-rise-edge),
      0 0 14px var(--tick-rise-glow);
  }
}

@keyframes index-edge-fall {
  0%,
  45% {
    border-color: var(--tick-fall-edge);
    box-shadow:
      inset 2px 0 0 var(--tick-fall-edge),
      inset -2px 0 0 var(--tick-fall-edge),
      0 0 14px var(--tick-fall-glow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-sheet,
  .breadth-bar span {
    transition: none;
  }

  .index-card.value-changed,
  .index-card.value-changed::before,
  .index-card.value-changed .index-movement-icon::before,
  .index-card.value-changed p,
  .index-card.value-changed .index-mini-chart-head {
    animation: none;
  }

  .index-card.live-chart .index-mini-chart-head {
    animation: none;
  }

  .summary-card.value-changed {
    animation: none;
  }

  .source-badge.delayed::before,
  .source-badge.realtime.live-update-pulse,
  .source-badge.realtime.live-update-pulse::before {
    animation: none;
  }
}

/* V3 visual hierarchy refresh — presentation only; data and update logic stay unchanged. */
:root {
  --bg: #050b14;
  --surface: #0d1a2b;
  --surface-2: #142238;
  --line: #22334a;
  --text: #edf3fc;
  --muted: #71839b;
  --text-primary: var(--text);
  --text-secondary: #aab8cb;
  --text-muted: var(--muted);
  --red: #ff6b7d;
  --green: #42d3a0;
  --blue: #3b82f6;
  --tick-rise-bg: rgba(255, 107, 125, 0.18);
  --tick-rise-text: #ff8d9c;
  --tick-rise-icon: #ff6b7d;
  --tick-rise-glow: rgba(255, 107, 125, 0.26);
  --tick-rise-rest: rgba(255, 107, 125, 0.1);
  --tick-rise-edge: #ff6b7d;
  --tick-fall-bg: rgba(66, 211, 160, 0.18);
  --tick-fall-text: #6ee7b7;
  --tick-fall-icon: #42d3a0;
  --tick-fall-glow: rgba(66, 211, 160, 0.24);
  --tick-fall-rest: rgba(66, 211, 160, 0.1);
  --tick-fall-edge: #42d3a0;
  --type-h1: clamp(22px, 5.8vw, 24px);
  --type-h2: 18px;
  --type-h3: 13px;
  --type-body: 14px;
  --type-caption: 12px;
  --type-micro: 11px;
  --supporting-text: #aab8cb;
}

html[data-market="us"] {
  --tick-rise-bg: rgba(66, 211, 160, 0.18);
  --tick-rise-text: #6ee7b7;
  --tick-rise-icon: #42d3a0;
  --tick-rise-glow: rgba(66, 211, 160, 0.24);
  --tick-rise-rest: rgba(66, 211, 160, 0.1);
  --tick-rise-edge: #42d3a0;
  --tick-fall-bg: rgba(255, 107, 125, 0.18);
  --tick-fall-text: #ff8d9c;
  --tick-fall-icon: #ff6b7d;
  --tick-fall-glow: rgba(255, 107, 125, 0.26);
  --tick-fall-rest: rgba(255, 107, 125, 0.1);
  --tick-fall-edge: #ff6b7d;
}

body {
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.12), transparent 40%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  font-weight: 400;
}

body * {
  font-variant-numeric: tabular-nums;
}

.market-app,
.market-app * {
  font-weight: 400 !important;
}

.market-app :is(h1, h2, h3, strong, b, button.active, .source-badge, .alert-pill),
.market-app .insight-period:is(.improving, .weakening),
.market-app .index-card-head small:is(.realtime, .live, .delayed),
.market-app .industry-heat-rank {
  font-weight: 500 !important;
}

.market-app {
  padding: 16px 12px calc(24px + var(--safe-bottom));
}

.share-capture {
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.12), transparent 40%), var(--bg);
  margin: -16px -12px -12px;
  padding: 16px 12px 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

h1,
.title-row h1 {
  font-size: var(--type-h1);
  line-height: 1.25;
  margin-bottom: 4px;
}

h2 {
  font-size: var(--type-h2);
  line-height: 1.35;
}

.version-badge {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 11px;
  padding: 0;
}

.quote-time,
.index-update-time,
.plain-meta,
.index-card-head small,
.institutional-date,
.signal-component > p,
.signal-component-head span,
.insight-period {
  color: var(--muted);
  font-size: 11px;
}

.market-selector {
  margin-top: 16px;
}

.market-selector button {
  min-height: 40px;
}

.index-update-time {
  margin: 8px 2px 0;
}

.index-panel {
  gap: 8px;
  margin-top: 8px;
}

.index-card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  padding: 12px 12px 12px 15px;
}

.index-card::before {
  background: var(--line);
  inset: 0 auto 0 0;
  opacity: 1;
  width: 3px;
}

/* Keep the 3px direction rail on ::before and reserve ::after for the
   transient full-card wash when a live price actually changes. */
.index-card::after {
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.index-card.value-changed-rise::after {
  animation: v4-index-gradient-rise 1.3s ease-out both;
  background: linear-gradient(
    125deg,
    transparent 0%,
    var(--tick-rise-rest) 24%,
    var(--tick-rise-glow) 52%,
    transparent 88%
  );
}

.index-card.value-changed-fall::after {
  animation: v4-index-gradient-fall 1.3s ease-out both;
  background: linear-gradient(
    235deg,
    transparent 0%,
    var(--tick-fall-rest) 24%,
    var(--tick-fall-glow) 52%,
    transparent 88%
  );
}

@keyframes v4-index-gradient-rise {
  0% {
    opacity: 0;
    transform: translate3d(-24%, 10%, 0);
  }
  18% {
    opacity: 0.95;
  }
  58% {
    opacity: 0.58;
  }
  100% {
    opacity: 0;
    transform: translate3d(22%, -8%, 0);
  }
}

@keyframes v4-index-gradient-fall {
  0% {
    opacity: 0;
    transform: translate3d(24%, -10%, 0);
  }
  18% {
    opacity: 0.95;
  }
  58% {
    opacity: 0.58;
  }
  100% {
    opacity: 0;
    transform: translate3d(-22%, 8%, 0);
  }
}

.index-card[data-update-direction="rise"],
.index-card[data-update-direction="fall"] {
  background: var(--surface);
  border-color: transparent;
  box-shadow: none;
}

.index-card[data-update-direction="rise"]::before {
  background: var(--tick-rise-icon);
}

.index-card[data-update-direction="fall"]::before {
  background: var(--tick-fall-icon);
}

.index-card[data-update-direction="rise"]::before,
.index-card[data-update-direction="fall"]::before {
  opacity: 0.42;
}

.index-card.active {
  border-color: transparent;
  box-shadow: none;
}

.index-card-head span {
  color: var(--text-secondary, #aab8cb);
  font-size: 13px;
  line-height: 1.3;
}

.index-card-head small {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.index-card-head small:is(.realtime, .live, .delayed) {
  background: #102b49;
  border-radius: 999px;
  color: #72b7ff;
  padding: 4px 8px;
}

.index-card-head small.delayed {
  background: rgba(245, 185, 66, 0.12);
  color: #f5c95b;
}

.index-value-row {
  display: block;
  margin-top: 8px;
}

.index-card strong {
  color: var(--text);
  font-size: clamp(20px, 5.7vw, 24px);
  line-height: 1.25;
}

.index-movement-icon {
  display: none;
}

.index-card p {
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.35;
  margin-top: 4px;
}

.index-card p.up {
  color: var(--red);
}

.index-card p.down {
  color: var(--green);
}

html[data-market="us"] .index-card p.up {
  color: var(--green);
}

html[data-market="us"] .index-card p.down {
  color: var(--red);
}

.index-card-foot {
  margin-top: 8px;
}

.index-mini-chart {
  height: 24px;
}

.index-mini-chart polyline {
  stroke-width: 0.8;
}

.index-mini-chart-head {
  filter: drop-shadow(0 0 1px currentColor);
}

.index-card-yahoo,
.index-minute-label {
  font-size: 11px;
}

.institutional-summary {
  gap: 4px;
  margin-top: 8px;
}

.institutional-summary small {
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
}

.institutional-summary strong {
  font-size: 15px;
}

.risk-signals-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 16px 0 0;
}

.risk-signals-card.sentiment-detail-trigger {
  cursor: pointer;
  position: relative;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.risk-signals-card.sentiment-detail-trigger:active {
  background: rgba(59, 130, 246, 0.035);
  transform: scale(0.995);
}

.risk-signals-card.sentiment-detail-trigger:focus-visible {
  border-radius: 10px;
  outline: 2px solid #60a5fa;
  outline-offset: 5px;
}

@media (hover: hover) {
  .risk-signals-card.sentiment-detail-trigger:hover {
    background: rgba(59, 130, 246, 0.025);
    border-top-color: #3b82f6;
  }
}

.sentiment-detail-hint {
  align-items: center;
  color: #7eb7f5;
  display: flex;
  font-size: 12px;
  gap: 6px;
  justify-content: center;
  line-height: 1.4;
  margin: 12px 0 0;
}

.sentiment-detail-hint span:last-child {
  font-size: 18px;
  line-height: 1;
  margin-left: 2px;
}

.risk-signals-grid {
  gap: 8px;
  margin-top: 12px;
}

.signal-component {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  padding: 12px 8px 0;
}

.signal-component-head small {
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
  letter-spacing: 0;
}

.signal-component-head span {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.fear-greed-value strong,
.risk-score-ring strong {
  font-size: 20px;
}

.fear-greed-value strong {
  background: var(--bg);
  box-shadow: 0 0 0 5px var(--bg);
}

.fear-greed-value span,
.risk-score-ring span {
  font-size: 12px;
}

.risk-score-inputs {
  gap: 4px;
}

.risk-score-inputs span {
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: clamp(9.5px, 2.5vw, 11px);
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-overflow: ellipsis;
}

.institutional-date {
  opacity: 0.58;
}

.industry-heat-card,
.market-breadth-card {
  background: #081321;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 24px;
}

.industry-heat-card {
  padding: 16px 12px 12px;
}

.market-breadth-card {
  padding-top: 16px;
}

.industry-heat-subtitle {
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
  margin: 8px 0;
}

.industry-heat-row {
  gap: 8px;
  min-height: 36px;
}

.industry-heat-row em,
.industry-heat-note,
.signal-empty {
  font-size: 11px;
}

.industry-heat-rank {
  color: #7eb7f5;
  font-size: 13px;
  text-align: center;
}

.industry-heat-row strong {
  font-size: 12px;
}

.industry-heat-share {
  font-size: 13px;
}

.industry-heat-note,
.signal-empty {
  line-height: 1.6;
  margin-top: 8px;
}

.insight-period {
  background: transparent;
  border: 0;
  border-radius: 0;
  max-width: 58%;
  padding: 0;
}

.insight-period:is(.improving, .weakening) {
  background: #102b49;
  border: 1px solid rgba(114, 183, 255, 0.28);
  border-radius: 999px;
  color: #72b7ff;
  padding: 4px 8px;
}

.summary-grid {
  margin-top: 12px;
}

.summary-card {
  background: var(--surface);
  padding: 12px 8px;
}

.summary-card span {
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
}

.summary-card strong {
  font-size: 20px;
  line-height: 1.3;
  margin-top: 4px;
}

.summary-card small,
.breadth-trend,
.breadth-scale,
.insight-note {
  font-size: 11px;
}

.breadth-bar {
  height: 8px;
  margin-top: 12px;
}

.breadth-scale {
  padding-top: 8px;
}

.insight-note {
  line-height: 1.6;
  padding-bottom: 12px;
}

.insight-card.pulse-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 16px 0 0;
}

.pulse-summary {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 8px;
}

.pulse-summary mark {
  background: transparent;
  color: var(--text);
  padding: 0;
}

.evidence-chips {
  gap: 8px 12px;
  margin-top: 8px;
}

.evidence-chips span,
.evidence-chips button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
  padding: 0;
}

.rotation-block {
  margin-top: 16px;
  padding-top: 12px;
}

.attention-label,
.rotation-step small,
.rotation-track > article small,
.rotation-step span {
  font-size: 12px;
}

.rotation-step strong,
.rotation-track > article strong {
  font-size: 13px;
}

.rotation-note {
  font-size: 11px;
  line-height: 1.6;
}

.control-panel,
.chart-card,
.rotation-card {
  margin-top: 24px;
}

.market-alert-bar {
  align-items: center;
  appearance: none;
  background: #0b192a;
  border: 1px solid #263a53;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 9px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  margin-top: 14px;
  min-height: 44px;
  overflow: hidden;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
  position: relative;
}

.market-alert-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 14px;
}

.market-alert-row .market-alert-bar {
  margin-top: 0;
}

.market-alert-bar:focus-visible,
.observation-risk-button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.market-alert-label {
  color: #7389a4;
  font-size: 10px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.market-alert-bar > strong {
  background: #16263a;
  border-radius: 999px;
  color: #9fb2ca;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  white-space: nowrap;
}

.market-alert-bar.warning > strong {
  background: #352619;
  color: #ffb36b;
}

.market-alert-bar.danger > strong {
  background: #3a2028;
  color: #ff8396;
}

.market-alert-bar.notice > strong {
  background: #12332d;
  color: #57d4ac;
}

#marketAlertText,
#marketEventText {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#marketAlertText b,
#marketEventText b {
  color: #edf4fc;
}

.market-alert-copy {
  min-width: 0;
}

#marketAlertMeta,
#marketEventMeta {
  align-items: center;
  color: #70839a;
  display: flex;
  font-size: 9px;
  gap: 4px;
  margin-top: 2px;
  white-space: nowrap;
}

#marketAlertMeta i,
#marketEventMeta i {
  background: #64748b;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
  display: inline-block;
  height: 5px;
  width: 5px;
}

#marketAlertMeta.current i,
#marketEventMeta.current i {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

#marketAlertMeta.stale i,
#marketEventMeta.stale i {
  background: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.market-alert-progress {
  background: rgba(115, 137, 164, 0.16);
  bottom: 0;
  height: 2px;
  left: 8px;
  overflow: hidden;
  position: absolute;
  right: 8px;
}

.market-alert-progress i {
  background: #6ea8e9;
  display: block;
  height: 100%;
  transform-origin: left;
  width: 100%;
}

.market-alert-bar.warning .market-alert-progress i {
  background: #fb923c;
}
.market-alert-bar.danger .market-alert-progress i {
  background: #fb7185;
}
.market-alert-bar.notice .market-alert-progress i {
  background: #34d399;
}

.market-event-row {
  margin-top: 7px;
}

.market-event-bar > strong {
  background: #132d47;
  color: #82c5ff;
}

.market-event-bar.earnings > strong {
  background: #2b2343;
  color: #c9acff;
}

.market-event-bar.macro > strong {
  background: #352619;
  color: #ffbd78;
}

.market-event-bar .market-alert-progress i {
  background: #7eb7f5;
}

.market-alert-progress i.running {
  animation: market-alert-progress 4.6s linear forwards;
}

@keyframes market-alert-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.market-alert-chevron {
  color: #7eb7f5;
  font-size: 19px;
}

.market-observation-card {
  background: #081321;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 12px;
  overflow: hidden;
  padding-top: 16px;
}

.market-observation-card > .insight-head,
.market-observation-card > .observation-state-row,
.market-observation-card > .pulse-summary,
.market-observation-card > .observation-attention,
.market-observation-card > .evidence-chips {
  margin-left: 12px;
  margin-right: 12px;
}

.market-observation-card .insight-head h2,
.market-observation-card .rotation-head h2 {
  font-size: var(--type-h2);
  line-height: 1.35;
}

.market-observation-card .eyebrow,
.market-observation-card .attention-label {
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.market-observation-card .insight-period,
.market-observation-card .rotation-head .section-head-meta > span {
  font-size: 11px;
}

.section-head-meta {
  flex: 0 0 auto;
  gap: 5px;
  justify-content: flex-end;
}

.section-head-meta > span,
.market-observation-card .insight-head h2,
.market-observation-card .rotation-head h2 {
  white-space: nowrap;
}

.section-head-meta .insight-period {
  max-width: none;
}

.section-explain {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.section-explain article {
  border-top: 1px solid var(--line);
  padding: 13px;
}

.section-explain article:first-child {
  border-top: 0;
}

.section-explain h3 {
  color: #7eb7f5;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0;
}

.section-explain p {
  color: #b5c3d5;
  font-size: 13px;
  line-height: 1.65;
  margin: 5px 0 0;
}

.observation-state-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 12px;
}

.observation-state {
  background: #17263a;
  border: 1px solid #2b3e57;
  border-radius: 999px;
  color: #b8c7d9;
  font-size: 12px;
  padding: 6px 9px;
}

.observation-state.positive {
  background: #102f29;
  border-color: #245948;
  color: #55d2aa;
}

.observation-state.warning {
  background: #342617;
  border-color: #604321;
  color: #ffb36b;
}

.observation-state.negative {
  background: #382029;
  border-color: #643141;
  color: #ff8196;
}

.observation-risk-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #8da0b8;
  cursor: pointer;
  display: flex;
  gap: 6px;
  padding: 4px 0;
}

.observation-risk-button > span:first-child {
  color: #d4deea;
}

.observation-risk-button small {
  color: #74869c;
}

.observation-risk-button > span:last-child {
  color: #70abed;
}

.observation-fear-group {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  white-space: nowrap;
}

.observation-fear-group > span {
  color: #70abed;
  font-size: 12px;
  line-height: 1;
}

.market-observation-card .pulse-summary {
  margin-top: 12px;
}

.observation-attention {
  color: #94a5ba;
  font-size: 13px;
  line-height: 1.65;
  margin-top: 5px;
}

.observation-attention mark {
  background: transparent;
  color: #cbd7e6;
  padding: 0;
}

.observation-actions {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.observation-actions article {
  border-left: 1px solid var(--line);
  min-width: 0;
  padding: 12px;
}

.observation-actions article:first-child {
  border-left: 0;
}

.observation-actions small {
  color: #71839a;
  display: block;
  font-size: 11px;
}

.observation-actions strong {
  color: #d7e2ef;
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 5px;
}

.observation-actions .observation-exposure strong {
  color: #7eb7f5;
  font-size: 18px;
}

.market-observation-card .rotation-block {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 14px 12px 12px;
}

.market-alert-sheet-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.market-alert-sheet-row {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 13px;
}

button.market-alert-sheet-row {
  appearance: none;
  background: #081421;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

button.market-alert-sheet-row:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
}

.market-alert-sheet-row.event-row {
  gap: 8px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 11px;
}

.market-alert-sheet-row.event-row > span {
  border-radius: 8px;
  font-size: 10px;
  white-space: nowrap;
}

.market-alert-sheet-row.event-row > em {
  color: #6f849d;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.market-alert-sheet-row.event-row strong {
  font-size: 13px;
  line-height: 1.42;
}

.market-alert-sheet-row.event-row p {
  font-size: 11px;
  line-height: 1.45;
  margin-top: 3px;
}

.bottom-sheet.market-event-sheet .sheet-head h2 {
  font-size: 20px;
  line-height: 1.35;
}

.bottom-sheet.market-event-sheet .market-detail-head h3 {
  font-size: 15px;
  line-height: 1.45;
}

.bottom-sheet.market-event-sheet .market-detail-summary {
  font-size: 13px;
  line-height: 1.58;
}

.bottom-sheet.market-event-sheet .market-detail-meta {
  font-size: 10px;
}

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

.market-detail-head h3 {
  color: #e4edf7;
  font-size: 18px;
  line-height: 1.45;
  margin: 0;
}

.market-detail-head span {
  background: #172d45;
  border-radius: 999px;
  color: #8ec8ff;
  flex: 0 0 auto;
  font-size: 11px;
  padding: 5px 8px;
}

.market-detail-summary {
  color: #9aacc0;
  line-height: 1.65;
  margin-top: 12px;
}

.market-detail-meta {
  color: #71859d;
  font-size: 11px;
  margin-top: 10px;
}

.market-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.market-detail-tags span {
  border: 1px solid #28445f;
  border-radius: 999px;
  color: #a9bdd2;
  font-size: 11px;
  padding: 5px 8px;
}

.market-detail-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.market-detail-actions button,
.market-detail-actions a {
  align-items: center;
  background: #102238;
  border: 1px solid #294763;
  border-radius: 9px;
  color: #dbe9f6;
  display: flex;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
}

.market-alert-sheet-row:first-child {
  border-top: 0;
}

.market-alert-sheet-row > span {
  background: #17263a;
  border-radius: 999px;
  color: #9fb1c7;
  font-size: 11px;
  padding: 4px 0;
  text-align: center;
}

.market-alert-sheet-row.warning > span {
  background: #352619;
  color: #ffb36b;
}

.market-alert-sheet-row.danger > span {
  background: #3a2028;
  color: #ff8396;
}

.market-alert-sheet-row.notice > span {
  background: #12332d;
  color: #57d4ac;
}

.market-alert-sheet-row strong {
  color: #e2ebf5;
}

.market-alert-sheet-row p {
  color: #899bb1;
  line-height: 1.55;
  margin-top: 4px;
}

@media (max-width: 719px) {
  .market-alert-row {
    gap: 6px;
    margin-top: 10px;
  }

  .market-alert-bar {
    gap: 6px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 0;
    min-height: 38px;
    padding: 5px 7px;
  }

  .market-alert-label {
    display: none;
  }

  .market-alert-bar > strong {
    font-size: 10px;
    padding: 3px 6px;
  }

  #marketAlertText,
  #marketEventText {
    font-size: 12px;
  }

  .market-alert-chevron {
    font-size: 16px;
  }

  .market-observation-card {
    margin-top: 10px;
    padding-top: 16px;
  }

  .market-observation-card > .insight-head,
  .market-observation-card > .observation-state-row,
  .market-observation-card > .pulse-summary,
  .market-observation-card > .observation-attention,
  .market-observation-card > .evidence-chips {
    margin-left: 12px;
    margin-right: 12px;
  }

  .observation-state-row {
    gap: 6px;
    margin-top: 10px;
  }

  .observation-state {
    font-size: 11px;
    padding: 4px 7px;
  }

  .observation-risk-button {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 4px;
    min-width: 0;
    padding: 2px 0;
  }

  .observation-risk-button small {
    font-size: 11px;
  }

  .market-observation-card .pulse-summary {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 9px;
  }

  .observation-attention {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 3px;
    overflow-wrap: anywhere;
  }

  .market-observation-card .evidence-chips {
    gap: 6px 9px;
    margin-top: 7px;
  }

  .market-observation-card .evidence-chips span,
  .market-observation-card .evidence-chips button {
    font-size: 11px;
  }

  .observation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .observation-actions article {
    overflow-wrap: anywhere;
    padding: 9px 10px;
  }

  .observation-actions small {
    font-size: 10px;
  }

  .observation-actions strong {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 3px;
  }

  .observation-actions .observation-exposure strong {
    font-size: 16px;
  }

  .observation-actions article:nth-child(3) {
    border-left: 0;
  }

  .observation-actions article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .market-observation-card .rotation-block {
    padding: 16px 12px 12px;
  }

  .market-observation-card .rotation-head {
    margin-bottom: 10px;
  }

  .market-observation-card .rotation-step small,
  .market-observation-card .rotation-track > article small,
  .market-observation-card .rotation-step span {
    font-size: 11px;
  }

  .market-observation-card .rotation-step strong,
  .market-observation-card .rotation-track > article strong {
    font-size: 12px;
  }

  .market-observation-card .rotation-note {
    font-size: 10px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-alert-progress i.running {
    animation: none;
    transform: scaleX(1);
  }
}

.share-exporting .index-card-head span,
.share-exporting .institutional-summary strong,
.share-exporting .industry-heat-row strong,
.share-exporting .index-card-head small,
.share-exporting .index-card-yahoo,
.share-exporting .index-minute-label,
.share-exporting .institutional-date,
.share-exporting .risk-score-inputs span,
.share-exporting .signal-component-head small,
.share-exporting .signal-component-head span,
.share-exporting .signal-component > p,
.share-exporting .industry-heat-row em,
.share-exporting .industry-heat-note,
.share-exporting .institutional-summary small,
.share-exporting .industry-heat-subtitle,
.share-exporting .industry-heat-rank,
.share-exporting .industry-heat-share {
  font-size: inherit;
}

@media (max-width: 380px) {
  .market-app {
    padding-left: 8px;
    padding-right: 8px;
  }

  .share-capture {
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .index-card {
    padding-left: 13px;
    padding-right: 8px;
  }

  .index-card-head span {
    font-size: 12px;
  }

  .index-card p {
    font-size: 13px;
  }

  .institutional-summary strong {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-card.value-changed::after {
    animation: none;
  }
}
