/* ============ 字典栏目专用样式（栏目页/列表/详情） ============ */

/* ---------- 栏目页字母索引（带字数） ---------- */
.zd-zm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.zd-zm a {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  padding: 10px 0; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; font-size: 20px; font-weight: 700;
}
.zd-zm a:hover { border-color: var(--red); background: var(--hover); }
.zd-zm a i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--ink-light); }

/* ---------- 部首/笔画索引 ---------- */
.zd-bs { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.zd-bs a { font-size: 15px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.zd-bs a:hover { border-color: var(--red); color: var(--red); }
.zd-bs a i { font-style: normal; font-size: 11px; color: var(--ink-light); margin-left: 3px; }

/* ---------- 汉字网格（列表页：大字+拼音） ---------- */
.zi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.zi-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
.zi-grid a:hover { border-color: var(--red); background: var(--hover); }
.zi-grid .zi { font-size: 30px; line-height: 1.2; font-weight: 700; }
.zi-grid .py { font-size: 12px; color: var(--ink-light); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 字母导航条（列表页顶部） */
.zd-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.zd-bar a {
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; font-size: 15px; font-weight: 700;
}
.zd-bar a:hover { border-color: var(--red); background: var(--hover); }
.zd-bar a.on { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- 详情页 ---------- */
.zd-head { display: flex; align-items: center; gap: 26px; padding: 26px 0 20px; border-bottom: 2px solid var(--ink); }
.zd-zi { font-size: 64px; line-height: 1.1; font-weight: 700; min-width: 90px; text-align: center; }
.zd-head-right { flex: 1; }
.zd-pinyins { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 18px; align-items: center; }
.zd-pinyins .py { font-weight: 700; }
.zd-pinyins .fan { font-size: 14px; color: var(--ink-light); margin-left: 8px; }

/* 字形信息表 */
.zi-info {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff;
}
.zi-info div { padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.zi-info b { color: var(--ink-light); font-weight: 400; margin-right: 8px; }

/* ---------- 源内容 class 适配（zyjs/xxjs/kxzd/swjz 里的结构） ---------- */
.zd-body .zdneirong { font-size: 15px; }
.zd-body h3 {
  font-size: 16px; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.zd-body .zdstrong { font-weight: 700; color: var(--red); }
.zd-body .pinyin { color: #3a6ea5; }
.zd-body .indent { text-indent: 2em; }
.zd-body p { margin: 6px 0; }
.zd-body img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 3px; }

/* 成语/组词 */
.zd-word-list { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .zd-zm { grid-template-columns: repeat(4, 1fr); }
  .zi-grid { grid-template-columns: repeat(3, 1fr); }
  .zi-info { grid-template-columns: repeat(2, 1fr); }
  .zd-head { flex-direction: column; align-items: flex-start; }
}
