/* ============================================================
   塔罗之镜 · Tarot Mirror · 全局样式
   主题：神秘星空 / 深蓝紫 × 鎏金 · 新艺术运动气质
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg-deep: #0A0D1C;
  --bg: #0F1328;
  --bg-soft: #161B38;
  --bg-elev: #1D2347;
  --bg-hover: #242B55;
  --gold: #D4AF5F;
  --gold-bright: #F0D58C;
  --gold-dim: #9C7F3E;
  --amethyst: #A78BFA;
  --amethyst-dim: #6E5BB3;
  --text: #ECE9F5;
  --text-dim: #9AA0BF;
  --text-faint: #6E7394;
  --line: rgba(212, 175, 95, 0.16);
  --line-soft: rgba(158, 165, 215, 0.12);
  --danger: #E07B7B;
  --ok: #7BC49A;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.30);
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --nav-h: 64px;
  --maxw: 1200px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(120, 90, 220, 0.16), transparent 60%),
    radial-gradient(900px 500px at 8% 10%, rgba(212, 175, 95, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 星尘背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, rgba(255,255,255,0.5), transparent 100%),
    radial-gradient(1px 1px at 32% 68%, rgba(255,255,255,0.4), transparent 100%),
    radial-gradient(1.4px 1.4px at 48% 12%, rgba(240,213,140,0.55), transparent 100%),
    radial-gradient(1px 1px at 63% 42%, rgba(255,255,255,0.35), transparent 100%),
    radial-gradient(1.2px 1.2px at 77% 78%, rgba(240,213,140,0.4), transparent 100%),
    radial-gradient(1px 1px at 88% 30%, rgba(255,255,255,0.45), transparent 100%),
    radial-gradient(1.3px 1.3px at 22% 88%, rgba(255,255,255,0.3), transparent 100%),
    radial-gradient(1px 1px at 93% 60%, rgba(255,255,255,0.35), transparent 100%);
}
::selection { background: rgba(212, 175, 95, 0.35); }
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.35; }
p { margin: 0 0 0.8em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(12, 15, 30, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand .brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  background: radial-gradient(circle at 35% 30%, rgba(212,175,95,0.25), rgba(20,24,52,0.6));
}
.brand small { font-family: var(--font-body); font-size: 11px; letter-spacing: 3px; color: var(--text-dim); display: block; line-height: 1.2; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--gold-bright); background: rgba(212,175,95,0.08); }
.nav-links a.active { color: var(--gold-bright); background: rgba(212,175,95,0.12); }
.nav-cta {
  color: var(--gold-bright) !important;
  border: 1px solid var(--gold);
}
.nav-cta:hover { background: rgba(212,175,95,0.14) !important; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; padding: 6px 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, var(--gold-dim));
  color: #1B1430;
  box-shadow: 0 6px 18px rgba(212, 175, 95, 0.28);
}
.btn-gold:hover { box-shadow: 0 8px 24px rgba(212, 175, 95, 0.42); filter: brightness(1.05); }
.btn-ghost { border-color: var(--line); background: rgba(255,255,255,0.03); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(212,175,95,0.07); }
.btn-purple { background: linear-gradient(135deg, var(--amethyst), var(--amethyst-dim)); color: #140F2E; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- 章节 ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eyebrow {
  font-size: 12.5px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: var(--font-body);
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 12px; }
.section-head p { color: var(--text-dim); font-size: 15.5px; }
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold);
  margin: 26px 0;
}
.divider::before, .divider::after { content: ""; height: 1px; width: 90px; background: linear-gradient(90deg, transparent, var(--gold-dim)); }
.divider::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero.jpg");
  background-size: cover;
  background-position: center 42%;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 28, 0.92) 0%, rgba(10, 13, 28, 0.55) 55%, rgba(10, 13, 28, 0.25) 100%),
    linear-gradient(0deg, var(--bg-deep) 0%, transparent 38%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; padding: 90px 0 70px; }
.hero-content h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.22;
  margin-bottom: 18px;
  letter-spacing: 3px;
}
.hero-content h1 .gold-text {
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-content .sub { color: #C7CBE2; font-size: 16.5px; max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 42px;
  flex-wrap: wrap;
}
.hero-stats .stat b { font-family: var(--font-display); font-size: 26px; color: var(--gold-bright); display: block; }
.hero-stats .stat span { font-size: 12.5px; color: var(--text-dim); letter-spacing: 2px; }

/* ---------- 特性卡片 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: linear-gradient(160deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,95,0.12), transparent 70%);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-soft); }
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--gold-bright);
  background: rgba(212, 175, 95, 0.1);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.feature-card p { font-size: 13.8px; color: var(--text-dim); margin: 0; }

/* ---------- 牌卡网格（图鉴 / 抽牌结果） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.tarot-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  aspect-ratio: 2 / 3;
}
.tarot-card:hover { transform: translateY(-5px) scale(1.02); border-color: var(--gold); box-shadow: var(--shadow); }
.tarot-card img { width: 100%; height: 100%; object-fit: cover; }
.tarot-card .card-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 10px;
  background: linear-gradient(0deg, rgba(8, 10, 22, 0.92) 0%, transparent 100%);
  font-family: var(--font-display);
  font-size: 14.5px;
  text-align: center;
  color: var(--gold-bright);
  letter-spacing: 1px;
}
.tarot-card .card-cap small { display: block; font-family: var(--font-body); font-size: 10.5px; color: var(--text-faint); letter-spacing: 1px; margin-top: 2px; }
.tarot-card.minor-card img { object-fit: cover; }
.minor-badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(10, 13, 28, 0.7);
  border: 1px solid var(--line);
  color: var(--gold-bright);
}
.tarot-card .orientation-tag {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.orientation-tag.upright { background: rgba(123, 196, 154, 0.18); color: var(--ok); border: 1px solid rgba(123,196,154,0.35); }
.orientation-tag.reversed { background: rgba(224, 123, 123, 0.16); color: var(--danger); border: 1px solid rgba(224,123,123,0.35); }

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
}
.chip {
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.03);
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { color: var(--gold-bright); border-color: var(--line); }
.chip.active { background: rgba(212,175,95,0.16); border-color: var(--gold); color: var(--gold-bright); }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  padding: 6px 16px;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-box input {
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  width: 100%;
  font-size: 14px;
  font-family: var(--font-body);
}
.search-box svg { color: var(--text-faint); flex-shrink: 0; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 8, 18, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: linear-gradient(170deg, var(--bg-elev), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  position: relative;
  animation: modalIn 0.28s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10,13,28,0.6);
  color: var(--text-dim);
  font-size: 17px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.18s;
}
.modal-close:hover { color: var(--gold-bright); border-color: var(--gold); }
.modal-body { display: grid; grid-template-columns: 280px 1fr; gap: 0; }
.modal-card-img { position: relative; }
.modal-card-img img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }
.modal-card-img.minor img { object-fit: cover; }
.modal-info { padding: 28px 30px; }
.modal-info .m-eyebrow { color: var(--gold); font-size: 12px; letter-spacing: 3px; margin-bottom: 6px; }
.modal-info h3 { font-size: 28px; margin-bottom: 2px; }
.modal-info .m-en { color: var(--text-faint); font-size: 13.5px; margin-bottom: 14px; letter-spacing: 1px; }
.m-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.m-tags span { font-size: 12.5px; padding: 3px 12px; border-radius: 20px; background: rgba(167,139,250,0.12); color: var(--amethyst); border: 1px solid rgba(167,139,250,0.25); }
.m-block { margin-bottom: 16px; }
.m-block h4 { font-size: 14px; color: var(--gold-bright); margin-bottom: 6px; letter-spacing: 1px; }
.m-block p { font-size: 14px; color: var(--text-dim); margin: 0; line-height: 1.8; }

/* ---------- 读取流程 ---------- */
.reading-wrap { max-width: 900px; margin: 0 auto; }
.step-card {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 22px;
}
.step-card h3 { font-size: 19px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 15px;
  flex-shrink: 0;
}
.field-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; letter-spacing: 1px; }
.text-input, .select-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  outline: 0;
  transition: border-color 0.2s;
}
.text-input:focus, .select-input:focus { border-color: var(--gold); }
textarea.text-input { min-height: 92px; resize: vertical; }
.spread-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spread-option {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
  background: rgba(255,255,255,0.02);
}
.spread-option:hover { border-color: var(--line); }
.spread-option.active { border-color: var(--gold); background: rgba(212,175,95,0.09); }
.spread-option b { display: block; font-family: var(--font-display); font-size: 15.5px; color: var(--gold-bright); margin-bottom: 4px; }
.spread-option span { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; display: block; }
.spread-option .pos-count { font-size: 11px; color: var(--text-faint); }

/* 洗牌区 */
.shuffle-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 0;
}
.deck-stack {
  position: relative;
  width: 150px;
  height: 210px;
}
.deck-stack .d-card {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background-image: url("../img/back.jpg");
  background-size: cover;
  border: 1px solid rgba(212,175,95,0.35);
  box-shadow: var(--shadow-soft);
  will-change: transform;
}
.deck-stack.shuffling .d-card { animation: cardSlide 0.5s ease-in-out infinite alternate; }
@keyframes cardSlide {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(14px) rotate(3deg); }
}
.deck-stack.shuffling .d-card:nth-child(1) { animation-delay: 0s; }
.deck-stack.shuffling .d-card:nth-child(2) { animation-delay: 0.08s; }
.deck-stack.shuffling .d-card:nth-child(3) { animation-delay: 0.16s; }
.deck-stack.shuffling .d-card:nth-child(4) { animation-delay: 0.24s; }

/* 翻牌区 */
.deal-zone { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 8px 0 18px; }
.deal-slot { width: 128px; text-align: center; }
.deal-slot .slot-label { font-size: 12px; color: var(--text-dim); margin-top: 8px; letter-spacing: 1px; }
.deal-card {
  position: relative;
  width: 128px;
  height: 186px;
  border-radius: 10px;
  perspective: 900px;
  cursor: pointer;
}
.deal-card .face, .deal-card .backf {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.65s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.deal-card .backf {
  background-image: url("../img/back.jpg");
  background-size: cover;
  border: 1px solid rgba(212,175,95,0.4);
  transform: rotateY(0deg);
}
.deal-card .face {
  transform: rotateY(180deg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.deal-card .face img { width: 100%; height: 100%; object-fit: cover; }
.deal-card.flipped .backf { transform: rotateY(180deg); }
.deal-card.flipped .face { transform: rotateY(360deg); }
.deal-card.flipped.reversed .face img { transform: rotate(180deg); }
.deal-card .f-orient {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-size: 10.5px;
  padding: 3px;
  background: rgba(8,10,22,0.82);
  color: var(--gold-bright);
  letter-spacing: 2px;
}

/* 解读结果 */
.result-panel {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  margin-top: 26px;
  display: none;
}
.result-panel.show { display: block; animation: modalIn 0.4s ease; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.result-head h3 { font-size: 21px; color: var(--gold-bright); }
.energy-tag { font-size: 14px; padding: 5px 16px; border-radius: 30px; border: 1px solid var(--gold); color: var(--gold-bright); background: rgba(212,175,95,0.1); letter-spacing: 3px; }
.result-meta { font-size: 12px; color: var(--text-faint); margin-bottom: 18px; line-height: 2; }
.result-meta b { color: var(--text-dim); font-weight: 500; }
.result-section { margin-bottom: 20px; }
.result-section h4 {
  font-size: 14.5px;
  color: var(--gold-bright);
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-section h4::before { content: ""; width: 16px; height: 1px; background: var(--gold-dim); }
.result-section p { font-size: 14.5px; color: #D5D9EC; }
.card-reading-item {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
}
.card-reading-item .cri-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.card-reading-item .cri-pos { font-size: 12px; color: var(--amethyst); letter-spacing: 1px; }
.card-reading-item .cri-name { font-family: var(--font-display); font-size: 17px; color: var(--gold-bright); }
.card-reading-item .cri-key { font-size: 12.5px; color: var(--text-dim); }
.card-reading-item .cri-body { font-size: 14px; color: #D5D9EC; margin-top: 6px; }
.rel-item {
  border-left: 2px solid var(--gold-dim);
  padding: 6px 0 6px 14px;
  font-size: 13.8px;
  color: #C9CDE4;
  margin-bottom: 8px;
}
.disclaimer {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167,139,250,0.2);
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ---------- 学习页 ---------- */
.timeline { max-width: 760px; margin: 0 auto; }
.tl-row { display: grid; grid-template-columns: 96px 44px 1fr; gap: 0; padding-bottom: 34px; }
.tl-row .tl-time { text-align: right; font-family: var(--font-display); color: var(--gold-bright); font-size: 15px; padding-right: 18px; padding-top: 2px; }
.tl-row .tl-axis { position: relative; display: flex; justify-content: center; }
.tl-row .tl-axis::before { content: ""; position: absolute; top: 0; bottom: -34px; width: 1px; background: linear-gradient(var(--gold-dim), rgba(212,175,95,0.1)); }
.tl-row:last-child .tl-axis::before { bottom: 0; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); align-self: flex-start; margin-top: 6px; position: relative; z-index: 1; }
.tl-body { padding-left: 20px; }
.tl-body h4 { font-size: 16.5px; margin-bottom: 4px; }
.tl-body p { font-size: 13.8px; color: var(--text-dim); margin: 0; }
.knowledge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.knowledge-card {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
}
.knowledge-card h3 { font-size: 18px; color: var(--gold-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.knowledge-card p, .knowledge-card li { font-size: 14px; color: var(--text-dim); }
.knowledge-card ul { list-style: none; }
.knowledge-card li { padding: 5px 0 5px 18px; position: relative; }
.knowledge-card li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 11px; top: 8px; }
.suit-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.suit-block {
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 14px;
  background: rgba(255,255,255,0.02);
}
.suit-block img { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 12px; border: 1px solid var(--line); }
.suit-block h4 { font-size: 16px; color: var(--gold-bright); margin-bottom: 4px; }
.suit-block .suit-el { font-size: 12px; color: var(--amethyst); margin-bottom: 8px; letter-spacing: 2px; }
.suit-block p { font-size: 12.8px; color: var(--text-dim); margin: 0; }
.num-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.num-cell { text-align: center; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 6px; }
.num-cell b { font-family: var(--font-display); font-size: 18px; color: var(--gold-bright); display: block; }
.num-cell span { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; display: block; margin-top: 4px; }

/* ---------- 牌阵展示 ---------- */
.spread-card {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}
.spread-card h3 { font-size: 19px; color: var(--gold-bright); margin-bottom: 6px; }
.spread-card .sc-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.spread-layout {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}
.spread-svg-wrap { flex: 1; min-width: 260px; }
.spread-svg-wrap svg { width: 100%; height: auto; }
.spread-pos-list { flex: 1; min-width: 240px; }
.spread-pos-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-dim); padding: 5px 0; list-style: none; }
.spread-pos-list .sp-num { color: var(--gold-bright); font-family: var(--font-display); flex-shrink: 0; }

/* ---------- 日记页 ---------- */
.journal-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px;
}
.stat-card b { font-family: var(--font-display); font-size: 26px; color: var(--gold-bright); display: block; }
.stat-card span { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }
.chart-box { background: linear-gradient(165deg, var(--bg-soft), var(--bg)); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px; }
.chart-box h4 { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; letter-spacing: 1px; }
.chart-canvas { width: 100%; height: 240px; }
.journal-list { display: flex; flex-direction: column; gap: 12px; }
.journal-item {
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.journal-item:hover { border-color: var(--line); }
.journal-item .ji-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.journal-item .ji-q { font-family: var(--font-display); font-size: 16px; color: var(--gold-bright); }
.journal-item .ji-date { font-size: 12px; color: var(--text-faint); }
.journal-item .ji-cards { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.ji-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 3px 12px 3px 4px;
}
.ji-mini .mini-thumb { width: 26px; height: 36px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background-size: cover; }
.ji-mini.rev { color: var(--danger); }
.journal-item .ji-sum { font-size: 13px; color: var(--text-dim); }
.journal-item .ji-actions { display: flex; gap: 8px; margin-top: 10px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-faint); }
.empty-state .es-icon { font-size: 40px; margin-bottom: 14px; color: var(--gold-dim); }
.empty-state p { font-size: 14px; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line-soft);
  background: rgba(8, 10, 20, 0.6);
  padding: 44px 0 30px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand h4 { font-family: var(--font-display); letter-spacing: 2px; color: var(--gold-bright); margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links .fl-col b { display: block; font-size: 13px; color: var(--text-dim); letter-spacing: 1px; margin-bottom: 10px; font-weight: 500; }
.footer-links .fl-col a { display: block; font-size: 13.5px; color: var(--text-faint); padding: 3px 0; }
.footer-links .fl-col a:hover { color: var(--gold-bright); }
.footer-bottom { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 30px; border-top: 1px solid var(--line-soft); padding-top: 18px; }

/* ---------- 小阿卡纳合成牌面 ---------- */
.minor-face {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.minor-face .mf-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(10, 13, 28, 0.06) 0%, rgba(10, 13, 28, 0.62) 100%);
}
.minor-face .mf-rank {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 46px;
  color: var(--gold-bright);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}
.minor-face .mf-suit {
  position: relative;
  z-index: 1;
  font-size: 15px;
  letter-spacing: 6px;
  color: var(--text);
  background: rgba(10, 13, 28, 0.55);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 14px 2px 20px;
}
.minor-face.big .mf-rank { font-size: 76px; }
.minor-face.big .mf-suit { font-size: 19px; padding: 4px 20px 4px 26px; }

/* ---------- 每日一牌 ---------- */
.daily-wrap {
  display: flex;
  gap: 28px;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.daily-card {
  width: 170px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.daily-card:hover { transform: scale(1.03); }
.daily-card img { width: 100%; height: 100%; object-fit: cover; }
.daily-info { flex: 1; }
.daily-info h3 { font-size: 24px; margin-bottom: 8px; }
.daily-orient {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ok);
  border: 1px solid rgba(123,196,154,0.4);
  border-radius: 20px;
  padding: 2px 12px;
  margin-left: 10px;
  vertical-align: middle;
  letter-spacing: 1px;
}
.daily-info p { font-size: 14px; }
.btn-loading { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- 组合列表 ---------- */
.combo-list li {
  list-style: none;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.combo-list li b { color: var(--gold-bright); font-weight: 500; }

/* ---------- 工具类 ---------- */
.muted { color: var(--text-dim); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.hidden { display: none !important; }
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 22px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .journal-layout { grid-template-columns: 1fr; }
  .spread-select-grid { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 220px 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 13, 28, 0.97);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 18px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .section { padding: 44px 0; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .deal-zone { gap: 10px; }
  .deal-slot, .deal-card { width: 102px; }
  .deal-card { height: 148px; }
  .hero { min-height: 72vh; }
  .hero-stats { gap: 22px; }
  .spread-select-grid { grid-template-columns: 1fr; }
  .suit-row { grid-template-columns: repeat(2, 1fr); }
  .num-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-body { grid-template-columns: 1fr; }
  .modal-card-img img { min-height: 0; max-height: 380px; }
  .tl-row { grid-template-columns: 68px 30px 1fr; }
  .spread-layout { flex-direction: column; align-items: stretch; }
  .footer-inner { flex-direction: column; }
  .result-panel { padding: 20px; }
  .step-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
