.emotion-page {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cream);
}

.emotion-page[hidden] {
  display: none !important;
}

/* 天空：颜色与首页一致 */
.emotion-hero {
  position: relative;
  flex: 0 0 34%;
  min-height: 240px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 78% 18%, rgba(120, 140, 180, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 18% 70%, rgba(90, 100, 130, 0.14), transparent 60%),
    linear-gradient(180deg, #12161e 0%, #1a2130 55%, #243044 100%);
}

.emotion-stars {
  position: absolute;
  top: 42px;
  right: 28px;
  width: 110px;
  height: 72px;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.emotion-stars .em-line {
  fill: none;
  stroke: rgba(197, 171, 133, 0.5);
  stroke-width: 1.1;
  stroke-dasharray: 3 4;
  animation: emBond 3.8s ease-in-out infinite;
}

.emotion-stars .em-star {
  fill: #f0e6d4;
  filter: drop-shadow(0 0 4px rgba(197, 171, 133, 0.75));
  transform-box: fill-box;
  transform-origin: center;
}

.emotion-stars .em-a {
  animation: emPulseA 3.2s ease-in-out infinite;
}

.emotion-stars .em-b {
  animation: emPulseB 3.2s ease-in-out infinite;
}

@keyframes emPulseA {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes emPulseB {
  0%, 100% { opacity: 1; transform: scale(1.18); }
  50% { opacity: 0.55; transform: scale(0.9); }
}

@keyframes emBond {
  0%, 100% { stroke-opacity: 0.35; }
  50% { stroke-opacity: 0.85; }
}

@keyframes emOrbBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 5px rgba(200, 143, 122, 0.12), 0 6px 14px rgba(182, 124, 104, 0.26); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(200, 143, 122, 0.16), 0 8px 18px rgba(182, 124, 104, 0.32); }
}

/* 字体：与事业页一致 */
.emotion-hero-copy {
  position: absolute;
  left: 28px;
  right: 130px;
  bottom: 22px;
  color: #f3efe6;
  z-index: 3;
}

.emotion-eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 8px;
}

.emotion-brand {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1;
  margin-bottom: 10px;
  color: #f7f1e5;
}

.emotion-lead {
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(243, 239, 230, 0.72);
  max-width: 260px;
}

.emotion-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 12px 0 4px;
  background: linear-gradient(180deg, var(--cream) 0%, #e8e1d2 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emotion-locked {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
}

.emotion-locked[hidden],
.emotion-main[hidden] {
  display: none !important;
}

.emotion-locked-card {
  width: 100%;
  max-width: 300px;
  text-align: center;
  padding: 28px 20px 24px;
  border-radius: 18px;
  background: var(--paper);
  border: 1.5px dashed rgba(197, 171, 133, 0.4);
  box-shadow: 0 10px 22px rgba(44, 50, 63, 0.05);
}

.emotion-locked-card .em-diamonds {
  color: var(--gold);
  letter-spacing: 0.28em;
  font-size: 11px;
  margin-bottom: 14px;
  opacity: 0.85;
}

.emotion-locked-title {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 12px;
}

.emotion-locked-text {
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.emotion-locked-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #fff8f3;
  background: linear-gradient(180deg, #d19a86, var(--clay));
  box-shadow: 0 8px 16px rgba(200, 143, 122, 0.24);
}

.emotion-locked-btn:active {
  transform: scale(0.97);
}

.emotion-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* 合盘双人 */
.emotion-pair {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 22px;
}

.emotion-person {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
  background:
    radial-gradient(circle at 35% 30%, #fffdf8 0%, #f7f3ea 48%, #ece6d9 100%);
  border: 1px solid rgba(197, 171, 133, 0.35);
  box-shadow: 0 8px 18px rgba(44, 50, 63, 0.06);
  color: var(--ink);
}

.emotion-person:active {
  transform: scale(0.97);
}

.emotion-person.is-empty {
  background: transparent;
  border: 1.5px dashed rgba(44, 50, 63, 0.22);
  box-shadow: none;
  color: var(--ink-soft);
}

.emotion-person.is-empty:active {
  transform: scale(0.97);
  background: rgba(247, 243, 234, 0.45);
}

.emotion-person .em-name {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.emotion-person .em-sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.emotion-person.is-empty .em-plus {
  font-size: 20px;
  line-height: 1;
  color: rgba(44, 50, 63, 0.35);
  margin-bottom: 2px;
}

.emotion-orb {
  position: relative;
  width: 36px;
  height: 36px;
  margin: 0 -2px;
  z-index: 2;
  flex: 0 0 auto;
}

.emotion-orb::before,
.emotion-orb::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 0;
  border-top: 1.5px dashed rgba(197, 171, 133, 0.55);
}

.emotion-orb::before {
  right: 100%;
  margin-right: -2px;
}

.emotion-orb::after {
  left: 100%;
  margin-left: -2px;
}

.emotion-orb-core {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #f0d2c4, #c88f7a 55%, #b67c68);
  box-shadow:
    0 0 0 5px rgba(200, 143, 122, 0.12),
    0 6px 14px rgba(182, 124, 104, 0.26);
  animation: emOrbBreath 3.6s ease-in-out infinite;
}

/* 照一照 */
.emotion-shine {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin: 0 36px;
  height: 42px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: rgba(44, 50, 63, 0.35);
  background: rgba(44, 50, 63, 0.08);
  border: 1px solid rgba(44, 50, 63, 0.06);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  opacity: 0.72;
  cursor: not-allowed;
}

.emotion-shine.is-ready {
  color: #fff8f3;
  background: linear-gradient(180deg, #d19a86, var(--clay));
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(200, 143, 122, 0.28);
  opacity: 1;
  cursor: pointer;
}

.emotion-shine.is-ready:active {
  transform: scale(0.98);
}

.emotion-shine.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

/* 报告区：内部上下滚动 */
.emotion-report {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: 0 22px;
  display: flex;
  flex-direction: column;
}

.emotion-section-title {
  flex: 0 0 auto;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 8px;
}

.emotion-report-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 171, 133, 0.45) transparent;
  border-radius: 18px;
  background: var(--paper);
  border: 1.5px dashed rgba(197, 171, 133, 0.35);
  padding: 18px 16px;
  box-shadow: 0 8px 18px rgba(44, 50, 63, 0.04);
}

.emotion-report-panel::-webkit-scrollbar {
  width: 3px;
}

.emotion-report-panel::-webkit-scrollbar-thumb {
  background: rgba(197, 171, 133, 0.45);
  border-radius: 999px;
}

.emotion-report-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100%;
  gap: 10px;
  color: var(--ink-soft);
}

.emotion-report-empty .em-diamonds {
  display: flex;
  gap: 8px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.85;
}

.emotion-report-empty p {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  max-width: 240px;
}

.emotion-report-result[hidden],
.emotion-report-empty[hidden] {
  display: none !important;
}

.emotion-report-result .em-pair-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #b8976d;
  margin-bottom: 8px;
}

.emotion-report-result .em-title {
  display: block;
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 10px;
}

.emotion-report-result .em-body {
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: rgba(44, 50, 63, 0.78);
}

.emotion-report-result .em-body p + p {
  margin-top: 10px;
}

/* 历史：左右滑动 */
.emotion-history {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding-bottom: 2px;
  margin-top: 2px;
}

.emotion-history .emotion-section-title {
  padding: 0 22px;
  margin-bottom: 6px;
}

.emotion-history-empty {
  margin: 0 22px;
  padding: 18px 16px 20px;
  text-align: center;
  font-family: var(--font-display, "ZCOOL XiaoWei", "Noto Serif SC", serif);
  font-size: 13px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: rgba(90, 86, 78, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 252, 246, 0.18));
  border: 1px dashed rgba(176, 152, 118, 0.38);
  border-radius: 14px;
}

.emotion-history-empty[hidden] {
  display: none;
}

.emotion-history-track {
  display: flex;
  gap: 10px;
  padding: 0 22px 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.emotion-history-track[hidden] {
  display: none;
}

.emotion-history-track::-webkit-scrollbar {
  display: none;
}

.emotion-history-card {
  flex: 0 0 210px;
  width: 210px;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--paper);
  border-radius: 14px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 14px rgba(44, 50, 63, 0.05);
}

.emotion-history-card:active {
  transform: scale(0.985);
}

.emotion-history-card .em-venn {
  flex: 0 0 auto;
  width: 34px;
  height: 22px;
  position: relative;
}

.emotion-history-card .em-venn span {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  opacity: 0.75;
}

.emotion-history-card .em-venn span:first-child {
  left: 0;
  background: rgba(197, 171, 133, 0.65);
}

.emotion-history-card .em-venn span:last-child {
  right: 0;
  background: rgba(200, 143, 122, 0.55);
}

.emotion-history-card .em-copy {
  flex: 1;
  min-width: 0;
}

.emotion-history-card .em-h-title {
  display: block;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emotion-history-card .em-h-time {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.emotion-history-card .em-chevron {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(44, 50, 63, 0.28);
  border-bottom: 1.5px solid rgba(44, 50, 63, 0.28);
  transform: rotate(-45deg);
}

.emotion-footer {
  margin-top: 0;
  padding: 4px 22px 2px;
  flex: 0 0 auto;
}

/* 选人面板 */
.emotion-picker {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(20, 24, 32, 0.42);
}

.emotion-picker-backdrop {
  position: absolute;
  inset: 0;
}

.emotion-picker[hidden] {
  display: none !important;
}

.emotion-picker-sheet {
  position: relative;
  z-index: 1;
  background: #f4efe4;
  border-radius: 22px 22px 0 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 32px rgba(20, 24, 32, 0.18);
  max-height: 72%;
  display: flex;
  flex-direction: column;
}

.emotion-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.emotion-picker-head h3 {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 18px;
  letter-spacing: 0.12em;
  font-weight: 400;
  color: var(--ink);
}

.emotion-picker-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
}

.emotion-picker-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.emotion-picker-scroll::-webkit-scrollbar {
  display: none;
}

.emotion-picker-add {
  flex: 0 0 auto;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(176, 152, 118, 0.5);
  background: rgba(255, 252, 246, 0.65);
  color: var(--clay-deep);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
}

.emotion-picker-add:active {
  transform: scale(0.985);
  background: rgba(247, 243, 234, 0.9);
}

.emotion-picker-empty {
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.emotion-picker-empty[hidden],
.emotion-relation[hidden] {
  display: none !important;
}

.emotion-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}

.emotion-picker-badge {
  margin-left: 6px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--clay-deep);
  background: rgba(200, 143, 122, 0.14);
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: middle;
}

.emotion-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.emotion-picker-item:active {
  background: #efe9dc;
}

.emotion-picker-item.is-on {
  border-color: rgba(197, 171, 133, 0.55);
  background: #faf6ee;
  box-shadow: 0 0 0 1px rgba(197, 171, 133, 0.25);
}

.emotion-picker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #f7f1e5;
  background: linear-gradient(145deg, #d0b790, #b8976d);
  letter-spacing: 0.05em;
}

.emotion-picker-meta {
  flex: 1;
  min-width: 0;
}

.emotion-picker-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.emotion-picker-meta span {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.emotion-relation {
  flex: 0 0 auto;
  padding-top: 4px;
  border-top: 1px solid rgba(44, 50, 63, 0.08);
}

.emotion-relation[hidden] {
  display: none !important;
}

.emotion-relation-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 12px 0 10px;
  font-weight: 500;
}

.emotion-relation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emotion-relation-tags button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid rgba(44, 50, 63, 0.1);
}

.emotion-relation-tags button:active {
  transform: scale(0.97);
}

.emotion-relation-tags button.is-on {
  color: #fff8f3;
  background: linear-gradient(180deg, #d19a86, var(--clay));
  border-color: transparent;
}

.emotion-relation-hint {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(44, 50, 63, 0.4);
}

.tab-icon.emotion {
  width: 14px;
  height: 14px;
  position: relative;
}

.tab-icon.emotion::before,
.tab-icon.emotion::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.tab-icon.emotion::before {
  left: 0;
}

.tab-icon.emotion::after {
  right: 0;
}
