/* ============================================================
   星穹塔罗 · Starry Tarot
   主题：神秘星空 · 暗夜紫金
   设计令牌：颜色 / 字体 / 间距 / 动画时长
   ============================================================ */
:root {
  /* 颜色令牌 */
  --bg-deep: #07040f;
  --bg-mid: #120a26;
  --bg-panel: rgba(24, 14, 48, 0.82);
  --bg-card: #1a0f33;
  --line-gold: rgba(232, 197, 107, 0.45);
  --gold: #e8c56b;
  --gold-soft: #f5dfa0;
  --gold-deep: #b98a2f;
  --violet: #8b6cf0;
  --violet-soft: #b9a6ff;
  --text: #f0e9ff;
  --text-dim: rgba(240, 233, 255, 0.66);
  --text-faint: rgba(240, 233, 255, 0.42);
  --danger: #ff6b7a;
  --success: #6fe3b0;

  /* 字体 */
  --font-display: 'Cinzel', 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 圆角 / 阴影 / 动效 */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(232, 197, 107, 0.18);
  --glow-gold: 0 0 22px rgba(232, 197, 107, 0.45);
  --glow-violet: 0 0 26px rgba(139, 108, 240, 0.5);
  --dur: 0.6s;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.hidden { display: none !important; }

/* ---------- 背景层：星空画布 + 星云 ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-nebula {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 36% at 18% 22%, rgba(108, 60, 190, 0.28), transparent 70%),
    radial-gradient(46% 40% at 82% 18%, rgba(70, 40, 160, 0.24), transparent 70%),
    radial-gradient(50% 46% at 70% 88%, rgba(150, 70, 190, 0.16), transparent 72%),
    radial-gradient(40% 40% at 28% 78%, rgba(60, 90, 200, 0.14), transparent 72%);
  animation: nebulaDrift 26s ease-in-out infinite alternate;
}
@keyframes nebulaDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, -1.5%, 0) scale(1.08); }
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 48px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--gold-soft);
  text-decoration: none;
  text-shadow: var(--glow-gold);
}
.brand-mark { font-size: 26px; line-height: 1; }
.site-nav { display: flex; gap: 8px; }
.nav-link {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 2px;
  transition: all 0.3s;
}
.nav-link:hover { color: var(--gold-soft); border-color: var(--gold); box-shadow: var(--glow-gold); }

/* ---------- 视图容器 ---------- */
#app { position: relative; z-index: 10; }
.view { max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vh, 64px) clamp(16px, 4vw, 40px); }

/* ---------- 首页 ---------- */
.view-home { text-align: center; min-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-title { font-family: var(--font-display); margin-bottom: 14px; animation: fadeUp 1s ease both; }
.hero-line {
  display: block;
  font-size: clamp(44px, 9vw, 92px);
  letter-spacing: 0.32em;
  background: linear-gradient(180deg, #fff7dd 0%, var(--gold) 55%, #8a5a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(232, 197, 107, 0.35));
  text-indent: 0.32em;
}
.hero-en { display: block; margin-top: 8px; font-size: clamp(13px, 2.4vw, 20px); letter-spacing: 0.6em; color: var(--text-faint); text-indent: 0.6em; }
.hero-sub { color: var(--text-dim); font-size: clamp(15px, 2.6vw, 19px); letter-spacing: 4px; margin-bottom: 44px; animation: fadeUp 1.1s 0.12s ease both; }

/* 装饰悬浮卡牌 */
.hero-cards { position: relative; width: min(560px, 90vw); height: 220px; margin: 6px auto 36px; animation: fadeUp 1.1s 0.2s ease both; }
.hero-card {
  position: absolute;
  width: 118px; height: 198px;
  border-radius: 12px;
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow-card);
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(232, 197, 107, 0.16), transparent 70%),
    linear-gradient(160deg, #241446, #100723);
  animation: floatCard 6s ease-in-out infinite;
}
.hero-card::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(232, 197, 107, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 197, 107, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 42% 56%, rgba(232, 197, 107, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 66%, rgba(232, 197, 107, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, transparent 0 34px, rgba(232, 197, 107, 0.35) 35px 37px, transparent 38px);
  opacity: 0.75;
}
.hc-1 { left: 4%; top: 6px; transform: rotate(-12deg); animation-delay: 0s; }
.hc-2 { left: 50%; top: 0; transform: translateX(-50%) rotate(4deg); animation-delay: 1.2s; z-index: 2; }
.hc-3 { right: 4%; top: 10px; transform: rotate(14deg); animation-delay: 2.4s; }
@keyframes floatCard {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

/* 按钮体系 */
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; animation: fadeUp 1.1s 0.3s ease both; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 15px; letter-spacing: 3px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  color: #241503;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: var(--glow-gold);
  font-weight: 700;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(232, 197, 107, 0.7); }
.btn-ghost {
  color: var(--gold-soft);
  border: 1px solid var(--line-gold);
  background: rgba(232, 197, 107, 0.05);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(232, 197, 107, 0.14); box-shadow: var(--glow-gold); transform: translateY(-2px); }
.btn-link { color: var(--text-dim); font-size: 14px; letter-spacing: 2px; padding: 10px 18px; }
.btn-link:hover { color: var(--gold-soft); }
.btn-danger {
  color: var(--danger);
  border: 1px solid rgba(255, 107, 122, 0.4);
  background: rgba(255, 107, 122, 0.06);
  font-size: 14px; letter-spacing: 2px;
}
.btn-danger:hover { background: rgba(255, 107, 122, 0.14); box-shadow: 0 0 20px rgba(255, 107, 122, 0.35); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- 通用标题 ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: 5px;
  color: var(--gold-soft);
  text-shadow: var(--glow-gold);
}
.section-desc { color: var(--text-dim); font-size: 14px; letter-spacing: 2px; margin-top: 6px; }
.draw-header, .reading-header { text-align: center; margin-bottom: 34px; animation: fadeUp 0.7s ease both; }
.reading-date { color: var(--text-faint); font-size: 13px; letter-spacing: 2px; margin-top: 8px; }

/* ---------- 卡牌基础 ---------- */
.card-layout { min-height: 300px; display: flex; justify-content: center; align-items: center; }
.card-layout.shuffling .tarot-card { animation: shuffleJump 0.22s ease-in-out infinite; }
.card-layout.shuffling .tarot-card:nth-child(2n) { animation-delay: 0.05s; }
.card-layout.shuffling .tarot-card:nth-child(3n) { animation-delay: 0.1s; }
@keyframes shuffleJump {
  0%   { transform: translate(0, 0) rotate(var(--tilt, 0deg)); }
  30%  { transform: translate(6px, -18px) rotate(calc(var(--tilt, 0deg) + 14deg)) scale(1.04); }
  60%  { transform: translate(-5px, 6px) rotate(calc(var(--tilt, 0deg) - 10deg)); }
  100% { transform: translate(0, 0) rotate(var(--tilt, 0deg)); }
}

/* 3D 翻转结构 */
.tarot-card {
  --tilt: 0deg;
  width: clamp(92px, 13vw, 132px);
  aspect-ratio: 300 / 527;
  perspective: 900px;
  cursor: pointer;
  transition: transform 0.3s;
  transform: rotate(var(--tilt));
  animation: dealIn 0.5s ease both;
}
@keyframes dealIn {
  from { opacity: 0; transform: translateY(40px) rotate(var(--tilt, 0deg)) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1); }
}
.tarot-card:hover { transform: rotate(var(--tilt)) translateY(-8px); z-index: 5; }
.tarot-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--dur) cubic-bezier(0.4, 0.1, 0.2, 1);
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow-card);
}
/* 卡背：星月纹样（纯 CSS） */
.tarot-card-back {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(38% 34% at 50% 30%, rgba(232, 197, 107, 0.14), transparent 70%),
    linear-gradient(160deg, #2a1750, #120826 70%);
}
.tarot-card-back::before {
  content: '';
  position: absolute; inset: 7px;
  border-radius: 7px;
  border: 1px solid rgba(232, 197, 107, 0.3);
  background:
    radial-gradient(circle at 50% 32%, rgba(232, 197, 107, 0.95) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 38% 58%, rgba(232, 197, 107, 0.8) 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 62% 66%, rgba(232, 197, 107, 0.8) 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 50% 47%, transparent 0 26px, rgba(232, 197, 107, 0.4) 27px 28.5px, transparent 29.5px);
}
.tarot-card-back::after {
  content: '☽';
  position: absolute;
  font-size: 22px;
  color: var(--gold);
  text-shadow: var(--glow-gold);
  opacity: 0.85;
}
/* 卡面 */
.tarot-card-front { transform: rotateY(180deg); background: var(--bg-card); }
.tarot-card-front img {
  width: 100%; height: 100%;
  object-fit: cover;
  background: #0e0820;
}
.tarot-card-front .is-reversed img { transform: rotate(180deg); }
/* 正逆位角标 */
.orient-badge {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #241503;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: var(--glow-gold);
  font-weight: 700;
}
.orient-badge.reversed { background: linear-gradient(135deg, #c8a6ff, var(--violet)); color: #170a2e; box-shadow: var(--glow-violet); }

/* ---------- 各牌阵布局 ---------- */
.layout-single { justify-content: center; }
.layout-single .tarot-card { width: clamp(150px, 24vw, 210px); }
.layout-row { display: flex; flex-wrap: wrap; gap: clamp(10px, 2vw, 22px); justify-content: center; }
.layout-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 3vw, 30px); max-width: 560px; margin: 0 auto; justify-items: center; }
.layout-triangle { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.layout-triangle .row { display: flex; gap: 22px; }
.layout-hex { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 24px); max-width: 680px; margin: 0 auto; justify-items: center; }
.layout-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); max-width: 820px; margin: 0 auto; justify-items: center; }
.layout-year .tarot-card { width: clamp(72px, 9vw, 108px); }
.layout-celtic { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 36px); justify-content: center; }
.layout-celtic .celtic-cross {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: repeat(3, auto);
  grid-template-areas:
    '. top .'
    'left center right'
    'base . .';
  gap: 14px;
  align-items: center;
  justify-items: center;
  padding: 14px;
}
.layout-celtic .celtic-staff { display: grid; gap: 14px; align-content: center; }
.layout-celtic .slot-area-center { grid-area: center; }
.layout-celtic .slot-area-base { grid-area: base; }
.layout-celtic .slot-area-left { grid-area: left; }
.layout-celtic .slot-area-top { grid-area: top; }
.layout-celtic .slot-area-right { grid-area: right; }
/* 第 2 张“挑战”旋转 90° 覆盖在中心之上 */
.layout-celtic .slot-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
}
.layout-celtic .slot-overlay .tarot-card { transform: rotate(90deg); }

/* 卡位标签 */
.card-slot { position: relative; text-align: center; }
.card-slot .pos-label {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-dim);
  min-height: 18px;
}
.card-slot .pos-index {
  position: absolute;
  top: -8px; left: -8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #241503;
  background: var(--gold);
  box-shadow: var(--glow-gold);
  z-index: 6;
}

/* ---------- 解读结果 ---------- */
.reading-cards { display: grid; gap: 20px; margin-bottom: 36px; }
.reading-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid rgba(139, 108, 240, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  animation: fadeUp 0.6s ease both;
}
.reading-item img { width: 88px; border-radius: 10px; border: 1px solid var(--line-gold); box-shadow: var(--shadow-card); }
.reading-item img.is-reversed { transform: rotate(180deg); }
.reading-body { min-width: 0; }
.reading-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.reading-head .r-name { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; color: var(--gold-soft); }
.reading-head .r-en { font-size: 12px; color: var(--text-faint); letter-spacing: 1px; }
.reading-head .r-pos { font-size: 12px; color: var(--violet-soft); border: 1px solid rgba(139, 108, 240, 0.4); border-radius: 999px; padding: 1px 10px; }
.reading-head .r-orient { font-size: 12px; font-weight: 700; }
.r-orient.upright { color: var(--gold); }
.r-orient.reversed { color: var(--violet-soft); }
.reading-body p { font-size: 14px; color: var(--text-dim); margin-top: 6px; }
.reading-body .r-meaning { color: var(--text); }
.reading-body .r-meaning .lbl { color: var(--gold); font-weight: 700; margin-right: 4px; }
.reading-body .r-upright .lbl { color: var(--gold); font-weight: 700; margin-right: 4px; }
.reading-body .r-reversed .lbl { color: var(--violet-soft); font-weight: 700; margin-right: 4px; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 2, 12, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-panel {
  position: relative;
  width: min(680px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 34px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 80% 0%, rgba(139, 108, 240, 0.14), transparent 70%),
    var(--bg-panel);
  border: 1px solid var(--line-gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow-gold);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s;
}
.modal.open .modal-panel { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  color: var(--text-dim);
  font-size: 14px;
  transition: all 0.25s;
}
.modal-close:hover { color: var(--gold-soft); border-color: var(--gold); box-shadow: var(--glow-gold); }
.modal-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 4px; color: var(--gold-soft); margin-bottom: 14px; text-align: center; }
.modal-desc { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

/* 牌阵列表 */
.spread-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.spread-item {
  padding: 18px 12px;
  border-radius: var(--radius);
  text-align: center;
  background: rgba(139, 108, 240, 0.06);
  border: 1px solid rgba(139, 108, 240, 0.25);
  transition: all 0.3s;
}
.spread-item:hover { border-color: var(--gold); box-shadow: var(--glow-gold); transform: translateY(-3px); }
.spread-item .s-name { font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; color: var(--gold-soft); }
.spread-item .s-count { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--text-dim); border: 1px solid var(--line-gold); border-radius: 999px; padding: 1px 10px; }

/* 预览布局（缩小版） */
.preview-layout { min-height: 210px; display: flex; justify-content: center; align-items: center; margin-bottom: 22px; }
.preview-card {
  width: 64px; aspect-ratio: 300 / 527;
  border-radius: 8px;
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(50% 42% at 50% 30%, rgba(232, 197, 107, 0.14), transparent 70%),
    linear-gradient(160deg, #2a1750, #120826);
  box-shadow: var(--shadow-card);
  position: relative;
}
.preview-card::before {
  content: '';
  position: absolute; inset: 5px;
  border-radius: 5px;
  border: 1px solid rgba(232, 197, 107, 0.3);
  background: radial-gradient(circle at 50% 45%, transparent 0 16px, rgba(232, 197, 107, 0.4) 17px 18px, transparent 19px);
}
.preview-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.preview-slot .pv-label { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

/* 历史记录 */
.history-list { display: grid; gap: 10px; margin-bottom: 18px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(139, 108, 240, 0.06);
  border: 1px solid rgba(139, 108, 240, 0.22);
  transition: all 0.25s;
  text-align: left;
  width: 100%;
}
.history-item:hover { border-color: var(--gold); box-shadow: var(--glow-gold); }
.history-item .h-main { min-width: 0; }
.history-item .h-title { font-size: 15px; color: var(--gold-soft); letter-spacing: 1px; }
.history-item .h-meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.history-item .h-del { color: var(--danger); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.history-item .h-del:hover { background: rgba(255, 107, 122, 0.12); }
.history-empty { text-align: center; color: var(--text-faint); padding: 30px 0; letter-spacing: 2px; }
.modal-footer { border-top: 1px solid rgba(232, 197, 107, 0.15); padding-top: 16px; }

/* 详情内容 */
.detail-content .reading-item { margin-bottom: 14px; }
.detail-head { text-align: center; margin-bottom: 16px; }
.detail-head .d-title { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: 3px; font-size: 20px; }
.detail-head .d-date { color: var(--text-faint); font-size: 12px; margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 12px 26px;
  border-radius: 999px;
  background: rgba(26, 15, 51, 0.94);
  border: 1px solid var(--line-gold);
  color: var(--gold-soft);
  font-size: 14px; letter-spacing: 1px;
  box-shadow: var(--glow-gold);
  opacity: 0; visibility: hidden;
  transition: all 0.35s;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚与免责声明 ---------- */
.site-footer {
  position: relative; z-index: 10;
  text-align: center;
  padding: 30px 16px 34px;
  border-top: 1px solid rgba(232, 197, 107, 0.14);
}
.disclaimer {
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 1px;
  max-width: 640px;
  margin: 0 auto 8px;
}
.copy { color: rgba(240, 233, 255, 0.25); font-size: 11px; letter-spacing: 1px; }

/* ---------- 动画工具 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------- 响应式：平板与手机 ---------- */
@media (max-width: 768px) {
  .layout-year { grid-template-columns: repeat(3, 1fr); }
  .layout-hex { grid-template-columns: repeat(2, 1fr); }
  .reading-item { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .reading-head { justify-content: center; }
  .layout-celtic { flex-direction: column; align-items: center; }
  .layout-celtic .celtic-staff { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: min(280px, 86vw); }
  .btn { width: 100%; }
  .site-header { padding: 14px 16px; }
  .nav-link { padding: 6px 12px; font-size: 12px; }
  .layout-grid2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .layout-triangle .row { gap: 14px; }
  .layout-year { grid-template-columns: repeat(3, 1fr); }
  .layout-single .tarot-card { width: 170px; }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
