:root {
  --bg-1: #0d1320;
  --bg-2: #162238;
  --orb-a: rgba(114, 178, 198, 0.28);
  --orb-b: rgba(244, 185, 118, 0.18);
  --text-main: rgba(248, 250, 252, 0.96);
  --text-soft: rgba(226, 232, 240, 0.68);
  --text-faint: rgba(226, 232, 240, 0.38);
  --pos-color: #7ee2b8;
  --neg-color: #f48b8b;
  --pulse-color: #f6c978;
}

/* Emotional Palettes by Score Tier */
body[data-tier="deep-low"] {
  --bg-1: #090c14;
  --bg-2: #141c2f;
  --orb-a: rgba(96, 125, 186, 0.25);
  --orb-b: rgba(74, 85, 128, 0.22);
}

body[data-tier="cool"] {
  --bg-1: #0c1320;
  --bg-2: #182940;
  --orb-a: rgba(98, 168, 204, 0.26);
  --orb-b: rgba(124, 152, 196, 0.18);
}

body[data-tier="calm"] {
  --bg-1: #0e1621;
  --bg-2: #1b2c38;
  --orb-a: rgba(112, 192, 184, 0.26);
  --orb-b: rgba(235, 188, 128, 0.19);
}

body[data-tier="warm"] {
  --bg-1: #1a141c;
  --bg-2: #2e2026;
  --orb-a: rgba(245, 165, 110, 0.30);
  --orb-b: rgba(242, 124, 138, 0.22);
}

body[data-tier="radiant"] {
  --bg-1: #1f1612;
  --bg-2: #3b2618;
  --orb-a: rgba(255, 196, 102, 0.36);
  --orb-b: rgba(255, 132, 98, 0.26);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 50% 35%, var(--bg-2), var(--bg-1) 75%);
  transition: background 1.8s ease;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Orbs */
.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  transition: background 1.8s ease;
  will-change: transform, opacity;
}

.orb-1 {
  width: 58vw;
  height: 58vw;
  max-width: 760px;
  max-height: 760px;
  top: -12%;
  left: 15%;
  background: var(--orb-a);
  animation: breatheA 11s ease-in-out infinite;
}

.orb-2 {
  width: 52vw;
  height: 52vw;
  max-width: 680px;
  max-height: 680px;
  bottom: -16%;
  right: 12%;
  background: var(--orb-b);
  animation: breatheB 14s ease-in-out infinite;
}

@keyframes breatheA {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(3%, 4%) scale(1.09); opacity: 1; }
}

@keyframes breatheB {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.78; }
  50% { transform: translate(-4%, -3%) scale(1.12); opacity: 0.96; }
}

/* Click Ripple Layer */
.ripple-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Inline ECG / Global Pulse Canvas under Hero Number */
.ecg-wrap {
  width: min(520px, 84vw);
  height: 74px;
  margin-top: 8px;
  pointer-events: none;
}

.ecg-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.88;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.45;
  animation: rippleExpand 1.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ripple-wave.happy {
  background: radial-gradient(circle, rgba(255, 206, 128, 0.42), rgba(255, 206, 128, 0) 68%);
}

.ripple-wave.low {
  background: radial-gradient(circle, rgba(132, 178, 240, 0.38), rgba(132, 178, 240, 0) 68%);
}

@keyframes rippleExpand {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* Main Stage */
.stage {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vh, 44px) 24px clamp(28px, 5vh, 48px);
  text-align: center;
}

.top-whisper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  user-select: none;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pos-color);
  box-shadow: 0 0 10px var(--pos-color);
  animation: pulseDot 2.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: auto 0;
}

.question-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 62px;
  justify-content: center;
}

.global-question {
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.global-question.fading {
  opacity: 0;
  transform: translateY(4px);
}

.lang-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
  transition: opacity 0.65s ease;
}

.lang-tag.fading {
  opacity: 0;
}

.number-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  user-select: none;
  text-shadow: 0 10px 48px rgba(0, 0, 0, 0.28);
}

.hero-int {
  font-size: clamp(5.8rem, 20vw, 13.5rem);
  font-weight: 200;
  letter-spacing: -0.04em;
}

.hero-dec {
  font-size: clamp(2.1rem, 6.2vw, 4.2rem);
  font-weight: 200;
  color: var(--text-soft);
  margin-left: 2px;
}

.hero-micro-wrap {
  position: relative;
  display: inline-block;
  margin-left: 3px;
}

.hero-micro {
  font-size: clamp(0.85rem, 1.9vw, 1.35rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.24);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.hero-micro.flash-happy {
  color: #ffd685;
  text-shadow: 0 0 18px rgba(255, 214, 133, 0.85);
}

.hero-micro.flash-low {
  color: #93c0ff;
  text-shadow: 0 0 18px rgba(147, 192, 255, 0.85);
}

.micro-float {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translate(-50%, 0);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.micro-float.show-happy {
  color: #ffd685;
  animation: floatMicroUp 1.5s ease-out forwards;
}

.micro-float.show-low {
  color: #93c0ff;
  animation: floatMicroDown 1.5s ease-out forwards;
}

@keyframes floatMicroUp {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  18% { opacity: 1; transform: translate(-50%, -6px); }
  100% { opacity: 0; transform: translate(-50%, -30px); }
}

@keyframes floatMicroDown {
  0% { opacity: 0; transform: translate(-50%, -4px); }
  18% { opacity: 1; transform: translate(-50%, 6px); }
  100% { opacity: 0; transform: translate(-50%, 28px); }
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: var(--text-soft);
  letter-spacing: 0.08em;
}

.status-line .sep {
  color: var(--text-faint);
}

.mood-label {
  transition: opacity 0.65s ease;
}

.mood-label.fading {
  opacity: 0;
}

.delta-label.up {
  color: var(--pos-color);
}

.delta-label.down {
  color: var(--neg-color);
}

/* Bottom Pulse Dock */
.pulse-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pulse-buttons {
  display: flex;
  gap: 14px;
}

.pulse-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-soft);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.pulse-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--text-main);
  transform: translateY(-1px);
}

.pulse-btn:active {
  transform: scale(0.96);
}

.pulse-text {
  transition: opacity 0.65s ease;
}

.pulse-text.fading {
  opacity: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pulse-happy .pulse-dot {
  background: #ffd082;
  box-shadow: 0 0 10px rgba(255, 208, 130, 0.75);
}

.pulse-low .pulse-dot {
  background: #8fb8f0;
  box-shadow: 0 0 10px rgba(143, 184, 240, 0.65);
}

.pulse-feedback {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  min-height: 18px;
  transition: color 0.3s ease, opacity 0.65s ease;
}

.pulse-feedback.fading {
  opacity: 0;
}

/* Discreet Bottom-Right Corner Buttons */
.corner-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
}

.corner-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 22, 34, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.corner-btn.info-serif {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 15px;
}

.corner-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--text-main);
  transform: translateY(-1px);
}

body.glimpse-mode #glimpse-btn {
  border-color: rgba(255, 214, 133, 0.55);
  color: #ffd685;
  background: rgba(255, 214, 133, 0.14);
}

#sound-btn.active {
  border-color: rgba(126, 226, 184, 0.55);
  color: #9bf0cc;
  background: rgba(126, 226, 184, 0.14);
  box-shadow: 0 0 14px rgba(126, 226, 184, 0.22);
}

/* Gentle Healing Invite under Pulse Dock */
.healing-invite {
  margin-top: 2px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 133, 0.28);
  background: rgba(255, 214, 133, 0.08);
  color: rgba(255, 226, 168, 0.88);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  animation: fadeSlideUp 0.6s ease;
}

.healing-invite:hover {
  background: rgba(255, 214, 133, 0.18);
  border-color: rgba(255, 214, 133, 0.5);
  transform: translateY(-1px);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* V2 Earth Glimpse Full-Screen Stage */
.glimpse-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: #04060b;
  transition: opacity 0.95s ease;
  overflow: hidden;
}

body.glimpse-mode .glimpse-stage {
  opacity: 1;
}

.glimpse-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: brightness(0.32) blur(6px);
  transform: scale(1.045);
  transition:
    opacity 2.3s cubic-bezier(0.22, 1, 0.36, 1),
    filter 2.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 18s ease-out;
  will-change: transform, opacity, filter;
}

.glimpse-media.fading-out {
  transition:
    opacity 0.75s ease,
    filter 0.75s ease;
  opacity: 0;
  filter: brightness(0.25) blur(4px);
}

.glimpse-media.loaded {
  opacity: 1;
  filter: brightness(1) blur(0px);
  transform: scale(1.0);
}

.glimpse-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 14%, rgba(6, 10, 18, 0.55), transparent 40%),
    linear-gradient(to top, rgba(6, 10, 18, 0.72) 0%, rgba(6, 10, 18, 0.12) 34%, transparent 60%);
  pointer-events: none;
}

/* Slow Local-Language "Earth Online" Curtain Title */
.glimpse-intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 1.05s ease, transform 1.2s ease;
}

.glimpse-intro.showing {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.glimpse-intro.dissolving {
  opacity: 0;
  transform: translateY(-6px) scale(1.02);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.glimpse-intro-local {
  font-size: clamp(1.7rem, 4.2vw, 3.1rem);
  font-weight: 200;
  letter-spacing: 0.14em;
  color: rgba(248, 250, 252, 0.92);
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.65);
}

.glimpse-intro-sub {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 214, 133, 0.72);
}

/* Cinema Shift: Hero gracefully glides to Top-Left Corner */
.hero {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.top-whisper,
.pulse-dock {
  transition: opacity 0.55s ease, transform 0.55s ease;
}

body.glimpse-mode .top-whisper,
body.glimpse-mode .pulse-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

body.glimpse-mode .stage {
  pointer-events: none;
}

body.glimpse-mode .hero {
  position: fixed;
  top: 24px;
  left: 26px;
  margin: 0;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  padding: 14px 18px 12px;
  border-radius: 16px;
  background: rgba(10, 15, 25, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  z-index: 12;
}

body.glimpse-mode .question-wrap {
  min-height: auto;
  align-items: flex-start;
  gap: 2px;
}

body.glimpse-mode .global-question {
  font-size: 0.84rem;
  color: rgba(241, 245, 249, 0.78);
}

body.glimpse-mode .lang-tag {
  display: none;
}

body.glimpse-mode .hero-int {
  font-size: 2.65rem;
}

body.glimpse-mode .hero-dec {
  font-size: 1.15rem;
}

body.glimpse-mode .hero-micro {
  font-size: 0.65rem;
}

body.glimpse-mode .status-line {
  font-size: 0.76rem;
  gap: 6px;
}

body.glimpse-mode .ecg-wrap {
  width: 170px;
  height: 30px;
  margin-top: 2px;
}

/* Top-Right Minimalist World Map Beacon (Symmetrical with Top-Left Hero) */
.glimpse-map-card {
  position: fixed;
  top: 24px;
  right: 26px;
  z-index: 12;
  width: 218px;
  padding: 12px 14px 10px;
  border-radius: 16px;
  background: rgba(10, 15, 25, 0.44);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

body.glimpse-mode .glimpse-map-card.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-pin-dot {
  fill: #ffd685;
  filter: drop-shadow(0 0 5px rgba(255, 214, 133, 0.95));
}

.map-pin-ring {
  fill: none;
  stroke: rgba(255, 214, 133, 0.75);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  animation: mapRadar 2.4s ease-out infinite;
}

@keyframes mapRadar {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3.6); opacity: 0; }
}

.map-coords {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.68);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
  .glimpse-map-card {
    display: none;
  }
}

/* Glimpse HUD (Postcard Caption + Minimal Controls) */
.glimpse-hud {
  position: fixed;
  left: 26px;
  right: 168px;
  bottom: 22px;
  z-index: 14;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

body.glimpse-mode .glimpse-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.glimpse-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
  text-align: left;
}

.glimpse-tag {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 214, 133, 0.85);
}

.glimpse-title {
  font-size: 0.96rem;
  font-weight: 400;
  color: rgba(248, 250, 252, 0.94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.glimpse-credit {
  font-size: 11.5px;
  color: rgba(226, 232, 240, 0.66);
  text-decoration: none;
  transition: color 0.2s ease;
}

.glimpse-credit:hover {
  color: rgba(248, 250, 252, 0.95);
  text-decoration: underline;
}

.glimpse-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(10, 15, 25, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.g-ctrl-btn {
  border: none;
  background: transparent;
  color: rgba(241, 245, 249, 0.82);
  font-size: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.g-ctrl-btn.g-ctrl-text {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.g-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

@media (max-width: 680px) {
  .glimpse-hud {
    flex-direction: column;
    align-items: flex-start;
    right: 22px;
    bottom: 68px;
  }
}

/* Info Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.52);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.info-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  z-index: 25;
  background: rgba(14, 19, 30, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.info-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-header h2 {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.drawer-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.drawer-close:hover {
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formula-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.formula-row.pos strong { color: var(--pos-color); }
.formula-row.neg strong { color: var(--neg-color); }
.formula-row.pulse strong { color: var(--pulse-color); }
.formula-row.total {
  font-size: 15px;
  color: var(--text-main);
}

.formula-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.section-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--text-soft);
}

.section-title.pos { color: var(--pos-color); }
.section-title.neg { color: var(--neg-color); }
.section-title.pulse { color: var(--pulse-color); }

.sparkline-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 12px 10px;
}

.sparkline-svg {
  width: 100%;
  height: 78px;
  display: block;
  overflow: visible;
}

.sparkline-labels {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.refresh-btn.primary {
  border-color: rgba(246, 201, 120, 0.38);
  background: rgba(246, 201, 120, 0.12);
  color: #fde3ad;
}

.refresh-btn.primary:hover {
  background: rgba(246, 201, 120, 0.22);
  color: #fff6df;
}

.factor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.factor-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.factor-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}

.factor-name {
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-faint);
}

.badge.live {
  border-color: rgba(126, 226, 184, 0.35);
  color: var(--pos-color);
}

.factor-val {
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
}

.bar-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

.bar-fill.pos { background: var(--pos-color); }
.bar-fill.neg { background: var(--neg-color); }

.factor-detail {
  font-size: 11px;
  color: var(--text-faint);
}

.pulse-summary {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px 14px;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-info {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.5;
}

.refresh-btn {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
