/* =========================================================
   Kailoora 快乐星球 · V5 Design System
   清新简约 · 浅色优先，暗色模式作为备选
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --bg-page: #FFFFFF;
  --bg-section: #F7F8FB;
  --card-bg: #FFFFFF;

  --text-primary: #1F2430;
  --text-secondary: #5B6172;
  --text-muted: #9AA3B2;

  --border-subtle: #E8EBF0;

  --brand-primary: #5B5BD6;
  --brand-primary-strong: #4B4BC4;
  --brand-soft: #ECECFF;

  --accent-sky: #7FB4E8;
  --accent-pink: #FFB2C1;
  --accent-mint: #A8E0BE;
  --accent-lavender: #C9B8F0;

  /* 分类标签（语录） */
  --tag-heal-bg: #D8F4E3;
  --tag-heal-fg: #1F8A4D;
  --tag-motiv-bg: #D8EAF5;
  --tag-motiv-fg: #2D76C7;
  --tag-love-bg: #FCE2E9;
  --tag-love-fg: #C7385C;
  --tag-think-bg: #EAE2F5;
  --tag-think-fg: #6B4AB0;

  --success: #10B981;
  --warning: #F59E0B;

  --footer-bg: #15182A;
  --footer-fg: #9AA3B2;
  --footer-fg-strong: #C9CEDB;

  --radius-card: 16px;
  --radius-button: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
  --shadow-card-hover: 0 2px 6px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .08);

  --header-h: 72px;
  --max-w: 1440px;
}

[data-theme="dark"] {
  --bg-page: #0E1018;
  --bg-section: #15212F;
  --card-bg: #18222F;

  --text-primary: #F2F5F8;
  --text-secondary: #B8C0CE;
  --text-muted: #7A8494;

  --border-subtle: #243042;

  --brand-primary: #8B8BFF;
  --brand-primary-strong: #7A7AFF;
  --brand-soft: #232A45;

  --tag-heal-bg: #16331F; --tag-heal-fg: #6FE39B;
  --tag-motiv-bg: #15293F; --tag-motiv-fg: #7FB4E8;
  --tag-love-bg: #3A1B27; --tag-love-fg: #FF9DB1;
  --tag-think-bg: #2A2140; --tag-think-fg: #C9B8F0;

  --footer-bg: #0B0D14;
  --footer-fg: #7A8494;
  --footer-fg-strong: #C9CEDB;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-strong); box-shadow: 0 8px 20px rgba(91, 91, 214, .25); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.btn-ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Badge / Pill ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-page) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--brand-primary); letter-spacing: .2px; }
.brand-cn { font-size: 13px; color: var(--text-muted); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  padding: 6px 2px;
  position: relative;
  transition: color .2s ease;
}
.nav a:hover { color: var(--text-primary); }
.nav a.active { color: var(--brand-primary); font-weight: 600; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-primary);
}

.header-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-button);
  background: transparent;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text-primary); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text-primary);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-section);
  padding: 80px 0 64px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  font-weight: 700;
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--text-primary);
}
.hero p.sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.hero-glow {
  position: absolute; z-index: 1; border-radius: 50%;
  filter: blur(60px); opacity: .5; pointer-events: none;
}
.hero-planet {
  width: 220px; height: 220px; margin: 8px auto 0;
}

/* ---------- Section ---------- */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.section-title { font-size: 22px; font-weight: 700; margin: 0; color: var(--text-primary); }
.section-meta { font-size: 13px; color: var(--text-muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

/* Module entry cards */
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.module-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.module-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
}
.module-card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.module-card p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.module-card .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--brand-primary); }

/* Quote cards */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.quote-tag {
  align-self: flex-start;
  font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.tag-heal { background: var(--tag-heal-bg); color: var(--tag-heal-fg); }
.tag-motiv { background: var(--tag-motiv-bg); color: var(--tag-motiv-fg); }
.tag-love { background: var(--tag-love-bg); color: var(--tag-love-fg); }
.tag-think { background: var(--tag-think-bg); color: var(--tag-think-fg); }
.quote-text { font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--text-primary); margin: 0; }
.quote-author { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Quote favorite toggle */
.quote-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quote-fav {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border-subtle); background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.quote-fav:hover { transform: scale(1.08); border-color: var(--brand-primary); }
.quote-fav svg { width: 18px; height: 18px; display: block; }
.quote-fav svg path { fill: #C7CAD1; transition: fill .15s ease; }
.quote-fav.active { border-color: #FF6B8A; background: rgba(255, 107, 138, .08); }
.quote-fav.active svg path { fill: #FF6B8A; }

/* Game cards */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.game-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.game-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
}

/* Zodiac grid */
.zodiac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.zodiac-card {
  position: relative;
  padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.zodiac-card.highlight { border-color: var(--brand-primary); box-shadow: 0 0 0 2px var(--brand-primary); }
.zodiac-star { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; }
.zodiac-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.zodiac-card .z-meta { margin: 0; font-size: 12px; color: var(--text-muted); }

/* 我的星座标记 */
.zodiac-card.is-mine { border-color: var(--accent-pink); box-shadow: 0 0 0 2px var(--accent-pink); }
.mine-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: var(--accent-pink); padding: 3px 8px; border-radius: var(--radius-pill);
}
.zodiac-detail-action { margin-top: 20px; }
.btn-block { width: 100%; }

/* Today explore (home) */
.today-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.today-quote { padding: 28px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.today-quote .quote-text { font-size: 20px; }
.today-zodiac { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.zodiac-mini { display: flex; align-items: center; gap: 14px; }
.zodiac-mini .zodiac-star { width: 56px; height: 56px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: var(--radius-pill);
}
.chip-brand { background: var(--brand-soft); color: var(--brand-primary); }
.chip-pink { background: var(--tag-love-bg); color: var(--tag-love-fg); }
.chip-muted { background: var(--bg-section); color: var(--text-muted); border: 1px dashed var(--border-subtle); }

/* My planet preview / profile card */
.profile-card {
  display: flex; align-items: center; gap: 24px;
  padding: 32px; flex-wrap: wrap;
}
.avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; flex: none;
}
.profile-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
.profile-info .name { font-size: 22px; font-weight: 700; margin: 0; }
.profile-info .bio { font-size: 14px; color: var(--text-secondary); margin: 0; }
.name-input {
  font-size: 22px; font-weight: 700; margin: 0; color: var(--text-primary);
  border: none; border-bottom: 1px dashed transparent; background: transparent;
  padding: 2px 0; width: 100%; max-width: 260px; font-family: inherit;
}
.name-input::placeholder { color: var(--text-muted); font-weight: 500; }
.name-input:focus { outline: none; border-bottom-color: var(--brand-primary); }
.name-input-sm { font-size: 18px; max-width: 200px; }
.progress-wrap { margin-top: 6px; }
.progress-track { height: 8px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--brand-primary); }
.progress-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.profile-stats { display: flex; gap: 28px; }
.stat { text-align: center; }
.stat .num { font-size: 24px; font-weight: 700; display: block; }
.stat .label { font-size: 12px; color: var(--text-muted); }

/* MBTI test */
.mbti-wrap { max-width: 720px; margin: 0 auto; }
.progress-line { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.progress-line .track { flex: 1; height: 8px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; }
.progress-line .fill { height: 100%; background: var(--brand-primary); border-radius: 999px; }
.progress-line .pct { font-size: 14px; font-weight: 600; color: var(--brand-primary); white-space: nowrap; }
.question-card { padding: 32px; }
.question-dim { font-size: 13px; font-weight: 600; color: var(--brand-primary); }
.question-title { font-size: 22px; font-weight: 700; margin: 8px 0 24px; }
.option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--border-subtle);
  border-radius: 12px; cursor: pointer; margin-bottom: 12px;
  transition: border-color .2s ease, background-color .2s ease;
}
.option:hover { border-color: var(--brand-primary); }
.option .letter {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: var(--brand-soft); color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.option .opt-text { font-size: 15px; }
.question-nav { display: flex; justify-content: space-between; margin-top: 20px; }
.question-hint { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 12px; }

/* MBTI result dims */
.dim-row { display: flex; flex-direction: column; gap: 8px; }
.dim-label { display: flex; justify-content: space-between; font-size: 13px; }
.dim-label .l { color: var(--text-muted); font-weight: 500; }
.dim-label .r { color: var(--brand-primary); font-weight: 600; }
.dim-track { height: 8px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; }
.dim-fill { height: 100%; background: var(--brand-primary); border-radius: 999px; }

/* MBTI 选项选中态 */
.option.selected { border-color: var(--brand-primary); background: var(--brand-soft); }
.option.selected .letter { background: var(--brand-primary); color: #fff; }

/* ---------- Modal 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(15, 18, 30, .55);
  backdrop-filter: saturate(120%) blur(4px);
  -webkit-backdrop-filter: saturate(120%) blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 92vh; overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  padding: 22px 22px 18px;
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
}
.modal.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-subtle); background: transparent;
  color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, color .2s ease;
}
.modal-close:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.zodiac-detail-head { display: flex; align-items: center; gap: 16px; }
.zodiac-detail-head .zodiac-star { flex: none; }
.zrow { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-subtle); }
.zrow:first-of-type { border-top: none; }
.zl { flex: none; width: 84px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.zv { flex: 1; font-size: 14px; color: var(--text-primary); line-height: 1.6; }

/* Saved quotes mini（我的星球：可点击跳回语录页 + 取消收藏小叉） */
.saved-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mini-quote { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 42px 18px 18px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-subtle); cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.mini-quote:hover { border-color: var(--brand-primary); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91,91,214,.12); }
.mini-quote:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.mini-heart { color: #FF6B8A; flex: none; display: inline-flex; }
.mini-quote-body { flex: 1; min-width: 0; }
.mini-quote .q { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.mini-quote .a { font-size: 12px; color: var(--text-muted); margin: 0; }
.saved-remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: none; background: rgba(125,125,125,.10); color: var(--text-muted); border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.saved-remove:hover { background: #FF6B8A; color: #fff; }

.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 40px 0; margin-top: 24px; }
.site-footer .container { display: flex; flex-direction: column; gap: 20px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 700; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--footer-fg-strong); font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-divider { height: 1px; background: rgba(255, 255, 255, .1); }
.footer-copy { font-size: 13px; color: var(--footer-fg); }

/* ---------- 今日探索 4 块（首页，按 MBTI + 星座个性化） ---------- */
.today-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.td-block { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 168px; }
.td-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.td-lbl { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.td-brand { color: var(--brand-primary); }
.td-pink { color: var(--tag-love-fg); }
.td-sky { color: var(--accent-sky); }
.td-lav { color: var(--accent-lavender); }
.td-swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 3px var(--border-subtle); }
.td-val { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.td-desc { font-size: 13px; color: var(--text-secondary); margin-top: auto; }
.td-block { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.td-block:hover, .td-block:focus-visible { transform: translateY(-3px); border-color: var(--brand-primary); box-shadow: 0 10px 26px rgba(91,91,214,.16); outline: none; }
.td-go { font-size: 13px; font-weight: 600; color: var(--brand-primary); display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.td-go svg { width: 14px; height: 14px; }

/* ---------- 探索里程碑（我的星球） ---------- */
.explore-card { padding: 32px; }
.unlock-list { display: flex; flex-direction: column; gap: 10px; }
.unlock-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-section); }
.unlock-item .ut { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.unlock-item.done .ut { background: var(--success); color: #fff; }
.unlock-item.todo .ut { background: var(--border-subtle); color: var(--text-muted); }
.unlock-item .ul { font-size: 14px; color: var(--text-secondary); }
.unlock-item.done .ul { color: var(--text-primary); font-weight: 600; }

/* ---------- 探索进度 Toast ---------- */
.explore-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 120; display: flex; align-items: center; gap: 10px;
  background: var(--brand-primary); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card-hover);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.explore-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.explore-toast .eto-ico { width: 18px; height: 18px; display: inline-flex; }
.explore-toast .eto-txt { font-size: 14px; font-weight: 600; }

/* ---------- 游戏分组 ---------- */
.game-group { margin-bottom: 32px; }
.game-group:last-child { margin-bottom: 0; }
.game-group-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--text-primary); }
.game-group:last-child .game-grid { grid-template-columns: repeat(4, 1fr); }
.game-card { cursor: pointer; }
.game-start { align-self: flex-start; margin-top: auto; }
.game-card:hover .game-start { background: var(--brand-primary-strong); }

/* ---------- 游戏面板（弹窗） ---------- */
.game-box { max-width: 520px; }
.game-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; padding-right: 36px; }
.game-stage { display: flex; flex-direction: column; gap: 14px; }
.game-loading, .game-msg { font-size: 14px; line-height: 1.5; color: var(--text-secondary); text-align: center; margin: 0; }
.game-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.game-actions .btn:disabled { opacity: .5; cursor: not-allowed; }

/* 今天吃什么 */
.eat-result { min-height: 96px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--brand-soft); padding: 20px; }
.eat-placeholder { font-size: 28px; font-weight: 800; color: var(--text-muted); letter-spacing: 4px; }
.eat-food { font-size: 28px; font-weight: 800; color: var(--brand-primary); text-align: center; }
.eat-result.pop .eat-food { animation: eat-pop .45s cubic-bezier(.22,1.4,.4,1); }
.eat-food.eat-flash { opacity: .5; }
@keyframes eat-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* 今日塔罗 */
.tarot-card { width: 120px; height: 168px; margin: 0 auto; border-radius: 14px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; transition: transform .4s ease, background-color .4s ease; }
.tarot-card > span { transition: transform .4s ease; }
.tarot-card.flip { transform: rotateY(180deg); background: var(--card-bg); border: 1px solid var(--brand-primary); }
.tarot-card.flip > span { transform: rotateY(180deg); }
.tarot-back { font-size: 40px; font-weight: 700; color: var(--brand-primary); }
.tarot-name { font-size: 20px; font-weight: 700; color: var(--brand-primary); }
.tarot-result, .wheel-result, .mood-result, .compat-result, .dice-result, .bj-result, .td-result, .rps-result { text-align: center; }

/* 幸运大转盘 */
.wheel-wrap { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.wheel { width: 200px; height: 200px; border-radius: 50%; transition: transform 1.1s cubic-bezier(.17,.67,.32,1.2); border: 4px solid var(--card-bg); box-shadow: var(--shadow-card); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 16px solid var(--brand-primary); }

/* 记忆力挑战 */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-card { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--bg-section); font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.mem-card:active { transform: scale(.96); }
.mem-card.flipped, .mem-card.matched { background: var(--card-bg); border-color: var(--brand-primary); }
.mem-card.matched { background: var(--brand-soft); }
.mem-dot { width: 60%; height: 60%; border-radius: 50%; }
.mem-stat { text-align: center; font-size: 13px; color: var(--text-muted); }

/* 心情色彩 */
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mood-swatch { height: 72px; border-radius: 12px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #1F2430; font-size: 13px; font-weight: 600; transition: transform .15s ease; }
.mood-swatch:hover { transform: translateY(-3px); }

/* 星座配对 */
.compat-input { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.compat-input label { font-size: 14px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; }
.select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text-primary); font-size: 14px; font-family: inherit; }
.compat-heart { width: 22px; height: 22px; }
.compat-score { font-size: 40px; font-weight: 700; color: var(--brand-primary); text-align: center; }
.compat-score span { font-size: 16px; color: var(--text-muted); }
.compat-bar { height: 10px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; margin: 10px 0; }
.compat-fill { height: 100%; background: var(--brand-primary); border-radius: 999px; transition: width .5s ease; }

/* 摇骰子 */
.dice-row { display: flex; gap: 24px; justify-content: center; }
.dice-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ds-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.dice-faces { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.die {
  width: 60px; height: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px; padding: 9px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.die .pip { display: flex; align-items: center; justify-content: center; }
.die .pip::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--brand-primary); }
.die .pip:not(.on)::after { display: none; }
.die.shaking { animation: die-shake .52s ease; }
.die.rolled { animation: die-pop .5s cubic-bezier(.2,.8,.2,1); }
@keyframes die-shake { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-12px) rotate(-15deg); } 50% { transform: translateY(0) rotate(15deg); } 75% { transform: translateY(-6px) rotate(-8deg); } }
@keyframes die-pop { 0% { transform: scale(.5) rotate(-18deg); opacity: .3; } 55% { transform: scale(1.14) rotate(6deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.dice-faces-lg { justify-content: center; min-height: 60px; margin: 8px 0; }
.dice-breakdown { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dice-face-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg-section); border: 1px solid var(--border-subtle); font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.dice-face-count .dc-glyph { color: var(--brand-primary); font-size: 18px; line-height: 1; }
.dice-face-count .dc-n { color: var(--brand-primary); font-weight: 800; }
.dice-sum-line { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 6px; text-align: center; }
.dice-count-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.die-count { padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); background: var(--bg-section); font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s ease; }
.die-count.active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.rps-hand.picked { border-color: var(--brand-primary); background: var(--brand-soft); transform: translateY(-3px); }

/* 21 点 */
.cards-row { display: flex; gap: 24px; justify-content: center; }
.cards-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.card-hand { display: flex; gap: 6px; min-height: 64px; align-items: center; }
.card-face { width: 44px; height: 62px; border-radius: 8px; background: #fff; border: 1px solid var(--border-subtle); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #1F2430; box-shadow: var(--shadow-card); }
.card-face.red { color: #E5484D; }
.card-face i { font-size: 14px; font-style: normal; }

/* 真心话大冒险 */
.td-wheel { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; background: conic-gradient(var(--brand-primary), var(--accent-pink), var(--accent-mint), var(--accent-lavender), var(--brand-primary)); display: flex; align-items: center; justify-content: center; transition: transform .6s ease; }
.td-wheel.spin { transform: rotate(360deg); }
.td-wheel .td-label { background: var(--card-bg); width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--brand-primary); }

/* 猜拳 */
.rps-score { text-align: center; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.rps-row { display: flex; gap: 16px; justify-content: center; }
.rps-hand { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--bg-section); font-size: 30px; cursor: pointer; transition: transform .15s ease, border-color .2s ease; }
.rps-hand:hover { border-color: var(--brand-primary); transform: translateY(-3px); }
.rps-hand:disabled { opacity: .5; cursor: not-allowed; }

/* 酒桌飞镖 · 投准 */
.dart-board { position: relative; width: 200px; height: 200px; margin: 6px auto; border-radius: 50%; background: var(--bg-section); box-shadow: inset 0 0 0 2px var(--border-subtle); overflow: hidden; }
.dart-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); border-radius: 50%; }
.dart-ring-mid { width: 180px; height: 180px; background: rgba(91,91,214,.10); border: 1px solid var(--border-subtle); }
.dart-ring-inner { width: 108px; height: 108px; background: rgba(91,91,214,.20); }
.dart-ring-bull { width: 36px; height: 36px; background: #FF6B8A; }
.dart-marker { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--brand-primary); box-shadow: 0 0 0 5px rgba(91,91,214,.22); pointer-events: none; }
.dart-hit { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #FF6B8A; box-shadow: 0 0 0 3px rgba(255,107,138,.30); display: none; }
.dart-scoreboard { display: flex; justify-content: center; gap: 22px; margin: 6px 0 2px; font-size: 14px; color: var(--text-secondary); }
.dart-scoreboard b { color: var(--brand-primary); font-size: 16px; }
.dart-result { text-align: center; margin-top: 6px; }

/* 隐藏人格测试 */
.hq-card { display: flex; flex-direction: column; gap: 12px; }
.hq-q { font-size: 17px; font-weight: 600; margin: 0; color: var(--text-primary); }
.hq-opt { padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--card-bg); color: var(--text-primary); font-size: 15px; cursor: pointer; text-align: left; transition: border-color .2s ease, background-color .2s ease; }
.hq-opt:hover { border-color: var(--brand-primary); background: var(--brand-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .game-grid, .game-group:last-child .game-grid { grid-template-columns: repeat(2, 1fr); }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
  .today-grid { grid-template-columns: 1fr; }
  .today-grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-header .container { gap: 12px; }
  .header-right { gap: 8px; }
  .brand-cn { display: none; }
  .theme-lbl { display: none; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.open .nav {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: var(--header-h); left: 0; right: 0; z-index: 60;
    background: var(--bg-page); border-bottom: 1px solid var(--border-subtle);
    padding: 12px 20px; align-items: stretch;
  }
  .site-header.open .nav a { padding: 10px 4px; }
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 28px; }
  .hero-planet { width: 160px; height: 160px; }
  .section { padding: 40px 0; }
  .question-card, .explore-card { padding: 24px; }
  .modal { padding: 10px; }
  .modal-box { padding: 18px 16px 16px; }
  .module-grid, .quote-grid, .game-grid, .game-group:last-child .game-grid, .zodiac-grid, .saved-grid, .today-grid4 { grid-template-columns: 1fr; }
  .mem-grid { grid-template-columns: repeat(3, 1fr); }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .dice-row, .cards-row, .rps-row { flex-direction: column; }
  .die { width: 52px; height: 52px; padding: 8px; }
  .die .pip::after { width: 9px; height: 9px; }
  .card-hand { flex-wrap: wrap; justify-content: center; }
  .profile-card { flex-direction: column; align-items: flex-start; }
  .profile-stats { width: 100%; justify-content: space-between; }
  .td-block { min-height: 140px; }
}
