/* ===== 塔罗 ===== */
.tarot-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.tarot-card {
  width: 230px;
  height: 360px;
  perspective: 1200px;
  cursor: pointer;
}
.tarot-card .inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.tarot-card.flipped .inner { transform: rotateY(180deg); }
.tarot-card .face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.tarot-card .back-face {
  background:
    radial-gradient(circle at 50% 30%, rgba(201, 168, 106, 0.2), transparent 60%),
    linear-gradient(160deg, #241d3d, #120f22);
  border: 1px solid rgba(201, 168, 106, 0.35);
  font-size: 44px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.tarot-card .front-face {
  background: #ece5d3;
  color: #221d12;
  transform: rotateY(180deg);
  border: 1px solid #d8cfb4;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.tarot-card .front-face .card-num { font-size: 14px; opacity: 0.55; letter-spacing: 1px; }
.tarot-card .front-face .card-name { font-size: 22px; font-weight: 800; margin: 12px 0; text-align: center; }
.tarot-card .front-face .card-key { font-size: 14px; text-align: center; line-height: 1.6; }

.spread-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.spread-row .tarot-card { width: 130px; height: 210px; }
.spread-row .tarot-card .front-face .card-name { font-size: 15px; }
.spread-row .tarot-card .front-face .card-key { font-size: 12px; }

.reading-result { margin-top: 24px; width: 100%; }
.reading-result .card-block {
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.reading-result h4 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.reading-result .meaning { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.reading-result .rev { color: var(--gold-bright); }

/* ===== 月相 ===== */
.moon-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0;
  text-align: center;
}
.moon-orb {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f7e8c3, #d9a441 60%, #6b4a16);
  box-shadow: 0 0 60px rgba(232, 205, 149, 0.3);
  margin-bottom: 20px;
}
.moon-hero .phase-name { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: 2px; }
.moon-hero .phase-desc { color: var(--text-dim); margin-top: 8px; font-size: 15px; }
.moon-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; width: 100%; }

/* ===== 日记 ===== */
.journal-entry {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
}
.journal-entry .meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.journal-entry .content { font-size: 15px; line-height: 1.7; white-space: pre-wrap; color: var(--text); }
.journal-editor textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(10, 9, 19, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 16px;
  padding: 16px;
  outline: none;
  resize: vertical;
  font-family: inherit;
}
.prompt-box {
  background: rgba(201, 168, 106, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== 资料库 ===== */
.lib-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease;
}
.lib-item:active { border-color: var(--line-gold); }
.lib-item .l-icon { font-size: 32px; }
.lib-item .l-body { flex: 1; }
.lib-item .l-body h4 { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.lib-item .l-body p { font-size: 13px; color: var(--text-faint); line-height: 1.5; }
.detail-section { margin-bottom: 18px; }
.detail-section h4 { font-size: 15px; color: var(--gold-bright); margin-bottom: 8px; letter-spacing: 1px; }
.detail-section p { font-size: 15px; line-height: 1.75; color: var(--text-dim); }

/* ===== 聊天 ===== */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 70px); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 0; }
.bubble {
  max-width: 78%;
  padding: 13px 16px;
  border-radius: 18px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.65;
}
.bubble.ai {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(12px);
}
.bubble.me {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}
.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px 0 calc(12px + var(--safe-bottom));
}
.chat-input input {
  flex: 1;
  background: rgba(10, 9, 19, 0.55);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--ink);
  padding: 14px 18px;
  font-size: 15px;
  outline: none;
}
.chat-input button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1408;
  font-size: 20px;
  cursor: pointer;
}

/* 空状态 / 占位 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty-state .e-icon { font-size: 48px; margin-bottom: 16px; }
.placeholder-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.6;
}
