/* ============================================================
   FUZOZO · 五行毛绒精灵  —  样式
   干净、留白、圆润；品牌粉 + 五行色点缀
   ============================================================ */
:root {
  --bg: #FBF9F5;
  --bg-soft: #F4F0E9;
  --card: #FFFFFF;
  --ink: #2B2621;
  --ink-2: #5C554C;
  --muted: #948C81;
  --line: #ECE6DC;
  --pink: #FF5FA8;
  --pink-d: #E8489A;
  --pink-soft: #FFE6F1;
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 18px 44px rgba(60, 48, 40, .09), 0 3px 10px rgba(60, 48, 40, .05);
  --shadow-sm: 0 6px 18px rgba(60, 48, 40, .07);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Hiragino Sans GB", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---------- 品牌字标 ---------- */
.wordmark {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .06em;
  color: var(--pink);
  -webkit-text-stroke: 1.4px var(--pink-d);
  text-stroke: 1.4px var(--pink-d);
}
.wordmark.small { font-size: 20px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 56px);
  background: rgba(251, 249, 245, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.nav-links a:hover { color: var(--pink-d); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 999px; padding: 13px 26px; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 10px 24px rgba(255, 95, 168, .38); }
.btn-primary:hover { background: var(--pink-d); box-shadow: 0 12px 28px rgba(255, 95, 168, .46); }
.btn-lg { padding: 16px 34px; font-size: 16.5px; }
.btn-block { width: 100%; padding: 16px; font-size: 16.5px; margin-top: 4px; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); }
.btn-ghost:hover { background: #ece6db; }

/* ---------- 首屏 ---------- */
.hero { padding: clamp(46px, 9vw, 96px) clamp(18px, 5vw, 56px) 40px; text-align: center; overflow: hidden; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .16em;
  color: var(--pink-d); background: var(--pink-soft); padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero-title { font-size: clamp(30px, 6vw, 52px); font-weight: 900; }
.hero-title .hl { color: var(--pink); }
.hero-sub { margin: 20px auto 30px; color: var(--ink-2); font-size: clamp(15px, 2.4vw, 18px); max-width: 560px; }
.hero-parade { display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 1.5vw, 20px); margin-top: 44px; }
.hero-parade .creature-wrap { flex: 1 1 0; min-width: 0; max-width: 124px; }
.hero-parade .creature-wrap:nth-child(1) { animation-delay: 0s; }
.hero-parade .creature-wrap:nth-child(2) { animation-delay: .5s; }
.hero-parade .creature-wrap:nth-child(3) { animation-delay: 1s; }
.hero-parade .creature-wrap:nth-child(4) { animation-delay: 1.5s; }
.hero-parade .creature-wrap:nth-child(5) { animation-delay: 2s; }

.creature-wrap { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@media (prefers-reduced-motion: reduce) { .creature-wrap { animation: none; } html { scroll-behavior: auto; } }
.creature { width: 100%; height: auto; display: block; }

/* ---------- 区块通用 ---------- */
.section { padding: clamp(48px, 8vw, 88px) clamp(18px, 5vw, 56px); max-width: 1080px; margin: 0 auto; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 16px; }

/* ---------- 测算卡片 ---------- */
.calc-card {
  max-width: 560px; margin: 0 auto; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
}
.cal-toggle { display: flex; gap: 6px; background: var(--bg-soft); padding: 5px; border-radius: 999px; margin-bottom: 22px; }
.cal-opt {
  flex: 1; border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 14.5px; color: var(--muted); padding: 10px; border-radius: 999px; transition: .18s;
}
.cal-opt.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.field-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field-full { }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field-note { font-weight: 500; font-style: normal; color: var(--muted); font-size: 12px; }
.field select {
  font-family: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23948C81' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.calc-err { color: #d4483d; font-size: 14px; font-weight: 600; margin-top: 14px; text-align: center; }

/* ---------- 结果 ---------- */
.result { margin-top: 40px; }
.result[hidden] { display: none; }
.result-appear { animation: pop .45s cubic-bezier(.2,.8,.25,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.res-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(20px, 4vw, 32px); margin-bottom: 22px; }
.res-block h3 { font-size: 15px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin-bottom: 18px; text-transform: uppercase; }

/* 四柱 */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.pillar-col .pillar-label { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.pillar-box { background: var(--bg); border-radius: 14px; padding: 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.gz { font-size: clamp(22px, 5vw, 30px); font-weight: 800; line-height: 1; }
.gz small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 5px; }

/* 五行分布 */
.wx-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: clamp(8px, 3vw, 26px); height: 168px; padding-top: 6px; }
.wx-bar { flex: 1; max-width: 74px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.wx-count { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.wx-fill { width: 100%; border-radius: 10px 10px 4px 4px; min-height: 6px; transition: height .6s cubic-bezier(.2,.8,.25,1); }
.wx-name { margin-top: 10px; font-weight: 800; font-size: 18px; }
.wx-sub { font-size: 11.5px; color: var(--muted); }
.wx-name.is-master::after { content: "日主"; display: block; font-size: 10px; font-weight: 700; color: #fff; background: var(--pink); border-radius: 6px; padding: 1px 6px; margin: 4px auto 0; width: fit-content; }

/* 推荐主卡 */
.match-hero {
  display: grid; grid-template-columns: 220px 1fr; gap: clamp(18px, 4vw, 40px); align-items: center;
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04);
  margin-bottom: 22px; overflow: hidden;
}
.match-visual { width: 100%; }
.match-tag { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.7); margin-bottom: 14px; }
.match-name { font-size: clamp(26px, 5vw, 36px); font-weight: 900; }
.match-race { font-size: 15px; font-weight: 700; opacity: .8; margin-left: 10px; }
.match-symbol { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.chip { font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.62); }
.match-reading { color: var(--ink-2); font-size: 15.5px; line-height: 1.75; margin-bottom: 20px; }
.match-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 补运卡 */
.supplement { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
.supplement .sup-visual { width: 118px; flex-shrink: 0; }
.supplement .sup-body h4 { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.supplement .sup-body p { color: var(--ink-2); font-size: 14.5px; }
.sup-lead { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin-bottom: 6px; }

/* ---------- 图鉴 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.g-card { border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04); }
.g-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.g-visual { width: 96px; flex-shrink: 0; }
.g-heading .g-name { font-size: 22px; font-weight: 900; }
.g-heading .g-race { font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: 999px; background: rgba(255,255,255,.7); display: inline-block; margin-top: 6px; }
.g-symbol { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.g-meta { font-size: 14px; color: var(--ink-2); }
.g-meta div { display: flex; gap: 8px; padding: 7px 0; border-top: 1px dashed rgba(0,0,0,.09); }
.g-meta .k { font-weight: 800; color: var(--ink); min-width: 62px; flex-shrink: 0; }
.g-trait { margin-top: 14px; background: rgba(255,255,255,.55); border-radius: 14px; padding: 13px 15px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.g-trait strong { color: var(--ink); }

/* ---------- 关于 ---------- */
.about-card { max-width: 760px; margin: 0 auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: clamp(26px, 5vw, 44px); }
.about-card h2 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.about-card p { color: var(--ink-2); margin-bottom: 14px; }
.about-card strong { color: var(--ink); }
.disclaimer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }

/* ---------- 页脚 ---------- */
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 30px clamp(18px, 5vw, 56px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; padding: 13px 22px;
  border-radius: 999px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .match-hero { grid-template-columns: 1fr; text-align: center; }
  .match-visual { max-width: 190px; margin: 0 auto; }
  .match-symbol, .match-cta { justify-content: center; }
  .nav-links { display: none; }
  .supplement { flex-direction: column; text-align: center; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:first-child { grid-column: 1 / -1; }
}
