/* ============================================================
   神谕所 · ΤΟ ΜΑΝΤΕΙΟΝ
   视觉：黑绘陶器（black-figure）＋ 大理石纸 ＋ 陶土红
   ============================================================ */

:root{
  --bg:        #12100e;
  --bg-2:      #191512;
  --surface:   #1f1a16;
  --surface-2: #251f19;
  --line:      rgba(200,164,92,.20);
  --line-soft: rgba(200,164,92,.10);
  --parch:     #e9dfcc;
  --parch-2:   #cdc0aa;
  --dim:       #9a8d78;
  --dim-2:     #6f6557;
  --gold:      #c8a45c;
  --gold-hi:   #e0c383;
  --terra:     #c05a3c;
  --olive:     #8a9a74;
  --sea:       #5f82a8;
  --serif: "Noto Serif SC","Source Han Serif SC","Songti SC","STSong",Georgia,"Times New Roman",serif;
  --greek: "Palatino Linotype","Palatino","Times New Roman",Georgia,"Segoe UI",serif;
  --sans: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --maxw: 720px;
}

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

/* 作者样式里的 display 会盖掉 UA 的 [hidden]，必须显式兜住 */
[hidden]{ display: none !important; }

html,body{ margin:0; padding:0; }

body{
  background:
    radial-gradient(1200px 600px at 50% -10%, #221c16 0%, transparent 60%),
    radial-gradient(800px 500px at 100% 100%, #1a1512 0%, transparent 55%),
    var(--bg);
  color: var(--parch);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* 全面屏：避让刘海与底部横条（PWA 独立窗口时生效） */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ---------- 饰带（希腊陶器「波形纹」κῦμα） ---------- */
.meander{
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16'%3E%3Cpath d='M0 8 Q5 1 10 8 Q15 15 20 8' fill='none' stroke='%23c8a45c' stroke-width='1.2' stroke-opacity='.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 20px 16px;
  background-position: 0 0;
}
.meander.thin{ height: 16px; opacity: .45; margin-bottom: 18px; }

/* ---------- 头部 ---------- */
.site-head{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 22px 18px;
  text-align: center;
  position: relative;
}
.brand-gr{
  font-family: var(--greek);
  font-size: 11px;
  letter-spacing: .42em;
  color: var(--gold);
  opacity: .75;
  margin-bottom: 6px;
  text-indent: .42em;
}
.site-head h1{
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 500;
  margin: 0;
  letter-spacing: .18em;
  text-indent: .18em;
  color: var(--parch);
  text-shadow: 0 2px 24px rgba(200,164,92,.18);
}
.brand-sub{
  margin: 8px 0 0;
  font-size: 12.5px;
  letter-spacing: .16em;
  color: var(--dim);
}
.attic-clock{
  margin-top: 16px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(200,164,92,.03);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.attic-clock:hover{ border-color: rgba(200,164,92,.4); background: rgba(200,164,92,.07); }
.ac-label{ font-size: 10px; letter-spacing: .22em; color: var(--dim-2); }
.ac-value{ font-size: 13px; color: var(--gold); letter-spacing: .06em; }

/* ---------- 导航 ---------- */
.tabs{
  max-width: var(--maxw);
  margin: 6px auto 0;
  padding: 0 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 40;
  background: linear-gradient(to bottom, var(--bg) 62%, rgba(18,16,14,0));
  padding-top: 10px;
  padding-bottom: 12px;
}
.tab{
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--dim);
  padding: 8px 1px 10px;
  font-family: var(--serif);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color .22s, border-color .22s;
  min-width: 0;
}
.tab-gr{
  font-family: var(--greek);
  font-size: 8px;
  letter-spacing: 0;
  opacity: .55;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.tab-cn{ font-size: 13.5px; letter-spacing: .08em; text-indent: .08em; white-space: nowrap; }
.tab.is-active{ color: var(--gold-hi); border-bottom-color: var(--gold); }
.tab.is-active .tab-gr{ opacity: .85; }

/* ---------- 视图 ---------- */
main{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4px 20px 40px;
}
.view{ display: none; animation: fadeUp .35s ease both; }
.view.is-active{ display: block; }

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(10px); }
  to  { opacity: 1; transform: none; }
}

.section-head{ margin: 30px 0 16px; }
.section-head h2{
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .12em;
  margin: 0 0 8px;
  color: var(--parch);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2::before{
  content: "";
  width: 16px; height: 1px;
  background: var(--gold);
  opacity: .6;
  flex: none;
}
.section-note{
  margin: 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--dim);
  letter-spacing: .02em;
}

/* ---------- 每日一谕 ---------- */
.daily{
  margin-top: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(200,164,92,.07), rgba(200,164,92,.015) 55%),
    var(--surface);
  border-radius: 3px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.daily::after{
  content: "Δ";
  position: absolute;
  right: -6px; bottom: -34px;
  font-family: var(--greek);
  font-size: 110px;
  color: rgba(200,164,92,.05);
  line-height: 1;
  pointer-events: none;
}
.daily-head{
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.kicker{
  font-size: 11px; letter-spacing: .28em; color: var(--gold);
  text-transform: uppercase;
}
.daily-date{ font-size: 11px; color: var(--dim-2); letter-spacing: .08em; }
.daily-body{ font-size: 14px; line-height: 1.95; color: var(--parch-2); position: relative; z-index: 1; }
.daily-body .dq{ color: var(--parch); }
.daily-meta{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dm-txt{ font-size: 12px; color: var(--dim); min-width: 0; overflow-wrap: anywhere; }
.daily-sub{ font-size: 11px; color: var(--dim-2); letter-spacing: .06em; margin-top: 6px; }
.stamp.sm{
  width: 26px; height: 26px; flex: none;
  font-size: 14px; border-width: 1px;
  animation: none; transform: none;
}
.stamp.sm::after{ display: none; }

/* ---------- 问类 ---------- */
.questions{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 560px){ .questions{ grid-template-columns: repeat(4, 1fr); } }

.q{
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 12px 6px 10px;
  cursor: pointer;
  font-family: var(--serif);
  color: var(--parch-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all .2s ease;
  position: relative;
}
.q:hover{ border-color: var(--line); background: var(--surface-2); }
.q-gr{ font-family: var(--greek); font-size: 9.5px; color: var(--dim-2); letter-spacing: .06em; }
.q-cn{ font-size: 14.5px; letter-spacing: .12em; text-indent: .12em; }
.q.is-on{
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(200,164,92,.14), rgba(200,164,92,.05));
  color: var(--parch);
  box-shadow: inset 0 0 0 1px rgba(200,164,92,.25);
}
.q.is-on .q-gr{ color: var(--gold); }

/* ---------- 签筒 ---------- */
.draw-zone{
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.urn{
  position: relative;
  width: 150px;
  height: 190px;
  display: grid;
  place-items: start center;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.55));
}
.urn-svg{ width: 100%; height: auto; }
.urn.is-ready .sticks{ animation: sway 3.4s ease-in-out infinite; transform-origin: 60px 50px; }
.urn.is-shaking{ animation: shake .42s cubic-bezier(.36,.07,.19,.97) infinite; }

@keyframes sway{
  0%,100%{ transform: rotate(-1.6deg); }
  50%    { transform: rotate(1.6deg); }
}
@keyframes shake{
  0%,100%{ transform: translate(0,0) rotate(0); }
  20%    { transform: translate(-3px,1px) rotate(-2.2deg); }
  40%    { transform: translate(3px,-1px) rotate(2.2deg); }
  60%    { transform: translate(-2px,2px) rotate(-1.4deg); }
  80%    { transform: translate(2px,-2px) rotate(1.4deg); }
}
.urn-hint{
  position: absolute;
  bottom: -4px;
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  color: var(--dim-2);
  letter-spacing: .12em;
  transition: color .2s;
}
.urn.is-ready .urn-hint{ color: var(--gold); }

.btn-draw{
  appearance: none;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(200,164,92,.16), rgba(200,164,92,.04));
  color: var(--gold-hi);
  font-family: var(--serif);
  padding: 12px 44px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: all .22s ease;
  position: relative;
}
.btn-draw:hover:not(:disabled){
  background: linear-gradient(180deg, rgba(200,164,92,.28), rgba(200,164,92,.09));
  box-shadow: 0 0 28px rgba(200,164,92,.18);
}
.btn-draw:disabled{
  opacity: .32;
  cursor: not-allowed;
  border-color: var(--dim-2);
  color: var(--dim);
  background: transparent;
}
.btn-draw-gr{ font-family: var(--greek); font-size: 9.5px; letter-spacing: .28em; opacity: .7; text-indent: .28em; }
.btn-draw-cn{ font-size: 16px; letter-spacing: .3em; text-indent: .3em; }
.draw-note{
  margin: 0; font-size: 11.5px; color: var(--dim-2); letter-spacing: .06em;
}

/* ---------- 结果卡 ---------- */
.result-slot{ margin-top: 30px; }

.rc{
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(200,164,92,.05), transparent 40%),
    var(--surface);
  border-radius: 3px;
  padding: 24px 20px 20px;
  position: relative;
  animation: rcIn .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rcIn{
  from{ opacity: 0; transform: translateY(16px) scale(.985); }
  to  { opacity: 1; transform: none; }
}
.rc::before, .rc::after{
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--gold);
  opacity: .45;
}
.rc::before{ top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.rc::after{ bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.rc-top{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.seal{
  flex: none;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(200,164,92,.16), transparent 65%);
}
.seal::after{
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px dashed rgba(200,164,92,.3);
}
.seal svg{ width: 28px; height: 28px; }
.seal-glyph{ stroke: var(--gold-hi); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.rc-who{ min-width: 0; }
.rc-god-gr{ font-family: var(--greek); font-size: 11px; letter-spacing: .16em; color: var(--gold); }
.rc-god-cn{ font-size: 21px; letter-spacing: .12em; color: var(--parch); margin: 1px 0 2px; }
.rc-god-ep{ font-size: 11.5px; color: var(--dim); letter-spacing: .04em; }

.stamp{
  margin-left: auto;
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 600;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(4deg);
  animation: stampIn .5s .18s cubic-bezier(.2,1.6,.4,1) both;
  position: relative;
}
.stamp::after{
  content: "";
  position: absolute; inset: 3px;
  border: 1px solid currentColor;
  opacity: .35;
}
@keyframes stampIn{
  from{ opacity: 0; transform: rotate(16deg) scale(1.8); }
  to  { opacity: 1; transform: rotate(4deg) scale(1); }
}
[data-v="可"]{ color: var(--olive); }
[data-v="候"]{ color: var(--sea); }
[data-v="止"]{ color: var(--terra); }

.verdict-line{
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--dim);
  margin: -6px 0 18px;
  padding-left: 78px;
}

.rc-quote{
  border-left: 2px solid rgba(200,164,92,.35);
  padding: 2px 0 2px 16px;
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 2.05;
  color: var(--parch);
  letter-spacing: .03em;
}

.rc-block{ margin-bottom: 16px; }
.rc-block:last-of-type{ margin-bottom: 0; }
.rc-lab{
  font-size: 10.5px;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 5px;
  opacity: .8;
}
.rc-txt{ font-size: 14px; line-height: 1.95; color: var(--parch-2); }
.rc-txt strong{ color: var(--parch); font-weight: 500; }

.rc-clue{
  border: 1px dashed var(--line);
  background: rgba(95,130,168,.06);
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--parch-2);
}
.rc-clue .rc-lab{ color: var(--sea); }

.rc-actions{
  display: flex;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.btn-mini{
  appearance: none;
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--parch-2);
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: .1em;
  padding: 9px 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s;
}
.btn-mini:hover{ border-color: var(--gold); color: var(--gold-hi); background: rgba(200,164,92,.06); }
.btn-mini.primary{ border-color: rgba(200,164,92,.5); color: var(--gold-hi); }
.btn-mini.is-faved{
  border-color: rgba(200,164,92,.55);
  color: var(--gold-hi);
  background: rgba(200,164,92,.1);
}

/* ---------- 铭文条 ---------- */
.motto-strip{
  margin-top: 40px;
  text-align: center;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
}
.motto-k{
  display: block;
  font-size: 9px;
  letter-spacing: .34em;
  color: var(--dim-2);
  opacity: .8;
  margin-bottom: 7px;
  text-indent: .34em;
}
.motto{
  font-family: Georgia, var(--serif);
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--dim-2);
  text-indent: .26em;
}

/* ---------- 神谱网格 ---------- */
.god-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 600px){ .god-grid{ grid-template-columns: repeat(3, 1fr); } }

.god-card{
  appearance: none;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 14px 13px 13px;
  cursor: pointer;
  font-family: var(--serif);
  color: inherit;
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
}
.god-card:hover{
  border-color: var(--line);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.god-card::after{
  content: attr(data-gr);
  position: absolute;
  right: 4px; top: -12px;
  font-family: var(--greek);
  font-size: 40px;
  color: rgba(200,164,92,.04);
  pointer-events: none;
}
.gc-top{ display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gc-seal{
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  border: 1px solid rgba(200,164,92,.4);
  display: grid; place-items: center;
}
.gc-seal svg{ width: 16px; height: 16px; }
.gc-name{ font-size: 16px; letter-spacing: .1em; color: var(--parch); }
.gc-ep{
  font-size: 10.5px; color: var(--dim);
  letter-spacing: .02em;
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-dom{
  font-size: 10.5px;
  color: var(--dim-2);
  letter-spacing: .04em;
  margin-top: 2px;
}

/* ---------- 祭仪 ---------- */
.praxis-list{ display: flex; flex-direction: column; gap: 10px; }
.px{
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}
.px-head{
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font-family: var(--serif);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}
.px-ico{
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  border: 1px solid rgba(200,164,92,.35);
  display: grid; place-items: center;
  color: var(--gold);
  font-family: var(--greek);
  font-size: 12px;
}
.px-titles{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.px-cn{ font-size: 15px; letter-spacing: .08em; color: var(--parch); }
.px-gr{ font-family: var(--greek); font-size: 10px; color: var(--dim-2); letter-spacing: .1em; }
.px-arrow{
  color: var(--gold); font-size: 12px; opacity: .5;
  transition: transform .28s ease;
}
.px.is-open .px-arrow{ transform: rotate(90deg); }
.px-body{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .34s ease;
}
.px.is-open .px-body{ grid-template-rows: 1fr; }
.px-body > div{ overflow: hidden; }
.px-inner{ padding: 0 16px 18px; }

.px-lead{
  font-size: 13px; line-height: 1.95; color: var(--parch-2);
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.px-steps{
  list-style: none;
  counter-reset: s;
  margin: 0; padding: 0;
}
.px-steps li{
  counter-increment: s;
  position: relative;
  padding: 0 0 11px 30px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--parch-2);
}
.px-steps li::before{
  content: counter(s);
  position: absolute;
  left: 0; top: 3px;
  width: 19px; height: 19px;
  border: 1px solid rgba(200,164,92,.35);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-family: var(--greek);
  color: var(--gold);
  line-height: 1;
}
.px-steps li:last-child{ padding-bottom: 0; }

.px-warn{
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(192,90,60,.07);
  border-left: 2px solid rgba(192,90,60,.5);
  font-size: 12px;
  line-height: 1.85;
  color: var(--parch-2);
}
.px-warn::before{
  content: "注意";
  display: inline-block;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--terra);
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---------- 历法 ---------- */
.cal-list{ display: flex; flex-direction: column; gap: 8px; }

.cal{
  display: flex;
  gap: 13px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 2px;
  padding: 13px 14px;
  transition: border-color .2s;
}
.cal-no{
  flex: none;
  width: 32px; height: 32px;
  border: 1px solid rgba(200,164,92,.28);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--greek);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--gold);
  opacity: .75;
}
.cal-body{ flex: 1; min-width: 0; }
.cal-top{
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-gr{
  font-family: var(--greek);
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: .04em;
  opacity: .8;
}
.cal-cn{ font-size: 15px; color: var(--parch); letter-spacing: .06em; }
.cal-season{
  font-size: 9.5px;
  color: var(--dim-2);
  letter-spacing: .12em;
  border: 1px solid var(--line-soft);
  padding: 0 6px;
  border-radius: 2px;
  line-height: 1.7;
}
.cal-now{
  font-size: 9.5px;
  color: var(--gold-hi);
  letter-spacing: .12em;
  border: 1px solid rgba(200,164,92,.45);
  background: rgba(200,164,92,.1);
  padding: 0 7px;
  border-radius: 2px;
  line-height: 1.7;
}
.cal-date{
  font-size: 10.5px;
  color: var(--dim-2);
  letter-spacing: .04em;
  margin-top: 3px;
}
.cal-fest{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.cal-fest span{
  font-size: 11px;
  line-height: 1.7;
  color: var(--parch-2);
  background: rgba(200,164,92,.055);
  border: 1px solid var(--line-soft);
  padding: 1px 8px;
  border-radius: 2px;
}
.cal.is-now{
  border-color: rgba(200,164,92,.42);
  background:
    linear-gradient(180deg, rgba(200,164,92,.09), transparent 55%),
    var(--surface);
  box-shadow: 0 0 26px rgba(200,164,92,.06);
}
.cal.is-now .cal-no{
  opacity: 1;
  border-color: var(--gold);
  background: rgba(200,164,92,.12);
  color: var(--gold-hi);
}

/* ---------- 辞解 ---------- */
.lx-list{ display: flex; flex-direction: column; gap: 8px; }
.lx{
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 2px;
  padding: 13px 15px 14px;
}
.lx-head{
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.lx-gr{
  font-family: var(--greek);
  font-size: 19px;
  color: var(--gold-hi);
  letter-spacing: .02em;
  line-height: 1.4;
}
.lx-tr{
  font-family: var(--greek);
  font-size: 10.5px;
  font-style: italic;
  color: var(--dim-2);
  letter-spacing: .05em;
}
.lx-cn{
  font-size: 13px;
  color: var(--parch-2);
  letter-spacing: .1em;
  margin-left: auto;
}
.lx-def{
  margin: 0;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--parch-2);
}

/* ---------- 历史 ---------- */
.seg{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--surface);
}
.seg-btn{
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--dim);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
  padding: 9px 6px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.seg-btn span{
  font-size: 11px;
  letter-spacing: 0;
  opacity: .55;
  margin-left: 3px;
}
.seg-btn:hover{ color: var(--parch-2); }
.seg-btn.is-on{
  background: rgba(200,164,92,.14);
  color: var(--gold-hi);
}
.seg-btn.is-on span{ opacity: .8; }

.history{ display: flex; flex-direction: column; gap: 8px; }
.hi{
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 2px;
  padding: 12px 10px 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.hi-star{
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: -2px;
  background: transparent;
  border: 0;
  color: var(--dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  transition: color .18s, transform .18s, background .18s;
}
.hi-star:hover{ color: var(--gold); background: rgba(200,164,92,.08); }
.hi-star.is-on{ color: var(--gold); }
.hi-star.is-on:active{ transform: scale(.9); }
.hi-v{
  flex: none;
  width: 26px; height: 26px;
  border: 1px solid currentColor;
  border-radius: 2px;
  display: grid; place-items: center;
  font-size: 13px;
  margin-top: 1px;
}
.hi-main{ min-width: 0; flex: 1; }
.hi-top{ display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--dim-2); }
.hi-god{ font-size: 13.5px; color: var(--parch); letter-spacing: .06em; margin: 2px 0 3px; }
.hi-line{
  font-size: 12px; color: var(--dim); line-height: 1.75;
  white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty{
  text-align: center;
  padding: 46px 20px;
  color: var(--dim-2);
  font-size: 13px;
  letter-spacing: .06em;
  border: 1px dashed var(--line-soft);
  border-radius: 2px;
}
.btn-ghost{
  display: block;
  margin: 20px auto 0;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--serif);
  font-size: 12px;
  padding: 8px 20px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: .1em;
  transition: all .2s;
}
.btn-ghost:hover{ border-color: var(--terra); color: var(--terra); }

.about-block{
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.about-block h3{
  font-size: 13px; font-weight: 500; color: var(--gold);
  letter-spacing: .18em; margin: 0 0 12px;
}
.about-block p{
  font-size: 12px; line-height: 1.95; color: var(--dim); margin: 0 0 10px;
}
.about-block strong{ color: var(--parch-2); font-weight: 500; }
.disclaimer{
  padding: 10px 12px;
  border-left: 2px solid rgba(192,90,60,.45);
  background: rgba(192,90,60,.05);
  color: var(--dim) !important;
}

/* ---------- 浮层 ---------- */
.modal{ position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px){ .modal{ align-items: center; } }
.modal-backdrop{
  position: absolute; inset: 0;
  background: rgba(8,7,6,.82);
  backdrop-filter: blur(3px);
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn{ from{ opacity: 0; } to{ opacity: 1; } }
.modal-panel{
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 26px 22px calc(30px + env(safe-area-inset-bottom));
  animation: sheetIn .34s cubic-bezier(.2,.9,.25,1) both;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px){
  .modal-panel{ border-bottom: 1px solid var(--line); border-radius: 4px; }
}
@keyframes sheetIn{
  from{ transform: translateY(30px); opacity: 0; }
  to  { transform: none; opacity: 1; }
}
.modal-close{
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s;
}
.modal-close:hover{ color: var(--parch); border-color: var(--gold); }

.md-head{ display: flex; align-items: center; gap: 14px; margin-bottom: 6px; padding-right: 34px; }
.md-seal{
  width: 52px; height: 52px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(200,164,92,.16), transparent 65%);
}
.md-seal svg{ width: 24px; height: 24px; }
.md-gr{ font-family: var(--greek); font-size: 11px; letter-spacing: .16em; color: var(--gold); }
.md-cn{ font-size: 24px; letter-spacing: .1em; color: var(--parch); line-height: 1.3; }
.md-ep{ font-size: 12px; color: var(--dim); margin-top: 3px; letter-spacing: .04em; }
.md-tag{
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--gold);
  border: 1px solid rgba(200,164,92,.3);
  padding: 1px 7px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.md-note{
  font-size: 13.5px; line-height: 2; color: var(--parch-2);
  margin: 14px 0 0;
}
.md-rows{ margin-top: 20px; border-top: 1px solid var(--line-soft); }
.md-row{
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.8;
}
.md-row dt{
  flex: none; width: 62px;
  color: var(--gold); opacity: .8;
  font-size: 11px; letter-spacing: .14em;
}
.md-row dd{ margin: 0; color: var(--parch-2); flex: 1; }
.md-actions{ margin-top: 22px; display: flex; }

/* 关联神 */
.rel-wrap{ display: flex; flex-wrap: wrap; gap: 6px; }
.rel{
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  background: rgba(200,164,92,.06);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px 9px;
  cursor: pointer;
  font-family: var(--serif);
  transition: border-color .18s, background .18s;
}
.rel b{ font-weight: 500; font-size: 12.5px; color: var(--gold-hi); letter-spacing: .04em; }
.rel i{ font-style: normal; font-size: 10.5px; color: var(--dim-2); line-height: 1.5; }
.rel:hover{ border-color: var(--gold); background: rgba(200,164,92,.13); }

/* 分享图预览 */
.share-prev img{
  width: 100%;
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--bg);
}
.share-hint{
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--dim-2);
  text-align: center;
  letter-spacing: .04em;
}
.md-actions a.btn-mini{
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.6;
  padding: 10px 8px;
}

/* ---------- 页脚 ---------- */
.site-foot{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 20px 46px;
  text-align: center;
}
.site-foot p{
  margin: 0 0 6px;
  font-family: Georgia, var(--serif);
  font-size: 10.5px;
  letter-spacing: .24em;
  color: var(--dim-2);
  text-indent: .24em;
}
.site-foot .foot-dim{ font-size: 10px; letter-spacing: .12em; opacity: .6; }

/* ---------- 提示 ---------- */
.toast{
  position: fixed;
  left: 50%; bottom: calc(42px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--parch);
  font-size: 12.5px;
  letter-spacing: .06em;
  padding: 10px 20px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 200;
  white-space: nowrap;
}
.toast.is-on{ opacity: 1; transform: translate(-50%, 0); }

/* ---------- 无障碍/降级 ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
