/* ============================================================
   问心阁 · 设计系统 v3 「玄曜仪盘」
   墨黑底 · 铜线星图 · 赤印 · 青玉状态色
   ============================================================ */
:root {
  --bg: #11100D;
  --bg-2: #191711;
  --card: rgba(248, 242, 224, .055);
  --card-strong: rgba(248, 242, 224, .09);
  --ink: #F5EFE3;
  --ink-2: #C7BAA2;
  --ink-3: #8F846F;
  --line: rgba(226, 199, 139, .16);
  --line-strong: rgba(226, 199, 139, .32);
  --gold: #D8B76D;
  --gold-deep: #9C7136;
  --dai: #63B0A8;
  --dai-deep: #2D736B;
  --sha: #D66B49;
  --tai: #9FB56D;
  --radius: 8px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --grad-gold: linear-gradient(135deg, #F3DB9E 0%, #D8B76D 42%, #93672D 100%);
  --grad-dai: linear-gradient(135deg, #6DC3B8 0%, #2D736B 100%);
  --grad-sha: linear-gradient(135deg, #E58A65 0%, #B94931 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  min-height: 100vh;
  letter-spacing: .02em;
  overflow-x: hidden;
}

/* ---------- 液态墨彩背景（canvas 由 core.js 注入） ---------- */
.liquid-bg {
  position: fixed; inset: 0; z-index: -2;
  width: 100vw; height: 100vh;
  filter: blur(46px) saturate(1.25);
  transform: scale(1.15);
  opacity: .85;
}
/* 纸纹噪点，提升质感 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .05; mix-blend-mode: overlay;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 22px 18px calc(110px + env(safe-area-inset-bottom));
  position: relative;
}

::selection { background: rgba(227, 194, 127, .3); }

/* ---------- 水波涟漪（core.js 注入） ---------- */
.ripple-dot {
  position: fixed; z-index: 200; pointer-events: none;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(227, 194, 127, .65);
  box-shadow: 0 0 16px rgba(227, 194, 127, .25), inset 0 0 8px rgba(227, 194, 127, .2);
  transform: translate(-50%, -50%) scale(.4);
  animation: rippleOut .8s cubic-bezier(.2, .6, .3, 1) forwards;
}
@keyframes rippleOut {
  to { transform: translate(-50%, -50%) scale(6.5); opacity: 0; border-width: .5px; }
}

/* ---------- 页头 ---------- */
.pagehead { display: flex; align-items: center; gap: 14px; padding: 12px 2px 22px; }
.pagehead .seal {
  width: 44px; height: 44px; flex: none;
  background: var(--grad-sha);
  color: #FFF6E8; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  box-shadow: 0 6px 22px rgba(224, 121, 92, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: sealFloat 5s ease-in-out infinite;
}
@keyframes sealFloat {
  0%, 100% { transform: translateY(0) rotate(0); border-radius: 13px; }
  50% { transform: translateY(-4px) rotate(-2deg); border-radius: 18px; }
}
.pagehead h1 { font-size: 24px; font-weight: 700; letter-spacing: .14em; }
.pagehead .sub { font-size: 12.5px; color: var(--ink-3); letter-spacing: .1em; margin-top: -1px; }

/* ---------- 玻璃卡片 ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .45s cubic-bezier(.2, .7, .3, 1), border-color .4s, opacity .7s, box-shadow .4s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(227, 194, 127, .12), transparent 30%, transparent 70%, rgba(79, 168, 176, .1));
  opacity: 0; transition: opacity .5s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
  .card:hover::before { opacity: 1; }
}
.card-title {
  font-size: 15px; font-weight: 700; letter-spacing: .12em;
  margin-bottom: 12px; display: flex; align-items: center; gap: 9px;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: var(--grad-gold); flex: none;
}
.card-title .badge { -webkit-text-fill-color: initial; }

/* 滚动浮现 */
.reveal-init, .reveal-in { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal-init { opacity: 0; transform: translateY(26px); }
.reveal-in { opacity: 1; transform: none; }

/* ---------- 按钮（液态流光） ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--serif);
  font-size: 16px; letter-spacing: .16em;
  padding: 13px 32px; border-radius: 999px;
  border: none; cursor: pointer;
  background: var(--grad-dai); color: #EFFAF8;
  box-shadow: 0 8px 26px rgba(46, 111, 119, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, box-shadow .3s ease, filter .3s;
  background-size: 160% 160%;
  animation: gradDrift 6s ease-in-out infinite;
}
@keyframes gradDrift {
  0%, 100% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
}
/* 流光扫过 */
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 46%;
  left: -60%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  animation: sheen 3.8s ease-in-out infinite;
}
@keyframes sheen {
  0%, 55% { left: -60%; } 85%, 100% { left: 130%; }
}
.btn:active { transform: scale(.95); filter: brightness(1.12); }
.btn.sha { background: var(--grad-sha); box-shadow: 0 8px 26px rgba(194, 85, 53, .42), inset 0 1px 0 rgba(255, 255, 255, .25); background-size: 160% 160%; }
.btn.ghost {
  background: rgba(255, 255, 255, .04); color: var(--gold);
  border: 1px solid rgba(227, 194, 127, .4); box-shadow: none; animation: none;
}
.btn.ghost::after { display: none; }
.btn.small { font-size: 13.5px; padding: 8px 20px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; animation: none; }
.btn:disabled::after { display: none; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; letter-spacing: .1em; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--serif); font-size: 15.5px;
  padding: 13px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--ink); outline: none;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field input::placeholder, .field textarea::placeholder { color: #6B6457; }
.field input:focus, .field textarea:focus {
  border-color: rgba(227, 194, 127, .55);
  box-shadow: 0 0 0 3px rgba(227, 194, 127, .12), 0 0 24px rgba(227, 194, 127, .08);
  background: rgba(255, 255, 255, .06);
}

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 13.5px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .035);
  color: var(--ink-2); cursor: pointer; letter-spacing: .06em;
  transition: all .3s cubic-bezier(.2, .7, .3, 1);
}
.chip:active { transform: scale(.93); }
.chip.on {
  border-color: transparent; color: #10151A; font-weight: 700;
  background: var(--grad-gold);
  box-shadow: 0 4px 18px rgba(227, 194, 127, .35);
}

/* ---------- 徽章 ---------- */
.badge { display: inline-block; font-size: 11px; padding: 2.5px 10px; border-radius: 999px; letter-spacing: .12em; vertical-align: 2px; font-weight: 400; }
.badge.free { background: rgba(224, 121, 92, .16); color: var(--sha); border: 1px solid rgba(224, 121, 92, .4); }
.badge.grade-1 { background: rgba(227, 194, 127, .15); color: var(--gold); border: 1px solid rgba(227, 194, 127, .45); }
.badge.grade-2 { background: rgba(157, 184, 122, .14); color: var(--tai); border: 1px solid rgba(157, 184, 122, .4); }
.badge.grade-3 { background: rgba(255, 255, 255, .07); color: var(--ink-2); border: 1px solid var(--line-strong); }
.badge.grade-4 { background: rgba(224, 121, 92, .16); color: var(--sha); border: 1px solid rgba(224, 121, 92, .4); }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 44px 0 34px; position: relative; }
/* 品牌字后的液态光晕 */
.hero::before {
  content: ""; position: absolute; left: 50%; top: 46%; z-index: -1;
  width: 240px; height: 240px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(227, 194, 127, .2), rgba(79, 168, 176, .12) 45%, transparent 70%);
  border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%;
  animation: blobMorph 9s ease-in-out infinite, blobSpin 26s linear infinite;
  filter: blur(8px);
}
.hero .brand {
  font-size: 46px; font-weight: 700; letter-spacing: .3em; text-indent: .3em;
  background: linear-gradient(120deg, #F5E5BC 0%, #E3C27F 30%, #FDF4DC 50%, #C9A35C 72%, #F5E5BC 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: textFlow 7s linear infinite;
  filter: drop-shadow(0 4px 24px rgba(227, 194, 127, .25));
}
@keyframes textFlow { to { background-position: 220% center; } }
.hero .motto { margin-top: 14px; font-size: 14px; color: var(--ink-2); letter-spacing: .42em; text-indent: .42em; }
.hero .inkline {
  width: 140px; height: 1.5px; margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: inkPulse 3.5s ease-in-out infinite;
}
@keyframes inkPulse { 0%, 100% { opacity: .5; width: 110px; } 50% { opacity: 1; width: 160px; } }

.daily-quote { text-align: center; font-size: 17px; letter-spacing: .14em; padding: 6px 0 2px; color: var(--ink); }
.daily-quote .from { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; letter-spacing: .26em; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.tile {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 8px 16px; text-align: center; cursor: pointer; text-decoration: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .4s cubic-bezier(.2, .7, .3, 1), border-color .35s, box-shadow .35s;
}
.tile::before {
  content: ""; position: absolute; width: 90px; height: 90px; left: 50%; top: -46px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(227, 194, 127, .22), transparent 70%);
  border-radius: 50%; opacity: 0; transition: opacity .5s;
}
.tile:active { transform: scale(.94); }
@media (hover: hover) {
  .tile:hover { transform: translateY(-5px); border-color: rgba(227, 194, 127, .35); box-shadow: 0 16px 38px rgba(0, 0, 0, .4); }
  .tile:hover::before { opacity: 1; }
  .tile:hover .ico { transform: translateY(-3px) scale(1.12); }
}
.tile .ico { font-size: 27px; line-height: 1; display: block; color: var(--gold); transition: transform .4s cubic-bezier(.2, .7, .3, 1); }
.tile .name { display: block; margin-top: 11px; font-size: 14.5px; font-weight: 700; letter-spacing: .16em; color: var(--ink); }
.tile .hint { display: block; font-size: 11px; color: var(--ink-3); margin-top: 4px; letter-spacing: .05em; }

/* ---------- 问签 ---------- */
.tube-stage { text-align: center; padding: 30px 0 10px; }
.tube { display: inline-block; transform-origin: 50% 88%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.tube.shaking { animation: shake .2s ease-in-out 9; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.stick-fly { animation: fly .8s cubic-bezier(.18, .85, .25, 1.18) both; }
@keyframes fly {
  from { transform: translateY(34px) rotate(9deg) scale(.94); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.poem { text-align: center; padding: 8px 0 2px; }
.poem .line { font-size: 18px; letter-spacing: .32em; line-height: 2.25; color: var(--ink); }
.qian-no { text-align: center; font-size: 12.5px; color: var(--ink-3); letter-spacing: .3em; margin-bottom: 8px; }
.qian-title {
  text-align: center; font-size: 30px; font-weight: 700; letter-spacing: .3em; text-indent: .3em;
  margin-bottom: 8px;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(227, 194, 127, .3));
}
.qian-title .badge { -webkit-text-fill-color: initial; }
.jie {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 17px; font-size: 14.5px; color: var(--ink-2); margin-top: 16px;
}
.jie b { color: var(--gold); }
.yi-ji { display: flex; gap: 11px; margin-top: 13px; }
.yi-ji .half { flex: 1; border-radius: 14px; padding: 11px 15px; font-size: 13.5px; border: 1px solid; }
.yi-ji .yi { background: rgba(157, 184, 122, .1); border-color: rgba(157, 184, 122, .3); color: #C3D4A8; }
.yi-ji .ji { background: rgba(224, 121, 92, .1); border-color: rgba(224, 121, 92, .3); color: #EFA38C; }
.yi-ji .half b { display: block; font-size: 12px; letter-spacing: .34em; margin-bottom: 4px; opacity: .7; }

/* ---------- 今日历 ---------- */
.cal-top { text-align: center; padding: 10px 0 6px; }
.cal-top .gdate { font-size: 12.5px; color: var(--ink-3); letter-spacing: .12em; }
.cal-top .ldate {
  font-size: 34px; font-weight: 700; letter-spacing: .16em; margin: 8px 0 4px;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cal-top .gz { font-size: 13.5px; color: var(--dai); letter-spacing: .16em; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cal-nav button {
  font-family: var(--serif); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 17px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .25s;
}
.cal-nav button:active { transform: scale(.93); border-color: var(--gold); color: var(--gold); }
.yiji-row { display: flex; gap: 11px; }
.yiji-row .col { flex: 1; border-radius: 14px; padding: 13px 15px; font-size: 14px; line-height: 2.05; border: 1px solid; }
.yiji-row .col b { display: inline-block; width: 27px; height: 27px; border-radius: 50%; text-align: center; line-height: 27px; font-size: 14px; color: #10151A; margin-bottom: 7px; }
.yiji-row .yi-col { background: rgba(157, 184, 122, .09); border-color: rgba(157, 184, 122, .28); color: #C3D4A8; }
.yiji-row .yi-col b { background: var(--tai); }
.yiji-row .ji-col { background: rgba(224, 121, 92, .09); border-color: rgba(224, 121, 92, .28); color: #EFA38C; }
.yiji-row .ji-col b { background: var(--sha); }
.hour-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hour-cell { text-align: center; border-radius: 12px; padding: 9px 0; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: transform .25s; }
.hour-cell:active { transform: scale(.92); }
.hour-cell .h { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.hour-cell .l { font-size: 11px; margin-top: 1px; }
.hour-cell.lucky { background: rgba(227, 194, 127, .12); border-color: rgba(227, 194, 127, .4); }
.hour-cell.lucky .l { color: var(--gold); }
.hour-cell.bad { background: rgba(224, 121, 92, .1); border-color: rgba(224, 121, 92, .35); }
.hour-cell.bad .l { color: var(--sha); }
.hour-cell.mid .l { color: var(--ink-3); }

/* ---------- 心灯 ---------- */
.lamp-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.lamp {
  text-align: center; padding: 14px 4px 11px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  cursor: pointer; transition: transform .35s, border-color .35s;
  animation: lampIn .6s cubic-bezier(.2, .8, .3, 1.15) both;
}
@keyframes lampIn { from { transform: scale(.6); opacity: 0; } }
@media (hover: hover) { .lamp:hover { transform: translateY(-3px); border-color: rgba(227, 194, 127, .4); } }
.lamp .flame {
  width: 15px; height: 22px; margin: 0 auto 7px;
  background: radial-gradient(circle at 50% 78%, #FFE3A0 0%, #F2A65A 55%, rgba(242, 166, 90, 0) 78%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  animation: flicker 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 200, 110, .9)) drop-shadow(0 0 26px rgba(255, 170, 80, .4));
}
@keyframes flicker {
  0%, 100% { transform: scaleY(1) translateX(0); }
  30% { transform: scaleY(1.15) translateX(.5px); }
  60% { transform: scaleY(.92) translateX(-.5px); }
  80% { transform: scaleY(1.08); }
}
.lamp .who { font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lamp .type { font-size: 10.5px; color: var(--ink-3); }
.lamp-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lamp-opt {
  text-align: center; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 2px 10px; cursor: pointer; background: rgba(255, 255, 255, .035);
  transition: all .3s cubic-bezier(.2, .7, .3, 1);
}
.lamp-opt:active { transform: scale(.92); }
.lamp-opt.on { border-color: rgba(227, 194, 127, .55); background: rgba(227, 194, 127, .1); box-shadow: 0 0 22px rgba(227, 194, 127, .12); }
.lamp-opt .dot { width: 17px; height: 17px; border-radius: 50%; margin: 0 auto 6px; box-shadow: 0 0 12px currentColor; }
.lamp-opt .nm { font-size: 12.5px; letter-spacing: .04em; color: var(--ink-2); }
.lamp-opt.on .nm { color: var(--gold); }

/* ---------- 静坐（液态呼吸球） ---------- */
.breath-stage { text-align: center; padding: 44px 0 26px; }
.breath-circle {
  width: 170px; height: 170px; margin: 0 auto;
  background:
    radial-gradient(circle at 32% 30%, rgba(95, 183, 191, .5), transparent 55%),
    radial-gradient(circle at 70% 72%, rgba(227, 194, 127, .35), transparent 60%),
    rgba(46, 111, 119, .18);
  border: 1px solid rgba(95, 183, 191, .45);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; letter-spacing: .34em; text-indent: .34em; color: #CFEAEA;
  border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%;
  animation: blobMorph 8s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(79, 168, 176, .25), inset 0 0 40px rgba(79, 168, 176, .15);
  transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%; }
  25% { border-radius: 45% 55% 48% 52% / 58% 44% 56% 42%; }
  50% { border-radius: 52% 48% 42% 58% / 45% 52% 48% 55%; }
  75% { border-radius: 48% 52% 56% 44% / 52% 46% 54% 48%; }
}
@keyframes blobSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.breath-circle.in { transform: scale(1.32); box-shadow: 0 0 110px rgba(79, 168, 176, .45), inset 0 0 60px rgba(79, 168, 176, .25); }
.breath-circle.out { transform: scale(1); }
.timer-big {
  text-align: center; font-size: 44px; letter-spacing: .1em; padding: 10px 0;
  font-variant-numeric: tabular-nums;
  background: var(--grad-dai); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- 我的 ---------- */
.idcard {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(46, 111, 119, .55), rgba(20, 38, 44, .8));
  border: 1px solid rgba(95, 183, 191, .3);
  color: #EAF4EE; border-radius: var(--radius); padding: 24px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .45);
  margin-bottom: 18px;
}
.idcard::before {
  content: ""; position: absolute; width: 180px; height: 180px; right: -50px; top: -70px;
  background: radial-gradient(circle, rgba(227, 194, 127, .3), transparent 70%);
  border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%;
  animation: blobMorph 10s ease-in-out infinite;
  filter: blur(4px);
}
.idcard::after { content: "問"; position: absolute; right: -6px; bottom: -30px; font-size: 120px; opacity: .07; font-weight: 700; }
.idcard .lbl { font-size: 11.5px; letter-spacing: .2em; opacity: .65; }
.idcard .code {
  font-size: 32px; font-weight: 700; letter-spacing: .14em; margin: 5px 0 12px;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.idcard .light { font-size: 13px; letter-spacing: .1em; }
.idcard .light b { font-size: 21px; color: var(--gold); margin: 0 3px; }
.rec-item { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 2px; border-bottom: 1px dashed rgba(255, 255, 255, .1); font-size: 14px; }
.rec-item:last-child { border-bottom: none; }
.rec-item .t { color: var(--ink-3); font-size: 12px; flex: none; margin-left: 12px; }

/* ---------- 梦释 ---------- */
.search-bar { display: flex; gap: 10px; }
.search-bar input { flex: 1; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.meng-result .luck { font-size: 13px; margin-left: 8px; }

/* ---------- 悬浮玻璃导航坞 ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; gap: 2px;
  width: min(420px, calc(100% - 28px));
  background: rgba(22, 28, 35, .72);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none;
  color: var(--ink-3); font-size: 10px; letter-spacing: .1em;
  padding: 5px 0 3px; border-radius: 999px;
  transition: color .25s, background .35s, transform .2s;
}
.tabbar a:active { transform: scale(.9); }
.tabbar a .ti { display: block; font-size: 18px; line-height: 1.3; }
.tabbar a.on {
  color: #10151A; font-weight: 700;
  background: var(--grad-gold);
  box-shadow: 0 4px 16px rgba(227, 194, 127, .4);
}

/* ---------- 页脚 ---------- */
.sitefoot { text-align: center; padding: 30px 16px 8px; font-size: 11.5px; color: var(--ink-3); line-height: 2; letter-spacing: .05em; }

/* ---------- Toast / 弹窗 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%) translateY(10px);
  background: rgba(24, 30, 37, .9); color: var(--gold);
  border: 1px solid rgba(227, 194, 127, .35);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-size: 13.5px; padding: 10px 24px; border-radius: 999px;
  letter-spacing: .1em; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .3, 1.1);
  z-index: 99; max-width: 82vw; text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(6, 9, 12, .6); z-index: 90;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; overflow: hidden;
  background: rgba(26, 32, 40, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px; padding: 28px 24px;
  max-width: 360px; width: 100%; text-align: center;
  transform: translateY(22px) scale(.96);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.modal::before {
  content: ""; position: absolute; width: 140px; height: 140px; left: -40px; top: -60px;
  background: radial-gradient(circle, rgba(227, 194, 127, .18), transparent 70%);
  border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%;
  animation: blobMorph 9s ease-in-out infinite;
}
.modal-mask.show .modal { transform: none; }
.modal h3 {
  font-size: 19px; letter-spacing: .16em; margin-bottom: 12px;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.modal p { font-size: 14px; color: var(--ink-2); margin-bottom: 20px; position: relative; }
.modal .price { font-size: 13px; color: var(--ink-3); text-decoration: line-through; margin-right: 8px; }
.modal .now { font-size: 16px; color: var(--sha); font-weight: 700; }

/* ---------- 入场动效 ---------- */
.fade-up { animation: fadeUp .7s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } }
.fade-up:nth-child(2) { animation-delay: .08s; }
.fade-up:nth-child(3) { animation-delay: .16s; }
.fade-up:nth-child(4) { animation-delay: .24s; }
.fade-up:nth-child(5) { animation-delay: .32s; }
.hidden { display: none !important; }

@media (min-width: 760px) {
  main { padding-top: 40px; }
  .hour-grid { grid-template-columns: repeat(12, 1fr); }
}

/* ============================================================
   设计系统 v3 「玄曜仪盘」
   更硬朗的东方工具台：墨黑底、铜线、赤印、青玉状态色。
   ============================================================ */
:root {
  --bg: #11100D;
  --bg-2: #191711;
  --card: rgba(248, 242, 224, .055);
  --card-strong: rgba(248, 242, 224, .09);
  --ink: #F5EFE3;
  --ink-2: #C7BAA2;
  --ink-3: #8F846F;
  --line: rgba(226, 199, 139, .16);
  --line-strong: rgba(226, 199, 139, .32);
  --gold: #D8B76D;
  --gold-deep: #9C7136;
  --dai: #63B0A8;
  --dai-deep: #2D736B;
  --sha: #D66B49;
  --tai: #9FB56D;
  --radius: 8px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --grad-gold: linear-gradient(135deg, #F3DB9E 0%, #D8B76D 42%, #93672D 100%);
  --grad-dai: linear-gradient(135deg, #6DC3B8 0%, #2D736B 100%);
  --grad-sha: linear-gradient(135deg, #E58A65 0%, #B94931 100%);
}

body, body * { letter-spacing: 0 !important; }

body {
  background:
    linear-gradient(90deg, rgba(216, 183, 109, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216, 183, 109, .035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(99, 176, 168, .16), transparent 42%),
    linear-gradient(165deg, #11100D 0%, #15130F 52%, #0B1110 100%);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.liquid-bg {
  filter: none;
  transform: none;
  opacity: .42;
  mix-blend-mode: screen;
}

main {
  max-width: 760px;
  padding-top: 26px;
}
body[data-page="home"] main,
body[data-page="ming"] main {
  max-width: 1080px;
}

.card, .tile, .feature-card, .lamp, .lamp-opt, .jie, .yi-ji .half,
.yiji-row .col, .hour-cell, .idcard, .modal, .field input,
.field textarea, .field select, .bazi-console, .checkin-panel,
.dayun-cell {
  border-radius: 8px !important;
}

.card {
  border-color: var(--line);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .045);
}

.pagehead {
  border-bottom: 1px solid rgba(216, 183, 109, .12);
  margin-bottom: 18px;
}
.pagehead .seal {
  position: relative;
  border-radius: 8px;
  background: #B94931;
  box-shadow: 0 10px 24px rgba(185, 73, 49, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.pagehead .seal::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(216, 183, 109, .28);
  opacity: 0;
  animation: sealPulse 3.6s ease-in-out infinite;
}
@keyframes sealPulse {
  0%, 52%, 100% { transform: scale(.82); opacity: 0; }
  18% { transform: scale(1.08); opacity: .72; }
}
.pagehead h1 { font-size: 25px; }
.pagehead-command { justify-content: space-between; }

.btn {
  border-radius: 8px;
  min-height: 46px;
  box-shadow: 0 10px 26px rgba(45, 115, 107, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.ghost {
  background: rgba(248, 242, 224, .035);
  border-color: rgba(216, 183, 109, .32);
}
.field input, .field textarea, .field select {
  background: rgba(10, 11, 9, .38);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(216, 183, 109, .62);
  box-shadow: 0 0 0 3px rgba(216, 183, 109, .12);
}

/* ---------- 首页 v3 ---------- */
.home-main {
  padding-top: 34px;
}
.home-hero {
  min-height: clamp(430px, 70vh, 620px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 34px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(216, 183, 109, .16);
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 8% 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 183, 109, .48), transparent);
  animation: scanLine 6s ease-in-out infinite;
}
@keyframes scanLine {
  0%, 100% { opacity: .22; transform: translateX(-8%); }
  50% { opacity: .78; transform: translateX(8%); }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dai);
  font-size: 12px;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.hero-copy h1 {
  font-size: clamp(56px, 9vw, 112px);
  line-height: .92;
  margin: 16px 0 20px;
  color: var(--ink);
  text-shadow: 0 18px 45px rgba(0, 0, 0, .35);
  animation: titleRise .9s cubic-bezier(.18, .8, .25, 1) both;
}
@keyframes titleRise {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
}
.hero-copy p {
  max-width: 560px;
  font-size: 17px;
  color: var(--ink-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-orbit {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 430px);
  margin-left: auto;
  border: 1px solid rgba(216, 183, 109, .22);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(216, 183, 109, .22) 50%, transparent calc(50% + .5px)),
    linear-gradient(0deg, transparent calc(50% - .5px), rgba(216, 183, 109, .22) 50%, transparent calc(50% + .5px));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: orbitBreathe 8s ease-in-out infinite;
}
@keyframes orbitBreathe {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(216, 183, 109, 0)); }
  50% { filter: drop-shadow(0 0 28px rgba(99, 176, 168, .12)); }
}
.orbit-ring {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(216, 183, 109, .3);
  border-radius: 50%;
  animation: ringSpin 34s linear infinite;
}
.ring-b {
  inset: 28%;
  border-color: rgba(99, 176, 168, .34);
  animation-duration: 22s;
  animation-direction: reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.orbit-center {
  position: absolute;
  inset: 39%;
  display: grid;
  place-items: center;
  background: rgba(185, 73, 49, .86);
  color: #FFF4E4;
  font-size: 42px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .22);
  animation: centerGlow 4.5s ease-in-out infinite;
}
@keyframes centerGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(185, 73, 49, 0); }
  50% { box-shadow: 0 0 36px rgba(185, 73, 49, .38); }
}
.hero-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(216, 183, 109, .26);
  background: rgba(17, 16, 13, .72);
  transform: rotate(calc(var(--i) * 36deg)) translateY(-178px) rotate(calc(var(--i) * -36deg));
  animation: stemBlink 5.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .18s);
}
@keyframes stemBlink {
  0%, 100% { border-color: rgba(216, 183, 109, .2); color: rgba(216, 183, 109, .78); }
  45% { border-color: rgba(99, 176, 168, .58); color: #F3DB9E; }
}

.home-strip {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin: 22px 0;
}
.home-strip .daily-quote,
.home-stats {
  background: rgba(248, 242, 224, .045);
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 104px;
}
.home-strip .daily-quote {
  display: grid;
  align-content: center;
  text-align: left;
  font-size: 18px;
}
.home-strip .daily-quote .from {
  margin-top: 6px;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.home-stats div {
  display: grid;
  align-content: center;
  border-left: 1px solid rgba(216, 183, 109, .18);
  padding-left: 12px;
}
.home-stats span {
  color: var(--ink-3);
  font-size: 12px;
}
.home-stats b {
  color: var(--gold);
  font-size: 28px;
  line-height: 1.1;
  animation: numberWake .7s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes numberWake {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.feature-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(248, 242, 224, .045);
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
  animation: cardDeal .72s cubic-bezier(.18, .8, .25, 1) both;
  animation-delay: calc(var(--card-i, 0) * .055s);
}
.feature-card:nth-child(1) { --card-i: 1; }
.feature-card:nth-child(2) { --card-i: 2; }
.feature-card:nth-child(3) { --card-i: 3; }
.feature-card:nth-child(4) { --card-i: 4; }
.feature-card:nth-child(5) { --card-i: 5; }
.feature-card:nth-child(6) { --card-i: 6; }
.feature-card:nth-child(7) { --card-i: 7; }
@keyframes cardDeal {
  from { opacity: 0; transform: translateY(18px) rotateX(10deg); }
}
.feature-card.primary {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(185, 73, 49, .28), transparent 54%),
    rgba(248, 242, 224, .06);
}
@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 183, 109, .52);
    background: rgba(248, 242, 224, .075);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32), 0 0 26px rgba(216, 183, 109, .08);
  }
}
.feature-card .ico {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 183, 109, .25);
  color: var(--gold);
  font-weight: 700;
  transition: transform .25s ease, background .25s ease;
}
.feature-card:hover .ico { transform: translateY(-2px) rotate(-4deg); background: rgba(216, 183, 109, .08); }
.feature-card .name {
  display: block;
  margin-top: auto;
  font-size: 20px;
  font-weight: 700;
}
.feature-card .hint {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.checkin-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(99, 176, 168, .24);
  background: rgba(99, 176, 168, .06);
  animation: panelWake .8s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes panelWake {
  from { opacity: 0; transform: translateY(16px); }
}
.checkin-panel h2 {
  font-size: 24px;
  color: var(--ink);
}
.checkin-panel p {
  color: var(--ink-2);
  font-size: 14px;
}

/* ---------- 命盘 ---------- */
.bazi-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(216, 183, 109, .22);
  background:
    linear-gradient(135deg, rgba(185, 73, 49, .16), transparent 34%),
    linear-gradient(90deg, rgba(99, 176, 168, .1), transparent 55%),
    rgba(248, 242, 224, .045);
  padding: 22px;
  margin-bottom: 18px;
}
.bazi-console::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(216, 183, 109, .22);
  transform: rotate(45deg);
  pointer-events: none;
}
.console-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.console-top h2 {
  font-size: 30px;
  line-height: 1.2;
  margin-top: 4px;
}
.console-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #B94931;
  color: #FFF4E4;
  font-size: 26px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .2);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.form-grid .wide {
  grid-column: span 3;
}
.console-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.tool-note, .muted {
  color: var(--ink-3);
  font-size: 12.5px;
}
.tool-note {
  margin-top: 12px;
}
.bazi-result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(216, 183, 109, .16);
  padding-bottom: 16px;
  margin-bottom: 16px;
  animation: chartIn .62s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes chartIn {
  from { opacity: 0; transform: translateY(14px); }
}
.bazi-result-head span {
  color: var(--dai);
  font-size: 12px;
}
.bazi-result-head h2 {
  font-size: 32px;
  line-height: 1.2;
}
.bazi-result-head p {
  color: var(--ink-3);
  font-size: 13px;
}
.day-master {
  width: 92px;
  height: 92px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(185, 73, 49, .18);
  border: 1px solid rgba(185, 73, 49, .42);
  animation: dayMasterPop .72s cubic-bezier(.18, .9, .24, 1.18) both;
}
@keyframes dayMasterPop {
  from { opacity: 0; transform: scale(.78) rotate(-3deg); }
}
.day-master small,
.day-master span {
  color: var(--ink-3);
  font-size: 12px;
}
.day-master b {
  font-size: 38px;
  color: var(--sha);
  line-height: .9;
}
.bazi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.bazi-meta span {
  border: 1px solid rgba(216, 183, 109, .18);
  background: rgba(248, 242, 224, .035);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  animation: tokenIn .5s ease both;
}
.bazi-meta span:nth-child(2) { animation-delay: .05s; }
.bazi-meta span:nth-child(3) { animation-delay: .1s; }
.bazi-meta span:nth-child(4) { animation-delay: .15s; }
@keyframes tokenIn {
  from { opacity: 0; transform: translateY(8px); }
}
.bazi-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(216, 183, 109, .16);
  margin-bottom: 16px;
}
.bazi-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.bazi-table tr {
  animation: tableRowIn .55s cubic-bezier(.2, .8, .3, 1) both;
}
.bazi-table tr:nth-child(2) { animation-delay: .05s; }
.bazi-table tr:nth-child(3) { animation-delay: .1s; }
.bazi-table tr:nth-child(4) { animation-delay: .15s; }
@keyframes tableRowIn {
  from { opacity: 0; transform: translateX(-12px); }
}
.bazi-table th,
.bazi-table td {
  border-bottom: 1px solid rgba(216, 183, 109, .13);
  border-right: 1px solid rgba(216, 183, 109, .13);
  padding: 12px;
  text-align: center;
  vertical-align: top;
}
.bazi-table th:last-child,
.bazi-table td:last-child {
  border-right: none;
}
.bazi-table tr:last-child td {
  border-bottom: none;
}
.bazi-table th {
  color: var(--gold);
  background: rgba(216, 183, 109, .06);
}
.bazi-table td:first-child {
  color: var(--ink-3);
  width: 78px;
}
.bazi-table b {
  display: block;
  color: var(--ink);
  font-size: 24px;
}
.bazi-table small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 4px;
}
.bazi-two-col {
  display: grid;
  grid-template-columns: .95fr 1.2fr;
  gap: 16px;
}
.bazi-two-col section,
.bazi-section {
  border: 1px solid rgba(216, 183, 109, .16);
  background: rgba(248, 242, 224, .035);
  padding: 16px;
  margin-bottom: 16px;
}
.bazi-two-col h3,
.bazi-section h3 {
  font-size: 17px;
  margin-bottom: 12px;
  color: var(--gold);
}
.element-bars {
  display: grid;
  gap: 10px;
}
.element-row {
  display: grid;
  grid-template-columns: 24px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.element-row div {
  height: 10px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.element-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--dai), var(--gold));
  transform-origin: left center;
  animation: barGrow .9s cubic-bezier(.18, .8, .25, 1) both;
}
@keyframes barGrow {
  from { transform: scaleX(0); }
}
.element-row em {
  color: var(--ink-3);
  font-style: normal;
  text-align: right;
}
.reading-list p {
  color: var(--ink-2);
  font-size: 14px;
  margin-bottom: 10px;
}
.reading-list p:last-child {
  margin-bottom: 0;
}
.dayun-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.dayun-cell {
  border: 1px solid rgba(216, 183, 109, .16);
  background: rgba(10, 11, 9, .24);
  padding: 12px;
  animation: dayunIn .55s cubic-bezier(.2, .8, .3, 1) both;
}
.dayun-cell:nth-child(2) { animation-delay: .04s; }
.dayun-cell:nth-child(3) { animation-delay: .08s; }
.dayun-cell:nth-child(4) { animation-delay: .12s; }
.dayun-cell:nth-child(5) { animation-delay: .16s; }
.dayun-cell:nth-child(6) { animation-delay: .2s; }
.dayun-cell:nth-child(7) { animation-delay: .24s; }
.dayun-cell:nth-child(8) { animation-delay: .28s; }
@keyframes dayunIn {
  from { opacity: 0; transform: translateY(10px); }
}
.dayun-cell b {
  display: block;
  color: var(--ink);
  font-size: 20px;
}
.dayun-cell span,
.dayun-cell small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.deep-action {
  margin-top: 14px;
}

/* ---------- 导航 ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  width: min(720px, calc(100% - 24px));
  border-radius: 16px;
  padding: 7px;
  background: rgba(13, 12, 10, .82);
}
.tabbar a {
  min-width: 0;
  border-radius: 10px;
  padding: 5px 0 4px;
  font-size: 10px;
  position: relative;
  overflow: hidden;
}
.tabbar a .ti {
  font-size: 17px;
  transition: transform .25s ease;
}
.tabbar a::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 3px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(.2);
  transition: opacity .25s ease, transform .25s ease;
}
.tabbar a.on::after {
  opacity: .55;
  transform: scaleX(1);
}
.tabbar a.on .ti {
  animation: navPulse 2.8s ease-in-out infinite;
}
@keyframes navPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (max-width: 860px) {
  body[data-page="home"] main,
  body[data-page="ming"] main {
    max-width: 760px;
  }
  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 30px 0 18px;
  }
  .hero-orbit {
    width: min(100%, 320px);
    margin: 4px auto 0;
  }
  .hero-orbit span {
    transform: rotate(calc(var(--i) * 36deg)) translateY(-132px) rotate(calc(var(--i) * -36deg));
  }
  .home-strip,
  .bazi-two-col {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card.primary {
    grid-column: span 2;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .wide {
    grid-column: span 2;
  }
  .dayun-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: calc(156px + env(safe-area-inset-bottom));
  }
  .hero-copy h1 {
    font-size: 58px;
  }
  .hero-actions,
  .console-actions,
  .checkin-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .home-stats {
    grid-template-columns: 1fr;
  }
  .feature-grid,
  .form-grid,
  .dayun-grid {
    grid-template-columns: 1fr;
  }
  .feature-card.primary,
  .form-grid .wide {
    grid-column: auto;
  }
  .bazi-result-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .day-master {
    width: 100%;
    height: 76px;
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 10px;
  }
  .tabbar a {
    font-size: 10px;
    padding: 4px 0 5px;
  }
  .tabbar a .ti {
    font-size: 15px;
  }
  .tabbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(430px, calc(100% - 20px));
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 5px;
    padding: 8px;
  }
}

/* ---------- 动效减弱偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .liquid-bg { display: none; }
  body { background: linear-gradient(160deg, #11100D, #0B1110); }
}
