:root {
  --mineral: #24483f;
  --mineral-2: #315f54;
  --stone: #d6d1c4;
  --stone-2: #eee9dc;
  --smoke: #101412;
  --ink: #1d2421;
  --gold: #b39353;
  --gold-2: #d2bd80;
  --seal: #9c2f24;
  --muted: #6d746e;
  --line: rgba(29, 36, 33, 0.16);
  --panel: rgba(238, 233, 220, 0.88);
  --shadow: 0 20px 60px rgba(16, 20, 18, 0.16);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(179, 147, 83, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 24%, rgba(36, 72, 63, 0.24), transparent 34rem),
    linear-gradient(130deg, #ece6d7 0%, #d5d0c3 46%, #bfc7bd 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(16, 20, 18, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 20, 18, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(16, 20, 18, 0.12);
  background: rgba(238, 233, 220, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 185px;
}

.seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--stone-2);
  background:
    conic-gradient(from 0deg, transparent 0 12deg, rgba(238, 233, 220, 0.55) 12deg 16deg, transparent 16deg 45deg),
    var(--seal);
  border: 1px solid rgba(238, 233, 220, 0.8);
  box-shadow: inset 0 0 0 5px rgba(156, 47, 36, 0.78), inset 0 0 0 6px rgba(238, 233, 220, 0.28);
  letter-spacing: 0;
  font-family: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 15px;
  line-height: 1;
}

.brand-text strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  color: #29322e;
  font-size: 14px;
}

.nav a {
  padding: 9px 0;
  border-bottom: 1px solid transparent;
}

.nav a.active,
.nav a:hover {
  color: var(--mineral);
  border-bottom-color: var(--gold);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang,
.icon-link,
.account-pill {
  border: 1px solid rgba(16, 20, 18, 0.16);
  background: rgba(238, 233, 220, 0.65);
  color: var(--ink);
  padding: 8px 11px;
  min-height: 38px;
  cursor: pointer;
}

.icon-link {
  min-width: 42px;
  text-align: center;
}

.page {
  padding: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 72px) 80px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px - 48px);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(16, 20, 18, 0.12);
}

.hero::before {
  content: "乾 兑 离 震 巽 坎 艮 坤";
  position: absolute;
  inset: 8% 7% auto auto;
  width: min(48vw, 520px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: rgba(179, 147, 83, 0.58);
  border: 1px solid rgba(179, 147, 83, 0.42);
  border-radius: 50%;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: 0.3em;
  transform: rotate(-14deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background:
    linear-gradient(8deg, rgba(16, 20, 18, 0.17), transparent 58%),
    radial-gradient(ellipse at 18% 100%, rgba(36, 72, 63, 0.42), transparent 44%),
    radial-gradient(ellipse at 52% 100%, rgba(16, 20, 18, 0.2), transparent 34%);
  clip-path: polygon(0 72%, 10% 58%, 18% 68%, 30% 42%, 45% 64%, 55% 40%, 68% 62%, 80% 48%, 100% 76%, 100% 100%, 0 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  color: var(--seal);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  margin: 0 0 20px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 500;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.96;
}

h2 {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.04;
}

h3 {
  font-size: 18px;
  font-weight: 650;
}

.lead {
  max-width: 650px;
  color: #3b443f;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  margin: 22px 0 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(16, 20, 18, 0.18);
  background: rgba(238, 233, 220, 0.82);
  color: var(--ink);
  padding: 10px 17px;
  cursor: pointer;
  transition: 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 20, 18, 0.12);
}

.btn.primary {
  background: var(--mineral);
  color: var(--stone-2);
  border-color: var(--mineral);
}

.btn.gold {
  background: var(--gold);
  color: var(--smoke);
  border-color: rgba(16, 20, 18, 0.14);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
  box-shadow: none;
}

.category-rail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid rgba(16, 20, 18, 0.16);
  background: rgba(16, 20, 18, 0.14);
}

.category-rail a {
  background: rgba(238, 233, 220, 0.82);
  padding: 20px;
}

.category-rail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.product-card,
.table-wrap {
  background: var(--panel);
  border: 1px solid rgba(16, 20, 18, 0.14);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(18px, 3vw, 30px);
}

.panel.slim {
  padding: 18px;
  box-shadow: none;
}

.muted {
  color: var(--muted);
}

.rule-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.rule-item {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 16px;
}

.rule-item strong {
  display: block;
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.check label,
.service-row strong {
  font-size: 13px;
  color: #313a36;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(16, 20, 18, 0.18);
  background: rgba(255, 252, 242, 0.72);
  padding: 10px 12px;
  color: var(--ink);
}

.field textarea {
  min-height: 116px;
  resize: vertical;
}

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

.choice {
  border: 1px solid rgba(16, 20, 18, 0.16);
  background: rgba(255, 252, 242, 0.55);
  min-height: 52px;
  cursor: pointer;
}

.choice.active {
  border-color: var(--gold);
  background: rgba(179, 147, 83, 0.18);
}

.check {
  display: flex;
  gap: 10px;
  align-items: start;
}

.oracle-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.coin-area {
  display: grid;
  place-items: center;
  min-height: 430px;
  background:
    radial-gradient(circle, rgba(179, 147, 83, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(36, 72, 63, 0.32), rgba(238, 233, 220, 0.4));
  border: 1px solid rgba(16, 20, 18, 0.14);
}

.coins {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 26px 0;
}

.coin {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--smoke);
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 245, 190, 0.9), transparent 20%),
    linear-gradient(145deg, #d9c17d, #7d6534);
  border: 1px solid rgba(16, 20, 18, 0.2);
  box-shadow: inset -8px -10px 18px rgba(16, 20, 18, 0.18);
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
}

.hex-lines {
  display: grid;
  gap: 11px;
  width: min(280px, 100%);
  margin: 22px auto;
}

.yao {
  height: 13px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

.yao.yang::before,
.yao.yin::before,
.yao.yin::after {
  content: "";
  height: 13px;
  background: var(--smoke);
}

.yao.yin {
  grid-template-columns: 1fr 1fr;
}

.yao.moving::before,
.yao.moving::after {
  background: var(--gold);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.46fr) minmax(0, 1fr);
  gap: 24px;
}

.slip {
  display: grid;
  place-items: center;
  min-height: 470px;
  padding: 28px;
  border: 1px solid rgba(156, 47, 36, 0.38);
  background:
    linear-gradient(90deg, rgba(156, 47, 36, 0.1), transparent 14%, transparent 86%, rgba(156, 47, 36, 0.08)),
    rgba(255, 252, 242, 0.74);
  color: var(--smoke);
  text-align: center;
  font-family: "STSong", "Songti SC", serif;
}

.slip .grade {
  color: var(--seal);
  font-size: 28px;
  margin-bottom: 30px;
}

.slip .poem {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 34px;
  line-height: 1.9;
}

.meta-row,
.service-row,
.summary-line,
.timeline-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(16, 20, 18, 0.1);
  padding: 12px 0;
}

.meta-row:last-child,
.service-row:last-child,
.summary-line:last-child,
.timeline-row:last-child {
  border-bottom: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
}

.product-art {
  min-height: 180px;
  background:
    radial-gradient(circle at 50% 38%, rgba(16, 20, 18, 0.22), transparent 28%),
    linear-gradient(145deg, rgba(49, 95, 84, 0.34), rgba(214, 209, 196, 0.8));
  position: relative;
}

.product-art::after {
  content: attr(data-kind);
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: rgba(16, 20, 18, 0.52);
  font-family: "STSong", "Songti SC", serif;
  font-size: 42px;
}

.product-body {
  padding: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(16, 20, 18, 0.14);
  background: rgba(255, 252, 242, 0.55);
  color: var(--muted);
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.7fr);
  gap: 24px;
}

.product-photo {
  min-height: 620px;
  background:
    radial-gradient(circle at 48% 48%, rgba(16, 20, 18, 0.54), transparent 19%),
    radial-gradient(circle at 53% 50%, rgba(16, 20, 18, 0.34), transparent 23%),
    linear-gradient(145deg, #c7c4b9, #75877f 55%, #1e2c28);
  border: 1px solid rgba(16, 20, 18, 0.16);
}

.admin-tabs,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(16, 20, 18, 0.1);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 650;
}

.notice {
  border-left: 3px solid var(--seal);
  background: rgba(156, 47, 36, 0.08);
  padding: 14px 16px;
  margin: 18px 0;
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

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

.mini-product {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(16, 20, 18, 0.12);
  background: rgba(238, 233, 220, 0.52);
}

.mini-thumb {
  height: 54px;
  background: linear-gradient(145deg, rgba(36, 72, 63, 0.38), rgba(179, 147, 83, 0.28));
  display: grid;
  place-items: center;
  font-family: "STSong", "Songti SC", serif;
}

.share-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(179, 147, 83, 0.3);
  background:
    linear-gradient(135deg, rgba(179, 147, 83, 0.12), transparent 46%),
    rgba(238, 233, 220, 0.58);
}

.share-panel h3,
.share-panel p {
  margin: 0;
}

.share-panel p {
  margin-top: 6px;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(16, 20, 18, 0.14);
  background: rgba(16, 20, 18, 0.78);
  color: rgba(238, 233, 220, 0.88);
}

.site-footer p {
  max-width: 780px;
  margin: 6px 0 0;
  color: rgba(238, 233, 220, 0.62);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer a {
  color: var(--gold-2);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .oracle-stage,
  .result-layout,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .category-rail,
  .choice-grid,
  .mini-rail {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    display: grid;
  }

  .hero::before {
    inset: 10% -24% auto auto;
    width: 82vw;
  }
}

@media (max-width: 620px) {
  .page {
    padding-inline: 14px;
  }

  .brand {
    min-width: auto;
  }

  .brand-text span {
    display: none;
  }

  .actions {
    margin-left: auto;
  }

  .category-rail,
  .choice-grid,
  .mini-rail {
    grid-template-columns: 1fr;
  }

  .coin {
    width: 68px;
    height: 68px;
  }

  .slip .poem {
    font-size: 27px;
  }
}
