:root {
  --paper: #f7f4ec;
  --paper-2: #eef1ec;
  --ink: #181613;
  --muted: rgba(24, 22, 19, .62);
  --soft: rgba(24, 22, 19, .07);
  --line: rgba(24, 22, 19, .12);
  --line-strong: rgba(24, 22, 19, .2);
  --seal: #a8332b;
  --seal-2: #c85246;
  --jade: #526f5e;
  --copper: #9b7040;
  --gold: #d9bd7a;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .78);
  --shadow: 0 30px 90px rgba(42, 36, 27, .12);
  --shadow-soft: 0 14px 40px rgba(42, 36, 27, .08);
  --radius: 18px;
  --max: 1200px;
  --font-eastern: "STSongti-SC-Regular", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Droid Serif", serif;
  --font-eastern-bold: "STSongti-SC-Bold", "STSongti-SC-Regular", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Droid Serif", serif;
  --font-ui: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mobile-serif: "ZhiwuSongti", serif;
}

@font-face {
  font-family: "ZhiwuSongti";
  src: url("fonts/zhiwu-songti-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(126, 154, 135, .14), transparent 27%),
    radial-gradient(circle at 88% 8%, rgba(168, 51, 43, .08), transparent 28%),
    linear-gradient(180deg, #fbfaf6 0%, #f7f4ec 46%, #eef1ec 100%);
  font-family: var(--font-eastern);
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(29, 26, 21, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 26, 21, .02) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(29, 26, 21, .05) 0 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px, 128px 128px;
  mask-image: radial-gradient(circle at 50% 26%, black 0%, transparent 82%);
}

button,
input,
select { font: inherit; }

a { color: inherit; }

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: min(100%, var(--max));
  max-width: 100vw;
  min-height: 78px;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid rgba(24, 22, 19, .07);
  background: linear-gradient(180deg, rgba(251, 250, 246, .82), rgba(251, 250, 246, .52));
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, .56);
  box-shadow: 0 12px 28px rgba(48, 37, 20, .08);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--seal);
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 0 0 7px rgba(155, 47, 39, .04);
}

.brand-mark::before {
  content: "武";
  font-size: 16px;
  line-height: 1;
}

.nav {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: clamp(22px, 3vw, 38px);
  color: rgba(29, 26, 21, .66);
  font-size: 15px;
  letter-spacing: .12em;
  white-space: nowrap;
}

.nav a {
  text-decoration: none;
  position: relative;
  padding: 8px 0;
}

.nav-menu {
  position: relative;
}

.nav-menu[open] {
  z-index: 1100;
}

.nav-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 0;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "⌄";
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.nav-menu-list {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  z-index: 1200;
  min-width: 172px;
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(252, 250, 245, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  display: grid;
  gap: 2px;
}

.nav-menu-list a {
  padding: 10px 12px;
  border-radius: 12px;
  white-space: nowrap;
  color: var(--ink);
  letter-spacing: .06em;
  display: block;
}

.nav-menu-list a:hover {
  background: rgba(155, 47, 39, .08);
}

.nav a.active {
  color: var(--ink);
  font-weight: 700;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--seal);
}

.ghost-btn,
.solid-btn,
.icon-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  letter-spacing: .08em;
  box-shadow: 0 8px 24px rgba(42, 36, 27, .06);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.solid-btn {
  border-color: rgba(29, 26, 21, .86);
  background: var(--ink);
  color: #fff8e8;
}

.ghost-btn:hover,
.solid-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(42, 36, 27, .1);
}

.icon-btn {
  width: 40px;
  padding: 0;
  font-size: 18px;
}

.main {
  width: min(100%, var(--max));
  max-width: 100vw;
  margin: 0 auto;
  padding: 30px 22px 58px;
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  gap: 30px;
  align-items: center;
}

.home-almanac {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(330px, .78fr);
  gap: 28px;
  align-items: center;
  position: relative;
}

.home-almanac::before {
  content: "";
  position: absolute;
  inset: -22px -20px auto auto;
  width: min(42vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: .42;
  background:
    repeating-radial-gradient(circle, transparent 0 26px, rgba(155, 112, 64, .12) 27px, transparent 29px),
    repeating-conic-gradient(from -8deg, rgba(82, 111, 94, .12) 0 .7deg, transparent .7deg 12deg);
  mask-image: radial-gradient(circle, black 0 58%, transparent 70%);
}

.home-copy {
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.home-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(56px, 8vw, 108px);
  line-height: .96;
  letter-spacing: .08em;
  font-weight: 900;
}

.daily-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.daily-meta span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(155, 47, 39, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  color: rgba(29, 26, 21, .72);
  font-size: 14px;
}

.today-panel {
  min-height: 324px;
  padding: 24px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.32)),
    radial-gradient(circle at 92% 88%, rgba(155, 47, 39, .08), transparent 35%);
}

.today-panel::after {
  content: "";
  position: absolute;
  right: -94px;
  bottom: -112px;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .7;
  background:
    repeating-radial-gradient(circle, transparent 0 17px, rgba(29, 26, 21, .07) 18px, transparent 19px),
    repeating-conic-gradient(rgba(155, 112, 64, .14) 0 1deg, transparent 1deg 15deg);
}

.today-top,
.today-stat {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff8e8;
  font-weight: 800;
  letter-spacing: .06em;
}

.today-panel strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 360px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.36;
  letter-spacing: .04em;
}

.today-stat {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.today-stat span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--seal);
  font-size: 13px;
  letter-spacing: .28em;
}

h1,
h2,
h3,
p { margin-top: 0; }

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.04;
  letter-spacing: .08em;
  font-weight: 800;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .46));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  min-height: 286px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -18% -42% auto;
  width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 18px, rgba(29, 26, 21, .055) 19px, transparent 20px),
    repeating-conic-gradient(rgba(155, 112, 64, .18) 0 1deg, transparent 1deg 15deg);
}

.seal {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(155, 47, 39, .74);
  color: var(--seal);
  font-weight: 800;
  letter-spacing: .08em;
  transform: rotate(-3deg);
}

.hero-card strong {
  display: block;
  position: relative;
  z-index: 1;
  font-size: 26px;
  line-height: 1.35;
}

.section-head {
  margin: 48px 0 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: .12em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .42);
  text-decoration: none;
  display: grid;
  align-content: space-between;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 47, 39, .28);
  background: rgba(255, 255, 255, .6);
}

.service-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.service-card h3 {
  margin: 18px 0 8px;
  font-size: 24px;
  letter-spacing: .08em;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.daily-copy {
  margin-top: 18px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.34));
}

.daily-copy .section-head {
  margin-top: 0;
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.copy-grid article {
  min-height: 202px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.copy-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 47, 39, .22);
  background: rgba(255,255,255,.52);
}

.copy-grid h3 {
  margin: 12px 0 8px;
  font-size: 22px;
  letter-spacing: .08em;
}

.copy-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.small-round {
  width: 48px;
  height: 48px;
  margin-bottom: 0;
  font-size: 21px;
  color: var(--seal);
}

.dark-round {
  color: var(--ink);
}

.status {
  color: var(--seal);
}

.quick-services {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-services a {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 18px;
  border: 1px solid rgba(217, 189, 122, .58);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .42)),
    rgba(255, 255, 255, .62);
  text-decoration: none;
  color: var(--ink);
  letter-spacing: .12em;
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px rgba(255, 255, 255, .38);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.quick-services a::after {
  content: none;
}

.quick-services a:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 189, 122, .86);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(248, 238, 232, .74));
  color: var(--seal);
  box-shadow:
    0 20px 52px rgba(48, 37, 20, .14),
    inset 0 0 0 1px rgba(168, 51, 43, .1);
}

.product-preview {
  margin-top: 18px;
  padding: 22px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-grid article {
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .54), rgba(255, 255, 255, .28));
}

.product-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--seal);
  font-size: 13px;
  letter-spacing: .14em;
}

.product-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
  letter-spacing: .08em;
}

.product-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.page-title {
  display: grid;
  gap: 10px;
  margin: 28px 0 20px;
  text-align: center;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: .12em;
}

.page-title p {
  margin: 0;
  color: var(--muted);
}

.workspace {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.notice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  color: rgba(29, 26, 21, .58);
  font-size: 13px;
  letter-spacing: .05em;
}

.altar {
  width: min(94vw, 420px);
  min-height: 430px;
  display: grid;
  justify-items: center;
  align-content: start;
  position: relative;
}

.luopan {
  width: min(84vw, 340px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 8px;
  border-radius: 50%;
  opacity: .86;
}

.luopan::before,
.luopan::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.luopan::before {
  inset: 0;
  background:
    radial-gradient(circle, transparent 0 32%, rgba(82, 111, 94, .07) 33% 41%, transparent 42%),
    repeating-radial-gradient(circle, transparent 0 24px, rgba(29, 26, 21, .08) 25px, transparent 26px),
    repeating-conic-gradient(from -8deg, rgba(29, 26, 21, .10) 0 .55deg, transparent .55deg 15deg);
  border: 1px solid rgba(29, 26, 21, .08);
  animation: luopanTurn 88s linear infinite;
}

.luopan::after {
  inset: 15%;
  border: 1px solid rgba(29, 26, 21, .07);
  box-shadow: 0 0 0 22px rgba(255,255,255,.2), inset 0 0 44px rgba(255,255,255,.42);
}

@keyframes luopanTurn { to { transform: rotate(360deg); } }

.ring-word {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1em;
  height: 1.6em;
  margin: -.8em 0 0 -.5em;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: rgba(29, 26, 21, .30);
  font-size: 12px;
  transform: rotate(var(--angle)) translateY(-146px);
  transform-origin: center;
}

.shell {
  width: 144px;
  height: 184px;
  border-radius: 48% 48% 44% 44%;
  position: relative;
  z-index: 2;
  margin-top: -258px;
  background:
    radial-gradient(circle at 45% 28%, rgba(255,236,173,.52), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(217,189,122,.42), transparent 52%),
    linear-gradient(135deg, #b9894b, #75502b 45%, #3c2819 100%);
  border: 1px solid rgba(88,58,30,.6);
  box-shadow: inset 0 0 24px rgba(255,230,164,.22), inset 0 -18px 36px rgba(0,0,0,.34), 0 18px 42px rgba(67,48,28,.2);
  animation: shellBreath 3.8s ease-in-out infinite alternate;
}

@keyframes shellBreath { to { transform: translateY(3px) scale(1.015); } }

.shell::before {
  content: "☰";
  position: absolute;
  left: 50%;
  top: 17px;
  width: 48px;
  height: 40px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(38,25,12,.72);
  font-size: 22px;
  background: rgba(255,226,150,.24);
  border: 1px solid rgba(50,34,16,.16);
}

.scutes {
  position: absolute;
  inset: 14px 15px;
  border-radius: 46%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(38,25,12,.4) 50%, transparent 51%),
    linear-gradient(28deg, transparent 46%, rgba(38,25,12,.28) 47%, transparent 49%),
    linear-gradient(-28deg, transparent 46%, rgba(38,25,12,.28) 47%, transparent 49%),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(38,25,12,.3) 30px, transparent 32px);
  border: 1px solid rgba(38,25,12,.28);
}

.coins {
  width: 250px;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
  margin-top: 6px;
  position: relative;
  z-index: 3;
}

.coin {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  color: rgba(39,25,12,.76);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,246,205,.86), transparent 17%),
    radial-gradient(circle, #d4b06e 0 48%, #8a5d2e 49% 65%, #55351d 66% 100%);
  box-shadow: inset 0 0 0 2px rgba(69,45,23,.32), inset 0 0 0 8px rgba(255,231,158,.18), 0 12px 24px rgba(55,36,17,.16);
  transition: filter .18s ease;
}

.coin:nth-child(1),
.coin:nth-child(3) { transform: translateY(-12px); }
.coin:nth-child(2) { transform: translateY(20px); }
.coin:hover { filter: brightness(1.08); }
.coin::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 4px;
  background: rgba(52,34,16,.52);
}
.coin::after {
  content: attr(data-face);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
}
.coin.flip { animation: coinFlip .68s cubic-bezier(.2,.8,.2,1); }
@keyframes coinFlip {
  45% { transform: translateY(var(--coin-y, 0)) rotateY(84deg) scale(1.08); }
  100% { transform: translateY(var(--coin-y, 0)) rotateY(0deg) scale(1); }
}

.shake-row {
  margin-top: 3px;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: rgba(29, 26, 21, .42);
  font-size: 13px;
  letter-spacing: .12em;
}

.shake {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(235,227,209,.26));
  color: rgba(29, 26, 21, .52);
  cursor: pointer;
}

.lines {
  width: 220px;
  min-height: 146px;
  margin-top: 6px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 3;
}

.yao {
  width: 154px;
  height: 10px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: lineIn .36s ease forwards;
  position: relative;
}
.yao::before,
.yao::after {
  content: "";
  height: 8px;
  border-radius: 999px;
  background: var(--ink);
}
.yao.yin { grid-template-columns: 1fr 1fr; }
.yao.moving::after { box-shadow: 14px 0 0 -2px var(--seal); }
.yao.yang.moving::after {
  position: absolute;
  right: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--seal);
}
@keyframes lineIn { to { opacity: 1; transform: none; } }

.stage-label {
  min-height: 28px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .08em;
}

.result {
  width: min(100%, 500px);
  display: none;
  padding: 18px;
}
.result.show {
  display: grid;
  gap: 13px;
  animation: resultIn .42s ease both;
}
@keyframes resultIn { from { opacity: 0; transform: translateY(8px); } }

.result-head,
.almanac-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.hex-name {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .12em;
}

.hex-time,
.micro {
  color: var(--muted);
  font-size: 12px;
}

.result-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  min-height: 86px;
  background: rgba(255,255,255,.34);
}
.mini-card b,
.info-card b {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.mini-card span,
.info-card span {
  display: block;
  font-size: 20px;
  letter-spacing: .08em;
  font-weight: 700;
}

.fortune-text,
.body-text {
  margin: 0;
  color: rgba(29, 26, 21, .74);
  line-height: 1.85;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.recent {
  width: min(100%, 500px);
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-bottom: 16px;
}
.recent a {
  color: rgba(29, 26, 21, .42);
  text-decoration: none;
  font-size: 12px;
  text-align: center;
  letter-spacing: .04em;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(245, 241, 230, .66);
  backdrop-filter: blur(10px);
}
.dialog.show { display: grid; }
.dialog-card {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(252, 250, 242, .96);
  box-shadow: var(--shadow);
}
.dialog-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: .12em;
}
.dialog-card p {
  margin: 0 0 18px;
  line-height: 1.9;
  color: rgba(29, 26, 21, .72);
}

.almanac-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.calendar-card,
.almanac-card {
  padding: 18px;
}

.calendar-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 13px;
}
.calendar-mini b,
.calendar-mini span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}
.calendar-mini b { color: var(--muted); font-weight: 500; }
.calendar-mini span {
  background: rgba(255,255,255,.36);
  border: 1px solid transparent;
}
.calendar-mini .active-day {
  color: #fff8e8;
  background: var(--seal);
}

.static-note {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.date-stamp {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid rgba(155, 47, 39, .24);
  border-radius: 999px;
  color: var(--seal);
  background: rgba(255, 255, 255, .42);
  font-weight: 700;
  letter-spacing: .08em;
}

.static-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.date-number {
  font-size: clamp(88px, 18vw, 148px);
  line-height: .88;
  color: var(--seal);
  font-weight: 900;
  letter-spacing: -.04em;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255,255,255,.42);
  color: var(--muted);
  font-size: 13px;
}

.yi-ji {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.yi,
.ji {
  min-height: 170px;
  padding: 18px;
}

.round-title {
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
}
.yi .round-title { color: var(--seal); }
.ji .round-title { color: var(--ink); }

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.word-list li {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.44);
  border: 1px solid var(--line);
  font-weight: 700;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.time-block h3 {
  margin: 0 0 10px;
  color: var(--seal);
}
.time-block {
  padding: 16px;
}
.time-block p {
  margin: 0 0 6px;
  color: rgba(29,26,21,.74);
  line-height: 1.6;
}

.info-card span.micro {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.6;
}

.blessing-main {
  padding-top: 24px;
}

.blessing-title {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.blessing-workspace {
  min-height: 580px;
  margin-top: 28px;
  padding: clamp(20px, 4vw, 46px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(320px, .72fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
}

.blessing-workspace::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(168, 51, 43, .08);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.blessing-dial {
  position: absolute;
  right: min(-7vw, -20px);
  bottom: min(-16vw, -110px);
  width: min(54vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .52;
  background:
    radial-gradient(circle, transparent 0 18%, rgba(168, 51, 43, .05) 19% 20%, transparent 21% 100%),
    repeating-radial-gradient(circle, transparent 0 24px, rgba(24, 22, 19, .06) 25px, transparent 26px),
    repeating-conic-gradient(from 0deg, rgba(155, 112, 64, .13) 0 1deg, transparent 1deg 8deg);
  mask-image: radial-gradient(circle, transparent 0 13%, black 15% 72%, transparent 77%);
  animation: blessingTurn 72s linear infinite;
}

.blessing-dial-item {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(24, 22, 19, .42);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  writing-mode: vertical-rl;
  transform-origin: center;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--distance)));
}

.blessing-dial-item.term {
  color: rgba(168, 51, 43, .56);
}

.blessing-dial-item.gua {
  font-size: 10px;
  color: rgba(82, 111, 94, .5);
}

@keyframes blessingTurn {
  to { transform: rotate(360deg); }
}

.blessing-copy,
.blessing-card {
  position: relative;
  z-index: 1;
}

.blessing-copy h2 {
  margin: 20px 0 14px;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 1;
  letter-spacing: .08em;
}

.blessing-copy p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
}

.blessing-fields {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 12px;
}

.blessing-fields label {
  display: grid;
  gap: 8px;
  color: rgba(24, 22, 19, .56);
  font-size: 13px;
  letter-spacing: .08em;
}

.blessing-fields input,
.blessing-fields select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.blessing-fields input:focus,
.blessing-fields select:focus {
  border-color: rgba(168, 51, 43, .36);
  box-shadow: 0 0 0 4px rgba(168, 51, 43, .08);
}

.blessing-card {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(24, 22, 19, .12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .5)),
    rgba(255, 255, 255, .62);
  box-shadow: 0 24px 70px rgba(42, 36, 27, .13);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.oracle-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: rgba(24, 22, 19, .58);
  letter-spacing: .14em;
  font-size: 14px;
}

.oracle-line strong {
  color: var(--ink);
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: .08em;
  white-space: nowrap;
}

.oracle-line span:first-child { text-align: right; }

.blessing-slots {
  margin: 30px 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.blessing-slot {
  min-height: 128px;
  border: 1px solid rgba(155, 112, 64, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 189, 122, .18), transparent 48%),
    rgba(255, 255, 255, .66);
  display: grid;
  place-items: center;
  padding: 14px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.blessing-slot b {
  font-size: clamp(46px, 7vw, 72px);
  line-height: 1;
  letter-spacing: .02em;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

.blessing-slot b.rolling {
  color: var(--seal);
  filter: blur(.6px);
}

.blessing-slot b.done {
  color: var(--ink);
  text-shadow: 0 10px 26px rgba(168, 51, 43, .16);
}

.blessing-slot span {
  color: rgba(24, 22, 19, .52);
  letter-spacing: .18em;
}

.blessing-result {
  min-height: 118px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(24, 22, 19, .1);
  border-radius: 18px;
  background: rgba(247, 244, 236, .68);
}

.blessing-result strong {
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.35;
  letter-spacing: .06em;
}

.blessing-result span,
.blessing-result p {
  margin: 0;
  color: var(--muted);
}

.blessing-button {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  font-size: 18px;
}

.blessing-button:disabled {
  opacity: .62;
  cursor: wait;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--seal-2);
  box-shadow: 0 0 18px rgba(168, 51, 43, .34);
  animation: blessingParticle .9s ease-out forwards;
}

@keyframes blessingParticle {
  to {
    transform: translate(var(--x), var(--y)) scale(.2);
    opacity: 0;
  }
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(29, 26, 21, .42);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .18s ease;
}

.contact-modal.show {
  opacity: 1;
}

.contact-card {
  width: min(100%, 420px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  position: relative;
  padding: 28px;
  border: 1px solid rgba(155, 47, 39, .24);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(155, 47, 39, .08), transparent 42%),
    rgba(252, 250, 242, .98);
  box-shadow: 0 30px 90px rgba(29, 26, 21, .28);
  text-align: center;
  transform: translateY(8px);
  transition: transform .18s ease;
}

.contact-modal.show .contact-card {
  transform: translateY(0);
}

.contact-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 26, 21, .06);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.contact-card h2 {
  margin: 4px 0 10px;
  font-size: 30px;
  letter-spacing: .12em;
}

.contact-card p {
  margin: 0 auto 18px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.8;
}

.contact-card strong {
  font-weight: 800;
}

.contact-card img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.footer {
  width: min(100%, var(--max));
  max-width: 100vw;
  margin: 0 auto;
  padding: 26px 22px 34px;
  color: rgba(29, 26, 21, .48);
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  html,
  body,
  main,
  section,
  article,
  aside,
  p,
  span,
  a,
  li,
  strong {
    font-family: var(--font-mobile-serif) !important;
    font-synthesis-weight: none;
  }

  button,
  input,
  select,
  textarea,
  .ghost-btn,
  .solid-btn,
  .icon-btn {
    font-family: var(--font-ui) !important;
  }

  h1,
  h2,
  h3,
  .brand,
  .home-copy h1,
  .today-panel strong,
  .section-head h2,
  .service-card h3,
  .copy-grid h3,
  .product-grid strong,
  .page-title h1,
  .hex-name,
  .date-number,
  .blessing-copy h2,
  .oracle-line strong,
  .blessing-result strong,
  .contact-card h2 {
    font-family: var(--font-mobile-serif) !important;
    font-synthesis-weight: none;
  }

  .brand,
  .home-copy h1,
  .hero h1,
  .page-title h1 {
    font-weight: 400 !important;
  }

  .today-panel strong,
  .hero-card strong,
  .section-head h2,
  .copy-grid h3,
  .product-grid strong,
  .blessing-copy h2,
  .blessing-result strong {
    font-weight: 400 !important;
  }

  .topbar {
    height: auto;
    min-height: 66px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px 0;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .nav {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    overflow: visible;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding-bottom: 10px;
    scrollbar-width: none;
    white-space: normal;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-menu {
    position: relative;
  }
  .nav-menu-list {
    left: 0;
    right: auto;
    transform: none;
    min-width: 180px;
    max-width: calc(100vw - 28px);
    border-radius: 14px;
  }
  .main { padding: 16px 14px 42px; }
  .hero,
  .home-almanac {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 8px;
  }
  .home-almanac::before {
    width: 72vw;
    inset: 170px -32vw auto auto;
  }
  .home-copy h1 {
    font-size: clamp(46px, 15vw, 66px);
    line-height: 1.08;
  }
  .daily-meta {
    display: grid;
  }
  .today-panel {
    min-height: 276px;
    padding: 20px;
  }
  .today-panel strong {
    max-width: 100%;
    font-size: 25px;
    line-height: 1.48;
  }
  .hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }
  .lead { font-size: 15px; }
  .service-grid,
  .copy-grid,
  .product-grid,
  .quick-services { grid-template-columns: 1fr; }
  .blessing-workspace {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .blessing-dial {
    width: 92vw;
    right: -44vw;
    bottom: -26vw;
    opacity: .34;
  }
  .blessing-copy h2 {
    font-size: clamp(40px, 13vw, 58px);
  }
  .blessing-fields {
    grid-template-columns: 1fr 1fr;
  }
  .oracle-line {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .oracle-line span:first-child {
    text-align: center;
  }
  .blessing-slots {
    gap: 8px;
  }
  .blessing-slot {
    min-height: 108px;
  }
  .section-head {
    display: grid;
    align-items: start;
  }
  .page-title { margin-top: 20px; }
  .altar { min-height: 396px; }
  .luopan { width: min(88vw, 310px); }
  .ring-word { transform: rotate(var(--angle)) translateY(min(-37vw, -132px)); }
  .shell {
    width: 124px;
    height: 158px;
    margin-top: -232px;
  }
  .coins { width: 228px; }
  .coin {
    width: 46px;
    height: 46px;
  }
  .lines { min-height: 136px; }
  .almanac-layout {
    grid-template-columns: 1fr;
  }
  .calendar-card { order: 2; }
  .yi-ji,
  .time-grid,
  .result-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
  .almanac-top,
  .result-head {
    display: grid;
  }
  .date-number {
    font-size: 108px;
  }
  .footer {
    display: flex;
    justify-content: center;
    padding-bottom: 28px;
  }
  .contact-card {
    padding: 24px 18px 20px;
  }
  .contact-card h2 {
    font-size: 26px;
  }
  .contact-card p {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .nav { gap: 4px 12px; font-size: 12px; }
  .solid-btn,
  .ghost-btn { min-height: 38px; padding: 0 13px; }
  .hero h1 { font-size: 38px; }
  .home-copy h1 { font-size: 44px; }
  .hero-card strong { font-size: 22px; }
  .today-panel strong { font-size: 23px; }
  .altar { min-height: 382px; }
  .shell { width: 116px; height: 150px; }
  .coins { width: 214px; }
  .yao { width: 140px; }
  .date-number { font-size: 92px; }
  .blessing-fields,
  .blessing-slots {
    grid-template-columns: 1fr;
  }
  .blessing-slot {
    min-height: 92px;
  }
}
