/* 观星台 · 占星页 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600&display=swap");

.page-astrology {
  --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --astro-accent: #c9b896;
  --astro-glow: rgba(126, 184, 255, 0.35);
  --astro-panel: rgba(13, 18, 40, 0.88);
  position: relative;
  min-height: 100vh;
}

.astro-star-canvas,
body.page-astrology #starCanvas,
body[data-page="astrology"] #starCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.astro-nebula {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(88, 60, 140, 0.25), transparent 55%),
    radial-gradient(ellipse 50% 35% at 80% 70%, rgba(40, 80, 140, 0.2), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(201, 184, 150, 0.06), transparent 45%);
}

.page-astrology .site-header,
.page-astrology .astro-main,
.page-astrology .site-footer {
  position: relative;
  z-index: 2;
}

.astro-main {
  padding-bottom: 3rem;
}

.astro-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.astro-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: 0.08em;
  color: var(--astro-accent);
  margin-bottom: 0.75rem;
}

.astro-hero-desc {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.7;
}

.astro-section {
  margin-top: 2rem;
}

.astro-section-title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.astro-section-desc {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* 测测式工作区 */
.chart-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
  width: 100%;
  max-width: min(1360px, 96vw);
  margin: 0 auto;
}

.chart-profile-card {
  background: var(--astro-panel);
  border: 1px solid rgba(201, 184, 150, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  min-width: 0;
}

.chart-profile-title {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.chart-profile-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.chart-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.chart-form-wide {
  grid-column: 1 / -1;
}

.chart-field-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.chart-field-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.chart-form input,
.chart-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 184, 150, 0.25);
  background: rgba(7, 11, 24, 0.6);
  color: #e8ecf4;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
}

.chart-form textarea {
  resize: vertical;
  min-height: 72px;
}

.chart-paste-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.chart-paste-status {
  font-size: 0.82rem;
  color: var(--astro-accent);
}

.chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.astro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 184, 150, 0.45);
  background: linear-gradient(180deg, rgba(201, 184, 150, 0.25), rgba(201, 184, 150, 0.08));
  color: var(--astro-accent);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}

.astro-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.astro-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.astro-btn-ghost {
  background: transparent;
  border-color: rgba(126, 184, 255, 0.35);
  color: #b8c8e8;
}

.chart-engine-options {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(126, 184, 255, 0.1);
}

.chart-engine-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.chart-engine-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: #8b92a8;
}

.chart-engine-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chart-engine-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.38rem 0.72rem;
  min-height: 2rem;
  border-radius: 6px;
  border: 1px solid rgba(126, 184, 255, 0.28);
  background: rgba(7, 11, 24, 0.82);
  color: #c8d4ec;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chart-engine-btn:hover {
  border-color: rgba(126, 184, 255, 0.45);
  color: #e8f0ff;
}

.chart-engine-btn.active {
  background: rgba(126, 184, 255, 0.2);
  border-color: rgba(126, 184, 255, 0.5);
  color: #eef4ff;
}

.chart-controls {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(126, 184, 255, 0.12);
}

.chart-controls-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b92a8;
}

.chart-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.chart-mode-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.38rem 0.72rem;
  min-height: 2rem;
  border-radius: 6px;
  border: 1px solid rgba(126, 184, 255, 0.28);
  background: rgba(7, 11, 24, 0.82);
  color: #c8d4ec;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chart-mode-btn:hover {
  border-color: rgba(201, 184, 150, 0.45);
  color: #eef2fa;
}

.chart-mode-btn.active {
  border-color: rgba(201, 184, 150, 0.55);
  background: rgba(201, 184, 150, 0.14);
  color: #f0e6d4;
}

.chart-mode-panel {
  margin-bottom: 0.65rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  min-width: 0;
}

.chart-mode-panel .chart-mode-hint,
.chart-mode-panel .chart-field-row,
.chart-mode-panel .chart-controls-actions,
.chart-mode-panel .chart-form-wide,
.chart-mode-panel > .chart-field {
  grid-column: 1 / -1;
  min-width: 0;
}

.chart-mode-panel .chart-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.chart-mode-panel .chart-field-row > .chart-field {
  min-width: 0;
}

.chart-mode-panel input,
.chart-mode-panel textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 184, 150, 0.25);
  background: rgba(7, 11, 24, 0.6);
  color: #e8ecf4;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
}

.chart-mode-panel input::placeholder,
.chart-mode-panel textarea::placeholder {
  color: #6a7288;
}

.chart-mode-panel[hidden] {
  display: none !important;
}

.chart-mode-hint {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #8b96aa;
}

.chart-controls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.chart-controls-extras {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(126, 184, 255, 0.14);
}

.chart-extra-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #9aa4bc;
  cursor: pointer;
}

.chart-extra-option input {
  accent-color: #c9b896;
}

.chart-controls-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chart-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chart-main {
  background: var(--astro-panel);
  border: 1px solid rgba(126, 184, 255, 0.18);
  border-radius: 12px;
  padding: 0.75rem 0.85rem 1rem;
  min-height: 520px;
  min-width: 0;
  overflow-x: hidden;
}

.chart-pane-wheel,
.chart-pane-data,
.chart-visual {
  min-width: 0;
  overflow-x: hidden;
}

.chart-view-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.15);
  padding-bottom: 0.5rem;
}

.chart-tab {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

.chart-tab.active {
  background: rgba(126, 184, 255, 0.15);
  color: var(--astro-accent);
}

.chart-pane[hidden] {
  display: none !important;
}

.chart-visual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.cece-chart-host {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: block;
}

.cece-chart-host.chart-is-default {
  max-width: 100%;
  margin: 0;
  display: block;
  aspect-ratio: auto;
}

.cece-chart-host .cece-chart-stage {
  width: 100%;
  line-height: normal;
}

.cece-chart-host.chart-is-default .cece-chart-stage {
  height: auto;
  display: block;
}

.cece-chart-host .cece-chart-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.cece-chart-host.chart-is-default .chart-default-wheel-svg {
  width: 100%;
  height: 100%;
}

.cece-chart-host:not(.chart-is-default) .chart-full-poster-svg {
  min-height: 0;
}

.cece-chart-host.cece-chart-loading {
  aspect-ratio: 1;
  max-width: min(100%, 640px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cece-chart-stage-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: 50%;
  border: 1px dashed rgba(126, 184, 255, 0.22);
  background: rgba(7, 11, 24, 0.35);
}

.cece-chart-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.cece-chart-loading-spin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(126, 184, 255, 0.18);
  border-top-color: var(--astro-accent);
  animation: cece-chart-spin 0.85s linear infinite;
}

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

.natal-chart-caption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: center;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-legend-item i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

/* 行星详情浮层 */
.chart-planet-panel {
  position: relative;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: rgba(7, 11, 24, 0.92);
  border: 1px solid rgba(201, 184, 150, 0.25);
}

.chart-planet-panel[hidden] {
  display: none;
}

.chart-panel-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.chart-planet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.chart-planet-chips[hidden] {
  display: none;
}

.chart-chip {
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: #eef2fa;
  border: 1px solid rgba(126, 184, 255, 0.38);
  background: rgba(14, 20, 42, 0.94);
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chart-chip b {
  color: #9fd0ff;
  font-weight: 600;
}

.chart-chip:hover {
  color: #fff;
  border-color: rgba(168, 200, 255, 0.55);
  background: rgba(22, 32, 60, 0.96);
}

/* 参数表 · 防拥挤 */
.chart-positions-wrap,
.chart-aspects-wrap {
  overflow-x: hidden;
  margin-bottom: 1.25rem;
}

.chart-positions-table,
.chart-aspects-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: fixed;
}

.chart-positions-table th,
.chart-aspects-table th,
.chart-positions-table td,
.chart-aspects-table td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(126, 184, 255, 0.12);
}

.chart-positions-table th,
.chart-aspects-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.chart-positions-table tbody tr:hover,
.chart-aspects-table tbody tr:hover {
  background: rgba(126, 184, 255, 0.06);
}

.chart-tables-title {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.5rem;
  color: var(--astro-accent);
}

.chart-summary {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(7, 11, 24, 0.5);
  border-radius: 8px;
}

.chart-empty-hint {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* 解读面板 */
.chart-interpret-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(7, 11, 24, 0.75);
  border: 1px solid rgba(201, 184, 150, 0.2);
}

.chart-interpret-panel[hidden] {
  display: none;
}

.chart-interpret-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.chart-interpret-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.chart-interpret-status.is-loading,
.chart-interpret-status.is-streaming {
  color: var(--astro-accent);
}

.chart-interpret-body p {
  line-height: 1.75;
  margin: 0 0 0.85rem;
}

.chart-interpret-error {
  color: #e87878;
}

.chart-interpret-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--astro-accent);
  animation: astro-pulse 1s ease-in-out infinite;
}

@keyframes astro-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* 资料网格 */
.astro-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.astro-catalog-card {
  display: block;
  padding: 1rem;
  border-radius: 10px;
  background: var(--astro-panel);
  border: 1px solid rgba(126, 184, 255, 0.15);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}

.astro-catalog-card:hover {
  border-color: var(--astro-accent);
}

.astro-catalog-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.astro-catalog-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 占星问答 */
.astro-chat-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  height: min(620px, calc(100vh - 9rem));
  min-height: 480px;
  max-height: 620px;
  background: var(--astro-panel);
  border: 1px solid rgba(126, 184, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(4, 8, 20, 0.35);
}

.astro-chat-layout.is-resizing {
  user-select: none;
  -webkit-user-select: none;
}

.astro-chat-resize-handle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  z-index: 12;
  cursor: ns-resize;
  touch-action: none;
  opacity: 0.72;
  background:
    linear-gradient(135deg, transparent 52%, rgba(168, 180, 204, 0.85) 52%, rgba(168, 180, 204, 0.85) 58%, transparent 58%),
    linear-gradient(135deg, transparent 66%, rgba(168, 180, 204, 0.65) 66%, rgba(168, 180, 204, 0.65) 72%, transparent 72%);
  transition: opacity 0.15s ease;
}

.astro-chat-layout:hover .astro-chat-resize-handle,
.astro-chat-layout.is-resizing .astro-chat-resize-handle,
.astro-chat-resize-handle:focus-visible {
  opacity: 1;
}

.astro-chat-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.85rem 0.75rem 0.85rem 0.85rem;
  border-right: 1px solid rgba(126, 184, 255, 0.12);
  background: rgba(5, 9, 20, 0.55);
}

.astro-sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.1);
  margin-bottom: 0.35rem;
}

.astro-sidebar-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a88a8;
}

.astro-new-chat-btn {
  width: 100%;
  justify-content: center;
}

.astro-history-empty {
  margin: 0.75rem 0 0;
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #6f7a94;
}

.astro-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-top: 0.35rem;
}

.astro-history-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}

.astro-history-row.active .astro-history-item,
.astro-history-row.is-pinned .astro-history-item {
  color: #e8ecf4;
}

.astro-history-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-sizing: border-box;
  margin: 0;
  text-align: left;
  padding: 0.55rem 0.45rem 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9aa4bc;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.astro-history-item-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.astro-history-pin-mark {
  flex-shrink: 0;
  font-size: 0.72rem;
  opacity: 0.72;
}

.astro-history-item:hover,
.astro-history-item.active {
  background: rgba(126, 184, 255, 0.12);
  color: #e8ecf4;
}

.astro-history-item.active {
  font-weight: 500;
}

.astro-history-item:focus-visible {
  outline: 2px solid rgba(126, 184, 255, 0.45);
  outline-offset: 1px;
}

.astro-history-actions {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.astro-history-menu-btn {
  width: 1.85rem;
  min-width: 1.85rem;
  height: 100%;
  min-height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8b96aa;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.astro-history-row:hover .astro-history-menu-btn,
.astro-history-row:focus-within .astro-history-menu-btn,
.astro-history-row.active .astro-history-menu-btn,
.astro-history-menu-btn.is-open {
  opacity: 0.82;
}

.astro-history-menu-btn:hover,
.astro-history-menu-btn.is-open {
  opacity: 1;
  color: #e8ecf4;
  background: rgba(126, 184, 255, 0.1);
}

.astro-history-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 168px;
  padding: 0.35rem;
  border: 1px solid rgba(126, 184, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 24, 44, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.astro-history-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.3;
  color: #c8d4ec;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.astro-history-menu-item:hover {
  background: rgba(126, 184, 255, 0.12);
  color: #eef4ff;
}

.astro-history-menu-item.is-danger:hover {
  background: rgba(232, 96, 96, 0.14);
  color: #ffc8c8;
}

.astro-history-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  flex-shrink: 0;
  color: #8b96aa;
}

.astro-history-menu-item:hover .astro-history-menu-icon {
  color: inherit;
}

.astro-history-row.is-renaming {
  display: block;
}

.astro-history-rename-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.35rem 0.2rem;
}

.astro-history-rename-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(126, 184, 255, 0.28);
  border-radius: 6px;
  background: rgba(7, 11, 24, 0.82);
  color: #e8ecf4;
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.astro-history-rename-btns {
  display: flex;
  gap: 0.45rem;
}

.astro-history-rename-save,
.astro-history-rename-cancel {
  flex: 1;
  padding: 0.38rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(126, 184, 255, 0.22);
  background: rgba(126, 184, 255, 0.12);
  color: #e8ecf4;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  cursor: pointer;
}

.astro-history-rename-cancel {
  background: transparent;
  color: #9aa4bc;
}

.astro-chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 16, 34, 0.35) 0%, rgba(7, 11, 24, 0.15) 100%);
}

.astro-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.85rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.1);
}

.astro-chat-header-avatar {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(201, 184, 150, 0.35);
  background: rgba(126, 184, 255, 0.08);
  color: #e8dcc8;
  font-family: var(--font-display, var(--font-ui));
  font-size: 0.95rem;
}

.astro-chat-header-text {
  min-width: 0;
}

.astro-chat-header-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: #eef2fa;
  line-height: 1.3;
}

.astro-chat-header-sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #8b96aa;
}

.astro-chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  scrollbar-gutter: stable;
}

.astro-chat-scroll::-webkit-scrollbar {
  width: 8px;
}

.astro-chat-scroll::-webkit-scrollbar-track {
  background: rgba(126, 184, 255, 0.06);
  border-radius: 4px;
}

.astro-chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(126, 184, 255, 0.28);
  border-radius: 4px;
}

.astro-chat-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 184, 255, 0.42);
}

.astro-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: min(100%, 360px);
  margin: auto;
  padding: 1.25rem 1.1rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.astro-chat-welcome[hidden] {
  display: none !important;
}

.astro-chat-welcome-card {
  width: 100%;
  max-width: 520px;
}

.astro-chat-welcome-lead {
  margin: 0 0 1.1rem;
  line-height: 1.65;
  color: #9aa4bc;
  font-size: 0.88rem;
}

.astro-suggest-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 1rem;
  padding: 0.62em 1.25em;
  border: 1px solid rgba(201, 184, 150, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(201, 184, 150, 0.18) 0%, rgba(126, 184, 255, 0.12) 100%);
  color: #f0e6d4;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(201, 184, 150, 0.08);
}

.astro-suggest-primary:hover {
  border-color: rgba(201, 184, 150, 0.65);
  background: linear-gradient(135deg, rgba(201, 184, 150, 0.28) 0%, rgba(126, 184, 255, 0.18) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(201, 184, 150, 0.14);
}

.astro-suggest-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f7a94;
}

.astro-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.astro-suggest-chips button,
.astro-suggest-chip {
  flex: 0 1 auto;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.45em 0.85em;
  border: 1px solid rgba(126, 184, 255, 0.22);
  border-radius: 999px;
  background: rgba(13, 18, 40, 0.72);
  color: #c8d4ec;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.astro-suggest-chip:hover {
  border-color: rgba(201, 184, 150, 0.45);
  background: rgba(126, 184, 255, 0.1);
  color: #eef2fa;
}

.astro-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem 1rem;
}

.astro-chat-messages:empty {
  display: none;
}

@supports (scrollbar-color: auto) {
  .astro-chat-scroll,
  .astro-history-list {
    scrollbar-color: rgba(126, 184, 255, 0.35) rgba(126, 184, 255, 0.06);
    scrollbar-width: thin;
  }
}

.astro-msg {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.astro-msg.user {
  flex-direction: row-reverse;
}

.astro-msg-bubble {
  max-width: min(680px, 85%);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  line-height: 1.65;
  font-size: 0.92rem;
}

.astro-msg.assistant .astro-msg-bubble {
  background: rgba(126, 184, 255, 0.1);
  border: 1px solid rgba(126, 184, 255, 0.15);
}

.astro-msg.user .astro-msg-bubble {
  background: rgba(201, 184, 150, 0.12);
  border: 1px solid rgba(201, 184, 150, 0.2);
}

.astro-msg.assistant.is-thinking .astro-msg-bubble,
.astro-msg-bubble.astro-thinking-bubble {
  display: flex;
  align-items: center;
  min-width: 4.5rem;
  min-height: 1.65rem;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.astro-msg.assistant:not(.is-thinking) .astro-msg-bubble {
  display: block;
}

.astro-thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.astro-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.astro-thinking-dots span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(126, 184, 255, 0.82);
  box-shadow: 0 0 8px rgba(126, 184, 255, 0.35);
  animation: astroThinkingDotPulse 1.55s ease-in-out infinite;
}

.astro-thinking-dots span:nth-child(2) {
  animation-delay: 0.24s;
}

.astro-thinking-dots span:nth-child(3) {
  animation-delay: 0.48s;
}

.astro-thinking-caption {
  font-size: 0.78rem;
  color: rgba(200, 216, 240, 0.62);
  letter-spacing: 0.03em;
}

@keyframes astroThinkingDotPulse {
  0%,
  78%,
  100% {
    opacity: 0.24;
    transform: scale(0.78);
  }
  38% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.astro-msg.assistant.is-thinking {
  animation: astroThinkingMsgIn 0.35s ease;
}

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

.astro-chat-input-area {
  flex-shrink: 0;
  padding: 0.75rem 1.1rem 0.85rem;
  border-top: 1px solid rgba(126, 184, 255, 0.12);
  background: rgba(5, 9, 20, 0.45);
}

.astro-chat-hint {
  flex-shrink: 0;
  margin: 0 1.1rem 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 180, 120, 0.35);
  background: rgba(255, 140, 80, 0.1);
  color: #ffd4b8;
  font-size: 0.82rem;
  line-height: 1.5;
}

.astro-suggest-primary:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.astro-chat-input-wrap {
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(126, 184, 255, 0.22);
  background: rgba(7, 11, 24, 0.72);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.astro-chat-input-wrap:focus-within {
  border-color: rgba(126, 184, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(126, 184, 255, 0.12);
}

.astro-chat-input-wrap textarea {
  flex: 1;
  resize: none;
  min-height: 24px;
  max-height: 140px;
  padding: 0.35rem 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  outline: none;
}

.astro-chat-send {
  flex-shrink: 0;
  min-width: 4.2rem;
  padding: 0.48em 1em;
}

.reader-paywall {
  padding: 2rem;
  text-align: center;
  background: var(--astro-panel);
  border-radius: 12px;
  border: 1px solid rgba(201, 184, 150, 0.2);
}

/* 档案弹窗 */
.chart-archives-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.chart-archives-modal.open {
  display: flex;
}

.chart-archives-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.chart-archives-panel {
  position: relative;
  width: min(92vw, 480px);
  max-height: min(80vh, 560px);
  overflow: auto;
  background: rgba(13, 18, 40, 0.97);
  color: #e8ecf4;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(126, 184, 255, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.chart-archives-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.14);
}

.chart-archives-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #d4c4a8;
  letter-spacing: 0.06em;
}

.chart-archives-panel .chart-panel-close {
  color: #a8b0c4;
}

.chart-archives-panel .chart-panel-close:hover {
  color: #e8ecf4;
}

.chart-archives-login,
.chart-archives-loading,
.chart-archives-empty {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #a8b0c4;
}

.chart-archives-login {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(126, 184, 255, 0.08);
  border: 1px solid rgba(126, 184, 255, 0.16);
  color: #c8d4ec;
}

.chart-archives-empty {
  text-align: center;
  padding: 1.25rem 0.5rem;
  color: #8b92a8;
}

.chart-archives-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
}

.chart-archives-list li,
.chart-archive-item {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  border-bottom: 1px solid rgba(126, 184, 255, 0.12);
}

.chart-archive-item:last-child {
  border-bottom: none;
}

.chart-archive-load {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.75rem 0.35rem;
  background: none;
  border: none;
  color: #e8ecf4;
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 0;
}

.chart-archive-load:hover {
  color: #fff;
}

.chart-archive-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: #eef2fa;
  line-height: 1.4;
}

.chart-archive-meta {
  display: block;
  font-size: 0.78rem;
  color: #8b92a8;
  line-height: 1.45;
}

.chart-archive-item.is-local .chart-archive-label {
  color: #c9d8f0;
}

.chart-archive-delete {
  flex: 0 0 auto;
  align-self: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8b92a8;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.chart-archive-delete:hover {
  color: #f0a0a0;
  background: rgba(232, 120, 90, 0.12);
}

@media (max-width: 900px) {
  .chart-workspace {
    grid-template-columns: 1fr;
  }

  .chart-main {
    min-height: auto;
  }

  .astro-chat-layout {
    grid-template-columns: 1fr;
  }

  .astro-chat-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(126, 184, 255, 0.12);
    max-height: 220px;
  }

  .astro-sidebar-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.55rem;
  }

  .astro-new-chat-btn {
    width: auto;
    flex-shrink: 0;
  }

  .astro-history-list {
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .astro-history-row {
    width: 100%;
    flex-shrink: 0;
  }
}

@media (max-width: 520px) {
  .chart-form {
    grid-template-columns: 1fr;
  }

  .chart-field-row,
  .chart-mode-panel {
    grid-template-columns: 1fr;
  }

  .chart-mode-panel .chart-field-row {
    grid-template-columns: 1fr;
  }
}

/* === 观星台 UI 定稿（防 restore 覆盖）=== */

body.page-astrology,
body[data-page="astrology"] {
  --astro-bg: #070b18;
  --astro-deep: #0d1228;
  --astro-star: #e8e4dc;
  --astro-muted: #8b92a8;
  --astro-glow: #c9b896;
  --astro-accent: #7eb8ff;
  --astro-panel: rgba(13, 18, 40, 0.88);
  --astro-border: rgba(201, 184, 150, 0.18);
  --text-muted: var(--astro-muted);
  --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-body: var(--font-ui);
  background: var(--astro-bg) !important;
  color: var(--astro-star);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.page-astrology.no-site-bg::before,
body[data-page="astrology"].no-site-bg::before {
  display: none;
}

body.page-astrology .site-header,
body[data-page="astrology"] .site-header {
  background: linear-gradient(to bottom, rgba(7, 11, 24, 0.95), rgba(7, 11, 24, 0.6));
  border-bottom-color: rgba(201, 184, 150, 0.12);
}

body.page-astrology .logo,
body[data-page="astrology"] .logo {
  color: var(--astro-glow);
}

body.page-astrology .nav-main a,
body[data-page="astrology"] .nav-main a {
  color: var(--astro-muted);
}

body.page-astrology .nav-main a:hover,
body.page-astrology .nav-main a.active,
body[data-page="astrology"] .nav-main a:hover,
body[data-page="astrology"] .nav-main a.active {
  color: var(--astro-glow);
}

.astro-hub {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.astro-hub-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.12em;
  color: var(--astro-glow);
  margin-bottom: 0.75rem;
}

.astro-hub-lead {
  max-width: 36em;
  margin: 0 auto 1.5rem;
  color: var(--astro-muted);
  font-weight: 300;
  line-height: 1.8;
}

.astro-hub-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.75rem;
}

.astro-hub-btn {
  padding: 0.45em 1em;
  border: 1px solid var(--astro-border);
  color: var(--astro-star);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  transition: border-color 0.3s, background 0.3s;
}

.astro-hub-btn:hover {
  border-color: var(--astro-glow);
  background: rgba(201, 184, 150, 0.08);
}

.astro-intro {
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}

.astro-intro-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--astro-glow);
  text-align: center;
  margin-bottom: 1.5rem;
}

.astro-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.astro-glass-card {
  padding: 1.25rem;
  border: 1px solid var(--astro-border);
  background: rgba(13, 18, 40, 0.65);
  backdrop-filter: blur(8px);
}

.astro-glass-card h3 {
  font-family: var(--font-display);
  color: var(--astro-glow);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.astro-glass-card p {
  color: var(--astro-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

body[data-page="astrology"] .astro-section-title {
  font-family: var(--font-display);
  color: var(--astro-glow);
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

body[data-page="astrology"] .astro-section-desc {
  color: var(--astro-muted);
  margin-bottom: 1.25rem;
}

body[data-page="astrology"] .zodiac-wheel {
  width: min(460px, 90vw);
  aspect-ratio: 1;
  margin: 1rem auto 0.75rem;
  position: relative;
  border: 1px solid rgba(201, 184, 150, 0.22);
  border-radius: 50%;
  animation: wheelSpin 140s linear infinite;
  transform-origin: center center;
}

/* 居中锚层：只负责定位，不参与旋转，避免 animation 覆盖 translate */
body[data-page="astrology"] .solar-system-anchor {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

body[data-page="astrology"] .solar-system {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  border-radius: 50%;
  animation: solarSpin 160s linear infinite reverse;
  transform-origin: center center;
}

body[data-page="astrology"] .solar-sun {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.1rem;
  line-height: 1;
  color: #ffe08a;
  background: rgba(72, 48, 12, 0.55);
  border: 1px solid rgba(255, 210, 96, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 200, 80, 0.35);
  z-index: 2;
}

body[data-page="astrology"] .orbit-ring {
  position: absolute;
  border: 1px solid rgba(126, 184, 255, 0.14);
  border-radius: 50%;
  box-sizing: border-box;
}

body[data-page="astrology"] .orbit-ring-zodiac {
  border-color: rgba(201, 184, 150, 0.22);
  z-index: 0;
}

body[data-page="astrology"] .orbit-spin {
  position: absolute;
  inset: 0;
  animation: orbitSpin var(--dur, 12s) linear infinite;
}

body[data-page="astrology"] .planet-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.82rem;
  line-height: 1;
  color: #dce8ff;
  background: rgba(28, 42, 78, 0.82);
  border: 1px solid rgba(126, 184, 255, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(126, 184, 255, 0.18);
  animation: planetUpright var(--dur, 12s) linear infinite;
}

body[data-page="astrology"] .planet-earth-group {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  animation: planetUpright var(--dur, 12s) linear infinite;
}

body[data-page="astrology"] .planet-earth-group > .planet-dot {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  animation: none;
}

body[data-page="astrology"] .planet-earth-group > .moon-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.78rem;
  height: 0.78rem;
  font-size: 0.58rem;
  line-height: 1;
  color: #e8dcc8;
  background: rgba(40, 36, 52, 0.75);
  border: 1px solid rgba(201, 184, 150, 0.35);
  border-radius: 50%;
}

body[data-page="astrology"] .solar-system .moon-dot,
body[data-page="astrology"] .hero-moon-abs {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.78rem;
  height: 0.78rem;
  font-size: 0.58rem;
  line-height: 1;
  color: #e8dcc8;
  background: rgba(40, 36, 52, 0.75);
  border: 1px solid rgba(201, 184, 150, 0.35);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(200, 210, 230, 0.22);
  z-index: 6;
}

body[data-page="astrology"] .zodiac-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: var(--hero-zodiac-orbit, 50%);
  transform-origin: bottom center;
  margin-left: -1px;
  margin-top: calc(-1 * var(--hero-zodiac-orbit, 50%));
  pointer-events: none;
  z-index: 3;
}

body[data-page="astrology"] .zodiac-mark span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
  line-height: 1;
  color: #f0ece4;
  background: rgba(88, 62, 140, 0.72);
  border: 1px solid rgba(168, 200, 255, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(126, 184, 255, 0.15);
}

@keyframes wheelSpin {
  to { transform: rotate(360deg); }
}

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

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes planetUpright {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

body[data-page="astrology"] .zodiac-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

body[data-page="astrology"] .zodiac-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 8.25rem;
  padding: 1.05rem 0.55rem 0.85rem;
  border: 1px solid rgba(126, 184, 255, 0.18);
  border-radius: 8px;
  background: rgba(13, 18, 40, 0.62);
  color: var(--astro-star);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body[data-page="astrology"] .zodiac-card:hover,
body[data-page="astrology"] .zodiac-card.is-sun-sign {
  border-color: rgba(201, 184, 150, 0.45);
  box-shadow: 0 0 20px rgba(126, 184, 255, 0.12);
  transform: translateY(-2px);
}

body[data-page="astrology"] .zodiac-card .symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.65rem;
  height: 3.65rem;
  font-size: 2.05rem;
  line-height: 1;
  color: #f0ece4;
  background: rgba(88, 62, 140, 0.82);
  border: 1px solid rgba(168, 200, 255, 0.42);
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(126, 184, 255, 0.16);
  margin-bottom: 0.25rem;
}

body[data-page="astrology"] .zodiac-card .name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

body[data-page="astrology"] .zodiac-card .element,
body[data-page="astrology"] .zodiac-card .dates {
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--astro-muted);
}

body[data-page="astrology"] .zodiac-card-hint {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--astro-accent);
  margin-top: 0.2rem;
}

@media (max-width: 960px) {
  body[data-page="astrology"] .zodiac-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 0.85rem;
  }

  body[data-page="astrology"] .zodiac-card {
    min-height: 7.5rem;
    padding: 0.95rem 0.45rem 0.75rem;
  }
}

@media (max-width: 720px) {
  body[data-page="astrology"] .zodiac-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
}

@media (max-width: 480px) {
  body[data-page="astrology"] .zodiac-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body[data-page="astrology"] .zodiac-card {
    min-height: 6.75rem;
    padding: 0.85rem 0.35rem 0.65rem;
  }

  body[data-page="astrology"] .zodiac-card .symbol {
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
  }
}

body[data-page="astrology"] .chart-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  grid-template-areas: "profile chart" "info info";
  gap: 1.25rem 1.5rem;
  width: 100%;
  max-width: min(1360px, 96vw);
  margin: 0 auto;
}

body[data-page="astrology"] .chart-profile-card { grid-area: profile; }
body[data-page="astrology"] .chart-main {
  grid-area: chart;
  min-width: 0;
  overflow-x: hidden;
}
body[data-page="astrology"] .chart-info-box { grid-area: info; }

@media (max-width: 900px) {
  body[data-page="astrology"] .chart-workspace {
    grid-template-columns: 1fr;
    grid-template-areas: "profile" "chart" "info";
  }
}

/* === 本命星盘 · 测测式 SVG 与数据表 === */
body[data-page="astrology"] .chart-workspace {
  overflow-x: hidden;
}

body[data-page="astrology"] .chart-visual {
  width: 100%;
  align-items: stretch;
  position: relative;
  padding: 0.25rem 0;
}

body[data-page="astrology"] .cece-chart-host {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

body[data-page="astrology"] .cece-chart-host.chart-is-default,
body[data-page="astrology"] .cece-chart-host.cece-chart-loading {
  max-width: min(100%, 640px);
  margin-left: auto;
  margin-right: auto;
}

body[data-page="astrology"] .cece-chart-host:not(.chart-is-default) .chart-full-poster-svg {
  width: 100%;
  max-width: 100%;
}

body[data-page="astrology"] .chart-legend {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(126, 184, 255, 0.12);
  line-height: 1.4;
}

body[data-page="astrology"] .chart-legend-item i {
  height: 2px;
  width: 16px;
}

body[data-page="astrology"] .chart-data-inner {
  padding-top: 0.25rem;
}

body[data-page="astrology"] .chart-tables-title {
  margin-top: 1rem;
  margin-bottom: 0.55rem;
  letter-spacing: 0.04em;
}

body[data-page="astrology"] .chart-positions-table th,
body[data-page="astrology"] .chart-aspects-table th {
  padding: 0.5rem 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

body[data-page="astrology"] .chart-positions-table td,
body[data-page="astrology"] .chart-aspects-table td {
  padding: 0.42rem 0.55rem;
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
}

body[data-page="astrology"] .chart-positions-table td:first-child,
body[data-page="astrology"] .chart-aspects-table td:first-child {
  color: #d8dce8;
}

body[data-page="astrology"] .chart-positions-table th:nth-child(1),
body[data-page="astrology"] .chart-positions-table td:nth-child(1) {
  width: 22%;
}

body[data-page="astrology"] .chart-positions-table th:nth-child(2),
body[data-page="astrology"] .chart-positions-table td:nth-child(2) {
  width: 22%;
}

body[data-page="astrology"] .chart-positions-table th:nth-child(3),
body[data-page="astrology"] .chart-positions-table td:nth-child(3) {
  width: 28%;
}

body[data-page="astrology"] .chart-positions-table th:nth-child(4),
body[data-page="astrology"] .chart-positions-table td:nth-child(4) {
  width: 28%;
}

body[data-page="astrology"] .chart-aspects-table th:nth-child(1),
body[data-page="astrology"] .chart-aspects-table td:nth-child(1),
body[data-page="astrology"] .chart-aspects-table th:nth-child(3),
body[data-page="astrology"] .chart-aspects-table td:nth-child(3) {
  width: 30%;
}

body[data-page="astrology"] .chart-aspects-table th:nth-child(2),
body[data-page="astrology"] .chart-aspects-table td:nth-child(2) {
  width: 18%;
  text-align: center;
}

body[data-page="astrology"] .chart-aspects-table th:nth-child(4),
body[data-page="astrology"] .chart-aspects-table td:nth-child(4) {
  width: 22%;
  text-align: right;
}

body[data-page="astrology"] .chart-pane-data {
  padding-top: 0.15rem;
}

/* === 星盘双卡片 + 放大查看 === */
.chart-cards-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.chart-card {
  background: rgba(8, 12, 28, 0.78);
  border: 1px solid rgba(126, 184, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.chart-card:not(.chart-card-disabled):hover {
  border-color: rgba(201, 184, 150, 0.38);
  box-shadow: 0 0 22px rgba(126, 184, 255, 0.1);
}

.chart-card-disabled {
  cursor: default;
  opacity: 0.78;
}

.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.12);
  background: rgba(7, 11, 24, 0.45);
}

.chart-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #d4c4a8;
  letter-spacing: 0.06em;
}

.chart-card-action {
  font-size: 0.72rem;
  color: rgba(168, 196, 232, 0.82);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.chart-card-action.is-muted {
  color: #6a7288;
}

.chart-card-body {
  padding: 0.65rem 0.75rem 0.8rem;
}

.chart-card-wheel .chart-card-body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0.65rem 0.7rem;
}

.chart-card-wheel .chart-wheel-svg,
.chart-card-wheel .chart-default-wheel-svg {
  width: 100%;
  max-width: min(100%, 560px);
  height: auto;
}

.chart-card-data .chart-tables-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-card-placeholder {
  margin: 0;
  padding: 2.25rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #8b92a8;
}

.chart-export-source {
  display: none !important;
}

.chart-zoom-tip {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: #8b92a8;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.cece-chart-host .chart-planet-hit {
  cursor: pointer;
}

.cece-chart-host .chart-planet-minor .chart-planet-cn-minor {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.92;
}

.cece-chart-host .chart-planet-minor .chart-planet-deg-minor {
  font-size: 0.68rem;
  opacity: 0.88;
}

.cece-chart-host .chart-minor-planets .chart-minor-anchor {
  pointer-events: none;
}

.chart-html-zoom-hit {
  cursor: zoom-in;
  position: relative;
  border-radius: 8px;
  transition: background 0.15s, box-shadow 0.15s;
}

.chart-html-zoom-hit:hover {
  background: rgba(126, 184, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(126, 184, 255, 0.14);
}

.chart-html-zoom-hit::after {
  content: "点击放大";
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  font-size: 0.68rem;
  color: rgba(168, 196, 232, 0.72);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.chart-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.chart-zoom-modal.open {
  display: flex;
}

.chart-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.chart-zoom-panel {
  position: relative;
  width: min(96vw, 980px);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 32, 0.98);
  color: #e8ecf4;
  border: 1px solid rgba(126, 184, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.chart-zoom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.14);
  flex: 0 0 auto;
}

.chart-zoom-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #d4c4a8;
  letter-spacing: 0.06em;
}

.chart-zoom-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.85rem 1rem 0.5rem;
  min-height: 0;
  overscroll-behavior: contain;
  cursor: grab;
}

.chart-zoom-body.is-pan-surface,
.chart-zoom-body.is-pan-surface * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.chart-zoom-body.is-pan-surface .chart-zoom-svg,
.chart-zoom-body.is-pan-surface .chart-zoom-svg * {
  pointer-events: none;
}

.chart-zoom-body.is-pan-surface .chart-zoom-svg-wrap,
.chart-zoom-body.is-pan-surface .chart-zoom-html-wrap {
  pointer-events: auto;
}

.chart-zoom-body.is-dragging {
  cursor: grabbing;
}

.chart-zoom-svg-wrap,
.chart-zoom-html-wrap {
  transform-origin: 0 0;
  will-change: transform;
}

.chart-zoom-svg-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  line-height: 0;
}

.chart-zoom-svg-wrap .chart-zoom-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 760px);
}

.chart-zoom-html-wrap {
  overflow-x: auto;
}

.chart-zoom-html-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 1rem;
}

.chart-zoom-html-wrap th,
.chart-zoom-html-wrap td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.14);
  text-align: left;
  line-height: 1.5;
}

.chart-zoom-html-wrap th {
  color: #a8b0c4;
  font-size: 0.88rem;
  font-weight: 500;
}

.chart-zoom-html-wrap .cp-table,
.chart-zoom-html-wrap .cp-aspect-grid {
  min-width: 520px;
}

.chart-zoom-html-wrap .cp-table-wrap,
.chart-zoom-html-wrap .cp-aspect-grid-wrap,
.chart-zoom-html-wrap .cp-feature-list,
.chart-zoom-html-wrap .cp-interpret-list {
  border: none;
  background: transparent;
  overflow: visible;
}

.chart-zoom-html-wrap .cp-aspect-cell.asp-conj { color: #ffb347; }
.chart-zoom-html-wrap .cp-aspect-cell.asp-sext { color: #48d69a; }
.chart-zoom-html-wrap .cp-aspect-cell.asp-sq { color: #f08080; }
.chart-zoom-html-wrap .cp-aspect-cell.asp-tri { color: #7eb8ff; }
.chart-zoom-html-wrap .cp-aspect-cell.asp-opp { color: #c9a0ff; }

.chart-zoom-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.55rem 1rem 0.75rem;
  text-align: center;
  font-size: 0.74rem;
  color: #6a7288;
}

/* === 观星台 UI 字体与表单（统一无衬线 + 对比度）=== */
body[data-page="astrology"] .chart-profile-card,
body[data-page="astrology"] .chart-main,
body[data-page="astrology"] .chart-info-box,
body[data-page="astrology"] .chart-interpret-panel {
  font-family: var(--font-ui);
}

body[data-page="astrology"] .chart-field-label,
body[data-page="astrology"] .chart-engine-label,
body[data-page="astrology"] .chart-paste-status,
body[data-page="astrology"] .chart-archives-hint,
body[data-page="astrology"] .chart-profile-hint,
body[data-page="astrology"] .chart-tab,
body[data-page="astrology"] .chart-tab-label,
body[data-page="astrology"] .chart-legend,
body[data-page="astrology"] .chart-zoom-tip,
body[data-page="astrology"] .chart-card-title,
body[data-page="astrology"] .chart-card-action {
  font-family: var(--font-ui);
}

body[data-page="astrology"] .chart-form input,
body[data-page="astrology"] .chart-form textarea,
body[data-page="astrology"] .chart-form select,
body[data-page="astrology"] .chart-profile-card input,
body[data-page="astrology"] .chart-profile-card textarea,
body[data-page="astrology"] .chart-profile-card button {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
}

body[data-page="astrology"] .chart-form input,
body[data-page="astrology"] .chart-form textarea {
  color: #e8ecf4;
}

body[data-page="astrology"] .chart-form input::placeholder,
body[data-page="astrology"] .chart-form textarea::placeholder {
  color: #6a7288;
}

body[data-page="astrology"] .chart-engine-options {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(126, 184, 255, 0.1);
}

body[data-page="astrology"] .chart-engine-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

body[data-page="astrology"] .chart-engine-label {
  font-size: 0.78rem;
  color: #8b92a8;
  letter-spacing: 0.02em;
}

body[data-page="astrology"] .chart-engine-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body[data-page="astrology"] .chart-engine-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.38rem 0.72rem;
  min-height: 2rem;
  border-radius: 6px;
  border: 1px solid rgba(126, 184, 255, 0.28);
  background: rgba(7, 11, 24, 0.82);
  color: #c8d4ec;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body[data-page="astrology"] .chart-engine-btn:hover {
  border-color: rgba(126, 184, 255, 0.45);
  color: #e8f0ff;
}

body[data-page="astrology"] .chart-engine-btn.active {
  background: rgba(126, 184, 255, 0.2);
  border-color: rgba(126, 184, 255, 0.5);
  color: #eef4ff;
}

body[data-page="astrology"] .astro-btn {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #eef2fa;
  background: linear-gradient(180deg, rgba(126, 184, 255, 0.28), rgba(126, 184, 255, 0.12));
  border-color: rgba(126, 184, 255, 0.42);
}

body[data-page="astrology"] .astro-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(126, 184, 255, 0.36), rgba(126, 184, 255, 0.16));
  border-color: rgba(168, 200, 255, 0.55);
}

body[data-page="astrology"] .astro-btn-ghost {
  color: #b8c8e8;
  background: rgba(7, 11, 24, 0.45);
  border-color: rgba(126, 184, 255, 0.28);
}

body[data-page="astrology"] .astro-btn-ghost:hover:not(:disabled) {
  color: #e8f0ff;
  background: rgba(126, 184, 255, 0.1);
  border-color: rgba(126, 184, 255, 0.4);
}

body[data-page="astrology"] .chart-info-box {
  padding: 0.95rem 1.05rem 1rem;
  border-radius: 10px;
  background: rgba(8, 12, 28, 0.72);
  border: 1px solid rgba(126, 184, 255, 0.16);
}

body[data-page="astrology"] .chart-info-summary {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #c8d0e0;
  text-align: center;
  font-family: var(--font-ui);
}

body[data-page="astrology"] .chart-chip {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: #eef2fa;
  background: rgba(14, 20, 42, 0.94);
  border: 1px solid rgba(126, 184, 255, 0.38);
  padding: 0.38rem 0.68rem;
  font-variant-numeric: tabular-nums;
}

body[data-page="astrology"] .chart-chip b {
  color: #9fd0ff;
  font-weight: 600;
}

body[data-page="astrology"] .chart-chip:hover {
  color: #fff;
  border-color: rgba(168, 200, 255, 0.55);
  background: rgba(18, 28, 56, 0.95);
}

body[data-page="astrology"] .chart-positions-table,
body[data-page="astrology"] .chart-aspects-table {
  font-family: var(--font-ui);
}

body[data-page="astrology"] .chart-positions-table td,
body[data-page="astrology"] .chart-aspects-table td {
  color: #d0d8ea;
}

body[data-page="astrology"] .chart-positions-table th,
body[data-page="astrology"] .chart-aspects-table th {
  color: #9aa4bc;
  font-weight: 500;
}

/* 表单区：强制无衬线，避免 button 继承全站衬线体 */
body.page-astrology .chart-workspace button,
body.page-astrology .chart-workspace input,
body.page-astrology .chart-workspace textarea,
body.page-astrology .chart-workspace select,
body.page-astrology .chart-workspace label,
body.page-astrology .chart-info-box button,
body[data-page="astrology"] .chart-workspace button,
body[data-page="astrology"] .chart-workspace input,
body[data-page="astrology"] .chart-workspace textarea,
body[data-page="astrology"] .chart-workspace select,
body[data-page="astrology"] .chart-workspace label,
body[data-page="astrology"] .chart-info-box button {
  font-family: var(--font-ui);
}

/* 占星问答 · 字体与 Markdown */
body.page-astrology .astro-chat-layout,
body.page-astrology .astro-chat-layout button,
body.page-astrology .astro-chat-layout textarea,
body.page-astrology .astro-chat-layout input,
body[data-page="astrology"] .astro-chat-layout,
body[data-page="astrology"] .astro-chat-layout button,
body[data-page="astrology"] .astro-chat-layout textarea,
body[data-page="astrology"] .astro-chat-layout input {
  font-family: var(--font-ui);
}

body[data-page="astrology"] .astro-history-item {
  font-family: var(--font-ui);
  color: #9aa4bc;
}

body[data-page="astrology"] .astro-history-row.active .astro-history-item,
body[data-page="astrology"] .astro-history-item:hover {
  color: #e8ecf4;
}

body[data-page="astrology"] .astro-chat-welcome {
  font-family: var(--font-ui);
  color: #9aa4bc;
}

body[data-page="astrology"] .astro-suggest-primary {
  font-family: var(--font-ui);
}

body[data-page="astrology"] .astro-chat-input-wrap textarea {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e8ecf4;
}

body[data-page="astrology"] .astro-msg-bubble {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.72;
  color: #e4eaf6;
}

body[data-page="astrology"] .astro-msg.user .astro-msg-bubble {
  color: #eef2fa;
}

body[data-page="astrology"] .astro-msg-bubble p {
  margin: 0 0 0.55rem;
}

body[data-page="astrology"] .astro-msg-bubble p:last-child {
  margin-bottom: 0;
}

body[data-page="astrology"] .astro-msg-bubble strong {
  color: #e8c878;
  font-weight: 600;
  text-decoration: none;
}

body[data-page="astrology"] .astro-md-heading {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #b8d8ff;
}

body[data-page="astrology"] .astro-md-heading:first-child {
  margin-top: 0;
}

body[data-page="astrology"] .astro-md-quote {
  margin: 0.45rem 0;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 3px solid rgba(126, 184, 255, 0.42);
  color: #c8d4e8;
}

body[data-page="astrology"] .astro-md-quote p {
  margin: 0 0 0.35rem;
}

body[data-page="astrology"] .astro-msg-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #d4c4a8;
  background: rgba(201, 184, 150, 0.12);
  border: 1px solid rgba(201, 184, 150, 0.28);
}

/* === 本命盘参数（测测式，星盘下方） === */
.chart-params-panel {
  width: 100%;
  margin-top: 0.85rem;
}

.chart-params-panel[hidden] {
  display: none !important;
}

.cp-head {
  margin-bottom: 0;
}

.cp-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(126, 184, 255, 0.22);
  border-radius: 10px;
  background: rgba(8, 12, 28, 0.72);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cp-toggle:hover {
  background: rgba(126, 184, 255, 0.08);
  border-color: rgba(126, 184, 255, 0.35);
}

.cp-toggle-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cp-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e8ecf4;
}

.cp-toggle-hint {
  font-size: 0.72rem;
  color: rgba(200, 208, 224, 0.55);
  letter-spacing: 0.02em;
}

.cp-toggle-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  color: #7eb8ff;
  font-size: 0.8rem;
}

.cp-toggle-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.2rem;
  transition: transform 0.2s ease;
}

.chart-params-panel:not(.is-collapsed) .cp-toggle-icon {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.cp-collapsible {
  padding-top: 0.65rem;
}

.cp-collapsible[hidden] {
  display: none !important;
}

.cp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(126, 184, 255, 0.18);
}

.cp-tab {
  flex: 1;
  padding: 0.55rem 0.35rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: rgba(200, 208, 224, 0.72);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cp-tab.active {
  color: #7eb8ff;
  border-bottom-color: #7eb8ff;
  font-weight: 500;
}

.cp-body {
  padding-top: 0.65rem;
}

.cp-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.cp-section-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(232, 236, 244, 0.92);
  flex: 1 1 auto;
  min-width: 0;
}

.cp-section-zoom-hint {
  flex: 0 0 auto;
  max-width: 9.5rem;
  font-size: 0.66rem;
  line-height: 1.35;
  color: rgba(168, 196, 232, 0.58);
  text-align: right;
  letter-spacing: 0.02em;
}

.cp-zoom-hit {
  position: relative;
  border-radius: 10px;
  outline: none;
}

.cp-zoom-hit:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(126, 184, 255, 0.35);
}

.chart-params-panel .cp-zoom-hit.chart-html-zoom-hit::after {
  content: none;
  display: none;
}

.cp-section-body .cp-table-wrap,
.cp-section-body .cp-aspect-grid-wrap,
.cp-section-body .cp-feature-list,
.cp-section-body .cp-interpret-list {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.cp-section {
  margin-bottom: 1rem;
}

@media (max-width: 520px) {
  .cp-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .cp-section-zoom-hint {
    max-width: none;
    text-align: left;
  }
}

.cp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid rgba(126, 184, 255, 0.14);
  background: rgba(8, 12, 28, 0.55);
}

.cp-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.4;
}

.cp-table th,
.cp-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(126, 184, 255, 0.08);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.cp-table th {
  font-weight: 500;
  color: rgba(200, 208, 224, 0.65);
  background: rgba(126, 184, 255, 0.06);
}

.cp-table td {
  color: rgba(232, 236, 244, 0.9);
}

.cp-table td:first-child,
.cp-table th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(12, 16, 32, 0.96);
}

.cp-table tbody tr:last-child td {
  border-bottom: none;
}

.cp-sym {
  font-family: "Segoe UI Symbol", "Noto Sans Symbols", sans-serif;
  margin-right: 0.15rem;
}

.cp-rx {
  color: #f0a0a0;
  font-size: 0.72rem;
}

.cp-aspect-grid-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(126, 184, 255, 0.14);
  background: rgba(8, 12, 28, 0.55);
}

.cp-aspect-grid {
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 100%;
}

.cp-aspect-grid th,
.cp-aspect-grid td {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0.2rem;
  text-align: center;
  border: 1px solid rgba(126, 184, 255, 0.08);
}

.cp-aspect-grid th {
  color: rgba(200, 208, 224, 0.7);
  font-weight: 500;
  background: rgba(126, 184, 255, 0.05);
}

.cp-aspect-cell {
  font-weight: 600;
  font-size: 0.72rem;
}

.cp-aspect-cell.asp-conj { color: #ffb347; background: rgba(255, 179, 71, 0.12); }
.cp-aspect-cell.asp-sext { color: #48d69a; background: rgba(72, 214, 154, 0.1); }
.cp-aspect-cell.asp-sq { color: #f08080; background: rgba(240, 128, 128, 0.1); }
.cp-aspect-cell.asp-tri { color: #7eb8ff; background: rgba(126, 184, 255, 0.1); }
.cp-aspect-cell.asp-opp { color: #c9a0ff; background: rgba(201, 160, 255, 0.1); }

.cp-aspect-empty {
  background: transparent;
}

.cp-feature-list {
  margin: 0;
  padding: 0.55rem 0.75rem;
  list-style: none;
  border-radius: 10px;
  border: 1px solid rgba(126, 184, 255, 0.14);
  background: rgba(8, 12, 28, 0.55);
}

.cp-feature-item {
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: rgba(232, 236, 244, 0.88);
  border-bottom: 1px solid rgba(126, 184, 255, 0.06);
}

.cp-feature-item:last-child {
  border-bottom: none;
}

.cp-interpret-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 10px;
  border: 1px solid rgba(126, 184, 255, 0.14);
  overflow: hidden;
}

.cp-interpret-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  border-bottom: 1px solid rgba(126, 184, 255, 0.08);
  background: rgba(8, 12, 28, 0.55);
  font-family: inherit;
  font-size: 0.84rem;
  color: rgba(232, 236, 244, 0.92);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.cp-interpret-item:hover {
  background: rgba(126, 184, 255, 0.08);
}

.cp-interpret-list li:last-child .cp-interpret-item {
  border-bottom: none;
}

.cp-interpret-go {
  color: rgba(126, 184, 255, 0.75);
  font-size: 1.1rem;
}

.cp-interpret-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: rgba(200, 208, 224, 0.55);
}

@media (max-width: 640px) {
  .cp-table {
    min-width: 480px;
    font-size: 0.72rem;
  }
  .cp-tab {
    font-size: 0.76rem;
    padding: 0.5rem 0.2rem;
  }
}

