/* ============================================================
   玄机阁 · 玄墨鎏金
   ============================================================ */
:root {
  --ink: #07070a;
  --ink-2: #0b0b10;
  --panel: rgba(18, 17, 22, .72);
  --panel-2: rgba(10, 10, 14, .9);
  --gold: #c8a24a;
  --gold-l: #f4e2ae;
  --gold-d: #8a6f2e;
  --red: #b23a2f;
  --paper: #efe6d4;
  --muted: #8d8478;
  --line: rgba(200, 162, 74, .22);
  --f-kai: "STKaiti", "KaiTi", "Kaiti SC", "楷体", "STSong", serif;
  --f-song: "Songti SC", "STSong", "SimSun", "宋体", serif;
  --f-hei: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.16, .84, .44, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-song);
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景：星雾与地气 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 50% -10%, rgba(200, 162, 74, .13), transparent 62%),
    radial-gradient(900px 600px at 12% 108%, rgba(178, 58, 47, .12), transparent 60%),
    radial-gradient(800px 800px at 96% 30%, rgba(60, 90, 140, .10), transparent 65%),
    #07070a;
}

/* 宣纸颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.30'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

::selection { background: rgba(200, 162, 74, .3); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #08080b; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold-d), #3a2f16); border-radius: 8px; }

/* ---------------- 顶部 ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: linear-gradient(180deg, rgba(7, 7, 10, .92), rgba(7, 7, 10, .35));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 162, 74, .12);
  transition: .5s var(--ease);
}
.nav.dense { padding: 8px 40px; background: rgba(7, 7, 10, .96); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.seal {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #c0392b, #8e2a20);
  color: #ffe9d6;
  font-family: var(--f-kai);
  font-size: 20px;
  border-radius: 4px;
  box-shadow: 0 0 22px rgba(178, 58, 47, .45), inset 0 0 0 1px rgba(255, 220, 190, .25);
  transform: rotate(-3deg);
}
.brand-txt { font-family: var(--f-kai); font-size: 19px; letter-spacing: .32em; color: var(--gold-l); }
.brand-sub { font-size: 10px; letter-spacing: .3em; color: var(--muted); font-family: var(--f-hei); }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  position: relative;
  padding: 6px 14px;
  color: #b9b0a2;
  text-decoration: none;
  font-family: var(--f-kai);
  font-size: 15px;
  letter-spacing: .18em;
  transition: .35s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: .4s var(--ease);
}
.nav-links a:hover, .nav-links a.on { color: var(--gold-l); }
.nav-links a:hover::after, .nav-links a.on::after { width: 60%; }

.nav-tools { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px;
  transition: .35s;
}
.icon-btn:hover { background: rgba(200, 162, 74, .14); box-shadow: 0 0 18px rgba(200, 162, 74, .25); }
.icon-btn.playing { color: #ffe9d6; border-color: rgba(255, 200, 160, .5); box-shadow: 0 0 18px rgba(200, 100, 60, .35); }

/* ---------------- 首屏 ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 90px 20px 60px;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* banner 视频：玄墨八卦星空循环 */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: .6;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(7, 7, 10, .58) 0%,
    rgba(7, 7, 10, .22) 42%,
    rgba(7, 7, 10, .78) 100%);
  pointer-events: none;
}
.hero-qian, .hero-side { z-index: 2; }
.hero-side, .scroll-hint { z-index: 3; }

.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 940px; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-hei);
  font-size: 11px;
  letter-spacing: .55em;
  color: var(--gold);
  margin-bottom: 34px;
  opacity: .9;
}
.hero-tag::before, .hero-tag::after {
  content: ""; width: 46px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero-tag::after { background: linear-gradient(270deg, transparent, var(--gold)); }

.hero h1 {
  font-family: var(--f-kai);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  letter-spacing: .12em;
  line-height: 1.3;
  color: #f6efe0;
  text-shadow: 0 0 40px rgba(200, 162, 74, .35), 0 0 90px rgba(200, 162, 74, .12);
}
.hero h1 .ch { display: inline-block; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.hero h1 .ch.gold { color: var(--gold-l); }

.hero-en {
  margin-top: 18px;
  font-family: var(--f-hei);
  font-size: 11px;
  letter-spacing: .42em;
  color: #6b6357;
  text-transform: uppercase;
}

.hero-line {
  margin: 34px auto 0;
  max-width: 620px;
  color: #a79c8b;
  font-family: var(--f-kai);
  font-size: clamp(14px, 1.6vw, 17px);
  letter-spacing: .12em;
  min-height: 3.4em;
}
.caret {
  display: inline-block; width: 2px; height: 1em;
  background: var(--gold); vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-stats {
  display: flex; justify-content: center; gap: 54px;
  margin-top: 52px; flex-wrap: wrap;
}
.hero-stats div { text-align: center; }
.hero-stats b {
  display: block;
  font-family: var(--f-song);
  font-size: 26px; color: var(--gold-l); letter-spacing: .06em;
}
.hero-stats span { font-size: 10px; letter-spacing: .35em; color: #6f6759; font-family: var(--f-hei); }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; text-align: center; color: #6b6357;
  font-family: var(--f-hei); font-size: 10px; letter-spacing: .4em;
}
.scroll-hint i {
  display: block; width: 1px; height: 44px; margin: 10px auto 0;
  background: linear-gradient(var(--gold), transparent);
  animation: drop 2.2s infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.hero-side {
  position: absolute; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--f-kai);
  font-size: 12px; letter-spacing: .6em;
  color: #4e4739; z-index: 2;
}
.hero-side.l { left: 30px; }
.hero-side.r { right: 30px; }

.hero-qian {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-kai);
  font-size: min(64vh, 46rem);
  color: rgba(200, 162, 74, .022);
  z-index: 0; pointer-events: none; user-select: none;
  line-height: 1;
}

/* ---------------- 区块通用 ---------------- */
.sec { position: relative; padding: 110px 20px; }
.wrap { max-width: 1180px; margin: 0 auto; }

.sec-head { text-align: center; margin-bottom: 56px; position: relative; }
.sec-num {
  display: inline-block;
  font-family: var(--f-kai);
  font-size: 12px; letter-spacing: .3em;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 3px 12px;
  margin-bottom: 18px;
}
.sec-head h2 {
  font-family: var(--f-kai);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: .22em;
  color: #f4ecd9;
}
.sec-head h2 em { font-style: normal; color: var(--gold); }
.sec-sub {
  margin-top: 12px;
  font-family: var(--f-kai);
  font-size: 14px; letter-spacing: .16em; color: #8b8272;
}
.orn {
  width: 190px; height: 10px; margin: 20px auto 0;
  background:
    linear-gradient(90deg, transparent, var(--line), transparent);
  position: relative;
}
.orn::after {
  content: "◆";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px; color: var(--gold);
  background: var(--ink); padding: 0 8px;
}

.reveal { opacity: 0; transform: translateY(34px); transition: 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- 面板 ---------------- */
.panel {
  position: relative;
  background: linear-gradient(155deg, rgba(24, 22, 27, .82), rgba(9, 9, 13, .92));
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: 0 24px 60px -30px #000, inset 0 1px 0 rgba(255, 235, 200, .05);
  backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1px solid rgba(200, 162, 74, .55);
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel-title {
  font-family: var(--f-kai); font-size: 17px; letter-spacing: .22em;
  color: var(--gold-l); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.panel-title::before {
  content: ""; width: 3px; height: 16px;
  background: var(--red); box-shadow: 0 0 10px rgba(178, 58, 47, .6);
}

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; align-items: start; }
.grid-2.rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

/* ---------------- 表单 ---------------- */
label.f-lab {
  display: block;
  font-family: var(--f-hei); font-size: 11px; letter-spacing: .3em;
  color: #8b8272; margin-bottom: 10px;
}
textarea, input[type="text"], input[type="date"], input[type="time"], input[type="number"], select {
  width: 100%;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(200, 162, 74, .18);
  color: var(--paper);
  font-family: var(--f-kai);
  font-size: 15px;
  letter-spacing: .08em;
  padding: 12px 14px;
  outline: none;
  transition: .35s;
  border-radius: 2px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.8; }
textarea:focus, input:focus, select:focus {
  border-color: rgba(200, 162, 74, .6);
  background: rgba(200, 162, 74, .05);
  box-shadow: 0 0 24px -6px rgba(200, 162, 74, .4);
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(1) saturate(3) hue-rotate(5deg); cursor: pointer; }
select option { background: #12121a; }

.field { margin-bottom: 20px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chips button {
  background: transparent;
  border: 1px solid rgba(200, 162, 74, .2);
  color: #a99f8f;
  font-family: var(--f-kai);
  font-size: 12px; letter-spacing: .1em;
  padding: 5px 12px; cursor: pointer;
  transition: .3s;
}
.chips button:hover {
  color: var(--gold-l); border-color: rgba(200, 162, 74, .6);
  background: rgba(200, 162, 74, .08);
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 34px;
  background: transparent;
  border: 1px solid rgba(200, 162, 74, .55);
  color: var(--gold-l);
  font-family: var(--f-kai);
  font-size: 15px; letter-spacing: .34em;
  cursor: pointer;
  overflow: hidden;
  transition: .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--gold), var(--gold-l));
  transform: translateY(101%);
  transition: .5s var(--ease);
  z-index: -1;
}
.btn:hover { color: #14100a; border-color: var(--gold-l); box-shadow: 0 0 32px -8px rgba(200, 162, 74, .8); }
.btn:hover::before { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn-ghost { border-color: rgba(200, 162, 74, .25); font-size: 13px; letter-spacing: .2em; padding: 10px 20px; }

/* ---------------- 卦象 ---------------- */
.hex { display: flex; flex-direction: column; gap: 9px; width: 132px; }
.hex .row { display: flex; gap: 9px; height: 9px; align-items: center; position: relative; }
.hex .row .bar { height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); flex: 1; border-radius: 1px; transition: .5s; }
.hex .row.yin .bar { flex: 0 0 calc(50% - 5px); }
.hex .row.yin::after { content: ""; flex: 1; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); border-radius: 1px; }
.hex .row.dong .bar, .hex .row.dong::after { background: linear-gradient(90deg, #e8543f, #ffb08c); box-shadow: 0 0 14px rgba(232, 84, 63, .6); }
.hex .row.flip { animation: flipLine .6s var(--ease); }
@keyframes flipLine { 0% { transform: scaleX(.2) translateX(-30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hex.big { width: 160px; gap: 11px; }
.hex.big .row { height: 11px; }

.hex-pair { display: flex; align-items: center; gap: 26px; justify-content: center; flex-wrap: wrap; }
.hex-col { text-align: center; }
.hex-col .cap { font-family: var(--f-hei); font-size: 10px; letter-spacing: .3em; color: #6f6759; margin-bottom: 12px; }
.hex-col .nm { font-family: var(--f-kai); font-size: 15px; letter-spacing: .16em; color: var(--gold-l); margin-top: 14px; }
.arrow-mid { color: var(--gold-d); font-size: 18px; opacity: .8; }

/* ---------------- 天机问答 ---------------- */
.ask-result { min-height: 520px; display: flex; flex-direction: column; }
.res-empty { flex: 1; display: grid; place-items: center; text-align: center; color: #5d5648; }
.res-empty .glyph {
  font-family: var(--f-kai); font-size: 90px; color: rgba(200, 162, 74, .1);
  line-height: 1; margin-bottom: 18px;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .45; transform: scale(1.04); } }
.res-empty p { font-family: var(--f-kai); letter-spacing: .2em; font-size: 14px; }

.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.res-badge {
  font-family: var(--f-kai); font-size: 12px; letter-spacing: .24em;
  color: var(--gold); border: 1px solid var(--line); padding: 4px 12px;
}
.res-score { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-song); font-size: 18px; color: var(--gold-l);
}
.ring-label { font-family: var(--f-hei); font-size: 10px; letter-spacing: .25em; color: #6f6759; }

.talk { font-family: var(--f-kai); font-size: 15.5px; line-height: 2.15; letter-spacing: .05em; color: #ddd2bd; }
.talk p { margin-bottom: 16px; text-indent: 2em; }
.talk p:first-child { text-indent: 0; color: #f0e6d0; }
.talk p::first-letter { color: var(--gold-l); }

.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.tip { border: 1px solid rgba(200, 162, 74, .16); padding: 12px; text-align: center; background: rgba(200, 162, 74, .03); }
.tip b { display: block; font-family: var(--f-hei); font-size: 9px; letter-spacing: .3em; color: #6f6759; font-weight: 400; margin-bottom: 6px; }
.tip span { font-family: var(--f-kai); font-size: 13px; color: var(--gold-l); letter-spacing: .1em; }

.thinking { display: flex; flex-direction: column; gap: 12px; padding: 30px 0; }
.thinking .step {
  font-family: var(--f-kai); font-size: 13px; letter-spacing: .18em; color: #6f6759;
  display: flex; align-items: center; gap: 10px; opacity: 0;
  animation: stepIn .5s forwards;
}
.thinking .step.done { color: var(--gold); }
.thinking .dot { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 10px var(--gold); }
@keyframes stepIn { to { opacity: 1; } }

/* ---------------- 八字命盘 ---------------- */
.bazi-table { display: grid; grid-template-columns: 64px repeat(4, 1fr); gap: 1px; background: rgba(200, 162, 74, .14); border: 1px solid rgba(200, 162, 74, .14); }
.bazi-table > div { background: #0c0c11; padding: 12px 8px; text-align: center; }
.bazi-table .hd { font-family: var(--f-hei); font-size: 11px; letter-spacing: .2em; color: #8b8272; background: #0a0a0e; }
.bazi-table .rl { font-family: var(--f-kai); font-size: 12px; letter-spacing: .16em; color: #6f6759; display: grid; place-items: center; background: #0a0a0e; }
.bazi-table .gz { font-family: var(--f-kai); font-size: 30px; letter-spacing: .06em; line-height: 1.25; }
.bazi-table .gz.day { color: var(--gold-l); text-shadow: 0 0 22px rgba(200, 162, 74, .5); }
.bazi-table .sm { font-size: 12px; color: #9b917f; font-family: var(--f-kai); letter-spacing: .06em; }
.bazi-table .ss { font-size: 13px; color: #c9bda6; font-family: var(--f-kai); }
.bazi-table .cang { font-size: 12px; color: #8b8272; font-family: var(--f-kai); line-height: 1.7; }
.wx-木 { color: #6fbf7d; } .wx-火 { color: #e0664f; } .wx-土 { color: #d9b264; } .wx-金 { color: #dbe2ec; } .wx-水 { color: #6fa8dd; }

.wx-bars { display: flex; flex-direction: column; gap: 12px; }
.wx-bar { display: grid; grid-template-columns: 34px 1fr 52px; gap: 12px; align-items: center; }
.wx-bar .nm { font-family: var(--f-kai); font-size: 13px; }
.wx-bar .track { height: 6px; background: rgba(255, 255, 255, .05); border-radius: 4px; overflow: hidden; }
.wx-bar .fill { height: 100%; width: 0; border-radius: 4px; transition: 1.2s var(--ease); }
.wx-bar .pc { font-family: var(--f-hei); font-size: 11px; color: #8b8272; text-align: right; }

.chart-note { margin-top: 20px; padding: 16px; border-left: 2px solid var(--red); background: rgba(178, 58, 47, .06); font-family: var(--f-kai); font-size: 14px; color: #cfc4ae; line-height: 2; }
.chart-note b { color: var(--gold-l); font-weight: 400; }

.dayun { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-top: 6px; }
.dy-item { min-width: 92px; border: 1px solid rgba(200, 162, 74, .16); padding: 10px 8px; text-align: center; background: rgba(255, 255, 255, .015); transition: .35s; }
.dy-item:hover { border-color: rgba(200, 162, 74, .55); background: rgba(200, 162, 74, .07); transform: translateY(-3px); }
.dy-item .age { font-family: var(--f-hei); font-size: 10px; color: #6f6759; letter-spacing: .1em; }
.dy-item .gz { font-family: var(--f-kai); font-size: 18px; color: var(--gold-l); margin: 4px 0; }
.dy-item .ny { font-family: var(--f-kai); font-size: 10px; color: #7e7566; }
.dy-item.now { border-color: var(--gold); box-shadow: 0 0 22px -8px var(--gold); }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(200, 162, 74, .12); font-family: var(--f-kai); font-size: 13.5px; }
.kv span { color: #8b8272; letter-spacing: .16em; }
.kv b { color: var(--gold-l); font-weight: 400; }

/* ---------------- 六爻 ---------------- */
.coins { display: flex; justify-content: center; gap: 18px; margin: 30px 0; min-height: 74px; align-items: center; }
.coin {
  width: 62px; height: 62px; border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--f-kai); font-size: 13px; color: var(--gold-l);
  background: radial-gradient(circle at 32% 26%, rgba(200, 162, 74, .3), rgba(20, 16, 10, .9));
  box-shadow: inset 0 0 18px rgba(200, 162, 74, .25), 0 0 20px -6px rgba(200, 162, 74, .5);
  position: relative;
}
.coin::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1px solid rgba(200, 162, 74, .6);
}
.coin.flip { animation: coinFlip .55s var(--ease); }
@keyframes coinFlip {
  0% { transform: rotateY(0) translateY(0); }
  50% { transform: rotateY(540deg) translateY(-26px); }
  100% { transform: rotateY(1080deg) translateY(0); }
}
.ly-lines { display: flex; flex-direction: column-reverse; gap: 10px; margin: 24px auto; width: 100%; max-width: 340px; }
.ly-row { display: flex; align-items: center; gap: 12px; }
.ly-row .idx { font-family: var(--f-hei); font-size: 10px; color: #5d5648; width: 30px; letter-spacing: .1em; }
.ly-row .mark { font-family: var(--f-kai); font-size: 11px; color: #e0543f; width: 22px; }
.ly-row .hexbar { flex: 1; display: flex; gap: 8px; height: 10px; }
.ly-row .hexbar i { background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); flex: 1; border-radius: 1px; }
.ly-row.single .hexbar i:last-child { display: none; }
.ly-row.yin .hexbar i:first-child { flex: 0 0 calc(50% - 4px); }
.ly-row.dong .hexbar i { background: linear-gradient(90deg, #e8543f, #ffb08c); box-shadow: 0 0 12px rgba(232, 84, 63, .6); }
.ly-row.pending .hexbar i { background: rgba(200, 162, 74, .1); box-shadow: none; }

/* ---------------- 黄历 ---------------- */
.almanac-top { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: space-between; }
.almanac-date { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.almanac-date .d { font-family: var(--f-song); font-size: 46px; color: var(--gold-l); line-height: 1; }
.almanac-date .m { font-family: var(--f-kai); font-size: 15px; color: #a99f8f; letter-spacing: .2em; }
.jc-badge {
  font-family: var(--f-kai); font-size: 34px; color: #0a0a0c;
  background: linear-gradient(150deg, var(--gold-l), var(--gold));
  width: 66px; height: 66px; display: grid; place-items: center;
  box-shadow: 0 0 28px -8px var(--gold);
}
.yiji { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.yiji-col { border: 1px solid rgba(200, 162, 74, .16); padding: 16px; }
.yiji-col .h { font-family: var(--f-kai); font-size: 14px; letter-spacing: .3em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.yiji-col .h i { width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; font-style: normal; border-radius: 50%; }
.yiji-col.yi .h { color: #7fc08c; } .yiji-col.yi .h i { background: rgba(127, 192, 140, .15); color: #7fc08c; }
.yiji-col.ji .h { color: #d0685a; } .yiji-col.ji .h i { background: rgba(208, 104, 90, .15); color: #d0685a; }
.yiji-col .items { display: flex; flex-wrap: wrap; gap: 8px; }
.yiji-col .items span {
  font-family: var(--f-kai); font-size: 12.5px; letter-spacing: .12em;
  padding: 3px 10px; border: 1px solid rgba(200, 162, 74, .18); color: #c4b9a4;
}
.days-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 28px; padding-bottom: 6px; }
.day-cell {
  min-width: 78px; text-align: center; padding: 12px 6px; cursor: pointer;
  border: 1px solid rgba(200, 162, 74, .14); background: rgba(255, 255, 255, .015);
  transition: .35s; flex: 0 0 auto;
}
.day-cell:hover, .day-cell.on { border-color: var(--gold); background: rgba(200, 162, 74, .1); }
.day-cell .w { font-family: var(--f-hei); font-size: 10px; color: #6f6759; letter-spacing: .1em; }
.day-cell .d { font-family: var(--f-song); font-size: 20px; color: var(--gold-l); margin: 3px 0; }
.day-cell .g { font-family: var(--f-kai); font-size: 10.5px; color: #8b8272; }
.hour-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.hour-cell { text-align: center; padding: 8px 4px; border: 1px solid rgba(200, 162, 74, .12); font-family: var(--f-kai); font-size: 12px; color: #8b8272; }
.hour-cell b { display: block; color: var(--gold-l); font-size: 13px; font-weight: 400; }
.hour-cell.good { border-color: rgba(127, 192, 140, .4); background: rgba(127, 192, 140, .07); color: #9dbfa4; }
.hour-cell.good b { color: #9ddcae; }

/* ---------------- 罗盘 ---------------- */
.compass-wrap { position: relative; display: grid; place-items: center; padding: 10px 0 0; }
.compass {
  width: min(430px, 86vw); aspect-ratio: 1; position: relative;
  cursor: grab; touch-action: none; user-select: none;
}
.compass:active { cursor: grabbing; }
.compass svg { width: 100%; height: 100%; display: block; }
.needle {
  position: absolute; left: 50%; top: 8%; width: 2px; height: 84%;
  transform-origin: 50% 50%; pointer-events: none;
  background: linear-gradient(180deg, rgba(232, 84, 63, .95) 0%, rgba(232, 84, 63, .1) 48%, rgba(200, 162, 74, .1) 52%, rgba(200, 162, 74, .9) 100%);
  filter: drop-shadow(0 0 6px rgba(232, 84, 63, .6));
}
.compass-core {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.compass-core .taiji { width: 26%; aspect-ratio: 1; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.compass-read { text-align: center; margin-top: 18px; }
.compass-read .shan { font-family: var(--f-kai); font-size: 30px; color: var(--gold-l); letter-spacing: .2em; }
.compass-read .meta { font-family: var(--f-hei); font-size: 11px; letter-spacing: .24em; color: #8b8272; margin-top: 6px; }
.compass-read .say { font-family: var(--f-kai); font-size: 14px; color: #c4b9a4; margin-top: 12px; min-height: 3em; line-height: 1.9; }

/* ---------------- 灵签 ---------------- */
.tube-area { display: grid; place-items: center; min-height: 300px; }
.tube {
  position: relative; width: 130px; height: 190px; cursor: pointer;
  transition: .4s;
}
.tube .body {
  position: absolute; bottom: 0; left: 0; right: 0; height: 170px;
  background: linear-gradient(100deg, #2a1d12, #4a3320 30%, #6b4a2c 52%, #3a2718 78%, #1c130c);
  border-radius: 4px 4px 8px 8px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .8), 0 20px 40px -18px #000;
  border: 1px solid rgba(200, 162, 74, .3);
}
.tube .body::after {
  content: "玄機"; writing-mode: vertical-rl;
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-kai); font-size: 22px; letter-spacing: .3em;
  color: rgba(200, 162, 74, .62);
}
.tube .sticks { position: absolute; bottom: 150px; left: 12px; right: 12px; height: 70px; }
.tube .sticks i {
  position: absolute; bottom: 0; width: 6px; height: 64px;
  background: linear-gradient(180deg, #d9c08a, #8a6b3c);
  border-radius: 3px 3px 0 0; transition: .5s var(--ease);
}
.tube .sticks i:nth-child(1) { left: 14%; height: 56px; }
.tube .sticks i:nth-child(2) { left: 38%; height: 66px; }
.tube .sticks i:nth-child(3) { left: 58%; height: 50px; }
.tube .sticks i:nth-child(4) { left: 76%; height: 62px; }
.tube.shake { animation: tubeShake .5s ease-in-out 3; }
@keyframes tubeShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg) translateY(-6px); }
  75% { transform: rotate(9deg) translateY(-6px); }
}
.tube.shake .sticks i:nth-child(2) { transform: translateY(-26px); }
.tube.shake .sticks i:nth-child(4) { transform: translateY(-16px); }

.qian-card { display: none; }
.qian-card.show { display: block; animation: qianIn 1s var(--ease); }
@keyframes qianIn { from { opacity: 0; transform: translateY(30px) rotate(-2deg); } }
.qian-paper {
  background: linear-gradient(170deg, #efe4cb, #ddceac);
  color: #2b2115; padding: 30px 26px; position: relative;
  box-shadow: 0 30px 60px -26px #000, inset 0 0 60px rgba(120, 90, 40, .25);
}
.qian-paper::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid rgba(80, 55, 20, .35); pointer-events: none;
}
.qian-paper .lv {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--f-kai); font-size: 12px; letter-spacing: .2em;
  color: #8a1f16; border: 1px solid #8a1f16; padding: 2px 8px;
}
.qian-paper .no { font-family: var(--f-kai); font-size: 12px; letter-spacing: .3em; color: #6b5a3c; }
.qian-paper .poem { margin: 20px 0; font-family: var(--f-kai); font-size: 21px; line-height: 2.2; letter-spacing: .16em; text-align: center; color: #1f1810; }
.qian-paper .poem span { display: block; }
.qian-paper .jie { font-family: var(--f-kai); font-size: 14px; color: #4a3c25; line-height: 2; border-top: 1px dashed rgba(80, 55, 20, .3); padding-top: 14px; }
.qian-paper .stamp {
  position: absolute; bottom: 16px; right: 18px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: #9e2b20; color: #f5ddc8; font-family: var(--f-kai); font-size: 13px;
  transform: rotate(-8deg); opacity: .85; box-shadow: 0 0 0 1px rgba(158, 43, 32, .5);
}

/* ---------------- 哲思段 ---------------- */
.creed { padding: 100px 20px; text-align: center; position: relative; }
.creed-quote {
  font-family: var(--f-kai);
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  line-height: 1.9; letter-spacing: .16em; color: #e6dcc6;
  max-width: 900px; margin: 0 auto;
}
.creed-quote em { font-style: normal; color: var(--gold-l); }
.creed-src { margin-top: 24px; font-family: var(--f-hei); font-size: 10px; letter-spacing: .4em; color: #5d5648; }
.creed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 60px; }
.creed-card { padding: 26px 22px; border: 1px solid rgba(200, 162, 74, .14); background: rgba(255, 255, 255, .012); text-align: left; transition: .5s var(--ease); }
.creed-card:hover { border-color: rgba(200, 162, 74, .45); transform: translateY(-6px); background: rgba(200, 162, 74, .04); }
.creed-card h4 { font-family: var(--f-kai); font-size: 17px; color: var(--gold-l); font-weight: 400; letter-spacing: .16em; margin-bottom: 10px; }
.creed-card p { font-family: var(--f-kai); font-size: 13.5px; color: #9b917f; line-height: 1.95; }

/* ---------------- 页脚 ---------------- */
footer {
  border-top: 1px solid rgba(200, 162, 74, .12);
  padding: 44px 20px 30px; text-align: center;
  font-family: var(--f-kai); color: #5d5648; font-size: 12.5px; letter-spacing: .16em;
}
footer .fl { margin-bottom: 14px; color: #6f6759; }
footer .disc { max-width: 760px; margin: 18px auto 0; font-size: 11px; line-height: 2; color: #4a4438; font-family: var(--f-hei); letter-spacing: .06em; }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; bottom: 34px; left: 50%; transform: translate(-50%, 30px);
  background: rgba(12, 12, 16, .96); border: 1px solid rgba(200, 162, 74, .4);
  color: var(--gold-l); font-family: var(--f-kai); font-size: 13.5px; letter-spacing: .14em;
  padding: 12px 26px; opacity: 0; pointer-events: none;
  transition: .5s var(--ease); z-index: 200;
  box-shadow: 0 20px 50px -20px #000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 天机引擎 · DeepSeek ---------------- */
.ai-chip {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--f-kai); font-size: 11.5px; letter-spacing: .16em;
  color: var(--muted); padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(200, 162, 74, .14);
  white-space: nowrap; cursor: pointer;
  transition: .45s var(--ease);
}
.ai-chip i { width: 5px; height: 5px; border-radius: 50%; background: #4f4a42; transition: .45s; }
.ai-chip.on { color: var(--gold-l); border-color: rgba(200, 162, 74, .42); background: rgba(200, 162, 74, .07); }
.ai-chip.on i { background: #dcb862; box-shadow: 0 0 10px 1px rgba(220, 184, 98, .9); animation: aiBreath 2.4s ease-in-out infinite; }
.ai-chip.off { color: #8a6259; border-color: rgba(178, 58, 47, .28); }
.ai-chip.off i { background: var(--red); box-shadow: 0 0 8px rgba(178, 58, 47, .8); }
@keyframes aiBreath { 0%, 100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }

.ai-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-kai); font-size: 11px; letter-spacing: .2em;
  color: var(--gold-l); padding: 3px 9px; border-radius: 2px;
  border: 1px solid rgba(200, 162, 74, .34); background: rgba(200, 162, 74, .08);
}
.ai-tag i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 8px var(--gold-l); }
.ai-tag.local { color: #9a8f7c; border-color: rgba(200, 162, 74, .16); background: rgba(255, 255, 255, .02); }
.ai-tag.local i { background: #7d7466; box-shadow: none; }

.ai-block {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid rgba(200, 162, 74, .14);
  animation: aiFade .8s var(--ease) both;
}
@keyframes aiFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ai-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.mini-btn {
  font-family: var(--f-kai); font-size: 11.5px; letter-spacing: .16em;
  color: var(--muted); background: none; cursor: pointer;
  border: 1px solid rgba(200, 162, 74, .2); padding: 5px 12px;
  transition: .35s var(--ease);
}
.mini-btn:hover { color: var(--gold-l); border-color: rgba(200, 162, 74, .5); background: rgba(200, 162, 74, .08); }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }

.ai-pending {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--f-kai); font-size: 12px; letter-spacing: .22em;
  color: #7d7466; margin-bottom: 14px;
}
.ai-pending i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: aiBreath 1.3s ease-in-out infinite; }

.talk.writing p:last-child::after {
  content: "▍"; color: var(--red); margin-left: 3px;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

.ai-err {
  margin-top: 16px; padding: 12px 15px;
  border-left: 2px solid var(--red); background: rgba(178, 58, 47, .07);
  font-family: var(--f-kai); font-size: 12.5px; letter-spacing: .06em;
  color: #c6b5a3; line-height: 2;
}
.ai-err b { color: var(--red); font-weight: 400; margin-right: 6px; }
.ai-retry { color: var(--gold-l); cursor: pointer; border-bottom: 1px dashed rgba(200, 162, 74, .45); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .nav { padding: 10px 16px; }
  .nav-links { display: none; }
  .hero-side { display: none; }
  .grid-2, .grid-2.rev { grid-template-columns: 1fr; }
  .creed-grid { grid-template-columns: 1fr; }
  .sec { padding: 70px 16px; }
  .hero-stats { gap: 30px; }
  .tips { grid-template-columns: 1fr 1fr; }
  .hour-grid { grid-template-columns: repeat(4, 1fr); }
  .bazi-table { grid-template-columns: 44px repeat(4, 1fr); }
  .bazi-table .gz { font-size: 22px; }
  .almanac-date .d { font-size: 34px; }
  .panel { padding: 20px; }
  .yiji { grid-template-columns: 1fr; }
  .hl-meta { grid-template-columns: 1fr !important; }
  .ai-chip { font-size: 10px; letter-spacing: .1em; padding: 4px 9px; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 2rem; letter-spacing: .04em; }
  .hero-en { letter-spacing: .16em; font-size: 9px; }
  .hero-stats { gap: 22px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .brand-txt { font-size: 15px; }
  .hex { width: 100px; }
}
