/* ============================================================
   萬神錄 · 解夢辭典／六十四卦
   ------------------------------------------------------------
   與古籍頁（ziwei-classics.css）同一套閱讀語彙：
   內文 16–17px、行高 1.95、金線只作收尾，不用大色塊搶戲。

   這一層的頁面是「查得到、讀得完」的參考資料，
   不是活動頁；因此不做滿版 hero，標題下方直接進內容。
   ============================================================ */

.dx-wrap {
  max-width: 860px;
  padding-top: 26px;
  padding-bottom: 56px;
}

/* ── 頁首 ── */
.dx-head { margin-bottom: 22px; }

.dx-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .34em;
  color: #778089;
}

.dx-head h1 {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 14px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: .1em;
  color: #3f4750;
  line-height: 1.5;
}
.dx-head h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(179,64,30,.45), rgba(20,24,29,0.05));
}

.dx-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: #778089;
  max-width: 40em;
}

.dx-stats {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: #778089;
  letter-spacing: .04em;
}

/* ── 麵包屑 ── */
.dx-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #778089;
}
.dx-crumb a { color: #9a6206; text-decoration: none; }
.dx-crumb a:hover { color: #b3401e; }
.dx-crumb span[aria-hidden] { color: #778089; }

/* ── 分類籤 ── */
.dx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.dx-chips a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(20,24,29,.2);
  border-radius: 999px;
  color: #9a6206;
  font-size: 13px;
  text-decoration: none;
  transition: border-color .18s, background .18s, color .18s;
}
.dx-chips a:hover { border-color: rgba(179,64,30,.45); background: rgba(20,24,29,0.07); color: #9a6206; }
.dx-chips a[aria-current="page"] {
  border-color: rgba(179,64,30,.45);
  background: rgba(20,24,29,.14);
  color: #8f3211;
}
.dx-chips .n { font-size: 11.5px; color: #778089; }

/* ── 分類卡（辭典首頁） ── */
.dx-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
  margin: 0 0 30px;
}
.dx-cat-card {
  display: block;
  padding: 14px 15px;
  border: 1px solid rgba(20,24,29,.14);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(20,24,29,.05), rgba(20,24,29,.04));
  color: #3f4750;
  text-decoration: none;
  transition: border-color .18s, transform .18s;
}
.dx-cat-card:hover { border-color: rgba(179,64,30,.45); transform: translateY(-1px); }
.dx-cat-card .ic { font-size: 17px; margin-right: 6px; }
.dx-cat-card .nm { font-size: 14.5px; letter-spacing: .04em; }
.dx-cat-card .ct { display: block; margin-top: 6px; font-size: 11.5px; color: #778089; letter-spacing: .06em; }

/* ── 詞條清單 ── */
.dx-group { margin: 0 0 26px; }
.dx-group-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .14em;
  color: #9a6206;
}
.dx-list { margin: 0; padding: 0; list-style: none; }
.dx-list li { border-bottom: 1px solid rgba(20,24,29,0.09); }
.dx-list li:last-child { border-bottom: 0; }
.dx-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 2px;
  color: #3f4750;
  text-decoration: none;
  line-height: 1.7;
}
.dx-list a:hover { color: #8f3211; }
.dx-list .t { font-size: 15px; }
.dx-list .s {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: #778089;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dx-list .f { font-size: 11.5px; letter-spacing: .1em; }

/* ── 吉凶 ── */
.dx-f { font-size: 12px; letter-spacing: .12em; }
.dx-f.good { color: #1a7f4b; }
.dx-f.bad  { color: #b3261e; }
.dx-f.even { color: #778089; }

/* ── 詞條內頁 ── */
.dx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 18px;
  font-size: 12.5px;
  color: #778089;
}
.dx-meta .badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(179,64,30,.45);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: #9a6206;
}
.dx-lede {
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 1.95;
  color: #3f4750;
}
.dx-sec { margin: 0 0 24px; }
.dx-sec h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2em;
  color: #9a6206;
}
.dx-sec h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 1px;
  margin-right: 8px;
  vertical-align: 3px;
  background: rgba(179,64,30,.45);
}
.dx-prose {
  margin: 0;
  font-size: 16px;
  line-height: 2.0;
  color: #778089;
}
.dx-note {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(20,24,29,.14);
  font-size: 12.5px;
  line-height: 1.9;
  color: #778089;
}

/* ── 標籤 ── */
.dx-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.dx-tags li {
  padding: 4px 11px;
  border: 1px solid rgba(20,24,29,.14);
  border-radius: 999px;
  font-size: 12.5px;
  color: #778089;
}

/* ── 同類／延伸 ── */
.dx-related {
  margin: 28px 0 0;
  padding: 16px 16px 8px;
  border: 1px solid rgba(20,24,29,.14);
  border-radius: 14px;
  background: rgba(20,24,29,.04);
}
.dx-related h2 {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .18em;
  color: #778089;
}
.dx-related .dx-list a { padding: 8px 2px; }

/* ── 召喚（回到工具頁） ── */
.dx-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 26px 0 0;
  padding: 0 22px;
  border: 1px solid rgba(179,64,30,.45);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20,24,29,.14), rgba(20,24,29,0.06));
  color: #8f3211;
  font-size: 14px;
  letter-spacing: .16em;
  text-decoration: none;
}
.dx-cta:hover { background: linear-gradient(180deg, rgba(179,64,30,.45), rgba(20,24,29,0.1)); }

/* ── 六十四卦：卦畫 ── */
.dx-gua {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid rgba(20,24,29,.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,24,29,.05), rgba(20,24,29,.04));
}
.dx-gua-fig { flex: 0 0 auto; font-size: 46px; line-height: 1; color: #b3401e; letter-spacing: -.04em; }
.dx-gua-body { flex: 1; min-width: 0; }
.dx-gua-name { margin: 0 0 4px; font-size: 18px; letter-spacing: .08em; color: #3f4750; }
.dx-gua-zhu { margin: 0 0 8px; font-size: 13px; color: #778089; letter-spacing: .14em; }
.dx-gua-ci {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
  color: #3f4750;
  font-family: var(--serif);
  letter-spacing: .06em;
}
.dx-gua-key { margin: 8px 0 0; font-size: 12.5px; color: #778089; }

/* ── 爻辭表 ── */
.dx-yao { margin: 0; padding: 0; list-style: none; }
.dx-yao li {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(20,24,29,0.1);
}
.dx-yao li:last-child { border-bottom: 0; }
.dx-yao .slot { font-size: 12.5px; color: #778089; letter-spacing: .08em; padding-top: 4px; }
.dx-yao .txt { margin: 0; font-size: 16px; line-height: 1.9; color: #3f4750; font-family: var(--serif); }
.dx-yao .bai { margin: 5px 0 0; font-size: 13.5px; line-height: 1.9; color: #778089; }

/* ── 衍生卦 ── */
.dx-derive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}
.dx-derive a {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(20,24,29,.14);
  border-radius: 12px;
  background: rgba(20,24,29,.04);
  color: #778089;
  text-decoration: none;
}
.dx-derive a:hover { border-color: rgba(179,64,30,.45); }
.dx-derive .k { display: block; font-size: 11.5px; color: #778089; letter-spacing: .16em; margin-bottom: 4px; }
.dx-derive .v { font-size: 14px; }

/* ── 上下卦／前後卦 ── */
.dx-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 0;
  font-size: 13.5px;
}
.dx-pager a { color: #9a6206; text-decoration: none; }
.dx-pager a:hover { color: #8f3211; }
.dx-pager .ph { visibility: hidden; }

.dx-empty { color: #778089; font-size: 14px; line-height: 1.9; }

/* ── 手機 ── */
@media (max-width: 768px) {
  .dx-wrap { padding-top: 20px; padding-bottom: 44px; }
  .dx-head h1 { font-size: 23px; letter-spacing: .08em; }
  .dx-sub { font-size: 14px; line-height: 1.95; }
  .dx-lede { font-size: 15px; }
  .dx-prose { font-size: 15.5px; line-height: 1.95; }
  .dx-cat-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
  .dx-list a { padding: 12px 2px; }
  .dx-list .t { font-size: 14.5px; }
  .dx-list .s { display: none; }
  .dx-gua { padding: 15px; gap: 15px; }
  .dx-gua-fig { font-size: 38px; }
  .dx-gua-ci { font-size: 16px; }
  .dx-yao li { grid-template-columns: 2.9em 1fr; gap: 8px; padding: 12px 0; }
  .dx-yao .txt { font-size: 15.5px; }
  .dx-chips a { min-height: 36px; }
  .dx-cta { width: 100%; justify-content: center; }
}
