/* HD tool pages — transits, returns, compare (dark theme overrides) */
/* mv-app-page использует светлую оболочку multiverse-shell + mv-tool-v2 */

html:has(body.hd-tool-page:not(.mv-app-page)) {
  background: #020915 !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) {
  background: linear-gradient(165deg, #020915 0%, #050f28 50%, #0a1840 100%) !important;
  min-height: 100vh;
  color: #e8f0ff !important;
}

body.v3-page.hd-tool-page *,
body.v3-page.hd-tool-page *::before,
body.v3-page.hd-tool-page *::after {
  box-sizing: border-box;
}

body.v3-page.hd-tool-page:not(.mv-app-page) h1,
body.v3-page.hd-tool-page:not(.mv-app-page) h2,
body.v3-page.hd-tool-page:not(.mv-app-page) h3,
body.v3-page.hd-tool-page:not(.mv-app-page) h4,
body.v3-page.hd-tool-page:not(.mv-app-page) p,
body.v3-page.hd-tool-page:not(.mv-app-page) td,
body.v3-page.hd-tool-page:not(.mv-app-page) th,
body.v3-page.hd-tool-page:not(.mv-app-page) li,
body.v3-page.hd-tool-page:not(.mv-app-page) label,
body.v3-page.hd-tool-page:not(.mv-app-page) .muted {
  color: inherit;
}

body.v3-page.hd-tool-page:not(.mv-app-page) a:not(.hd-back):not(.hdt-back):not(.hdr-back):not(.hdc-back):not(.primary-button) {
  color: #93c5fd !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-header,
body.v3-page.hd-tool-page:not(.mv-app-page) .site-header.compact,
body.v3-page.hd-tool-page:not(.mv-app-page) .site-header.glass-header {
  background: rgba(6, 14, 36, 0.92) !important;
  border-bottom: 1px solid rgba(147, 197, 253, 0.18) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(16px);
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-header .brand,
body.v3-page.hd-tool-page:not(.mv-app-page) .site-header .brand span {
  color: #e0f2fe !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-header .top-nav a {
  color: rgba(200, 215, 255, 0.78) !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-header .top-nav a:hover,
body.v3-page.hd-tool-page:not(.mv-app-page) .site-header .top-nav a.active {
  background: rgba(96, 165, 250, 0.12) !important;
  color: #e0f2fe !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .global-back-button {
  background: rgba(8, 18, 45, 0.94) !important;
  border-color: rgba(147, 197, 253, 0.22) !important;
  color: #93c5fd !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-footer {
  background: #060d1f !important;
  border-top: 1px solid rgba(147, 197, 253, 0.12) !important;
  color: rgba(200, 215, 255, 0.72) !important;
}

body.v3-page.hd-tool-page:not(.mv-app-page) .site-footer a {
  color: #93c5fd !important;
}

body.v3-page.hd-tool-page .support-panel[hidden] {
  display: none !important;
}

body.v3-page.hd-tool-page .support-widget.is-open {
  z-index: 10050;
}

/* Shared shell */
.hd-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

/* Override global .bodygraph { max-width: 480px } from ui-6.css */
body.v3-page.hd-tool-page svg.bodygraph,
body.v3-page.hd-tool-page .bodygraph {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  display: block;
  margin-inline: auto;
}

.hd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #93c5fd !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  margin: 16px 0;
}

.hd-hero {
  text-align: center;
  padding: 36px 16px 28px;
}

.hd-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 18px;
}

.hd-h1 {
  font-size: clamp(30px, 5.5vw, 54px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em;
  margin: 0 0 12px !important;
  line-height: 1.05 !important;
  color: #f0f9ff !important;
}

.hd-meta {
  font-size: 15px;
  color: rgba(224, 242, 254, 0.82);
  margin-top: 8px;
  line-height: 1.55;
}

.hd-meta strong {
  color: #93c5fd;
}

.hd-wrap .hd-muted,
body.hd-tool-page:not(.mv-app-page) .hd-muted {
  font-size: 14px;
  color: rgba(224, 242, 254, 0.78);
  line-height: 1.6;
}

/* Тёмные панели — только legacy-оболочка .hd-wrap, не mv-app-page */
.hd-wrap .hd-panel,
body.hd-tool-page:not(.mv-app-page) .hd-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.hd-wrap .hd-panel-title,
body.hd-tool-page:not(.mv-app-page) .hd-panel-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #f0f9ff !important;
  margin: 0 0 14px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-bg-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.hd-bg-panel--large {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 14px 18px 20px;
}

.hd-bg-panel--large .bodygraph {
  width: 100% !important;
  max-width: none !important;
  min-width: min(100%, 320px);
  margin-inline: auto;
}

.hd-bg-panel svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.hd-chart-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 4px;
  overflow: visible;
}

.hd-chart-stage .bodygraph {
  width: min(100%, 920px) !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 760 / 820;
  margin-inline: auto;
}

.hd-chart-stage--compact .bodygraph {
  width: min(100%, 680px) !important;
}

.hd-bg-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(224, 242, 254, 0.78);
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hd-bg-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(224, 242, 254, 0.78);
}

.hd-bg-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hd-bg-legend i {
  display: inline-block;
  width: 22px;
  height: 6px;
  border-radius: 3px;
}

.hd-bg-legend i.natal {
  background: #ff6b5f;
}

.hd-bg-legend i.transit {
  background: #26304a;
}

.hd-bg-legend i.activated {
  background: #7457ff;
}

.hd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hd-chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hd-chip-empty {
  font-size: 14px;
  color: rgba(224, 242, 254, 0.72);
  line-height: 1.55;
}

.hd-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}

.hd-ai-btn:hover {
  opacity: 0.88;
}

.hd-ai-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hd-ai-out {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  background: rgba(96, 165, 250, 0.1);
  font-size: 15px;
  line-height: 1.7;
  color: #e8f0ff;
}

.hd-ai-out.show {
  display: block;
}

.hd-ai-out p {
  margin: 0 0 10px;
  color: #e8f0ff !important;
}

.hd-ai-out p:last-child {
  margin: 0;
}

.mv-ai-saved-meta,
.hdt-ai-last-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(191, 219, 254, 0.78);
}

.hdt-ai-confirm {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.hdt-ai-confirm-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #fde68a;
}

.hdt-ai-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hdt-ai-confirm-yes {
  margin: 0;
}

.hdt-ai-confirm-no {
  border: 0;
  background: transparent;
  color: rgba(224, 242, 254, 0.72);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hdt-ai-confirm-no:hover {
  color: #e8f0ff;
}

.hd-empty {
  text-align: center;
  padding: 48px 20px;
  color: rgba(224, 242, 254, 0.72);
}

/* ── Transits ── */
.hdt-moment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hdt-moment-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(224, 242, 254, 0.78);
}
.hdt-moment-form input[type="date"],
.hdt-moment-form input[type="time"] {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 28, 0.55);
  color: #e8f0ff;
  font-size: 0.84rem;
}
.hdt-moment-note {
  flex: 1 1 100%;
  font-size: 0.76rem;
  color: rgba(224, 242, 254, 0.65);
  line-height: 1.45;
}
.hdt-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hdt-layout .hd-bg-stage {
  width: 100%;
}

.hdt-layout .hdt-details {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .hdt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 28px;
    align-items: start;
  }

  .hdt-layout .hd-bg-stage {
    position: sticky;
    top: 88px;
  }

  .hdt-layout .hdt-details {
    max-width: none;
    margin-inline: 0;
  }
}

.hdt-chip {
  border: 1px solid rgba(116, 87, 255, 0.45);
  background: rgba(116, 87, 255, 0.14);
  color: #ddd6fe;
}

.hdt-planet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hdt-planet-row {
  display: grid;
  grid-template-columns: 32px minmax(72px, 1fr) 72px minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.hdt-planet-row.is-natal {
  border-color: rgba(255, 107, 95, 0.45);
  background: rgba(255, 107, 95, 0.1);
}

.hdt-planet-row.is-activating {
  border-color: rgba(116, 87, 255, 0.5);
  background: rgba(116, 87, 255, 0.12);
}

.hdt-p-icon {
  font-size: 20px;
  text-align: center;
}

.hdt-p-name {
  font-size: 14px;
  font-weight: 700;
  color: #f0f9ff;
}

.hdt-p-gate {
  font-size: 17px;
  font-weight: 900;
  color: #93c5fd;
}

.hdt-p-center {
  font-size: 13px;
  color: rgba(224, 242, 254, 0.78);
}

.hdt-p-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.hdt-p-badge.natal {
  background: rgba(255, 107, 95, 0.18);
  color: #fecaca;
  border: 1px solid rgba(255, 107, 95, 0.35);
}

.hdt-p-badge.activating {
  background: rgba(116, 87, 255, 0.18);
  color: #ddd6fe;
  border: 1px solid rgba(116, 87, 255, 0.35);
}

/* ── Transits v2 (mvp layout) ── */
.hdt-workspace .mvp-hero {
  margin-bottom: 4px;
}

.hdt-hero .mvp-chart-col {
  padding: 18px 20px 14px;
}

.hdt-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(147, 197, 253, 0.14);
  font-size: 12px;
  color: rgba(224, 242, 254, 0.78);
}

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

.hdt-legend i {
  display: inline-block;
  width: 20px;
  height: 5px;
  border-radius: 3px;
}

.hdt-legend i.natal {
  background: #ff6b5f;
}

.hdt-legend i.transit {
  background: #26304a;
}

.hdt-legend i.activated {
  background: #7457ff;
}

.hdt-summary-card {
  gap: 10px;
}

.hdt-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 4px;
}

.hdt-stat {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.hdt-stat b {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: #f0f9ff;
  margin-bottom: 4px;
}

.hdt-stat span {
  display: block;
  font-size: 11px;
  color: rgba(224, 242, 254, 0.68);
  line-height: 1.3;
}

.hdt-stat.is-hot {
  border-color: rgba(116, 87, 255, 0.45);
  background: rgba(116, 87, 255, 0.12);
}

.hdt-stat.is-hot b {
  color: #ddd6fe;
}

.hdt-calm-note,
.hdt-hint-note,
.hdt-panel-lead {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(224, 242, 254, 0.76);
  margin: 0;
}

.hdt-calm-note {
  margin-top: 6px;
}

.hdt-hint-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(147, 197, 253, 0.12);
  font-size: 12px;
  color: rgba(191, 219, 254, 0.62);
}

.hdt-panel-lead {
  margin-bottom: 14px;
}

.hdt-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.hdt-channel-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(116, 87, 255, 0.32);
  background: linear-gradient(145deg, rgba(116, 87, 255, 0.14), rgba(96, 165, 250, 0.08));
}

.hdt-channel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hdt-channel-gates {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #f0f9ff;
}

.hdt-channel-center {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #bfdbfe;
  white-space: nowrap;
}

.hdt-channel-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(224, 242, 254, 0.82);
}

.hdt-empty-state {
  text-align: center;
  padding: 28px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(147, 197, 253, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.hdt-empty-state span {
  display: block;
  font-size: 34px;
  margin-bottom: 10px;
  opacity: 0.75;
}

.hdt-empty-state h3 {
  margin: 0 0 8px !important;
  font-size: 18px !important;
  color: #f0f9ff !important;
}

.hdt-empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(224, 242, 254, 0.72) !important;
}

.hdt-planet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hdt-filter-btn {
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(224, 242, 254, 0.72);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.hdt-filter-btn:hover {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.38);
}

.hdt-filter-btn.active {
  color: #f0f9ff;
  border-color: rgba(116, 87, 255, 0.5);
  background: rgba(116, 87, 255, 0.16);
}

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

.hdt-planet-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, transform 0.15s;
}

.hdt-planet-card:hover {
  transform: translateY(-1px);
}

.hdt-planet-card.is-natal {
  border-color: rgba(255, 107, 95, 0.4);
  background: rgba(255, 107, 95, 0.08);
}

.hdt-planet-card.is-activating {
  border-color: rgba(116, 87, 255, 0.45);
  background: rgba(116, 87, 255, 0.1);
}

.hdt-planet-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.hdt-planet-icon {
  font-size: 22px;
  line-height: 1;
}

.hdt-planet-name {
  font-size: 14px;
  font-weight: 800;
  color: #f0f9ff;
}

.hdt-planet-sign {
  font-size: 12px;
  color: rgba(224, 242, 254, 0.65);
  margin-top: 2px;
}

.hdt-planet-gate {
  font-size: 20px;
  font-weight: 900;
  color: #93c5fd;
  line-height: 1;
}

.hdt-planet-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(224, 242, 254, 0.72);
}

body.hd-tool-page .hdt-ai-confirm-yes {
  width: auto;
  flex: 1 1 220px;
}

@media (max-width: 720px) {
  .hdt-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hdt-stat b {
    font-size: 20px;
  }

  .hdt-channel-grid,
  .hdt-planet-grid {
    grid-template-columns: 1fr;
  }

  .hdt-hero .mvp-data-col {
    max-height: none;
  }
}

/* ── Returns ── */
.hdr-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hdr-layout .hd-bg-stage {
  width: 100%;
}

.hdr-layout .hdr-returns {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

.hdr-bg-panel {
  position: static;
}

@media (min-width: 1100px) {
  .hdr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
    gap: 28px;
    align-items: start;
  }

  .hdr-layout .hd-bg-stage {
    position: sticky;
    top: 88px;
  }

  .hdr-layout .hdr-returns {
    max-width: none;
    margin-inline: 0;
  }
}

.hdr-returns {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hdr-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hdr-card.is-past {
  opacity: 0.82;
}

.hdr-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 18px 0 0 18px;
}

.hdr-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.hdr-card-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.hdr-card-info {
  flex: 1;
  min-width: 0;
}

.hdr-card-title {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: #f0f9ff !important;
  margin: 0 0 2px !important;
}

.hdr-card-age {
  font-size: 13px;
  color: rgba(224, 242, 254, 0.72);
  margin-bottom: 8px;
}

.hdr-card-when {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #f0f9ff;
  margin-bottom: 4px;
}

.hdr-card-date {
  font-size: 13px;
  color: rgba(224, 242, 254, 0.68);
}

.hdr-card-theme {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(240, 249, 255, 0.9);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(147, 197, 253, 0.16);
}

.hdr-sections {
  margin-top: 14px;
  border-top: 1px solid rgba(147, 197, 253, 0.12);
}

.hdr-section {
  padding: 12px 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.08);
}
.hdr-section:last-child { border-bottom: none; }

.hdr-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(147, 197, 253, 0.8);
  margin-bottom: 6px;
}

.hdr-section-body {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(240, 249, 255, 0.85);
}

.hdr-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 12px;
}

.hdr-ai-btn:hover {
  opacity: 0.88;
}

.hdr-ai-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Compare ── */
.hdc-selector {
  margin-bottom: 20px;
}

.hdc-sel-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #f0f9ff !important;
  margin: 0 0 14px !important;
}

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

.hdc-member-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0ff !important;
  text-decoration: none !important;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.hdc-member-link:hover {
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(96, 165, 250, 0.1);
}

.hdc-member-link.is-active {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.16);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.hdc-member-link.is-self {
  opacity: 0.45;
  pointer-events: none;
}

.hdc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #f0f9ff;
  font-weight: 700;
}

.hdc-m-name {
  font-weight: 700;
  color: #f0f9ff;
  font-size: 14px;
}

.hdc-m-sub {
  font-size: 12px;
  color: rgba(224, 242, 254, 0.72);
  margin-top: 2px;
}

.hdc-graphs {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 28px;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hdc-graphs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }
}

.hdc-graph-wrap {
  text-align: center;
  width: 100%;
}

.hdc-graph-wrap .bodygraph {
  width: 100% !important;
  max-width: none !important;
  margin-inline: auto;
}

.hdc-graph-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #93c5fd !important;
  margin: 0 0 12px !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hdc-graph-type {
  font-size: 13px;
  color: rgba(224, 242, 254, 0.78);
  margin-top: 8px;
}

.hdc-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(224, 242, 254, 0.78);
  margin-bottom: 10px;
}

.hdc-chip.em {
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.hdc-chip.comp {
  border: 1px solid rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

.hdc-chip.dom {
  border: 1px solid rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
}

.hdc-chip.teach {
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.hdc-chip.compromise {
  border: 1px solid rgba(167, 139, 250, 0.5);
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}

.hdc-chip.compromise {
  border: 1px solid rgba(244, 114, 182, 0.5);
  background: rgba(244, 114, 182, 0.12);
  color: #fbcfe8;
}

.hdc-chip.teach {
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

.hdc-chip.dom {
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.hdc-chip-sub {
  opacity: 0.65;
  font-weight: 400;
}

.hdc-formula {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 20px;
  border-radius: 22px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.14), rgba(116, 87, 255, 0.1));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.hdc-formula-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 14px;
}

.hdc-formula-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
}

.hdc-formula-count {
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 900;
  line-height: 1;
  color: #f0f9ff;
  letter-spacing: -0.04em;
}

.hdc-formula-theme {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  color: #c4b5fd;
}

.hdc-formula-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(224, 242, 254, 0.78);
}

.hdc-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.hdc-matrix-col .hdc-group + .hdc-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(147, 197, 253, 0.12);
}

@media (min-width: 900px) {
  .hdc-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.hdc-centers-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hdc-centers {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}

.hdc-centers th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: rgba(224, 242, 254, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(147, 197, 253, 0.2);
  white-space: nowrap;
}

.hdc-centers td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.1);
  color: #e8f0ff !important;
}

.hdc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.hdc-dot.def {
  background: #60a5fa;
}

.hdc-dot.open {
  background: rgba(147, 197, 253, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.35);
}

.hdc-dynamic {
  font-size: 13px;
}

.hdc-pick-hint {
  text-align: center;
  padding: 56px 20px;
  color: rgba(224, 242, 254, 0.78);
}

.hdc-pick-hint-icon {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 760px) {
  .hd-chart-stage {
    padding: 4px 0 0;
  }

  .hd-chart-stage .bodygraph {
    width: min(108%, 560px) !important;
  }

  .hd-chart-stage--compact .bodygraph {
    width: min(100%, 520px) !important;
  }
}

@media (max-width: 720px) {
  .hd-bg-panel--large {
    padding: 10px 8px 16px;
  }

  .hd-bg-panel--large .bodygraph {
    width: 100% !important;
  }

  .hdt-planet-row {
    grid-template-columns: 32px 1fr auto;
    grid-template-rows: auto auto;
  }

  .hdt-p-gate {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .hdt-p-center {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .hdt-p-badge {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }

  .hd-wrap {
    padding: 0 14px 80px;
  }
}

/* AI hints balance */
.hd-hints-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  max-width: 520px;
}

.hd-hints-bar b {
  color: #e0f2fe;
}

.hd-hints-buy {
  color: #93c5fd !important;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(147, 197, 253, 0.4);
}

/* ── Multiverse tool visuals ── */
.hdt-details--full {
  max-width: 960px;
  margin-inline: auto;
}

.mv-chart-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 12px;
}

.mv-vis-empty {
  text-align: center;
  color: rgba(224, 242, 254, 0.6);
  padding: 40px 20px;
}

.mv-rich-html table.mv-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.mv-rich-html table.mv-data-table th,
.mv-rich-html table.mv-data-table td {
  border: 1px solid rgba(147, 197, 253, 0.2);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.mv-rich-html table.mv-data-table th {
  background: rgba(116, 87, 255, 0.12);
  color: #e0f2fe;
}

.mv-rich-html ul.mv-rune-ref {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}

.mv-chakra-legend {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(147, 197, 253, 0.14);
}

.mv-chakra-leg-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.mv-chakra-leg-item i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.mv-bazi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px;
}

.mv-bazi-pillar {
  text-align: center;
  padding: 16px 8px;
  border-radius: 14px;
  background: rgba(116, 87, 255, 0.1);
  border: 1px solid rgba(147, 197, 253, 0.2);
}

.mv-bazi-label {
  font-size: 11px;
  color: rgba(224, 242, 254, 0.65);
  margin-bottom: 8px;
}

.mv-bazi-glyph {
  font-size: 28px;
  font-weight: 700;
  color: #f0f9ff;
}

.mv-soc-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(6, 14, 36, 0.9), rgba(20, 30, 70, 0.85));
  border: 2px solid var(--mv-soc-color, #7457ff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.mv-soc-type {
  font-size: 42px;
  font-weight: 900;
  color: var(--mv-soc-color, #7457ff);
  letter-spacing: 0.04em;
}

.mv-soc-mbti {
  font-size: 18px;
  color: #e0f2fe;
  margin: 6px 0 12px;
}

.mv-soc-meta,
.mv-soc-dual,
.mv-soc-sun {
  font-size: 14px;
  color: rgba(224, 242, 254, 0.78);
  margin-top: 6px;
}

.mv-runes-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px;
}

.mv-runes-spread {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.mv-rune-stone {
  width: 100px;
  padding: 16px 10px;
  border-radius: 16px;
  text-align: center;
  background: rgba(30, 41, 80, 0.8);
  border: 2px solid rgba(147, 197, 253, 0.25);
}

.mv-rune-stone--hero {
  width: 120px;
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.mv-rune-stone--rev {
  transform: rotate(180deg);
}

.mv-rune-pos {
  font-size: 10px;
  color: rgba(224, 242, 254, 0.55);
  margin-bottom: 6px;
}

.mv-rune-glyph {
  font-size: 36px;
  line-height: 1;
}

.mv-rune-name {
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  color: #e0f2fe;
}

.mv-matrix-oct,
.mv-acg-map,
.mv-moon-wheel,
.mv-moon-wheel--lg,
.mv-palm-hand,
.mv-syn-gauge {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  display: block;
}

.mv-affirm-card {
  padding: 28px 22px 22px 26px;
  border-radius: 20px;
  background: linear-gradient(145deg, #f7f4ff 0%, #ffffff 55%, #f4f0ff 100%);
  border: 1px solid #d4c8f5;
  border-left: 6px solid var(--mv-affirm-accent, #059669);
  text-align: left;
  color: #140f2e;
}

.mv-affirm-quote {
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 650;
  color: #140f2e !important;
  -webkit-text-fill-color: #140f2e !important;
}

.mv-weather-dash {
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(147, 197, 253, 0.16);
}

.mv-weather-month {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #e0f2fe;
}

.mv-weather-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.1);
  font-size: 14px;
}

.mv-weather-label {
  color: #93c5fd;
  font-weight: 700;
  flex-shrink: 0;
}

.mv-year-cal {
  text-align: center;
  padding: 16px;
}

.mv-year-num {
  font-size: 56px;
  font-weight: 900;
  color: #7457ff;
  line-height: 1;
}

.mv-year-label {
  font-size: 16px;
  color: #e0f2fe;
  margin: 8px 0 16px;
}

.mv-year-months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mv-year-month {
  padding: 10px 6px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.mv-year-month b {
  display: block;
  margin-bottom: 4px;
}

.mv-year-month--strong {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.1);
}

.mv-year-month--caution {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

.mv-syn-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: rgba(224, 242, 254, 0.7);
}

.mv-syn-placeholder span {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.mv-vis-caption {
  text-align: center;
  font-size: 13px;
  color: rgba(224, 242, 254, 0.72);
  margin-top: 12px;
}

.mv-detail-panel {
  border-color: rgba(116, 87, 255, 0.22);
}

@media (max-width: 640px) {
  .mv-bazi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mv-year-months {
    grid-template-columns: repeat(3, 1fr);
  }
}