:root {
  --ink: #152028;
  --muted: #67717a;
  --paper: #f8f4ec;
  --panel: rgba(255, 252, 244, 0.9);
  --line: rgba(21, 32, 40, 0.13);
  --teal: #177e89;
  --coral: #d95d39;
  --gold: #d9a441;
  --night: #111927;
  --shadow: 0 24px 70px rgba(12, 21, 31, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(217, 164, 65, 0.2), transparent 28%),
    linear-gradient(135deg, #132030 0%, #214251 42%, #f1e7d4 42%, #f8f4ec 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: rgba(17, 25, 39, 0.92);
  color: #fff8eb;
}

.brand-block,
.section-title,
.today-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  justify-content: flex-start;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, rgba(217, 164, 65, 0.35), rgba(23, 126, 137, 0.32));
  font-size: 28px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.7rem;
  line-height: 1.1;
}

h2 {
  font-size: 1rem;
}

.birth-form {
  display: grid;
  gap: 10px;
}

.birth-form label {
  color: rgba(255, 248, 235, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.birth-form input,
.birth-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0 12px;
  color: #fff8eb;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.birth-form input:focus,
.birth-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.18);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  color: #17222c;
  background: #f0c35b;
  font-weight: 900;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff8eb;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.history-box {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.source-box {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  color: rgba(255, 248, 235, 0.72);
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.65;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff8eb;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
}

.history-item small {
  color: rgba(255, 248, 235, 0.58);
}

.empty-history {
  color: rgba(255, 248, 235, 0.54);
  font-size: 0.9rem;
}

.analysis-section {
  position: relative;
  padding: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
  margin-bottom: 32px;
}

.analysis-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  border-radius: 12px 12px 0 0;
}

.section-title h2 {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.section-summary {
  margin-top: 24px;
  padding: 16px;
  background: var(--paper);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  border-left: 3px solid var(--teal);
}

.module-interpret {
  margin-top: 1.2rem;
  padding: 12px 16px;
  background: rgba(23, 126, 137, 0.04);
  border-left: 2px solid var(--teal);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
}

/* ─── 付费遮罩 ─────────────────────────────────────────────── */
.paywall-locked {
  position: relative;
  overflow: hidden;
}

.paywall-locked > *:not(.paywall-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 30, 0.55);
  backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: inherit;
}

.paywall-box {
  text-align: center;
  padding: 2rem 2.5rem;
  background: rgba(15, 25, 38, 0.94);
  border: 1px solid rgba(255, 180, 60, 0.35);
  border-radius: 14px;
  max-width: 380px;
}

.paywall-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.paywall-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f0e8d8;
  margin: 0 0 0.6rem;
  line-height: 1.5;
}

.paywall-sub {
  font-size: 0.8rem;
  color: rgba(200, 190, 175, 0.85);
  margin: 0 0 1.2rem;
  line-height: 1.65;
}

.paywall-btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: linear-gradient(135deg, #e8a840 0%, #d4831e 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.paywall-btn:hover { opacity: 0.88; }

/* ─── 支付弹窗 ─────────────────────────────────────────────── */
.pay-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.pay-modal {
  background: var(--card-bg, #0f1926);
  border: 1px solid rgba(255, 180, 60, 0.25);
  border-radius: 16px;
  padding: 2rem;
  width: 320px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pay-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.pay-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--ink);
}

.pay-modal-price {
  font-size: 2rem;
  font-weight: 800;
  color: #e8a840;
  margin: 0 0 1rem;
}

.pay-qr-area {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.pay-qr-img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  border: 3px solid #fff;
}

.pay-loading {
  font-size: 0.9rem;
  color: var(--muted);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pay-modal-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.pay-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.pay-tab {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.pay-tab.active {
  background: rgba(232, 168, 64, 0.15);
  border-color: #e8a840;
  color: #e8a840;
}

/* ─── 犯太岁卡片 ──────────────────────────────────────────────── */

/* 不犯太岁 */
.taisui-safe {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: rgba(74,222,128,0.07);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: 12px;
  flex-wrap: wrap;
}
.taisui-body { flex: 1; min-width: 0; }
.taisui-main { font-size: 0.85rem; margin: 0 0 0.2rem; opacity: 0.8; }
.taisui-desc { font-size: 0.85rem; margin: 0; color: var(--text-dim); line-height: 1.55; }

/* 犯太岁 */
.taisui-alert {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  background: var(--taisui-bg, rgba(239,68,68,0.1));
  border: 1px solid var(--taisui-border, rgba(239,68,68,0.3));
  border-radius: 12px;
  flex-wrap: wrap;
}
.taisui-alert-left {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  flex: 1;
  min-width: 220px;
}
.taisui-emoji { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.taisui-alert-headline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--taisui-color, #ef4444);
  margin: 0.1rem 0 0.2rem;
}
.taisui-alert-who { font-size: 0.8rem; opacity: 0.65; margin: 0; }
.taisui-alert-short {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
  flex: 1;
  min-width: 180px;
  align-self: center;
  border-left: 1px solid var(--taisui-border, rgba(239,68,68,0.25));
  padding-left: 1rem;
}

/* 共用 badge */
.taisui-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.3rem;
}
.taisui-badge.safe  { background: rgba(74,222,128,0.18);  color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.taisui-badge.alert { background: rgba(255,255,255,0.08); color: var(--taisui-color, #ef4444); border: 1px solid var(--taisui-border, rgba(239,68,68,0.3)); }

/* 付费区详细建议 */
.taisui-detail-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}
.taisui-detail-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.taisui-intro {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 1rem;
}
.taisui-advice-block {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.taisui-advice-block h4 {
  font-size: 0.85rem;
  margin: 0 0 0.4rem;
  color: var(--gold);
}
.taisui-advice-block p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}
.taisui-footer-note {
  font-size: 0.76rem;
  opacity: 0.45;
  margin: 0.8rem 0 0;
  line-height: 1.6;
}

/* ─── 原有样式 ─────────────────────────────────────────────── */
.compat-hint {
  margin-top: 1.2rem;
  padding: 12px 16px;
  background: rgba(255, 180, 60, 0.06);
  border-left: 2px solid var(--gold, #e8a840);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  border-radius: 0 4px 4px 0;
}

.compat-hint .compat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold, #e8a840);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  opacity: 0.9;
}

.compat-hint strong {
  color: var(--ink);
}

.long-text-report {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 2;
  text-align: justify;
}

.long-text-report p {
  margin-bottom: 1.5rem;
  text-indent: 2em;
}

/* 顶部 Hero 区域 */
.report-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 40px;
  background: linear-gradient(to bottom, #fff, var(--panel));
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.hero-text h1 {
  font-size: 2.2rem;
  margin: 12px 0;
  color: var(--ink);
  font-weight: 900;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-button.pdf-btn {
  background: #2a4a3a !important;
}
.icon-button.pdf-btn:hover {
  background: #1e3628 !important;
}

.icon-button.primary {
  background: var(--teal);
  color: white;
  padding: 0 24px;
  width: auto;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  transition: all 0.2s ease;
}

.icon-button.primary:hover {
  background: #126069;
  transform: translateY(-1px);
}

.zodiac-summary {
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
}

.orbit-ring {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--line);
  animation: turn 60s linear infinite;
}

.orbit-ring span {
  font-size: 1.1rem;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-90px) rotate(calc(var(--i) * -30deg));
}

.main-sign-display {
  position: absolute;
  font-size: 4rem;
  color: var(--coral);
  z-index: 2;
  text-shadow: 0 0 20px rgba(217, 93, 57, 0.2);
}

/* 页面底部优化 */
.result-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0; /* Hero 已经自带 padding */
  background: var(--panel);
  min-height: 100vh;
}

.analysis-section {
  margin: 20px 40px 40px 40px;
}

/* 宫位卡片增强 */
.house-cell {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.house-cell:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(200, 146, 42, 0.1);
}

.house-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.house-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.house-degree {
  font-size: 0.68rem;
  opacity: 0.5;
}

.house-sign-text {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 3px;
}

.house-area {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Legacy - keep for backward compat */
.house-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.house-sign {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.date-chip,
.soft-badge {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--teal);
  background: rgba(23, 126, 137, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
}

.logic-note {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.logic-note article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.logic-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 900;
}

.logic-note p {
  color: var(--muted);
  line-height: 1.65;
}

.zodiac-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(23, 126, 137, 0.12), rgba(217, 93, 57, 0.1)),
    rgba(255, 255, 255, 0.45);
}

.orbit-ring {
  position: absolute;
  width: min(360px, 74vw);
  aspect-ratio: 1;
  border: 1px solid rgba(21, 32, 40, 0.14);
  border-radius: 50%;
  animation: turn 42s linear infinite;
}

.orbit-ring span {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(21, 32, 40, 0.48);
  font-size: 1.45rem;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-175px) rotate(calc(var(--i) * -30deg));
}

.orbit-ring span:nth-child(1) { --i: 0; }
.orbit-ring span:nth-child(2) { --i: 1; }
.orbit-ring span:nth-child(3) { --i: 2; }
.orbit-ring span:nth-child(4) { --i: 3; }
.orbit-ring span:nth-child(5) { --i: 4; }
.orbit-ring span:nth-child(6) { --i: 5; }
.orbit-ring span:nth-child(7) { --i: 6; }
.orbit-ring span:nth-child(8) { --i: 7; }
.orbit-ring span:nth-child(9) { --i: 8; }
.orbit-ring span:nth-child(10) { --i: 9; }
.orbit-ring span:nth-child(11) { --i: 10; }
.orbit-ring span:nth-child(12) { --i: 11; }

.birth-card {
  position: relative;
  width: min(360px, 86%);
  border: 1px solid rgba(21, 32, 40, 0.14);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  background: rgba(255, 252, 244, 0.84);
  box-shadow: 0 18px 50px rgba(21, 32, 40, 0.12);
}

.main-sign {
  color: var(--coral);
  font-size: clamp(2.1rem, 6vw, 4.1rem);
  font-weight: 950;
  line-height: 1;
}

.birth-card p:last-child {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ─── 年月日分段输入 ──────────────────────────────────────── */
.date-split-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 6px;
}
/* 去除 number 输入的上下箭头 */
.date-split-row input::-webkit-outer-spin-button,
.date-split-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.date-split-row input[type=number] {
  -moz-appearance: textfield;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ─── 时间 + 性别 两列布局 ─────────────────────────────── */
.two-col-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.two-col-row label {
  display: block;
  margin-bottom: 0;
}

/* ─── 年份标准控件（左侧面板）────────────────────────────── */
.conv-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0 10px;
  color: #fff8eb;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  outline: none;
  cursor: pointer;
}
.conv-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.18);
}

/* ─── 年份标准差异提示条（右侧结果区）────────────────────── */
.conv-note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(217, 164, 65, 0.06);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.65;
}
.conv-note strong {
  color: var(--ink);
}
.conv-tag {
  display: inline-block;
  margin-right: 8px;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.74rem;
  font-weight: 900;
  vertical-align: middle;
}
.conv-tag--ok {
  background: rgba(23, 126, 137, 0.12);
  color: var(--teal);
}
.conv-tag--diff {
  background: rgba(217, 164, 65, 0.2);
  color: #a07020;
}

/* ─── 精度标注徽章 ──────────────────────────────────────── */
.accuracy-badge {
  display: inline-block;
  margin-left: 5px;
  border: 1px solid rgba(23, 126, 137, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--teal);
  background: rgba(23, 126, 137, 0.07);
  font-size: 0.68rem;
  font-weight: 800;
  font-style: normal;
  vertical-align: middle;
  letter-spacing: 0;
}
.solar-time-note {
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(217, 164, 65, 0.08);
  border: 1px solid rgba(217, 164, 65, 0.2);
  font-weight: 500;
  line-height: 1.5;
}

/* 宫位与轴点网格 - 强制 4 列布局提升报告感 */
#houseGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 1200px) {
  #houseGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #houseGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── PDF / 打印样式 ────────────────────────────────────────── */
@media print {
  /* ── 页面设置：A4 竖版，含页眉页脚边距 ── */
  @page {
    size: A4 portrait;
    margin: 14mm 12mm 16mm 12mm;
  }
  @page :first {
    margin-top: 8mm;
  }

  /* ── 全局重置：白底黑字，强制保留颜色 ── */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html {
    font-size: 11pt;
  }

  body {
    margin: 0;
    padding: 0;
    background: #fff !important;
    color: #1a2530 !important;
    font-family: “PingFang SC”, “Microsoft YaHei”, “Noto Sans CJK SC”, Arial, sans-serif;
  }

  /* ── 隐藏所有不需要打印的元素 ── */
  #sky,
  .control-panel,
  .hero-actions,
  .history-box,
  .source-box,
  .pill-tabs,
  .orbit-container,
  .zodiac-summary,
  button:not(.print-visible),
  .icon-button,
  .conv-tag,
  .accuracy-note,
  .no-print {
    display: none !important;
  }

  /* ── 布局重置：取消双栏，全页宽 ── */
  .app-shell {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .workspace {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .result-panel {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  /* ── 报告顶部 Hero ── */
  .report-hero {
    display: block !important;
    background: linear-gradient(135deg, #132030 0%, #214251 100%) !important;
    color: #fff !important;
    padding: 20pt 24pt !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    page-break-after: avoid !important;
  }

  .report-hero .eyebrow { color: #d9a441 !important; font-size: 8pt !important; }
  .report-hero h1       { font-size: 20pt !important; color: #fff !important; margin: 4pt 0 6pt !important; }
  .report-hero .hero-sub { color: rgba(255,255,255,0.8) !important; font-size: 9pt !important; }
  .report-hero #birthDateDisplay { color: rgba(255,255,255,0.7) !important; font-size: 8pt !important; display: block !important; }
  .report-hero #subSign  { color: rgba(255,255,255,0.9) !important; font-size: 10pt !important; }

  .solar-time-note,
  .conv-note {
    font-size: 8pt !important;
    padding: 5pt 8pt !important;
    margin-top: 4pt !important;
    border-radius: 4pt !important;
  }

  .solar-time-note {
    background: rgba(217,164,65,0.2) !important;
    color: #d9a441 !important;
    border: 1px solid rgba(217,164,65,0.4) !important;
  }

  /* ── 分析章节 ── */
  .analysis-section {
    margin: 0 !important;
    padding: 14pt 16pt 10pt !important;
    border-top: 2px solid #e8e0d0 !important;
    background: transparent !important;
    box-shadow: none !important;
    break-inside: avoid-page !important;
  }

  .section-title {
    margin-bottom: 8pt !important;
    padding-bottom: 5pt !important;
    border-bottom: 1px solid #ddd !important;
  }

  .section-title h2 {
    font-size: 13pt !important;
    color: #132030 !important;
    margin: 0 !important;
  }

  .soft-badge {
    font-size: 7.5pt !important;
    padding: 2pt 7pt !important;
    background: rgba(23,126,137,0.10) !important;
    color: #177e89 !important;
    border-color: rgba(23,126,137,0.25) !important;
  }

  /* ── 四柱格 ── */
  .pillar-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8pt !important;
  }

  .pillar-cell {
    padding: 8pt !important;
    border-radius: 6pt !important;
    background: rgba(248,244,236,0.9) !important;
    border: 1px solid #ddd !important;
    break-inside: avoid !important;
  }

  .pillar-cell .pillar-label { font-size: 7pt !important; color: #888 !important; }
  .pillar-cell .pillar-gz    { font-size: 18pt !important; font-weight: 800 !important; }
  .pillar-cell .pillar-ten-god { font-size: 8pt !important; }

  /* ── 五行条 ── */
  .element-bars { gap: 4pt !important; }
  .element-row  { gap: 6pt !important; font-size: 8.5pt !important; }
  .element-row i {
    border-radius: 3pt !important;
    height: 10pt !important;
    min-width: 6pt !important;
  }

  /* ── 分析卡片 (lens-card / analysis-card) ── */
  .analysis-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
  }

  .analysis-card,
  .lens-card {
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    padding: 9pt !important;
    background: #fafaf8 !important;
    box-shadow: none !important;
    break-inside: avoid !important;
  }

  .analysis-card h3,
  .lens-card h3 { font-size: 10pt !important; margin: 0 0 6pt !important; color: #132030 !important; }

  .lens-card strong { font-size: 12pt !important; }
  .lens-card p, .module-interpret { font-size: 8pt !important; line-height: 1.5 !important; }

  .lens-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
  }

  /* ── 十神网格 ── */
  .tengod-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5pt !important;
  }

  .tengod-cell {
    padding: 5pt !important;
    border-radius: 4pt !important;
    font-size: 8pt !important;
    background: rgba(248,244,236,0.9) !important;
    border: 1px solid #ddd !important;
  }

  .ten-god-badge {
    font-size: 7pt !important;
    padding: 1pt 4pt !important;
    border-radius: 3pt !important;
  }

  /* ── 宫位格 ── */
  #houseGrid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6pt !important;
  }

  .house-cell {
    padding: 6pt 8pt !important;
    border-radius: 5pt !important;
    background: #fafaf8 !important;
    border: 1px solid #ddd !important;
  }

  .house-sign-text { font-size: 9pt !important; }
  .house-label, .house-degree, .house-area { font-size: 7pt !important; }

  /* ── 今日指标卡 ── */
  .metric-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6pt !important; }
  .metric-card {
    padding: 8pt !important;
    border-radius: 5pt !important;
    background: #fafaf8 !important;
    border: 1px solid #ddd !important;
    break-inside: avoid !important;
  }
  .metric-card strong { font-size: 11pt !important; }
  .metric-card .card-label { font-size: 7.5pt !important; }

  /* ── 运势文本 ── */
  .fortune-copy {
    padding: 8pt 10pt !important;
    font-size: 8.5pt !important;
    background: #fafaf8 !important;
    border-left: 3px solid #d95d39 !important;
    break-inside: avoid !important;
  }

  /* ── 易卦 ── */
  .hexagram-lab {
    grid-template-columns: 120pt minmax(0,1fr) !important;
    gap: 12pt !important;
    padding: 10pt !important;
    background: #fafaf8 !important;
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    break-inside: avoid !important;
  }

  .hexagram-lines {
    min-height: 100pt !important;
    padding: 10pt !important;
    background: #132030 !important;
    border-radius: 5pt !important;
  }

  .hexagram-lab h3 { font-size: 11pt !important; color: #132030 !important; }
  .hexagram-lab p, .derivation-list p { font-size: 8pt !important; line-height: 1.5 !important; }

  /* ── 综合人格评价 ── */
  .natal-profile-summary {
    padding: 10pt 12pt !important;
    background: #fafaf8 !important;
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    gap: 10pt !important;
  }

  .profile-keyword-chip {
    font-size: 7pt !important;
    padding: 3px 8px !important;
    background: rgba(217,164,65,0.12) !important;
    border-color: rgba(217,164,65,0.4) !important;
  }

  .profile-portrait {
    padding: 8pt 10pt !important;
    background: rgba(17,25,39,0.04) !important;
    border-color: var(--gold) !important;
  }
  .profile-portrait-text { font-size: 8pt !important; }

  .profile-ratings {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6pt !important;
  }
  .rating-dim {
    padding: 6pt 8pt !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
  }
  .rating-dim-label { font-size: 7.5pt !important; }
  .rating-bar-label { font-size: 7pt !important; }
  .rating-bar-track { height: 6px !important; }

  .profile-talents {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6pt !important;
  }
  .talent-card {
    padding: 7pt 9pt !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    break-inside: avoid !important;
  }
  .talent-icon { font-size: 11pt !important; }
  .talent-label { font-size: 7.5pt !important; }
  .talent-desc { font-size: 7pt !important; }

  .tension-item {
    padding: 6pt 8pt !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
  }
  .tension-item p { font-size: 7.5pt !important; }

  .profile-challenges {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6pt !important;
  }
  .challenge-card {
    padding: 7pt 9pt !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    break-inside: avoid !important;
  }
  .challenge-label { font-size: 7.5pt !important; }
  .challenge-desc { font-size: 7pt !important; }

  .profile-shadow {
    padding: 7pt 10pt !important;
    background: rgba(17,25,39,0.04) !important;
  }
  .profile-shadow p { font-size: 8pt !important; }

  .profile-oneliner {
    padding: 8pt 12pt !important;
    gap: 8pt !important;
    background: rgba(217,164,65,0.06) !important;
    border-color: rgba(217,164,65,0.4) !important;
  }
  .profile-oneliner p { font-size: 8.5pt !important; }

  .profile-core-advice { font-size: 8pt !important; padding: 7pt 9pt !important; }

  /* ── 今日日常建议 ── */
  .daily-guide {
    border: 1px solid #ddd !important;
    border-radius: 6pt !important;
    overflow: hidden !important;
    break-inside: avoid !important;
  }

  .daily-guide-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .daily-item {
    padding: 7pt 8pt !important;
    border-color: #eee !important;
  }

  .daily-item-icon  { font-size: 11pt !important; }
  .daily-item-label { font-size: 7pt !important; }
  .daily-item-value { font-size: 8pt !important; }
  .daily-item-desc  { font-size: 7pt !important; }

  /* ── 分析章节之间加分页提示 ── */
  .analysis-section + .analysis-section {
    break-before: auto !important;
  }

  /* 东方/西方大节明确换页 */
  .analysis-section:nth-child(3) {
    break-before: page !important;
  }

  /* ── 页眉（用CSS content 打印页码）── */
  .report-hero::after {
    content: “星命小馆 · 本命报告”;
    display: block;
    font-size: 7pt;
    color: rgba(255,255,255,0.4);
    margin-top: 6pt;
    text-align: right;
  }

  /* 文字大小补偿 */
  p, li, div { font-size: 8.5pt; line-height: 1.6; }
  h1 { font-size: 18pt; }
  h2 { font-size: 13pt; }
  h3 { font-size: 10pt; }
  small { font-size: 7pt; }
}

/* 截图时的临时样式修正 */
.is-capturing .control-panel,
.is-capturing .hero-actions,
.is-capturing .history-box {
  display: none !important;
}
.is-capturing .app-shell {
  width: auto !important;
}
.is-capturing .result-panel {
  width: 900px !important; /* 固定宽度确保截图比例一致 */
}

/* 修正 lens-card 样式 */
.lens-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}
.lens-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.lens-card strong {
  font-size: 1.35rem;
  color: var(--ink);
}
.lens-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── 来源表格（三列：名称 等级 用途）──────────────────── */
.source-card {
  display: grid;
  grid-template-columns: minmax(140px, 0.38fr) 36px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  align-items: center;
}
.source-tier {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(23, 126, 137, 0.12);
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 900;
}

/* ─── 五行旺/弱标签 ─────────────────────────────────────── */
.element-tag {
  display: inline-block;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-weight: 900;
}
.element-tag.strong {
  background: rgba(217, 93, 57, 0.12);
  color: var(--coral);
}
.element-tag.weak {
  background: rgba(23, 126, 137, 0.1);
  color: var(--teal);
}

/* ─── 十神网格 ──────────────────────────────────────────── */
.tengod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tengod-cell {
  display: grid;
  gap: 6px;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
}
.tengod-cell span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}
.tengod-cell strong {
  color: var(--coral);
  font-size: 1.65rem;
  line-height: 1;
}
.ten-god-badge {
  display: inline-block;
  border: 1px solid rgba(23, 126, 137, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--teal);
  background: rgba(23, 126, 137, 0.08);
  font-size: 0.74rem;
  font-weight: 800;
}
/* 干支结构里的十神小标 */
.ten-god {
  display: block;
  margin-top: 2px;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
}

/* ─── 加载动画 ──────────────────────────────────────────── */
.primary-action {
  position: relative;
  overflow: hidden;
  transition: opacity 0.15s;
}
.primary-action.loading {
  opacity: 0.72;
  pointer-events: none;
}
.primary-action.loading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
  animation: shimmer 1s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.metric-card {
  min-height: 144px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.metric-card span,
.metric-card .card-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  display: block;
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--teal);
  font-size: 1.45rem;
  line-height: 1.12;
}

.metric-card p,
.fortune-copy,
.lens-card p {
  color: var(--muted);
  line-height: 1.65;
}

.fortune-section,
.analysis-section,
.source-section {
  display: grid;
  gap: 14px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.analysis-card,
.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.analysis-card h3,
.source-card h3,
.hexagram-lab h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

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

.pillar-cell {
  display: grid;
  gap: 5px;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 244, 236, 0.72);
}

.pillar-cell span,
.pillar-cell small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.pillar-cell strong {
  color: var(--coral);
  font-size: 1.45rem;
}

.element-bars {
  display: grid;
  gap: 11px;
}

.element-row {
  display: grid;
  grid-template-columns: 52px 1fr 28px 24px;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.element-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 32, 40, 0.08);
}

.element-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

.branch-profile {
  display: grid;
  gap: 10px;
}

.branch-profile p,
.hexagram-lab p,
.derivation-list p,
.source-card span,
.section-summary {
  color: var(--muted);
  line-height: 1.65;
}

.branch-profile strong {
  display: inline-block;
  min-width: 58px;
  color: var(--teal);
}

.pill-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.tab-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  color: #fff;
  background: var(--teal);
}

.fortune-copy {
  min-height: 96px;
  border-left: 4px solid var(--coral);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.54);
}

/* ─── 综合人格评价 (全面重设计) ─────────────────────── */
.natal-profile-summary {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* 分区标题 */
.profile-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* ── 关键词标签云 ── */
.profile-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-keyword-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid rgba(217, 164, 65, 0.35);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── 命格印象 ── */
.profile-portrait {
  background: rgba(17, 25, 39, 0.04);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
}
.profile-portrait-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.profile-portrait-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink);
}

/* ── 四大维度评分 ── */
.profile-ratings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 560px) {
  .profile-ratings { grid-template-columns: 1fr; }
}
.rating-dim {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.rating-dim-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.rating-dim-icon { font-size: 1.1rem; }
.rating-dim-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}
.rating-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rating-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(17,25,39,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.rating-bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 54px;
  text-align: right;
}
.rating-bar-label small {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.8;
}

/* ── 先天天赋 ── */
.profile-talents {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 560px) {
  .profile-talents { grid-template-columns: 1fr; }
}
.talent-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.2s;
}
.talent-card:hover {
  box-shadow: 0 2px 12px rgba(17,25,39,0.08);
}
.talent-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.talent-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.talent-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.8;
}

/* ── 性格结构·内在张力 ── */
.profile-tensions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tension-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.tension-bullet {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.tension-item p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--ink);
}

/* ── 人生挑战 ── */
.profile-challenges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 560px) {
  .profile-challenges { grid-template-columns: 1fr; }
}
.challenge-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.challenge-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.challenge-icon { font-size: 1.1rem; }
.challenge-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: 0.03em;
}
.challenge-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.82;
}

/* ── 命格阴影 ── */
.profile-shadow {
  background: rgba(17, 25, 39, 0.05);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 4px solid var(--coral);
}
.profile-shadow-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.profile-shadow p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink);
}

/* ── 一句话总结 ── */
.profile-oneliner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(217,164,65,0.08), rgba(217,164,65,0.04));
  border-radius: 12px;
  border: 1.5px solid rgba(217,164,65,0.3);
}
.oneliner-mark {
  color: var(--gold);
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.profile-oneliner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink);
}

/* Keep old classes for potential fallback */
.profile-core-advice {
  margin-top: 1.2rem;
  padding: 14px 18px;
  background: rgba(217, 164, 65, 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink);
}

/* ─── 今日日常建议 ─────────────────────────────────── */
.daily-guide {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.56);
}

.daily-guide-header {
  padding: 14px 20px;
  background: rgba(17, 25, 39, 0.06);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.daily-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
}

.daily-item {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.daily-item:nth-child(even) {
  border-right: none;
}

.daily-item-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.daily-item-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.daily-item-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.daily-item-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.8;
}

.hexagram-lab {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.hexagram-lines {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(17, 25, 39, 0.94);
}

.yao {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  height: 14px;
}

.yao span {
  display: block;
  border-radius: 999px;
  background: #f0c35b;
}

.yao.broken {
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.yao.moving span {
  background: #f77f5f;
  box-shadow: 0 0 0 4px rgba(247, 127, 95, 0.16);
}

.derivation-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.derivation-list p {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 244, 236, 0.58);
  font-size: 0.88rem;
}

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

.lens-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.lens-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.lens-card strong {
  display: block;
  margin: 10px 0;
  color: var(--teal);
  font-size: 1.05rem;
  line-height: 1.35;
}

.source-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.source-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
}

.source-card a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.source-card a:hover {
  text-decoration: underline;
}

.section-summary {
  border-left: 3px solid rgba(23, 126, 137, 0.32);
  padding: 2px 0 2px 12px;
  font-size: 0.86rem;
}

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

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

  .control-panel {
    min-height: auto;
  }

  .metric-grid,
  .logic-note,
  .lens-grid,
  .analysis-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .hexagram-lab {
    grid-template-columns: 1fr;
  }

  .pillar-grid,
  .derivation-list,
  .tengod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-card {
    grid-template-columns: minmax(120px, 0.4fr) 30px 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    min-height: 100vh;
    border: 0;
  }

  .control-panel,
  .result-panel {
    padding: 20px;
  }

  .today-strip,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .pill-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tab-button {
    flex: 1 0 auto;
  }

  .pillar-grid,
  .derivation-list,
  .tengod-grid {
    grid-template-columns: 1fr;
  }

  .orbit-ring span {
    transform: rotate(calc(var(--i) * 30deg)) translateY(-145px) rotate(calc(var(--i) * -30deg));
  }
}
