﻿/* ============================================================
   观易 GUANYI · 设计系统
   唯一事实来源见 .trae/documents/guanyi-design-contract.md
   ============================================================ */

:root {
  --bg: #000000;
  --bg-elev: #0B0B0B;
  --surface: #181818;
  --surface-2: #1F1F1F;
  --line: #313131;
  --line-strong: rgba(158, 197, 212, .34);
  --gold: #9EC5D4;
  --gold-hi: #D6EEF6;
  --gold-dim: rgba(158, 197, 212, .68);
  --gold-wash: rgba(158, 197, 212, .08);
  --text: #E0E9EC;
  --text-sub: #87969E;
  --text-dim: #5A727C;
  --muted: #87969E;
  --text-2: #C7DDE7;
  --sage: #93BFAE;
  --clay: #C99E7E;
  --danger: #E08B81;

  --font-serif: "Manrope", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --font-sans: "Manrope", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --font-latin: "Manrope", "Segoe UI", system-ui, sans-serif;

  --maxw: clamp(1280px, 94vw, 2000px);
  --nav-h: 64px;
  --r: 8px;
  --r-lg: 16px;
  --r-xl: 24px;

  --e: cubic-bezier(.16, 1, .3, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(158, 197, 212, .26); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(158, 197, 212, .18); border: 3px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(158, 197, 212, .34); }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-weight: 400; }

/* ================= 基础排版 ================= */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 48px; position: relative; z-index: 2; }
.wrap-narrow { max-width: 780px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 2px;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.serif { font-family: var(--font-serif); }
.latin { font-family: var(--font-latin); }
.dim { color: var(--text-dim); }
.sub { color: var(--text-sub); }
.gold { color: var(--gold); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ================= 顶部导航（悬浮胶囊） ================= */

.site-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 48px));
  height: var(--nav-h);
  z-index: 40;
  padding: 0 24px;
  border: 1px solid #ffffff20;
  border-radius: 16px;
  background: #181818d9;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.brand svg { width: 24px; height: 24px; }
.brand-text { font-size: 20px; font-weight: 600; letter-spacing: 4px; color: var(--text); }
.brand-en { font-family: var(--font-latin); font-size: 12px; letter-spacing: 2px; color: var(--text-dim); margin-left: 0; font-style: normal; }

.nav-links { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav-links a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--text-sub);
  padding: 22px 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
  transform: translateX(-50%) scale(0);
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }

.nav-record {
  margin-left: 20px;
  height: auto;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
  border-radius: 8px;
  border-color: #3a494f;
  color: #c1d5df;
}
.nav-record:hover { border-color: var(--gold-dim); color: var(--text); }
.nav-record svg { width: 14px; height: 14px; }

.nav-toggle { display: none; margin-left: auto; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--text-sub); }

.nav-drawer {
  position: fixed; top: 96px; left: 50%; transform: translateX(-50%);
  width: min(900px, calc(100% - 48px));
  z-index: 39;
  background: #000000f5;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 24px 18px;
  display: none;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.nav-drawer a {
  display: block; padding: 14px 0; font-size: 15px; letter-spacing: 0;
  color: var(--text-sub); border-bottom: 1px solid var(--line);
}
.nav-drawer a:last-child { border-bottom: 0; }
.nav-drawer a[aria-current="page"] { color: var(--gold); }
body[data-drawer="true"] .nav-drawer { display: block; }

/* ================= 主视图 ================= */

.view {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  min-height: 100vh;
}

.view-enter { animation: viewEnter .5s var(--ease) both; }
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }

.section-head { margin-bottom: 32px; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head .h2 { font-family: var(--font-serif); font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -1px; margin-top: 12px; }
.section-head .lede { margin-top: 12px; font-size: 14px; line-height: 22px; color: var(--text-sub); max-width: 46em; letter-spacing: 0; }

.h2 { font-family: var(--font-serif); font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -1px; }
.h3 { font-family: var(--font-serif); font-size: 18px; line-height: 26px; letter-spacing: 0; }

/* ================= 进度头 ================= */

.step-head { padding: 32px 0 28px; }
.step-kicker {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; line-height: 16px; letter-spacing: 2px; color: var(--gold-dim);
  font-family: var(--font-sans); text-transform: uppercase;
}
.step-kicker .no { color: var(--gold); }
.step-kicker .sep { flex: 0 0 28px; height: 1px; background: var(--line-strong); }
.step-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -1px;
  margin-top: 20px;
}
.step-sub { margin-top: 14px; font-size: 14px; color: var(--text-sub); letter-spacing: 0; max-width: 44em; line-height: 22px; }

.ticks { display: flex; gap: 6px; margin-top: 28px; }
.tick { width: 46px; height: 2px; background: rgba(255, 255, 255, .10); transition: background .4s var(--ease); }
.tick.done { background: var(--gold-dim); }
.tick.now { background: var(--gold-hi); box-shadow: 0 0 12px rgba(158, 197, 212, .5); }

/* ================= 两栏 ================= */

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 24px); }

/* ================= 面板 / 卡片 ================= */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 24px;
}
.panel-flush { padding: 0; overflow: hidden; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.panel-head .h3 { font-size: 16px; }
.panel-head .en { font-size: 10px; letter-spacing: .22em; color: var(--text-dim); }

.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px 20px;
}
.rail-title {
  font-size: 13px; letter-spacing: .1em; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.rail-title svg { width: 15px; height: 15px; color: var(--gold-dim); }
.rail-body { font-size: 12px; line-height: 1.95; color: var(--text-sub); letter-spacing: .02em; }
.rail-body p + p { margin-top: 8px; }
.rail-body strong { color: var(--text); font-weight: 400; }

/* ================= 按钮 ================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  font-size: 13px; letter-spacing: .12em;
  border-radius: var(--r);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease), opacity .2s;
  white-space: nowrap;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-gold { background: var(--gold); color: #14130F; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-gold:disabled { opacity: .38; pointer-events: none; }

.btn-ghost { border: 1px solid var(--line); color: var(--text-sub); background: transparent; }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:disabled { opacity: .4; pointer-events: none; }

.btn-sm { height: 34px; padding: 0 14px; font-size: 12px; letter-spacing: .08em; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-danger { border: 1px solid rgba(169, 112, 106, .3); color: var(--danger); }
.btn-danger:hover { border-color: rgba(169, 112, 106, .6); background: rgba(169, 112, 106, .06); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row-end { justify-content: flex-end; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: .08em; color: var(--gold);
  transition: gap .2s var(--ease), color .2s;
}
.link-arrow svg { width: 15px; height: 15px; }
.link-arrow:hover { gap: 9px; color: var(--gold-hi); }

/* ================= 表单 ================= */

.field { margin-bottom: 22px; }
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 12px; letter-spacing: .14em; color: var(--text-sub); margin-bottom: 10px;
}
.label .req { color: var(--gold-dim); font-size: 10px; letter-spacing: .1em; }

.input, .textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  transition: border-color .2s var(--ease), background .2s;
  outline: none;
  resize: vertical;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus { border-color: var(--gold-dim); background: rgba(158, 197, 212, .02); }
.textarea { min-height: 116px; line-height: 1.95; }
.input-err { border-color: rgba(169, 112, 106, .55); }
.err-text { font-size: 12px; color: var(--danger); margin-top: 8px; letter-spacing: .02em; }
.hint { font-size: 11px; color: var(--text-dim); letter-spacing: .02em; }
.counter { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

/* ================= 选择卡片 / chips ================= */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 11px; letter-spacing: .12em;
  color: var(--text-sub);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--gold-wash); border-color: var(--line-strong); color: var(--gold);
}

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

.card-select {
  position: relative;
  text-align: left;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.card-select::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--gold); opacity: 0; transition: opacity .2s;
}
.card-select:hover { border-color: var(--line-strong); }
.card-select.is-on { background: var(--gold-wash); border-color: var(--line-strong); }
.card-select.is-on::before { opacity: 1; }
.card-select .cs-title { font-family: var(--font-serif); font-size: 17px; letter-spacing: .1em; }
.card-select .cs-en { font-size: 10px; letter-spacing: .22em; color: var(--text-dim); margin-top: 4px; }
.card-select .cs-desc { font-size: 12px; color: var(--text-sub); margin-top: 10px; line-height: 1.85; }
.card-select .cs-check {
  position: absolute; right: 16px; top: 16px; width: 16px; height: 16px;
  color: var(--gold); opacity: 0; transition: opacity .2s;
}
.card-select.is-on .cs-check { opacity: 1; }

/* ================= 卦象 ================= */

.hex { display: flex; flex-direction: column; gap: 9px; }
.hex-row { display: flex; align-items: center; gap: 10px; height: 8px; }
.hex-bar { flex: 1; height: 100%; background: var(--gold); border-radius: 1px; }
.hex-yin { flex: 1; align-self: stretch; display: flex; gap: 22%; }
.hex-yin i { flex: 1; height: 100%; background: var(--gold); border-radius: 1px; }
.hex-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-hi); flex: 0 0 auto; opacity: 0; }
.hex-row.is-moving .hex-dot { opacity: 1; }
.hex-lg { width: 132px; gap: 10px; }
.hex-lg .hex-row { height: 9px; }
.hex-sm { width: 64px; gap: 6px; }
.hex-sm .hex-row { height: 5px; }
.hex-sm .hex-dot { width: 4px; height: 4px; }
.hex-md { width: 96px; gap: 8px; }
.hex-md .hex-row { height: 7px; }
.hex-changed .hex-bar, .hex-changed .hex-yin i { background: var(--gold-dim); }
.hex-caption { font-size: 10px; letter-spacing: .18em; color: var(--text-dim); margin-top: 14px; text-align: center; }

.hex-meta { display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: .12em; color: var(--text-sub); }
.hex-meta i { font-style: normal; color: var(--gold); }

/* 卦名大标题 */
.hex-name { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 52px); letter-spacing: .14em; line-height: 1.2; }
.hex-no { font-size: 11px; letter-spacing: .22em; color: var(--gold-dim); }

/* ================= 标签 ================= */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10px; letter-spacing: .12em; color: var(--text-sub);
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-gold { border-color: var(--line-strong); color: var(--gold); }
.badge-local { border-color: var(--line-strong); color: var(--text-dim); }
.badge-sage { border-color: rgba(143, 169, 138, .3); color: var(--sage); }
.badge-clay { border-color: rgba(185, 142, 106, .3); color: var(--clay); }

/* ================= AI 解读 ================= */

.role-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.role-card[data-state="done"] { border-color: rgba(158, 197, 212, .16); }
.role-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.role-name { font-family: var(--font-serif); font-size: 17px; letter-spacing: .1em; }
.role-en { font-size: 9px; letter-spacing: .22em; color: var(--text-dim); margin-top: 3px; }
.role-desc { font-size: 11px; color: var(--text-dim); letter-spacing: .02em; }

.ai-stream { font-size: 14px; line-height: 2; color: var(--text-sub); letter-spacing: .02em; min-height: 0; }
.ai-stream p + p { margin-top: 12px; }
.ai-stream .cursor {
  display: inline-block; width: 6px; height: 15px; margin-left: 2px;
  background: var(--gold); vertical-align: -2px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.ai-error { font-size: 12px; color: var(--clay); line-height: 1.9; }

/* ================= Tabs ================= */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tab {
  position: relative; padding: 14px 18px;
  font-size: 12px; letter-spacing: .12em; color: var(--text-dim);
  transition: color .2s;
}
.tab:hover { color: var(--text-sub); }
.tab[aria-selected="true"] { color: var(--gold); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold);
}

/* ================= 首页 ================= */

.hero { position: relative; padding: 96px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 64px;
  align-items: center;
}
.hero-brand { display: flex; align-items: center; gap: 12px; color: var(--gold); margin-bottom: 34px; }
.hero-brand svg { width: 30px; height: 30px; }
.hero-brand .hb-cn { font-family: var(--font-serif); font-size: 20px; letter-spacing: .3em; color: var(--text); }
.hero-brand .hb-en { font-family: var(--font-latin); font-size: 10px; letter-spacing: .36em; color: var(--gold-dim); }

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.28;
  letter-spacing: .1em;
  font-weight: 400;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lede { margin-top: 26px; font-size: 15px; line-height: 2.1; letter-spacing: .04em; color: var(--text-sub); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-note {
  margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-size: 11px; letter-spacing: .1em; color: var(--text-dim);
}
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 12px; height: 12px; color: var(--gold-dim); }

.hero-side { position: relative; }
.today-card {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 22, 19, .9), rgba(16, 16, 14, .9));
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 28px 26px;
}
.today-card .tc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.today-card .tc-no { font-size: 10px; letter-spacing: .22em; color: var(--text-dim); }
.today-card .tc-sym { font-family: var(--font-serif); font-size: 26px; color: var(--gold-dim); line-height: 1; }
.today-card .tc-name { font-family: var(--font-serif); font-size: 26px; letter-spacing: .16em; margin-top: 4px; }
.today-card .tc-full { font-size: 11px; letter-spacing: .16em; color: var(--text-dim); margin-top: 8px; }
.today-card .tc-hex { margin: 22px 0; }
.today-card .tc-quote {
  font-family: var(--font-serif); font-size: 13px; line-height: 2; color: var(--text-sub);
  padding-left: 12px; border-left: 1px solid var(--line-strong);
}
.today-card .tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }

.hero-ring {
  position: absolute; z-index: -1;
  right: -90px; top: -70px;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(158, 197, 212, .09);
  pointer-events: none;
}
.hero-ring::before {
  content: ""; position: absolute; inset: 42px; border-radius: 50%;
  border: 1px solid rgba(158, 197, 212, .055);
}
.hero-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(158, 197, 212, .05), transparent 62%);
}

/* 三步 */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step-item { background: var(--bg-elev); padding: 30px 28px 34px; position: relative; }
.step-num { font-family: var(--font-latin); font-size: 13px; letter-spacing: .2em; color: var(--gold-dim); }
.step-item h3 { font-family: var(--font-serif); font-size: 20px; letter-spacing: .1em; margin: 16px 0 12px; }
.step-item p { font-size: 13px; line-height: 1.95; color: var(--text-sub); }
.step-item .si-en { font-size: 9px; letter-spacing: .24em; color: var(--text-dim); margin-top: 18px; }

/* 四角色带 */
.roles-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.role-mini { border-top: 1px solid var(--line); padding-top: 18px; }
.role-mini .rm-no { font-family: var(--font-latin); font-size: 11px; color: var(--gold-dim); letter-spacing: .2em; }
.role-mini .rm-name { font-family: var(--font-serif); font-size: 16px; letter-spacing: .1em; margin-top: 8px; }
.role-mini .rm-desc { font-size: 12px; color: var(--text-sub); margin-top: 8px; line-height: 1.85; }

/* 引言 */
.manifesto { text-align: center; padding: 88px 0; }
.manifesto blockquote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: .16em;
  line-height: 1.9;
  color: var(--text);
}
.manifesto blockquote em { font-style: normal; color: var(--gold); }
.manifesto .mf-sub { margin-top: 22px; font-size: 12px; letter-spacing: .14em; color: var(--text-dim); }

/* ================= 起卦区 ================= */

.cast-shell { padding-bottom: 8px; }

.cast-lines {
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px 0 10px;
}
.cast-line {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  transition: border-color .25s var(--ease), background .25s;
  min-height: 56px;
}
.cast-line.is-filled { border-color: rgba(158, 197, 212, .2); }
.cast-line.is-current { border-color: var(--line-strong); background: var(--gold-wash); }
.cast-line .cl-idx { font-family: var(--font-latin); font-size: 11px; letter-spacing: .16em; color: var(--text-dim); width: 58px; flex: 0 0 auto; }
.cast-line .cl-value { margin-left: auto; font-size: 11px; letter-spacing: .1em; color: var(--gold-dim); min-width: 68px; text-align: right; }
.cast-line .cl-hex { flex: 0 0 96px; }

.cast-status {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .06em; color: var(--text-sub);
  min-height: 22px;
}
.cast-status .pulse {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.cast-slot {
  flex: 1; height: 8px; border-radius: 1px;
  background: rgba(255, 255, 255, .06);
}
.cast-slot.yang { background: var(--gold); }
.cast-slot.yin { background: transparent; }

/* 手动点爻 */
.manual-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.manual-row:last-child { border-bottom: 0; }
.manual-row .mr-label { font-size: 11px; letter-spacing: .12em; color: var(--text-dim); width: 62px; }
.manual-row .mr-pick { display: flex; gap: 6px; }
.manual-row .mr-pick button {
  width: 46px; height: 28px; border: 1px solid var(--line); border-radius: 2px;
  font-size: 11px; color: var(--text-dim); transition: all .16s;
}
.manual-row .mr-pick button.on { border-color: var(--line-strong); color: var(--gold); background: var(--gold-wash); }
.manual-row .mr-move {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .06em; color: var(--text-dim);
}
.manual-row .mr-move input { appearance: none; width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 2px; background: transparent; cursor: pointer; position: relative; }
.manual-row .mr-move input:checked { border-color: var(--gold); background: var(--gold-wash); }
.manual-row .mr-move input:checked::after {
  content: ""; position: absolute; inset: 3px; background: var(--gold); border-radius: 1px;
}

/* ================= 经典 ================= */

.classic-quote {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 2.2;
  letter-spacing: .1em;
  color: var(--text);
  padding: 8px 0 8px 26px;
  border-left: 1px solid var(--line-strong);
}
.classic-quote .q-sub {
  display: block; margin-top: 14px;
  font-family: var(--font-sans); font-size: 12px; letter-spacing: .06em; color: var(--text-dim);
}
.classic-block + .classic-block { margin-top: 40px; }
.classic-label { font-size: 10px; letter-spacing: .24em; color: var(--gold-dim); margin-bottom: 14px; }

.tab-panel { min-height: 320px; }

/* ================= 观心 / 行动 ================= */

.reflect-grid { display: grid; gap: 20px; }
.reflect-item { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.reflect-item .ri-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.reflect-item .ri-no { font-family: var(--font-latin); font-size: 11px; color: var(--gold-dim); letter-spacing: .16em; }
.reflect-item .ri-title { font-family: var(--font-serif); font-size: 17px; letter-spacing: .1em; }
.reflect-item .ri-hint { font-size: 11px; color: var(--text-dim); margin-left: auto; }

.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface);
}
.action-item .ai-idx { font-family: var(--font-latin); font-size: 11px; color: var(--gold-dim); }
.action-item .ai-text { font-size: 13px; color: var(--text); flex: 1; }
.action-item button { color: var(--text-dim); padding: 4px; }
.action-item button:hover { color: var(--danger); }
.action-item button svg { width: 14px; height: 14px; }

.card-preview {
  background: linear-gradient(165deg, #141311 0%, #0C0C0A 100%);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.card-preview::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(158, 197, 212, .1); pointer-events: none;
}
.card-preview .cp-brand { font-size: 10px; letter-spacing: .3em; color: var(--gold-dim); display: flex; justify-content: space-between; }
.card-preview .cp-hex { margin: 26px 0 22px; }
.card-preview .cp-name { font-family: var(--font-serif); font-size: 30px; letter-spacing: .14em; }
.card-preview .cp-q { font-size: 12px; color: var(--text-sub); margin-top: 10px; line-height: 1.9; }
.card-preview .cp-block { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(158, 197, 212, .14); }
.card-preview .cp-k { font-size: 9px; letter-spacing: .24em; color: var(--gold-dim); margin-bottom: 8px; }
.card-preview .cp-v { font-family: var(--font-serif); font-size: 14px; line-height: 2; color: var(--text); letter-spacing: .04em; }
.card-preview .cp-foot { margin-top: 24px; font-size: 9px; letter-spacing: .2em; color: var(--text-dim); }

/* ================= 记录 ================= */

.record-list { display: flex; flex-direction: column; }
.record-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.record-item:hover { background: rgba(158, 197, 212, .025); }
.record-item .ri-hex { display: flex; justify-content: center; }
.record-item .ri-main { min-width: 0; }
.record-item .ri-q {
  font-family: var(--font-serif); font-size: 16px; letter-spacing: .06em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.record-item .ri-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 7px; font-size: 11px; color: var(--text-dim); letter-spacing: .08em; }
.record-item .ri-actions { display: flex; align-items: center; gap: 4px; }
.record-item .ri-actions button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text-dim); border-radius: 2px; }
.record-item .ri-actions button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.record-item .ri-actions svg { width: 15px; height: 15px; }

.fav-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fav-card { padding: 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); position: relative; }
.fav-card .fc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fav-card .fc-name { font-family: var(--font-serif); font-size: 17px; letter-spacing: .1em; }
.fav-card .fc-no { font-size: 10px; letter-spacing: .18em; color: var(--text-dim); }
.fav-card .fc-gist { font-size: 12px; color: var(--text-sub); line-height: 1.9; margin: 12px 0 14px; }
.fav-card button { font-size: 11px; color: var(--text-dim); }
.fav-card button:hover { color: var(--danger); }

/* ================= 易学 ================= */

.learn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bagua-card {
  padding: 22px 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface);
  transition: border-color .2s;
}
.bagua-card:hover { border-color: var(--line-strong); }
.bagua-card .bc-top { display: flex; align-items: center; justify-content: space-between; }
.bagua-card .bc-name { font-family: var(--font-serif); font-size: 20px; letter-spacing: .1em; }
.bagua-card .bc-nature { font-size: 11px; letter-spacing: .16em; color: var(--gold-dim); }
.bagua-card .bc-lines { margin: 18px 0 14px; width: 46px; display: flex; flex-direction: column; gap: 5px; }
.bagua-card .bc-lines i { height: 4px; background: var(--gold); border-radius: 1px; }
.bagua-card .bc-lines i.half { background: transparent; display: flex; gap: 8px; }
.bagua-card .bc-lines i.half b { flex: 1; background: var(--gold); border-radius: 1px; }
.bagua-card .bc-lines i.off { background: rgba(255,255,255,.08); }
.bagua-card .bc-key { font-size: 10px; letter-spacing: .2em; color: var(--text-dim); }
.bagua-card .bc-desc { font-size: 12px; color: var(--text-sub); line-height: 1.85; margin-top: 10px; }

.hex-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hex-cell {
  background: var(--bg-elev);
  aspect-ratio: 1 / .92;
  padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: background .18s, color .18s;
}
.hex-cell:hover { background: var(--gold-wash); }
.hex-cell .hc-no { font-family: var(--font-latin); font-size: 9px; letter-spacing: .1em; color: var(--text-dim); }
.hex-cell .hc-name { font-family: var(--font-serif); font-size: 15px; letter-spacing: .06em; }
.hex-cell.is-current { background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hex-cell.is-current .hc-name { color: var(--gold); }

.qa-item { border-bottom: 1px solid var(--line); }
.qa-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; text-align: left;
  font-family: var(--font-serif); font-size: 16px; letter-spacing: .05em; color: var(--text);
}
.qa-q svg { width: 16px; height: 16px; color: var(--text-dim); transition: transform .25s var(--ease); }
.qa-item[data-open="true"] .qa-q svg { transform: rotate(180deg); color: var(--gold); }
.qa-a {
  display: none; padding: 0 4px 22px; font-size: 13px; line-height: 2.1; color: var(--text-sub); max-width: 58em;
}
.qa-item[data-open="true"] .qa-a { display: block; }

.dict-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dict-row .dr-term { font-family: var(--font-serif); font-size: 15px; letter-spacing: .1em; color: var(--gold); }
.dict-row .dr-desc { font-size: 13px; line-height: 1.95; color: var(--text-sub); }

/* ================= 后台配置 ================= */

.admin-wrap { max-width: 880px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-span { grid-column: 1 / -1; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px; border: 1px solid rgba(185, 142, 106, .22);
  background: rgba(185, 142, 106, .04); border-radius: 3px;
}
.notice svg { width: 16px; height: 16px; color: var(--clay); flex: 0 0 auto; margin-top: 2px; }
.notice .nt-body { font-size: 12px; line-height: 1.95; color: var(--text-sub); }
.notice .nt-body strong { color: var(--clay); font-weight: 400; }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 12px; color: var(--text-sub); }
.status-line .ok { color: var(--sage); }

.test-out { font-size: 12px; line-height: 1.9; color: var(--text-sub); min-height: 20px; }
.test-out.err { color: var(--danger); }
.test-out.ok { color: var(--sage); }

/* ================= 空态 / 提示 ================= */

.empty { text-align: center; padding: 80px 24px; }
.empty .em-title { font-family: var(--font-serif); font-size: 24px; letter-spacing: .1em; }
.empty .em-desc { margin-top: 14px; font-size: 13px; color: var(--text-sub); line-height: 2; }
.empty .em-actions { margin-top: 28px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.note-line { font-size: 11px; letter-spacing: .06em; color: var(--text-dim); line-height: 1.9; }

/* 底部操作条 */
.bottom-bar {
  margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.bottom-bar .bb-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bottom-bar .bb-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ================= Toast / Modal ================= */

.toast-host {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 12px; letter-spacing: .06em;
  padding: 10px 18px; border-radius: 2px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  animation: toastIn .28s var(--ease) both;
}
.toast.is-out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .6);
  display: grid; place-items: center;
  padding: 24px;
  animation: maskIn .2s ease both;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 480px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  padding: 26px;
  animation: modalIn .28s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal .md-title { font-family: var(--font-serif); font-size: 19px; letter-spacing: .08em; }
.modal .md-desc { margin-top: 14px; font-size: 13px; color: var(--text-sub); line-height: 2; }
.modal .md-foot { margin-top: 26px; display: flex; justify-content: flex-end; gap: 10px; }

/* ================= 页脚 ================= */

.site-foot {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 26px 0 32px;
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  font-size: 10px; letter-spacing: .16em; color: var(--text-dim);
  align-items: center;
}
.foot-inner .foot-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.foot-inner a { color: var(--text-dim); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.foot-inner a:hover { color: var(--gold); border-color: var(--line-strong); }

/* ================= 开场 ================= */

#intro { position: relative; z-index: 60; }
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 10; pointer-events: none;
  background: #05060a; opacity: 1;
  transition: opacity .5s ease;
}
#scene[data-done="true"] { opacity: 0; }

#film {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: none; object-fit: contain; background: #05060a;
  z-index: 10; pointer-events: none;
  transition: opacity .9s ease .35s;
}
body[data-fallback="true"] #film { display: block; }
body[data-reveal="true"][data-fallback="true"] #film { opacity: 0; }

.veil {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  background: #05060a; opacity: 1; transition: opacity 1.1s ease;
}
.veil[data-reveal="true"] { opacity: 0; }

.intro-skip {
  position: fixed; right: clamp(16px, 2.6vw, 34px); bottom: clamp(16px, 3.2vh, 34px); z-index: 30;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; min-width: 80px; padding: 0 16px;
  background: rgba(8, 10, 12, .3);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  color: rgba(255, 255, 255, .6);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  transition: opacity .3s ease, color .25s ease, background-color .25s ease, border-color .25s ease, transform .2s ease;
}
.intro-skip:hover { color: rgba(255, 255, 255, .88); background: rgba(20, 24, 28, .5); border-color: rgba(255, 255, 255, .7); }
.intro-skip:active { transform: scale(.97); }
.intro-skip:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 4px; }
body[data-reveal="true"] .intro-skip { opacity: 0; pointer-events: none; transition: opacity .3s ease; }

/* 开场期间正文隐藏 */
body:not([data-reveal="true"]) #app { opacity: .12; filter: blur(10px); pointer-events: none; }
#app { transition: opacity 1.2s ease .1s, filter 1.2s ease .1s; }

/* ================= 响应式 ================= */

@media (max-width: 1024px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-ring { right: -140px; top: -40px; width: 320px; height: 320px; }
  .roles-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hex-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-links, .nav-record { display: none; }
  .nav-toggle { display: flex; }
  .wrap, .nav-inner, .foot-inner { padding: 0 20px; }
  .section { padding: 52px 0; }
  .hero { padding: 60px 0 40px; }
  .steps3 { grid-template-columns: 1fr; }
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .fav-grid { grid-template-columns: 1fr; }
  .hex-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .record-item { grid-template-columns: 48px minmax(0, 1fr); }
  .record-item .ri-actions { grid-column: 2; justify-content: flex-end; }
  .step-head { padding: 30px 0 22px; }
  .tick { width: 20px; }
  .ticks { gap: 4px; }
  .dict-row { grid-template-columns: 1fr; gap: 6px; }
  .panel { padding: 18px; }
  .bottom-bar { flex-direction: column; align-items: stretch; }
  .bottom-bar .bb-right { justify-content: flex-end; }
  .hero-brand .hb-en { display: none; }
}

@media (max-width: 560px) {
  .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn { flex: 1; }
  .card-preview { padding: 22px; }
  .step-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   账号 / 登录 / 注册
   ============================================================ */

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-left: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text-sub);
  font-size: 12px;
  letter-spacing: .08em;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.nav-user:hover { color: var(--gold); border-color: var(--line-strong); }
.nav-user.is-user { color: var(--text); border-color: var(--line-strong); }
.nu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-wash);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
}

.auth { max-width: 560px; margin: 0 auto; padding: 10px 0 40px; }
.auth-title {
  margin: 18px 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--text);
}
.auth-lede {
  max-width: 36em;
  font-size: 13px;
  line-height: 2;
  letter-spacing: .04em;
  color: var(--text-sub);
}
.auth-card {
  margin-top: 28px;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.auth-card .tabs { display: flex; margin-bottom: 26px; }
.auth-card .tabs .tab { flex: 1; justify-content: center; text-align: center; }
.auth-form .field:last-of-type { margin-bottom: 16px; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-err {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .04em;
  color: var(--danger);
}
.auth-err[hidden] { display: none; }
.auth-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.auth-sep { margin: 0 8px; color: var(--gold-dim); }
.link-inline {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--gold);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.link-inline:hover { color: var(--gold-hi); }
.auth-foot {
  margin-top: 20px;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: .03em;
  color: var(--text-dim);
}
.auth-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.ap-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold-wash);
  border: 1px solid var(--line-strong);
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold);
}
.ap-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .08em;
  color: var(--text);
}
.ap-meta { margin-top: 6px; font-size: 11px; letter-spacing: .03em; color: var(--text-dim); }
.auth-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-sub);
}

@media (max-width: 860px) {
  .nav-user { margin-left: 2px; padding: 0 8px; }
  .nav-user .nu-name { display: none; }
  .auth { padding: 6px 0 30px; }
  .auth-card { padding: 24px 20px; }
}

/* ============================================================
   2026 视觉重做 · 对齐交付包（黑底 / #181818 / 冰蓝）
   ============================================================ */

/* ---------- 通用表面 ---------- */

.panel { background: #181818; border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.panel-flush { padding: 0; }
.panel-head { padding-bottom: 16px; margin-bottom: 24px; border-color: var(--line); }
.panel-head .h3 { font-size: 18px; font-weight: 500; letter-spacing: 0; }
.panel-head .en { font-size: 12px; letter-spacing: 2px; color: var(--text-dim); }

.rail-card { background: #000; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.rail-title { font-size: 14px; letter-spacing: 0; color: #a7ccd9; margin-bottom: 10px; }
.rail-body { font-size: 12px; line-height: 20px; color: var(--text-sub); letter-spacing: 0; }

/* ---------- 按钮 ---------- */

.btn {
  height: auto; min-height: 44px; padding: 10px 20px;
  border-radius: 8px; font-size: 14px; line-height: 20px;
  letter-spacing: 0; font-weight: 500;
  transition: transform .5s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), opacity .3s;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold); color: #0B1114; border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); transform: translateY(-2px); }
.btn-ghost { border: 1px solid #3a494f; color: #C1D5DF; background: transparent; }
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--text); background: rgba(158, 197, 212, .05); }
.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 12px; line-height: 16px; }
.btn-xs { min-height: 26px; padding: 4px 8px; font-size: 12px; line-height: 16px; }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 15px; }
.btn-danger { border: 1px solid rgba(224, 139, 129, .4); color: var(--danger); background: transparent; }
.btn-danger:hover { border-color: var(--danger); background: rgba(224, 139, 129, .06); }
.link-arrow { font-size: 14px; letter-spacing: 0; color: var(--gold); }

/* ---------- 表单 ---------- */

.field { margin-bottom: 20px; }
.label { font-size: 12px; line-height: 16px; letter-spacing: 0; color: #94acb8; margin-bottom: 10px; }
.input, .textarea {
  background: #000; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; font-size: 14px; line-height: 20px; color: var(--text);
}
.input:focus, .textarea:focus { border-color: var(--gold-dim); background: #000; box-shadow: 0 0 0 3px rgba(158, 197, 212, .06); }
.textarea { min-height: 120px; line-height: 22px; }
.hint, .counter { font-size: 12px; color: var(--text-dim); }
.input-err { border-color: rgba(224, 139, 129, .55); }

/* ---------- chips / 选择卡 ---------- */

.chips { gap: 8px; }
.chip {
  height: auto; padding: 8px 12px; border-radius: 8px;
  border: 1px solid #34444e; background: transparent;
  color: #8fa8b7; font-size: 14px; line-height: 20px; letter-spacing: 0;
}
.chip:hover { background: #1b1b1b; border-color: #4b5f6a; color: #c3dae3; }
.chip[aria-pressed="true"], .chip.is-on { background: rgba(158, 197, 212, .10); border-color: var(--gold-dim); color: var(--gold-hi); }

.card-grid { gap: 16px; }
.card-select { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card-select .cs-title { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.card-select .cs-en { font-size: 12px; letter-spacing: 2px; }
.card-select .cs-desc { font-size: 13px; line-height: 20px; }

/* ---------- 标签 / tabs ---------- */

.badge { height: auto; padding: 3px 8px; border-radius: 4px; font-size: 12px; line-height: 16px; letter-spacing: 0; border-color: #34444e; color: var(--text-sub); }
.tag { border-radius: 4px; padding: 3px 8px; font-size: 12px; line-height: 16px; letter-spacing: 0; }

.tabs { gap: 8px; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 16px; font-size: 14px; letter-spacing: 0; color: var(--text-sub); }
.tab[aria-selected="true"] { color: var(--gold-hi); }
.tab[aria-selected="true"]::after { background: var(--gold); height: 2px; }

/* ---------- 卡片一族 ---------- */

.role-card, .reflect-item, .fav-card, .bagua-card, .settings-card, .admin-section, .stat, .u-row, .cast-stage { background: #181818; border: 1px solid var(--line); border-radius: 16px; }
.role-card, .reflect-item, .cast-stage { padding: 24px; }
.fav-card, .bagua-card { padding: 20px; }
.minicard { background: #000; padding: 24px; margin: 16px 0; border-radius: 12px; border: 1px solid var(--line); }
.minicard h3 { color: var(--gold); font-size: 14px; font-weight: 500; }
.card-preview { border-radius: 20px; background: #131313; border: 1px solid var(--line); }
.card-preview::after { inset: 12px; border-radius: 14px; border-color: rgba(158, 197, 212, .10); }
.card-preview .cp-name { font-size: 32px; font-weight: 500; letter-spacing: 0; }
.card-preview .cp-v { font-size: 14px; line-height: 22px; }

/* ---------- 卦象 ---------- */

.hex { gap: 9px; }
.hex-name { font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: -1px; line-height: 1.15; }
.hex-lg { width: 128px; gap: 10px; }
.hex-lg .hex-row { height: 9px; }
.hex-caption { letter-spacing: 2px; }

/* ---------- 今日一卦 ---------- */

.today-card { background: #131313; border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.today-card .tc-name { font-size: 26px; font-weight: 500; letter-spacing: 0; }
.today-card .tc-no, .today-card .tc-full { font-size: 12px; letter-spacing: 1px; }
.today-card .tc-quote { font-size: 14px; line-height: 22px; }

/* ---------- 首页 Hero ---------- */

.new-home {
  max-width: var(--maxw); margin: 0 auto; padding: 0 48px;
  display: flex; flex-direction: column;
  min-height: calc(100svh - 120px);
}
.hero-index { display: flex; justify-content: space-between; gap: 24px; padding: 4px 0 0; font-size: 12px; line-height: 16px; letter-spacing: 2px; color: #5a727c; }
.new-hero { position: relative; flex: 1; min-height: 540px; display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 24px; }
.new-copy { position: relative; z-index: 2; padding: 48px 0 56px; }
.new-overline { font-size: 12px; line-height: 16px; letter-spacing: 4px; color: #77939f; }
.new-copy h1 {
  font-size: clamp(44px, 5vw, 72px); line-height: 1; font-weight: 500; letter-spacing: -3px;
  margin: 28px 0 24px; color: transparent;
  background: linear-gradient(90deg, #ffffff, #9b9b9b);
  -webkit-background-clip: text; background-clip: text;
  text-wrap: balance;
}
.new-copy p { font-size: 14px; line-height: 22px; color: #7f959f; max-width: 30em; margin: 0; }
.new-cta {
  display: inline-flex; align-items: center; gap: 56px;
  margin-top: 32px; padding: 14px 24px; border-radius: 9999px;
  background: var(--gold); color: #0B1114; font-size: 15px; line-height: 20px; font-weight: 500;
  transition: transform .5s var(--base, cubic-bezier(.22,1,.36,1)), background-color .3s var(--ease);
}
.new-cta:hover { background: var(--gold-hi); transform: translateY(-4px); }
.new-cta:active { transform: scale(.98); }
.small-note { display: block; margin-top: 16px; font-size: 12px; line-height: 16px; color: #506770; }
.new-art { --dock: 56px; position: relative; height: calc(min(620px, 70vh) + var(--dock)); min-width: 0; margin: 0 -24px 0 -16px; }
/* 大屏：容器变宽后同步放大主视觉，避免图案在宽栏里显小 */
@media (min-width: 1600px) {
  .new-art { height: calc(min(760px, 70vh) + var(--dock)); }
}
@media (min-width: 2000px) {
  .new-art { height: calc(min(880px, 76vh) + var(--dock)); }
}
#baguaStage { position: absolute; inset: 0 0 var(--dock) 0; }
.bagua-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline-offset: -24px; }
.bagua-canvas.dragging { cursor: grabbing; }
.art-number { position: absolute; top: 8px; right: 16px; font-size: 12px; line-height: 16px; letter-spacing: 2px; color: #4f6e7a; pointer-events: none; }
.visual-controls { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 12px; line-height: 16px; color: #5a7c8a; transition: opacity .4s var(--ease); }
.visual-controls > span { display: flex; align-items: center; gap: 8px; }
.visual-controls i { width: 4px; height: 4px; border-radius: 50%; background: #72aabd; }
.visual-controls button { border: 0; background: transparent; color: #7294a3; font-size: 12px; line-height: 16px; padding: 8px; display: flex; gap: 8px; }
.visual-controls button:hover { color: #c6e3ef; }
/* 成卦后让出底部位置给解读文字 */
.new-art.is-hex .visual-controls { opacity: 0; pointer-events: none; }

/* ---------- 获取今日一卦：按钮 + 解读 ---------- */

.hex-dock { position: absolute; left: 0; right: 0; bottom: 0; height: var(--dock); display: flex; align-items: center; justify-content: center; }
.hex-cta {
  min-height: 40px; min-width: 184px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(158, 197, 212, .45);
  border-radius: 0;
  background: rgba(158, 197, 212, .06);
  color: rgba(214, 238, 246, .92);
  font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: .06em;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .2s ease;
}
.hex-cta:hover { background: rgba(158, 197, 212, .14); border-color: rgba(158, 197, 212, .8); color: #eaf7fc; }
.hex-cta:active { transform: scale(.98); }
.hex-cta:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 3px; }

.hex-readout {
  position: absolute; left: 24px; right: 24px; bottom: calc(var(--dock) + 10px);
  text-align: center; pointer-events: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity .7s var(--e), transform .7s var(--e);
}
.hex-readout[hidden] { display: none; }
.hex-readout.show { opacity: 1; transform: none; }
.hr-head { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.hr-no { font-size: 12px; line-height: 16px; letter-spacing: 2px; color: #6f96a6; }
.hr-name { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: 1px; color: #e2f2f8; }
.hr-theme { font-size: 12px; line-height: 16px; letter-spacing: 2px; color: #77939f; }
.hr-gist { max-width: 32em; margin: 8px auto 0; font-size: 13px; line-height: 21px; color: #93aab4; }

/* ---------- 首页分区 ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card { border: 1px solid var(--line); border-radius: 16px; background: #181818; overflow: hidden; }
.feature-copy { padding: 24px 24px 0; }
.feature-copy small { color: #7e9eb0; font-size: 12px; line-height: 16px; letter-spacing: 2px; }
.feature-copy h3 { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: 0; margin: 16px 0 12px; }
.feature-copy p { font-size: 14px; line-height: 20px; color: var(--text-sub); margin: 0; min-height: 60px; }
.story-visual { height: 208px; padding: 24px; overflow: hidden; }
.demo-surface { height: 100%; background: #000; border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow: hidden; color: #c8d6db; }
.demo-label { font-size: 12px; line-height: 16px; color: #5f747d; }
.typing-line { margin: 14px 0; font-size: 14px; line-height: 20px; min-height: 40px; color: #e0e9ec; }
.caret { display: inline-block; width: 1px; height: 14px; background: var(--gold); vertical-align: middle; }
.demo-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-tags span { padding: 4px 8px; background: #232323; color: #a9c3ce; border-radius: 4px; font-size: 12px; line-height: 16px; }
.demo-hex { width: 104px; margin: 14px auto 10px; }
.demo-bottom { font-size: 12px; line-height: 16px; text-align: center; color: #5f747d; }
.todo-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 12px; line-height: 16px; color: #a9c3ce; }
.check { height: 16px; width: 16px; border: 1px solid #4b5f6a; border-radius: 4px; display: grid; place-items: center; flex-shrink: 0; font-size: 10px; color: #0B1114; }
.check.done { background: var(--gold); border-color: var(--gold); }

.manifesto { text-align: center; padding: 88px 0; }
.manifesto blockquote { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; font-weight: 500; letter-spacing: -1px; color: var(--text); }
.manifesto blockquote em { font-style: normal; color: var(--gold); }
.manifesto .mf-sub { margin-top: 24px; font-size: 12px; line-height: 16px; letter-spacing: 2px; color: #5b7680; }

.faq-section { padding: 56px; background: #181818; border: 1px solid var(--line); border-radius: 24px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.faq-section h2 { font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -1px; margin: 16px 0; }
.faq-section p { font-size: 14px; line-height: 22px; color: var(--text-sub); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-list details:first-child { padding-top: 0; }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { font-size: 14px; line-height: 20px; color: #c7dde7; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--gold); font-size: 16px; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 12px 0 0; color: var(--text-sub); }

.final-section { text-align: center; padding: 88px 0; }
.final-section h2 { font-size: 36px; line-height: 42px; font-weight: 500; letter-spacing: -1px; margin: 0 0 20px; }
.final-section p { color: var(--text-sub); margin: 0 0 28px; }

/* ---------- 记录 ---------- */

.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-item { border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: #0B0B0B; }
.record-item:hover { background: #131313; }
.record-item .ri-q { font-size: 16px; font-weight: 500; letter-spacing: 0; }
.record-item .ri-meta { font-size: 12px; color: var(--text-dim); letter-spacing: 0; }

/* ---------- 流程页 ---------- */

.read-hero { border-radius: 20px; background: #181818; border-color: var(--line); padding: 32px 36px; }
.read-hero::before { width: 3px; border-radius: 3px; background: linear-gradient(to bottom, var(--gold), rgba(158, 197, 212, 0)); }
.rh-question { font-size: 17px; line-height: 26px; letter-spacing: 0; border-left-color: var(--gold-dim); }
.point-card { border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, rgba(158, 197, 212, .10) 0%, rgba(158, 197, 212, 0) 60%), #181818; border-color: var(--line); }
.point-text { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.6; letter-spacing: 0; font-weight: 500; }
.fold { border-radius: 12px; background: #000; border-color: var(--line); }
.fold summary { font-size: 13px; letter-spacing: 0; }
.compose { padding: 28px 32px; }
.compose-ai { border-radius: 12px; border-color: rgba(158, 197, 212, .22); background: rgba(158, 197, 212, .05); }
.derived-q { border-left-color: var(--gold); background: rgba(158, 197, 212, .06); border-radius: 0 8px 8px 0; }
.stage-banner { border-radius: 12px; border-left-width: 2px; border-color: rgba(158, 197, 212, .2); background: rgba(158, 197, 212, .05); }
.stage-head .h3 { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.cast-line { border-radius: 10px; background: #000; }
.cast-line.is-current { background: rgba(158, 197, 212, .06); }
.reflect-item .ri-title { font-size: 17px; font-weight: 500; letter-spacing: 0; }

/* ---------- 账号 / 设置 / 后台 ---------- */

.auth-card { background: #181818; border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-title { font-size: clamp(28px, 3.4vw, 38px); font-weight: 500; letter-spacing: -1px; line-height: 1.15; }
.settings-card { padding: 24px; margin-bottom: 16px; }
.sc-title { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.nav-menu { background: #181818; border-color: var(--line); border-radius: 12px; }
.nav-user { border-radius: 999px; border-color: var(--line); height: 34px; }
.stat { border-radius: 16px; }
.u-row { border-radius: 12px; }

/* ---------- 页脚 ---------- */

.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0; }
.foot-inner { padding: 0 48px; font-size: 12px; line-height: 16px; letter-spacing: 0; color: #56717d; }
.foot-inner a:hover { color: var(--gold); border-color: var(--line-strong); }

/* ---------- 进场动效 ---------- */

.motion-unit { opacity: 0; transform: translateY(10px); filter: blur(4px); transition: transform 1.05s var(--e), opacity .8s var(--e), filter .8s var(--e); transition-delay: var(--delay, 0s); }
.motion-unit.landed { opacity: 1; transform: none; filter: blur(0); }
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.landed { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */

/* 矮屏（≤820px 高）：不再额外占高，按钮与解读浮在主视觉底部，保证首屏不被顶出 */
@media (min-width: 861px) and (max-height: 820px) {
  .new-art { height: min(620px, 70vh); }
  #baguaStage { inset: 0; }
  .hex-dock { height: 52px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .88) 42%, #000 100%); }
  .hex-readout { bottom: 58px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .92) 42%, #000 100%); padding: 16px 0 4px; }
  .visual-controls { bottom: 44px; }
}

@media (max-width: 1050px) {
  .new-art { height: calc(520px + var(--dock)); }
  .new-copy h1 { font-size: 56px; letter-spacing: -2px; }
}

@media (max-width: 860px) {
  .site-nav { top: 16px; width: calc(100% - 32px); padding: 0 16px; }
  .nav-inner { gap: 16px; }
  .nav-links, .nav-record { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer { top: 88px; width: calc(100% - 32px); }
  .view { padding-top: 104px; }
  .wrap, .foot-inner { padding: 0 24px; }
  .new-home { padding: 0 24px; min-height: calc(100svh - 104px); }
  .new-hero { grid-template-columns: 1fr; min-height: 0; }
  .new-copy { padding: 40px 0 0; text-align: center; }
  .new-copy h1 { font-size: 48px; letter-spacing: -2px; margin: 24px auto; }
  .new-copy h1 br { display: none; }
  .new-copy p { margin: 0 auto; }
  .new-art { --dock: 46px; height: calc(380px + var(--dock)); margin: -8px -24px 0; }
  .hex-readout { left: 8px; right: 8px; }
  .hr-name { font-size: 19px; line-height: 24px; }
  .hr-gist { font-size: 12px; line-height: 19px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-copy p { min-height: 0; }
  .manifesto { padding: 72px 0; }
  .faq-section { grid-template-columns: 1fr; padding: 32px 24px; gap: 24px; }
  .final-section { padding: 64px 0; }
  .final-section h2 { font-size: 30px; line-height: 36px; }
  .section { padding: 56px 0; }
  .panel { padding: 24px; }
  .read-hero { padding: 24px; }
}

@media (max-width: 560px) {
  .new-copy h1 { font-size: 40px; }
  .new-cta { gap: 40px; padding: 12px 24px; }
  .feature-copy { padding: 20px 20px 0; }
  .story-visual { height: 190px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-unit, .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}